diff --git a/components/adminsrv/buf.lock b/components/adminsrv/buf.lock index ee65047..d9fc7e8 100644 --- a/components/adminsrv/buf.lock +++ b/components/adminsrv/buf.lock @@ -12,9 +12,9 @@ deps: owner: googleapis repository: googleapis branch: main - commit: 9088184d3ed04821b7e990024ff05656 - digest: b1---R9Xre3yvH8peoJPQ0dsUYp37KzdlBlx5fjPsYekyI= - create_time: 2021-12-23T15:04:49.66847Z + commit: b53ed4c940ec4644ad883e5f762f72c9 + digest: b1-Hn98QihtUQeHWUou8-tO1IrLAOplFch71V2xunGjBvc= + create_time: 2022-02-09T15:07:44.173247Z - remote: buf.build owner: grpc-ecosystem repository: grpc-gateway @@ -22,3 +22,10 @@ deps: commit: ff83506eb9cc4cf8972f49ce87e6ed3e digest: b1-iLPHgLaoeWWinMiXXqPnxqE4BThtY3eSbswVGh9GOGI= create_time: 2021-10-23T16:26:52.283938Z + - remote: buf.build + owner: rafay + repository: k8s + branch: main + commit: b96f66eb56bc4f279431f4b2187a2fee + digest: b1-U7KVig2Fgpf6eRczjqxrYFa3p6HLqgtEy5QJAOVB8BI= + create_time: 2022-02-09T08:44:35.431677Z diff --git a/components/adminsrv/buf.yaml b/components/adminsrv/buf.yaml index 410db25..e2e48c0 100644 --- a/components/adminsrv/buf.yaml +++ b/components/adminsrv/buf.yaml @@ -4,6 +4,7 @@ deps: - buf.build/googleapis/googleapis - buf.build/grpc-ecosystem/grpc-gateway - buf.build/gogo/protobuf + - buf.build/rafay/k8s breaking: use: - FILE diff --git a/components/adminsrv/gen/openapi/proto/rpc/v3/organization.swagger.json b/components/adminsrv/gen/openapi/proto/rpc/organization.swagger.json similarity index 97% rename from components/adminsrv/gen/openapi/proto/rpc/v3/organization.swagger.json rename to components/adminsrv/gen/openapi/proto/rpc/organization.swagger.json index bc714f3..c6bff71 100644 --- a/components/adminsrv/gen/openapi/proto/rpc/v3/organization.swagger.json +++ b/components/adminsrv/gen/openapi/proto/rpc/organization.swagger.json @@ -137,6 +137,13 @@ "type": "string", "default": "Organization" }, + { + "name": "metadata.displayName", + "description": "Display Name. display name of the resource", + "in": "query", + "required": false, + "type": "string" + }, { "name": "metadata.description", "description": "Description. description of the resource", @@ -403,6 +410,13 @@ "type": "string", "default": "Organization" }, + { + "name": "metadata.displayName", + "description": "Display Name. display name of the resource", + "in": "query", + "required": false, + "type": "string" + }, { "name": "metadata.description", "description": "Description. description of the resource", @@ -722,6 +736,13 @@ "required": false, "type": "string" }, + { + "name": "metadata.displayName", + "description": "Display Name. display name of the resource", + "in": "query", + "required": false, + "type": "string" + }, { "name": "metadata.description", "description": "Description. description of the resource", @@ -1058,6 +1079,11 @@ "description": "name of the resource", "title": "Name" }, + "displayName": { + "type": "string", + "description": "display name of the resource", + "title": "Display Name" + }, "description": { "type": "string", "description": "description of the resource", diff --git a/components/adminsrv/gen/openapi/proto/rpc/v3/partner.swagger.json b/components/adminsrv/gen/openapi/proto/rpc/partner.swagger.json similarity index 97% rename from components/adminsrv/gen/openapi/proto/rpc/v3/partner.swagger.json rename to components/adminsrv/gen/openapi/proto/rpc/partner.swagger.json index d33d31a..0db63fb 100644 --- a/components/adminsrv/gen/openapi/proto/rpc/v3/partner.swagger.json +++ b/components/adminsrv/gen/openapi/proto/rpc/partner.swagger.json @@ -123,6 +123,13 @@ "type": "string", "default": "Partner" }, + { + "name": "metadata.displayName", + "description": "Display Name. display name of the resource", + "in": "query", + "required": false, + "type": "string" + }, { "name": "metadata.description", "description": "Description. description of the resource", @@ -337,6 +344,13 @@ "type": "string", "default": "Partner" }, + { + "name": "metadata.displayName", + "description": "Display Name. display name of the resource", + "in": "query", + "required": false, + "type": "string" + }, { "name": "metadata.description", "description": "Description. description of the resource", @@ -644,6 +658,11 @@ "description": "name of the resource", "title": "Name" }, + "displayName": { + "type": "string", + "description": "display name of the resource", + "title": "Display Name" + }, "description": { "type": "string", "description": "description of the resource", diff --git a/components/adminsrv/gen/openapi/proto/rpc/v3/project.swagger.json b/components/adminsrv/gen/openapi/proto/rpc/project.swagger.json similarity index 96% rename from components/adminsrv/gen/openapi/proto/rpc/v3/project.swagger.json rename to components/adminsrv/gen/openapi/proto/rpc/project.swagger.json index 8ba6300..4f2a3b0 100644 --- a/components/adminsrv/gen/openapi/proto/rpc/v3/project.swagger.json +++ b/components/adminsrv/gen/openapi/proto/rpc/project.swagger.json @@ -151,6 +151,13 @@ "type": "string", "default": "Project" }, + { + "name": "metadata.displayName", + "description": "Display Name. display name of the resource", + "in": "query", + "required": false, + "type": "string" + }, { "name": "metadata.description", "description": "Description. description of the resource", @@ -295,6 +302,13 @@ "type": "string", "default": "Project" }, + { + "name": "metadata.displayName", + "description": "Display Name. display name of the resource", + "in": "query", + "required": false, + "type": "string" + }, { "name": "metadata.description", "description": "Description. description of the resource", @@ -499,6 +513,13 @@ "required": false, "type": "string" }, + { + "name": "metadata.displayName", + "description": "Display Name. display name of the resource", + "in": "query", + "required": false, + "type": "string" + }, { "name": "metadata.description", "description": "Description. description of the resource", @@ -684,6 +705,11 @@ "description": "name of the resource", "title": "Name" }, + "displayName": { + "type": "string", + "description": "display name of the resource", + "title": "Display Name" + }, "description": { "type": "string", "description": "description of the resource", diff --git a/components/adminsrv/go.mod b/components/adminsrv/go.mod index b02cd4f..5d12805 100644 --- a/components/adminsrv/go.mod +++ b/components/adminsrv/go.mod @@ -6,41 +6,54 @@ require ( github.com/RafaySystems/rcloud-base/components/common v0.0.0-unpublished github.com/gogo/protobuf v1.3.2 github.com/google/uuid v1.3.0 - github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.2 + github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.3 github.com/spf13/viper v1.10.1 - github.com/uptrace/bun v1.0.20 + github.com/uptrace/bun v1.0.21 github.com/uptrace/bun/dialect/pgdialect v1.0.20 github.com/uptrace/bun/driver/pgdriver v1.0.20 github.com/uptrace/bun/extra/bundebug v1.0.20 - google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa + google.golang.org/genproto v0.0.0-20220118154757-00ab72f36ad5 google.golang.org/grpc v1.43.0 google.golang.org/protobuf v1.27.1 sigs.k8s.io/controller-runtime v0.11.0 ) require ( + github.com/beorn7/perks v1.0.1 // indirect + github.com/cespare/xxhash/v2 v2.1.2 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/evanphx/json-patch v4.12.0+incompatible // indirect github.com/fatih/color v1.13.0 // indirect github.com/fsnotify/fsnotify v1.5.1 // indirect github.com/go-logr/logr v1.2.0 // indirect + github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.2 // indirect - github.com/google/go-cmp v0.5.6 // indirect + github.com/google/go-cmp v0.5.7 // indirect github.com/google/gofuzz v1.1.0 // indirect + github.com/googleapis/gnostic v0.5.5 // indirect github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect github.com/hashicorp/hcl v1.0.0 // indirect + github.com/imdario/mergo v0.3.12 // indirect github.com/jinzhu/inflection v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/julienschmidt/httprouter v1.3.0 // indirect - github.com/klauspost/cpuid/v2 v2.0.6 // indirect github.com/magiconair/properties v1.8.5 // indirect github.com/mattn/go-colorable v0.1.12 // indirect github.com/mattn/go-isatty v0.0.14 // indirect + github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect github.com/mitchellh/mapstructure v1.4.3 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pelletier/go-toml v1.9.4 // indirect github.com/processout/grpc-go-pool v1.2.1 // indirect - github.com/segmentio/asm v1.1.0 // indirect - github.com/segmentio/encoding v0.3.2 // indirect + github.com/prometheus/client_golang v1.11.0 // indirect + github.com/prometheus/client_model v0.2.0 // indirect + github.com/prometheus/common v0.28.0 // indirect + github.com/prometheus/procfs v0.6.0 // indirect + github.com/rs/xid v1.3.0 + github.com/segmentio/asm v1.1.3 // indirect + github.com/segmentio/encoding v0.3.3 // indirect + github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546 github.com/speps/go-hashids v2.0.0+incompatible // indirect github.com/spf13/afero v1.6.0 // indirect github.com/spf13/cast v1.4.1 // indirect @@ -48,27 +61,69 @@ require ( github.com/spf13/pflag v1.0.5 // indirect github.com/subosito/gotenv v1.2.0 // indirect github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc // indirect + github.com/valyala/fastjson v1.6.3 // indirect github.com/vmihailenco/msgpack/v5 v5.3.5 // indirect github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect go.uber.org/atomic v1.7.0 // indirect go.uber.org/multierr v1.6.0 // indirect - go.uber.org/zap v1.19.1 // indirect + go.uber.org/zap v1.20.0 // indirect golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3 // indirect golang.org/x/net v0.0.0-20211209124913-491a49abca63 // indirect + golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e // indirect + golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b // indirect golang.org/x/text v0.3.7 // indirect + golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect + gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect + google.golang.org/appengine v1.6.7 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.66.2 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect - k8s.io/apimachinery v0.23.1 // indirect + gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect + k8s.io/apiextensions-apiserver v0.23.2 // indirect + k8s.io/apimachinery v0.23.2 // indirect + k8s.io/component-base v0.23.2 // indirect k8s.io/klog v1.0.0 // indirect k8s.io/klog/v2 v2.30.0 // indirect + k8s.io/kube-openapi v0.0.0-20220114203427-a0453230fd26 // indirect k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b // indirect mellium.im/sasl v0.2.1 // indirect sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 // indirect sigs.k8s.io/kustomize/pseudo/k8s v0.1.0 // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.2.0 // indirect - sigs.k8s.io/yaml v1.3.0 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect +) + +require ( + github.com/dgraph-io/ristretto v0.1.0 + github.com/pkg/errors v0.9.1 + github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749 + k8s.io/api v0.23.2 + k8s.io/client-go v0.23.2 + sigs.k8s.io/yaml v1.3.0 +) + +require ( + github.com/PuerkitoBio/purell v1.1.1 // indirect + github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect + github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef // indirect + github.com/dustin/go-humanize v1.0.0 // indirect + github.com/go-openapi/analysis v0.20.1 // indirect + github.com/go-openapi/errors v0.20.2 // indirect + github.com/go-openapi/jsonpointer v0.19.5 // indirect + github.com/go-openapi/jsonreference v0.19.6 // indirect + github.com/go-openapi/loads v0.21.0 // indirect + github.com/go-openapi/runtime v0.21.1 // indirect + github.com/go-openapi/spec v0.20.4 // indirect + github.com/go-openapi/strfmt v0.21.1 // indirect + github.com/go-openapi/swag v0.19.15 // indirect + github.com/go-openapi/validate v0.20.3 // indirect + github.com/go-stack/stack v1.8.0 // indirect + github.com/golang/glog v1.0.0 // indirect + github.com/josharian/intern v1.0.0 // indirect + github.com/mailru/easyjson v0.7.6 // indirect + github.com/oklog/ulid v1.3.1 // indirect + github.com/opentracing/opentracing-go v1.2.0 // indirect + go.mongodb.org/mongo-driver v1.7.5 // indirect ) replace github.com/RafaySystems/rcloud-base/components/common v0.0.0-unpublished => ../common/ diff --git a/components/adminsrv/go.sum b/components/adminsrv/go.sum index c8374e9..d565f01 100644 --- a/components/adminsrv/go.sum +++ b/components/adminsrv/go.sum @@ -73,14 +73,19 @@ github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb0 github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= +github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/antlr/antlr4/runtime/Go/antlr v0.0.0-20210826220005-b48c857c3a0e/go.mod h1:F7bn7fEU90QkQ3tnmaTx3LTKLEDqnwWODIYppRQ5hnY= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= @@ -88,12 +93,19 @@ github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmV github.com/armon/go-metrics v0.3.10/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg= +github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg= +github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef h1:46PFijGLmAjMPwCCCo7Jf0W6f9slllCkkv7vyc1yOSg= +github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= +github.com/aws/aws-sdk-go v1.34.28/go.mod h1:H7NKnBqNVzoTJpGfLrQkkD+ytBA93eiDYi/+8rV9s48= github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= 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= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= @@ -103,8 +115,10 @@ github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/certifi/gocertifi v0.0.0-20191021191039-0944d244cd40/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= github.com/certifi/gocertifi v0.0.0-20200922220541-2c3bb06c6054/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= +github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= @@ -139,10 +153,17 @@ github.com/davecgh/go-spew v0.0.0-20151105211317-5215b55f46b2/go.mod h1:J7Y8YcW2 github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dgraph-io/ristretto v0.1.0 h1:Jv3CGQHp9OjuMBSne1485aDpUkTKEcUqF+jm/LuerPI= +github.com/dgraph-io/ristretto v0.1.0/go.mod h1:fux0lOrBhrVCJd3lcTHsIJhq1T2rokOu6v9Vcb3Q9ug= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2 h1:tdlZCpZ/P9DhczCTSixgIKmwPv6+wP5DGjqLYw5SUiA= +github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/spdystream v0.0.0-20181023171402-6480d4af844c/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= +github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/elazarl/goproxy v0.0.0-20191011121108-aa519ddbe484/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= @@ -162,6 +183,7 @@ github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7 github.com/envoyproxy/protoc-gen-validate v0.6.2/go.mod h1:2t7qjJNvHPx8IjnBOzl9E9/baC+qXE/TeeyBRzgJDws= github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ= github.com/evanphx/json-patch v4.5.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84= github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= @@ -178,6 +200,8 @@ github.com/getkin/kin-openapi v0.76.0/go.mod h1:660oXbgy5JFMKreazJaQTw7o+X00qeSy github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= +github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -191,19 +215,140 @@ github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7 github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v1.2.0 h1:QK40JKJyMdUDz+h+xvCsru/bJhvG0UxvePV0ufL/AcE= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/zapr v1.2.0 h1:n4JnPI1T3Qq1SFEi/F8rwLrZERp2bso19PJZDB9dayk= github.com/go-logr/zapr v1.2.0/go.mod h1:Qa4Bsj2Vb+FAVeAKsLD8RLQ+YRJB8YDmOAKxaBQf7Ro= +github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= +github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= +github.com/go-openapi/analysis v0.18.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= +github.com/go-openapi/analysis v0.19.2/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= +github.com/go-openapi/analysis v0.19.4/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= +github.com/go-openapi/analysis v0.19.5/go.mod h1:hkEAkxagaIvIP7VTn8ygJNkd4kAYON2rCu0v0ObL0AU= +github.com/go-openapi/analysis v0.19.10/go.mod h1:qmhS3VNFxBlquFJ0RGoDtylO9y4pgTAUNE9AEEMdlJQ= +github.com/go-openapi/analysis v0.19.16/go.mod h1:GLInF007N83Ad3m8a/CbQ5TPzdnGT7workfHwuVjNVk= +github.com/go-openapi/analysis v0.20.0/go.mod h1:BMchjvaHDykmRMsK40iPtvyOfFdMMxlOmQr9FBZk+Og= +github.com/go-openapi/analysis v0.20.1 h1:zdVbw8yoD4SWZeq+cWdGgquaB0W4VrsJvDJHJND/Ktc= +github.com/go-openapi/analysis v0.20.1/go.mod h1:BMchjvaHDykmRMsK40iPtvyOfFdMMxlOmQr9FBZk+Og= +github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= +github.com/go-openapi/errors v0.18.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= +github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= +github.com/go-openapi/errors v0.19.3/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= +github.com/go-openapi/errors v0.19.6/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= +github.com/go-openapi/errors v0.19.7/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= +github.com/go-openapi/errors v0.19.8/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= +github.com/go-openapi/errors v0.19.9/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= +github.com/go-openapi/errors v0.20.1/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= +github.com/go-openapi/errors v0.20.2 h1:dxy7PGTqEh94zj2E3h1cUmQQWiM1+aeCROfAr02EmK8= +github.com/go-openapi/errors v0.20.2/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= +github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= +github.com/go-openapi/jsonpointer v0.18.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= +github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= +github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= +github.com/go-openapi/jsonreference v0.18.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= +github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= +github.com/go-openapi/jsonreference v0.19.6 h1:UBIxjkht+AWIgYzCDSv2GN+E/togfwXUJFRTWhl2Jjs= +github.com/go-openapi/jsonreference v0.19.6/go.mod h1:diGHMEHg2IqXZGKxqyvWdfWU/aim5Dprw5bqpKkTvns= +github.com/go-openapi/loads v0.17.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= +github.com/go-openapi/loads v0.18.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= +github.com/go-openapi/loads v0.19.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= +github.com/go-openapi/loads v0.19.2/go.mod h1:QAskZPMX5V0C2gvfkGZzJlINuP7Hx/4+ix5jWFxsNPs= +github.com/go-openapi/loads v0.19.3/go.mod h1:YVfqhUCdahYwR3f3iiwQLhicVRvLlU/WO5WPaZvcvSI= +github.com/go-openapi/loads v0.19.5/go.mod h1:dswLCAdonkRufe/gSUC3gN8nTSaB9uaS2es0x5/IbjY= +github.com/go-openapi/loads v0.19.6/go.mod h1:brCsvE6j8mnbmGBh103PT/QLHfbyDxA4hsKvYBNEGVc= +github.com/go-openapi/loads v0.19.7/go.mod h1:brCsvE6j8mnbmGBh103PT/QLHfbyDxA4hsKvYBNEGVc= +github.com/go-openapi/loads v0.20.0/go.mod h1:2LhKquiE513rN5xC6Aan6lYOSddlL8Mp20AW9kpviM4= +github.com/go-openapi/loads v0.20.2/go.mod h1:hTVUotJ+UonAMMZsvakEgmWKgtulweO9vYP2bQYKA/o= +github.com/go-openapi/loads v0.21.0 h1:jYtUO4wwP7psAweisP/MDoOpdzsYEESdoPcsWjHDR68= +github.com/go-openapi/loads v0.21.0/go.mod h1:rHYve9nZrQ4CJhyeIIFJINGCg1tQpx2yJrrNo8sf1ws= +github.com/go-openapi/runtime v0.0.0-20180920151709-4f900dc2ade9/go.mod h1:6v9a6LTXWQCdL8k1AO3cvqx5OtZY/Y9wKTgaoP6YRfA= +github.com/go-openapi/runtime v0.19.0/go.mod h1:OwNfisksmmaZse4+gpV3Ne9AyMOlP1lt4sK4FXt0O64= +github.com/go-openapi/runtime v0.19.4/go.mod h1:X277bwSUBxVlCYR3r7xgZZGKVvBd/29gLDlFGtJ8NL4= +github.com/go-openapi/runtime v0.19.15/go.mod h1:dhGWCTKRXlAfGnQG0ONViOZpjfg0m2gUt9nTQPQZuoo= +github.com/go-openapi/runtime v0.19.16/go.mod h1:5P9104EJgYcizotuXhEuUrzVc+j1RiSjahULvYmlv98= +github.com/go-openapi/runtime v0.19.24/go.mod h1:Lm9YGCeecBnUUkFTxPC4s1+lwrkJ0pthx8YvyjCfkgk= +github.com/go-openapi/runtime v0.21.1 h1:/KIG00BzA2x2HRStX2tnhbqbQdPcFlkgsYCiNY20FZs= +github.com/go-openapi/runtime v0.21.1/go.mod h1:aQg+kaIQEn+A2CRSY1TxbM8+sT9g2V3aLc1FbIAnbbs= github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= +github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= +github.com/go-openapi/spec v0.18.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= +github.com/go-openapi/spec v0.19.2/go.mod h1:sCxk3jxKgioEJikev4fgkNmwS+3kuYdJtcsZsD5zxMY= +github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= +github.com/go-openapi/spec v0.19.6/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= +github.com/go-openapi/spec v0.19.8/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= +github.com/go-openapi/spec v0.19.15/go.mod h1:+81FIL1JwC5P3/Iuuozq3pPE9dXdIEGxFutcFKaVbmU= +github.com/go-openapi/spec v0.20.0/go.mod h1:+81FIL1JwC5P3/Iuuozq3pPE9dXdIEGxFutcFKaVbmU= +github.com/go-openapi/spec v0.20.1/go.mod h1:93x7oh+d+FQsmsieroS4cmR3u0p/ywH649a3qwC9OsQ= +github.com/go-openapi/spec v0.20.3/go.mod h1:gG4F8wdEDN+YPBMVnzE85Rbhf+Th2DTvA9nFPQ5AYEg= +github.com/go-openapi/spec v0.20.4 h1:O8hJrt0UMnhHcluhIdUgCLRWyM2x7QkBXRvOs7m+O1M= +github.com/go-openapi/spec v0.20.4/go.mod h1:faYFR1CvsJZ0mNsmsphTMSoRrNV3TEDoAM7FOEWeq8I= +github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= +github.com/go-openapi/strfmt v0.18.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= +github.com/go-openapi/strfmt v0.19.0/go.mod h1:+uW+93UVvGGq2qGaZxdDeJqSAqBqBdl+ZPMF/cC8nDY= +github.com/go-openapi/strfmt v0.19.2/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= +github.com/go-openapi/strfmt v0.19.3/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= +github.com/go-openapi/strfmt v0.19.4/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk= +github.com/go-openapi/strfmt v0.19.5/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk= +github.com/go-openapi/strfmt v0.19.11/go.mod h1:UukAYgTaQfqJuAFlNxxMWNvMYiwiXtLsF2VwmoFtbtc= +github.com/go-openapi/strfmt v0.20.0/go.mod h1:UukAYgTaQfqJuAFlNxxMWNvMYiwiXtLsF2VwmoFtbtc= +github.com/go-openapi/strfmt v0.20.2/go.mod h1:43urheQI9dNtE5lTZQfuFJvjYJKPrxicATpEfZwHUNk= +github.com/go-openapi/strfmt v0.21.0/go.mod h1:ZRQ409bWMj+SOgXofQAGTIo2Ebu72Gs+WaRADcS5iNg= +github.com/go-openapi/strfmt v0.21.1 h1:G6s2t5V5kGCHLVbSdZ/6lI8Wm4OzoPFkc3/cjAsKQrM= +github.com/go-openapi/strfmt v0.21.1/go.mod h1:I/XVKeLc5+MM5oPNN7P6urMOpuLXEcNrCX/rPGuWb0k= github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= +github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= +github.com/go-openapi/swag v0.18.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= +github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.7/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY= +github.com/go-openapi/swag v0.19.9/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY= +github.com/go-openapi/swag v0.19.12/go.mod h1:eFdyEBkTdoAf/9RXBvj4cr1nH7GD8Kzo5HTt47gr72M= +github.com/go-openapi/swag v0.19.13/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= +github.com/go-openapi/swag v0.19.15 h1:D2NRCBzS9/pEY3gP9Nl8aDqGUcPFrwG2p+CNFrLyrCM= +github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= +github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= +github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA= +github.com/go-openapi/validate v0.19.3/go.mod h1:90Vh6jjkTn+OT1Eefm0ZixWNFjhtOH7vS9k0lo6zwJo= +github.com/go-openapi/validate v0.19.10/go.mod h1:RKEZTUWDkxKQxN2jDT7ZnZi2bhZlbNMAuKvKB+IaGx8= +github.com/go-openapi/validate v0.19.12/go.mod h1:Rzou8hA/CBw8donlS6WNEUQupNvUZ0waH08tGe6kAQ4= +github.com/go-openapi/validate v0.19.15/go.mod h1:tbn/fdOwYHgrhPBzidZfJC2MIVvs9GA7monOmWBbeCI= +github.com/go-openapi/validate v0.20.1/go.mod h1:b60iJT+xNNLfaQJUqLI7946tYiFEOuE9E4k54HpKcJ0= +github.com/go-openapi/validate v0.20.3 h1:GZPPhhKSZrE8HjB4eEkoYAZmoWA4+tCemSgINH1/vKw= +github.com/go-openapi/validate v0.20.3/go.mod h1:goDdqVGiigM3jChcrYJxD2joalke3ZXeftD16byIjA4= +github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= +github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= 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/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= +github.com/gobuffalo/attrs v0.0.0-20190224210810-a9411de4debd/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0= +github.com/gobuffalo/depgen v0.0.0-20190329151759-d478694a28d3/go.mod h1:3STtPUQYuzV0gBVOY3vy6CfMm/ljR4pABfrTeHNLHUY= +github.com/gobuffalo/depgen v0.1.0/go.mod h1:+ifsuy7fhi15RWncXQQKjWS9JPkdah5sZvtHc2RXGlg= +github.com/gobuffalo/envy v1.6.15/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= +github.com/gobuffalo/envy v1.7.0/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= +github.com/gobuffalo/flect v0.1.0/go.mod h1:d2ehjJqGOH/Kjqcoz+F7jHTBbmDb38yXA598Hb50EGs= +github.com/gobuffalo/flect v0.1.1/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= +github.com/gobuffalo/flect v0.1.3/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= +github.com/gobuffalo/genny v0.0.0-20190329151137-27723ad26ef9/go.mod h1:rWs4Z12d1Zbf19rlsn0nurr75KqhYp52EAGGxTbBhNk= +github.com/gobuffalo/genny v0.0.0-20190403191548-3ca520ef0d9e/go.mod h1:80lIj3kVJWwOrXWWMRzzdhW3DsrdjILVil/SFKBzF28= +github.com/gobuffalo/genny v0.1.0/go.mod h1:XidbUqzak3lHdS//TPu2OgiFB+51Ur5f7CSnXZ/JDvo= +github.com/gobuffalo/genny v0.1.1/go.mod h1:5TExbEyY48pfunL4QSXxlDOmdsD44RRq4mVZ0Ex28Xk= +github.com/gobuffalo/gitgen v0.0.0-20190315122116-cc086187d211/go.mod h1:vEHJk/E9DmhejeLeNt7UVvlSGv3ziL+djtTr3yyzcOw= +github.com/gobuffalo/gogen v0.0.0-20190315121717-8f38393713f5/go.mod h1:V9QVDIxsgKNZs6L2IYiGR8datgMhB577vzTDqypH360= +github.com/gobuffalo/gogen v0.1.0/go.mod h1:8NTelM5qd8RZ15VjQTFkAW6qOMx5wBbW4dSCS3BY8gg= +github.com/gobuffalo/gogen v0.1.1/go.mod h1:y8iBtmHmGc4qa3urIyo1shvOD8JftTtfcKi+71xfDNE= +github.com/gobuffalo/logger v0.0.0-20190315122211-86e12af44bc2/go.mod h1:QdxcLw541hSGtBnhUc4gaNIXRjiDppFGaDqzbrBd3v8= +github.com/gobuffalo/mapi v1.0.1/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= +github.com/gobuffalo/mapi v1.0.2/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= +github.com/gobuffalo/packd v0.0.0-20190315124812-a385830c7fc0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= +github.com/gobuffalo/packd v0.1.0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= +github.com/gobuffalo/packr/v2 v2.0.9/go.mod h1:emmyGweYTm6Kdper+iywB6YK5YzuKchGtJQZ0Odn4pQ= +github.com/gobuffalo/packr/v2 v2.2.0/go.mod h1:CaAwI0GPIAv+5wKLtv8Afwl+Cm78K/I/VCm/3ptBN+0= +github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= @@ -218,6 +363,7 @@ github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4er github.com/golang/groupcache v0.0.0-20191027212112-611e8accdfc9/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= @@ -247,6 +393,7 @@ github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaS github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= @@ -264,8 +411,9 @@ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o= +github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= github.com/google/gofuzz v0.0.0-20161122191042-44d81051d367/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= @@ -289,6 +437,7 @@ github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= 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.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= @@ -299,6 +448,7 @@ github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pf github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU= +github.com/googleapis/gnostic v0.5.5 h1:9fHAtK0uDfpveeqqo1hkEZJcFvYXAiCN3UutL8F9xHw= github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97DwqyJO1AENw9kA= github.com/gophercloud/gophercloud v0.6.0/go.mod h1:GICNByuaEBibcjmjvI7QvYJSZEbGkcYwAR7EZK2WMqM= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= @@ -312,8 +462,8 @@ github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgf github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.2 h1:I/pwhnUln5wbMnTyRbzswA0/JxpK8sZj0aUfI3TV1So= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.2/go.mod h1:lsuH8kb4GlMdSlI4alNIBBSAt5CHJtg3i+0WuN9J5YM= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.3 h1:I8MsauTJQXZ8df8qJvEln0kYNc3bSapuaSsEsnFdEFU= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.3/go.mod h1:lZdb/YAJUSj9OqrCHs2ihjtoO3+xK3G53wTYXFWRGDo= github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= github.com/hashicorp/consul/api v1.12.0/go.mod h1:6pVBMo0ebnYdt2S3H87XhekM/HHrUoTD2XXb/VrZVy0= github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= @@ -355,13 +505,18 @@ github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47 github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E= github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= +github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= +github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= +github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v0.0.0-20180612202835-f2b4162afba3/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= @@ -378,19 +533,23 @@ github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfV github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0 h1:U0609e9tgbseu3rBINet9P48AI/D3oJs4dN7jwJOQ1U= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= +github.com/karrick/godirwalk v1.8.0/go.mod h1:H5KPZjojv4lE+QYImBI8xVtrBRgYrIVsaRPx4tDPEn4= +github.com/karrick/godirwalk v1.10.3/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= 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/cpuid/v2 v2.0.6 h1:dQ5ueTiftKxp0gyjKSx5+8BtPWkyQbd95m8Gys/RarI= -github.com/klauspost/cpuid/v2 v2.0.6/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= +github.com/klauspost/compress v1.9.5/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= +github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= @@ -399,9 +558,15 @@ github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czP github.com/magiconair/properties v1.8.5 h1:b6kJs+EmPFMYGkow9GiUyCyOvIwYetYJ3fSaWak/Gls= github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.7.1/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= +github.com/mailru/easyjson v0.7.6 h1:8yTIVnZgCoiM1TgqoeTl+LfU5Jg6/xL3QhGQnimLYnA= github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= +github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= @@ -416,6 +581,7 @@ github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Ky github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= @@ -429,6 +595,9 @@ github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS4 github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.3.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.4.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.3 h1:OVowDSCllw/YjdLkam3/sm7wEtOy59d8ndGgCcyj8cs= github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= @@ -442,6 +611,7 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= @@ -452,6 +622,7 @@ github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLA github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= +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 v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= @@ -466,9 +637,14 @@ github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1y github.com/onsi/gomega v1.17.0 h1:9Luw4uT5HTjHTN8+aNcSThgH1vdXnmdJ8xIfZ4wyTRE= github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= +github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pelletier/go-toml v1.4.0/go.mod h1:PN7xzY2wHTK0K9p34ErDQMlFxa51Fk0OUruD3k1mMwo= +github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pelletier/go-toml v1.9.4 h1:tjENF6MfZAg8e4ZmZTeWaWiT2vXtsoO6+iuOjFhECwM= github.com/pelletier/go-toml v1.9.4/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= @@ -491,10 +667,12 @@ github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDf github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= +github.com/prometheus/client_golang v1.11.0 h1:HNkLOAEQMIDv/K+04rukrLx6ch7msSRwf3/SASFAGtQ= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= @@ -502,28 +680,41 @@ github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y8 github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= +github.com/prometheus/common v0.28.0 h1:vGVfV9KrDTvWt5boZO0I19g2E3CsWfpPPKZM9dt3mEw= github.com/prometheus/common v0.28.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.6.0 h1:mxy4L2jP6qMonqmq+aTtOx1ifVWUgG/TAmntgbh3xv4= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-charset v0.0.0-20180617210344-2471d30d28b4/go.mod h1:qgYeAmZ5ZIpBWTGllZSQnw97Dj+woV0toclVaRGI8pc= +github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rs/xid v1.3.0 h1:6NjYksEUlhurdVehpc7S7dk6DAmcKv8V9gG0FsVN2U4= +github.com/rs/xid v1.3.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/sagikazarmark/crypt v0.4.0/go.mod h1:ALv2SRj7GxYV4HO9elxH9nS6M9gW+xDNxqmyJ6RfDFM= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/segmentio/asm v1.1.0 h1:fkVr8k5J4sKoFjTGVD6r1yKvDKqmvrEh3K7iyVxgBs8= -github.com/segmentio/asm v1.1.0/go.mod h1:4EUJGaKsB8ImLUwOGORVsNd9vTRDeh44JGsY4aKp5I4= -github.com/segmentio/encoding v0.3.2 h1:gkXXteOfNaPPlrXTEf/e5tWvaQGVJWnvT3LqMzUeH7U= -github.com/segmentio/encoding v0.3.2/go.mod h1:waft2p6XI4z2pk07M0YzZV4wEiqaRvsBSyWNHxVx4gU= +github.com/segmentio/asm v1.1.3 h1:WM03sfUOENvvKexOLp+pCqgb/WDjsi7EK8gIsICtzhc= +github.com/segmentio/asm v1.1.3/go.mod h1:Ld3L4ZXGNcSLRg4JBsZ3//1+f/TjYl0Mzen/DQy1EJg= +github.com/segmentio/encoding v0.3.3 h1:VG1HceOLwHkSDdkxshlu9pD4FftWkScmHc8RDQ+w9uM= +github.com/segmentio/encoding v0.3.3/go.mod h1:n0JeuIqEQrQoPDGsjo8UNd1iA0U8d8+oHAA4E3G3OxM= +github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= +github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749 h1:bUGsEnyNbVPw06Bs80sCeARAlK8lhwqGyi6UT8ymuGk= +github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546 h1:pXY9qYc/MP5zdvqWEUH6SjNiu7VhSjuVFTFiTcphaLU= +github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= @@ -544,6 +735,7 @@ github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkU github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.4.1 h1:s0hze+J0196ZfEMTs80N7UlFt0BDuQ7Q+JDnHiMWKdA= github.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= @@ -560,6 +752,7 @@ github.com/spf13/viper v1.10.1/go.mod h1:IGlFPqhNAPKRxohIzWpI5QEy4kuI7tcl5WvR+8q github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/testify v0.0.0-20151208002404-e3a8ff8ce365/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= @@ -570,24 +763,36 @@ github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5Cc github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= +github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4= +github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc h1:9lRDQMhESg+zvGYmW5DyG0UqvY96Bu5QYsTLvCHdrgo= github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc/go.mod h1:bciPuU6GHm1iF1pBvUfxfsH0Wmnc2VbpgvbI9ZWuIRs= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= -github.com/uptrace/bun v1.0.20 h1:/T4p9C9tEN75U3cFMBr5njlP+rBfs4An8BmlQQPbcfE= github.com/uptrace/bun v1.0.20/go.mod h1:Uv7z0z+7dXnUS9P5hMF0hdiM/4M+xOUHQCrZpyDrpRc= +github.com/uptrace/bun v1.0.21 h1:5ek4bnrEmZo6wvY/RHt1dJNXzOPOnrfJeZMoZfZt9Io= +github.com/uptrace/bun v1.0.21/go.mod h1:u+QsgCgjGFwshy3euGAN1CLEO9RMf42lga5jQ/ezYsc= github.com/uptrace/bun/dialect/pgdialect v1.0.20 h1:1Yajz0M2AhOzvxFEQSAQ8TpqzSRFxYOg+saksIQ0dmU= github.com/uptrace/bun/dialect/pgdialect v1.0.20/go.mod h1:Z2UoOgTKHXgFOuInXsJKkNQJiFIaPkCvsj0EayOI2yk= github.com/uptrace/bun/driver/pgdriver v1.0.20 h1:CEWHL5NS5FQIJAJxY40t0llwe8XxVlsblbgi9Upm0fA= github.com/uptrace/bun/driver/pgdriver v1.0.20/go.mod h1:KAONvCIiI4A6HdMTZ8zCdGxh7P6+23Todz+bL8HRzV4= github.com/uptrace/bun/extra/bundebug v1.0.20 h1:lwuGUMiqujR3NuGDKgJu1j7XL3LsULSv1MDFHlYBAGs= github.com/uptrace/bun/extra/bundebug v1.0.20/go.mod h1:tDoi/zmjHkumthaCujwfI2+mni0G41HfJD4HC2oMdpk= +github.com/valyala/fastjson v1.6.3 h1:tAKFnnwmeMGPbwJ7IwxcTPCNr3uIzoIj3/Fh90ra4xc= +github.com/valyala/fastjson v1.6.3/go.mod h1:CLCAqky6SMuOcxStkYQvblddUtoRxhYMGLrsQns1aXY= +github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw= github.com/vmihailenco/msgpack/v5 v5.3.5 h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9znI5mJU= github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= +github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= +github.com/xdg-go/scram v1.0.2/go.mod h1:1WAq6h33pAW+iRreB34OORO2Nf7qel3VV3fjBj+hCSs= +github.com/xdg-go/stringprep v1.0.2/go.mod h1:8F9zXuvzgwmyT5DUm4GUfZGDdT3W+LCvS6+da4O5kxM= +github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I= +github.com/xdg/stringprep v0.0.0-20180714160509-73f8eece6fdc/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -606,6 +811,17 @@ go.etcd.io/etcd/client/v3 v3.5.0/go.mod h1:AIKXXVX/DQXtfTEqBryiLTUXwON+GuvO6Z7lL go.etcd.io/etcd/pkg/v3 v3.5.0/go.mod h1:UzJGatBQ1lXChBkQF0AuAtkRQMYnHubxAEYIrC3MSsE= go.etcd.io/etcd/raft/v3 v3.5.0/go.mod h1:UFOHSIvO/nKwd4lhkwabrTD3cqW5yVyYYf/KlD00Szc= go.etcd.io/etcd/server/v3 v3.5.0/go.mod h1:3Ah5ruV+M+7RZr0+Y/5mNLwC+eQlni+mQmOVdCRJoS4= +go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= +go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= +go.mongodb.org/mongo-driver v1.3.0/go.mod h1:MSWZXKOynuguX+JSvwP8i+58jYCXxbia8HS3gZBapIE= +go.mongodb.org/mongo-driver v1.3.4/go.mod h1:MSWZXKOynuguX+JSvwP8i+58jYCXxbia8HS3gZBapIE= +go.mongodb.org/mongo-driver v1.4.3/go.mod h1:WcMNYLx/IlOxLe6JRJiv2uXuCz6zBLndR4SoGjYphSc= +go.mongodb.org/mongo-driver v1.4.4/go.mod h1:WcMNYLx/IlOxLe6JRJiv2uXuCz6zBLndR4SoGjYphSc= +go.mongodb.org/mongo-driver v1.4.6/go.mod h1:WcMNYLx/IlOxLe6JRJiv2uXuCz6zBLndR4SoGjYphSc= +go.mongodb.org/mongo-driver v1.5.1/go.mod h1:gRXCHX4Jo7J0IJ1oDQyUxF7jfy19UfxniMS4xxMmUqw= +go.mongodb.org/mongo-driver v1.7.3/go.mod h1:NqaYOwnXWr5Pm7AOpO5QFxKJ503nbMse/R79oO62zWg= +go.mongodb.org/mongo-driver v1.7.5 h1:ny3p0reEpgsR2cfA5cjgwFZg3Cv/ofFh/8jbhGtz9VI= +go.mongodb.org/mongo-driver v1.7.5/go.mod h1:VXEWRZ6URJIkUq2SCAyapmhH0ZLRBP+FT4xhp5Zvxng= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= @@ -630,6 +846,7 @@ go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= +go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.1.12 h1:gZAh5/EyT/HQwlpkCy6wTpqfH9H8Lz8zbm3dZh+OyzA= go.uber.org/goleak v1.1.12/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= @@ -638,17 +855,24 @@ go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9i go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= -go.uber.org/zap v1.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI= go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= +go.uber.org/zap v1.20.0 h1:N4oPlghZwYG55MlU6LXk/Zp00FVNE9X9wrYO8CEs4lc= +go.uber.org/zap v1.20.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180910181607-0e37d006457b/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190320223903-b7391e95e576/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190422162423-af44ce270edf/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190530122614-20be4c3c3ed5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= @@ -694,6 +918,7 @@ golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73r 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-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -701,6 +926,7 @@ golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190320064053-1272bf9dcd53/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -723,6 +949,7 @@ golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/ golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200602114024-627f9648deb9/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= @@ -731,11 +958,13 @@ golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= +golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= @@ -762,11 +991,13 @@ golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 h1:RerP+noqYHUQ8CMRcPlC2nvTa4dcBIjegkuWdcUDuqg= golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190412183630-56d357773e84/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -785,11 +1016,16 @@ golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190321052220-f7bb7a8bee54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190419153524-e8e3143a4f4a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190531175056-4c3a928424d2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -838,6 +1074,7 @@ golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210420072515-93ed5bcd2bfe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -855,12 +1092,14 @@ golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211029165221-6e7872819dc8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211110154304-99a53858aa08/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211123173158-ef496fb156ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e h1:fLOSk5Q00efkSvAm+4xcoXD+RRmLmmulPn5I3Y9F2EM= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b h1:9zKuko04nR4gjZ4+DNjHqRlAJqbJETHwiNKDqTfOjfE= golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -877,21 +1116,29 @@ golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac h1:7zkz7BUtwNFFqcowJ+RIgu2MaV/MapERkDIy+mwPyjs= golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190125232054-d66bd3c5d5a6/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190329151228-23e29df326fe/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190416151739-9c9e1878f421/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190420181800-aa740d480789/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190531172133-b3315ee88b7d/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190617190820-da514acc4774/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= @@ -941,12 +1188,14 @@ golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.6-0.20210820212750-d4cc65f0b2ff h1:VX/uD7MK0AHXGiScH3fsieUQUcpmRERPDYtqZdJnA+Q= golang.org/x/tools v0.1.6-0.20210820212750-d4cc65f0b2ff/go.mod h1:YD9qOF0M9xpSpdWTBbzEl5e/RnCefISl8E5Noe10jFM= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +gomodules.xyz/jsonpatch/v2 v2.2.0 h1:4pT439QV83L+G9FkcCriY6EkpcK6r6bK+A5FBUMI7qY= gomodules.xyz/jsonpatch/v2 v2.2.0/go.mod h1:WXp+iVDkoLQqPudfQ9GBlwB2eZ5DKOnjQZCYdOS8GPY= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= @@ -987,6 +1236,7 @@ google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7 google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -1051,8 +1301,9 @@ google.golang.org/genproto v0.0.0-20211008145708-270636b82663/go.mod h1:5CzLGKJ6 google.golang.org/genproto v0.0.0-20211028162531-8db9c33dc351/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa h1:I0YcKz0I7OAhddo7ya8kMnvprhcWM045PmkBdMO9zN0= google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220118154757-00ab72f36ad5 h1:zzNejm+EgrbLfDZ6lu9Uud2IVvHySPl8vQzf04laR5Q= +google.golang.org/genproto v0.0.0-20220118154757-00ab72f36ad5/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -1126,6 +1377,7 @@ gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= @@ -1139,14 +1391,24 @@ honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt 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.23.0/go.mod h1:8wmDdLBHBNxtOIytwLstXt5E9PddnZb0GaMcqsvDBpg= +k8s.io/api v0.23.2 h1:62cpzreV3dCuj0hqPi8r4dyWh48ogMcyh+ga9jEGij4= +k8s.io/api v0.23.2/go.mod h1:sYuDb3flCtRPI8ghn6qFrcK5ZBu2mhbElxRE95qpwlI= k8s.io/apiextensions-apiserver v0.23.0/go.mod h1:xIFAEEDlAZgpVBl/1VSjGDmLoXAWRG40+GsWhKhAxY4= +k8s.io/apiextensions-apiserver v0.23.2 h1:N6CIVAhmF0ahgFKUMDdV/AUyckhUb4nIyVPohPtdUPk= +k8s.io/apiextensions-apiserver v0.23.2/go.mod h1:9cs7avT6+GfzbB0pambTvH11wcaR85QQg4ovl9s15UU= k8s.io/apimachinery v0.23.0/go.mod h1:fFCTTBKvKcwTPFzjlcxp91uPFZr+JA0FubU4fLzzFYc= -k8s.io/apimachinery v0.23.1 h1:sfBjlDFwj2onG0Ijx5C+SrAoeUscPrmghm7wHP+uXlo= -k8s.io/apimachinery v0.23.1/go.mod h1:SADt2Kl8/sttJ62RRsi9MIV4o8f5S3coArm0Iu3fBno= +k8s.io/apimachinery v0.23.2 h1:dBmjCOeYBdg2ibcQxMuUq+OopZ9fjfLIR5taP/XKeTs= +k8s.io/apimachinery v0.23.2/go.mod h1:zDqeV0AK62LbCI0CI7KbWCAYdLg+E+8UXJ0rIz5gmS8= k8s.io/apiserver v0.23.0/go.mod h1:Cec35u/9zAepDPPFyT+UMrgqOCjgJ5qtfVJDxjZYmt4= +k8s.io/apiserver v0.23.2/go.mod h1:Kdt8gafkPev9Gfh+H6lCPbmRu42f7BfhOfHKKa3dtyU= k8s.io/client-go v0.23.0/go.mod h1:hrDnpnK1mSr65lHHcUuIZIXDgEbzc7/683c6hyG4jTA= +k8s.io/client-go v0.23.2 h1:BNbOcxa99jxHH8mM1cPKGIrrKRnCSAfAtyonYGsbFtE= +k8s.io/client-go v0.23.2/go.mod h1:k3YbsWg6GWdHF1THHTQP88X9RhB1DWPo3Dq7KfU/D1c= k8s.io/code-generator v0.23.0/go.mod h1:vQvOhDXhuzqiVfM/YHp+dmg10WDZCchJVObc9MvowsE= +k8s.io/code-generator v0.23.2/go.mod h1:S0Q1JVA+kSzTI1oUvbKAxZY/DYbA/ZUb4Uknog12ETk= k8s.io/component-base v0.23.0/go.mod h1:DHH5uiFvLC1edCpvcTDV++NKULdYYU6pR9Tt3HIKMKI= +k8s.io/component-base v0.23.2 h1:dAYmUhWIBWO762etTjBEEKtYYHi5CoQInSLtK6LM1Zs= +k8s.io/component-base v0.23.2/go.mod h1:wS9Z03MO3oJ0RU8bB/dbXTiluGju+SC/F5i660gxB8c= k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= @@ -1159,6 +1421,8 @@ k8s.io/klog/v2 v2.30.0 h1:bUO6drIvCIsvZ/XFgfxoGFQU/a4Qkh0iAlvUR7vlHJw= k8s.io/klog/v2 v2.30.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E= k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65/go.mod h1:sX9MT8g7NVZM5lVL/j8QyCCJe8YSMW30QvGZWaCIDIk= +k8s.io/kube-openapi v0.0.0-20220114203427-a0453230fd26 h1:2G24ndYyfk0l23ZrGutxb0s9TRe4m1ZjFlcu4cEU1zA= +k8s.io/kube-openapi v0.0.0-20220114203427-a0453230fd26/go.mod h1:sX9MT8g7NVZM5lVL/j8QyCCJe8YSMW30QvGZWaCIDIk= k8s.io/utils v0.0.0-20191030222137-2b95a09bc58d/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b h1:wxEMGetGMur3J1xuGLQY7GEQYg9bZxKn3tKo5k/eYcs= @@ -1169,6 +1433,7 @@ rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8 rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.25/go.mod h1:Mlj9PNLmG9bZ6BHFwFKDo5afkpWyUISkb9Me0GnK66I= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.27/go.mod h1:tq2nT0Kx7W+/f2JVE+zxYtUhdjuELJkVpNz+x/QN5R4= sigs.k8s.io/controller-runtime v0.11.0 h1:DqO+c8mywcZLFJWILq4iktoECTyn30Bkj0CwgqMpZWQ= sigs.k8s.io/controller-runtime v0.11.0/go.mod h1:KKwLiTooNGu+JmLZGn9Sl3Gjmfj66eMbCQznLP5zcqA= sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 h1:fD1pz4yfdADVNfFmcP2aBEtudwUQ1AlLnRBALr33v3s= @@ -1179,8 +1444,9 @@ sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e h1:4Z09Hglb sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/structured-merge-diff/v4 v4.1.2/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= -sigs.k8s.io/structured-merge-diff/v4 v4.2.0 h1:kDvPBbnPk+qYmkHmSo8vKGp438IASWofnbbUKDE/bv0= sigs.k8s.io/structured-merge-diff/v4 v4.2.0/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= +sigs.k8s.io/structured-merge-diff/v4 v4.2.1 h1:bKCqE9GvQ5tiVHn5rfn1r+yao3aLQEaLzkkmAkf+A6Y= +sigs.k8s.io/structured-merge-diff/v4 v4.2.1/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= diff --git a/components/adminsrv/internal/constants/error.go b/components/adminsrv/internal/constants/error.go new file mode 100644 index 0000000..f64220b --- /dev/null +++ b/components/adminsrv/internal/constants/error.go @@ -0,0 +1,5 @@ +package constants + +import "errors" + +var ErrNotFound = errors.New("data not found") diff --git a/components/adminsrv/internal/dao/bootstrap.go b/components/adminsrv/internal/dao/bootstrap.go new file mode 100644 index 0000000..4fcc8f3 --- /dev/null +++ b/components/adminsrv/internal/dao/bootstrap.go @@ -0,0 +1,325 @@ +package dao + +import ( + "context" + "database/sql" + "errors" + "fmt" + "time" + + "github.com/RafaySystems/rcloud-base/components/adminsrv/internal/models" + "github.com/RafaySystems/rcloud-base/components/common/pkg/persistence/provider/pg" + "github.com/RafaySystems/rcloud-base/components/common/pkg/query" + "github.com/RafaySystems/rcloud-base/components/common/pkg/random" + commonv3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/commonpb/v3" + "github.com/RafaySystems/rcloud-base/components/common/proto/types/sentry" + "github.com/google/uuid" + "github.com/uptrace/bun" +) + +// BootstrapDao is the interface for bootstrap operations +type BootstrapDao interface { + CreateOrUpdateBootstrapInfra(ctx context.Context, infra *models.BootstrapInfra) error + CreateOrUpdateBootstrapAgentTemplate(context.Context, *models.BootstrapAgentTemplate) error + GetBootstrapAgentTemplateForToken(ctx context.Context, token string) (*models.BootstrapAgentTemplate, error) + SelectBootstrapAgentTemplates(ctx context.Context, opts *commonv3.QueryOptions) (ret []models.BootstrapAgentTemplate, count int, err error) + DeleteBootstrapAgentTempate(ctx context.Context, opts *commonv3.QueryOptions, infraRef string) error + GetBootstrapAgents(ctx context.Context, opts *commonv3.QueryOptions, templateRef string) (ret []models.BootstrapAgent, count int, err error) + CreateBootstrapAgent(ctx context.Context, ba *models.BootstrapAgent) error + GetBootstrapAgent(ctx context.Context, templateRef string, opts *commonv3.QueryOptions) (*models.BootstrapAgent, error) + SelectBootstrapAgents(ctx context.Context, templateRef string, opts *commonv3.QueryOptions) (ret []models.BootstrapAgent, count int, err error) + RegisterBootstrapAgent(ctx context.Context, token string) error + DeleteBootstrapAgent(ctx context.Context, templateRef string, opts *commonv3.QueryOptions) error + UpdateBootstrapAgent(ctx context.Context, ba *models.BootstrapAgent, opts *commonv3.QueryOptions) error + GetBootstrapAgentForToken(ctx context.Context, token string) (*models.BootstrapAgent, error) + GetBootstrapAgentTemplateForHost(ctx context.Context, host string) (*models.BootstrapAgentTemplate, error) + GetBootstrapAgentCountForClusterID(ctx context.Context, clusterID string, orgID uuid.UUID) (int, error) + GetBootstrapAgentForClusterID(ctx context.Context, clusterID string, orgID uuid.UUID) (*models.BootstrapAgent, error) + UpdateBootstrapAgentDeleteAt(ctx context.Context, templateRef string) error + UpdateBootstrapAgentTempateDeleteAt(ctx context.Context, opts *commonv3.QueryOptions) error + UpdateBootstrapInfraDeleteAt(ctx context.Context, opts *commonv3.QueryOptions) error +} + +// bootstrapDao implements BootstrapDao +type bootstrapDao struct { + bdao pg.EntityDAO +} + +// BootstrapDao return new bootstrap dao +func NewBootstrapDao(edao pg.EntityDAO) BootstrapDao { + return &bootstrapDao{ + bdao: edao, + } +} + +func (s *bootstrapDao) CreateOrUpdateBootstrapInfra(ctx context.Context, infra *models.BootstrapInfra) error { + + _, err := s.bdao.GetInstance().NewInsert().On("CONFLICT (name) DO UPDATE"). + Set("ca_cert = ?", infra.CaCert). + Set("ca_key = ?", infra.CaKey). + Set("modified_at = ?", time.Now()). + Model(infra). + Where("bi.name = ?", infra.Name).Exec(ctx) + return err +} + +func (s *bootstrapDao) CreateOrUpdateBootstrapAgentTemplate(ctx context.Context, template *models.BootstrapAgentTemplate) error { + + _, err := s.bdao.GetInstance().NewInsert().On("CONFLICT (name) DO UPDATE"). + Set("infra_ref = ?", template.InfraRef). + Set("ignore_multiple_register = ?", template.IgnoreMultipleRegister). + Set("auto_register = ?", template.AutoRegister). + Set("incluster_template = ?", template.InclusterTemplate). + Set("outofcluster_template = ?", template.OutofclusterTemplate). + Set("hosts = ?", template.Hosts). + Set("labels = ?", template.Labels). + Set("annotations = ?", template.Annotations). + Set("modified_at = ?", time.Now()). + Model(template). + Where("bat.name = ?", template.Name).Exec(ctx) + return err +} + +func (s *bootstrapDao) GetBootstrapAgentTemplateForToken(ctx context.Context, token string) (*models.BootstrapAgentTemplate, error) { + var template models.BootstrapAgentTemplate + err := s.bdao.GetInstance().NewSelect().Model(&template).Where("token = ?", token).Scan(ctx) + return &template, err +} + +func (s *bootstrapDao) SelectBootstrapAgentTemplates(ctx context.Context, opts *commonv3.QueryOptions) (ret []models.BootstrapAgentTemplate, count int, err error) { + q, err := query.Select(s.bdao.GetInstance().NewSelect().Model(&ret), opts) + if err != nil { + return + } + + q = query.Paginate(q, opts) + + count, err = q.ScanAndCount(ctx) + + return +} + +func (s *bootstrapDao) DeleteBootstrapAgentTempate(ctx context.Context, opts *commonv3.QueryOptions, infraRef string) error { + + q, err := query.Delete(s.bdao.GetInstance().NewSelect().Model((*models.BootstrapAgentTemplate)(nil)), opts) + if err != nil { + return err + } + _, err = q.Exec(ctx) + return err +} + +func (s *bootstrapDao) GetBootstrapAgent(ctx context.Context, templateRef string, opts *commonv3.QueryOptions) (*models.BootstrapAgent, error) { + var ba models.BootstrapAgent + q, err := query.Get(s.bdao.GetInstance().NewSelect().Model(&ba), opts) + if err != nil { + return nil, err + } + + // - will be used to select all the agents + // to cross template boundaries + if templateRef != "-" { + q = q.Where("template_ref = ?", templateRef) + } + + err = q.Scan(ctx) + + return &ba, err +} + +func (s *bootstrapDao) GetBootstrapAgents(ctx context.Context, opts *commonv3.QueryOptions, templateRef string) (ret []models.BootstrapAgent, count int, err error) { + q, err := query.Get(s.bdao.GetInstance().NewSelect().Model(&ret), opts) + if err != nil { + return nil, 0, err + } + + if templateRef != "-" { + q = q.Where("template_ref = ?", templateRef) + } + + count, err = q.ScanAndCount(ctx) + + return +} + +func (s *bootstrapDao) SelectBootstrapAgents(ctx context.Context, templateRef string, opts *commonv3.QueryOptions) (ret []models.BootstrapAgent, count int, err error) { + + q, err := query.Select(s.bdao.GetInstance().NewSelect().Model(&ret), opts) + if err != nil { + return + } + + if templateRef != "-" { + q = q.Where("template_ref = ?", templateRef) + } + + count, err = q.ScanAndCount(ctx) + + return +} + +func (s *bootstrapDao) CreateBootstrapAgent(ctx context.Context, ba *models.BootstrapAgent) error { + ba.TokenState = sentry.BootstrapAgentState_NotRegistered.String() + _, err := s.bdao.Create(ctx, ba) + return err +} + +func (s *bootstrapDao) RegisterBootstrapAgent(ctx context.Context, token string) error { + + err := s.bdao.GetInstance().RunInTx(ctx, &sql.TxOptions{}, func(ctx context.Context, tx bun.Tx) error { + ba, err := s.getBootstrapAgentForToken(ctx, token) + if err != nil { + return err + } + + bat, err := s.getBootstrapAgentTemplate(ctx, ba.TemplateRef) + if err != nil { + return err + } + + state := sentry.BootstrapAgentState_NotApproved + if bat.AutoApprove { + state = sentry.BootstrapAgentState_Approved + } + + switch ba.TokenState { + case sentry.BootstrapAgentState_NotRegistered.String(): + ba.TokenState = sentry.BootstrapAgentState_Approved.String() + case sentry.BootstrapAgentState_NotApproved.String(), sentry.BootstrapAgentState_Approved.String(): + if !bat.IgnoreMultipleRegister { + return fmt.Errorf("cannot register token %s state is %s", token, ba.TokenState) + } + default: + return fmt.Errorf("invalid token state %s", ba.TokenState) + } + + _, err = s.bdao.GetInstance().NewUpdate().Model(ba). + Set("token_state = ?", state). + Where("token = ?", token). + Exec(ctx) + + return err + }) + + return err +} + +func (s *bootstrapDao) getBootstrapAgentForToken(ctx context.Context, token string) (*models.BootstrapAgent, error) { + var ba models.BootstrapAgent + err := s.bdao.GetInstance().NewSelect().Model(&ba).Where("token = ?", token).Scan(ctx) + return &ba, err +} + +func (s *bootstrapDao) getBootstrapAgentTemplate(ctx context.Context, name string) (*models.BootstrapAgentTemplate, error) { + var template models.BootstrapAgentTemplate + err := s.bdao.GetInstance().NewSelect().Model(&template).Where("name = ?", name).Scan(ctx) + return &template, err +} + +func (s *bootstrapDao) DeleteBootstrapAgent(ctx context.Context, templateRef string, opts *commonv3.QueryOptions) error { + + dq := s.bdao.GetInstance().NewDelete().Model((*models.BootstrapAgent)(nil)).Where("name = ?", opts.ID) + if templateRef != "" { + dq = dq.Where("template_ref = ?", templateRef) + } + _, err := dq.Exec(ctx) + return err +} + +func (s *bootstrapDao) UpdateBootstrapAgent(ctx context.Context, ba *models.BootstrapAgent, opts *commonv3.QueryOptions) error { + _, err := s.bdao.GetInstance().NewUpdate().Model(ba).Where("id = ?", ba.ID).Returning("*").Exec(ctx) + return err + +} + +func (s *bootstrapDao) GetBootstrapAgentForToken(ctx context.Context, token string) (*models.BootstrapAgent, error) { + var ba models.BootstrapAgent + err := s.bdao.GetInstance().NewSelect().Model(&ba).Where("token = ?", token).Scan(ctx) + return &ba, err +} + +func (s *bootstrapDao) GetBootstrapAgentTemplateForHost(ctx context.Context, host string) (*models.BootstrapAgentTemplate, error) { + + bat := models.BootstrapAgentTemplate{} + err := s.bdao.GetInstance().NewSelect().Model(&bat). + ColumnExpr("bat.*"). + Join("JOIN sentry_bootstrap_template_host as bth"). + JoinOn("bat.name = bth.name"). + JoinOn("bth.host = ?", host). + Scan(ctx) + + return &bat, err +} + +func (s *bootstrapDao) GetBootstrapAgentCountForClusterID(ctx context.Context, clusterID string, orgID uuid.UUID) (int, error) { + var ba []models.BootstrapAgent + err := s.bdao.GetInstance().NewSelect().Model(&ba). + Where("name = ?", clusterID). + Where("organization_id = ?", orgID). + Scan(ctx) + if err != nil { + return 0, err + } + return len(ba), nil +} + +func (s *bootstrapDao) GetBootstrapAgentForClusterID(ctx context.Context, clusterID string, orgID uuid.UUID) (*models.BootstrapAgent, error) { + var ba models.BootstrapAgent + err := s.bdao.GetInstance().NewSelect().Model(&ba). + Where("name = ?", clusterID). + Where("organization_id = ?", orgID). + Scan(ctx) + if err != nil { + return nil, err + } + return &ba, nil +} + +// updateBootstrapAgentDeleteAt builds query for deleting resource +func (s *bootstrapDao) UpdateBootstrapAgentDeleteAt(ctx context.Context, templateRef string) error { + var toBeDeletedAgent *models.BootstrapAgent + _, err := s.bdao.GetX(ctx, "template_ref", templateRef, &toBeDeletedAgent) + if err != nil { + return err + } + + if toBeDeletedAgent == nil { + return errors.New("could not find bootstrap agent to delete") + } + + opts := &commonv3.QueryOptions{} + query.WithName(toBeDeletedAgent.Name)(opts) + q, err := query.Update(s.bdao.GetInstance().NewUpdate().Model((*models.BootstrapAgent)(nil)), opts) + if err != nil { + return err + } + now := time.Now() + q = q.Set("name = ?", fmt.Sprintf("%s-%s", opts.Name, random.NewRandomString(10))) + q = q.Set("deleted_at = ?", &now) + _, err = q.Exec(ctx) + return err +} + +func (s *bootstrapDao) UpdateBootstrapAgentTempateDeleteAt(ctx context.Context, opts *commonv3.QueryOptions) error { + q, err := query.Update(s.bdao.GetInstance().NewUpdate().Model((*models.BootstrapAgentTemplate)(nil)), opts) + if err != nil { + return err + } + now := time.Now() + q = q.Set("name = ?", fmt.Sprintf("%s-%s", opts.Name, random.NewRandomString(10))) + q = q.Set("deleted_at = ?", &now) + _, err = q.Exec(ctx) + return err +} + +// updateBootstrapInfraDeleteAt builds query for deleting resource +func (s *bootstrapDao) UpdateBootstrapInfraDeleteAt(ctx context.Context, opts *commonv3.QueryOptions) error { + q, err := query.Update(s.bdao.GetInstance().NewUpdate().Model((*models.BootstrapInfra)(nil)), opts) + if err != nil { + return err + } + now := time.Now() + q = q.Set("deleted_at = ?", &now) + _, err = q.Exec(ctx) + return err +} diff --git a/components/adminsrv/internal/dao/kubeconfig.go b/components/adminsrv/internal/dao/kubeconfig.go new file mode 100644 index 0000000..8ee6aad --- /dev/null +++ b/components/adminsrv/internal/dao/kubeconfig.go @@ -0,0 +1,130 @@ +package dao + +import ( + "context" + "time" + + "github.com/RafaySystems/rcloud-base/components/adminsrv/internal/models" + "github.com/RafaySystems/rcloud-base/components/common/pkg/persistence/provider/pg" + "github.com/RafaySystems/rcloud-base/components/common/proto/types/sentry" + "github.com/google/uuid" +) + +// KubeconfigDao is the interface for kubeconfig operations +type KubeconfigDao interface { + GetKubeconfigRevocation(ctx context.Context, orgID, accountID uuid.UUID, isSSOUser bool) (*models.KubeconfigRevocation, error) + CreateKubeconfigRevocation(ctx context.Context, kr *models.KubeconfigRevocation) error + UpdateKubeconfigRevocation(ctx context.Context, kr *models.KubeconfigRevocation) error + GetKubeconfigSetting(ctx context.Context, orgID, accountID uuid.UUID, issSSO bool) (*models.KubeconfigSetting, error) + CreateKubeconfigSetting(ctx context.Context, ks *models.KubeconfigSetting) error + UpdateKubeconfigSetting(ctx context.Context, ks *models.KubeconfigSetting) error + GetkubectlClusterSettings(ctx context.Context, orgID uuid.UUID, name string) (*models.KubectlClusterSetting, error) + CreatekubectlClusterSettings(ctx context.Context, kc *models.KubectlClusterSetting) error + UpdatekubectlClusterSettings(ctx context.Context, kc *models.KubectlClusterSetting) error +} + +// kubeconfigDao implements BootstrapDao +type kubeconfigDao struct { + dao pg.EntityDAO +} + +// KubeconfigDao return new kube config dao +func NewKubeconfigDao(edao pg.EntityDAO) KubeconfigDao { + return &kubeconfigDao{ + dao: edao, + } +} + +func (s *kubeconfigDao) GetKubeconfigRevocation(ctx context.Context, orgID, accountID uuid.UUID, isSSOUser bool) (*models.KubeconfigRevocation, error) { + var kr models.KubeconfigRevocation + err := s.dao.GetInstance().NewSelect().Model(&kr). + Where("organization_id = ?", orgID). + Where("account_id = ?", accountID). + Where("is_sso_user = ?", isSSOUser). + Scan(ctx) + return &kr, err +} + +func (s *kubeconfigDao) CreateKubeconfigRevocation(ctx context.Context, kr *models.KubeconfigRevocation) error { + _, err := s.dao.Create(ctx, kr) + return err +} + +func (s *kubeconfigDao) UpdateKubeconfigRevocation(ctx context.Context, kr *models.KubeconfigRevocation) error { + q := s.dao.GetInstance().NewUpdate().Model(kr) + + q = q.Where("organization_id = ?", kr.OrganizationId). + Where("account_id = ?", kr.AccountId). + Where("is_sso_user = ?", kr.IsSSOUser) + + q = q.Set("revoked_at = ?", kr.RevokedAt) + + _, err := q.Exec(ctx) + return err +} + +func (s *kubeconfigDao) GetKubeconfigSetting(ctx context.Context, orgID, accountID uuid.UUID, issSSO bool) (*models.KubeconfigSetting, error) { + var ks models.KubeconfigSetting + err := s.dao.GetInstance().NewSelect().Model(&ks). + Where("organization_id = ?", orgID). + Where("account_id = ?", accountID). + Where("is_sso_user= ?", issSSO). + Scan(ctx) + return &ks, err +} + +func (s *kubeconfigDao) CreateKubeconfigSetting(ctx context.Context, ks *models.KubeconfigSetting) error { + if ks.AccountId == uuid.Nil { + ks.Scope = sentry.KubeconfigSettingOrganizationScope + } else { + ks.Scope = sentry.KubeconfigSettingUserScope + } + _, err := s.dao.Create(ctx, ks) + return err +} + +func (s *kubeconfigDao) UpdateKubeconfigSetting(ctx context.Context, ks *models.KubeconfigSetting) error { + q := s.dao.GetInstance().NewUpdate().Model(ks) + + q = q.Where("organization_id = ?", ks.OrganizationId). + Where("account_id = ?", ks.AccountId). + Where("is_sso_user= ?", ks.IsSSOUser) + + q = q.Set("modified_at = ?", time.Now()). + Set("validity_seconds = ?", ks.ValiditySeconds). + Set("enforce_rsid = ?", ks.EnforceRsId). + Set("is_sso_user = ?", ks.IsSSOUser). + Set("disable_web_kubectl = ?", ks.DisableWebKubectl). + Set("disable_cli_kubectl = ?", ks.DisableCLIKubectl). + Set("enable_privaterelay = ?", ks.EnablePrivateRelay). + Set("enforce_orgadmin_secret_access = ?", ks.EnforceOrgAdminSecretAccess) // allow only orgadmin to access secret API + + _, err := q.Exec(ctx) + return err +} + +func (s *kubeconfigDao) GetkubectlClusterSettings(ctx context.Context, orgID uuid.UUID, name string) (*models.KubectlClusterSetting, error) { + var kc models.KubectlClusterSetting + err := s.dao.GetInstance().NewSelect().Model(&kc). + Where("organization_id = ?", orgID). + Where("name = ?", name).Scan(ctx) + return &kc, err +} + +func (s *kubeconfigDao) CreatekubectlClusterSettings(ctx context.Context, kc *models.KubectlClusterSetting) error { + _, err := s.dao.Create(ctx, kc) + return err +} + +func (s *kubeconfigDao) UpdatekubectlClusterSettings(ctx context.Context, kc *models.KubectlClusterSetting) error { + q := s.dao.GetInstance().NewUpdate().Model(kc) + + q = q.Where("organization_id = ?", kc.OrganizationId). + Where("name = ?", kc.Name) + + q = q.Set("disable_web_kubectl = ?", kc.DisableWebKubectl) + q = q.Set("disable_cli_kubectl = ?", kc.DisableCliKubectl) + + _, err := q.Exec(ctx) + return err +} diff --git a/components/adminsrv/internal/dao/permission.go b/components/adminsrv/internal/dao/permission.go new file mode 100644 index 0000000..5a2f216 --- /dev/null +++ b/components/adminsrv/internal/dao/permission.go @@ -0,0 +1,302 @@ +package dao + +import ( + "context" + + "github.com/RafaySystems/rcloud-base/components/adminsrv/internal/models" + "github.com/RafaySystems/rcloud-base/components/common/pkg/persistence/provider/pg" + "github.com/google/uuid" + "github.com/uptrace/bun" +) + +// PermissionDao is the interface for permission operations +type PermissionDao interface { + GetGroupPermissions(ctx context.Context, groupNames []string, orgID, partnerID uuid.UUID) ([]models.GroupPermission, error) + GetGroupProjectsByPermission(ctx context.Context, groupNames []string, orgID, partnerID uuid.UUID, permission string) ([]models.GroupPermission, error) + GetGroupPermissionsByProjectIDPermissions(ctx context.Context, groupNames []string, orgID, partnerID uuid.UUID, projects []string, permissions []string) ([]models.GroupPermission, error) + GetProjectByGroup(ctx context.Context, groupNames []string, orgID, partnerID uuid.UUID) ([]models.GroupPermission, error) + GetAccountPermissions(ctx context.Context, accountID, orgID, partnerID uuid.UUID) ([]models.AccountPermission, error) + IsPartnerSuperAdmin(ctx context.Context, accountID, partnerID uuid.UUID) (isPartnerAdmin, isSuperAdmin bool, err error) + GetAccountProjectsByPermission(ctx context.Context, accountID, orgID, partnerID uuid.UUID, permission string) ([]models.AccountPermission, error) + GetAccountPermissionsByProjectIDPermissions(ctx context.Context, accountID, orgID, partnerID uuid.UUID, projects []string, permissions []string) ([]models.AccountPermission, error) + GetSSOUsersGroupProjectRole(ctx context.Context, orgID uuid.UUID) ([]models.SSOAccountGroupProjectRole, error) + GetAcccountsWithApprovalPermission(ctx context.Context, orgID, partnerID uuid.UUID) ([]string, error) + GetSSOAcccountsWithApprovalPermission(ctx context.Context, orgID, partnerID uuid.UUID) ([]string, error) + IsOrgAdmin(ctx context.Context, accountID, partnerID uuid.UUID) (isOrgAdmin bool, err error) + GetAccountBasics(ctx context.Context, accountID uuid.UUID) (*models.Account, error) + GetAccountGroups(ctx context.Context, accountID uuid.UUID) ([]models.GroupAccount, error) + GetDefaultUserGroup(ctx context.Context, orgID uuid.UUID) (*models.Group, error) + GetDefaultUserGroupAccount(ctx context.Context, accountID, groupID uuid.UUID) (*models.GroupAccount, error) +} + +// permissionDao implements PermissionDao +type permissionDao struct { + dao pg.EntityDAO +} + +// PermissionDao return new permission dao +func NewPermissionDao(edao pg.EntityDAO) PermissionDao { + return &permissionDao{ + dao: edao, + } +} + +func (s *permissionDao) GetGroupPermissions(ctx context.Context, groupNames []string, orgID, partnerID uuid.UUID) ([]models.GroupPermission, error) { + var gps []models.GroupPermission + err := s.dao.GetInstance().NewSelect().Model(&gps). + Where("organization_id = ?", orgID). + Where("partner_id = ?", partnerID). + Where("group_name IN (?)", bun.In(groupNames)). + Scan(ctx) + return gps, err +} + +func (s *permissionDao) GetGroupProjectsByPermission(ctx context.Context, groupNames []string, orgID, partnerID uuid.UUID, permission string) ([]models.GroupPermission, error) { + var gps []models.GroupPermission + + err := s.dao.GetInstance().NewSelect().Model(&gps). + Where("organization_id = ?", orgID). + Where("partner_id = ?", partnerID). + Where("group_name IN (?)", bun.In(groupNames)). + Where("permission_name = ?", permission). + Scan(ctx) + + return gps, err +} + +func (s *permissionDao) GetGroupPermissionsByProjectIDPermissions(ctx context.Context, groupNames []string, orgID, partnerID uuid.UUID, projects []string, permissions []string) ([]models.GroupPermission, error) { + var gps []models.GroupPermission + + err := s.dao.GetInstance().NewSelect().Model(&gps). + Where("organization_id = ?", orgID). + Where("partner_id = ?", partnerID). + Where("group_name IN (?)", bun.In(groupNames)). + Where("project_id IN (?)", bun.In(projects)). + Where("permission_name IN (?)", bun.In(permissions)). + Scan(ctx) + + return gps, err +} + +func (s *permissionDao) GetProjectByGroup(ctx context.Context, groupNames []string, orgID, partnerID uuid.UUID) ([]models.GroupPermission, error) { + var gps []models.GroupPermission + + err := s.dao.GetInstance().NewSelect().Model(&gps). + Where("organization_id = ?", orgID). + Where("partner_id = ?", partnerID). + Where("group_name IN (?)", bun.In(groupNames)). + DistinctOn("project_id", "project_name", "role_name", "scope", "group_name"). + Scan(ctx) + + return gps, err +} + +func (a *permissionDao) GetAccountPermissions(ctx context.Context, accountID, orgID, partnerID uuid.UUID) ([]models.AccountPermission, error) { + var aps []models.AccountPermission + + err := a.dao.GetInstance().NewSelect().Model(&aps). + Where("account_id = ?", accountID). + Where("organization_id = ?", orgID). + Where("partner_id = ?", partnerID). + Scan(ctx) + + return aps, err +} + +func (a *permissionDao) IsPartnerSuperAdmin(ctx context.Context, accountID, partnerID uuid.UUID) (isPartnerAdmin, isSuperAdmin bool, err error) { + var aps []models.AccountPermission + + isSuperAdmin = false + isPartnerAdmin = false + + err = a.dao.GetInstance().NewSelect().Model(&aps). + Where("account_id = ?", accountID). + Where("partner_id = ?", partnerID). + WhereGroup("grp", func(sq *bun.SelectQuery) *bun.SelectQuery { + sq = sq.WhereOr("role_name = ?", "PARTNER_ADMIN").WhereOr("role_name = ?", "SUPER_ADMIN") + return sq + }). + Scan(ctx) + if err != nil { + return isPartnerAdmin, isSuperAdmin, err + } + + for _, ap := range aps { + if ap.RoleName == "SUPER_ADMIN" { + isSuperAdmin = true + } else if ap.RoleName == "PARTNER_ADMIN" { + isPartnerAdmin = true + } + } + + return isPartnerAdmin, isSuperAdmin, nil +} + +func (a *permissionDao) GetAccountProjectsByPermission(ctx context.Context, accountID, orgID, partnerID uuid.UUID, permission string) ([]models.AccountPermission, error) { + var aps []models.AccountPermission + + err := a.dao.GetInstance().NewSelect().Model(&aps). + Where("account_id = ?", accountID). + Where("organization_id = ?", orgID). + Where("partner_id = ?", partnerID). + Where("permission_name = ?", permission). + Scan(ctx) + + return aps, err +} + +func (a *permissionDao) GetAccountPermissionsByProjectIDPermissions(ctx context.Context, accountID, orgID, partnerID uuid.UUID, projects []string, permissions []string) ([]models.AccountPermission, error) { + var aps []models.AccountPermission + + err := a.dao.GetInstance().NewSelect().Model(&aps). + Where("account_id = ?", accountID). + Where("organization_id = ?", orgID). + Where("partner_id = ?", partnerID). + Where("project_id IN (?)", bun.In(projects)). + Where("permission_name IN (?)", bun.In(permissions)). + Scan(ctx) + + return aps, err +} + +func (a *permissionDao) GetSSOUsersGroupProjectRole(ctx context.Context, orgID uuid.UUID) ([]models.SSOAccountGroupProjectRole, error) { + var ssos []models.SSOAccountGroupProjectRole + + err := a.dao.GetInstance().NewSelect().Model(&ssos). + Where("organization_id = ?", orgID). + Scan(ctx) + + return ssos, err +} + +func (a *permissionDao) GetAcccountsWithApprovalPermission(ctx context.Context, orgID, partnerID uuid.UUID) ([]string, error) { + // TODO: remove this from here once Account is structured in types.proto + type accountPermission struct { + bun.BaseModel `bun:"table:sentry_account_permission,alias:sap"` + Username string `json:"username,omitempty"` + *models.AccountPermission + } + var aps []accountPermission + err := a.dao.GetInstance().NewSelect().Model(&aps). + ColumnExpr("ki.traits -> 'email'"). + DistinctOn("ki.traits -> 'email'"). + Join("INNER JOIN identities as ki ON ?TableAlias.account_id = ki.id"). + Where("?TableAlias.organization_id = ?", orgID). + Where("?TableAlias.partner_id = ?", partnerID). + WhereGroup("grp", func(sq *bun.SelectQuery) *bun.SelectQuery { + sq = sq.WhereOr("?TableAlias.role_name = ?", "ADMIN").WhereOr("?TableAlias.role_name = ?", "PROJECT_ADMIN") + return sq + }). + Where("ki.state = ?", "ACTIVE"). + Scan(ctx) + if err != nil { + return nil, err + } + var usernames []string + for _, ap := range aps { + usernames = append(usernames, ap.Username) + } + + return usernames, nil +} + +func (a *permissionDao) GetSSOAcccountsWithApprovalPermission(ctx context.Context, orgID, partnerID uuid.UUID) ([]string, error) { + var ssoaps []models.SSOAccountGroupProjectRole + err := a.dao.GetInstance().NewSelect().Model(&ssoaps). + Where("?TableAlias.organization_id = ?", orgID). + Where("?TableAlias.partner_id = ?", partnerID). + WhereGroup("grp", func(sq *bun.SelectQuery) *bun.SelectQuery { + sq = sq.WhereOr("?TableAlias.role_name = ?", "ADMIN").WhereOr("?TableAlias.role_name = ?", "PROJECT_ADMIN") + return sq + }). + Scan(ctx) + if err != nil { + return nil, err + } + visited := make(map[string]bool) + var usernames []string + for _, ssoap := range ssoaps { + if _, ok := visited[ssoap.Username]; !ok { + usernames = append(usernames, ssoap.Username) + visited[ssoap.Username] = true + } + } + return usernames, nil +} + +func (a *permissionDao) IsOrgAdmin(ctx context.Context, accountID, partnerID uuid.UUID) (isOrgAdmin bool, err error) { + var aps []models.AccountPermission + + isOrgAdmin = false + + err = a.dao.GetInstance().NewSelect().Model(&aps). + Where("account_id = ?", accountID). + Where("partner_id = ?", partnerID). + Where("role_name = ?", "ADMIN"). + Where("scope = ?", "ORGANIZATION"). + Scan(ctx) + if err != nil { + return isOrgAdmin, err + } + + for _, ap := range aps { + if ap.RoleName == "ADMIN" && ap.Scope == "ORGANIZATION" { + isOrgAdmin = true + break + } + } + + return isOrgAdmin, nil +} + +func (a *permissionDao) GetAccountBasics(ctx context.Context, accountID uuid.UUID) (*models.Account, error) { + var acc models.Account + + err := a.dao.GetInstance().NewSelect().Model(&acc). + Column("identities.id", "traits", "state"). + ColumnExpr("max(ks.authenticated_at) as lastlogin"). + ColumnExpr("identities.traits -> 'email' as username"). + Join("INNER JOIN sessions as ks ON identities.id = ks.identity_id"). + Where("identities.id = ?", accountID). + Where("ks.active = ?", true). + Group("identities.id"). + Scan(ctx) + if err != nil { + return nil, err + } + return &acc, nil +} + +func (a *permissionDao) GetAccountGroups(ctx context.Context, accountID uuid.UUID) ([]models.GroupAccount, error) { + var ga []models.GroupAccount + + err := a.dao.GetInstance().NewSelect().Model(&ga). + Where("account_id = ?", accountID). + Where("trash = ?", false). + Where("active = ?", true). + Scan(ctx) + if err != nil { + return nil, err + } + return ga, nil +} + +func (a *permissionDao) GetDefaultUserGroup(ctx context.Context, orgID uuid.UUID) (*models.Group, error) { + var g models.Group + err := a.dao.GetInstance().NewSelect().Model(&g). + Where("organization_id = ?", orgID). + Where("type = ?", "DEFAULT_USERS"). + Where("trash = ?", false). + Scan(ctx) + return &g, err +} + +func (a *permissionDao) GetDefaultUserGroupAccount(ctx context.Context, accountID, groupID uuid.UUID) (*models.GroupAccount, error) { + var ga models.GroupAccount + err := a.dao.GetInstance().NewSelect().Model(&ga). + Where("account_id = ?", accountID). + Where("group_id = ?", groupID). + Where("trash = ?", false). + Scan(ctx) + return &ga, err +} diff --git a/components/adminsrv/internal/fix.go b/components/adminsrv/internal/fix.go new file mode 100644 index 0000000..ba5fb5c --- /dev/null +++ b/components/adminsrv/internal/fix.go @@ -0,0 +1,7 @@ +package internal + +import ( + _ "github.com/shurcooL/vfsgen" +) + +//go:generate go run generate/generate.go diff --git a/components/adminsrv/internal/fixtures/data/agent_templates.yaml b/components/adminsrv/internal/fixtures/data/agent_templates.yaml new file mode 100644 index 0000000..543a787 --- /dev/null +++ b/components/adminsrv/internal/fixtures/data/agent_templates.yaml @@ -0,0 +1,142 @@ +items: + - metadata: + name: rafay-sentry-peering-server + displayName: "Rafay Sentry Peering Server" + spec: + infraRef: rafay-sentry-peering + autoRegister: true + autoApprove: true + ignoreMultipleRegister: true + templateType: "Server" + hosts: + - host: "{{ .sentryPeeringHost }}" + type: "HostTypeExternal" + - host: "rafay-sentry:7001" + type: "HostTypeInternal" + - host: "rafay-sentry.rafay-system:7001 " + type: "HostTypeInternal" + - host: "rafay-sentry.rafay-system.svc.cluster.local:7001" + type: "HostTypeInternal" + inClusterTemplate: "" + outOfClusterTemplate: "" + - metadata: + name: rafay-sentry-peering-client + spec: + infraRef: rafay-sentry-peering + autoRegister: true + autoApprove: true + ignoreMultipleRegister: true + templateType: "Client" + inClusterTemplate: "" + outOfClusterTemplate: "" + - metadata: + name: rafay-core-relay-server + displayName: "Rafay Core Relay Server" + labels: + rafay.dev/connectorTemplate: "true" + spec: + infraRef: rafay-core-relay + autoRegister: true + autoApprove: true + ignoreMultipleRegister: true + templateType: "Server" + hosts: + - host: "{{ .coreRelayServerHost }}" + type: "HostTypeExternal" + inClusterTemplate: "" + outOfClusterTemplate: "" + - metadata: + name: rafay-core-relay-agent + labels: + rafay.dev/defaultRelay: "true" + spec: + infraRef: rafay-core-relay + autoRegister: false + autoApprove: true + ignoreMultipleRegister: true + templateType: "Client" + hosts: + - host: "{{ .coreRelayServerHost }}" + type: "HostTypeExternal" + inClusterTemplate: "" + outOfClusterTemplate: "" + - metadata: + name: rafay-core-relay-user + displayName: "Rafay Core User Server" + labels: + rafay.dev/defaultUser: "true" + rafay.dev/userTemplate: "true" + rafay.dev/connectorAgentTemplate: "rafay-core-relay-agent" + spec: + infraRef: rafay-core-relay-user + autoRegister: true + autoApprove: true + ignoreMultipleRegister: true + templateType: "Mixed" + hosts: + - host: "{{ .coreRelayUserHost }}" + type: "HostTypeExternal" + inClusterTemplate: "" + outOfClusterTemplate: "" + - metadata: + name: rafay-core-cd-relay-user + displayName: "Rafay Core CD Relay User" + labels: + rafay.dev/defaultCDUser: "true" + spec: + infraRef: rafay-core-cd-relay-user + autoRegister: true + autoApprove: true + ignoreMultipleRegister: true + templateType: "Mixed" + hosts: + - host: "{{ .coreCDRelayUserHost }}" + type: "HostTypeExternal" + - host: "rafay-cd-agent:7000" + type: "HostTypeInternal" + - host: "rafay-cd-agent.rafay-system:7000 " + type: "HostTypeInternal" + - host: "rafay-cd-agent.rafay-system.svc.cluster.local:7000" + type: "HostTypeInternal" + inClusterTemplate: "" + outOfClusterTemplate: "" + - metadata: + name: rafay-core-cd-relay-server + displayName: "Rafay Core CD Relay Server" + spec: + infraRef: rafay-core-cd-relay + autoRegister: true + autoApprove: true + ignoreMultipleRegister: true + templateType: "Server" + hosts: + - host: "{{ .coreCDRelayConnectorHost }}" + type: "HostTypeExternal" + inClusterTemplate: "" + outOfClusterTemplate: "" + - metadata: + name: rafay-core-cd-relay-agent + displayName: "Rafay Core CD Relay Agent" + labels: + rafay.dev/defaultCDRelay: "true" + spec: + infraRef: rafay-core-cd-relay + autoRegister: false + autoApprove: true + ignoreMultipleRegister: true + templateType: "Client" + hosts: + - host: "{{ .coreCDRelayConnectorHost }}" + type: "HostTypeExternal" + inClusterTemplate: "" + outOfClusterTemplate: "" + - metadata: + name: rafay-sentry-cd-peering-client + spec: + infraRef: rafay-sentry-peering + autoRegister: true + autoApprove: true + ignoreMultipleRegister: true + templateType: "Client" + inClusterTemplate: "" + outOfClusterTemplate: "" \ No newline at end of file diff --git a/components/adminsrv/internal/fixtures/data/relay_agent_template.yaml b/components/adminsrv/internal/fixtures/data/relay_agent_template.yaml new file mode 100644 index 0000000..9a177f2 --- /dev/null +++ b/components/adminsrv/internal/fixtures/data/relay_agent_template.yaml @@ -0,0 +1,124 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + rep-addon: v2-relay-agent + rep-cluster: "{{ .DownloadData.ClusterID }}" + name: "kube-proxy-agent-{{ .DownloadData.ClusterID }}" + namespace: rafay-system +spec: + progressDeadlineSeconds: 1800 + replicas: 1 + revisionHistoryLimit: 10 + selector: + matchLabels: + app: "kube-proxy-agent-{{ .DownloadData.ClusterID }}" + template: + metadata: + labels: + app: "kube-proxy-agent-{{ .DownloadData.ClusterID }}" + spec: + containers: + - args: + - --mode=client + - --log-level=3 + env: + - name: POD_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.name + - name: POD_NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + - name: MAX_DIALS + valueFrom: + configMapKeyRef: + key: maxDials + name: "kube-proxy-agent-config-{{ .DownloadData.ClusterID }}" + optional: true + - name: RELAY_CONFIGMAP_NAME + value: "kube-proxy-agent-config-{{ .DownloadData.ClusterID }}" + - name: DIALOUT_PROXY + valueFrom: + configMapKeyRef: + key: httpsProxy + name: proxy-config + optional: true + - name: DIALOUT_PROXY_AUTHENTICATION + valueFrom: + configMapKeyRef: + key: proxyAuth + name: proxy-config + optional: true + - name: HTTP_PROXY + valueFrom: + configMapKeyRef: + key: httpProxy + name: proxy-config + optional: true + - name: HTTPS_PROXY + valueFrom: + configMapKeyRef: + key: httpsProxy + name: proxy-config + optional: true + - name: NO_PROXY + valueFrom: + configMapKeyRef: + key: noProxy + name: proxy-config + optional: true + - name: ALLOW_INSECURE_BOOTSTRAP + valueFrom: + configMapKeyRef: + key: allowInsecureBootstrap + name: proxy-config + optional: true + image: "{{ .DownloadData.RelayImage }}" + imagePullPolicy: IfNotPresent + name: "kube-proxy-agent-{{ .DownloadData.ClusterID }}" + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + volumeMounts: + - mountPath: /etc/config + name: "kube-proxy-agent-config-{{ .DownloadData.ClusterID }}" + initContainers: + - command: + - sh + - -c + - ulimit -n 65536 + image: registry.rafay-edge.net/rafay/busybox:1.33 + imagePullPolicy: IfNotPresent + name: set-limits + resources: {} + securityContext: + privileged: true + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + priorityClassName: rafay-cluster-critical + restartPolicy: Always + schedulerName: default-scheduler + securityContext: {} + terminationGracePeriodSeconds: 10 + volumes: + - configMap: + defaultMode: 420 + name: "kube-proxy-agent-config-{{ .DownloadData.ClusterID }}" + name: "kube-proxy-agent-config-{{ .DownloadData.ClusterID }}" + +--- +apiVersion: v1 +kind: ConfigMap +data: + clusterID: "{{ .DownloadData.ClusterID }}" + maxDials: "8" + relays: '[{"token":"{{ .DownloadData.Token }}","addr":"{{ .DownloadData.SentryAddr }}","endpoint":"{{ .DownloadData.HostName }}","name":"{{ .DownloadData.TemplateName }}","templateToken":"{{ .DownloadData.TemplateToken }}"}]' +metadata: + labels: + rep-addon: v2-relay-agent + rep-cluster: "{{ .DownloadData.ClusterID }}" + name: "kube-proxy-agent-config-{{ .DownloadData.ClusterID }}" + namespace: rafay-system \ No newline at end of file diff --git a/components/adminsrv/internal/fixtures/data/relay_template.yaml b/components/adminsrv/internal/fixtures/data/relay_template.yaml new file mode 100644 index 0000000..2a174ac --- /dev/null +++ b/components/adminsrv/internal/fixtures/data/relay_template.yaml @@ -0,0 +1,231 @@ +--- +apiVersion: v1 +kind: Namespace +metadata: + labels: + control-plane: controller-manager + name: rafay-system + +--- + +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: rafay-kube-proxy-audit + namespace: rafay-system +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 1Gi + volumeMode: Filesystem + +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: rafay-kube-proxy + name: rafay-kube-proxy + namespace: rafay-system +spec: + replicas: 1 + progressDeadlineSeconds: 1800 + selector: + matchLabels: + app: rafay-kube-proxy + template: + metadata: + labels: + app: rafay-kube-proxy + spec: + containers: + - args: + - --mode=server + - --log-level=3 + env: + - name: POD_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.name + - name: POD_NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + - name: RAFAY_RELAY_PEERSERVICE + valueFrom: + configMapKeyRef: + key: sentry.peering.host + name: rafay-kube-proxy-config + - name: SENTRY_ADDR + valueFrom: + configMapKeyRef: + key: sentry.addr + name: rafay-kube-proxy-config + - name: BOOTSTRAP_ADDR + valueFrom: + configMapKeyRef: + key: sentry.addr + name: rafay-kube-proxy-config + - name: RELAY_PEERING_TOKEN + valueFrom: + configMapKeyRef: + key: peer.token + name: rafay-kube-proxy-config + - name: RELAY_USER_TOKEN + valueFrom: + configMapKeyRef: + key: user.token + name: rafay-kube-proxy-config + - name: RELAY_USER_HOST_PORT + valueFrom: + configMapKeyRef: + key: user.host.port + name: rafay-kube-proxy-config + - name: RELAY_CONNECTOR_TOKEN + valueFrom: + configMapKeyRef: + key: connector.token + name: rafay-kube-proxy-config + - name: RELAY_CONNECTOR_HOST_PORT + valueFrom: + configMapKeyRef: + key: connector.host.port + name: rafay-kube-proxy-config + - name: RELAY_NETWORK_ID + valueFrom: + configMapKeyRef: + key: relaynetwork.id + name: rafay-kube-proxy-config + + - name: AUDIT_PATH + valueFrom: + configMapKeyRef: + key: audit.path + name: rafay-kube-proxy-config + image: "{{ .DownloadData.RelayImage }}" + imagePullPolicy: IfNotPresent + name: rafay-kube-proxy + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + volumeMounts: + - mountPath: /opt/rafay/audit + name: audit + dnsPolicy: ClusterFirst + restartPolicy: Always + terminationGracePeriodSeconds: 30 + volumes: + - name: audit + persistentVolumeClaim: + claimName: rafay-kube-proxy-audit + +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: rafay-kube-proxy-config + namespace: rafay-system +data: + audit.path: "/opt/rafay/audit" + sentry.addr: "{{ .DownloadData.SentryAddr }}" + sentry.peering.host: "{{ .DownloadData.PeerHost }}" + peer.token: "{{ .DownloadData.PeerToken }}" + user.token: "{{ .DownloadData.UserToken }}" + connector.token: "{{ .DownloadData.ConnectorToken }}" + connector.host.port: "{{ .DownloadData.RelayHostPort }}" + user.host.port: "{{ .DownloadData.UserHostPort }}" + relaynetwork.id: "{{ .DownloadData.RelayNetworkID }}" + +--- +apiVersion: v1 +kind: Service +metadata: + name: rafay-kube-proxy + namespace: rafay-system +spec: + ports: + - name: tcp-relay + port: 443 + protocol: TCP + targetPort: 443 + - name: http-relay-monitoring + port: 8003 + protocol: TCP + targetPort: 8003 + selector: + app: rafay-kube-proxy + +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + labels: + app: rafay-kube-proxy-tail + name: rafay-kube-proxy-tail + namespace: rafay-system +spec: + progressDeadlineSeconds: 600 + replicas: 1 + selector: + matchLabels: + app: rafay-kube-proxy-tail + template: + metadata: + labels: + app: rafay-kube-proxy-tail + spec: + containers: + - args: + - --mode=tail + env: + - name: POD_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.name + - name: POD_NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + - name: RAFAY_RELAY_PEERSERVICE + valueFrom: + configMapKeyRef: + key: sentry.peering.host + name: rafay-kube-proxy-config + - name: SENTRY_ADDR + valueFrom: + configMapKeyRef: + key: sentry.addr + name: rafay-kube-proxy-config + - name: BOOTSTRAP_ADDR + valueFrom: + configMapKeyRef: + key: sentry.addr + name: rafay-kube-proxy-config + - name: RELAY_PEERING_TOKEN + valueFrom: + configMapKeyRef: + key: peer.token + name: rafay-kube-proxy-config + - name: AUDIT_PATH + valueFrom: + configMapKeyRef: + key: audit.path + name: rafay-kube-proxy-config + image: "{{ .DownloadData.RelayImage }}" + imagePullPolicy: IfNotPresent + name: rafay-kube-proxy-tail + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + volumeMounts: + - mountPath: /opt/rafay/audit + name: audit + volumes: + - name: audit + persistentVolumeClaim: + claimName: rafay-kube-proxy-audit diff --git a/components/adminsrv/internal/fixtures/fixtures.go b/components/adminsrv/internal/fixtures/fixtures.go new file mode 100644 index 0000000..6c5ad53 --- /dev/null +++ b/components/adminsrv/internal/fixtures/fixtures.go @@ -0,0 +1,200 @@ +// Code generated by vfsgen; DO NOT EDIT. + +package fixtures + +import ( + "bytes" + "compress/gzip" + "fmt" + "io" + "io/ioutil" + "net/http" + "os" + pathpkg "path" + "time" +) + +// Fixtures statically implements the virtual filesystem provided to vfsgen. +var Fixtures = func() http.FileSystem { + fs := vfsgenÛ°FS{ + "/": &vfsgenÛ°DirInfo{ + name: "/", + modTime: time.Date(2021, 11, 29, 20, 16, 39, 198479970, time.UTC), + }, + "/agent_templates.yaml": &vfsgenÛ°CompressedFileInfo{ + name: "agent_templates.yaml", + modTime: time.Date(2021, 11, 29, 20, 16, 39, 198236468, time.UTC), + uncompressedSize: 4282, + + compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x02\xff\xe4\x57\x4d\x8f\x9b\x30\x10\xbd\xf7\x57\x8c\xb8\x43\xe9\xa9\x12\xb7\x88\x54\x6a\x0f\xdb\x56\xd9\xed\x0f\x70\xcd\x40\x2d\x19\x1b\xd9\x26\x5a\xb4\xda\xff\x5e\xd9\x98\x14\x04\x49\xa0\x9b\x0f\xaa\xe6\x06\x9e\x19\x66\xfc\xde\x73\x9e\x99\xc1\x52\x27\xef\x00\x42\x28\xd1\x90\x8c\x18\x62\x9f\xec\x4f\x90\x12\x13\x50\x24\x27\x4d\xa8\x51\x18\xd5\x84\x15\xa2\x62\xa2\x08\x35\xaa\x3d\x2a\x1f\x97\x31\x5d\x71\xd2\x7c\x75\xe1\xc1\xce\xc6\xc3\xa3\x8b\x87\xef\x6d\x3c\x3c\xba\xf8\xc0\x25\xe8\x0a\x69\xf7\x09\x26\x72\x45\x76\x98\x4f\x7f\xc6\x07\x91\xda\xc8\x1d\x16\x4c\x1b\x54\x09\x18\x55\x63\x6f\x61\x53\x55\x4a\xee\x71\xf0\x9e\x15\x42\x2a\x7c\xa8\xb9\x61\x15\xc7\xc9\x54\x83\x65\xc5\x89\xc1\xa7\xa6\xb2\x4d\xf7\xfb\x03\xf8\x25\xb5\xd1\x09\xf8\x27\xbb\x35\xf6\x4d\x02\xc1\xcb\x0b\x44\x6d\x8b\x7e\xb0\xcf\x52\x1b\x78\x7d\x0d\x0e\xa1\x00\xa6\xad\x68\x57\x6c\xf1\x4f\xcf\x06\x95\x20\x3c\x18\x57\xeb\x8f\x9c\x7c\x8c\xe3\x0f\x27\xca\x7c\x11\xb3\xca\x44\xfe\xa1\xd1\x06\x4b\x57\x13\x2e\x5c\x34\xd2\x7b\x1a\x51\x5e\xdb\x1d\x8d\xb8\xa4\x84\x2f\x6d\x9d\x89\xb4\x4d\x7f\xf2\x18\x24\x10\x74\x6b\xb2\x36\xdf\xf2\xe9\xe5\x45\xfc\xa4\x9c\xa1\x30\xab\xa5\x5b\xea\xda\xbb\xea\x86\x50\xa9\x30\x54\xc8\xdd\x94\x67\xc4\x9a\x4a\x85\xb0\xb3\xb1\x30\x14\x02\x27\x3f\x91\xeb\xe4\x80\xad\x2b\x1d\x65\xb8\x7f\x4f\xa5\x10\x48\x8d\xec\x37\x65\xe7\x3d\x2f\xf1\x3f\x8d\xdd\x57\xde\xd3\xea\xb6\xdd\xb9\x9d\x68\x53\x96\xeb\xfb\xda\x60\x92\xa2\x23\xf6\x29\x78\x32\xcc\x49\xcd\x8d\x9b\xe4\x52\xc8\xe4\x84\xeb\x6b\x4b\xe1\xe4\xc9\xbb\x7a\x6c\x6a\x7d\x5e\x66\x3f\x34\xaa\xd9\x2a\xf3\x30\xda\x9c\x01\x8a\xc3\x28\xfb\xd9\x49\x19\x1e\x91\xec\xc6\x52\xa8\x97\x30\xcd\xb1\x25\x7c\xe9\x4f\x7e\x03\x39\x3f\xb0\x67\xcc\x96\x51\xc6\x6e\xe1\x9a\x08\x43\xb3\x05\x9c\x49\xb7\xfe\x74\xb6\x53\xcc\x66\x4d\xba\x1d\xf1\xc6\xa1\x09\xa7\xe0\x9c\xea\xeb\x3e\x88\x1e\x07\x34\xdd\xbe\x01\xd2\x91\xc7\xa1\x59\xcb\x77\x6b\x63\xe2\xb7\x98\xa5\xae\xd0\xc8\x83\xc5\x70\xf1\xb2\xd3\x2e\x2c\xbe\xb7\x0b\x1b\x52\x68\x9e\xef\x38\x90\x7b\x74\x47\x98\x45\xd4\xb5\x9a\x08\x4f\xd2\xb4\x3b\x74\x57\x79\xf8\xf4\xcd\xc4\x79\x80\x36\x45\xef\x9f\x7a\xc6\xf1\x73\xc4\x7d\xfc\x3d\xac\xb7\x73\x20\xff\x1c\xae\xfe\x26\x43\xb3\xff\xe7\x0a\xf4\x3b\x00\x00\xff\xff\xcf\x9c\x3f\x88\xba\x10\x00\x00"), + }, + "/relay_agent_template.yaml": &vfsgenÛ°CompressedFileInfo{ + name: "relay_agent_template.yaml", + modTime: time.Date(2021, 11, 29, 20, 16, 39, 198406454, time.UTC), + uncompressedSize: 3897, + + compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x02\xff\xd4\x57\x5f\x6f\xdb\x36\x10\x7f\xd7\xa7\x20\xfc\xd2\x97\xc9\x4e\x9a\xb5\x28\x04\xf4\x41\xb5\x93\xc6\x98\xff\x08\xb6\xb3\xb5\x18\x06\xe3\x42\x9e\x6d\x22\x14\x29\x90\x27\x27\x42\x90\xef\x3e\x50\xb2\x6c\x39\x71\xb6\x2c\x75\x36\x8c\x4f\xd1\xfd\xfd\xdd\x8f\x17\xf3\x0e\x32\xf9\x2b\x5a\x27\x8d\x8e\x18\x64\x99\xeb\xac\x4f\x83\x1b\xa9\x45\xc4\x7a\x98\x29\x53\xa4\xa8\x29\x48\x91\x40\x00\x41\x14\x30\xa6\xe0\x1a\x95\xf3\x7f\x31\x66\x31\x0b\x41\x08\xef\xbb\x7e\x1f\x5a\x54\x50\x84\xb0\xf4\x1e\xb5\x96\xab\xdc\x11\xda\x88\xb5\xee\xef\x59\xbb\x67\x6e\xb5\x32\x20\x7a\x40\xd0\xee\x56\xaa\x7e\x8f\x3d\x3c\xb4\x02\xc6\x34\xa4\x18\xb1\xd6\x4d\x7e\x8d\x61\x66\xcd\xdd\x26\x54\xf8\x22\x47\x97\x01\xc7\x88\x59\x58\x40\x11\xba\xc2\x11\xa6\x81\xcb\x90\x7b\x9c\x99\x35\x4b\x8b\xce\xf5\x10\x84\x92\x1a\xa7\xc8\x8d\x16\x2e\x62\xa7\x9f\x4e\x4e\x82\x12\xa7\x92\x1c\xbc\xa0\xfc\x5a\x4b\x4f\xc7\xa5\x74\x64\x6c\x31\x90\xa9\xa4\x88\x9d\x7a\x43\x87\x0a\x39\x19\x5b\x15\x9f\x02\xf1\xd5\xa0\xc1\x06\xf3\x04\xbe\xaa\x02\xc2\x34\x53\x40\xb8\x09\xdc\x60\xdb\x1f\xb5\x97\xe3\xf5\x59\x18\xab\x19\xf1\x87\x1b\x4d\x20\x35\xda\x6d\xe4\x90\x81\x5d\x36\xf2\x84\x2c\x0c\x53\x23\xf0\x33\x57\xb2\xbe\xd3\x5a\xae\xcc\x32\x54\xb8\x46\xf5\xf9\x6c\x2b\x47\xbd\x6e\x3a\x57\xf7\x99\x8c\x7b\xf3\x51\x3c\x3c\xdf\x2a\x18\x5b\x83\xca\xf1\xc2\x9a\x34\x6a\x08\x19\x5b\x48\x54\x62\x82\x8b\x7d\xa9\x2f\x77\xd7\xa1\xeb\xd3\x47\xca\xd2\x29\x01\x5a\x45\x5b\xda\xda\x3e\xf1\xb3\x38\xa6\x49\xdc\xfd\xb7\xc1\x94\xcd\xf9\x04\xd1\x30\xfe\x36\xef\xf5\xe3\xc1\xf4\xef\xd1\x70\xa3\x17\x72\x39\x84\xec\x17\x2c\x0e\x80\xba\xc1\x22\x62\x29\xdc\xf5\x24\x28\xf7\x48\xf7\xdc\x7f\x55\x15\xf2\x25\x4d\xb3\x3b\x26\x23\x69\x34\xa8\x88\x91\xcd\x9f\x16\x34\x39\x1f\xc4\xdf\xe7\xdd\xf1\xe8\xa2\xff\x75\x18\x27\x07\xaf\xfd\xc7\xa1\xd4\xd9\x3c\x75\xe3\xab\xd9\x3c\x99\x8c\xbf\x7d\x3f\x0e\x85\x2b\xa2\xcc\x25\x1e\xd9\x41\x12\x2b\xcc\x55\xa0\x7f\xc6\xcc\x1e\xd6\x79\x7c\x35\xbb\x3c\x1f\xcd\xfa\xdd\x78\xd6\x1f\x8f\x8e\x03\xbd\xc4\x16\xe7\xb4\x3a\x32\xf2\xcb\xd9\x2c\x39\x36\xc5\x6f\xc1\xb0\xc7\x39\xfd\x5f\xf4\xc2\x68\x7c\x4c\x98\xda\xbc\x05\xc6\x78\x30\x18\xff\x36\xef\x8f\xa6\xe7\xdd\xab\xc9\xf9\xfc\xcb\x78\x3c\x9b\xce\x26\x71\x72\x1c\xcc\xa0\x94\xb9\xed\x6b\x87\x3c\xb7\xf8\xc5\x18\x72\x64\x21\x3b\x52\x09\x32\x85\x25\x1e\x1a\x37\x26\x7e\x3a\xe9\x7b\xed\xde\xcf\x49\x69\x9f\xe4\x4a\x25\x46\x49\x5e\x44\xac\xbf\x18\x19\x4a\x2c\xba\xe6\x93\xf7\xea\xd9\xa4\x3a\x84\x36\x95\x1a\x3c\xe0\x21\x3a\xe7\x33\x96\xaf\x44\x47\xe0\xba\xd3\x50\xfa\x67\xf5\xaf\x9c\x36\x10\x2f\xa4\xda\x15\xbc\x36\x2a\x4f\x71\x68\x72\x4d\x7b\x6f\x77\xea\x25\x9b\x34\x48\xbc\xf3\x84\xc4\x63\xbc\x0c\x52\x4b\xea\x1e\x18\x24\xb8\x49\x53\xd0\xa2\x89\xc7\xad\x9a\x03\x04\x6f\x7c\xe4\xca\xcf\x58\x2c\xd4\xec\xe3\x87\x0f\x67\x1f\x1f\x5f\xa5\xc5\xa5\x74\x64\x8b\x76\x35\xdc\xa1\x58\x62\x5b\x23\x75\xca\xcf\xce\x75\xee\x8a\x6b\x73\x17\x9d\xb6\xcf\xce\x5e\x75\xa9\x0e\x29\x2c\x01\xec\x5e\x4e\x8b\xce\xe4\x96\xa3\x8b\xd8\xfd\xc3\x56\x5a\xf6\xab\xa4\xc2\xd7\x8b\x77\xd4\x6c\xed\xcc\xca\xb5\x54\xb8\x44\xf1\xa8\x1b\xdf\xee\xe2\x33\x2b\x4d\x89\x46\x81\x73\xa3\xb2\x92\x8a\x9f\xcd\xc4\x1d\x72\x2b\x49\x72\x50\xc1\xb6\x26\x02\x4b\x75\xa4\x58\xdd\x42\x51\x57\xec\xf8\x0a\x45\xae\xd0\x56\x71\x04\x2e\x20\x57\x14\x6e\xc5\xc1\x61\x02\x76\xe4\x34\x10\x7f\xb5\xc0\x31\x41\x2b\x8d\xd8\xcd\xd9\x27\x41\xb3\x57\xf7\xfa\x64\xf3\x73\xd1\x64\x73\x93\x7f\x68\x04\x46\xec\xe7\xf7\x27\xc1\xb1\xa7\x99\x1f\x8b\x12\x84\x61\x18\x3c\x9a\x03\xab\x8d\xa9\x5b\x57\x13\xd4\xe3\x3b\xaf\x3d\x5f\xb2\x00\xd5\x13\x5c\xc4\x5a\x9f\x5a\xe5\x26\xa2\xa0\x70\x11\x7b\xf7\xfb\x7d\x8b\xcc\x0d\xea\x56\xf4\x34\xc8\xcc\x2b\x7c\x80\x9f\x5a\x20\x84\x3d\x64\x32\x45\x4d\xb6\x88\x85\xb0\x95\x1d\x6a\x91\x19\xa9\xe9\x90\xed\xa5\x71\xe4\xbb\xa0\xb2\xf4\x44\x1d\x4c\xba\xd9\x57\x76\x96\xf5\x06\x33\x7b\x16\x67\xd3\xc0\xfb\x3c\xfc\xf1\xee\xbf\xdd\x2b\x5f\xda\x33\xcf\xac\x97\x7f\x06\x00\x00\xff\xff\xb7\xd7\x69\x49\x39\x0f\x00\x00"), + }, + "/relay_template.yaml": &vfsgenÛ°CompressedFileInfo{ + name: "relay_template.yaml", + modTime: time.Date(2021, 11, 29, 20, 16, 39, 198578457, time.UTC), + uncompressedSize: 5954, + + compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x02\xff\xec\x97\x5f\x6f\xa3\x38\x10\xc0\xdf\xf9\x14\x56\xdf\x49\xbb\xda\xd5\x69\x85\xb4\x0f\x5c\x92\xb6\x51\xb7\x04\x11\xda\x55\x9f\x22\x2f\x4c\x53\xab\xc6\xf6\xd9\x43\x7a\x68\xb5\xdf\xfd\x64\x02\x04\x52\xa8\xa2\x1c\x5a\xdd\xea\x9a\xa7\xc4\x9e\x3f\xbf\x99\x8c\xed\x19\xd7\x75\x1d\xaa\xd8\x3d\x68\xc3\xa4\xf0\xc8\xf6\x83\xf3\xcc\x44\xea\x91\x80\x66\x60\x14\x4d\xc0\xc9\x00\x69\x4a\x91\x7a\x0e\x21\x9c\x7e\x07\x6e\xec\x37\x42\x12\x29\x50\x4b\xee\x2a\x4e\x05\x78\xf5\x4f\x0e\xda\xcd\xa8\xa0\x1b\xd0\x0e\x21\x82\x66\xe0\x11\x4d\x1f\x69\xe1\x9a\xc2\x20\x64\x8e\x63\x5d\xf6\xfb\x0c\xed\x8a\x41\x10\x78\x2f\x79\x9e\xc1\x94\x53\x96\x75\xfc\xb7\xed\x3d\xe7\xdf\xc1\x55\x5a\xfe\x5d\xb8\x34\x4f\x19\x56\xdb\x25\xf4\x81\x4f\xa3\x20\xb1\xea\x34\x49\xc0\x98\x5b\x99\x42\x19\x83\x4b\x22\xa0\xe9\x37\xcd\x10\x96\x22\x01\x87\x10\x0d\x46\xe6\x3a\x81\x2a\x44\x0d\x7f\xe5\x60\xb0\xfa\x45\x88\x41\xa9\xe9\x06\x3c\xf2\xe1\x8a\x39\x84\x6c\x4b\x4a\x6b\xce\x23\x97\x8c\x43\xe5\x8d\x38\x87\x59\xa5\x4a\x99\xf3\x26\xcc\x19\x28\x2e\x8b\x0c\x04\x0e\xe6\x96\x2a\xf5\x3a\xcc\xc1\xf8\x8f\x88\x5c\x83\xe2\x2c\xa1\xc6\x23\x1f\x1c\x42\x94\x96\x1b\x0d\xc6\xcc\x80\xa6\x9c\x09\x58\x41\x22\x45\x6a\x37\x3f\x5f\x5c\x38\x84\x18\xe0\x90\xa0\xd4\x3b\x98\x8c\x62\xf2\xf4\xb5\x45\x37\xcc\x87\x90\x29\x4e\x11\x2a\xc5\x56\x74\xf6\xc3\x3b\x36\x86\xad\x10\x52\x63\xd7\x75\x46\x99\x00\xdd\x68\xba\x84\xea\x4d\xcb\x8e\x4b\x5c\x37\x93\x29\x7c\x31\xa0\xb7\x65\xdd\xed\xd7\xb9\xdc\xb8\x1c\xb6\xc0\xbf\x7c\x6c\xd6\x41\x6c\xdb\xca\xbb\xa4\x86\xcb\xd9\x3a\xf0\x6f\xe7\xcd\x06\x21\x5b\xca\x73\xb8\xd4\x32\xf3\x5a\x8b\x84\x3c\x32\xe0\x69\x04\x8f\xdd\x55\x1b\x4e\xa7\xa6\xbb\x9b\xa5\x52\x48\xf1\xc9\x6b\xd2\x32\xb1\x8e\x07\x39\x56\xa1\x3f\xfd\xd5\x30\xbb\x03\x7f\x48\x14\xf9\x97\xfe\xc3\x3a\x9a\x7f\xf5\x1f\xd6\xe1\x7c\x1e\xad\xe6\xd1\xfd\xe2\x18\xb6\x44\x8a\x47\xb6\xb9\xa5\xea\x06\x8a\x1e\xc4\x67\x28\x3c\x62\x40\xa0\x2e\x26\x0a\x40\x33\xb1\x99\x3c\x49\x83\x07\x62\x03\x67\x7e\x67\xfc\x15\xec\x6a\x1e\xc4\xd1\xc3\xda\x9f\xcd\xa2\x51\x01\x69\x9a\xea\x7f\x05\xf6\xe7\x72\x19\xaf\xe2\xc8\x0f\xff\x83\x6c\xfb\xff\x76\x11\x5c\xad\xe3\xe5\xcd\x3c\x18\x07\xd0\xfe\xad\x13\x94\xcf\x20\x46\xe0\xbb\x5b\xcd\xa3\x31\xe1\x72\x33\x36\xdc\xf5\x72\x15\xaf\xc3\x65\x14\x8f\x08\x68\x4f\xc4\x44\x49\x8d\x23\x40\x4e\x97\x41\x30\x9f\xc6\xcb\x51\xd3\x98\x48\x21\xca\xd7\x62\xb4\x5c\xee\x31\x47\x4e\xe8\x1e\x75\xcc\xac\x06\xf3\xf8\xdb\x32\xba\x59\x2f\x66\xe3\x50\x6a\xe0\xb4\x10\x80\x2f\x52\x3f\x4f\x58\x7a\x12\xe1\xee\xf3\x0a\xd8\xbf\x9b\x2d\xe2\x75\xe8\xc7\xd7\xe3\xa0\x96\x8d\xd7\x44\x51\x7c\x3a\x89\x92\x65\x65\x37\x75\xf6\xe3\x07\x99\xcc\xe4\x8b\xe0\x92\xa6\x33\xfb\x18\x45\x36\x05\x0b\xbb\x4b\x7e\xfe\x3c\xeb\xca\x87\x39\xe7\xa1\xe4\x2c\x29\x3c\xb2\x78\x0c\x24\x86\x1a\xec\x45\xe8\xbc\xed\xbb\xd9\x46\xd0\x19\x13\x14\x99\x14\xb7\x60\x8c\xb5\x58\xbe\x84\xe7\x29\x6c\xcf\x5b\x9b\xb6\x75\x78\x4b\xa9\x42\xb0\x8d\x5f\x23\x56\x77\x84\xb9\xc0\x4e\x7f\x92\xd9\x95\xca\x8d\x54\x78\x5e\xc2\x9d\xd7\x6d\x6b\x17\xbc\xbd\x9a\x0a\x53\xfb\x99\xf2\xdc\x20\xe8\x4b\xa6\x9b\x17\x52\x83\x41\xaa\xb1\x96\xf0\xf9\x0b\x2d\x8c\xf3\x0a\xf8\x4a\xd3\x04\x42\xd0\x4c\xa6\x4d\xa3\xf7\xf1\xc2\x69\x13\xb7\x5a\xab\xd7\x10\x84\xa8\xbe\xc6\xbc\x5d\x10\x89\x5d\x08\xde\x6a\xce\x9d\xc1\x49\x63\x5a\xd7\xd9\x31\x9d\x7e\x53\x40\x43\x0d\x6f\xad\xbf\xaf\x4c\x8f\x9c\x1d\xe6\xfc\xac\xec\x71\x9b\xb7\xb3\xaf\x02\x57\xe5\xb6\x9f\xa6\xba\xaa\xc0\x9e\x46\xa5\x4f\x2f\x04\xd0\xd7\xd2\x60\xa5\xb5\x7f\x00\x87\x84\x63\xbb\x59\x49\xef\x5f\xa4\x3e\xe9\x3b\xd3\x95\x3e\xb8\x78\xfb\x54\xa6\xb5\x48\xbf\x5e\x73\x0b\x0e\x9e\x41\x1b\x4a\x28\x35\xb6\x01\xdf\xd4\xb2\x90\x07\x4a\x07\xf7\xd9\xa0\xaf\x60\x27\xb2\x98\x95\x7a\xc3\x05\xb3\x02\xbd\x65\x07\x83\xe9\xc9\x83\x91\x8d\xa3\x1a\x06\x77\x36\x30\x51\x6e\x49\x5c\x96\xf7\x2e\xcc\x4f\x9f\x76\xc3\x83\xd2\x12\x65\x22\xb9\x47\xe2\x69\x58\xae\x20\xd5\x1b\x28\x83\xad\xa5\x6a\x3b\x4f\x88\x95\x21\x37\x93\x82\xa1\xb4\x65\xd3\xb2\xf9\xf9\xe2\xe2\x18\xa3\x95\x58\x77\x22\xeb\x1f\x9c\x4e\x1b\x3b\xa9\x10\x12\xcb\x7b\xc2\x1c\x35\x85\xba\x48\x19\x1f\x3e\xa0\xad\xdd\x37\xd3\x3e\x34\x81\xfe\x51\x0e\xa0\xdd\x71\xf5\xb4\x71\xb4\x46\x19\x61\x26\xad\x4d\x9d\x3c\x98\x36\xfa\xef\xe3\xe7\xfb\xf8\xf9\x3e\x7e\xfe\x66\xe3\xe7\xff\xb8\x6b\x76\x3b\x37\xd7\xef\xd4\x3a\xff\xaa\xc6\xf6\x9f\x00\x00\x00\xff\xff\xe2\x5d\x18\x2b\x42\x17\x00\x00"), + }, + } + fs["/"].(*vfsgenÛ°DirInfo).entries = []os.FileInfo{ + fs["/agent_templates.yaml"].(os.FileInfo), + fs["/relay_agent_template.yaml"].(os.FileInfo), + fs["/relay_template.yaml"].(os.FileInfo), + } + + return fs +}() + +type vfsgenÛ°FS map[string]interface{} + +func (fs vfsgenÛ°FS) Open(path string) (http.File, error) { + path = pathpkg.Clean("/" + path) + f, ok := fs[path] + if !ok { + return nil, &os.PathError{Op: "open", Path: path, Err: os.ErrNotExist} + } + + switch f := f.(type) { + case *vfsgenÛ°CompressedFileInfo: + gr, err := gzip.NewReader(bytes.NewReader(f.compressedContent)) + if err != nil { + // This should never happen because we generate the gzip bytes such that they are always valid. + panic("unexpected error reading own gzip compressed bytes: " + err.Error()) + } + return &vfsgenÛ°CompressedFile{ + vfsgenÛ°CompressedFileInfo: f, + gr: gr, + }, nil + case *vfsgenÛ°DirInfo: + return &vfsgenÛ°Dir{ + vfsgenÛ°DirInfo: f, + }, nil + default: + // This should never happen because we generate only the above types. + panic(fmt.Sprintf("unexpected type %T", f)) + } +} + +// vfsgenÛ°CompressedFileInfo is a static definition of a gzip compressed file. +type vfsgenÛ°CompressedFileInfo struct { + name string + modTime time.Time + compressedContent []byte + uncompressedSize int64 +} + +func (f *vfsgenÛ°CompressedFileInfo) Readdir(count int) ([]os.FileInfo, error) { + return nil, fmt.Errorf("cannot Readdir from file %s", f.name) +} +func (f *vfsgenÛ°CompressedFileInfo) Stat() (os.FileInfo, error) { return f, nil } + +func (f *vfsgenÛ°CompressedFileInfo) GzipBytes() []byte { + return f.compressedContent +} + +func (f *vfsgenÛ°CompressedFileInfo) Name() string { return f.name } +func (f *vfsgenÛ°CompressedFileInfo) Size() int64 { return f.uncompressedSize } +func (f *vfsgenÛ°CompressedFileInfo) Mode() os.FileMode { return 0444 } +func (f *vfsgenÛ°CompressedFileInfo) ModTime() time.Time { return f.modTime } +func (f *vfsgenÛ°CompressedFileInfo) IsDir() bool { return false } +func (f *vfsgenÛ°CompressedFileInfo) Sys() interface{} { return nil } + +// vfsgenÛ°CompressedFile is an opened compressedFile instance. +type vfsgenÛ°CompressedFile struct { + *vfsgenÛ°CompressedFileInfo + gr *gzip.Reader + grPos int64 // Actual gr uncompressed position. + seekPos int64 // Seek uncompressed position. +} + +func (f *vfsgenÛ°CompressedFile) Read(p []byte) (n int, err error) { + if f.grPos > f.seekPos { + // Rewind to beginning. + err = f.gr.Reset(bytes.NewReader(f.compressedContent)) + if err != nil { + return 0, err + } + f.grPos = 0 + } + if f.grPos < f.seekPos { + // Fast-forward. + _, err = io.CopyN(ioutil.Discard, f.gr, f.seekPos-f.grPos) + if err != nil { + return 0, err + } + f.grPos = f.seekPos + } + n, err = f.gr.Read(p) + f.grPos += int64(n) + f.seekPos = f.grPos + return n, err +} +func (f *vfsgenÛ°CompressedFile) Seek(offset int64, whence int) (int64, error) { + switch whence { + case io.SeekStart: + f.seekPos = 0 + offset + case io.SeekCurrent: + f.seekPos += offset + case io.SeekEnd: + f.seekPos = f.uncompressedSize + offset + default: + panic(fmt.Errorf("invalid whence value: %v", whence)) + } + return f.seekPos, nil +} +func (f *vfsgenÛ°CompressedFile) Close() error { + return f.gr.Close() +} + +// vfsgenÛ°DirInfo is a static definition of a directory. +type vfsgenÛ°DirInfo struct { + name string + modTime time.Time + entries []os.FileInfo +} + +func (d *vfsgenÛ°DirInfo) Read([]byte) (int, error) { + return 0, fmt.Errorf("cannot Read from directory %s", d.name) +} +func (d *vfsgenÛ°DirInfo) Close() error { return nil } +func (d *vfsgenÛ°DirInfo) Stat() (os.FileInfo, error) { return d, nil } + +func (d *vfsgenÛ°DirInfo) Name() string { return d.name } +func (d *vfsgenÛ°DirInfo) Size() int64 { return 0 } +func (d *vfsgenÛ°DirInfo) Mode() os.FileMode { return 0755 | os.ModeDir } +func (d *vfsgenÛ°DirInfo) ModTime() time.Time { return d.modTime } +func (d *vfsgenÛ°DirInfo) IsDir() bool { return true } +func (d *vfsgenÛ°DirInfo) Sys() interface{} { return nil } + +// vfsgenÛ°Dir is an opened dir instance. +type vfsgenÛ°Dir struct { + *vfsgenÛ°DirInfo + pos int // Position within entries for Seek and Readdir. +} + +func (d *vfsgenÛ°Dir) Seek(offset int64, whence int) (int64, error) { + if offset == 0 && whence == io.SeekStart { + d.pos = 0 + return 0, nil + } + return 0, fmt.Errorf("unsupported Seek in directory %s", d.name) +} + +func (d *vfsgenÛ°Dir) Readdir(count int) ([]os.FileInfo, error) { + if d.pos >= len(d.entries) && count > 0 { + return nil, io.EOF + } + if count <= 0 || count > len(d.entries)-d.pos { + count = len(d.entries) - d.pos + } + e := d.entries[d.pos : d.pos+count] + d.pos += count + return e, nil +} diff --git a/components/adminsrv/internal/fixtures/load.go b/components/adminsrv/internal/fixtures/load.go new file mode 100644 index 0000000..3ae7841 --- /dev/null +++ b/components/adminsrv/internal/fixtures/load.go @@ -0,0 +1,161 @@ +package fixtures + +import ( + "bytes" + "context" + "encoding/json" + "io/ioutil" + "text/template" + + "crypto/x509/pkix" + + "github.com/RafaySystems/rcloud-base/components/adminsrv/pkg/service" + "github.com/RafaySystems/rcloud-base/components/common/pkg/sentry/cryptoutil" + "github.com/rs/xid" + "sigs.k8s.io/yaml" + + "github.com/RafaySystems/rcloud-base/components/common/pkg/log" + commonv3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/commonpb/v3" + sentry "github.com/RafaySystems/rcloud-base/components/common/proto/types/sentry" + "github.com/shurcooL/httpfs/vfsutil" +) + +var _log = log.GetLogger() + +var ( + // RelayTemplate is the template for rendering download yaml + RelayTemplate *template.Template + // RelayAgentTemplate is the template for rendering download yaml + RelayAgentTemplate *template.Template +) + +// XXX Warning : loadAgentTemplates XXX +// Changes to the below code will affect the default template +// and risks CA cert update. Once the template certs are +// updated following situation will arise. +// - Existing relay connections will fail, need to restart +// agents to re-bootstrap. +// - Existing kubeconfig will fail, need to download new +// kubeconfig to continue +// This can cause issues in the case of production clusters +// Take extra caution while modifying the code to avoid +// unintended side effects. +func loadAgentTemplates(ctx context.Context, bs service.BootstrapService, d map[string]interface{}, pf cryptoutil.PasswordFunc) error { + yb, err := vfsutil.ReadFile(Fixtures, "agent_templates.yaml") + if err != nil { + return err + } + + t, err := template.New("agent_templates.yaml").Parse(string(yb)) + if err != nil { + return err + } + + bb := new(bytes.Buffer) + + err = t.Execute(bb, d) + if err != nil { + return err + } + + var agentTemplateList sentry.BootstrapAgentTemplateList + + jb, err := yaml.YAMLToJSONStrict(bb.Bytes()) + if err != nil { + return err + } + + err = json.Unmarshal(jb, &agentTemplateList) + if err != nil { + return err + } + + for _, item := range agentTemplateList.Items { + // Check bootstrap infr entry exist + bInfra, _ := bs.GetBootstrapInfra(ctx, item.Spec.InfraRef) + if bInfra != nil && bInfra.Spec.CaCert != "" { + // Skip updating bootstrap infra + _log.Infow("loadAgentTemplates", "skip bootstrap template creation, entry exist", item.Spec.InfraRef) + } else { + // Create bootstrap infra entry + cert, key, err := cryptoutil.GenerateCA(pkix.Name{ + CommonName: item.Spec.InfraRef, + Country: []string{"USA"}, + Organization: []string{"Rafay Systems Inc"}, + OrganizationalUnit: []string{"Rafay Sentry"}, + Province: []string{"California"}, + Locality: []string{"Sunnyvale"}, + }, pf) + if err != nil { + return err + } + err = bs.PatchBootstrapInfra(ctx, &sentry.BootstrapInfra{ + Metadata: &commonv3.Metadata{ + Name: item.Spec.InfraRef, + }, + Spec: &sentry.BootstrapInfraSpec{ + CaCert: string(cert), + CaKey: string(key), + }, + }) + + if err != nil { + return err + } + } + + item.Spec.Token = xid.New().String() + // Create/Update bootstrap agent template + // Token is not updated if entry already exist. + err = bs.PatchBootstrapAgentTemplate(ctx, item) + if err != nil { + return err + } + + } + + return nil +} + +// Load loads fixtures +func Load(ctx context.Context, bs service.BootstrapService, d map[string]interface{}, pf cryptoutil.PasswordFunc) error { + err := loadAgentTemplates(ctx, bs, d, pf) + if err != nil { + return err + } + service.KEKFunc = pf + + err = loadRelayTemplate() + + return err +} + +func loadRelayTemplate() error { + f, err := Fixtures.Open("relay_template.yaml") + if err != nil { + return err + } + + b, err := ioutil.ReadAll(f) + if err != nil { + return err + } + + RelayTemplate, err = template.New("relay_template").Parse(string(b)) + if err != nil { + return err + } + + f1, err := Fixtures.Open("relay_agent_template.yaml") + if err != nil { + return err + } + + b1, err := ioutil.ReadAll(f1) + if err != nil { + return err + } + + RelayAgentTemplate, err = template.New("relay_agent_template").Parse(string(b1)) + return err +} diff --git a/components/adminsrv/internal/generate/generate.go b/components/adminsrv/internal/generate/generate.go new file mode 100644 index 0000000..5425a0b --- /dev/null +++ b/components/adminsrv/internal/generate/generate.go @@ -0,0 +1,25 @@ +//go:build ignore +// +build ignore + +package main + +import ( + "log" + "net/http" + + "github.com/shurcooL/vfsgen" +) + +var fixtureFS http.FileSystem = http.Dir("fixtures/data") + +func main() { + + err := vfsgen.Generate(fixtureFS, vfsgen.Options{ + Filename: "fixtures/fixtures.go", + PackageName: "fixtures", + VariableName: "Fixtures", + }) + if err != nil { + log.Fatalln(err) + } +} diff --git a/components/adminsrv/internal/models/account.go b/components/adminsrv/internal/models/account.go new file mode 100644 index 0000000..88360b1 --- /dev/null +++ b/components/adminsrv/internal/models/account.go @@ -0,0 +1,18 @@ +package models + +import ( + "time" + + "github.com/google/uuid" + "github.com/uptrace/bun" +) + +type Account struct { + bun.BaseModel `bun:"table:identities,alias:identities"` + + ID uuid.UUID `bun:"id,type:uuid"` + Traits map[string]interface{} `bun:"traits,type:jsonb"` + State string `bun:"state,notnull"` + Username string `bun:"username"` + LastLogin time.Time `bun:"lastlogin"` +} diff --git a/components/adminsrv/internal/models/accountpermission.go b/components/adminsrv/internal/models/accountpermission.go new file mode 100644 index 0000000..f6b7739 --- /dev/null +++ b/components/adminsrv/internal/models/accountpermission.go @@ -0,0 +1,23 @@ +package models + +import ( + "encoding/json" + + "github.com/google/uuid" + "github.com/uptrace/bun" +) + +type AccountPermission struct { + bun.BaseModel `bun:"table:sentry_account_permission,alias:sap"` + + AccountId uuid.UUID `bun:"account_id,type:uuid"` + ProjecttId string `bun:"project_id"` + OrganizationId uuid.UUID `bun:"organization_id,type:uuid"` + PartnerId uuid.UUID `bun:"partner_id,type:uuid"` + RoleName string `bun:"role_name"` + IsGlobal bool `bun:"is_global"` + Scope string `bun:"scope"` + PermissionName string `bun:"permission_name"` + BaseUrl string `bun:"base_url"` + Urls json.RawMessage `bun:"urls,type:jsonb"` +} diff --git a/components/adminsrv/internal/models/bootstrapagent.go b/components/adminsrv/internal/models/bootstrapagent.go new file mode 100644 index 0000000..13383c1 --- /dev/null +++ b/components/adminsrv/internal/models/bootstrapagent.go @@ -0,0 +1,32 @@ +package models + +import ( + "encoding/json" + "time" + + "github.com/google/uuid" + "github.com/uptrace/bun" +) + +type BootstrapAgent struct { + bun.BaseModel `bun:"table:sentry_bootstrap_agent,alias:ba"` + + ID uuid.UUID `bun:"id,pk,type:uuid,default:uuid_generate_v4()"` + Name string `bun:"name,notnull"` + OrganizationId uuid.UUID `bun:"organization_id,type:uuid"` + PartnerId uuid.UUID `bun:"partner_id,type:uuid"` + ProjectId uuid.UUID `bun:"project_id,type:uuid"` + TemplateRef string `bun:"template_ref,notnull"` + AgentMode string `bun:"agent_mode,notnull"` + DisplayName string `bun:"display_name,notnull"` + CreatedAt time.Time `bun:"created_at,notnull,default:current_timestamp"` + ModifiedAt time.Time `bun:"modified_at"` + DeletedAt time.Time `bun:"deleted_at"` + Labels json.RawMessage `bun:"labels,type:jsonb,notnull,default:'{}'"` + Annotations json.RawMessage `bun:"annotations,type:jsonb,notnull,default:'{}'"` + Token string `bun:"token,notnull"` + TokenState string `bun:"token_state,notnull"` + IPAddress string `bun:"ip_address,notnull"` + LastCheckedIn time.Time `bun:"last_checked_in"` + Fingerprint string `bun:"fingerprint,notnull"` +} diff --git a/components/adminsrv/internal/models/bootstrapagenttemplate.go b/components/adminsrv/internal/models/bootstrapagenttemplate.go new file mode 100644 index 0000000..1e06130 --- /dev/null +++ b/components/adminsrv/internal/models/bootstrapagenttemplate.go @@ -0,0 +1,33 @@ +package models + +import ( + "encoding/json" + "time" + + "github.com/google/uuid" + "github.com/uptrace/bun" +) + +type BootstrapAgentTemplate struct { + bun.BaseModel `bun:"table:sentry_bootstrap_agent_template,alias:bat"` + + Name string `bun:"name,pk,notnull"` + OrganizationId uuid.UUID `bun:"organization_id,type:uuid"` + PartnerId uuid.UUID `bun:"partner_id,type:uuid"` + ProjectId uuid.UUID `bun:"project_id,type:uuid"` + InfraRef string `bun:"infra_ref,notnull"` + DisplayName string `bun:"display_name,notnull"` + CreatedAt time.Time `bun:"created_at,notnull,default:current_timestamp"` + ModifiedAt time.Time `bun:"modified_at"` + DeletedAt time.Time `bun:"deleted_at"` + Labels json.RawMessage `bun:"labels,type:jsonb,notnull,default:'{}'"` + Annotations json.RawMessage `bun:"annotations,type:jsonb,notnull,default:'{}'"` + AutoRegister bool `bun:"auto_register,notnull,default:false"` + IgnoreMultipleRegister bool `bun:"ignore_multiple_register,notnull,default:false"` + AutoApprove bool `bun:"auto_approve,notnull,default:false"` + TemplateType string `bun:"template_type,notnull"` + Hosts json.RawMessage `bun:"hosts,type:jsonb,notnull,default:'{}'"` + Token string `bun:"token,notnull"` + InclusterTemplate string `bun:"incluster_template,notnull"` + OutofclusterTemplate string `bun:"outofcluster_template,notnull"` +} diff --git a/components/adminsrv/internal/models/bootstrapinfra.go b/components/adminsrv/internal/models/bootstrapinfra.go new file mode 100644 index 0000000..53a38e7 --- /dev/null +++ b/components/adminsrv/internal/models/bootstrapinfra.go @@ -0,0 +1,26 @@ +package models + +import ( + "encoding/json" + "time" + + "github.com/google/uuid" + "github.com/uptrace/bun" +) + +type BootstrapInfra struct { + bun.BaseModel `bun:"table:sentry_bootstrap_infra,alias:bi"` + + Name string `bun:"name,pk,notnull"` + OrganizationId uuid.UUID `bun:"organization_id,type:uuid"` + PartnerId uuid.UUID `bun:"partner_id,type:uuid"` + ProjectId uuid.UUID `bun:"project_id,type:uuid"` + DisplayName string `bun:"display_name,notnull"` + CreatedAt time.Time `bun:"created_at,notnull,default:current_timestamp"` + ModifiedAt time.Time `bun:"modified_at"` + DeletedAt time.Time `bun:"deleted_at"` + Labels json.RawMessage `bun:"labels,type:jsonb,notnull,default:'{}'"` + Annotations json.RawMessage `bun:"annotations,type:jsonb,notnull,default:'{}'"` + CaCert string `bun:"ca_cert,notnull"` + CaKey string `bun:"ca_key,notnull"` +} diff --git a/components/adminsrv/internal/models/group.go b/components/adminsrv/internal/models/group.go new file mode 100644 index 0000000..2733be1 --- /dev/null +++ b/components/adminsrv/internal/models/group.go @@ -0,0 +1,22 @@ +package models + +import ( + "time" + + "github.com/google/uuid" + "github.com/uptrace/bun" +) + +type Group struct { + bun.BaseModel `bun:"table:authsrv_group,alias:group"` + + ID uuid.UUID `bun:"id,type:uuid,pk,default:uuid_generate_v4()"` + Name string `bun:"name,notnull"` + Description string `bun:"description,notnull"` + CreatedAt time.Time `bun:"created_at,notnull,default:current_timestamp"` + ModifiedAt time.Time `bun:"modified_at,notnull,default:current_timestamp"` + Trash bool `bun:"trash,notnull,default:false"` + OrganizationId uuid.UUID `bun:"organization_id,type:uuid"` + PartnerId uuid.UUID `bun:"partner_id,type:uuid"` + Type string `bun:"type,notnull"` +} diff --git a/components/adminsrv/internal/models/groupaccount.go b/components/adminsrv/internal/models/groupaccount.go new file mode 100644 index 0000000..b484474 --- /dev/null +++ b/components/adminsrv/internal/models/groupaccount.go @@ -0,0 +1,22 @@ +package models + +import ( + "time" + + "github.com/google/uuid" + "github.com/uptrace/bun" +) + +type GroupAccount struct { + bun.BaseModel `bun:"table:authsrv_groupaccount,alias:groupaccount"` + + ID uuid.UUID `bun:"id,type:uuid,pk,default:uuid_generate_v4()"` + Name string `bun:"name,notnull"` + Description string `bun:"description,notnull"` + CreatedAt time.Time `bun:"created_at,notnull,default:current_timestamp"` + ModifiedAt time.Time `bun:"modified_at,notnull,default:current_timestamp"` + Trash bool `bun:"trash,notnull,default:false"` + AccountId uuid.UUID `bun:"account_id,type:uuid"` + GroupId uuid.UUID `bun:"group_id,type:uuid"` + Active bool `bun:"active,notnull"` +} diff --git a/components/adminsrv/internal/models/grouppermission.go b/components/adminsrv/internal/models/grouppermission.go new file mode 100644 index 0000000..eca3cd8 --- /dev/null +++ b/components/adminsrv/internal/models/grouppermission.go @@ -0,0 +1,25 @@ +package models + +import ( + "encoding/json" + + "github.com/google/uuid" + "github.com/uptrace/bun" +) + +type GroupPermission struct { + bun.BaseModel `bun:"table:sentry_group_permission,alias:sgp"` + + GroupId uuid.UUID `bun:"group_id,type:uuid"` + ProjecttId string `bun:"project_id"` + OrganizationId uuid.UUID `bun:"organization_id,type:uuid"` + PartnerId uuid.UUID `bun:"partner_id,type:uuid"` + GroupName string `bun:"group_name"` + RoleName string `bun:"role_name"` + IsGlobal bool `bun:"is_global"` + Scope string `bun:"scope"` + PermissionName string `bun:"permission_name"` + BaseUrl string `bun:"base_url"` + Urls json.RawMessage `bun:"urls,type:jsonb"` + ProjectName string `bun:"project_name"` +} diff --git a/components/adminsrv/internal/models/kubeconfig_revocation.go b/components/adminsrv/internal/models/kubeconfig_revocation.go new file mode 100644 index 0000000..9d59d45 --- /dev/null +++ b/components/adminsrv/internal/models/kubeconfig_revocation.go @@ -0,0 +1,20 @@ +package models + +import ( + "time" + + "github.com/google/uuid" + "github.com/uptrace/bun" +) + +type KubeconfigRevocation struct { + bun.BaseModel `bun:"table:sentry_kubeconfig_revocation,alias:kr"` + + ID uuid.UUID `bun:"id,pk,type:uuid,default:uuid_generate_v4()"` + OrganizationId uuid.UUID `bun:"organization_id,notnull,type:uuid"` + PartnerId uuid.UUID `bun:"partner_id,type:uuid,notnull"` + AccountId uuid.UUID `bun:"account_id,type:uuid,notnull"` + RevokedAt time.Time `bun:"revoked_at"` + CreatedAt time.Time `bun:"created_at,notnull,default:current_timestamp"` + IsSSOUser bool `bun:"is_sso_user,default:false"` +} diff --git a/components/adminsrv/internal/models/kubeconfig_setting.go b/components/adminsrv/internal/models/kubeconfig_setting.go new file mode 100644 index 0000000..622c7ca --- /dev/null +++ b/components/adminsrv/internal/models/kubeconfig_setting.go @@ -0,0 +1,30 @@ +package models + +import ( + "time" + + "github.com/google/uuid" + "github.com/uptrace/bun" +) + +type KubeconfigSetting struct { + bun.BaseModel `bun:"table:sentry_kubeconfig_setting,alias:ks"` + + ID uuid.UUID `bun:"id,pk,type:uuid,default:uuid_generate_v4()"` + OrganizationId uuid.UUID `bun:"organization_id,notnull,type:uuid"` + PartnerId uuid.UUID `bun:"partner_id,type:uuid,notnull"` + AccountId uuid.UUID `bun:"account_id,type:uuid,notnull"` + Scope string `bun:"scope,notnull"` + ValiditySeconds int64 `bun:"validity_seconds,notnull,default:0"` + CreatedAt time.Time `bun:"created_at,notnull,default:current_timestamp"` + ModifiedAt time.Time `bun:"modified_at"` + DeletedAt time.Time `bun:"deleted_at"` + EnforceRsId bool `bun:"enforce_rsid,default:false"` + DisableAllAudit bool `bun:"disable_all_audit,default:false"` + DisableCmdAudit bool `bun:"disable_cmd_audit,default:false"` + IsSSOUser bool `bun:"is_sso_user,default:false"` + DisableWebKubectl bool `bun:"disable_web_kubectl,default:false"` + DisableCLIKubectl bool `bun:"disable_cli_kubectl,default:false"` + EnablePrivateRelay bool `bun:"enable_privaterelay,default:false"` + EnforceOrgAdminSecretAccess bool `bun:"enforce_orgadmin_secret_access,default:false"` +} diff --git a/components/adminsrv/internal/models/kubectl_cluster_setting.go b/components/adminsrv/internal/models/kubectl_cluster_setting.go new file mode 100644 index 0000000..e3ab218 --- /dev/null +++ b/components/adminsrv/internal/models/kubectl_cluster_setting.go @@ -0,0 +1,21 @@ +package models + +import ( + "time" + + "github.com/google/uuid" + "github.com/uptrace/bun" +) + +type KubectlClusterSetting struct { + bun.BaseModel `bun:"table:sentry_kubectl_cluster_settings,alias:kc"` + + Name string `bun:"name,pk,notnull"` + OrganizationId uuid.UUID `bun:"organization_id,notnull,type:uuid"` + PartnerId uuid.UUID `bun:"partner_id,type:uuid,notnull"` + DisableWebKubectl bool `bun:"disable_web_kubectl,notnull,default:false"` + DisableCliKubectl bool `bun:"disable_cli_kubectl,notnull,default:false"` + CreatedAt time.Time `bun:"created_at,notnull,default:current_timestamp"` + ModifiedAt time.Time `bun:"modified_at"` + DeletedAt time.Time `bun:"deleted_at"` +} diff --git a/components/cluster-scheduler/pkg/internal/models/metro.go b/components/adminsrv/internal/models/metro.go similarity index 100% rename from components/cluster-scheduler/pkg/internal/models/metro.go rename to components/adminsrv/internal/models/metro.go diff --git a/components/adminsrv/internal/models/organization.go b/components/adminsrv/internal/models/organization.go new file mode 100644 index 0000000..920f4a2 --- /dev/null +++ b/components/adminsrv/internal/models/organization.go @@ -0,0 +1,41 @@ +package models + +import ( + "encoding/json" + "time" + + "github.com/google/uuid" + "github.com/uptrace/bun" +) + +type Organization struct { + bun.BaseModel `bun:"table:authsrv_organization,alias:organization"` + + ID uuid.UUID `bun:"id,type:uuid,pk,default:uuid_generate_v4()"` + Name string `bun:"name,notnull"` + Description string `bun:"description,notnull"` + CreatedAt time.Time `bun:"created_at,notnull,default:current_timestamp"` + ModifiedAt time.Time `bun:"modified_at,notnull,default:current_timestamp"` + Trash bool `bun:"trash,notnull"` + Settings json.RawMessage `bun:"settings,notnull,type:jsonb"` + BillingAddress string `bun:"billing_address,notnull,type:text"` + PartnerId uuid.UUID `bun:"partner_id,notnull,type:uuid"` + Active bool `bun:"active,notnull"` + Approved bool `bun:"approved,notnull"` + Type string `bun:"type,notnull"` + AddressLine1 string `bun:"address_line1,notnull,type:text"` + AddressLine2 string `bun:"address_line2,notnull,type:text"` + City string `bun:"city,notnull,type:text"` + Country string `bun:"country,notnull,type:text"` + Phone string `bun:"phone,notnull,type:text"` + State string `bun:"state,notnull,type:text"` + Zipcode string `bun:"zipcode,notnull,type:text"` + DeletedName string `bun:"deleted_name"` + IsPrivate bool `bun:"is_private"` + IsTOTPEnabled bool `bun:"is_totp_enabled,notnull"` + AreClustersShared bool `bun:"are_clusters_shared,notnull"` + PspsEnabled bool `bun:"psps_enabled,default:true"` + CustomPspsEnabled bool `bun:"custom_psps_enabled"` + DefaultBlueprintsEnabled bool `bun:"default_blueprints_enabled,default:true"` + Referer string `bun:"referer"` +} diff --git a/components/adminsrv/internal/models/partner.go b/components/adminsrv/internal/models/partner.go new file mode 100644 index 0000000..b18ba14 --- /dev/null +++ b/components/adminsrv/internal/models/partner.go @@ -0,0 +1,34 @@ +package models + +import ( + "encoding/json" + "time" + + "github.com/google/uuid" + "github.com/uptrace/bun" +) + +type Partner struct { + bun.BaseModel `bun:"table:authsrv_partner,alias:partner"` + + ID uuid.UUID `bun:"id,type:uuid,pk,default:uuid_generate_v4()"` + Name string `bun:"name,notnull"` + Description string `bun:"description,notnull"` + CreatedAt time.Time `bun:"created_at,notnull,default:current_timestamp"` + ModifiedAt time.Time `bun:"modified_at,notnull,default:current_timestamp"` + Trash bool `bun:"trash,notnull"` + Settings json.RawMessage `bun:"settings,notnull,type:jsonb"` + Host string `bun:"host,notnull"` + Domain string `bun:"domain,notnull"` + TosLink string `bun:"tos_link,notnull"` + LogoLink string `bun:"logo_link,notnull"` + NotificationEmail string `bun:"notification_email,notnull"` + ParentId uuid.UUID `bun:"parent_id,type:uuid"` + HelpdeskEmail string `bun:"partner_helpdesk_email,notnull"` + ProductName string `bun:"partner_product_name"` + SupportTeamName string `bun:"support_team_name,notnull"` + OpsHost string `bun:"ops_host,notnull"` + FavIconLink string `bun:"fav_icon_link,notnull"` + IsTOTPEnabled bool `bun:"is_totp_enabled,notnull"` + IsSyntheticPartnerEnabled bool `bun:"is_synthetic_partner_enabled,notnull"` +} diff --git a/components/adminsrv/internal/models/project.go b/components/adminsrv/internal/models/project.go new file mode 100644 index 0000000..bacf10f --- /dev/null +++ b/components/adminsrv/internal/models/project.go @@ -0,0 +1,22 @@ +package models + +import ( + "time" + + "github.com/google/uuid" + "github.com/uptrace/bun" +) + +type Project struct { + bun.BaseModel `bun:"table:authsrv_project,alias:project"` + + ID uuid.UUID `bun:"id,type:uuid,pk,default:uuid_generate_v4()"` + Name string `bun:"name,notnull"` + Description string `bun:"description,notnull"` + CreatedAt time.Time `bun:"created_at,notnull,default:current_timestamp"` + ModifiedAt time.Time `bun:"modified_at,notnull,default:current_timestamp"` + Trash bool `bun:"trash,notnull,default:false"` + OrganizationId uuid.UUID `bun:"organization_id,type:uuid"` + PartnerId uuid.UUID `bun:"partner_id,type:uuid"` + Default bool `bun:"default,notnull"` +} diff --git a/components/adminsrv/internal/models/ssoaccount_group_project_roles.go b/components/adminsrv/internal/models/ssoaccount_group_project_roles.go new file mode 100644 index 0000000..444d5ba --- /dev/null +++ b/components/adminsrv/internal/models/ssoaccount_group_project_roles.go @@ -0,0 +1,30 @@ +package models + +import ( + "time" + + "github.com/google/uuid" + "github.com/uptrace/bun" +) + +type SSOAccountGroupProjectRole struct { + bun.BaseModel `bun:"table:sentry_ssoaccount_group_project_roles,alias:acc"` + + Id uuid.UUID `bun:"id,type:uuid"` + Username string `bun:"username"` + RoleName string `bun:"role_name"` + ProjectId string `bun:"project_id"` + ProjectName string `bun:"project_name"` + GroupName string `bun:"group_name"` + AccountOrganizationId uuid.UUID `bun:"account_organization_id,type:uuid"` + OrganizationId uuid.UUID `bun:"organization_id,type:uuid"` + PartnerId uuid.UUID `bun:"partner_id,type:uuid"` + Scope string `bun:"scope"` + LastLogin time.Time `bun:"last_login"` + CreatedAt time.Time `bun:"created_at"` + FirstName string `bun:"first_name"` + LastName string `bun:"last_name"` + Phone string `bun:"phone"` + Name string `bun:"name"` + LastLogout time.Time `bun:"last_logout"` +} diff --git a/components/adminsrv/main.go b/components/adminsrv/main.go index c84684f..8cb2bf3 100644 --- a/components/adminsrv/main.go +++ b/components/adminsrv/main.go @@ -3,6 +3,7 @@ package main import ( "context" "database/sql" + "errors" "fmt" "net" "net/http" @@ -10,55 +11,95 @@ import ( "sync" "time" - "github.com/RafaySystems/rcloud-base/components/adminsrv/pkg/server" + "github.com/RafaySystems/rcloud-base/components/adminsrv/internal/fixtures" + "github.com/RafaySystems/rcloud-base/components/adminsrv/pkg/sentry/util" "github.com/RafaySystems/rcloud-base/components/adminsrv/pkg/service" - pbrpcv3 "github.com/RafaySystems/rcloud-base/components/adminsrv/proto/rpc/v3" + adminrpc "github.com/RafaySystems/rcloud-base/components/adminsrv/proto/rpc" + "github.com/RafaySystems/rcloud-base/components/adminsrv/server" "github.com/RafaySystems/rcloud-base/components/common/pkg/auth/interceptors" authv3 "github.com/RafaySystems/rcloud-base/components/common/pkg/auth/v3" "github.com/RafaySystems/rcloud-base/components/common/pkg/gateway" + "github.com/RafaySystems/rcloud-base/components/common/pkg/grpc" "github.com/RafaySystems/rcloud-base/components/common/pkg/log" configrpc "github.com/RafaySystems/rcloud-base/components/common/proto/rpc/config" + schedulerrpc "github.com/RafaySystems/rcloud-base/components/common/proto/rpc/scheduler" + sentryrpc "github.com/RafaySystems/rcloud-base/components/common/proto/rpc/sentry" "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" "github.com/spf13/viper" "github.com/uptrace/bun" "github.com/uptrace/bun/dialect/pgdialect" "github.com/uptrace/bun/driver/pgdriver" "github.com/uptrace/bun/extra/bundebug" - "google.golang.org/grpc" _grpc "google.golang.org/grpc" "sigs.k8s.io/controller-runtime/pkg/manager/signals" ) const ( - rpcPortEnv = "RPC_PORT" - apiPortEnv = "API_PORT" - debugPortEnv = "DEBUG_PORT" - dbAddrEnv = "DB_ADDR" - dbNameEnv = "DB_NAME" - dbUserEnv = "DB_USER" - dbPasswordEnv = "DB_PASSWORD" - devEnv = "DEV" - configAddrENV = "CONFIG_ADDR" + rpcPortEnv = "RPC_PORT" + apiPortEnv = "API_PORT" + debugPortEnv = "DEBUG_PORT" + dbAddrEnv = "DB_ADDR" + dbNameEnv = "DB_NAME" + dbUserEnv = "DB_USER" + dbPasswordEnv = "DB_PASSWORD" + devEnv = "DEV" + configAddrENV = "CONFIG_ADDR" + schedulerAddrENV = "SCHEDULER_ADDR" + sentryPeeringHostEnv = "SENTRY_PEERING_HOST" + coreRelayConnectorHostEnv = "CORE_RELAY_CONNECTOR_HOST" + coreRelayUserHostEnv = "CORE_RELAY_USER_HOST" + bootstrapKEKEnv = "BOOTSTRAP_KEK" + authAddrEnv = "AUTH_ADDR" + sentryBootstrapEnv = "SENTRY_BOOTSTRAP_ADDR" + relayImageEnv = "RELAY_IMAGE" + + // cd relay + coreCDRelayUserHostEnv = "CORE_CD_RELAY_USER_HOST" + coreCDRelayConnectorHostEnv = "CORE_CD_RELAY_CONNECTOR_HOST" ) var ( - rpcPort int - apiPort int - debugPort int - rpcRelayPeeringPort int - dbAddr string - dbName string - dbUser string - dbPassword string - dev bool - db *bun.DB - ps service.PartnerService - os service.OrganizationService - pps service.ProjectService - _log = log.GetLogger() - authPool authv3.AuthPool - configPool configrpc.ConfigPool - configAddr string + rpcPort int + apiPort int + debugPort int + rpcRelayPeeringPort int + dbAddr string + dbName string + dbUser string + dbPassword string + dev bool + db *bun.DB + ps service.PartnerService + os service.OrganizationService + pps service.ProjectService + bs service.BootstrapService + aps service.AccountPermissionService + gps service.GroupPermissionService + krs service.KubeconfigRevocationService + kss service.KubeconfigSettingService + kcs service.KubectlClusterSettingsService + _log = log.GetLogger() + authPool authv3.AuthPool + configPool configrpc.ConfigPool + schedulerPool schedulerrpc.SchedulerPool + configAddr string + authAddr string + schedulerAddr string + bootstrapKEK string + sentryPeeringHost string + coreRelayConnectorHost string + coreRelayUserHost string + + // cd relay + coreCDRelayUserHost string + coreCDRelayConnectorHost string + + kekFunc = func() ([]byte, error) { + if len(bootstrapKEK) == 0 { + return nil, errors.New("empty KEK") + } + return []byte(bootstrapKEK), nil + } ) func setup() { @@ -71,6 +112,16 @@ func setup() { viper.SetDefault(dbPasswordEnv, "admindbpassword") viper.SetDefault(devEnv, true) viper.SetDefault(configAddrENV, "localhost:7000") + viper.SetDefault(schedulerAddrENV, "localhost:5000") + viper.SetDefault(sentryPeeringHostEnv, "peering.sentry.rafay.local:10001") + viper.SetDefault(coreRelayConnectorHostEnv, "*.core-connector.relay.rafay.local:10002") + viper.SetDefault(coreRelayUserHostEnv, "*.user.relay.rafay.local:10002") + viper.SetDefault(bootstrapKEKEnv, "rafay") + viper.SetDefault(authAddrEnv, "authsrv.rcloud-admin.svc.cluster.local:50011") + viper.SetDefault(coreCDRelayUserHostEnv, "*.user.cdrelay.rafay.local:10012") + viper.SetDefault(coreCDRelayConnectorHostEnv, "*.core-connector.cdrelay.rafay.local:10012") + viper.SetDefault(sentryBootstrapEnv, "console.rafay.dev:443") + viper.SetDefault(relayImageEnv, "registry.rafay-edge.net/rafay/rafay-relay-agent:r1.10.0-24") viper.BindEnv(rpcPortEnv) viper.BindEnv(apiPortEnv) @@ -82,6 +133,16 @@ func setup() { viper.BindEnv(devEnv) viper.BindEnv(dbUserEnv) viper.BindEnv(configAddrENV) + viper.BindEnv(schedulerAddrENV) + viper.BindEnv(bootstrapKEKEnv) + viper.BindEnv(authAddrEnv) + viper.BindEnv(sentryPeeringHostEnv) + viper.BindEnv(coreRelayConnectorHostEnv) + viper.BindEnv(coreRelayUserHostEnv) + viper.BindEnv(coreCDRelayConnectorHostEnv) + viper.BindEnv(coreCDRelayUserHostEnv) + viper.BindEnv(sentryBootstrapEnv) + viper.BindEnv(relayImageEnv) rpcPort = viper.GetInt(rpcPortEnv) apiPort = viper.GetInt(apiPortEnv) @@ -92,6 +153,14 @@ func setup() { dbPassword = viper.GetString(dbPasswordEnv) dev = viper.GetBool(devEnv) configAddr = viper.GetString(configAddrENV) + schedulerAddr = viper.GetString(schedulerAddrENV) + authAddr = viper.GetString(authAddrEnv) + bootstrapKEK = viper.GetString(bootstrapKEKEnv) + sentryPeeringHost = viper.GetString(sentryPeeringHostEnv) + coreRelayConnectorHost = viper.GetString(coreRelayConnectorHostEnv) + coreRelayUserHost = viper.GetString(coreRelayUserHostEnv) + coreCDRelayConnectorHost = viper.GetString(coreCDRelayConnectorHostEnv) + coreCDRelayUserHost = viper.GetString(coreCDRelayUserHostEnv) rpcRelayPeeringPort = rpcPort + 1 @@ -109,21 +178,49 @@ func setup() { _log.Infow("printing db", "db", db) configPool = configrpc.NewConfigPool(configAddr, 5*goruntime.NumCPU()) + schedulerPool = schedulerrpc.NewSchedulerPool(schedulerAddr, 5*goruntime.NumCPU()) ps = service.NewPartnerService(db) os = service.NewOrganizationService(db) pps = service.NewProjectService(db) + + //sentry related services + bs = service.NewBootstrapService(db, schedulerPool) + krs = service.NewKubeconfigRevocationService(db) + kss = service.NewKubeconfigSettingService(db) + kcs = service.NewkubectlClusterSettingsService(db) + aps = service.NewAccountPermissionService(db) + gps = service.NewGroupPermissionService(db) + + /* TODO: to be revisited if required + apn = modelsv2.NewaccountProjectNamespaceService(db) + */ } func run() { ctx := signals.SetupSignalHandler() + replace := map[string]interface{}{ + "sentryPeeringHost": sentryPeeringHost, + "coreRelayServerHost": coreRelayConnectorHost, + "coreRelayUserHost": coreRelayUserHost, + + // cd relay + "coreCDRelayUserHost": coreCDRelayUserHost, + "coreCDRelayConnectorHost": coreCDRelayConnectorHost, + } + + _log.Infow("loading fixtures", "data", replace) + + fixtures.Load(ctx, bs, replace, kekFunc) + var wg sync.WaitGroup wg.Add(4) go runAPI(&wg, ctx) go runRPC(&wg, ctx) + go runRelayPeerRPC(&wg, ctx) go runDebug(&wg, ctx) <-ctx.Done() @@ -140,9 +237,13 @@ func runAPI(wg *sync.WaitGroup, ctx context.Context) { ctx, fmt.Sprintf(":%d", rpcPort), make([]runtime.ServeMuxOption, 0), - pbrpcv3.RegisterPartnerHandlerFromEndpoint, - pbrpcv3.RegisterOrganizationHandlerFromEndpoint, - pbrpcv3.RegisterProjectHandlerFromEndpoint, + adminrpc.RegisterPartnerHandlerFromEndpoint, + adminrpc.RegisterOrganizationHandlerFromEndpoint, + adminrpc.RegisterProjectHandlerFromEndpoint, + sentryrpc.RegisterBootstrapHandlerFromEndpoint, + sentryrpc.RegisterKubeConfigHandlerFromEndpoint, + sentryrpc.RegisterKubectlClusterSettingsHandlerFromEndpoint, + sentryrpc.RegisterClusterAuthorizationHandlerFromEndpoint, ) if err != nil { _log.Fatalw("unable to create gateway", "error", err) @@ -167,15 +268,74 @@ func runAPI(wg *sync.WaitGroup, ctx context.Context) { } } +func runRelayPeerRPC(wg *sync.WaitGroup, ctx context.Context) { + defer wg.Done() + + _log.Infow("waiting to fetch peering server creds") + time.Sleep(time.Second * 25) + cert, key, ca, err := util.GetPeeringServerCreds(context.Background(), bs, rpcPort, sentryPeeringHost) + if err != nil { + _log.Fatalw("unable to get peering server cerds", "error", err) + } + + relayPeerService, err := server.NewRelayPeerService() + if err != nil { + _log.Fatalw("unable to get create relay peer service") + } + clusterAuthzServer := server.NewClusterAuthzServer(bs, aps, gps, krs, kcs, kss, configPool) + + /* + auditInfoServer := server.NewAuditInfoServer(bs, aps) + */ + + s, err := grpc.NewSecureServerWithPEM(cert, key, ca) + if err != nil { + _log.Fatalw("cannot grpc secure server failed", "error", err) + + } + + go func() { + defer s.GracefulStop() + + <-ctx.Done() + _log.Infow("peer service stoped due to context done") + }() + + sentryrpc.RegisterRelayPeerServiceServer(s, relayPeerService) + sentryrpc.RegisterClusterAuthorizationServer(s, clusterAuthzServer) + /*sentryrpc.RegisterAuditInformationServer(s, auditInfoServer)*/ + + l, err := net.Listen("tcp", fmt.Sprintf(":%d", rpcRelayPeeringPort)) + if err != nil { + _log.Fatalw("failed to listen relay peer service port", "port", rpcRelayPeeringPort, "error", err) + return + } + + go server.RunRelaySurveyHandler(ctx.Done(), relayPeerService) + + _log.Infow("started relay rpc service ", "port", rpcRelayPeeringPort) + if err = s.Serve(l); err != nil { + _log.Fatalw("failed to serve relay peer service", "error", err) + } + +} + func runRPC(wg *sync.WaitGroup, ctx context.Context) { defer wg.Done() defer ps.Close() defer configPool.Close() + defer schedulerPool.Close() partnerServer := server.NewPartnerServer(ps) organizationServer := server.NewOrganizationServer(os) projectServer := server.NewProjectServer(pps) + bootstrapServer := server.NewBootstrapServer(bs, kekFunc, configPool) + kubeConfigServer := server.NewKubeConfigServer(bs, aps, gps, kss, krs, kekFunc) + /*auditInfoServer := rpcv2.NewAuditInfoServer(bs, aps)*/ + clusterAuthzServer := server.NewClusterAuthzServer(bs, aps, gps, krs, kcs, kss, configPool) + kubectlClusterSettingsServer := server.NewKubectlClusterSettingsServer(bs, kcs) + l, err := net.Listen("tcp", fmt.Sprintf(":%d", rpcPort)) if err != nil { _log.Fatalw("unable to start rpc listener", "error", err) @@ -196,7 +356,7 @@ func runRPC(wg *sync.WaitGroup, ctx context.Context) { interceptors.NewAuthInterceptorWithOptions(interceptors.WithDummy())), ) } - s := grpc.NewServer(opts...) + s, err := grpc.NewServer(opts...) if err != nil { _log.Fatalw("unable to create grpc server", "error", err) } @@ -208,9 +368,14 @@ func runRPC(wg *sync.WaitGroup, ctx context.Context) { _log.Infow("context done") }() - pbrpcv3.RegisterPartnerServer(s, partnerServer) - pbrpcv3.RegisterOrganizationServer(s, organizationServer) - pbrpcv3.RegisterProjectServer(s, projectServer) + adminrpc.RegisterPartnerServer(s, partnerServer) + adminrpc.RegisterOrganizationServer(s, organizationServer) + adminrpc.RegisterProjectServer(s, projectServer) + sentryrpc.RegisterBootstrapServer(s, bootstrapServer) + sentryrpc.RegisterKubeConfigServer(s, kubeConfigServer) + sentryrpc.RegisterClusterAuthorizationServer(s, clusterAuthzServer) + /*pbrpcv2.RegisterAuditInformationServer(s, auditInfoServer)*/ + sentryrpc.RegisterKubectlClusterSettingsServer(s, kubectlClusterSettingsServer) _log.Infow("starting rpc server", "port", rpcPort) err = s.Serve(l) diff --git a/components/adminsrv/pkg/sentry/authz/authz.go b/components/adminsrv/pkg/sentry/authz/authz.go new file mode 100644 index 0000000..1d57bed --- /dev/null +++ b/components/adminsrv/pkg/sentry/authz/authz.go @@ -0,0 +1,897 @@ +package authz + +import ( + "context" + "fmt" + "strconv" + "strings" + "time" + + "github.com/RafaySystems/rcloud-base/components/adminsrv/internal/constants" + "github.com/RafaySystems/rcloud-base/components/adminsrv/pkg/sentry/kubeconfig" + "github.com/RafaySystems/rcloud-base/components/adminsrv/pkg/service" + "github.com/RafaySystems/rcloud-base/components/common/pkg/controller/runtime" + "github.com/RafaySystems/rcloud-base/components/common/pkg/hasher" + "github.com/RafaySystems/rcloud-base/components/common/pkg/log" + "github.com/RafaySystems/rcloud-base/components/common/pkg/query" + configrpc "github.com/RafaySystems/rcloud-base/components/common/proto/rpc/config" + sentryrpc "github.com/RafaySystems/rcloud-base/components/common/proto/rpc/sentry" + commonv3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/commonpb/v3" + "github.com/RafaySystems/rcloud-base/components/common/proto/types/controller" + "github.com/RafaySystems/rcloud-base/components/common/proto/types/sentry" + corev1 "k8s.io/api/core/v1" + rbacv1 "k8s.io/api/rbac/v1" +) + +var _log = log.GetLogger() + +var permissions = []string{ + sentry.KubectlFullAccessPermission, + sentry.KubectlNamespaceReadPermission, + sentry.KubectlNamespaceWritePermission, + sentry.KubectlClusterReadPermission, + sentry.KubectlClusterWritePermission, +} + +var clusterScopePermissions = []string{ + sentry.KubectlClusterReadPermission, + sentry.KubectlClusterWritePermission, + sentry.KubectlFullAccessPermission, +} + +var namespaceScopePermissions = []string{ + sentry.KubectlNamespaceReadPermission, + sentry.KubectlNamespaceWritePermission, +} + +const ( + rafayRelayLabel = "rafay-relay" + relayUserLabel = "relay-user" + authzRefreshedLabel = "authz-refreshed" + systemUsername = "admin@rafay.co" +) + +type roleBindExclusionList struct { + exclude bool + namespace string +} + +func getCurrentEpoch() string { + return strconv.FormatInt(time.Now().Unix(), 10) +} + +func getAuthzLabels(userName string) map[string]string { + return map[string]string{ + rafayRelayLabel: "true", + relayUserLabel: userName, + authzRefreshedLabel: getCurrentEpoch(), + } +} + +/*TODO: pending along with namespaces +func getAccountProjectNamespace(ctx context.Context, projectID, accountID, orgID int64, apn service.AccountProjectNamespaceService) ([]string, error) { + var ns []string + + apns, err := apn.GetAccountProjectNamesapce(ctx, orgID, accountID, projectID) + if err != nil { + return nil, err + } + + for _, apn := range apns { + ns = append(ns, apn.NamespaceName) + } + + return ns, nil +} + +func getSSOAccountProjectNamespace(ctx context.Context, projectID, accountID, orgID int64, apn service.AccountProjectNamespaceService) ([]string, error) { + var ns []string + + apns, err := apn.GetSSOAccountProjectNamesapce(ctx, orgID, accountID, projectID) + if err != nil { + return nil, err + } + + for _, apn := range apns { + ns = append(ns, apn.NamespaceName) + } + + return ns, nil +} + +func getGroupAccountProjectNamespace(ctx context.Context, projectID, accountID, orgID int64, apn service.AccountProjectNamespaceService) ([]string, error) { + var ns []string + + apns, err := apn.GetGroupProjectNamesapce(ctx, orgID, accountID, projectID) + if err != nil { + return nil, err + } + + for _, apn := range apns { + ns = append(ns, apn.NamespaceName) + } + + return ns, nil +} +*/ + +func getProjectPermissions(ctx context.Context, projects []string, accountID, orgID, partnerID string, aps service.AccountPermissionService) (map[string][]string, string, error) { + projects = append(projects, "") + accountPermissions, err := aps.GetAccountPermissionsByProjectIDPermissions(ctx, accountID, orgID, partnerID, projects, permissions) + if err != nil { + return nil, "", err + } + + accountData, err := aps.GetAccount(ctx, accountID) + if err != nil { + return nil, "", err + } + + projectPermissions := make(map[string][]string) +OUTER: + for _, accountPermission := range accountPermissions { + p := accountPermission.ProjectID + if projectPermissions[p] == nil { + projectPermissions[p] = []string{} + } + for _, permission := range projectPermissions[p] { + if permission == accountPermission.PermissionName { + continue OUTER + } + } + projectPermissions[p] = append(projectPermissions[p], accountPermission.PermissionName) + } + return projectPermissions, accountData.Username, nil +} + +func getSSOProjectPermissions(ctx context.Context, projects []string, orgID, partnerID, accountID string, aps service.AccountPermissionService, gps service.GroupPermissionService) (map[string][]string, string, []string, error) { + acc, err := aps.GetAccount(ctx, accountID) + if err != nil { + return nil, "", nil, err + } + groups, err := aps.GetAccountGroups(ctx, accountID) + if err != nil { + return nil, "", nil, err + } + projects = append(projects, "") + groupPermissions, err := gps.GetGroupPermissionsByProjectIDPermissions(ctx, groups, orgID, partnerID, projects, permissions) + if err != nil { + return nil, "", nil, err + } + + projectPermissions := make(map[string][]string) +OUTER: + for _, groupPermission := range groupPermissions { + p := groupPermission.ProjectID + if projectPermissions[p] == nil { + projectPermissions[p] = []string{} + } + for _, permission := range projectPermissions[p] { + if permission == groupPermission.PermissionName { + continue OUTER + } + } + projectPermissions[p] = append(projectPermissions[p], groupPermission.PermissionName) + } + return projectPermissions, acc.Username, groups, nil +} + +func getClusterRole(permission string) (cr *rbacv1.ClusterRole, err error) { + switch permission { + case sentry.KubectlFullAccessPermission: + cr, err = GetFullAccessClusterRole() + case sentry.KubectlNamespaceWritePermission: + cr, err = GetWriteNamespaceClusterRole() + case sentry.KubectlNamespaceReadPermission: + cr, err = GetReadNamespaceClusterRole() + case sentry.KubectlClusterWritePermission: + cr, err = GetWriteClusterScopeClusterRole() + case sentry.KubectlClusterReadPermission: + cr, err = GetReadClusterScopeClusterRole() + default: + err = fmt.Errorf("permission not valid - %s", permission) + } + + if cr != nil { + + } + + return +} + +func getRole(permission string) (r *rbacv1.Role, err error) { + switch permission { + case sentry.KubectlNamespaceWritePermission: + r, err = GetWriteNamespaceRole() + case sentry.KubectlNamespaceReadPermission: + r, err = GetReadNamespaceRole() + default: + err = fmt.Errorf("permission not valid - %s", permission) + } + + return +} + +func getRoleName(nsName, permission string) string { + switch permission { + case sentry.KubectlNamespaceWritePermission: + return "rafay-ns-role-write-" + nsName + case sentry.KubectlNamespaceReadPermission: + return "rafay-ns-role-read-" + nsName + default: + _log.Infow("getRoleName invalid namespace", "permission", permission) + } + return "" +} + +func setRoleValues(r *rbacv1.Role, nsName, permission string) { + r.Name = getRoleName(nsName, permission) + r.Namespace = nsName +} + +func getClusterRoleBindingName(saName, clusterRole string) string { + return clusterRole + "-" + saName + "-cr-binding" +} + +func getClusterRoleBinding(sa *corev1.ServiceAccount, clusterRole string) *rbacv1.ClusterRoleBinding { + crb := &rbacv1.ClusterRoleBinding{} + crb.APIVersion = "rbac.authorization.k8s.io/v1" + crb.Kind = "ClusterRoleBinding" + crb.Name = getClusterRoleBindingName(sa.Name, clusterRole) + // crb.Labels = map[string]string{ + // "rafay-relay": "true", + // "relay-user": sa.Name, + // } + subject := rbacv1.Subject{} + subject.Kind = "ServiceAccount" + subject.Name = sa.Name + subject.Namespace = sa.Namespace + crb.Subjects = append(crb.Subjects, subject) + + crb.RoleRef.Kind = "ClusterRole" + crb.RoleRef.APIGroup = "rbac.authorization.k8s.io" + crb.RoleRef.Name = clusterRole + + return crb +} + +func getDeleteClusterRoleBinding(name string) *rbacv1.ClusterRoleBinding { + crb := &rbacv1.ClusterRoleBinding{} + crb.APIVersion = "rbac.authorization.k8s.io/v1" + crb.Kind = "ClusterRoleBinding" + crb.Name = name + return crb +} + +func getRoleBindingName(saName, roleName string) string { + return roleName + "-" + saName + "-r-binding" +} + +func getRoleBinding(sa *corev1.ServiceAccount, roleName, namespace string) *rbacv1.RoleBinding { + rb := &rbacv1.RoleBinding{} + rb.APIVersion = "rbac.authorization.k8s.io/v1" + rb.Kind = "RoleBinding" + rb.Name = getRoleBindingName(sa.Name, roleName) + rb.Namespace = namespace + // rb.Labels = map[string]string{ + // "rafay-relay": "true", + // "relay-user": sa.Name, + // } + subject := rbacv1.Subject{} + subject.Kind = "ServiceAccount" + subject.Name = sa.Name + subject.Namespace = sa.Namespace + rb.Subjects = append(rb.Subjects, subject) + + rb.RoleRef.Kind = "Role" + rb.RoleRef.APIGroup = "rbac.authorization.k8s.io" + rb.RoleRef.Name = roleName + + return rb +} + +func getDeleteRoleBinding(name, namespace string) *rbacv1.RoleBinding { + rb := &rbacv1.RoleBinding{} + rb.APIVersion = "rbac.authorization.k8s.io/v1" + rb.Kind = "RoleBinding" + rb.Name = name + rb.Namespace = namespace + return rb +} + +func getProjectsFromLabels(labels map[string]string) ([]string, error) { + projects := make([]string, 0) + for key := range labels { + if !strings.HasPrefix(key, "project/") { + continue + } + s := strings.Split(key, "/") + if len(s) != 2 { + continue + } + projectID, err := hasher.IDFromHash(s[1]) + if err != nil { + return nil, err + } + projects = append(projects, projectID) + } + return projects, nil +} + +// GetAuthorization returns authorization for user, cluster +// The RBAC model mapped to the existing role +// PROJECT_ADMIN: +// - Read/Write access to all cluster scoped resources +// - Read/Write access to all namespace scoped resources +// PROJECT_READ: +// - Read access to all cluster scoped resources +// - Read access to all namespace scoped resources +// INFRA_ADMIN: +// - Read/Write access to all cluster scoped resources +// - Read/Write access to all namespace scoped resources +// INFRA_READ: +// - Read access to all cluster scoped resources +// - Read access to all namespace scoped resources +// ENV_ADMIN +// - NO Access to cluster scoped resources +// - Read/Write Access to namespace scoped resources (only within the environment) +// ENV_READ +// - NO Access to cluster scoped resources +// - Read Access to namespace scoped resources (only within the environment) +func GetAuthorization(ctx context.Context, req *sentryrpc.GetUserAuthorizationRequest, bs service.BootstrapService, aps service.AccountPermissionService, gps service.GroupPermissionService, krs service.KubeconfigRevocationService, kcs service.KubectlClusterSettingsService, kss service.KubeconfigSettingService, cPool configrpc.ConfigPool) (resp *sentryrpc.GetUserAuthorizationResponse, err error) { + var userName string + var groups []string + var rolePrevilage int + var highestRole string + var enforceOrgAdminOnlySecretAccess, isOrgAdmin bool + + resp = new(sentryrpc.GetUserAuthorizationResponse) + + // get attributes from user CN + cnAttr := kubeconfig.GetCNAttributes(req.UserCN) + accountID, err := hasher.IDFromHash(cnAttr.AccountID) + if err != nil { + _log.Errorw("error getting accountID from user CN", "userCN", req.UserCN) + return nil, err + } + orgID, err := hasher.IDFromHash(cnAttr.OrganizationID) + if err != nil { + _log.Errorw("error getting orgID from user CN", "userCN", req.UserCN) + return nil, err + } + partnerID, err := hasher.IDFromHash(cnAttr.PartnerID) + if err != nil { + _log.Errorw("error getting partnerID from user CN", "userCN", req.UserCN) + return nil, err + } + + if cnAttr.SystemUser { + return getSystemUserAuthz(cnAttr) + } + + isOrgAdmin, _ = aps.IsOrgAdmin(ctx, accountID, partnerID) + + // Check user is partner / super admin to bypass cluster/user checks. + // Partner Super admins has full access. + isPartnerAdmin, isSuperAdmin, err := aps.IsPartnerSuperAdmin(ctx, accountID, partnerID) + if err != nil { + _log.Infow("Error getting partner/super admin permission info", "accountID", accountID, "orgID", orgID, "partnerID", partnerID, "error", err) + } + _log.Infow("check for partner/super admin", " isPartnerAdmin ", isPartnerAdmin, " isSuperAdmin ", isSuperAdmin) + if !isSuperAdmin && !isPartnerAdmin { + existUserLevel := true + // get org level setting if exist + ksOrg, errOrg := kss.Get(ctx, orgID, "", cnAttr.IsSSO) + if errOrg != nil && errOrg != constants.ErrNotFound { + _log.Errorw("failed to fetch organization level kubectl settings for", "userCN", req.UserCN) + return nil, errOrg + } + if errOrg == nil && ksOrg != nil { + // check for kubectl org settings + err = verifyKubectlSettings(cnAttr, ksOrg, "organization") + if err != nil { + _log.Errorw("kubectl denied as per org level kubectl settings for", "userCN", req.UserCN) + return nil, err + } + enforceOrgAdminOnlySecretAccess = ksOrg.EnforceOrgAdminSecretAccess + } + + // check for kubectl cluster settings + err = verifyClusterKubectlSettings(ctx, bs, kcs, cnAttr, req.ClusterID, orgID) + if err != nil { + _log.Errorw("failed to verify kubectl cluster settings for", "userCN", req.UserCN) + return nil, err + } + + // get user level settings if exist + ks, errUser := kss.Get(ctx, orgID, accountID, cnAttr.IsSSO) + if errUser == constants.ErrNotFound { + existUserLevel = false + // set org settings if exist + errUser = errOrg + ks = ksOrg + } else if errUser != nil && errUser != constants.ErrNotFound { + return nil, errUser + } + + if existUserLevel && ks != nil { + // check for kubectl user settings + errVerify := verifyKubectlSettings(cnAttr, ks, "user") + if errVerify != nil { + _log.Errorw("kubectl denied as per user level kubectl settings for", "userCN", req.UserCN) + return nil, errVerify + } + } + + if errUser == nil && ks != nil && ks.EnableSessionCheck { + // check the last login timestamp + var lastLogin time.Time + if cnAttr.IsSSO { + accountData, err := aps.GetAccount(ctx, accountID) + if err != nil { + return nil, err + } + lastLogin = accountData.LastLogin + } else { + accountData, err := aps.GetAccount(ctx, accountID) + if err != nil { + return nil, err + } + lastLogin = accountData.LastLogin + } + t1 := time.Now() + if t1.Sub(lastLogin) > time.Hour*12 { + _log.Infow("get kubectl authorization block access. user did not login to portal in last 12 Hour") + return nil, fmt.Errorf("enforce session enabled. user did not login to portal in last 12 Hour") + } + } + + // is user active + if !cnAttr.IsSSO { + active, err := aps.IsAccountActive(ctx, accountID, orgID) + if err != nil { + return nil, err + } + if !active { + return nil, fmt.Errorf("Error: kubeconfig user deactivated") + } + } + + // get revocation timestamp + kr, err := krs.Get(ctx, orgID, accountID, cnAttr.IsSSO) + if err != nil && err != constants.ErrNotFound { + return nil, err + } else if err == nil && kr.RevokedAt.AsTime().Unix() >= req.CertIssueSeconds { + return nil, fmt.Errorf("Error: kubeconfig revoked") + } + } + + opts := commonv3.QueryOptions{ + Name: req.ClusterID, + Organization: orgID, + Partner: partnerID, + } + bal, err := bs.GetBootstrapAgents(ctx, "-", + query.WithOptions(&opts), + // ignore project id because kubeconfig is not project scoped + query.WithIgnoreScopeDefault(), + ) + if err != nil { + return nil, err + } + if bal.Metadata.Count <= 0 { + return nil, fmt.Errorf("no bootstrap agents found") + } + ba := bal.Items[0] + labels := ba.Metadata.GetLabels() + + // get projects + projects, err := getProjectsFromLabels(labels) + if err != nil { + _log.Errorw("error getting projects from bootstrap agents labels", "labels", labels, "error", err.Error()) + return nil, err + } + + // get permissions in the cluster's projects + var projectPermissions map[string][]string + if !cnAttr.IsSSO { + projectPermissions, userName, err = getProjectPermissions(ctx, projects, accountID, orgID, partnerID, aps) + } else { + projectPermissions, userName, groups, err = getSSOProjectPermissions(ctx, projects, orgID, partnerID, accountID, aps, gps) + } + if err != nil { + _log.Errorw("error getting project permission", "projects", projects, "userCN", req.UserCN, "error", err.Error()) + return nil, err + } + + // get sa, clusterroles, roles, bindings + sa := &corev1.ServiceAccount{} + sa.APIVersion = "v1" + sa.Kind = "ServiceAccount" + sa.Name = cnAttr.Username + sa.Namespace = "rafay-system" + + crMap := make(map[string]*rbacv1.ClusterRole) + crbMap := make(map[string]*rbacv1.ClusterRoleBinding) + rMap := make(map[string]*rbacv1.Role) + rbMap := make(map[string]*rbacv1.RoleBinding) + nsMap := make(map[string]*corev1.Namespace) + crbExclusionMap := make(map[string]bool) + rbExclusionMap := make(map[string]*roleBindExclusionList) + + projectNamespaces := make([]string, 0) + /*TODO: pending with namespaces + projectNamespaces, err := func() ([]string, error) { + var nsl []string + configClient, err := cPool.NewClient(ctx) + if err != nil { + err = errors.Wrap(err, "unable to get config client") + return nil, err + } + defer configClient.Close() + + for _, project := range projects { + namespaces, err := configClient.GetNamespaces(ctx, &configrpc.GetAllNamespacesRequest{ + QueryOptions: commonv3.QueryOptions{ + Project: project, + Organization: orgID, + Partner: partnerID, + }, + }) + + if err == nil { + _log.Debugw("Get namespaces ", "orgID", orgID, "partnerID", partnerID, "project", project, "namespaces", namespaces.Items, "itemslen", len(namespaces.Items)) + for _, namespace := range namespaces.Items { + nsl = append(nsl, namespace.Name) + } + } + } + return nsl, nil + }() + + if err != nil { + _log.Infow("unable to get project namespaces", "error", err) + return nil, err + } + + _log.Debugw("projectNamespaces", "names", projectNamespaces) + */ + + for _, pm := range sentry.GetKubeConfigClusterPermissions() { + cr, err := getClusterRole(pm) + if err != nil { + continue + } + crbName := getClusterRoleBindingName(sa.Name, cr.Name) + crbExclusionMap[crbName] = true + } + + for _, pm := range sentry.GetKubeConfigNameSpacePermissions() { + if len(projectNamespaces) > 0 { + for _, nsName := range projectNamespaces { + roleName := getRoleName(nsName, pm) + rbName := getRoleBindingName(sa.Name, roleName) + rbExclusionMap[rbName] = &roleBindExclusionList{true, nsName} + } + } + } + + rolePrevilage = -1 + for project, permissions := range projectPermissions { + var namespaces []string + _log.Infow("authorization", "project", project, "user", sa.Name, "permissions", permissions) + groups = append(groups, permissions...) + /* TODO: pending with namespaces + // need to get the namesapces assigned to this user. + if !cnAttr.IsSSO { + ns1, _ := getAccountProjectNamespace(ctx, project, accountID, orgID, apn) + ns2, _ := getGroupAccountProjectNamespace(ctx, project, accountID, orgID, apn) + if len(ns1) > 0 { + namespaces = append(namespaces, ns1...) + } + if len(ns2) > 0 { + namespaces = append(namespaces, ns2...) + } + _log.Infow("namespaces", "project", project, "accountID", accountID, "orgID", orgID, "namespaces", namespaces) + } else { + namespaces, _ = getSSOAccountProjectNamespace(ctx, project, accountID, orgID, apn) + _log.Infow("namespacesSSO", "project", project, "accountID", accountID, "orgID", orgID, "namespaces", namespaces) + } + */ + // org scope + if project == "" { + for _, permission := range permissions { + cr, err := getClusterRole(permission) + if err != nil { + return nil, err + } + + rp := sentry.GetKubeConfigPermissionPrivilage(permission) + if rp > rolePrevilage { + rolePrevilage = rp + highestRole = permission + } + + crb := getClusterRoleBinding(sa, cr.Name) + crMap[cr.Name] = cr + crbMap[crb.Name] = crb + crbExclusionMap[crb.Name] = false + } + break + } + for _, permission := range permissions { + + rp := sentry.GetKubeConfigPermissionPrivilage(permission) + if rp > rolePrevilage { + rolePrevilage = rp + highestRole = permission + } + + if isClusterScopePermission(permission) { + cr, err := getClusterRole(permission) + if err != nil { + return nil, err + } + crb := getClusterRoleBinding(sa, cr.Name) + crMap[cr.Name] = cr + crbMap[crb.Name] = crb + crbExclusionMap[crb.Name] = false + } else if isNamespaceScopePermission(permission) { + for _, namespace := range namespaces { + ns, err := GetNamespace() + if err != nil { + return nil, err + } + ns.Name = namespace + nsMap[namespace] = ns + + r, err := getRole(permission) + if err != nil { + return nil, err + } + setRoleValues(r, namespace, permission) + rb := getRoleBinding(sa, r.Name, namespace) + rMap[r.Name] = r + rbMap[rb.Name] = rb + rbExclusionMap[rb.Name] = &roleBindExclusionList{false, namespace} + } + } + } + + } + + // add authz labels + authzLabels := getAuthzLabels(cnAttr.Username) + + sa.Labels = authzLabels + for k := range crMap { + crMap[k].Labels = authzLabels + } + for k := range crbMap { + crbMap[k].Labels = authzLabels + } + + for k := range rMap { + rMap[k].Labels = authzLabels + } + for k := range rbMap { + rbMap[k].Labels = authzLabels + } + + // convert to step objects + saObject, err := runtime.FromObject(sa) + if err != nil { + return nil, err + } + resp.ServiceAccount = saObject + + for _, cr := range crMap { + crObject, err := runtime.FromObject(cr) + if err != nil { + return nil, err + } + resp.ClusterRoles = append(resp.ClusterRoles, crObject) + } + + for _, crb := range crbMap { + crbObject, err := runtime.FromObject(crb) + if err != nil { + return nil, err + } + resp.ClusterRoleBindings = append(resp.ClusterRoleBindings, crbObject) + } + + for _, r := range rMap { + rObject, err := runtime.FromObject(r) + if err != nil { + return nil, err + } + resp.Roles = append(resp.Roles, rObject) + } + + for _, ns := range nsMap { + nObject, err := runtime.FromObject(ns) + if err != nil { + return nil, err + } + resp.Namespaces = append(resp.Namespaces, nObject) + } + + for _, rb := range rbMap { + rbObject, err := runtime.FromObject(rb) + if err != nil { + return nil, err + } + resp.RoleBindings = append(resp.RoleBindings, rbObject) + } + + for dcrbName, val := range crbExclusionMap { + if val { + crbObject, err := runtime.FromObject(getDeleteClusterRoleBinding(dcrbName)) + if err == nil { + resp.DeleteClusterRoleBindings = append(resp.DeleteClusterRoleBindings, crbObject) + } + } + } + + for drbName, val := range rbExclusionMap { + if val.exclude { + rbObject, err := runtime.FromObject(getDeleteRoleBinding(drbName, val.namespace)) + if err == nil { + resp.DeleteRoleBindings = append(resp.DeleteRoleBindings, rbObject) + } + } + } + + resp.UserName = cnAttr.Username + resp.RoleName = highestRole + resp.IsRead = sentry.GetKubeConfigPermissionIsRead(highestRole) + resp.EnforceOrgAdminOnlySecretAccess = enforceOrgAdminOnlySecretAccess + resp.IsOrgAdmin = isOrgAdmin + + //to be removed along with events + _log.Infow("username", userName) + /*TODO: pending with events + // system audit log event to notify success authz + clusterName := labels["rafay.dev/clusterName"] + kubectlAuthzEvent("user.login.success", req.ClusterID, clusterName, cnAttr.OrganizationID, cnAttr.PartnerID, userName, cnAttr.AccountID, groups) + */ + + return resp, nil +} + +func getSystemUserAuthz(cnAttrs kubeconfig.CNAttributes) (resp *sentryrpc.GetUserAuthorizationResponse, err error) { + resp = new(sentryrpc.GetUserAuthorizationResponse) + + authzLabels := getAuthzLabels(cnAttrs.Username) + sa := &corev1.ServiceAccount{} + sa.APIVersion = "v1" + sa.Kind = "ServiceAccount" + sa.Name = cnAttrs.Username + sa.Namespace = "rafay-system" + sa.Labels = authzLabels + + cr, err := getClusterRole(sentry.KubectlFullAccessPermission) + if err != nil { + return nil, err + } + cr.Labels = authzLabels + crb := getClusterRoleBinding(sa, cr.Name) + crb.Labels = authzLabels + + saObject, err := runtime.FromObject(sa) + if err != nil { + return nil, err + } + + crObject, err := runtime.FromObject(cr) + if err != nil { + return nil, err + } + + crbObject, err := runtime.FromObject(crb) + if err != nil { + return nil, err + } + + resp.UserName = cnAttrs.Username + resp.ServiceAccount = saObject + resp.ClusterRoles = []*controller.StepObject{crObject} + resp.ClusterRoleBindings = []*controller.StepObject{crbObject} + return +} + +func isClusterScopePermission(permission string) bool { + for _, p := range clusterScopePermissions { + if permission == p { + return true + } + } + return false +} + +func isNamespaceScopePermission(permission string) bool { + for _, p := range namespaceScopePermissions { + if permission == p { + return true + } + } + return false +} + +func verifyClusterKubectlSettings(ctx context.Context, bs service.BootstrapService, kcs service.KubectlClusterSettingsService, cnAttr kubeconfig.CNAttributes, clusterID string, orgID string) error { + if cnAttr.SessionType == kubeconfig.RafaySystem { + // internal system sessions are always allowed + return nil + } + + _, err := bs.GetBootstrapAgentCountForClusterID(ctx, clusterID, orgID) + if err != nil { + _log.Infow("verify cluster kubectl settings invalid clusterid or orgid", "cluster", clusterID, "orgID", orgID) + return err + } + + /* + if cnAttr.RelayNetwork { + _log.Debugw("skip verify cluster kubectl settings for relaynetwork sessions") + return nil // allow + } + */ + + kc, err := kcs.Get(ctx, orgID, clusterID) + if err == constants.ErrNotFound { + // no settings found, hence there is no restriction. + return nil //allow + } else if err != nil { + return err + } + + if cnAttr.SessionType == "" || cnAttr.SessionType == kubeconfig.TerminalShell { + // backward combatibility treat "" as terminal session for old kubeconfigs + if kc.DisableCLIKubectl { + _log.Infow("kubectl cli is not authorized for ", "cnAttr", cnAttr) + return fmt.Errorf("kubectl cli is not authorized") //deny + } + return nil // allow + } + + if cnAttr.SessionType == kubeconfig.WebShell { + if kc.DisableWebKubectl { + _log.Infow("browser based kubectl is not authorized for ", "cnAttr", cnAttr) + return fmt.Errorf("browser based kubectl is not authorized") //deny + } + return nil // allow + } + + _log.Infow("unknown kubectl ", "SessionType", cnAttr.SessionType) + + return fmt.Errorf("unknown kubectl session type is not authorized") +} + +func verifyKubectlSettings(cnAttr kubeconfig.CNAttributes, ks *sentry.KubeconfigSetting, level string) error { + if cnAttr.SessionType == kubeconfig.RafaySystem { + // internal system sessions are always allowed + return nil + } + + if cnAttr.SessionType == "" || cnAttr.SessionType == kubeconfig.TerminalShell { + // backward combatibility treat "" as terminal session for old kubeconfigs + if ks.DisableCLIKubectl { + _log.Infow("kubectl cli is not authorized for ", "cnAttr", cnAttr, " by ", level, "config") + return fmt.Errorf("kubectl cli is not authorized" + " by " + level + "config") //deny + } + return nil // allow + } + + if cnAttr.SessionType == kubeconfig.WebShell { + if ks.DisableWebKubectl { + _log.Infow("browser based kubectl is not authorized for ", "cnAttr", cnAttr, " by ", level, "config") + return fmt.Errorf("browser based kubectl is not authorized" + " by " + level + "config") //deny + } + return nil // allow + } + + _log.Infow("unknown kubectl ", "SessionType", cnAttr.SessionType) + + return fmt.Errorf("unknown kubectl session type is not authorized") +} diff --git a/components/adminsrv/pkg/sentry/authz/data/cluster_role_cluster_read.yaml b/components/adminsrv/pkg/sentry/authz/data/cluster_role_cluster_read.yaml new file mode 100644 index 0000000..6904eb4 --- /dev/null +++ b/components/adminsrv/pkg/sentry/authz/data/cluster_role_cluster_read.yaml @@ -0,0 +1,12 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: cluster-scope-read-cluster-role + labels: + rafay-relay: "true" +rules: +- apiGroups: ["*"] + resources: ["*"] + verbs: ["get", "list", "watch"] +- nonResourceURLs: ["*"] + verbs: ["get"] diff --git a/components/adminsrv/pkg/sentry/authz/data/cluster_role_cluster_write.yaml b/components/adminsrv/pkg/sentry/authz/data/cluster_role_cluster_write.yaml new file mode 100644 index 0000000..b4dbcdb --- /dev/null +++ b/components/adminsrv/pkg/sentry/authz/data/cluster_role_cluster_write.yaml @@ -0,0 +1,12 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: cluster-scope-write-cluster-role + labels: + rafay-relay: "true" +rules: +- apiGroups: ["*"] + resources: ["*"] + verbs: ["*"] +- nonResourceURLs: ["*"] + verbs: ["*"] diff --git a/components/adminsrv/pkg/sentry/authz/data/cluster_role_full_access.yaml b/components/adminsrv/pkg/sentry/authz/data/cluster_role_full_access.yaml new file mode 100644 index 0000000..cbf638a --- /dev/null +++ b/components/adminsrv/pkg/sentry/authz/data/cluster_role_full_access.yaml @@ -0,0 +1,12 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: full-access-cluster-role + labels: + rafay-relay: "true" +rules: +- apiGroups: ["*"] + resources: ["*"] + verbs: ["*"] +- nonResourceURLs: ["*"] + verbs: ["*"] diff --git a/components/adminsrv/pkg/sentry/authz/data/cluster_role_namespace_read.yaml b/components/adminsrv/pkg/sentry/authz/data/cluster_role_namespace_read.yaml new file mode 100644 index 0000000..1d4b758 --- /dev/null +++ b/components/adminsrv/pkg/sentry/authz/data/cluster_role_namespace_read.yaml @@ -0,0 +1,12 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: read-access-cluster-role + labels: + rafay-relay: "true" +rules: +- apiGroups: ["*"] + resources: ["*"] + verbs: ["get", "list", "watch"] +- nonResourceURLs: ["*"] + verbs: ["get"] diff --git a/components/adminsrv/pkg/sentry/authz/data/cluster_role_namespace_write.yaml b/components/adminsrv/pkg/sentry/authz/data/cluster_role_namespace_write.yaml new file mode 100644 index 0000000..37e95ff --- /dev/null +++ b/components/adminsrv/pkg/sentry/authz/data/cluster_role_namespace_write.yaml @@ -0,0 +1,12 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: write-access-cluster-role + labels: + rafay-relay: "true" +rules: +- apiGroups: ["*"] + resources: ["*"] + verbs: ["create", "delete", "patch", "update"] +- nonResourceURLs: ["*"] + verbs: ["post", "put", "patch", "delete"] diff --git a/components/adminsrv/pkg/sentry/authz/data/namespace.yaml b/components/adminsrv/pkg/sentry/authz/data/namespace.yaml new file mode 100644 index 0000000..01695fe --- /dev/null +++ b/components/adminsrv/pkg/sentry/authz/data/namespace.yaml @@ -0,0 +1,6 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: namespace-name + labels: + rafay-relay: "true" diff --git a/components/adminsrv/pkg/sentry/authz/data/relay_default_cluster_role.yaml b/components/adminsrv/pkg/sentry/authz/data/relay_default_cluster_role.yaml new file mode 100644 index 0000000..148cb24 --- /dev/null +++ b/components/adminsrv/pkg/sentry/authz/data/relay_default_cluster_role.yaml @@ -0,0 +1,15 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: relay-default-cluster-role +rules: +- apiGroups: + - '*' + resources: + - '*' + verbs: + - '*' +- nonResourceURLs: + - '*' + verbs: + - '*' diff --git a/components/adminsrv/pkg/sentry/authz/data/relay_default_role.yaml b/components/adminsrv/pkg/sentry/authz/data/relay_default_role.yaml new file mode 100644 index 0000000..394464c --- /dev/null +++ b/components/adminsrv/pkg/sentry/authz/data/relay_default_role.yaml @@ -0,0 +1,11 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: relay-role +rules: +- apiGroups: + - '*' + resources: + - '*' + verbs: + - '*' diff --git a/components/adminsrv/pkg/sentry/authz/data/role_read_access.yaml b/components/adminsrv/pkg/sentry/authz/data/role_read_access.yaml new file mode 100644 index 0000000..4c7b5e8 --- /dev/null +++ b/components/adminsrv/pkg/sentry/authz/data/role_read_access.yaml @@ -0,0 +1,10 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: read-access-role + labels: + rafay-relay: "true" +rules: +- apiGroups: ["*"] + resources: ["*"] + verbs: ["get", "list", "watch"] diff --git a/components/adminsrv/pkg/sentry/authz/data/role_write_access.yaml b/components/adminsrv/pkg/sentry/authz/data/role_write_access.yaml new file mode 100644 index 0000000..3c5780d --- /dev/null +++ b/components/adminsrv/pkg/sentry/authz/data/role_write_access.yaml @@ -0,0 +1,10 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: write-access-role + labels: + rafay-relay: "true" +rules: +- apiGroups: ["*"] + resources: ["*"] + verbs: ["*"] \ No newline at end of file diff --git a/components/adminsrv/pkg/sentry/authz/defaults.go b/components/adminsrv/pkg/sentry/authz/defaults.go new file mode 100644 index 0000000..9401db3 --- /dev/null +++ b/components/adminsrv/pkg/sentry/authz/defaults.go @@ -0,0 +1,290 @@ +// Code generated by vfsgen; DO NOT EDIT. + +package authz + +import ( + "bytes" + "compress/gzip" + "fmt" + "io" + "io/ioutil" + "net/http" + "os" + pathpkg "path" + "time" +) + +// defaults statically implements the virtual filesystem provided to vfsgen. +var defaults = func() http.FileSystem { + fs := vfsgenÛ°FS{ + "/": &vfsgenÛ°DirInfo{ + name: "/", + modTime: time.Date(2021, 11, 29, 20, 16, 39, 227583853, time.UTC), + }, + "/cluster_role_cluster_read.yaml": &vfsgenÛ°CompressedFileInfo{ + name: "cluster_role_cluster_read.yaml", + modTime: time.Date(2020, 7, 22, 2, 57, 32, 903625078, time.UTC), + uncompressedSize: 264, + + compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x02\xff\x74\xcb\xb1\x4a\x04\x31\x10\xc6\xf1\x3e\x4f\xf1\x91\x52\xcc\x8a\x9d\xa4\xb5\xb0\xb1\x5a\xd0\x46\xb6\x98\xcd\x8e\x5e\xb8\x5c\x26\xcc\x24\x27\xe7\xd3\xcb\x9d\x0a\x36\x57\x0d\xf3\xff\xf8\x51\xcb\xaf\xac\x96\xa5\x46\xe8\x4a\x69\xa2\xd1\x77\xa2\xf9\x8b\x7a\x96\x3a\xed\x1f\x6c\xca\x72\x77\xbc\x77\xfb\x5c\xb7\x88\xc7\x32\xac\xb3\xce\x52\xd8\x1d\xb8\xd3\x46\x9d\xa2\x03\x2a\x1d\x38\x22\xfd\xac\xc1\x92\x34\x0e\xca\xb4\x85\xbf\xa4\x67\x01\x14\x5a\xb9\xd8\x59\x00\x4a\xef\x74\x0a\xca\x85\x4e\x11\xbe\xeb\x60\xef\x74\x14\xb6\xe8\x02\xa8\xe5\x27\x95\xd1\x2c\xe2\xcd\xdf\xf8\xc5\x01\xca\x26\x43\x13\xff\x4b\x47\xd6\xf5\xf2\x7e\x70\xf7\xb7\xf0\x25\xdb\xe5\x7e\x52\x4f\x3b\xbf\xb8\x80\x2a\x75\xfe\x75\x2f\xf3\xf3\x35\xba\xb8\xef\x00\x00\x00\xff\xff\xcd\x64\x2e\x25\x08\x01\x00\x00"), + }, + "/cluster_role_cluster_write.yaml": &vfsgenÛ°CompressedFileInfo{ + name: "cluster_role_cluster_write.yaml", + modTime: time.Date(2020, 7, 22, 2, 57, 32, 905274906, time.UTC), + uncompressedSize: 244, + + compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x02\xff\x74\x8b\xbd\x4e\xc5\x30\x0c\x46\xf7\x3c\x85\x95\x11\x29\x45\x6c\x28\x2b\x03\x0b\x53\x25\x58\x10\x83\x9b\x1a\x61\x35\x8d\x23\x3b\x29\x2a\x4f\x8f\xaa\xfb\xa3\xbb\xdc\xf1\x3b\xdf\x39\x58\xf9\x83\xd4\x58\x4a\x04\x9d\x30\x0d\xd8\xdb\x8f\x28\xff\x61\x63\x29\xc3\xf2\x6c\x03\xcb\xe3\xf6\xe4\x16\x2e\x73\x84\x97\xdc\xad\x91\x8e\x92\xc9\xad\xd4\x70\xc6\x86\xd1\x01\x14\x5c\x29\x42\x3a\xbd\xc1\x92\x54\x0a\xbf\xca\x8d\xc2\x85\xe9\x91\x00\x64\x9c\x28\xdb\x91\x00\x28\x7e\xe3\x1e\x94\x32\xee\x11\x7c\xd3\x4e\xde\x69\xcf\x64\xd1\x05\xc0\xca\xaf\x2a\xbd\x5a\x84\x4f\xff\xe0\xbf\x1c\x80\x92\x49\xd7\x44\x37\x68\x23\x9d\xae\x33\x40\x91\x32\x9e\xa5\xf7\xf1\xed\x9e\xf7\x1f\x00\x00\xff\xff\x95\xf6\xc7\xe6\xf4\x00\x00\x00"), + }, + "/cluster_role_full_access.yaml": &vfsgenÛ°CompressedFileInfo{ + name: "cluster_role_full_access.yaml", + modTime: time.Date(2020, 7, 22, 2, 57, 32, 905556892, time.UTC), + uncompressedSize: 236, + + compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x02\xff\x74\xca\xb1\x6a\xc3\x30\x10\x80\xe1\x5d\x4f\x71\x68\x2c\xc8\xa5\x5b\xd1\xda\xa1\x4b\x27\x43\xbb\x94\x0c\x67\xf9\x4c\x84\xcf\x3a\x73\x27\x19\x9c\xa7\x0f\x26\x21\x64\xc9\xf8\xff\x7c\xb8\xe6\x3f\x52\xcb\x52\x22\xe8\x80\xa9\xc3\x56\xcf\xa2\xf9\x82\x35\x4b\xe9\xe6\x4f\xeb\xb2\xbc\x6f\x1f\x6e\xce\x65\x8c\xf0\xc5\xcd\x2a\x69\x2f\x4c\x6e\xa1\x8a\x23\x56\x8c\x0e\xa0\xe0\x42\x11\xa6\xc6\x1c\x30\x25\x32\x0b\xe9\x26\x83\x1e\x14\x80\x71\x20\xb6\x83\x02\x28\x4e\xb8\x07\x25\xc6\x3d\x82\xaf\xda\xc8\x3b\x6d\x4c\x16\x5d\x00\x5c\xf3\xb7\x4a\x5b\x2d\xc2\xbf\x7f\xf3\x27\x07\xa0\x64\xd2\x34\xd1\xd3\xda\x48\x87\x47\x06\x28\x52\xfa\x3b\xfa\xed\x7f\x5e\xb9\x6b\x00\x00\x00\xff\xff\xf5\x6f\xf5\x6c\xec\x00\x00\x00"), + }, + "/cluster_role_namespace_read.yaml": &vfsgenÛ°CompressedFileInfo{ + name: "cluster_role_namespace_read.yaml", + modTime: time.Date(2020, 7, 22, 2, 57, 32, 905819499, time.UTC), + uncompressedSize: 257, + + compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x02\xff\x74\xcb\xb1\x4e\xc4\x30\x0c\xc6\xf1\x3d\x4f\x61\x65\x44\xa4\x88\x0d\x65\x65\x60\x61\xaa\x04\x0b\xea\xf0\x35\x35\x5c\x74\xb9\xa4\xb2\x9d\x43\xe5\xe9\x51\x0b\x03\x0b\x93\xe5\x4f\xbf\x3f\xd6\xfc\xca\xa2\xb9\xd5\x48\x32\x23\x0d\xe8\x76\x6a\x92\xbf\x60\xb9\xd5\xe1\xfc\xa0\x43\x6e\x77\xd7\x7b\x77\xce\x75\x89\xf4\x58\xba\x1a\xcb\xd8\x0a\xbb\x0b\x1b\x16\x18\xa2\x23\xaa\xb8\x70\x24\x61\x2c\x01\x29\xb1\x6a\x48\x3f\x32\xc8\x4e\x89\x0a\x66\x2e\xba\x53\x22\xc1\x3b\xb6\x20\x5c\xb0\x45\xf2\x26\x9d\xbd\x93\x5e\x58\xa3\x0b\x84\x35\x3f\x49\xeb\xab\x46\x7a\xf3\x37\x7e\x72\x44\xc2\xda\xba\x24\xfe\x33\x5d\x59\xe6\xe3\xfd\x60\xf3\xb7\xe4\x4b\xd6\xe3\x7e\xc2\xd2\xc9\x4f\x2e\x50\x6d\x75\xfc\xed\x5e\xc6\xe7\xff\xd2\xc9\x7d\x07\x00\x00\xff\xff\x36\x06\xdc\xb3\x01\x01\x00\x00"), + }, + "/cluster_role_namespace_write.yaml": &vfsgenÛ°CompressedFileInfo{ + name: "cluster_role_namespace_write.yaml", + modTime: time.Date(2020, 7, 22, 2, 57, 32, 906055956, time.UTC), + uncompressedSize: 300, + + compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x02\xff\x6c\x8c\x31\x4f\x03\x31\x0c\x46\xf7\xfc\x0a\x2b\x23\x22\x45\x6c\x28\x2b\x03\x0b\xd3\x49\xb0\xa0\x1b\x7c\xb9\x0f\x35\x6a\x9a\x44\xb6\x53\x54\x7e\x3d\xba\xb6\x03\x48\x6c\xcf\xf6\xf3\xe3\x9e\xdf\x21\x9a\x5b\x8d\x24\x0b\xa7\x1d\x0f\xdb\x37\xc9\xdf\x6c\xb9\xd5\xdd\xe1\x49\x77\xb9\x3d\x9c\x1e\xdd\x21\xd7\x35\xd2\x73\x19\x6a\x90\xa9\x15\xb8\x23\x8c\x57\x36\x8e\x8e\xa8\xf2\x11\x91\xbe\x24\x1b\x02\xa7\x04\xd5\x90\xae\x6a\x90\xcd\x25\x2a\xbc\xa0\xe8\xe6\x12\x09\x7f\xf2\x39\x08\x0a\x9f\x23\x79\x93\x01\xef\x64\x14\x68\x74\x81\xb8\xe7\x17\x69\xa3\x6b\xa4\x0f\x7f\xe7\x67\x47\x24\xd0\x36\x24\xe1\xd7\xea\x04\x59\x2e\x63\x12\xb0\xc1\xdf\x93\x5f\x51\x70\xa5\xce\x96\xf6\x1b\x8c\xbe\x6e\xc7\xd9\x05\xaa\xad\x4e\xb7\xcc\xdb\xf4\xfa\x5f\xa9\x37\xb5\xcb\xf7\xb0\x3f\x91\x5b\x77\x76\x3f\x01\x00\x00\xff\xff\xab\xb5\xff\xa9\x2c\x01\x00\x00"), + }, + "/namespace.yaml": &vfsgenÛ°FileInfo{ + name: "namespace.yaml", + modTime: time.Date(2021, 11, 29, 20, 16, 39, 227289738, time.UTC), + content: []byte("\x61\x70\x69\x56\x65\x72\x73\x69\x6f\x6e\x3a\x20\x76\x31\x0a\x6b\x69\x6e\x64\x3a\x20\x4e\x61\x6d\x65\x73\x70\x61\x63\x65\x0a\x6d\x65\x74\x61\x64\x61\x74\x61\x3a\x0a\x20\x20\x6e\x61\x6d\x65\x3a\x20\x6e\x61\x6d\x65\x73\x70\x61\x63\x65\x2d\x6e\x61\x6d\x65\x0a\x20\x20\x6c\x61\x62\x65\x6c\x73\x3a\x0a\x20\x20\x20\x20\x72\x61\x66\x61\x79\x2d\x72\x65\x6c\x61\x79\x3a\x20\x22\x74\x72\x75\x65\x22\x0a"), + }, + "/relay_default_cluster_role.yaml": &vfsgenÛ°CompressedFileInfo{ + name: "relay_default_cluster_role.yaml", + modTime: time.Date(2020, 7, 22, 2, 57, 32, 912451614, time.UTC), + uncompressedSize: 214, + + compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x02\xff\x7c\xcb\x31\xcb\xc2\x40\x0c\x80\xe1\xfd\x7e\x45\xb6\xc2\x07\xd7\x0f\x37\xb9\xd5\xc1\xc5\xa9\xa0\x7b\xda\x46\x0c\xbd\x5e\x4a\x2e\x29\xe8\xaf\x97\xa2\x83\x2e\xae\x2f\xcf\x8b\x0b\x5f\x48\x2b\x4b\x49\xa0\x3d\x0e\x2d\xba\xdd\x44\xf9\x81\xc6\x52\xda\x69\x5f\x5b\x96\xff\x75\x17\x26\x2e\x63\x82\x43\xf6\x6a\xa4\x9d\x64\x0a\x33\x19\x8e\x68\x98\x02\x40\xc1\x99\x12\x28\x65\xbc\xc7\x91\xae\xe8\xd9\xe2\xf0\xb2\x51\x37\xac\x9e\xa9\xa6\x10\x01\x17\x3e\xaa\xf8\x52\xb7\x2d\x42\xf3\xd7\x04\x00\xa5\x2a\xae\x03\x7d\xc5\x95\xb4\xff\x08\x11\x8a\x94\xee\x0d\xcf\xdd\xe9\x97\x7d\x06\x00\x00\xff\xff\xfb\x9f\x23\x09\xd6\x00\x00\x00"), + }, + "/relay_default_role.yaml": &vfsgenÛ°CompressedFileInfo{ + name: "relay_default_role.yaml", + modTime: time.Date(2020, 7, 22, 2, 57, 32, 912707605, time.UTC), + uncompressedSize: 154, + + compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x02\xff\x54\xca\xb1\x0a\xc2\x30\x10\x87\xf1\x3d\x4f\x71\x5b\x41\x68\xc4\x4d\xb2\x3a\xb8\x3b\xb8\x5f\xdb\x03\x8f\xa6\xb9\xf0\xbf\xa4\xa0\x4f\x2f\xdd\x74\xfd\x7d\x1f\x57\x7d\x0a\x5c\xad\x24\xc2\xc4\x73\xe4\xde\x5e\x06\xfd\x70\x53\x2b\x71\xbd\x7a\x54\x3b\xef\x97\xb0\x6a\x59\x12\xdd\x72\xf7\x26\x78\x58\x96\xb0\x49\xe3\x85\x1b\xa7\x40\x54\x78\x93\x44\x90\xcc\xef\x11\x47\x44\xcf\xe2\x29\x8c\xc4\x55\xef\xb0\x5e\xfd\xd8\x46\x1a\x4e\x43\x20\x82\xb8\x75\xcc\xf2\x87\xbb\x60\xfa\x81\x6f\x00\x00\x00\xff\xff\x56\x5a\x2c\x8e\x9a\x00\x00\x00"), + }, + "/role_read_access.yaml": &vfsgenÛ°CompressedFileInfo{ + name: "role_read_access.yaml", + modTime: time.Date(2020, 7, 22, 2, 57, 32, 912977857, time.UTC), + uncompressedSize: 200, + + compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x02\xff\x4c\xca\x31\x4e\xc5\x30\x10\x84\xe1\xde\xa7\x58\xb9\x44\x38\x88\x0e\xf9\x02\xf4\x14\x34\x28\xc5\xc4\x59\xc8\x2a\x8e\x1d\xed\xda\x41\xe1\xf4\x28\xa9\x5e\x35\x9a\x5f\x1f\x76\xf9\x64\x35\xa9\x25\x92\x4e\x48\x03\x7a\x5b\xaa\xca\x1f\x9a\xd4\x32\xac\x6f\x36\x48\x7d\x39\x5e\xdd\x2a\x65\x8e\xf4\x51\x33\xbb\x8d\x1b\x66\x34\x44\x47\x54\xb0\x71\x24\x65\xcc\x01\x29\xb1\x59\xd0\x8b\x10\x65\x4c\x9c\xed\x22\x44\x8a\x6f\x9c\x41\x39\xe3\x8c\xe4\x9b\x76\xf6\x4e\x7b\x66\x8b\x2e\x10\x76\x79\xd7\xda\x77\x8b\xf4\xe5\x9f\xfc\xe8\x88\x94\xad\x76\x4d\xfc\x90\x0e\xd6\xe9\xbe\x3f\xdc\xfc\x33\xf9\x2c\x76\xef\x2f\x5a\x5a\xfc\xe8\xfe\x03\x00\x00\xff\xff\x75\x63\x79\x7a\xc8\x00\x00\x00"), + }, + "/role_write_access.yaml": &vfsgenÛ°CompressedFileInfo{ + name: "role_write_access.yaml", + modTime: time.Date(2021, 11, 29, 20, 16, 39, 227674765, time.UTC), + uncompressedSize: 181, + + compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x02\xff\x4c\xca\x31\x8a\xc3\x30\x10\x46\xe1\x5e\xa7\x18\x54\x2e\xc8\xcb\x76\x8b\x2e\x90\x3e\x45\x9a\x90\xe2\xb7\x3c\x21\x83\x65\xc9\xcc\x48\x0e\xce\xe9\x83\x8b\x40\xca\xf7\xf8\xb0\xca\x85\xd5\xa4\x96\x48\x3a\x22\x0d\xe8\xed\x51\x55\x5e\x68\x52\xcb\x30\xff\xdb\x20\xf5\x77\xfb\x73\xb3\x94\x29\xd2\xb9\x66\x76\x0b\x37\x4c\x68\x88\x8e\xa8\x60\xe1\x48\x4f\x95\xc6\x01\x29\xb1\x59\xd0\xc3\x10\x65\x8c\x9c\xed\x30\x44\x8a\x3b\xf6\xa0\x9c\xb1\x47\xf2\x4d\x3b\x7b\xa7\x3d\xb3\x45\x17\x08\xab\x9c\xb4\xf6\xd5\x22\x5d\xfd\x8f\xbf\x39\x22\x65\xab\x5d\x13\x7f\xad\x8d\x75\xfc\xe4\x3b\x00\x00\xff\xff\x5e\x9c\x4e\x4e\xb5\x00\x00\x00"), + }, + } + fs["/"].(*vfsgenÛ°DirInfo).entries = []os.FileInfo{ + fs["/cluster_role_cluster_read.yaml"].(os.FileInfo), + fs["/cluster_role_cluster_write.yaml"].(os.FileInfo), + fs["/cluster_role_full_access.yaml"].(os.FileInfo), + fs["/cluster_role_namespace_read.yaml"].(os.FileInfo), + fs["/cluster_role_namespace_write.yaml"].(os.FileInfo), + fs["/namespace.yaml"].(os.FileInfo), + fs["/relay_default_cluster_role.yaml"].(os.FileInfo), + fs["/relay_default_role.yaml"].(os.FileInfo), + fs["/role_read_access.yaml"].(os.FileInfo), + fs["/role_write_access.yaml"].(os.FileInfo), + } + + return fs +}() + +type vfsgenÛ°FS map[string]interface{} + +func (fs vfsgenÛ°FS) Open(path string) (http.File, error) { + path = pathpkg.Clean("/" + path) + f, ok := fs[path] + if !ok { + return nil, &os.PathError{Op: "open", Path: path, Err: os.ErrNotExist} + } + + switch f := f.(type) { + case *vfsgenÛ°CompressedFileInfo: + gr, err := gzip.NewReader(bytes.NewReader(f.compressedContent)) + if err != nil { + // This should never happen because we generate the gzip bytes such that they are always valid. + panic("unexpected error reading own gzip compressed bytes: " + err.Error()) + } + return &vfsgenÛ°CompressedFile{ + vfsgenÛ°CompressedFileInfo: f, + gr: gr, + }, nil + case *vfsgenÛ°FileInfo: + return &vfsgenÛ°File{ + vfsgenÛ°FileInfo: f, + Reader: bytes.NewReader(f.content), + }, nil + case *vfsgenÛ°DirInfo: + return &vfsgenÛ°Dir{ + vfsgenÛ°DirInfo: f, + }, nil + default: + // This should never happen because we generate only the above types. + panic(fmt.Sprintf("unexpected type %T", f)) + } +} + +// vfsgenÛ°CompressedFileInfo is a static definition of a gzip compressed file. +type vfsgenÛ°CompressedFileInfo struct { + name string + modTime time.Time + compressedContent []byte + uncompressedSize int64 +} + +func (f *vfsgenÛ°CompressedFileInfo) Readdir(count int) ([]os.FileInfo, error) { + return nil, fmt.Errorf("cannot Readdir from file %s", f.name) +} +func (f *vfsgenÛ°CompressedFileInfo) Stat() (os.FileInfo, error) { return f, nil } + +func (f *vfsgenÛ°CompressedFileInfo) GzipBytes() []byte { + return f.compressedContent +} + +func (f *vfsgenÛ°CompressedFileInfo) Name() string { return f.name } +func (f *vfsgenÛ°CompressedFileInfo) Size() int64 { return f.uncompressedSize } +func (f *vfsgenÛ°CompressedFileInfo) Mode() os.FileMode { return 0444 } +func (f *vfsgenÛ°CompressedFileInfo) ModTime() time.Time { return f.modTime } +func (f *vfsgenÛ°CompressedFileInfo) IsDir() bool { return false } +func (f *vfsgenÛ°CompressedFileInfo) Sys() interface{} { return nil } + +// vfsgenÛ°CompressedFile is an opened compressedFile instance. +type vfsgenÛ°CompressedFile struct { + *vfsgenÛ°CompressedFileInfo + gr *gzip.Reader + grPos int64 // Actual gr uncompressed position. + seekPos int64 // Seek uncompressed position. +} + +func (f *vfsgenÛ°CompressedFile) Read(p []byte) (n int, err error) { + if f.grPos > f.seekPos { + // Rewind to beginning. + err = f.gr.Reset(bytes.NewReader(f.compressedContent)) + if err != nil { + return 0, err + } + f.grPos = 0 + } + if f.grPos < f.seekPos { + // Fast-forward. + _, err = io.CopyN(ioutil.Discard, f.gr, f.seekPos-f.grPos) + if err != nil { + return 0, err + } + f.grPos = f.seekPos + } + n, err = f.gr.Read(p) + f.grPos += int64(n) + f.seekPos = f.grPos + return n, err +} +func (f *vfsgenÛ°CompressedFile) Seek(offset int64, whence int) (int64, error) { + switch whence { + case io.SeekStart: + f.seekPos = 0 + offset + case io.SeekCurrent: + f.seekPos += offset + case io.SeekEnd: + f.seekPos = f.uncompressedSize + offset + default: + panic(fmt.Errorf("invalid whence value: %v", whence)) + } + return f.seekPos, nil +} +func (f *vfsgenÛ°CompressedFile) Close() error { + return f.gr.Close() +} + +// vfsgenÛ°FileInfo is a static definition of an uncompressed file (because it's not worth gzip compressing). +type vfsgenÛ°FileInfo struct { + name string + modTime time.Time + content []byte +} + +func (f *vfsgenÛ°FileInfo) Readdir(count int) ([]os.FileInfo, error) { + return nil, fmt.Errorf("cannot Readdir from file %s", f.name) +} +func (f *vfsgenÛ°FileInfo) Stat() (os.FileInfo, error) { return f, nil } + +func (f *vfsgenÛ°FileInfo) NotWorthGzipCompressing() {} + +func (f *vfsgenÛ°FileInfo) Name() string { return f.name } +func (f *vfsgenÛ°FileInfo) Size() int64 { return int64(len(f.content)) } +func (f *vfsgenÛ°FileInfo) Mode() os.FileMode { return 0444 } +func (f *vfsgenÛ°FileInfo) ModTime() time.Time { return f.modTime } +func (f *vfsgenÛ°FileInfo) IsDir() bool { return false } +func (f *vfsgenÛ°FileInfo) Sys() interface{} { return nil } + +// vfsgenÛ°File is an opened file instance. +type vfsgenÛ°File struct { + *vfsgenÛ°FileInfo + *bytes.Reader +} + +func (f *vfsgenÛ°File) Close() error { + return nil +} + +// vfsgenÛ°DirInfo is a static definition of a directory. +type vfsgenÛ°DirInfo struct { + name string + modTime time.Time + entries []os.FileInfo +} + +func (d *vfsgenÛ°DirInfo) Read([]byte) (int, error) { + return 0, fmt.Errorf("cannot Read from directory %s", d.name) +} +func (d *vfsgenÛ°DirInfo) Close() error { return nil } +func (d *vfsgenÛ°DirInfo) Stat() (os.FileInfo, error) { return d, nil } + +func (d *vfsgenÛ°DirInfo) Name() string { return d.name } +func (d *vfsgenÛ°DirInfo) Size() int64 { return 0 } +func (d *vfsgenÛ°DirInfo) Mode() os.FileMode { return 0755 | os.ModeDir } +func (d *vfsgenÛ°DirInfo) ModTime() time.Time { return d.modTime } +func (d *vfsgenÛ°DirInfo) IsDir() bool { return true } +func (d *vfsgenÛ°DirInfo) Sys() interface{} { return nil } + +// vfsgenÛ°Dir is an opened dir instance. +type vfsgenÛ°Dir struct { + *vfsgenÛ°DirInfo + pos int // Position within entries for Seek and Readdir. +} + +func (d *vfsgenÛ°Dir) Seek(offset int64, whence int) (int64, error) { + if offset == 0 && whence == io.SeekStart { + d.pos = 0 + return 0, nil + } + return 0, fmt.Errorf("unsupported Seek in directory %s", d.name) +} + +func (d *vfsgenÛ°Dir) Readdir(count int) ([]os.FileInfo, error) { + if d.pos >= len(d.entries) && count > 0 { + return nil, io.EOF + } + if count <= 0 || count > len(d.entries)-d.pos { + count = len(d.entries) - d.pos + } + e := d.entries[d.pos : d.pos+count] + d.pos += count + return e, nil +} diff --git a/components/adminsrv/pkg/sentry/authz/fix.go b/components/adminsrv/pkg/sentry/authz/fix.go new file mode 100644 index 0000000..4f45878 --- /dev/null +++ b/components/adminsrv/pkg/sentry/authz/fix.go @@ -0,0 +1,3 @@ +package authz + +//go:generate go run generate/generate.go diff --git a/components/adminsrv/pkg/sentry/authz/generate/generate.go b/components/adminsrv/pkg/sentry/authz/generate/generate.go new file mode 100644 index 0000000..e7f1bd5 --- /dev/null +++ b/components/adminsrv/pkg/sentry/authz/generate/generate.go @@ -0,0 +1,25 @@ +// +build ignore + +package main + +import ( + "log" + "net/http" + + "github.com/shurcooL/vfsgen" +) + +var dataFS http.FileSystem = http.Dir("data") + +func main() { + + err := vfsgen.Generate(dataFS, vfsgen.Options{ + Filename: "defaults.go", + PackageName: "authz", + VariableName: "defaults", + }) + if err != nil { + log.Fatalln(err) + } + +} diff --git a/components/adminsrv/pkg/sentry/authz/util.go b/components/adminsrv/pkg/sentry/authz/util.go new file mode 100644 index 0000000..8097b3c --- /dev/null +++ b/components/adminsrv/pkg/sentry/authz/util.go @@ -0,0 +1,135 @@ +package authz + +import ( + "encoding/json" + + "github.com/shurcooL/httpfs/vfsutil" + corev1 "k8s.io/api/core/v1" + rbacv1 "k8s.io/api/rbac/v1" + + "sigs.k8s.io/yaml" +) + +const ( + defaultClusterRolePath = "relay_default_cluster_role.yaml" + defaultRolePath = "relay_default_role.yaml" + fullAccessClusterRolePath = "cluster_role_full_access.yaml" + readNamespaceClusterRolePath = "cluster_role_namespace_read.yaml" + writeNamespaceClusterRolePath = "cluster_role_namespace_write.yaml" + readClusterScopeClusterRolePath = "cluster_role_cluster_read.yaml" + writeClusterScopeClusterRolePath = "cluster_role_cluster_write.yaml" + readNamespaceRolePath = "role_read_access.yaml" + writeNamespaceRolePath = "role_write_access.yaml" + nameSpacePath = "namespace.yaml" + + fullAccessClusterRoleName = "full-access-cluster-role" + readAccessClusterRoleName = "read-access-cluster-role" + writeAccessClusterRoleName = "write-access-cluster-role" +) + +// GetDefaultClusterRole returns default cluster role for relay user +func GetDefaultClusterRole() (*rbacv1.ClusterRole, error) { + return getClusterRoleFromFile(defaultClusterRolePath) +} + +// GetDefaultRole return default role for relay user +func GetDefaultRole() (*rbacv1.Role, error) { + return getRoleFromFile(defaultRolePath) +} + +// GetFullAccessClusterRole gets cluster role with full access +func GetFullAccessClusterRole() (*rbacv1.ClusterRole, error) { + return getClusterRoleFromFile(fullAccessClusterRolePath) +} + +// GetReadNamespaceClusterRole gets cluster role with read access +func GetReadNamespaceClusterRole() (*rbacv1.ClusterRole, error) { + return getClusterRoleFromFile(readNamespaceClusterRolePath) +} + +// GetWriteNamespaceClusterRole gets cluster role with write access +func GetWriteNamespaceClusterRole() (*rbacv1.ClusterRole, error) { + return getClusterRoleFromFile(writeNamespaceClusterRolePath) +} + +// GetReadClusterScopeClusterRole gets cluster role with read access +func GetReadClusterScopeClusterRole() (*rbacv1.ClusterRole, error) { + return getClusterRoleFromFile(readClusterScopeClusterRolePath) +} + +// GetWriteClusterScopeClusterRole gets cluster role with write access +func GetWriteClusterScopeClusterRole() (*rbacv1.ClusterRole, error) { + return getClusterRoleFromFile(writeClusterScopeClusterRolePath) +} + +// GetReadNamespaceRole gets cluster role with read access +func GetReadNamespaceRole() (*rbacv1.Role, error) { + return getRoleFromFile(readNamespaceRolePath) +} + +// GetWriteNamespaceRole gets cluster role with write access +func GetWriteNamespaceRole() (*rbacv1.Role, error) { + return getRoleFromFile(writeNamespaceRolePath) +} + +// GetNamespace gets namespace +func GetNamespace() (*corev1.Namespace, error) { + return getNameSpaceFromFile(nameSpacePath) +} + +func getClusterRoleFromFile(path string) (*rbacv1.ClusterRole, error) { + yb, err := vfsutil.ReadFile(defaults, path) + if err != nil { + return nil, err + } + jb, err := yaml.YAMLToJSON(yb) + if err != nil { + return nil, err + } + + var cr rbacv1.ClusterRole + err = json.Unmarshal(jb, &cr) + if err != nil { + return nil, err + } + + return &cr, nil +} + +func getRoleFromFile(path string) (*rbacv1.Role, error) { + yb, err := vfsutil.ReadFile(defaults, path) + if err != nil { + return nil, err + } + jb, err := yaml.YAMLToJSON(yb) + if err != nil { + return nil, err + } + + var r rbacv1.Role + err = json.Unmarshal(jb, &r) + if err != nil { + return nil, err + } + + return &r, nil +} + +func getNameSpaceFromFile(path string) (*corev1.Namespace, error) { + yb, err := vfsutil.ReadFile(defaults, path) + if err != nil { + return nil, err + } + jb, err := yaml.YAMLToJSON(yb) + if err != nil { + return nil, err + } + + var n corev1.Namespace + err = json.Unmarshal(jb, &n) + if err != nil { + return nil, err + } + + return &n, nil +} diff --git a/components/adminsrv/pkg/sentry/authz/util_test.go b/components/adminsrv/pkg/sentry/authz/util_test.go new file mode 100644 index 0000000..15da11b --- /dev/null +++ b/components/adminsrv/pkg/sentry/authz/util_test.go @@ -0,0 +1,14 @@ +package authz + +import ( + "testing" +) + +func TestGetDefaultClusterRole(t *testing.T) { + cr, err := GetDefaultClusterRole() + if err != nil { + t.Error(err) + return + } + t.Log(cr) +} diff --git a/components/adminsrv/pkg/sentry/kubeconfig/cert_cn.go b/components/adminsrv/pkg/sentry/kubeconfig/cert_cn.go new file mode 100644 index 0000000..b52fb2d --- /dev/null +++ b/components/adminsrv/pkg/sentry/kubeconfig/cert_cn.go @@ -0,0 +1,167 @@ +package kubeconfig + +import "strings" + +const ( + // AccountIDAttrCN is accountID attribute key of CN + AccountIDAttrCN = "a" + // PartnerIDAttrCN is partnerID attribute key of CN + PartnerIDAttrCN = "p" + // OrganizationIDAttrCN is organizationID attribute key of CN + OrganizationIDAttrCN = "o" + // IsSSOAttrCN is accountID isSSO attribute key of CN + IsSSOAttrCN = "is" + // EnforceSessionAttrCN is enforeSession attribute key of CN + EnforceSessionAttrCN = "es" + // UsernameAttrCN is username attribute key of CN + UsernameAttrCN = "u" + // SessionTypeCN type of kubcel session cli/web/system + SessionTypeCN = "st" + // SystemUserCN is system user attribute key of CN + SystemUserCN = "su" + + // TerminalShell is the session originated for a terminal based kubectl cli + TerminalShell = "ts" + // WebShell is the session originated for browser based kubectl + WebShell = "ws" + // RafaySystem is the session originated for rafay system controller purpose e.g. native helm + RafaySystem = "rs" + // RelayNetwork is the session originated for custom relay network (non-core-relay) + RelayNetworkCN = "rn" +) + +// CNAttributes are the attributes encoded in CommonName of kubeconfig cert +type CNAttributes struct { + AccountID string + PartnerID string + OrganizationID string + Username string + IsSSO bool + EnforceSession bool + SessionType string + SystemUser bool + RelayNetwork bool +} + +// GetCNAttributes gets attributes from CN +func GetCNAttributes(cn string) (cnAttr CNAttributes) { + attrs := strings.Split(cn, "/") + for _, attr := range attrs { + kv := strings.Split(attr, "=") + if len(kv) != 2 { + continue + } + switch kv[0] { + case AccountIDAttrCN: + cnAttr.AccountID = kv[1] + case OrganizationIDAttrCN: + cnAttr.OrganizationID = kv[1] + case PartnerIDAttrCN: + cnAttr.PartnerID = kv[1] + case UsernameAttrCN: + cnAttr.Username = kv[1] + case IsSSOAttrCN: + cnAttr.IsSSO = GetBoolFromString(kv[1]) + case EnforceSessionAttrCN: + cnAttr.EnforceSession = GetBoolFromString(kv[1]) + case SessionTypeCN: + cnAttr.SessionType = kv[1] + case SystemUserCN: + cnAttr.SystemUser = GetBoolFromString(kv[1]) + case RelayNetworkCN: + cnAttr.RelayNetwork = GetBoolFromString(kv[1]) + } + } + return +} + +// GetSessionTypeString get type description +func GetSessionTypeString(t string) string { + switch t { + case TerminalShell: + return "kubectl cli" + case WebShell: + return "browser shell" + case RafaySystem: + return "rafay system" + default: + return "unknown session type " + t + } +} + +// GetCN returns CommonName using CNAttributes +func (cn *CNAttributes) GetCN() string { + sb := new(strings.Builder) + + // account id + sb.WriteString(AccountIDAttrCN) + sb.WriteRune('=') + sb.WriteString(cn.AccountID) + sb.WriteRune('/') + + // org id + sb.WriteString(OrganizationIDAttrCN) + sb.WriteRune('=') + sb.WriteString(cn.OrganizationID) + sb.WriteRune('/') + + // partner id + sb.WriteString(PartnerIDAttrCN) + sb.WriteRune('=') + sb.WriteString(cn.PartnerID) + sb.WriteRune('/') + + //username + sb.WriteString(UsernameAttrCN) + sb.WriteRune('=') + sb.WriteString(cn.Username) + sb.WriteRune('/') + + // is sso + sb.WriteString(IsSSOAttrCN) + sb.WriteRune('=') + sb.WriteString(GetStringFromBool(cn.IsSSO)) + sb.WriteRune('/') + + // enforce session + sb.WriteString(EnforceSessionAttrCN) + sb.WriteRune('=') + sb.WriteString(GetStringFromBool(cn.EnforceSession)) + sb.WriteRune('/') + + // session type + sb.WriteString(SessionTypeCN) + sb.WriteRune('=') + sb.WriteString(cn.SessionType) + sb.WriteRune('/') + + // system user + sb.WriteString(SystemUserCN) + sb.WriteRune('=') + sb.WriteString(GetStringFromBool(cn.SystemUser)) + sb.WriteRune('/') + + // relay network + sb.WriteString(RelayNetworkCN) + sb.WriteRune('=') + sb.WriteString(GetStringFromBool(cn.RelayNetwork)) + sb.WriteRune('/') + + return sb.String() +} + +// GetStringFromBool returns string value of bool +func GetStringFromBool(val bool) string { + if val { + return "true" + } + return "false" +} + +// GetBoolFromString returns bool values of string +func GetBoolFromString(s string) bool { + if s == "true" { + return true + } + return false +} diff --git a/components/adminsrv/pkg/sentry/kubeconfig/kubeconfig.go b/components/adminsrv/pkg/sentry/kubeconfig/kubeconfig.go new file mode 100644 index 0000000..1588a28 --- /dev/null +++ b/components/adminsrv/pkg/sentry/kubeconfig/kubeconfig.go @@ -0,0 +1,639 @@ +package kubeconfig + +import ( + "context" + "crypto/x509/pkix" + "encoding/json" + "fmt" + "sort" + "strings" + "time" + + "github.com/RafaySystems/rcloud-base/components/common/pkg/log" + "github.com/RafaySystems/rcloud-base/components/common/pkg/query" + sentryrpc "github.com/RafaySystems/rcloud-base/components/common/proto/rpc/sentry" + commonv3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/commonpb/v3" + sentry "github.com/RafaySystems/rcloud-base/components/common/proto/types/sentry" + + clientcmdapiv1 "k8s.io/client-go/tools/clientcmd/api/v1" + "sigs.k8s.io/yaml" + + "github.com/RafaySystems/rcloud-base/components/adminsrv/internal/constants" + "github.com/RafaySystems/rcloud-base/components/adminsrv/pkg/service" + "github.com/RafaySystems/rcloud-base/components/common/pkg/sentry/cryptoutil" + "github.com/RafaySystems/rcloud-base/components/common/pkg/sentry/util" +) + +const ( + kubeconfigPermission = sentry.KubeconfigReadPermission + systemUsername = "admin@rafay.co" +) + +var _log = log.GetLogger() + +// GetUserCN returns user cn from attrs +func GetUserCN(attrs map[string]string) string { + var keys []string + for key := range attrs { + keys = append(keys, key) + } + sort.Strings(keys) + + sb := new(strings.Builder) + + for _, key := range keys { + sb.WriteString(key) + sb.WriteRune('=') + sb.WriteString(attrs[key]) + sb.WriteRune('/') + } + return strings.TrimRight(sb.String(), "/") +} + +// GetUserAttrs returns attrs from cn +func GetUserAttrs(cn string) map[string]string { + attrs := strings.Split(cn, "/") + ret := make(map[string]string) + for _, attr := range attrs { + vals := strings.Split(attr, "=") + if len(vals) != 2 { + continue + } + ret[vals[0]] = vals[1] + } + return ret +} + +func getProjectsForSSOAccount(ctx context.Context, groups []string, orgID, partnerID string, gps service.GroupPermissionService) ([]string, bool, error) { + isOrgScope := false + groupProjectPermissions, err := gps.GetGroupProjectsByPermission(ctx, groups, orgID, partnerID, kubeconfigPermission) + if err != nil { + _log.Errorw("error getting group project permissions", "permission", kubeconfigPermission, "error", err.Error()) + return nil, isOrgScope, err + } + projectsMap := make(map[string]string) + projects := make([]string, 0) + for _, gp := range groupProjectPermissions { + if _, ok := projectsMap[gp.ProjectID]; ok { + continue + } + projects = append(projects, gp.ProjectID) + projectsMap[gp.ProjectID] = gp.Scope + if gp.Scope == "ORGANIZATION" { + isOrgScope = true + } + } + return projects, isOrgScope, nil +} + +func getProjectsForAccount(ctx context.Context, accountID, orgID, partnerID string, aps service.AccountPermissionService) ([]string, bool, error) { + isOrgScope := false + accountProjectPermissions, err := aps.GetAccountProjectsByPermission(ctx, accountID, orgID, partnerID, kubeconfigPermission) + if err != nil { + _log.Errorw("error getting account project permissions", "permission", kubeconfigPermission, "error", err.Error()) + return nil, isOrgScope, err + } + projectsMap := make(map[string]string) + projects := make([]string, 0) + for _, ap := range accountProjectPermissions { + if _, ok := projectsMap[ap.ProjectID]; ok { + continue + } + projects = append(projects, ap.ProjectID) + projectsMap[ap.ProjectID] = ap.Scope + if ap.Scope == "ORGANIZATION" { + isOrgScope = true + } + } + return projects, isOrgScope, nil +} + +// GetConfigForUser returns YAML encoding of kubeconfig +func GetConfigForUser(ctx context.Context, bs service.BootstrapService, aps service.AccountPermissionService, gps service.GroupPermissionService, req *sentryrpc.GetForUserRequest, pf cryptoutil.PasswordFunc, kss service.KubeconfigSettingService) ([]byte, error) { + opts := req.Opts + if opts.Selector != "" { + opts.Selector = fmt.Sprintf("%s,!rafay.dev/cdRelayAgent", opts.Selector) + } else { + opts.Selector = "!rafay.dev/cdRelayAgent" + } + batl, err := bs.SelectBootstrapAgentTemplates(ctx, query.WithSelector("rafay.dev/defaultUser=true"), query.WithGlobalScope()) + if err != nil { + _log.Errorw("error getting default user bootstrap agent templates", "error", err.Error()) + return nil, err + } + + if len(batl.Items) < 1 { + _log.Errorw("no user bootstrap agent template found") + return nil, fmt.Errorf("no user bootstrap agent template found") + } + + _log.Infow("get config for user ", "opts", opts) + + bi, err := bs.GetBootstrapInfra(ctx, batl.Items[0].Spec.InfraRef) + if err != nil { + _log.Errorw("error getting bootstrap infra", "infraRef", batl.Items[0].Spec.InfraRef, "error", err.Error()) + return nil, err + } + isSSOAcc := opts.GetIsSSOUser() + + username := opts.Username + sessionUserName := opts.Username + groups := opts.Groups + enforceSession := false + + if sessionUserName == "" { + accountData, err := aps.GetAccount(ctx, opts.Account) + if err != nil { + _log.Errorw("error getting account data", "error", err.Error()) + return nil, err + } + sessionUserName = accountData.Username + username = accountData.Username + } + + // get user level settings if exist + ks, err := kss.Get(ctx, opts.Organization, opts.Account, isSSOAcc) + if err == constants.ErrNotFound { + // get user org settings if exist + ks, err = kss.Get(ctx, opts.Organization, "", isSSOAcc) + if err != nil && err != constants.ErrNotFound { + return nil, err + } + } else if err != nil && err != constants.ErrNotFound { + return nil, err + } + if ks != nil && ks.EnableSessionCheck { + enforceSession = true + } + // {"account": "", "username": "", "partner": "", "org": "", "project":, "sso":, "enforceSession"} + // TODO: figure out how SSO works + // CN=account=/partner=/orgid=/username= + cnAttr := CNAttributes{ + AccountID: opts.Account, + PartnerID: opts.Partner, + OrganizationID: opts.Organization, + IsSSO: isSSOAcc, + EnforceSession: enforceSession, + Username: util.SanitizeUsername(username), + SessionType: TerminalShell, + RelayNetwork: false, + } + cn := cnAttr.GetCN() + + // get account projects with kubeconfig.read permission + projects := make([]string, 0) + isOrgScope := false + if !isSSOAcc { + projects, isOrgScope, err = getProjectsForAccount(ctx, opts.Account, opts.Organization, opts.Partner, aps) + if err != nil { + _log.Errorw("error getting project for rafay ", "account", opts.Account, "error", err.Error()) + return nil, err + } + } else { + projects, isOrgScope, err = getProjectsForSSOAccount(ctx, groups, opts.Organization, opts.Partner, gps) + if err != nil { + _log.Errorw("error getting project for sso ", "account", opts.Account, "error", err.Error()) + return nil, err + } + } + + // get list of bootstrap agents + bas := []*sentry.BootstrapAgent{} + if isOrgScope { + bal, err := bs.SelectBootstrapAgents(ctx, "-", + query.WithOptions(opts), + // ignore project id, because kubeconfig is not project scoped + query.WithIgnoreScopeDefault(), + ) + if err != nil { + _log.Errorw("error getting bootstrap agents", "error", err.Error()) + return nil, err + } + bas = bal.Items + } else { + set := make(map[string]interface{}) + for _, ap := range projects { + selector := "" + if opts.Selector != "" { + selector = fmt.Sprintf("%s,project/%s", opts.Selector, ap) + } else { + selector = fmt.Sprintf("project/%s", ap) + } + bal, err := bs.SelectBootstrapAgents(ctx, "-", + query.WithOptions(opts), + query.WithSelector(selector), + // ignore project id, because kubeconfig is not project scoped + query.WithIgnoreScopeDefault(), + ) + if err != nil { + _log.Errorw("error getting bootstrap agents", "error", err.Error()) + return nil, err + } + for _, ba := range bal.Items { + if ba.Spec.TemplateRef != "rafay-core-relay-agent" && ba.Spec.TemplateRef != "rafay-core-cd-relay-agent" { + if vi, ok := set[ba.Metadata.Name]; ok { + v := vi.(sentry.BootstrapAgent) + if v.Spec.TemplateRef == ba.Spec.TemplateRef { + continue + } + } + + set[ba.Metadata.Name] = ba + bas = append(bas, ba) + } else { + if _, ok := set[ba.Metadata.Name]; ok { + continue + } + set[ba.Metadata.Name] = ba + bas = append(bas, ba) + } + } + } + } + + serverHost := "" + for _, host := range batl.Items[0].Spec.Hosts { + if host.Type == sentry.BootstrapTemplateHostType_HostTypeExternal { + serverHost = host.Host + } + } + + if serverHost == "" { + return nil, fmt.Errorf("no externals hosts found") + } + + // get cert validity setting + certValidity, err := getCertValidity(ctx, opts.Organization, opts.Account, isSSOAcc, kss) + if err != nil { + _log.Errorw("error getting cert validity settings", "error", err.Error()) + return nil, err + } + + if certValidity == 0 { + // Set 1 second to avoid default value from cert Sign + certValidity = 1 * time.Second + } + + config, err := getUserConfig(ctx, *opts, username, req.Namespace, cn, serverHost, bi, bas, pf, certValidity, bs) + if err != nil { + _log.Errorw("error generating kubeconfig", "error", err.Error()) + return nil, err + } + + jb, err := json.Marshal(&config) + if err != nil { + return nil, err + } + + /* TODO: as part of event handling + partnerID := opts.Partner + orgID := opts.Organization + + message := fmt.Sprintf("%s downloaded kubeconfig for: %s", sessionUserName, username) + + + kubeconfigDownloadEvent(ctx, "user.kubeconfig.download", orgID, partnerID, sessionUserName, sessionAccountID, + message, groups) + */ + + return yaml.JSONToYAML(jb) +} + +func getCertValidity(ctx context.Context, orgID, accountID string, isSSO bool, kss service.KubeconfigSettingService) (time.Duration, error) { + ksUser, err := kss.Get(ctx, orgID, accountID, isSSO) + if err == nil && ksUser.ValiditySeconds >= 0 { + return time.Second * time.Duration(ksUser.ValiditySeconds), nil + } else if err != nil && err != constants.ErrNotFound { + return 0, err + } + + ksOrg, err := kss.Get(ctx, orgID, "", false) + if err == nil && ksOrg.ValiditySeconds >= 0 { + return time.Second * time.Duration(ksOrg.ValiditySeconds), nil + } else if err != nil && err != constants.ErrNotFound { + return 0, err + } + + // by default 1 year validity + return (360 * (time.Hour * 24)), nil +} + +func getConfig(username, namespace, certCN, serverHost string, bootstrapInfra *sentry.BootstrapInfra, bootstrapAgents []*sentry.BootstrapAgent, pf cryptoutil.PasswordFunc, certValidity time.Duration) (*clientcmdapiv1.Config, error) { + + if namespace == "" { + namespace = "default" + } + name := util.SanitizeUsername(username) + + signer, err := cryptoutil.NewSigner([]byte(bootstrapInfra.Spec.CaCert), []byte(bootstrapInfra.Spec.CaKey), + cryptoutil.WithCAKeyDecrypt(pf), + cryptoutil.WithCertValidity(certValidity), + cryptoutil.WithClient(), + ) + if err != nil { + return nil, err + } + + privKey, err := cryptoutil.GenerateECDSAPrivateKey() + if err != nil { + return nil, err + } + + key, err := cryptoutil.EncodePrivateKey(privKey, cryptoutil.NoPassword) + if err != nil { + return nil, err + } + + csr, err := cryptoutil.CreateCSR(pkix.Name{ + CommonName: certCN, + }, privKey) + if err != nil { + return nil, err + } + + // sign csr and get the cert + cert, err := signer.Sign(csr) + if err != nil { + return nil, err + } + + users := []clientcmdapiv1.NamedAuthInfo{ + { + Name: name, + AuthInfo: clientcmdapiv1.AuthInfo{ + ClientCertificateData: cert, + ClientKeyData: key, + }, + }, + } + + var clusters []clientcmdapiv1.NamedCluster + + var contexts []clientcmdapiv1.NamedContext + + for _, ba := range bootstrapAgents { + if ba.Spec.TemplateRef != "rafay-core-relay-agent" && ba.Spec.TemplateRef != "rafay-core-cd-relay-agent" { + // skip non default agents from system kubeconfiog + continue + } + + host := strings.ReplaceAll(serverHost, "*", ba.Metadata.Name) + + clusters = append(clusters, clientcmdapiv1.NamedCluster{ + Name: ba.Metadata.DisplayName, + Cluster: clientcmdapiv1.Cluster{ + Server: fmt.Sprintf("https://%s", host), + CertificateAuthorityData: []byte(bootstrapInfra.Spec.CaCert), + }, + }) + + contexts = append(contexts, clientcmdapiv1.NamedContext{ + Name: ba.Metadata.DisplayName, + Context: clientcmdapiv1.Context{ + Cluster: ba.Metadata.DisplayName, + AuthInfo: name, + Namespace: namespace, + }, + }) + } + + config := &clientcmdapiv1.Config{ + Kind: "Config", + APIVersion: "v1", + Clusters: clusters, + AuthInfos: users, + Contexts: contexts, + } + + if len(contexts) > 0 { + config.CurrentContext = contexts[0].Name + } + + return config, nil +} + +// GetConfigForCluster returns YAML encoded kubeconfig +func GetConfigForCluster(ctx context.Context, bs service.BootstrapService, req *sentryrpc.GetForClusterRequest, pf cryptoutil.PasswordFunc, kss service.KubeconfigSettingService, sessionType string) ([]byte, error) { + opts := req.Opts + if opts.Selector != "" { + opts.Selector = fmt.Sprintf("%s,!rafay.dev/cdRelayAgent", opts.Selector) + } else { + opts.Selector = fmt.Sprintf("!rafay.dev/cdRelayAgent") + } + _log.Infow("get config for cluster ", "opts", opts, "namespace", req.Namespace, "systemUser", req.SystemUser) + batl, err := bs.SelectBootstrapAgentTemplates(ctx, query.WithSelector("rafay.dev/defaultUser=true"), query.WithGlobalScope()) + if err != nil { + return nil, err + } + + if len(batl.Items) < 1 { + return nil, fmt.Errorf("no user bootstrap agent template found") + } + + bi, err := bs.GetBootstrapInfra(ctx, batl.Items[0].Spec.InfraRef) + if err != nil { + return nil, err + } + + serverHost := "" + for _, host := range batl.Items[0].Spec.Hosts { + if host.Type == sentry.BootstrapTemplateHostType_HostTypeExternal { + serverHost = host.Host + } + } + + bal, err := bs.SelectBootstrapAgents(ctx, "-", + query.WithOptions(opts), + // ignore project id because kubeconfig is not project scoped + query.WithIgnoreScopeDefault(), + ) + if err != nil { + return nil, err + } + + if bal.Metadata.Count <= 0 { + return nil, fmt.Errorf("no bootstrap agents found") + } + + isSSOAcc := opts.GetIsSSOUser() + username := opts.Username + if req.SystemUser { + username = systemUsername + } + if sessionType == RafaySystem { + username = RafaySystem + "-" + username + } + enforceSession := false + + // get user level settings if exist + ks, err := kss.Get(ctx, opts.Organization, opts.Account, isSSOAcc) + if err == constants.ErrNotFound { + // get user org settings if exist + ks, err = kss.Get(ctx, opts.Organization, "", isSSOAcc) + if err != nil && err != constants.ErrNotFound { + return nil, err + } + } else if err != nil && err != constants.ErrNotFound { + return nil, err + } + if ks != nil && ks.EnableSessionCheck { + enforceSession = true + } + // {"account": "", "username": "", "partner": "", "org": "", "project":, "sso":, "enforceSession"} + // TODO: figure out how SSO works + // CN=account=/partner=/orgid=/username= + cnAttr := CNAttributes{ + AccountID: opts.Account, + PartnerID: opts.Partner, + OrganizationID: opts.Organization, + IsSSO: isSSOAcc, + EnforceSession: enforceSession, + Username: util.SanitizeUsername(username), + SessionType: sessionType, + } + + if req.SystemUser { + cnAttr.AccountID = "" + cnAttr.PartnerID = "" + cnAttr.OrganizationID = "" + cnAttr.IsSSO = false + cnAttr.EnforceSession = false + cnAttr.Username = util.SanitizeUsername(username) + cnAttr.SystemUser = true + } + + cn := cnAttr.GetCN() + + certValidity, err := getCertValidity(ctx, opts.Organization, opts.Account, isSSOAcc, kss) + if err != nil { + _log.Errorw("error getting cert validity settings", "error", err.Error()) + return nil, err + } + + if certValidity == 0 { + // Browser based session expire in + // next 8 hours to avoid default value cert Sign + certValidity = 8 * time.Hour + } + + config, err := getConfig(username, req.Namespace, cn, serverHost, bi, bal.Items, pf, certValidity) + if err != nil { + _log.Errorw("error generating kubeconfig", "error", err.Error()) + return nil, err + } + + jb, err := json.Marshal(&config) + if err != nil { + return nil, err + } + return yaml.JSONToYAML(jb) + +} + +func getUserConfig(ctx context.Context, opts commonv3.QueryOptions, username, namespace, certCN, serverHost string, bootstrapInfra *sentry.BootstrapInfra, bootstrapAgents []*sentry.BootstrapAgent, pf cryptoutil.PasswordFunc, certValidity time.Duration, bs service.BootstrapService) (*clientcmdapiv1.Config, error) { + + if namespace == "" { + namespace = "default" + } + name := util.SanitizeUsername(username) + + signer, err := cryptoutil.NewSigner([]byte(bootstrapInfra.Spec.CaCert), []byte(bootstrapInfra.Spec.CaKey), + cryptoutil.WithCAKeyDecrypt(pf), + cryptoutil.WithCertValidity(certValidity), + cryptoutil.WithClient(), + ) + if err != nil { + return nil, err + } + + privKey, err := cryptoutil.GenerateECDSAPrivateKey() + if err != nil { + return nil, err + } + + key, err := cryptoutil.EncodePrivateKey(privKey, cryptoutil.NoPassword) + if err != nil { + return nil, err + } + + csr, err := cryptoutil.CreateCSR(pkix.Name{ + CommonName: certCN, + }, privKey) + if err != nil { + return nil, err + } + + // sign csr and get the cert + cert, err := signer.Sign(csr) + if err != nil { + return nil, err + } + + users := []clientcmdapiv1.NamedAuthInfo{ + { + Name: name, + AuthInfo: clientcmdapiv1.AuthInfo{ + ClientCertificateData: cert, + ClientKeyData: key, + }, + }, + } + + var clusters []clientcmdapiv1.NamedCluster + + var contexts []clientcmdapiv1.NamedContext + + baMaps := make(map[string]sentry.BootstrapAgent) + + // prune agent list + // if a cluster is added to custom relay then exlude it from default + for _, ba := range bootstrapAgents { + if ba.Spec.TemplateRef != "rafay-core-relay-agent" && ba.Spec.TemplateRef != "rafay-core-cd-relay-agent" { + baMaps[ba.Metadata.Name] = *ba + } else { + if _, ok := baMaps[ba.Metadata.Name]; !ok { + baMaps[ba.Metadata.Name] = *ba + } + } + } + + for _, ba := range baMaps { + if ba.Spec.TemplateRef != "rafay-core-relay-agent" && ba.Spec.TemplateRef != "rafay-core-cd-relay-agent" { + // handle custome relay network + } else { + + host := strings.ReplaceAll(serverHost, "*", ba.Metadata.Name) + + clusters = append(clusters, clientcmdapiv1.NamedCluster{ + Name: ba.Metadata.DisplayName, + Cluster: clientcmdapiv1.Cluster{ + Server: fmt.Sprintf("https://%s", host), + CertificateAuthorityData: []byte(bootstrapInfra.Spec.CaCert), + }, + }) + + contexts = append(contexts, clientcmdapiv1.NamedContext{ + Name: ba.Metadata.DisplayName, + Context: clientcmdapiv1.Context{ + Cluster: ba.Metadata.DisplayName, + AuthInfo: name, + Namespace: namespace, + }, + }) + } + } + + config := &clientcmdapiv1.Config{ + Kind: "Config", + APIVersion: "v1", + Clusters: clusters, + AuthInfos: users, + Contexts: contexts, + } + + if len(contexts) > 0 { + config.CurrentContext = contexts[0].Name + } + + return config, nil +} diff --git a/components/adminsrv/pkg/sentry/util/peering.go b/components/adminsrv/pkg/sentry/util/peering.go new file mode 100644 index 0000000..fa642bb --- /dev/null +++ b/components/adminsrv/pkg/sentry/util/peering.go @@ -0,0 +1,93 @@ +package util + +import ( + "context" + "crypto/ecdsa" + "crypto/x509/pkix" + "database/sql" + "fmt" + "time" + + "github.com/RafaySystems/rcloud-base/components/adminsrv/pkg/service" + "github.com/RafaySystems/rcloud-base/components/common/pkg/query" + "github.com/rs/xid" + + "github.com/RafaySystems/rcloud-base/components/common/pkg/sentry/cryptoutil" + "github.com/RafaySystems/rcloud-base/components/common/pkg/sentry/register" + "github.com/RafaySystems/rcloud-base/components/common/proto/types/sentry" +) + +// GetPeeringServerCreds returns peering cert, key, ca +func GetPeeringServerCreds(ctx context.Context, bs service.BootstrapService, rpcPort int, host string) (cert, key, ca []byte, err error) { + nctx, cancel := context.WithTimeout(ctx, time.Second*10) + defer cancel() + var template *sentry.BootstrapAgentTemplate + + template, err = bs.GetBootstrapAgentTemplate(nctx, "rafay-sentry-peering-server") + if err != nil { + return + } + + config := ®ister.Config{ + TemplateName: "rafay-sentry-peering-server", + Addr: fmt.Sprintf("localhost:%d", rpcPort), + Name: "rafay-sentry-peering-server", + Scheme: "grpc", + Mode: "server", + } + + var privKey *ecdsa.PrivateKey + + privKey, err = cryptoutil.GenerateECDSAPrivateKey() + if err != nil { + return + } + + config.PrivateKey, err = cryptoutil.EncodePrivateKey(privKey, cryptoutil.NoPassword) + if err != nil { + return + } + + var csr []byte + + csr, err = cryptoutil.CreateCSR(pkix.Name{ + CommonName: host, + Country: []string{"USA"}, + Organization: []string{"Rafay Systems Inc"}, + OrganizationalUnit: []string{"Rafay Sentry Peering Server"}, + Province: []string{"California"}, + Locality: []string{"Sunnyvale"}, + }, privKey) + if err != nil { + return + } + + config.CSR = csr + + var agent *sentry.BootstrapAgent + + agent, err = bs.GetBootstrapAgent(nctx, template.Metadata.Name, query.WithName("rafay-sentry-peering-server"), query.WithGlobalScope()) + + if err != nil { + if err != sql.ErrNoRows { + return + } + } + + if agent != nil { + config.ClientID = agent.Spec.Token + } else { + config.ClientID = xid.New().String() + } + + err = register.Register(nctx, config) + if err != nil { + return + } + + cert = config.Certificate + key = config.PrivateKey + ca = config.CACertificate + + return +} diff --git a/components/adminsrv/pkg/service/account_permission.go b/components/adminsrv/pkg/service/account_permission.go new file mode 100644 index 0000000..0b52b3f --- /dev/null +++ b/components/adminsrv/pkg/service/account_permission.go @@ -0,0 +1,273 @@ +package service + +import ( + "context" + "encoding/json" + + "github.com/RafaySystems/rcloud-base/components/adminsrv/internal/dao" + "github.com/RafaySystems/rcloud-base/components/adminsrv/internal/models" + "github.com/RafaySystems/rcloud-base/components/common/pkg/persistence/provider/pg" + "github.com/RafaySystems/rcloud-base/components/common/proto/types/sentry" + "github.com/google/uuid" + "github.com/uptrace/bun" + "google.golang.org/protobuf/types/known/timestamppb" +) + +// AccountPermissionService is the interface for account permission operations +type AccountPermissionService interface { + Close() error + GetAccountPermissions(ctx context.Context, accountID string, orgID, partnerID string) ([]sentry.AccountPermission, error) + IsPartnerSuperAdmin(ctx context.Context, accountID, partnerID string) (isPartnerAdmin, isSuperAdmin bool, err error) + GetAccountProjectsByPermission(ctx context.Context, accountID, orgID, partnerID string, permission string) ([]sentry.AccountPermission, error) + GetAccountPermissionsByProjectIDPermissions(ctx context.Context, accountID, orgID, partnerID string, projects, permissions []string) ([]sentry.AccountPermission, error) + GetAcccountsWithApprovalPermission(ctx context.Context, orgID, partnerID string) ([]string, error) + GetSSOAcccountsWithApprovalPermission(ctx context.Context, orgID, partnerID string) ([]string, error) + IsOrgAdmin(ctx context.Context, accountID, partnerID string) (isOrgAdmin bool, err error) + GetAccount(ctx context.Context, accountID string) (*models.Account, error) + GetAccountGroups(ctx context.Context, accountID string) ([]string, error) + IsAccountActive(ctx context.Context, accountID, orgID string) (bool, error) +} + +// accountPermissionService implements AccountPermissionService +type accountPermissionService struct { + dao pg.EntityDAO + pdao dao.PermissionDao +} + +// NewKubeconfigRevocation return new kubeconfig revocation service +func NewAccountPermissionService(db *bun.DB) AccountPermissionService { + edao := pg.NewEntityDAO(db) + return &accountPermissionService{ + dao: edao, + pdao: dao.NewPermissionDao(edao), + } +} + +func (s *accountPermissionService) Close() error { + return s.dao.Close() +} + +func (a *accountPermissionService) GetAccountPermissions(ctx context.Context, accountID string, orgID, partnerID string) ([]sentry.AccountPermission, error) { + aps, err := a.pdao.GetAccountPermissions(ctx, uuid.MustParse(accountID), uuid.MustParse(orgID), uuid.MustParse(partnerID)) + if err != nil { + return nil, err + } + accountPermissions := []sentry.AccountPermission{} + for _, ap := range aps { + accountPermissions = append(accountPermissions, prepareAccountPermissionResponse(ap)) + } + + return accountPermissions, nil +} + +func (a *accountPermissionService) IsPartnerSuperAdmin(ctx context.Context, accountID, partnerID string) (isPartnerAdmin, isSuperAdmin bool, err error) { + return a.pdao.IsPartnerSuperAdmin(ctx, uuid.MustParse(accountID), uuid.MustParse(partnerID)) +} + +func (a *accountPermissionService) GetAccountProjectsByPermission(ctx context.Context, accountID, orgID, partnerID string, permission string) ([]sentry.AccountPermission, error) { + aps, err := a.pdao.GetAccountProjectsByPermission(ctx, uuid.MustParse(accountID), uuid.MustParse(orgID), uuid.MustParse(partnerID), permission) + if err != nil { + return nil, err + } + accountPermissions := []sentry.AccountPermission{} + for _, ap := range aps { + accountPermissions = append(accountPermissions, prepareAccountPermissionResponse(ap)) + } + + return accountPermissions, nil +} + +func (a *accountPermissionService) GetAccountPermissionsByProjectIDPermissions(ctx context.Context, accountID, orgID, partnerID string, projects, permissions []string) ([]sentry.AccountPermission, error) { + aps, err := a.pdao.GetAccountPermissionsByProjectIDPermissions(ctx, uuid.MustParse(accountID), uuid.MustParse(orgID), uuid.MustParse(partnerID), projects, permissions) + if err != nil { + return nil, err + } + accountPermissions := []sentry.AccountPermission{} + for _, ap := range aps { + accountPermissions = append(accountPermissions, prepareAccountPermissionResponse(ap)) + } + + return accountPermissions, nil +} + +func (a *accountPermissionService) GetAccount(ctx context.Context, accountID string) (*models.Account, error) { + return a.pdao.GetAccountBasics(ctx, uuid.MustParse(accountID)) +} + +func (a *accountPermissionService) GetAccountGroups(ctx context.Context, accountID string) ([]string, error) { + ag, err := a.pdao.GetAccountGroups(ctx, uuid.MustParse(accountID)) + if err != nil { + return nil, err + } + groups := make([]string, 0) + for _, grp := range ag { + groups = append(groups, grp.Name) + } + return groups, nil +} + +/*TODO: to revisit if we end up using sso with crewjam +func (a *accountPermissionService) GetSSOAccount(ctx context.Context, accountID, orgID ctypesv2.RafayID) (*typesv2.SSOAccountData, error) { + var sso ssoAccountData + + err := a.db.WithContext(ctx).Model(&sso). + Where("id = ?", accountID). + Where("organization_id = ?", orgID). + Where("trash = ?", false). + Select() + if err != nil { + return nil, err + } + return sso.SSOAccountData, nil +} +*/ + +//TODO: this needs to be revisited as sso users for oidc are stored in identities by kratos +func (a *accountPermissionService) GetSSOUsersGroupProjectRole(ctx context.Context, orgID string) ([]sentry.SSOAccountGroupProjectRoleData, error) { + ssos, err := a.pdao.GetSSOUsersGroupProjectRole(ctx, uuid.MustParse(orgID)) + if err != nil { + return nil, err + } + + ssoUsers := []sentry.SSOAccountGroupProjectRoleData{} + for _, sso := range ssos { + ssoUsers = append(ssoUsers, prepareSSOAccountGroupProjectRoleData(sso)) + } + return ssoUsers, nil +} + +/* +func (a *accountPermissionService) IsAccountActive(ctx context.Context, accountID, orgID int64) (bool, error) { + active := false + err := a.db.RunInTransaction(ctx, func(tx *pg.Tx) error { + g, err := getDefaultUserGroup(tx, orgID) + if err != nil { + return err + } + ga, err := getDefaultUserGroupAccount(tx, accountID, int64(g.Id)) + if err != nil { + return err + } + active = ga.Active + return nil + }) + if err != nil { + return active, err + } + return active, nil +} + +func getDefaultUserGroup(db orm.DB, orgID int64) (*group, error) { + var g group + err := db.Model(&g). + Where("organization_id = ?", orgID). + Where("type = ?", defaultUsersGroup). + Where("trash = ?", false). + Select() + return &g, err +} + +func getDefaultUserGroupAccount(db orm.DB, accountID, groupID int64) (*groupAccount, error) { + var ga groupAccount + err := db.Model(&ga). + Where("account_id = ?", accountID). + Where("group_id = ?", groupID). + Where("trash = ?", false). + Select() + return &ga, err +} +*/ + +func (a *accountPermissionService) GetAcccountsWithApprovalPermission(ctx context.Context, orgID, partnerID string) ([]string, error) { + usernames, err := a.pdao.GetAcccountsWithApprovalPermission(ctx, uuid.MustParse(orgID), uuid.MustParse(partnerID)) + if err != nil { + return nil, err + } + return usernames, nil +} + +func (a *accountPermissionService) GetSSOAcccountsWithApprovalPermission(ctx context.Context, orgID, partnerID string) ([]string, error) { + usernames, err := a.pdao.GetSSOAcccountsWithApprovalPermission(ctx, uuid.MustParse(orgID), uuid.MustParse(partnerID)) + if err != nil { + return nil, err + } + return usernames, nil +} + +func (a *accountPermissionService) IsOrgAdmin(ctx context.Context, accountID, partnerID string) (isOrgAdmin bool, err error) { + return a.pdao.IsOrgAdmin(ctx, uuid.MustParse(accountID), uuid.MustParse(partnerID)) +} + +func (a *accountPermissionService) IsAccountActive(ctx context.Context, accountID, orgID string) (bool, error) { + active := false + + group, err := a.pdao.GetDefaultUserGroup(ctx, uuid.MustParse(orgID)) + if err != nil { + return false, err + } + ga, err := a.pdao.GetDefaultUserGroupAccount(ctx, uuid.MustParse(accountID), group.ID) + if err != nil { + return active, err + } + return ga.Active, nil +} + +/* +func (a *accountPermissionService) GetSSOAccounts(ctx context.Context, orgID ctypesv2.RafayID) ([]typesv2.SSOAccountData, error) { + var ssoAccounts []ssoAccountData + + err := a.db.WithContext(ctx).Model(&ssoAccounts). + Where("organization_id = ?", orgID). + Where("trash = ?", false). + Select() + if err != nil { + return nil, err + } + ssoAccountUsers := []typesv2.SSOAccountData{} + for _, sso := range ssoAccounts { + ssoAccountUsers = append(ssoAccountUsers, *sso.SSOAccountData) + } + return ssoAccountUsers, nil + +} +*/ +func prepareAccountPermissionResponse(aps models.AccountPermission) sentry.AccountPermission { + var urls []*sentry.PermissionURL + if aps.Urls != nil { + json.Unmarshal(aps.Urls, &urls) + } + return sentry.AccountPermission{ + AccountID: aps.AccountId.String(), + ProjectID: aps.ProjecttId, + OrganizationID: aps.OrganizationId.String(), + PartnerID: aps.PartnerId.String(), + RoleName: aps.RoleName, + IsGlobal: aps.IsGlobal, + Scope: aps.Scope, + PermissionName: aps.PermissionName, + BaseURL: aps.BaseUrl, + Urls: urls, + } +} + +func prepareSSOAccountGroupProjectRoleData(data models.SSOAccountGroupProjectRole) sentry.SSOAccountGroupProjectRoleData { + return sentry.SSOAccountGroupProjectRoleData{ + Id: data.Id.String(), + UserName: data.Username, + RoleName: data.RoleName, + ProjectID: data.ProjectId, + ProjectName: data.ProjectName, + Group: data.GroupName, + AccountOrganizationID: data.AccountOrganizationId.String(), + OrganizationID: data.OrganizationId.String(), + PartnerID: data.PartnerId.String(), + Scope: data.Scope, + LastLogin: timestamppb.New(data.LastLogin), + CreatedAt: timestamppb.New(data.CreatedAt), + FirstName: data.FirstName, + LastName: data.LastName, + Phone: data.Phone, + Name: data.Name, + LastLogout: timestamppb.New(data.LastLogin), + } +} diff --git a/components/adminsrv/pkg/service/bootstrap.go b/components/adminsrv/pkg/service/bootstrap.go new file mode 100644 index 0000000..434c58d --- /dev/null +++ b/components/adminsrv/pkg/service/bootstrap.go @@ -0,0 +1,640 @@ +package service + +import ( + "context" + "crypto/x509" + "crypto/x509/pkix" + "database/sql" + "encoding/json" + "encoding/pem" + "fmt" + "time" + + "github.com/RafaySystems/rcloud-base/components/adminsrv/internal/dao" + "github.com/RafaySystems/rcloud-base/components/adminsrv/internal/models" + "github.com/RafaySystems/rcloud-base/components/common/pkg/converter" + "github.com/RafaySystems/rcloud-base/components/common/pkg/log" + "github.com/RafaySystems/rcloud-base/components/common/pkg/persistence/provider/pg" + "github.com/RafaySystems/rcloud-base/components/common/pkg/query" + "github.com/RafaySystems/rcloud-base/components/common/pkg/sentry/cryptoutil" + schedulerrpc "github.com/RafaySystems/rcloud-base/components/common/proto/rpc/scheduler" + commonv3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/commonpb/v3" + infrav3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/infrapb/v3" + "github.com/RafaySystems/rcloud-base/components/common/proto/types/sentry" + "github.com/google/uuid" + "github.com/pkg/errors" + "github.com/uptrace/bun" + "google.golang.org/protobuf/types/known/timestamppb" +) + +var _log = log.GetLogger() +var KEKFunc cryptoutil.PasswordFunc + +// BootstrapService is the interface for bootstrap operations +type BootstrapService interface { + Close() error + + // bootstrap infra methods + PatchBootstrapInfra(ctx context.Context, infra *sentry.BootstrapInfra) error + GetBootstrapInfra(ctx context.Context, name string) (*sentry.BootstrapInfra, error) + // bootstrap template methods + PatchBootstrapAgentTemplate(ctx context.Context, template *sentry.BootstrapAgentTemplate) error + GetBootstrapAgentTemplate(ctx context.Context, name string) (*sentry.BootstrapAgentTemplate, error) + GetBootstrapAgentTemplateForToken(ctx context.Context, token string) (*sentry.BootstrapAgentTemplate, error) + GetBootstrapAgentTemplateForHost(ctx context.Context, host string) (*sentry.BootstrapAgentTemplate, error) + SelectBootstrapAgentTemplates(ctx context.Context, opts ...query.Option) (*sentry.BootstrapAgentTemplateList, error) + // bootstrap agent methods + CreateBootstrapAgent(ctx context.Context, agent *sentry.BootstrapAgent) error + GetBootstrapAgent(ctx context.Context, templateRef string, opts ...query.Option) (*sentry.BootstrapAgent, error) + GetBootstrapAgents(ctx context.Context, templateRef string, opts ...query.Option) (*sentry.BootstrapAgentList, error) + GetBootstrapAgentForToken(ctx context.Context, token string) (*sentry.BootstrapAgent, error) + GetBootstrapAgentCountForClusterID(ctx context.Context, clusterID string, orgID string) (int, error) + GetBootstrapAgentForClusterID(ctx context.Context, clusterID string, orgID string) (*sentry.BootstrapAgent, error) + SelectBootstrapAgents(ctx context.Context, templateRef string, opts ...query.Option) (*sentry.BootstrapAgentList, error) + RegisterBootstrapAgent(ctx context.Context, token string) error + DeleteBoostrapAgent(ctx context.Context, templateRef string, opts ...query.Option) error + PatchBootstrapAgent(ctx context.Context, ba *sentry.BootstrapAgent, templateRef string, opts ...query.Option) error + UpdateClusterStatus(ctx context.Context, clusterID string) error +} + +// bootstrapService implements BootstrapService +type bootstrapService struct { + dao pg.EntityDAO + bdao dao.BootstrapDao + sp schedulerrpc.SchedulerPool +} + +// NewBootstrapService return new bootstrap service +func NewBootstrapService(db *bun.DB, pool schedulerrpc.SchedulerPool) BootstrapService { + edao := pg.NewEntityDAO(db) + return &bootstrapService{ + dao: edao, + bdao: dao.NewBootstrapDao(edao), + sp: pool, + } +} + +func (s *bootstrapService) PatchBootstrapInfra(ctx context.Context, infra *sentry.BootstrapInfra) error { + return s.bdao.CreateOrUpdateBootstrapInfra(ctx, convertToInfraModel(infra)) +} + +func (s *bootstrapService) GetBootstrapInfra(ctx context.Context, name string) (*sentry.BootstrapInfra, error) { + + var bi models.BootstrapInfra + _, err := s.dao.GetByName(ctx, name, &bi) + if err != nil { + return nil, err + } + return prepareInfraResponse(&bi), nil +} + +func (s *bootstrapService) PatchBootstrapAgentTemplate(ctx context.Context, template *sentry.BootstrapAgentTemplate) error { + templ := models.BootstrapAgentTemplate{ + Name: template.Metadata.Name, + DisplayName: template.Metadata.DisplayName, + InfraRef: template.Spec.InfraRef, + ModifiedAt: time.Now(), + Labels: converter.ConvertToJsonRawMessage(template.Metadata.Labels), + Annotations: converter.ConvertToJsonRawMessage(template.Metadata.Annotations), + AutoRegister: template.Spec.AutoRegister, + AutoApprove: template.Spec.AutoApprove, + TemplateType: sentry.BootstrapAgentTemplateType_name[int32(template.Spec.TemplateType)], + IgnoreMultipleRegister: template.Spec.IgnoreMultipleRegister, + InclusterTemplate: template.Spec.InClusterTemplate, + OutofclusterTemplate: template.Spec.OutOfClusterTemplate, + Token: template.Spec.Token, + Hosts: converter.ConvertToJsonRawMessage(template.Spec.Hosts), + CreatedAt: time.Now(), + } + + return s.bdao.CreateOrUpdateBootstrapAgentTemplate(ctx, &templ) +} + +func (s *bootstrapService) GetBootstrapAgentTemplate(ctx context.Context, agentType string) (*sentry.BootstrapAgentTemplate, error) { + var template models.BootstrapAgentTemplate + _, err := s.dao.GetByName(ctx, agentType, &template) + if err != nil { + return nil, err + } + + return prepareTemplateResponse(&template), nil +} + +func (s *bootstrapService) GetBootstrapAgentTemplateForToken(ctx context.Context, token string) (*sentry.BootstrapAgentTemplate, error) { + bat, err := s.bdao.GetBootstrapAgentTemplateForToken(ctx, token) + if err != nil { + return nil, err + } + return prepareTemplateResponse(bat), nil +} + +func (s *bootstrapService) SelectBootstrapAgentTemplates(ctx context.Context, opts ...query.Option) (*sentry.BootstrapAgentTemplateList, error) { + queryOptions := &commonv3.QueryOptions{} + for _, opt := range opts { + opt(queryOptions) + } + + batl, count, err := s.bdao.SelectBootstrapAgentTemplates(ctx, queryOptions) + if err != nil { + return nil, err + } + + ret := &sentry.BootstrapAgentTemplateList{Metadata: &commonv3.ListMetadata{ + Count: int64(count), + }} + for _, bat := range batl { + ret.Items = append(ret.Items, prepareTemplateResponse(&bat)) + } + + return ret, nil +} + +func (s *bootstrapService) CreateBootstrapAgent(ctx context.Context, agent *sentry.BootstrapAgent) error { + ba := convertToAgentModel(agent) + ba.CreatedAt = time.Now() + return s.bdao.CreateBootstrapAgent(ctx, ba) +} + +func convertToAgentModel(agent *sentry.BootstrapAgent) *models.BootstrapAgent { + agentMdl := &models.BootstrapAgent{ + Name: agent.Metadata.Name, + TemplateRef: agent.Spec.TemplateRef, + AgentMode: agent.Spec.AgentMode.String(), + DisplayName: agent.Metadata.DisplayName, + Labels: converter.ConvertToJsonRawMessage(agent.Metadata.Labels), + Annotations: converter.ConvertToJsonRawMessage(agent.Metadata.Annotations), + Token: agent.Spec.Token, + } + if orgId, err := uuid.Parse(agent.Metadata.Organization); err == nil { + agentMdl.OrganizationId = orgId + } + if partId, err := uuid.Parse(agent.Metadata.Partner); err == nil { + agentMdl.PartnerId = partId + } + if projId, err := uuid.Parse(agent.Metadata.Project); err == nil { + agentMdl.ProjectId = projId + } + return agentMdl +} + +func convertToInfraModel(infra *sentry.BootstrapInfra) *models.BootstrapInfra { + return &models.BootstrapInfra{ + Name: infra.Metadata.Name, + ModifiedAt: time.Now(), + CaCert: infra.Spec.CaCert, + CaKey: infra.Spec.CaKey, + DisplayName: infra.Metadata.DisplayName, + Labels: converter.ConvertToJsonRawMessage(infra.Metadata.Labels), + Annotations: converter.ConvertToJsonRawMessage(infra.Metadata.Annotations), + } +} + +func prepareAgentResponse(agent *models.BootstrapAgent) *sentry.BootstrapAgent { + var lbls map[string]string + if agent.Labels != nil { + json.Unmarshal(agent.Labels, &lbls) + } + var ann map[string]string + if agent.Annotations != nil { + json.Unmarshal(agent.Annotations, &ann) + } + ba := &sentry.BootstrapAgent{ + Kind: "BootstrapAgent", + Metadata: &commonv3.Metadata{ + Name: agent.Name, + Description: agent.DisplayName, + ModifiedAt: timestamppb.New(agent.ModifiedAt), + Labels: lbls, + Annotations: ann, + }, + Spec: &sentry.BootstrapAgentSpec{ + Token: agent.Token, + TemplateRef: agent.TemplateRef, + AgentMode: sentry.BootstrapAgentMode(sentry.BootstrapAgentMode_value[agent.AgentMode]), + }, + Status: &sentry.BootStrapAgentStatus{ + TokenState: sentry.BootstrapAgentState(sentry.BootstrapAgentMode_value[agent.TokenState]), + IpAddress: agent.IPAddress, + LastCheckedIn: timestamppb.New(agent.LastCheckedIn), + Fingerprint: agent.Fingerprint, + }, + } + return ba +} + +func prepareInfraResponse(infra *models.BootstrapInfra) *sentry.BootstrapInfra { + var lbls map[string]string + if infra.Labels != nil { + json.Unmarshal(infra.Labels, &lbls) + } + var ann map[string]string + if infra.Annotations != nil { + json.Unmarshal(infra.Annotations, &ann) + } + bi := &sentry.BootstrapInfra{ + Kind: "BootstrapInfra", + Metadata: &commonv3.Metadata{ + Name: infra.Name, + DisplayName: infra.DisplayName, + ModifiedAt: timestamppb.New(infra.ModifiedAt), + Labels: lbls, + Annotations: ann, + }, + Spec: &sentry.BootstrapInfraSpec{ + CaCert: infra.CaCert, + CaKey: infra.CaKey, + }, + } + return bi +} + +func prepareTemplateResponse(template *models.BootstrapAgentTemplate) *sentry.BootstrapAgentTemplate { + var lbls map[string]string + if template.Labels != nil { + json.Unmarshal(template.Labels, &lbls) + } + var ann map[string]string + if template.Annotations != nil { + json.Unmarshal(template.Annotations, &ann) + } + var hosts []*sentry.BootstrapTemplateHost + if template.Hosts != nil { + json.Unmarshal(template.Hosts, &hosts) + } + templResp := sentry.BootstrapAgentTemplate{ + Kind: "BootstapAgentTemplate", + Metadata: &commonv3.Metadata{ + Name: template.Name, + DisplayName: template.DisplayName, + Labels: lbls, + Annotations: ann, + ModifiedAt: timestamppb.New(template.ModifiedAt), + }, + Spec: &sentry.BootstrapAgentTemplateSpec{ + InfraRef: template.InfraRef, + AutoRegister: template.AutoRegister, + AutoApprove: template.AutoApprove, + IgnoreMultipleRegister: template.IgnoreMultipleRegister, + TemplateType: sentry.BootstrapAgentTemplateType(sentry.BootstrapAgentTemplateType_value[template.TemplateType]), + Token: template.Token, + Hosts: hosts, + InClusterTemplate: template.InclusterTemplate, + OutOfClusterTemplate: template.OutofclusterTemplate, + }, + } + return &templResp +} + +func (s *bootstrapService) GetBootstrapAgents(ctx context.Context, templateRef string, opts ...query.Option) (ret *sentry.BootstrapAgentList, err error) { + queryOptions := &commonv3.QueryOptions{} + for _, opt := range opts { + opt(queryOptions) + } + + agl, count, err := s.bdao.GetBootstrapAgents(ctx, queryOptions, templateRef) + if err != nil { + return nil, err + } + + ret = new(sentry.BootstrapAgentList) + ret.Metadata.Count = int64(count) + for _, ag := range agl { + ret.Items = append(ret.Items, prepareAgentResponse(&ag)) + } + return +} + +func (s *bootstrapService) GetBootstrapAgent(ctx context.Context, templateRef string, opts ...query.Option) (*sentry.BootstrapAgent, error) { + queryOptions := &commonv3.QueryOptions{} + for _, opt := range opts { + opt(queryOptions) + } + ba, err := s.bdao.GetBootstrapAgent(ctx, templateRef, queryOptions) + if err != nil { + return nil, err + } + return prepareAgentResponse(ba), nil +} + +func (s *bootstrapService) SelectBootstrapAgents(ctx context.Context, templateRef string, opts ...query.Option) (ret *sentry.BootstrapAgentList, err error) { + queryOptions := &commonv3.QueryOptions{} + for _, opt := range opts { + opt(queryOptions) + } + + agl, count, err := s.bdao.SelectBootstrapAgents(ctx, templateRef, queryOptions) + if err != nil { + return nil, err + } + + ret = new(sentry.BootstrapAgentList) + ret.Metadata = &commonv3.ListMetadata{ + Count: int64(count), + } + for _, ag := range agl { + ret.Items = append(ret.Items, prepareAgentResponse(&ag)) + } + + return +} + +func (s *bootstrapService) RegisterBootstrapAgent(ctx context.Context, token string) error { + return s.bdao.RegisterBootstrapAgent(ctx, token) +} + +func (s *bootstrapService) DeleteBoostrapAgent(ctx context.Context, templateRef string, opts ...query.Option) error { + queryOptions := &commonv3.QueryOptions{} + for _, opt := range opts { + opt(queryOptions) + } + + err := s.bdao.DeleteBootstrapAgent(ctx, templateRef, queryOptions) + return err +} + +func (s *bootstrapService) PatchBootstrapAgent(ctx context.Context, ba *sentry.BootstrapAgent, templateRef string, opts ...query.Option) error { + + queryOptions := &commonv3.QueryOptions{} + for _, opt := range opts { + opt(queryOptions) + } + + err := s.dao.GetInstance().RunInTx(ctx, &sql.TxOptions{}, func(ctx context.Context, tx bun.Tx) error { + bdb, err := s.bdao.GetBootstrapAgent(ctx, templateRef, queryOptions) + if err != nil { + return err + } + if bdb.TokenState > sentry.BootstrapAgentState_NotSet.String() { + bdb.TokenState = ba.Status.TokenState.String() + } + if ba.Status != nil { + if ba.Status.IpAddress != "" { + bdb.IPAddress = ba.Status.IpAddress + } else { + bdb.IPAddress = "" + } + if !ba.Status.LastCheckedIn.AsTime().IsZero() { + bdb.LastCheckedIn = ba.Status.LastCheckedIn.AsTime() + } + if ba.Status.Fingerprint != "" { + bdb.Fingerprint = ba.Status.Fingerprint + } else { + bdb.Fingerprint = "" + } + } + bdb.ModifiedAt = time.Now() + bdb.DisplayName = ba.Metadata.DisplayName + return s.bdao.UpdateBootstrapAgent(ctx, bdb, queryOptions) + }) + return err +} + +func (s *bootstrapService) GetBootstrapAgentForToken(ctx context.Context, token string) (*sentry.BootstrapAgent, error) { + ba, err := s.bdao.GetBootstrapAgentForToken(ctx, token) + if err != nil { + return nil, err + } + return prepareAgentResponse(ba), nil +} + +func (s *bootstrapService) GetBootstrapAgentTemplateForHost(ctx context.Context, host string) (*sentry.BootstrapAgentTemplate, error) { + bat, err := s.bdao.GetBootstrapAgentTemplateForHost(ctx, host) + if err != nil { + return nil, err + } + + return prepareTemplateResponse(bat), nil + +} + +func (s *bootstrapService) GetBootstrapAgentCountForClusterID(ctx context.Context, clusterID string, orgID string) (int, error) { + count, err := s.bdao.GetBootstrapAgentCountForClusterID(ctx, clusterID, uuid.MustParse(orgID)) + if err != nil { + return 0, err + } + if count <= 0 { + return 0, fmt.Errorf("invalid request") + } + return count, nil +} + +func (s *bootstrapService) GetBootstrapAgentForClusterID(ctx context.Context, clusterID string, orgID string) (*sentry.BootstrapAgent, error) { + ba, err := s.bdao.GetBootstrapAgentForClusterID(ctx, clusterID, uuid.MustParse(orgID)) + if err != nil || ba == nil { + return nil, err + } + return prepareAgentResponse(ba), nil +} + +func getCertAndKey(providedCert, providedKey, password string) ([]byte, []byte, error) { + var cert, key []byte + + cert = []byte(providedCert) + key = []byte(providedKey) + + block, _ := pem.Decode([]byte(providedCert)) + if block == nil { + _log.Infow("failed in pem decode cert", "cert", providedCert) + return nil, nil, errors.New("failed to pem decode cert") + } + _, err := x509.ParseCertificate(block.Bytes) + + if err != nil { + _log.Infow("could not parse cert", "cert", providedCert) + return nil, nil, errors.Wrapf(err, "could not parse cert") + } + + if password != "" { + kekFunc := func() ([]byte, error) { + return []byte(password), nil + } + key, err = reEncryptKeyWithSystemKek([]byte(providedKey), kekFunc, KEKFunc) + if err != nil { + _log.Infow("could not encode privatekey with system kek", "error", err) + return nil, nil, errors.Wrapf(err, "could not encode privatekey with system kek") + } + } else { + key, err = reEncryptKeyWithSystemKek([]byte(providedKey), cryptoutil.NoPassword, KEKFunc) + if err != nil { + key, err = reEncryptKeyWithSystemKek([]byte(providedKey), KEKFunc, KEKFunc) + if err != nil { + _log.Infow("could not encode privatekey with system kek", "error", err) + return nil, nil, errors.Wrapf(err, "could not encode privatekey with system kek") + } + } + } + + return cert, key, nil +} + +func reEncryptKeyWithSystemKek(privKey []byte, f, f1 cryptoutil.PasswordFunc) ([]byte, error) { + pk, err := cryptoutil.DecodePrivateKey(privKey, f) + if err != nil { + _log.Infow("could not decode PEM block for provided key", "error", err) + return nil, err + } + + pk1, err := cryptoutil.EncodePrivateKey(pk, f1) + if err != nil { + _log.Infow("could not encode PEM block for provided key", "error", err) + return nil, err + } + + return pk1, nil +} + +func (s *bootstrapService) reconcileBootstrapInfra( + ctx context.Context, + infraRef, relayNetworkName, providedCert, providedKey, password string, + selfSigned bool, +) ([]byte, []byte, error) { + var updateInfra bool + existingBootstrapInfra, err := s.GetBootstrapInfra(ctx, infraRef) + if err != nil { + return nil, nil, errors.Wrapf(err, "could not fetch existing boostrap infra") + } + var cert, key []byte + if !selfSigned { + if providedCert == "" { + return cert, key, errors.New("provided certificate is empty") + } + + if providedKey == "" { + return cert, key, errors.New("provided key is empty") + } + cert, key, err = getCertAndKey(providedCert, providedKey, password) + if err != nil { + _log.Infow("could not parse cert and key", "error", err) + return cert, key, errors.Wrapf(err, "could not parse cert and key") + } + } else { + // Rafay selfsigned usecase + if existingBootstrapInfra.Spec.CaCert != "" { + // Check exisitng cert is rafay generated + parsedCert, err := x509.ParseCertificate([]byte(existingBootstrapInfra.Spec.CaCert)) + if err == nil { + if parsedCert.Issuer.CommonName == relayNetworkName && + parsedCert.Issuer.OrganizationalUnit[0] == "Rafay Sentry" && + parsedCert.Issuer.Organization[0] == "Rafay Systems Inc" && + parsedCert.Issuer.Locality[0] == "Sunnyvale" && + parsedCert.Issuer.Province[0] == "California" { + // cert is generated by rafay keep using it + cert = []byte(existingBootstrapInfra.Spec.CaCert) + key = []byte(existingBootstrapInfra.Spec.CaKey) + } + } + } + if len(cert) == 0 || len(key) == 0 { + // Generate new slefsigned key pair + cert, key, err = cryptoutil.GenerateCA(pkix.Name{ + CommonName: relayNetworkName, + Country: []string{"USA"}, + Organization: []string{"Rafay Systems Inc"}, + OrganizationalUnit: []string{"Rafay Sentry"}, + Province: []string{"California"}, + Locality: []string{"Sunnyvale"}, + }, KEKFunc) + + if err != nil { + _log.Infow("failed to generate infra CA for server", "error", err) + return cert, key, errors.Wrap(err, "failed to generate infra CA for server") + } + } + } + if existingBootstrapInfra.Spec.CaCert != string(cert) { + _log.Infof("reconciling boostrap infra %s ca cert", infraRef) + existingBootstrapInfra.Spec.CaCert = string(cert) + updateInfra = true + } + if existingBootstrapInfra.Spec.CaKey != string(key) { + _log.Infof("reconciling boostrap infra %s key", infraRef) + existingBootstrapInfra.Spec.CaKey = string(key) + updateInfra = true + } + + if updateInfra { + _log.Infow("reconcileBootstrapInfra", "update-existingBootstrapInfra", existingBootstrapInfra.Metadata.Name) + if err := s.PatchBootstrapInfra(ctx, existingBootstrapInfra); err != nil { + _log.Infow("reconcileBootstrapInfra", "could not patch boostrap infra error", err) + return cert, key, errors.Wrapf(err, "could not patch boostrap infra %s", infraRef) + } + } + return cert, key, nil +} + +func (s *bootstrapService) GetRelayAgent(ctx context.Context, ClusterScope string, opts ...query.Option) (*sentry.BootstrapAgent, error) { + queryOptions := &commonv3.QueryOptions{} + for _, opt := range opts { + opt(queryOptions) + } + + bal, err := s.SelectBootstrapAgents(ctx, queryOptions.Name, + query.WithOrganizationID(queryOptions.Organization), + query.WithPartnerID(queryOptions.Partner), + ) + if err != nil { + _log.Infow("failed to get default bootstrap agent list", "cluster", ClusterScope, "error", err) + return nil, err + } + + if bal != nil && bal.Metadata.Count > 0 { + var ba sentry.BootstrapAgent + found := false + // match labels + for _, b := range bal.Items { + _log.Infow("match", "ClusterScope", ClusterScope, "DisplayName", b.Metadata.DisplayName) + if "cluster/"+b.Metadata.DisplayName == ClusterScope { + found = true + ba = *b + break + } + } + if found { + // found bootstrap relay agent for cluster as per the association + return &ba, nil + } else { + _log.Infow("did not find relay bootstrap agent for", "cluster", ClusterScope, "template", queryOptions.Name) + } + } + _log.Infow("did not find relay bootstrap agent for", "cluster", ClusterScope, "template", queryOptions.Name) + return nil, fmt.Errorf("failed to get relay agent") +} + +func (s *bootstrapService) UpdateClusterStatus(ctx context.Context, clusterID string) error { + client, err := s.sp.NewClient(ctx) + if err != nil { + _log.Infow("unable to establish connection with scheduler") + return err + } + cluster := &infrav3.Cluster{ + Metadata: &commonv3.Metadata{ + Id: clusterID, + }, + Spec: &infrav3.ClusterSpec{ + ClusterData: &infrav3.ClusterData{ + ClusterStatus: &infrav3.ClusterStatus{ + Conditions: []*infrav3.ClusterCondition{ + { + Type: infrav3.ClusterConditionType_ClusterCheckIn, + Status: commonv3.RafayConditionStatus_Success, + LastUpdated: timestamppb.Now(), + Reason: "Relay agent established connection.", + }, + { + Type: infrav3.ClusterConditionType_ClusterRegister, + Status: commonv3.RafayConditionStatus_Success, + LastUpdated: timestamppb.Now(), + Reason: "Relay agent established connection.", + }, + }, + }, + }, + }, + } + _, err = client.UpdateClusterStatus(ctx, cluster) + return err +} + +func (s *bootstrapService) Close() error { + return s.dao.Close() +} diff --git a/components/adminsrv/pkg/service/group_permission.go b/components/adminsrv/pkg/service/group_permission.go new file mode 100644 index 0000000..e77e74a --- /dev/null +++ b/components/adminsrv/pkg/service/group_permission.go @@ -0,0 +1,114 @@ +package service + +import ( + "context" + "encoding/json" + + "github.com/RafaySystems/rcloud-base/components/adminsrv/internal/dao" + "github.com/RafaySystems/rcloud-base/components/adminsrv/internal/models" + "github.com/RafaySystems/rcloud-base/components/common/pkg/persistence/provider/pg" + "github.com/RafaySystems/rcloud-base/components/common/proto/types/sentry" + "github.com/google/uuid" + "github.com/uptrace/bun" +) + +// GroupPermissionService is the interface for group permission operations +type GroupPermissionService interface { + Close() error + GetGroupPermissions(ctx context.Context, groupNames []string, orgID, partnerID string) ([]sentry.GroupPermission, error) + GetGroupProjectsByPermission(ctx context.Context, groupNames []string, orgID, partnerID string, permission string) ([]sentry.GroupPermission, error) + GetGroupPermissionsByProjectIDPermissions(ctx context.Context, groupNames []string, orgID, partnerID string, projects []string, permissions []string) ([]sentry.GroupPermission, error) + GetProjectByGroup(ctx context.Context, groupNames []string, orgID, partnerID string) ([]sentry.GroupPermission, error) +} + +// groupPermissionService implements GroupPermissionService +type groupPermissionService struct { + dao pg.EntityDAO + pdao dao.PermissionDao +} + +// NewKubeconfigRevocation return new kubeconfig revocation service +func NewGroupPermissionService(db *bun.DB) GroupPermissionService { + edao := pg.NewEntityDAO(db) + return &groupPermissionService{ + dao: edao, + pdao: dao.NewPermissionDao(edao), + } +} + +func (s *groupPermissionService) Close() error { + return s.dao.Close() +} + +func (s *groupPermissionService) GetGroupPermissions(ctx context.Context, groupNames []string, orgID, partnerID string) ([]sentry.GroupPermission, error) { + gps, err := s.pdao.GetGroupPermissions(ctx, groupNames, uuid.MustParse(orgID), uuid.MustParse(partnerID)) + if err != nil { + return nil, err + } + groupPermissions := []sentry.GroupPermission{} + for _, gp := range gps { + groupPermissions = append(groupPermissions, prepareGroupPermissionResponse(gp)) + } + + return groupPermissions, nil +} + +func (a *groupPermissionService) GetGroupProjectsByPermission(ctx context.Context, groupNames []string, orgID, partnerID string, permission string) ([]sentry.GroupPermission, error) { + aps, err := a.pdao.GetGroupProjectsByPermission(ctx, groupNames, uuid.MustParse(orgID), uuid.MustParse(partnerID), permission) + if err != nil { + return nil, err + } + groupPermissions := []sentry.GroupPermission{} + for _, ap := range aps { + groupPermissions = append(groupPermissions, prepareGroupPermissionResponse(ap)) + } + + return groupPermissions, nil +} + +func (s *groupPermissionService) GetGroupPermissionsByProjectIDPermissions(ctx context.Context, groupNames []string, orgID, partnerID string, projects []string, permissions []string) ([]sentry.GroupPermission, error) { + gps, err := s.pdao.GetGroupPermissionsByProjectIDPermissions(ctx, groupNames, uuid.MustParse(orgID), uuid.MustParse(partnerID), projects, permissions) + if err != nil { + return nil, err + } + groupPermissions := []sentry.GroupPermission{} + for _, ap := range gps { + groupPermissions = append(groupPermissions, prepareGroupPermissionResponse(ap)) + } + + return groupPermissions, nil +} + +func (s *groupPermissionService) GetProjectByGroup(ctx context.Context, groupNames []string, orgID, partnerID string) ([]sentry.GroupPermission, error) { + gps, err := s.pdao.GetProjectByGroup(ctx, groupNames, uuid.MustParse(orgID), uuid.MustParse(partnerID)) + if err != nil { + return nil, err + } + groupPermissions := []sentry.GroupPermission{} + for _, ap := range gps { + groupPermissions = append(groupPermissions, prepareGroupPermissionResponse(ap)) + } + + return groupPermissions, nil +} + +func prepareGroupPermissionResponse(gps models.GroupPermission) sentry.GroupPermission { + var urls []*sentry.PermissionURL + if gps.Urls != nil { + json.Unmarshal(gps.Urls, &urls) + } + return sentry.GroupPermission{ + GroupID: gps.GroupId.String(), + ProjectID: gps.ProjecttId, + OrganizationID: gps.OrganizationId.String(), + PartnerID: gps.PartnerId.String(), + GroupName: gps.GroupName, + RoleName: gps.RoleName, + IsGlobal: gps.IsGlobal, + Scope: gps.Scope, + PermissionName: gps.PermissionName, + BaseURL: gps.BaseUrl, + Urls: urls, + ProjectName: gps.ProjectName, + } +} diff --git a/components/adminsrv/pkg/service/kubeconfig_revocation.go b/components/adminsrv/pkg/service/kubeconfig_revocation.go new file mode 100644 index 0000000..eb81856 --- /dev/null +++ b/components/adminsrv/pkg/service/kubeconfig_revocation.go @@ -0,0 +1,86 @@ +package service + +import ( + "context" + "database/sql" + "time" + + "github.com/RafaySystems/rcloud-base/components/adminsrv/internal/constants" + "github.com/RafaySystems/rcloud-base/components/adminsrv/internal/dao" + "github.com/RafaySystems/rcloud-base/components/adminsrv/internal/models" + "github.com/RafaySystems/rcloud-base/components/common/pkg/persistence/provider/pg" + "github.com/RafaySystems/rcloud-base/components/common/proto/types/sentry" + "github.com/google/uuid" + "github.com/uptrace/bun" + "google.golang.org/protobuf/types/known/timestamppb" +) + +// KubeconfigRevocation is the interface for bootstrap operations +type KubeconfigRevocationService interface { + Close() error + Get(ctx context.Context, orgID string, accountID string, isSSOUser bool) (*sentry.KubeconfigRevocation, error) + Patch(ctx context.Context, kr *sentry.KubeconfigRevocation) error +} + +// bootstrapService implements BootstrapService +type kubeconfigRevocationService struct { + dao pg.EntityDAO + kdao dao.KubeconfigDao +} + +// NewKubeconfigRevocation return new kubeconfig revocation service +func NewKubeconfigRevocationService(db *bun.DB) KubeconfigRevocationService { + edao := pg.NewEntityDAO(db) + return &kubeconfigRevocationService{ + dao: edao, + kdao: dao.NewKubeconfigDao(edao), + } +} + +func (krs *kubeconfigRevocationService) Close() error { + return krs.dao.Close() +} + +func (krs *kubeconfigRevocationService) Get(ctx context.Context, orgID string, accountID string, isSSOUser bool) (*sentry.KubeconfigRevocation, error) { + kr, err := krs.kdao.GetKubeconfigRevocation(ctx, uuid.MustParse(orgID), uuid.MustParse(accountID), isSSOUser) + if err == sql.ErrNoRows { + return nil, constants.ErrNotFound + } else if err != nil { + return nil, err + } + return prepareKubeCfgRevocationResponse(kr), nil +} + +func prepareKubeCfgRevocationResponse(kr *models.KubeconfigRevocation) *sentry.KubeconfigRevocation { + return &sentry.KubeconfigRevocation{ + OrganizationID: kr.OrganizationId.String(), + PartnerID: kr.PartnerId.String(), + AccountID: kr.AccountId.String(), + RevokedAt: timestamppb.New(kr.RevokedAt), + IsSSOUser: kr.IsSSOUser, + CreatedAt: timestamppb.New(kr.CreatedAt), + } +} + +func (krs *kubeconfigRevocationService) Patch(ctx context.Context, kr *sentry.KubeconfigRevocation) error { + err := krs.dao.GetInstance().RunInTx(ctx, &sql.TxOptions{}, func(ctx context.Context, tx bun.Tx) error { + _, err := krs.kdao.GetKubeconfigRevocation(ctx, uuid.MustParse(kr.OrganizationID), uuid.MustParse(kr.AccountID), kr.IsSSOUser) + if err != nil && err == sql.ErrNoRows { + kcr := convertToModel(kr) + kcr.CreatedAt = time.Now() + return krs.kdao.CreateKubeconfigRevocation(ctx, kcr) + } + return krs.kdao.UpdateKubeconfigRevocation(ctx, convertToModel(kr)) + }) + return err +} + +func convertToModel(kr *sentry.KubeconfigRevocation) *models.KubeconfigRevocation { + return &models.KubeconfigRevocation{ + OrganizationId: uuid.MustParse(kr.OrganizationID), + PartnerId: uuid.MustParse(kr.PartnerID), + AccountId: uuid.MustParse(kr.AccountID), + RevokedAt: kr.RevokedAt.AsTime(), + IsSSOUser: kr.IsSSOUser, + } +} diff --git a/components/adminsrv/pkg/service/kubeconfig_settings.go b/components/adminsrv/pkg/service/kubeconfig_settings.go new file mode 100644 index 0000000..554ec6c --- /dev/null +++ b/components/adminsrv/pkg/service/kubeconfig_settings.go @@ -0,0 +1,119 @@ +package service + +import ( + "context" + "database/sql" + "time" + + "github.com/RafaySystems/rcloud-base/components/adminsrv/internal/constants" + "github.com/RafaySystems/rcloud-base/components/adminsrv/internal/dao" + "github.com/RafaySystems/rcloud-base/components/adminsrv/internal/models" + "github.com/RafaySystems/rcloud-base/components/common/pkg/persistence/provider/pg" + "github.com/RafaySystems/rcloud-base/components/common/proto/types/sentry" + "github.com/google/uuid" + "github.com/uptrace/bun" + "google.golang.org/protobuf/types/known/timestamppb" +) + +// KubeconfigSettingService is the interface for kube config setting operations +type KubeconfigSettingService interface { + Close() error + Get(ctx context.Context, orgID string, accountID string, isSSO bool) (*sentry.KubeconfigSetting, error) + Patch(ctx context.Context, ks *sentry.KubeconfigSetting) error +} + +// kubeconfigSettingService implements KubeconfigSettingService +type kubeconfigSettingService struct { + dao pg.EntityDAO + kdao dao.KubeconfigDao +} + +// NewKubeconfigSettingService return new kubeconfig setting service +func NewKubeconfigSettingService(db *bun.DB) KubeconfigSettingService { + edao := pg.NewEntityDAO(db) + return &kubeconfigSettingService{ + dao: edao, + kdao: dao.NewKubeconfigDao(edao), + } +} + +func (krs *kubeconfigSettingService) Close() error { + return krs.dao.Close() +} + +func (kss *kubeconfigSettingService) Get(ctx context.Context, orgID string, accountID string, isSSO bool) (*sentry.KubeconfigSetting, error) { + oid, err := uuid.Parse(orgID) + if err != nil { + _log.Info("organization identifier is empty") + } + aid, err := uuid.Parse(accountID) + if err != nil { + _log.Info("account identifier is empty") + } + + kr, err := kss.kdao.GetKubeconfigSetting(ctx, oid, aid, isSSO) + if err == sql.ErrNoRows { + return nil, constants.ErrNotFound + } else if err != nil { + return nil, err + } + return prepareKubeCfgSettingResponse(kr), nil +} + +func (kss *kubeconfigSettingService) Patch(ctx context.Context, ks *sentry.KubeconfigSetting) error { + accId, err := uuid.Parse(ks.AccountID) + if err != nil { + accId = uuid.Nil + } + err = kss.dao.GetInstance().RunInTx(ctx, &sql.TxOptions{}, func(ctx context.Context, tx bun.Tx) error { + _, err := kss.kdao.GetKubeconfigSetting(ctx, uuid.MustParse(ks.OrganizationID), accId, ks.IsSSOUser) + db := convertToKubeCfgSettingModel(ks) + if err != nil && err == sql.ErrNoRows { + db.CreatedAt = time.Now() + return kss.kdao.CreateKubeconfigSetting(ctx, convertToKubeCfgSettingModel(ks)) + } + db.ModifiedAt = time.Now() + return kss.kdao.UpdateKubeconfigSetting(ctx, convertToKubeCfgSettingModel(ks)) + }) + return err +} + +func prepareKubeCfgSettingResponse(ks *models.KubeconfigSetting) *sentry.KubeconfigSetting { + return &sentry.KubeconfigSetting{ + Id: ks.ID.String(), + OrganizationID: ks.OrganizationId.String(), + PartnerID: ks.PartnerId.String(), + AccountID: ks.AccountId.String(), + Scope: ks.Scope, + ValiditySeconds: ks.ValiditySeconds, + CreatedAt: timestamppb.New(ks.CreatedAt), + ModifiedAt: timestamppb.New(ks.ModifiedAt), + EnableSessionCheck: ks.EnforceRsId, + IsSSOUser: ks.IsSSOUser, + EnablePrivateRelay: ks.EnablePrivateRelay, + EnforceOrgAdminSecretAccess: ks.EnforceOrgAdminSecretAccess, + DisableWebKubectl: ks.DisableWebKubectl, + DisableCLIKubectl: ks.DisableCLIKubectl, + } +} + +func convertToKubeCfgSettingModel(ks *sentry.KubeconfigSetting) *models.KubeconfigSetting { + kss := &models.KubeconfigSetting{ + OrganizationId: uuid.MustParse(ks.OrganizationID), + Scope: ks.Scope, + ValiditySeconds: ks.ValiditySeconds, + EnforceRsId: ks.EnableSessionCheck, + IsSSOUser: ks.IsSSOUser, + DisableWebKubectl: ks.DisableWebKubectl, + DisableCLIKubectl: ks.DisableCLIKubectl, + EnablePrivateRelay: ks.EnablePrivateRelay, + EnforceOrgAdminSecretAccess: ks.EnforceOrgAdminSecretAccess, + } + if ks.AccountID != "" { + kss.AccountId = uuid.MustParse(ks.AccountID) + } + if ks.PartnerID != "" { + kss.PartnerId = uuid.MustParse(ks.PartnerID) + } + return kss +} diff --git a/components/adminsrv/pkg/service/kubectl_cluster_setting.go b/components/adminsrv/pkg/service/kubectl_cluster_setting.go new file mode 100644 index 0000000..70cf722 --- /dev/null +++ b/components/adminsrv/pkg/service/kubectl_cluster_setting.go @@ -0,0 +1,98 @@ +package service + +import ( + "context" + "database/sql" + "time" + + "github.com/RafaySystems/rcloud-base/components/adminsrv/internal/constants" + "github.com/RafaySystems/rcloud-base/components/adminsrv/internal/dao" + "github.com/RafaySystems/rcloud-base/components/adminsrv/internal/models" + "github.com/RafaySystems/rcloud-base/components/common/pkg/persistence/provider/pg" + "github.com/RafaySystems/rcloud-base/components/common/proto/types/sentry" + "github.com/google/uuid" + "github.com/uptrace/bun" + "google.golang.org/protobuf/types/known/timestamppb" +) + +// KubectlClusterSettingsService is the interface for kubectl cluster setting operations +type KubectlClusterSettingsService interface { + Close() error + Get(ctx context.Context, orgID string, clusterID string) (*sentry.KubectlClusterSettings, error) + Patch(ctx context.Context, kc *sentry.KubectlClusterSettings) error +} + +// kubectlClusterSettingsService implements KubectlClusterSettingsService +type kubectlClusterSettingsService struct { + dao pg.EntityDAO + kdao dao.KubeconfigDao +} + +// NewKubectlClusterSettingsService return new kubectl cluster setting service +func NewkubectlClusterSettingsService(db *bun.DB) KubectlClusterSettingsService { + edao := pg.NewEntityDAO(db) + return &kubectlClusterSettingsService{ + dao: edao, + kdao: dao.NewKubeconfigDao(edao), + } +} + +func (kcs *kubectlClusterSettingsService) Close() error { + return kcs.dao.Close() +} + +func (kcs *kubectlClusterSettingsService) Get(ctx context.Context, orgID string, clusterID string) (*sentry.KubectlClusterSettings, error) { + kc, err := kcs.kdao.GetkubectlClusterSettings(ctx, uuid.MustParse(orgID), clusterID) + if err == sql.ErrNoRows { + return nil, constants.ErrNotFound + } else if err != nil { + return nil, err + } + return prepareKubectlSettingResponse(kc), nil +} + +func (kcs *kubectlClusterSettingsService) Patch(ctx context.Context, kc *sentry.KubectlClusterSettings) error { + err := kcs.dao.GetInstance().RunInTx(ctx, &sql.TxOptions{}, func(ctx context.Context, tx bun.Tx) error { + _, err := kcs.kdao.GetkubectlClusterSettings(ctx, uuid.MustParse(kc.OrganizationID), kc.Name) + if err != nil { + if err == sql.ErrNoRows { + kcsdb := convertToKubeCtlSettingModel(kc) + kcsdb.CreatedAt = time.Now() + kcs.kdao.CreatekubectlClusterSettings(ctx, kcsdb) + } + return err + } + kcsdb := convertToKubeCtlSettingModel(kc) + kcsdb.ModifiedAt = time.Now() + return kcs.kdao.UpdatekubectlClusterSettings(ctx, kcsdb) + }) + return err +} + +func convertToKubeCtlSettingModel(kcs *sentry.KubectlClusterSettings) *models.KubectlClusterSetting { + kcsm := &models.KubectlClusterSetting{ + Name: kcs.Name, + OrganizationId: uuid.MustParse(kcs.OrganizationID), + DisableWebKubectl: kcs.DisableWebKubectl, + DisableCliKubectl: kcs.DisableCLIKubectl, + } + if kcs.PartnerID != "" { + kcsm.PartnerId, _ = uuid.Parse(kcs.PartnerID) + } + return kcsm +} + +func prepareKubectlSettingResponse(kcs *models.KubectlClusterSetting) *sentry.KubectlClusterSettings { + kc := &sentry.KubectlClusterSettings{ + Name: kcs.Name, + OrganizationID: kcs.OrganizationId.String(), + DisableWebKubectl: kcs.DisableWebKubectl, + DisableCLIKubectl: kcs.DisableCliKubectl, + CreatedAt: timestamppb.New(kcs.CreatedAt), + ModifiedAt: timestamppb.New(kcs.ModifiedAt), + } + if kcs.PartnerId != uuid.Nil { + kc.PartnerID = kcs.PartnerId.String() + } + return kc +} diff --git a/components/adminsrv/pkg/service/metro.go b/components/adminsrv/pkg/service/metro.go deleted file mode 100644 index e4aa2b1..0000000 --- a/components/adminsrv/pkg/service/metro.go +++ /dev/null @@ -1,209 +0,0 @@ -package service - -import ( - "context" - "time" - - "github.com/RafaySystems/rcloud-base/components/common/pkg/models" - "github.com/RafaySystems/rcloud-base/components/common/pkg/persistence/provider/pg" - infrav3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/infrapb/v3" - "github.com/google/uuid" - bun "github.com/uptrace/bun" -) - -// MetroService is the interface for metro operations -type MetroService interface { - Close() error - // create metro - Create(ctx context.Context, metro *infrav3.Metro, oid uuid.NullUUID, pid uuid.NullUUID) (*infrav3.Metro, error) - // get metro by id - GetById(ctx context.Context, id uuid.UUID) (*infrav3.Metro, error) - // get metro by name - GetByName(ctx context.Context, name string, oid uuid.NullUUID, pid uuid.NullUUID) (*infrav3.Metro, error) - // get metro id by name - GetIDByName(ctx context.Context, name string, oid uuid.NullUUID, pid uuid.NullUUID) (uuid.UUID, error) - // create or update metro - Update(ctx context.Context, metro *infrav3.Metro, oid uuid.NullUUID, pid uuid.NullUUID) (*infrav3.Metro, error) - // delete metro - Delete(ctx context.Context, metro *infrav3.Metro, oid uuid.NullUUID, pid uuid.NullUUID) (*infrav3.Metro, error) - // list metro - List(ctx context.Context, oid uuid.NullUUID, pid uuid.NullUUID) (*[]infrav3.Metro, error) -} - -// metroService implements MetroService -type metroService struct { - dao pg.EntityDAO -} - -// NewProjectService return new project service -func NewMetroService(db *bun.DB) MetroService { - return &metroService{ - dao: pg.NewEntityDAO(db), - } -} - -func (s *metroService) Create(ctx context.Context, metro *infrav3.Metro, oid uuid.NullUUID, pid uuid.NullUUID) (*infrav3.Metro, error) { - - //convert v3 spec to internal models - metrodb := models.Metro{ - Name: metro.Name, - CreatedAt: time.Now(), - ModifiedAt: time.Now(), - Trash: false, - Latitude: metro.Latitude, - Longitude: metro.Longitude, - City: metro.City, - State: "", //metro.State, - Country: metro.Country, - CountryCode: "", //metro.CountryCode, - StateCode: "", //metro.StateCode, - OrganizationId: oid.UUID, - PartnerId: pid.UUID, - } - _, err := s.dao.Create(ctx, &metrodb) - if err != nil { - return nil, err - } - - return metro, nil - -} - -func (s *metroService) GetByName(ctx context.Context, name string, oid uuid.NullUUID, pid uuid.NullUUID) (*infrav3.Metro, error) { - - var metro infrav3.Metro - - entity, err := s.dao.GetByNamePartnerOrg(ctx, name, pid, oid, &models.Metro{}) - if err != nil { - return nil, err - } - - if metrodb, ok := entity.(*models.Metro); ok { - - metro := &infrav3.Metro{ - Name: metrodb.Name, - Country: metrodb.Country, - City: metrodb.City, - State: metrodb.State, - Latitude: metrodb.Latitude, - Longitude: metrodb.Longitude, - StateCode: metrodb.StateCode, - CountryCode: metrodb.CountryCode, - } - return metro, nil - - } - return &metro, nil -} - -func (s *metroService) GetById(ctx context.Context, id uuid.UUID) (*infrav3.Metro, error) { - var metro infrav3.Metro - - entity, err := s.dao.GetByID(ctx, id, &models.Metro{}) - if err != nil { - return nil, err - } - - if metrodb, ok := entity.(*models.Metro); ok { - - metro := &infrav3.Metro{ - Name: metrodb.Name, - Country: metrodb.Country, - City: metrodb.City, - State: metrodb.State, - Latitude: metrodb.Latitude, - Longitude: metrodb.Longitude, - StateCode: metrodb.StateCode, - CountryCode: metrodb.CountryCode, - } - return metro, nil - - } - return &metro, nil -} - -func (s *metroService) Update(ctx context.Context, metro *infrav3.Metro, oid uuid.NullUUID, pid uuid.NullUUID) (*infrav3.Metro, error) { - - entity, err := s.dao.GetByNamePartnerOrg(ctx, metro.Name, pid, oid, &models.Project{}) - if err != nil { - return metro, err - } - - if metrodb, ok := entity.(*models.Metro); ok { - //update metro details - metrodb.City = metro.City - metrodb.Country = metro.Country - metrodb.State = metro.State - metrodb.StateCode = metro.StateCode - metrodb.CountryCode = metro.CountryCode - metrodb.ModifiedAt = time.Now() - - _, err = s.dao.Update(ctx, metrodb.ID, metrodb) - if err != nil { - return metro, err - } - } - - return metro, nil -} - -func (s *metroService) Delete(ctx context.Context, metro *infrav3.Metro, oid uuid.NullUUID, pid uuid.NullUUID) (*infrav3.Metro, error) { - - entity, err := s.dao.GetByNamePartnerOrg(ctx, metro.Name, pid, oid, &models.Metro{}) - if err != nil { - return metro, err - } - if metrodb, ok := entity.(*models.Metro); ok { - err = s.dao.Delete(ctx, metrodb.ID, metrodb) - if err != nil { - return metro, err - } - } - - return metro, nil -} - -func (s *metroService) List(ctx context.Context, oid uuid.NullUUID, pid uuid.NullUUID) (*[]infrav3.Metro, error) { - - var metros []infrav3.Metro - var metrodbs []models.Metro - entities, err := s.dao.List(ctx, oid, pid, &metrodbs) - if err != nil { - return nil, err - } - - if metrodbs, ok := entities.(*[]models.Metro); ok { - for _, metrodb := range *metrodbs { - - metro := infrav3.Metro{ - Name: metrodb.Name, - City: metrodb.City, - State: metrodb.State, - Country: metrodb.Country, - Latitude: metrodb.Latitude, - Longitude: metrodb.Longitude, - StateCode: metrodb.StateCode, - CountryCode: metrodb.CountryCode, - } - metros = append(metros, metro) - } - } - - return &metros, nil -} - -func (s *metroService) GetIDByName(ctx context.Context, name string, oid uuid.NullUUID, pid uuid.NullUUID) (uuid.UUID, error) { - entity, err := s.dao.GetByNamePartnerOrg(ctx, name, pid, oid, &models.Metro{}) - if err != nil { - return uuid.Nil, err - } - - if metrodb, ok := entity.(*models.Metro); ok { - return metrodb.ID, nil - } - return uuid.Nil, nil -} - -func (s *metroService) Close() error { - return s.dao.Close() -} diff --git a/components/adminsrv/pkg/service/organization.go b/components/adminsrv/pkg/service/organization.go index f3b109b..c34bcd1 100644 --- a/components/adminsrv/pkg/service/organization.go +++ b/components/adminsrv/pkg/service/organization.go @@ -6,8 +6,8 @@ import ( "fmt" "time" - "github.com/RafaySystems/rcloud-base/components/common/pkg/models" systemv3 "github.com/RafaySystems/rcloud-base/components/adminsrv/proto/types/systempb/v3" + "github.com/RafaySystems/rcloud-base/components/common/pkg/models" "github.com/RafaySystems/rcloud-base/components/common/pkg/persistence/provider/pg" v3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/commonpb/v3" "github.com/google/uuid" @@ -51,7 +51,11 @@ func NewOrganizationService(db *bun.DB) OrganizationService { func (s *organizationService) Create(ctx context.Context, org *systemv3.Organization) (*systemv3.Organization, error) { - partnerId, _ := uuid.Parse(org.GetMetadata().GetPartner()) + var partner models.Partner + _, err := s.dao.GetByName(ctx, org.Metadata.Name, &partner) + if err != nil { + return nil, err + } //update default organization setting values org.Spec.Settings = &systemv3.OrganizationSettings{ @@ -78,7 +82,7 @@ func (s *organizationService) Create(ctx context.Context, org *systemv3.Organiza Trash: false, Settings: json.RawMessage(sb), BillingAddress: org.GetSpec().GetBillingAddress(), - PartnerId: partnerId, + PartnerId: partner.ID, Active: org.GetSpec().GetActive(), Approved: org.GetSpec().GetApproved(), Type: org.GetSpec().GetType(), @@ -151,41 +155,23 @@ func (s *organizationService) GetByID(ctx context.Context, id string) (*systemv3 if org, ok := entity.(*models.Organization); ok { - var settings systemv3.OrganizationSettings - err := json.Unmarshal(org.Settings, &settings) + var partner models.Partner + _, err := s.dao.GetByID(ctx, org.PartnerId, &partner) if err != nil { organization.Status = &v3.Status{ ConditionType: "Describe", - LastUpdated: timestamppb.Now(), ConditionStatus: v3.ConditionStatus_StatusFailed, + Reason: err.Error(), + LastUpdated: timestamppb.Now(), } return organization, err } - organization.Metadata = &v3.Metadata{ - Name: org.Name, - Description: org.Description, - Id: org.ID.String(), - Partner: org.PartnerId.String(), - ModifiedAt: timestamppb.New(org.ModifiedAt), - } - organization.Spec = &systemv3.OrganizationSpec{ - BillingAddress: org.BillingAddress, - Active: org.Active, - Approved: org.Approved, - Type: org.Type, - AddressLine1: org.AddressLine1, - AddressLine2: org.AddressLine2, - City: org.City, - Country: org.Country, - Phone: org.Phone, - State: org.State, - Zipcode: org.Zipcode, - IsPrivate: org.IsPrivate, - IsTotpEnabled: org.IsTOTPEnabled, - AreClustersShared: org.AreClustersShared, - Settings: &settings, + organization, err = prepareOrganizationResponse(organization, org, partner.Name) + if err != nil { + return organization, err } + organization.Status = &v3.Status{ ConditionType: "Describe", LastUpdated: timestamppb.Now(), @@ -198,9 +184,6 @@ func (s *organizationService) GetByID(ctx context.Context, id string) (*systemv3 organization := &systemv3.Organization{ ApiVersion: apiVersion, Kind: organizationKind, - Metadata: &v3.Metadata{ - Id: id, - }, Status: &v3.Status{ ConditionType: "Describe", ConditionStatus: v3.ConditionStatus_StatusNotSet, @@ -239,40 +222,26 @@ func (s *organizationService) GetByName(ctx context.Context, name string) (*syst if org, ok := entity.(*models.Organization); ok { - var settings systemv3.OrganizationSettings - err := json.Unmarshal(org.Settings, &settings) + var partner models.Partner + _, err := s.dao.GetByID(ctx, org.PartnerId, &partner) if err != nil { + organization.Metadata = &v3.Metadata{ + Name: name, + } organization.Status = &v3.Status{ ConditionType: "Describe", ConditionStatus: v3.ConditionStatus_StatusFailed, + Reason: err.Error(), + LastUpdated: timestamppb.Now(), } return organization, err } - organization.Metadata = &v3.Metadata{ - Name: org.Name, - Description: org.Description, - Id: org.ID.String(), - Partner: org.PartnerId.String(), - ModifiedAt: timestamppb.New(org.ModifiedAt), - } - organization.Spec = &systemv3.OrganizationSpec{ - BillingAddress: org.BillingAddress, - Active: org.Active, - Approved: org.Approved, - Type: org.Type, - AddressLine1: org.AddressLine1, - AddressLine2: org.AddressLine2, - City: org.City, - Country: org.Country, - Phone: org.Phone, - State: org.State, - Zipcode: org.Zipcode, - IsPrivate: org.IsPrivate, - IsTotpEnabled: org.IsTOTPEnabled, - AreClustersShared: org.AreClustersShared, - Settings: &settings, + organization, err = prepareOrganizationResponse(organization, org, partner.Name) + if err != nil { + return organization, err } + organization.Status = &v3.Status{ ConditionType: "Describe", LastUpdated: timestamppb.Now(), @@ -367,7 +336,8 @@ func (s *organizationService) Delete(ctx context.Context, organization *systemv3 } if org, ok := entity.(*models.Organization); ok { - err = s.dao.Delete(ctx, org.ID, org) + org.Trash = true + _, err := s.dao.Update(ctx, org.ID, org) if err != nil { organization.Status = &v3.Status{ ConditionType: "Delete", @@ -378,7 +348,6 @@ func (s *organizationService) Delete(ctx context.Context, organization *systemv3 return organization, err } //update v3 status - organization.Metadata.Id = org.ID.String() organization.Metadata.Name = org.Name organization.Metadata.ModifiedAt = timestamppb.New(org.ModifiedAt) organization.Status = &v3.Status{ @@ -418,14 +387,12 @@ func (s *organizationService) List(ctx context.Context, organization *systemv3.O var settings systemv3.OrganizationSettings err := json.Unmarshal(org.Settings, &settings) if err != nil { - fmt.Print(err) return nil, err } organization.Metadata = &v3.Metadata{ Name: org.Name, Description: org.Description, - Id: org.ID.String(), - Partner: org.PartnerId.String(), + Partner: partner.Name, ModifiedAt: timestamppb.New(org.ModifiedAt), } organization.Spec = &systemv3.OrganizationSpec{ @@ -456,11 +423,51 @@ func (s *organizationService) List(ctx context.Context, organization *systemv3.O } } else { - return organinzationList, fmt.Errorf("missing partner id in metadata") + return organinzationList, fmt.Errorf("missing partner in metadata") } return organinzationList, nil } +func prepareOrganizationResponse(organization *systemv3.Organization, org *models.Organization, partnerName string) (*systemv3.Organization, error) { + + var settings systemv3.OrganizationSettings + err := json.Unmarshal(org.Settings, &settings) + if err != nil { + organization.Status = &v3.Status{ + ConditionType: "Describe", + LastUpdated: timestamppb.Now(), + ConditionStatus: v3.ConditionStatus_StatusFailed, + } + return organization, err + } + + organization.Metadata = &v3.Metadata{ + Name: org.Name, + Description: org.Description, + Partner: partnerName, + ModifiedAt: timestamppb.New(org.ModifiedAt), + } + organization.Spec = &systemv3.OrganizationSpec{ + BillingAddress: org.BillingAddress, + Active: org.Active, + Approved: org.Approved, + Type: org.Type, + AddressLine1: org.AddressLine1, + AddressLine2: org.AddressLine2, + City: org.City, + Country: org.Country, + Phone: org.Phone, + State: org.State, + Zipcode: org.Zipcode, + IsPrivate: org.IsPrivate, + IsTotpEnabled: org.IsTOTPEnabled, + AreClustersShared: org.AreClustersShared, + Settings: &settings, + } + + return organization, nil +} + func (s *organizationService) Close() error { return s.dao.Close() } diff --git a/components/adminsrv/pkg/service/partner.go b/components/adminsrv/pkg/service/partner.go index 757671a..ac1d977 100644 --- a/components/adminsrv/pkg/service/partner.go +++ b/components/adminsrv/pkg/service/partner.go @@ -134,7 +134,6 @@ func (s *partnerService) GetByID(ctx context.Context, id string) (*systemv3.Part partner.Metadata = &v3.Metadata{ Name: part.Name, Description: part.Description, - Id: part.ID.String(), ModifiedAt: timestamppb.New(part.ModifiedAt), } partner.Spec = &systemv3.PartnerSpec{ @@ -204,7 +203,6 @@ func (s *partnerService) GetByName(ctx context.Context, name string) (*systemv3. partner.Metadata = &v3.Metadata{ Name: part.Name, Description: part.Description, - Id: part.ID.String(), ModifiedAt: timestamppb.New(part.ModifiedAt), } partner.Spec = &systemv3.PartnerSpec{ @@ -250,8 +248,7 @@ func (s *partnerService) GetByName(ctx context.Context, name string) (*systemv3. func (s *partnerService) Update(ctx context.Context, partner *systemv3.Partner) (*systemv3.Partner, error) { - id, _ := uuid.Parse(partner.Metadata.Id) - entity, err := s.dao.GetByID(ctx, id, &models.Partner{}) + entity, err := s.dao.GetByName(ctx, partner.Metadata.Name, &models.Partner{}) if err != nil { partner.Status = &v3.Status{ ConditionStatus: v3.ConditionStatus_StatusFailed, @@ -268,7 +265,6 @@ func (s *partnerService) Update(ctx context.Context, partner *systemv3.Partner) if part, ok := entity.(*models.Partner); ok { //update partner details - part.ID = id part.Name = partner.GetMetadata().Name part.Description = partner.GetMetadata().GetDescription() part.Settings = sb @@ -286,7 +282,7 @@ func (s *partnerService) Update(ctx context.Context, partner *systemv3.Partner) part.ModifiedAt = time.Now() //Update the partner details - _, err = s.dao.Update(ctx, id, part) + _, err = s.dao.Update(ctx, part.ID, part) if err != nil { partner.Status = &v3.Status{ ConditionStatus: v3.ConditionStatus_StatusFailed, @@ -309,17 +305,7 @@ func (s *partnerService) Update(ctx context.Context, partner *systemv3.Partner) } func (s *partnerService) Delete(ctx context.Context, partner *systemv3.Partner) (*systemv3.Partner, error) { - id, err := uuid.Parse(partner.Metadata.Id) - if err != nil { - partner.Status = &v3.Status{ - ConditionType: "Delete", - ConditionStatus: v3.ConditionStatus_StatusFailed, - Reason: err.Error(), - LastUpdated: timestamppb.Now(), - } - return partner, err - } - entity, err := s.dao.GetByID(ctx, id, &models.Partner{}) + entity, err := s.dao.GetByName(ctx, partner.Metadata.Name, &models.Partner{}) if err != nil { partner.Status = &v3.Status{ ConditionType: "Delete", @@ -331,7 +317,8 @@ func (s *partnerService) Delete(ctx context.Context, partner *systemv3.Partner) } if part, ok := entity.(*models.Partner); ok { - err = s.dao.Delete(ctx, id, part) + part.Trash = true + _, err := s.dao.Update(ctx, part.ID, part) if err != nil { partner.Status = &v3.Status{ ConditionType: "Delete", @@ -343,7 +330,6 @@ func (s *partnerService) Delete(ctx context.Context, partner *systemv3.Partner) } //update status if partner != nil { - partner.Metadata.Id = part.ID.String() partner.Metadata.Name = part.Name partner.Status = &v3.Status{ ConditionStatus: v3.ConditionStatus_StatusOK, diff --git a/components/adminsrv/pkg/service/project.go b/components/adminsrv/pkg/service/project.go index 0b38073..f3d9dcc 100644 --- a/components/adminsrv/pkg/service/project.go +++ b/components/adminsrv/pkg/service/project.go @@ -5,8 +5,8 @@ import ( "fmt" "time" - "github.com/RafaySystems/rcloud-base/components/common/pkg/models" systemv3 "github.com/RafaySystems/rcloud-base/components/adminsrv/proto/types/systempb/v3" + "github.com/RafaySystems/rcloud-base/components/common/pkg/models" "github.com/RafaySystems/rcloud-base/components/common/pkg/persistence/provider/pg" v3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/commonpb/v3" "github.com/google/uuid" @@ -51,8 +51,16 @@ func NewProjectService(db *bun.DB) ProjectService { func (s *projectService) Create(ctx context.Context, project *systemv3.Project) (*systemv3.Project, error) { - partnerId, _ := uuid.Parse(project.GetMetadata().GetPartner()) - organizationId, _ := uuid.Parse(project.GetMetadata().GetOrganization()) + if project.Metadata.Organization == "" { + return nil, fmt.Errorf("missing organization in metadata") + } + + var org models.Organization + _, err := s.dao.GetByName(ctx, project.Metadata.Organization, &org) + if err != nil { + return nil, err + } + //convert v3 spec to internal models proj := models.Project{ Name: project.GetMetadata().GetName(), @@ -60,8 +68,8 @@ func (s *projectService) Create(ctx context.Context, project *systemv3.Project) CreatedAt: time.Now(), ModifiedAt: time.Now(), Trash: false, - OrganizationId: organizationId, - PartnerId: partnerId, + OrganizationId: org.ID, + PartnerId: org.PartnerId, Default: project.GetSpec().GetDefault(), } entity, err := s.dao.Create(ctx, &proj) @@ -125,8 +133,6 @@ func (s *projectService) GetByID(ctx context.Context, id string) (*systemv3.Proj } if proj, ok := entity.(*models.Project); ok { - labels := make(map[string]string) - labels["organization"] = proj.OrganizationId.String() project.Metadata = &v3.Metadata{ Name: proj.Name, @@ -134,7 +140,6 @@ func (s *projectService) GetByID(ctx context.Context, id string) (*systemv3.Proj Id: proj.ID.String(), Organization: proj.OrganizationId.String(), Partner: proj.PartnerId.String(), - Labels: labels, ModifiedAt: timestamppb.New(proj.ModifiedAt), } project.Spec = &systemv3.ProjectSpec{ @@ -174,16 +179,24 @@ func (s *projectService) GetByName(ctx context.Context, name string) (*systemv3. } if proj, ok := entity.(*models.Project); ok { - labels := make(map[string]string) - labels["organization"] = proj.OrganizationId.String() + + var org models.Organization + _, err := s.dao.GetByID(ctx, proj.OrganizationId, &org) + if err != nil { + return nil, err + } + + var partner models.Partner + _, err = s.dao.GetByID(ctx, proj.PartnerId, &partner) + if err != nil { + return nil, err + } project.Metadata = &v3.Metadata{ Name: proj.Name, Description: proj.Description, - Id: proj.ID.String(), - Organization: proj.OrganizationId.String(), - Partner: proj.PartnerId.String(), - Labels: labels, + Organization: org.Name, + Partner: partner.Name, ModifiedAt: timestamppb.New(proj.ModifiedAt), } project.Spec = &systemv3.ProjectSpec{ @@ -257,7 +270,8 @@ func (s *projectService) Delete(ctx context.Context, project *systemv3.Project) return project, err } if proj, ok := entity.(*models.Project); ok { - err = s.dao.Delete(ctx, proj.ID, proj) + proj.Trash = true + _, err := s.dao.Update(ctx, proj.ID, proj) if err != nil { project.Status = &v3.Status{ ConditionType: "Delete", diff --git a/components/adminsrv/proto/rpc/organization.pb.go b/components/adminsrv/proto/rpc/organization.pb.go new file mode 100644 index 0000000..df393d6 --- /dev/null +++ b/components/adminsrv/proto/rpc/organization.pb.go @@ -0,0 +1,187 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc (unknown) +// source: proto/rpc/organization.proto + +package rpc + +import ( + v3 "github.com/RafaySystems/rcloud-base/components/adminsrv/proto/types/systempb/v3" + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +var File_proto_rpc_organization_proto protoreflect.FileDescriptor + +var file_proto_rpc_organization_proto_rawDesc = []byte{ + 0x0a, 0x1c, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x6f, 0x72, 0x67, 0x61, + 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, + 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x73, + 0x72, 0x76, 0x2e, 0x72, 0x70, 0x63, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, + 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2a, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x2f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x70, 0x62, 0x2f, 0x76, 0x33, 0x2f, 0x6f, 0x72, + 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x32, 0xf6, 0x07, 0x0a, 0x0c, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0xe4, 0x01, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61, + 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, + 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, + 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x1a, 0x27, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x73, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x4f, 0x72, + 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x7c, 0x92, 0x41, 0x3e, 0x4a, + 0x3c, 0x0a, 0x03, 0x32, 0x30, 0x31, 0x12, 0x35, 0x0a, 0x33, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, + 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x73, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, + 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x66, 0x75, 0x6c, 0x6c, 0x79, 0x2e, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x35, 0x22, 0x30, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x61, + 0x72, 0x74, 0x6e, 0x65, 0x72, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, + 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x7d, 0x2f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x01, 0x2a, 0x12, 0xa3, 0x01, 0x0a, 0x10, 0x47, 0x65, 0x74, + 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x27, 0x2e, + 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, + 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, + 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x2b, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, + 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, + 0x76, 0x33, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, + 0x69, 0x73, 0x74, 0x22, 0x39, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x33, 0x12, 0x31, 0x2f, 0x61, 0x75, + 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x2f, 0x7b, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x7d, + 0x2f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0xad, + 0x01, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x27, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x4f, + 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x27, 0x2e, 0x72, 0x61, + 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x79, + 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x48, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x42, 0x12, 0x40, 0x2f, 0x61, + 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x2f, 0x7b, + 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, + 0x7d, 0x2f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x7b, + 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x12, 0xb3, + 0x01, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, + 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, + 0x33, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x27, + 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x4b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x45, 0x1a, + 0x40, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, + 0x72, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x61, 0x72, 0x74, + 0x6e, 0x65, 0x72, 0x7d, 0x2f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6e, 0x61, 0x6d, 0x65, + 0x7d, 0x3a, 0x01, 0x2a, 0x12, 0xf2, 0x01, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, + 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x2e, 0x72, 0x61, + 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x79, + 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x27, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, + 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x33, + 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x89, 0x01, + 0x92, 0x41, 0x3e, 0x4a, 0x3c, 0x0a, 0x03, 0x32, 0x30, 0x34, 0x12, 0x35, 0x0a, 0x33, 0x52, 0x65, + 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x6f, 0x72, 0x67, 0x61, + 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x73, 0x20, 0x64, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x64, 0x20, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x66, 0x75, 0x6c, 0x6c, 0x79, + 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x42, 0x2a, 0x40, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, + 0x33, 0x2f, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x2e, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x7d, 0x2f, 0x6f, 0x72, 0x67, + 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x42, 0xd1, 0x04, 0x0a, 0x1a, 0x63, 0x6f, + 0x6d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x61, 0x64, 0x6d, 0x69, + 0x6e, 0x73, 0x72, 0x76, 0x2e, 0x72, 0x70, 0x63, 0x42, 0x11, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, + 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x61, 0x66, 0x61, 0x79, 0x53, + 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x2f, 0x72, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x62, 0x61, + 0x73, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x61, 0x64, + 0x6d, 0x69, 0x6e, 0x73, 0x72, 0x76, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x70, 0x63, + 0xa2, 0x02, 0x04, 0x52, 0x44, 0x41, 0x52, 0xaa, 0x02, 0x16, 0x52, 0x61, 0x66, 0x61, 0x79, 0x2e, + 0x44, 0x65, 0x76, 0x2e, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x73, 0x72, 0x76, 0x2e, 0x52, 0x70, 0x63, + 0xca, 0x02, 0x16, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x41, 0x64, 0x6d, + 0x69, 0x6e, 0x73, 0x72, 0x76, 0x5c, 0x52, 0x70, 0x63, 0xe2, 0x02, 0x22, 0x52, 0x61, 0x66, 0x61, + 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x73, 0x72, 0x76, 0x5c, 0x52, + 0x70, 0x63, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, + 0x19, 0x52, 0x61, 0x66, 0x61, 0x79, 0x3a, 0x3a, 0x44, 0x65, 0x76, 0x3a, 0x3a, 0x41, 0x64, 0x6d, + 0x69, 0x6e, 0x73, 0x72, 0x76, 0x3a, 0x3a, 0x52, 0x70, 0x63, 0x92, 0x41, 0xdf, 0x02, 0x12, 0x28, + 0x0a, 0x14, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x22, 0x0b, 0x0a, 0x09, 0x52, 0x61, 0x66, 0x61, 0x79, 0x20, + 0x44, 0x65, 0x76, 0x32, 0x03, 0x33, 0x2e, 0x30, 0x2a, 0x01, 0x02, 0x32, 0x10, 0x61, 0x70, 0x70, + 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x32, 0x10, 0x61, + 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x79, 0x61, 0x6d, 0x6c, 0x3a, + 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, + 0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x79, + 0x61, 0x6d, 0x6c, 0x52, 0x50, 0x0a, 0x03, 0x34, 0x30, 0x33, 0x12, 0x49, 0x0a, 0x47, 0x52, 0x65, + 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, + 0x75, 0x73, 0x65, 0x72, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x68, 0x61, + 0x76, 0x65, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x6f, + 0x20, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x2e, 0x52, 0x3b, 0x0a, 0x03, 0x34, 0x30, 0x34, 0x12, 0x34, 0x0a, 0x2a, + 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x74, 0x68, + 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, + 0x6e, 0x6f, 0x74, 0x20, 0x65, 0x78, 0x69, 0x73, 0x74, 0x2e, 0x12, 0x06, 0x0a, 0x04, 0x9a, 0x02, + 0x01, 0x07, 0x5a, 0x38, 0x0a, 0x25, 0x0a, 0x0a, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x41, 0x75, + 0x74, 0x68, 0x12, 0x17, 0x08, 0x02, 0x1a, 0x11, 0x58, 0x2d, 0x52, 0x41, 0x46, 0x41, 0x59, 0x2d, + 0x41, 0x50, 0x49, 0x2d, 0x4b, 0x45, 0x59, 0x49, 0x44, 0x20, 0x02, 0x0a, 0x0f, 0x0a, 0x09, 0x42, + 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, 0x68, 0x12, 0x02, 0x08, 0x01, 0x62, 0x1f, 0x0a, 0x0e, + 0x0a, 0x0a, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0x0a, 0x0d, + 0x0a, 0x09, 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var file_proto_rpc_organization_proto_goTypes = []interface{}{ + (*v3.Organization)(nil), // 0: rafay.dev.types.system.v3.Organization + (*v3.OrganizationList)(nil), // 1: rafay.dev.types.system.v3.OrganizationList +} +var file_proto_rpc_organization_proto_depIdxs = []int32{ + 0, // 0: rafay.dev.adminsrv.rpc.Organization.CreateOrganization:input_type -> rafay.dev.types.system.v3.Organization + 0, // 1: rafay.dev.adminsrv.rpc.Organization.GetOrganizations:input_type -> rafay.dev.types.system.v3.Organization + 0, // 2: rafay.dev.adminsrv.rpc.Organization.GetOrganization:input_type -> rafay.dev.types.system.v3.Organization + 0, // 3: rafay.dev.adminsrv.rpc.Organization.UpdateOrganization:input_type -> rafay.dev.types.system.v3.Organization + 0, // 4: rafay.dev.adminsrv.rpc.Organization.DeleteOrganization:input_type -> rafay.dev.types.system.v3.Organization + 0, // 5: rafay.dev.adminsrv.rpc.Organization.CreateOrganization:output_type -> rafay.dev.types.system.v3.Organization + 1, // 6: rafay.dev.adminsrv.rpc.Organization.GetOrganizations:output_type -> rafay.dev.types.system.v3.OrganizationList + 0, // 7: rafay.dev.adminsrv.rpc.Organization.GetOrganization:output_type -> rafay.dev.types.system.v3.Organization + 0, // 8: rafay.dev.adminsrv.rpc.Organization.UpdateOrganization:output_type -> rafay.dev.types.system.v3.Organization + 0, // 9: rafay.dev.adminsrv.rpc.Organization.DeleteOrganization:output_type -> rafay.dev.types.system.v3.Organization + 5, // [5:10] is the sub-list for method output_type + 0, // [0:5] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_proto_rpc_organization_proto_init() } +func file_proto_rpc_organization_proto_init() { + if File_proto_rpc_organization_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_proto_rpc_organization_proto_rawDesc, + NumEnums: 0, + NumMessages: 0, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_proto_rpc_organization_proto_goTypes, + DependencyIndexes: file_proto_rpc_organization_proto_depIdxs, + }.Build() + File_proto_rpc_organization_proto = out.File + file_proto_rpc_organization_proto_rawDesc = nil + file_proto_rpc_organization_proto_goTypes = nil + file_proto_rpc_organization_proto_depIdxs = nil +} diff --git a/components/adminsrv/proto/rpc/v3/organization.pb.gw.go b/components/adminsrv/proto/rpc/organization.pb.gw.go similarity index 94% rename from components/adminsrv/proto/rpc/v3/organization.pb.gw.go rename to components/adminsrv/proto/rpc/organization.pb.gw.go index 9e22549..7181267 100644 --- a/components/adminsrv/proto/rpc/v3/organization.pb.gw.go +++ b/components/adminsrv/proto/rpc/organization.pb.gw.go @@ -1,12 +1,12 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: proto/rpc/v3/organization.proto +// source: proto/rpc/organization.proto /* -Package rpcv3 is a reverse proxy. +Package rpc is a reverse proxy. It translates gRPC into RESTful JSON APIs. */ -package rpcv3 +package rpc import ( "context" @@ -450,7 +450,7 @@ func RegisterOrganizationHandlerServer(ctx context.Context, mux *runtime.ServeMu var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Organization/CreateOrganization", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.adminsrv.rpc.Organization/CreateOrganization", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -473,7 +473,7 @@ func RegisterOrganizationHandlerServer(ctx context.Context, mux *runtime.ServeMu var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Organization/GetOrganizations", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organizations")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.adminsrv.rpc.Organization/GetOrganizations", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organizations")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -496,7 +496,7 @@ func RegisterOrganizationHandlerServer(ctx context.Context, mux *runtime.ServeMu var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Organization/GetOrganization", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.name}")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.adminsrv.rpc.Organization/GetOrganization", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.name}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -519,7 +519,7 @@ func RegisterOrganizationHandlerServer(ctx context.Context, mux *runtime.ServeMu var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Organization/UpdateOrganization", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.name}")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.adminsrv.rpc.Organization/UpdateOrganization", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.name}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -542,7 +542,7 @@ func RegisterOrganizationHandlerServer(ctx context.Context, mux *runtime.ServeMu var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Organization/DeleteOrganization", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.name}")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.adminsrv.rpc.Organization/DeleteOrganization", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.name}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -604,7 +604,7 @@ func RegisterOrganizationHandlerClient(ctx context.Context, mux *runtime.ServeMu ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Organization/CreateOrganization", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.adminsrv.rpc.Organization/CreateOrganization", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -624,7 +624,7 @@ func RegisterOrganizationHandlerClient(ctx context.Context, mux *runtime.ServeMu ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Organization/GetOrganizations", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organizations")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.adminsrv.rpc.Organization/GetOrganizations", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organizations")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -644,7 +644,7 @@ func RegisterOrganizationHandlerClient(ctx context.Context, mux *runtime.ServeMu ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Organization/GetOrganization", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.name}")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.adminsrv.rpc.Organization/GetOrganization", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.name}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -664,7 +664,7 @@ func RegisterOrganizationHandlerClient(ctx context.Context, mux *runtime.ServeMu ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Organization/UpdateOrganization", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.name}")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.adminsrv.rpc.Organization/UpdateOrganization", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.name}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -684,7 +684,7 @@ func RegisterOrganizationHandlerClient(ctx context.Context, mux *runtime.ServeMu ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Organization/DeleteOrganization", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.name}")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.adminsrv.rpc.Organization/DeleteOrganization", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.name}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return diff --git a/components/adminsrv/proto/rpc/v3/organization.proto b/components/adminsrv/proto/rpc/organization.proto similarity index 84% rename from components/adminsrv/proto/rpc/v3/organization.proto rename to components/adminsrv/proto/rpc/organization.proto index 1b8e9c7..76b06cd 100644 --- a/components/adminsrv/proto/rpc/v3/organization.proto +++ b/components/adminsrv/proto/rpc/organization.proto @@ -1,22 +1,10 @@ syntax = "proto3"; -package rafay.dev.rpc.v3; +package rafay.dev.adminsrv.rpc; import "google/api/annotations.proto"; -import "gogoproto/gogo.proto"; import "protoc-gen-openapiv2/options/annotations.proto"; import "proto/types/systempb/v3/organization.proto"; -// Enable custom Marshal method. -option (gogoproto.marshaler_all) = true; -// Enable custom Unmarshal method. -option (gogoproto.unmarshaler_all) = true; -// Enable custom Size method (Required by Marshal and Unmarshal). -option (gogoproto.sizer_all) = true; -// Enable registration with golang/protobuf for the grpc-gateway. -option (gogoproto.goproto_registration) = true; -// Enable generation of XXX_MessageName methods for grpc-go/status. -option (gogoproto.messagename_all) = true; - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { info: { title: "Organization Service" diff --git a/components/adminsrv/proto/rpc/v3/organization_grpc.pb.go b/components/adminsrv/proto/rpc/organization_grpc.pb.go similarity index 89% rename from components/adminsrv/proto/rpc/v3/organization_grpc.pb.go rename to components/adminsrv/proto/rpc/organization_grpc.pb.go index c8f374f..46a3cf8 100644 --- a/components/adminsrv/proto/rpc/v3/organization_grpc.pb.go +++ b/components/adminsrv/proto/rpc/organization_grpc.pb.go @@ -2,9 +2,9 @@ // versions: // - protoc-gen-go-grpc v1.2.0 // - protoc (unknown) -// source: proto/rpc/v3/organization.proto +// source: proto/rpc/organization.proto -package rpcv3 +package rpc import ( context "context" @@ -40,7 +40,7 @@ func NewOrganizationClient(cc grpc.ClientConnInterface) OrganizationClient { func (c *organizationClient) CreateOrganization(ctx context.Context, in *v3.Organization, opts ...grpc.CallOption) (*v3.Organization, error) { out := new(v3.Organization) - err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.Organization/CreateOrganization", in, out, opts...) + err := c.cc.Invoke(ctx, "/rafay.dev.adminsrv.rpc.Organization/CreateOrganization", in, out, opts...) if err != nil { return nil, err } @@ -49,7 +49,7 @@ func (c *organizationClient) CreateOrganization(ctx context.Context, in *v3.Orga func (c *organizationClient) GetOrganizations(ctx context.Context, in *v3.Organization, opts ...grpc.CallOption) (*v3.OrganizationList, error) { out := new(v3.OrganizationList) - err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.Organization/GetOrganizations", in, out, opts...) + err := c.cc.Invoke(ctx, "/rafay.dev.adminsrv.rpc.Organization/GetOrganizations", in, out, opts...) if err != nil { return nil, err } @@ -58,7 +58,7 @@ func (c *organizationClient) GetOrganizations(ctx context.Context, in *v3.Organi func (c *organizationClient) GetOrganization(ctx context.Context, in *v3.Organization, opts ...grpc.CallOption) (*v3.Organization, error) { out := new(v3.Organization) - err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.Organization/GetOrganization", in, out, opts...) + err := c.cc.Invoke(ctx, "/rafay.dev.adminsrv.rpc.Organization/GetOrganization", in, out, opts...) if err != nil { return nil, err } @@ -67,7 +67,7 @@ func (c *organizationClient) GetOrganization(ctx context.Context, in *v3.Organiz func (c *organizationClient) UpdateOrganization(ctx context.Context, in *v3.Organization, opts ...grpc.CallOption) (*v3.Organization, error) { out := new(v3.Organization) - err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.Organization/UpdateOrganization", in, out, opts...) + err := c.cc.Invoke(ctx, "/rafay.dev.adminsrv.rpc.Organization/UpdateOrganization", in, out, opts...) if err != nil { return nil, err } @@ -76,7 +76,7 @@ func (c *organizationClient) UpdateOrganization(ctx context.Context, in *v3.Orga func (c *organizationClient) DeleteOrganization(ctx context.Context, in *v3.Organization, opts ...grpc.CallOption) (*v3.Organization, error) { out := new(v3.Organization) - err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.Organization/DeleteOrganization", in, out, opts...) + err := c.cc.Invoke(ctx, "/rafay.dev.adminsrv.rpc.Organization/DeleteOrganization", in, out, opts...) if err != nil { return nil, err } @@ -135,7 +135,7 @@ func _Organization_CreateOrganization_Handler(srv interface{}, ctx context.Conte } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/rafay.dev.rpc.v3.Organization/CreateOrganization", + FullMethod: "/rafay.dev.adminsrv.rpc.Organization/CreateOrganization", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(OrganizationServer).CreateOrganization(ctx, req.(*v3.Organization)) @@ -153,7 +153,7 @@ func _Organization_GetOrganizations_Handler(srv interface{}, ctx context.Context } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/rafay.dev.rpc.v3.Organization/GetOrganizations", + FullMethod: "/rafay.dev.adminsrv.rpc.Organization/GetOrganizations", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(OrganizationServer).GetOrganizations(ctx, req.(*v3.Organization)) @@ -171,7 +171,7 @@ func _Organization_GetOrganization_Handler(srv interface{}, ctx context.Context, } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/rafay.dev.rpc.v3.Organization/GetOrganization", + FullMethod: "/rafay.dev.adminsrv.rpc.Organization/GetOrganization", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(OrganizationServer).GetOrganization(ctx, req.(*v3.Organization)) @@ -189,7 +189,7 @@ func _Organization_UpdateOrganization_Handler(srv interface{}, ctx context.Conte } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/rafay.dev.rpc.v3.Organization/UpdateOrganization", + FullMethod: "/rafay.dev.adminsrv.rpc.Organization/UpdateOrganization", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(OrganizationServer).UpdateOrganization(ctx, req.(*v3.Organization)) @@ -207,7 +207,7 @@ func _Organization_DeleteOrganization_Handler(srv interface{}, ctx context.Conte } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/rafay.dev.rpc.v3.Organization/DeleteOrganization", + FullMethod: "/rafay.dev.adminsrv.rpc.Organization/DeleteOrganization", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(OrganizationServer).DeleteOrganization(ctx, req.(*v3.Organization)) @@ -219,7 +219,7 @@ func _Organization_DeleteOrganization_Handler(srv interface{}, ctx context.Conte // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var Organization_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "rafay.dev.rpc.v3.Organization", + ServiceName: "rafay.dev.adminsrv.rpc.Organization", HandlerType: (*OrganizationServer)(nil), Methods: []grpc.MethodDesc{ { @@ -244,5 +244,5 @@ var Organization_ServiceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "proto/rpc/v3/organization.proto", + Metadata: "proto/rpc/organization.proto", } diff --git a/components/adminsrv/proto/rpc/partner.pb.go b/components/adminsrv/proto/rpc/partner.pb.go new file mode 100644 index 0000000..6d932c6 --- /dev/null +++ b/components/adminsrv/proto/rpc/partner.pb.go @@ -0,0 +1,163 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc (unknown) +// source: proto/rpc/partner.proto + +package rpc + +import ( + v3 "github.com/RafaySystems/rcloud-base/components/adminsrv/proto/types/systempb/v3" + _ "github.com/gogo/protobuf/gogoproto" + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +var File_proto_rpc_partner_proto protoreflect.FileDescriptor + +var file_proto_rpc_partner_proto_rawDesc = []byte{ + 0x0a, 0x17, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x70, 0x61, 0x72, 0x74, + 0x6e, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x72, 0x61, 0x66, 0x61, 0x79, + 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x73, 0x72, 0x76, 0x2e, 0x72, 0x70, + 0x63, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, + 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x25, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x70, 0x62, 0x2f, 0x76, 0x33, 0x2f, 0x70, + 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x83, 0x05, 0x0a, + 0x07, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x12, 0xb0, 0x01, 0x0a, 0x0d, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x12, 0x22, 0x2e, 0x72, 0x61, 0x66, + 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x79, 0x73, + 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x1a, 0x22, + 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x6e, + 0x65, 0x72, 0x22, 0x57, 0x92, 0x41, 0x39, 0x4a, 0x37, 0x0a, 0x03, 0x32, 0x30, 0x31, 0x12, 0x30, + 0x0a, 0x2e, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, + 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x20, 0x69, 0x73, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x64, 0x20, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x66, 0x75, 0x6c, 0x6c, 0x79, 0x2e, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x22, 0x10, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, + 0x2f, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x3a, 0x01, 0x2a, 0x12, 0x7e, 0x0a, 0x0a, 0x47, + 0x65, 0x74, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x12, 0x22, 0x2e, 0x72, 0x61, 0x66, 0x61, + 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x79, 0x73, 0x74, + 0x65, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x1a, 0x22, 0x2e, + 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, + 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, + 0x72, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x12, 0x20, 0x2f, 0x61, 0x75, 0x74, 0x68, + 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x2f, 0x7b, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x12, 0x84, 0x01, 0x0a, 0x0d, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x12, 0x22, 0x2e, + 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, + 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, + 0x72, 0x1a, 0x22, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x73, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x61, + 0x72, 0x74, 0x6e, 0x65, 0x72, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x1a, 0x20, 0x2f, + 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x2f, + 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x3a, + 0x01, 0x2a, 0x12, 0xbd, 0x01, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x61, 0x72, + 0x74, 0x6e, 0x65, 0x72, 0x12, 0x22, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, + 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x33, + 0x2e, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x1a, 0x22, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, + 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, + 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x22, 0x64, 0x92, 0x41, + 0x39, 0x4a, 0x37, 0x0a, 0x03, 0x32, 0x30, 0x34, 0x12, 0x30, 0x0a, 0x2e, 0x52, 0x65, 0x74, 0x75, + 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, + 0x72, 0x20, 0x69, 0x73, 0x20, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x20, 0x73, 0x75, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x66, 0x75, 0x6c, 0x6c, 0x79, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, + 0x2a, 0x20, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x61, 0x72, 0x74, 0x6e, + 0x65, 0x72, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6e, 0x61, 0x6d, + 0x65, 0x7d, 0x42, 0xdb, 0x04, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, + 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x73, 0x72, 0x76, 0x2e, 0x72, 0x70, + 0x63, 0x42, 0x0c, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x61, + 0x66, 0x61, 0x79, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x2f, 0x72, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2d, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, + 0x73, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x73, 0x72, 0x76, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2f, 0x72, 0x70, 0x63, 0xa2, 0x02, 0x04, 0x52, 0x44, 0x41, 0x52, 0xaa, 0x02, 0x16, 0x52, 0x61, + 0x66, 0x61, 0x79, 0x2e, 0x44, 0x65, 0x76, 0x2e, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x73, 0x72, 0x76, + 0x2e, 0x52, 0x70, 0x63, 0xca, 0x02, 0x16, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, + 0x5c, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x73, 0x72, 0x76, 0x5c, 0x52, 0x70, 0x63, 0xe2, 0x02, 0x22, + 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x73, + 0x72, 0x76, 0x5c, 0x52, 0x70, 0x63, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0xea, 0x02, 0x19, 0x52, 0x61, 0x66, 0x61, 0x79, 0x3a, 0x3a, 0x44, 0x65, 0x76, 0x3a, + 0x3a, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x73, 0x72, 0x76, 0x3a, 0x3a, 0x52, 0x70, 0x63, 0x92, 0x41, + 0xda, 0x02, 0x12, 0x23, 0x0a, 0x0f, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x20, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x22, 0x0b, 0x0a, 0x09, 0x52, 0x61, 0x66, 0x61, 0x79, 0x20, 0x44, + 0x65, 0x76, 0x32, 0x03, 0x33, 0x2e, 0x30, 0x2a, 0x01, 0x02, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x32, 0x10, 0x61, 0x70, + 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x10, + 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, + 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x79, 0x61, + 0x6d, 0x6c, 0x52, 0x50, 0x0a, 0x03, 0x34, 0x30, 0x33, 0x12, 0x49, 0x0a, 0x47, 0x52, 0x65, 0x74, + 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, + 0x73, 0x65, 0x72, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x68, 0x61, 0x76, + 0x65, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x6f, 0x20, + 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x2e, 0x52, 0x3b, 0x0a, 0x03, 0x34, 0x30, 0x34, 0x12, 0x34, 0x0a, 0x2a, 0x52, + 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x74, 0x68, 0x65, + 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, + 0x6f, 0x74, 0x20, 0x65, 0x78, 0x69, 0x73, 0x74, 0x2e, 0x12, 0x06, 0x0a, 0x04, 0x9a, 0x02, 0x01, + 0x07, 0x5a, 0x38, 0x0a, 0x25, 0x0a, 0x0a, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x41, 0x75, 0x74, + 0x68, 0x12, 0x17, 0x08, 0x02, 0x1a, 0x11, 0x58, 0x2d, 0x52, 0x41, 0x46, 0x41, 0x59, 0x2d, 0x41, + 0x50, 0x49, 0x2d, 0x4b, 0x45, 0x59, 0x49, 0x44, 0x20, 0x02, 0x0a, 0x0f, 0x0a, 0x09, 0x42, 0x61, + 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, 0x68, 0x12, 0x02, 0x08, 0x01, 0x62, 0x1f, 0x0a, 0x0e, 0x0a, + 0x0a, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0x0a, 0x0d, 0x0a, + 0x09, 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0xc8, 0xe2, 0x1e, 0x01, + 0xd0, 0xe2, 0x1e, 0x01, 0xe0, 0xe2, 0x1e, 0x01, 0xc0, 0xe3, 0x1e, 0x01, 0xc8, 0xe3, 0x1e, 0x01, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var file_proto_rpc_partner_proto_goTypes = []interface{}{ + (*v3.Partner)(nil), // 0: rafay.dev.types.system.v3.Partner +} +var file_proto_rpc_partner_proto_depIdxs = []int32{ + 0, // 0: rafay.dev.adminsrv.rpc.Partner.CreatePartner:input_type -> rafay.dev.types.system.v3.Partner + 0, // 1: rafay.dev.adminsrv.rpc.Partner.GetPartner:input_type -> rafay.dev.types.system.v3.Partner + 0, // 2: rafay.dev.adminsrv.rpc.Partner.UpdatePartner:input_type -> rafay.dev.types.system.v3.Partner + 0, // 3: rafay.dev.adminsrv.rpc.Partner.DeletePartner:input_type -> rafay.dev.types.system.v3.Partner + 0, // 4: rafay.dev.adminsrv.rpc.Partner.CreatePartner:output_type -> rafay.dev.types.system.v3.Partner + 0, // 5: rafay.dev.adminsrv.rpc.Partner.GetPartner:output_type -> rafay.dev.types.system.v3.Partner + 0, // 6: rafay.dev.adminsrv.rpc.Partner.UpdatePartner:output_type -> rafay.dev.types.system.v3.Partner + 0, // 7: rafay.dev.adminsrv.rpc.Partner.DeletePartner:output_type -> rafay.dev.types.system.v3.Partner + 4, // [4:8] is the sub-list for method output_type + 0, // [0:4] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_proto_rpc_partner_proto_init() } +func file_proto_rpc_partner_proto_init() { + if File_proto_rpc_partner_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_proto_rpc_partner_proto_rawDesc, + NumEnums: 0, + NumMessages: 0, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_proto_rpc_partner_proto_goTypes, + DependencyIndexes: file_proto_rpc_partner_proto_depIdxs, + }.Build() + File_proto_rpc_partner_proto = out.File + file_proto_rpc_partner_proto_rawDesc = nil + file_proto_rpc_partner_proto_goTypes = nil + file_proto_rpc_partner_proto_depIdxs = nil +} diff --git a/components/adminsrv/proto/rpc/v3/partner.pb.gw.go b/components/adminsrv/proto/rpc/partner.pb.gw.go similarity index 95% rename from components/adminsrv/proto/rpc/v3/partner.pb.gw.go rename to components/adminsrv/proto/rpc/partner.pb.gw.go index 192d323..75cd5d0 100644 --- a/components/adminsrv/proto/rpc/v3/partner.pb.gw.go +++ b/components/adminsrv/proto/rpc/partner.pb.gw.go @@ -1,12 +1,12 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: proto/rpc/v3/partner.proto +// source: proto/rpc/partner.proto /* -Package rpcv3 is a reverse proxy. +Package rpc is a reverse proxy. It translates gRPC into RESTful JSON APIs. */ -package rpcv3 +package rpc import ( "context" @@ -286,7 +286,7 @@ func RegisterPartnerHandlerServer(ctx context.Context, mux *runtime.ServeMux, se var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Partner/CreatePartner", runtime.WithHTTPPathPattern("/auth/v3/partner")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.adminsrv.rpc.Partner/CreatePartner", runtime.WithHTTPPathPattern("/auth/v3/partner")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -309,7 +309,7 @@ func RegisterPartnerHandlerServer(ctx context.Context, mux *runtime.ServeMux, se var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Partner/GetPartner", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.name}")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.adminsrv.rpc.Partner/GetPartner", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.name}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -332,7 +332,7 @@ func RegisterPartnerHandlerServer(ctx context.Context, mux *runtime.ServeMux, se var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Partner/UpdatePartner", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.name}")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.adminsrv.rpc.Partner/UpdatePartner", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.name}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -355,7 +355,7 @@ func RegisterPartnerHandlerServer(ctx context.Context, mux *runtime.ServeMux, se var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Partner/DeletePartner", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.name}")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.adminsrv.rpc.Partner/DeletePartner", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.name}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -417,7 +417,7 @@ func RegisterPartnerHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Partner/CreatePartner", runtime.WithHTTPPathPattern("/auth/v3/partner")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.adminsrv.rpc.Partner/CreatePartner", runtime.WithHTTPPathPattern("/auth/v3/partner")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -437,7 +437,7 @@ func RegisterPartnerHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Partner/GetPartner", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.name}")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.adminsrv.rpc.Partner/GetPartner", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.name}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -457,7 +457,7 @@ func RegisterPartnerHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Partner/UpdatePartner", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.name}")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.adminsrv.rpc.Partner/UpdatePartner", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.name}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -477,7 +477,7 @@ func RegisterPartnerHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Partner/DeletePartner", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.name}")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.adminsrv.rpc.Partner/DeletePartner", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.name}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return diff --git a/components/adminsrv/proto/rpc/v3/partner.proto b/components/adminsrv/proto/rpc/partner.proto similarity index 98% rename from components/adminsrv/proto/rpc/v3/partner.proto rename to components/adminsrv/proto/rpc/partner.proto index 53ee83e..7cdb766 100644 --- a/components/adminsrv/proto/rpc/v3/partner.proto +++ b/components/adminsrv/proto/rpc/partner.proto @@ -1,5 +1,5 @@ syntax = "proto3"; -package rafay.dev.rpc.v3; +package rafay.dev.adminsrv.rpc; import "google/api/annotations.proto"; import "gogoproto/gogo.proto"; diff --git a/components/adminsrv/proto/rpc/v3/partner_grpc.pb.go b/components/adminsrv/proto/rpc/partner_grpc.pb.go similarity index 90% rename from components/adminsrv/proto/rpc/v3/partner_grpc.pb.go rename to components/adminsrv/proto/rpc/partner_grpc.pb.go index 28c0fbd..82abca7 100644 --- a/components/adminsrv/proto/rpc/v3/partner_grpc.pb.go +++ b/components/adminsrv/proto/rpc/partner_grpc.pb.go @@ -2,9 +2,9 @@ // versions: // - protoc-gen-go-grpc v1.2.0 // - protoc (unknown) -// source: proto/rpc/v3/partner.proto +// source: proto/rpc/partner.proto -package rpcv3 +package rpc import ( context "context" @@ -39,7 +39,7 @@ func NewPartnerClient(cc grpc.ClientConnInterface) PartnerClient { func (c *partnerClient) CreatePartner(ctx context.Context, in *v3.Partner, opts ...grpc.CallOption) (*v3.Partner, error) { out := new(v3.Partner) - err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.Partner/CreatePartner", in, out, opts...) + err := c.cc.Invoke(ctx, "/rafay.dev.adminsrv.rpc.Partner/CreatePartner", in, out, opts...) if err != nil { return nil, err } @@ -48,7 +48,7 @@ func (c *partnerClient) CreatePartner(ctx context.Context, in *v3.Partner, opts func (c *partnerClient) GetPartner(ctx context.Context, in *v3.Partner, opts ...grpc.CallOption) (*v3.Partner, error) { out := new(v3.Partner) - err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.Partner/GetPartner", in, out, opts...) + err := c.cc.Invoke(ctx, "/rafay.dev.adminsrv.rpc.Partner/GetPartner", in, out, opts...) if err != nil { return nil, err } @@ -57,7 +57,7 @@ func (c *partnerClient) GetPartner(ctx context.Context, in *v3.Partner, opts ... func (c *partnerClient) UpdatePartner(ctx context.Context, in *v3.Partner, opts ...grpc.CallOption) (*v3.Partner, error) { out := new(v3.Partner) - err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.Partner/UpdatePartner", in, out, opts...) + err := c.cc.Invoke(ctx, "/rafay.dev.adminsrv.rpc.Partner/UpdatePartner", in, out, opts...) if err != nil { return nil, err } @@ -66,7 +66,7 @@ func (c *partnerClient) UpdatePartner(ctx context.Context, in *v3.Partner, opts func (c *partnerClient) DeletePartner(ctx context.Context, in *v3.Partner, opts ...grpc.CallOption) (*v3.Partner, error) { out := new(v3.Partner) - err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.Partner/DeletePartner", in, out, opts...) + err := c.cc.Invoke(ctx, "/rafay.dev.adminsrv.rpc.Partner/DeletePartner", in, out, opts...) if err != nil { return nil, err } @@ -121,7 +121,7 @@ func _Partner_CreatePartner_Handler(srv interface{}, ctx context.Context, dec fu } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/rafay.dev.rpc.v3.Partner/CreatePartner", + FullMethod: "/rafay.dev.adminsrv.rpc.Partner/CreatePartner", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PartnerServer).CreatePartner(ctx, req.(*v3.Partner)) @@ -139,7 +139,7 @@ func _Partner_GetPartner_Handler(srv interface{}, ctx context.Context, dec func( } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/rafay.dev.rpc.v3.Partner/GetPartner", + FullMethod: "/rafay.dev.adminsrv.rpc.Partner/GetPartner", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PartnerServer).GetPartner(ctx, req.(*v3.Partner)) @@ -157,7 +157,7 @@ func _Partner_UpdatePartner_Handler(srv interface{}, ctx context.Context, dec fu } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/rafay.dev.rpc.v3.Partner/UpdatePartner", + FullMethod: "/rafay.dev.adminsrv.rpc.Partner/UpdatePartner", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PartnerServer).UpdatePartner(ctx, req.(*v3.Partner)) @@ -175,7 +175,7 @@ func _Partner_DeletePartner_Handler(srv interface{}, ctx context.Context, dec fu } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/rafay.dev.rpc.v3.Partner/DeletePartner", + FullMethod: "/rafay.dev.adminsrv.rpc.Partner/DeletePartner", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PartnerServer).DeletePartner(ctx, req.(*v3.Partner)) @@ -187,7 +187,7 @@ func _Partner_DeletePartner_Handler(srv interface{}, ctx context.Context, dec fu // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var Partner_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "rafay.dev.rpc.v3.Partner", + ServiceName: "rafay.dev.adminsrv.rpc.Partner", HandlerType: (*PartnerServer)(nil), Methods: []grpc.MethodDesc{ { @@ -208,5 +208,5 @@ var Partner_ServiceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "proto/rpc/v3/partner.proto", + Metadata: "proto/rpc/partner.proto", } diff --git a/components/adminsrv/proto/rpc/project.pb.go b/components/adminsrv/proto/rpc/project.pb.go new file mode 100644 index 0000000..3773e3b --- /dev/null +++ b/components/adminsrv/proto/rpc/project.pb.go @@ -0,0 +1,194 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc (unknown) +// source: proto/rpc/project.proto + +package rpc + +import ( + v3 "github.com/RafaySystems/rcloud-base/components/adminsrv/proto/types/systempb/v3" + _ "github.com/gogo/protobuf/gogoproto" + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +var File_proto_rpc_project_proto protoreflect.FileDescriptor + +var file_proto_rpc_project_proto_rawDesc = []byte{ + 0x0a, 0x17, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x72, 0x61, 0x66, 0x61, 0x79, + 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x73, 0x72, 0x76, 0x2e, 0x72, 0x70, + 0x63, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, + 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x25, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x70, 0x62, 0x2f, 0x76, 0x33, 0x2f, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0xbd, 0x08, 0x0a, + 0x07, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0xf1, 0x01, 0x0a, 0x0d, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x22, 0x2e, 0x72, 0x61, 0x66, + 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x79, 0x73, + 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x1a, 0x22, + 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x22, 0x97, 0x01, 0x92, 0x41, 0x39, 0x4a, 0x37, 0x0a, 0x03, 0x32, 0x30, 0x31, 0x12, + 0x30, 0x0a, 0x2e, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, + 0x20, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x69, 0x73, 0x20, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x64, 0x20, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x66, 0x75, 0x6c, 0x6c, 0x79, + 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x55, 0x22, 0x50, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, + 0x33, 0x2f, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x2e, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x7d, 0x2f, 0x6f, 0x72, 0x67, + 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x2e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x7d, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x3a, 0x01, 0x2a, 0x12, 0xb4, 0x01, 0x0a, + 0x0b, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x22, 0x2e, 0x72, + 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, + 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x1a, 0x26, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x59, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x53, + 0x12, 0x51, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x61, 0x72, 0x74, 0x6e, + 0x65, 0x72, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x61, 0x72, + 0x74, 0x6e, 0x65, 0x72, 0x7d, 0x2f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6f, 0x72, 0x67, + 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x73, 0x12, 0xbe, 0x01, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x12, 0x22, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x50, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x1a, 0x22, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, + 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, + 0x76, 0x33, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x68, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x62, 0x12, 0x60, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x61, 0x72, + 0x74, 0x6e, 0x65, 0x72, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, + 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x7d, 0x2f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6f, + 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x70, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6e, + 0x61, 0x6d, 0x65, 0x7d, 0x12, 0xc4, 0x01, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x22, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, + 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, + 0x76, 0x33, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x1a, 0x22, 0x2e, 0x72, 0x61, 0x66, + 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x79, 0x73, + 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x6b, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x65, 0x1a, 0x60, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, + 0x2f, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x2e, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x7d, 0x2f, 0x6f, 0x72, 0x67, 0x61, + 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x2e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, + 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x3a, 0x01, 0x2a, 0x12, 0xfe, 0x01, 0x0a, 0x0d, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x22, 0x2e, + 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, + 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x1a, 0x22, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x73, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x22, 0xa4, 0x01, 0x92, 0x41, 0x39, 0x4a, 0x37, 0x0a, 0x03, 0x32, + 0x30, 0x34, 0x12, 0x30, 0x0a, 0x2e, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, + 0x68, 0x65, 0x6e, 0x20, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x69, 0x73, 0x20, 0x64, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x20, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x66, 0x75, + 0x6c, 0x6c, 0x79, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x62, 0x2a, 0x60, 0x2f, 0x61, 0x75, 0x74, + 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x2f, 0x7b, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x7d, 0x2f, + 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x7b, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x42, 0xdb, 0x04, 0x0a, + 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x73, 0x72, 0x76, 0x2e, 0x72, 0x70, 0x63, 0x42, 0x0c, 0x50, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x61, 0x66, 0x61, 0x79, 0x53, 0x79, 0x73, + 0x74, 0x65, 0x6d, 0x73, 0x2f, 0x72, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x62, 0x61, 0x73, 0x65, + 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x61, 0x64, 0x6d, 0x69, + 0x6e, 0x73, 0x72, 0x76, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x70, 0x63, 0xa2, 0x02, + 0x04, 0x52, 0x44, 0x41, 0x52, 0xaa, 0x02, 0x16, 0x52, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x44, 0x65, + 0x76, 0x2e, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x73, 0x72, 0x76, 0x2e, 0x52, 0x70, 0x63, 0xca, 0x02, + 0x16, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x41, 0x64, 0x6d, 0x69, 0x6e, + 0x73, 0x72, 0x76, 0x5c, 0x52, 0x70, 0x63, 0xe2, 0x02, 0x22, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, + 0x44, 0x65, 0x76, 0x5c, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x73, 0x72, 0x76, 0x5c, 0x52, 0x70, 0x63, + 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x19, 0x52, + 0x61, 0x66, 0x61, 0x79, 0x3a, 0x3a, 0x44, 0x65, 0x76, 0x3a, 0x3a, 0x41, 0x64, 0x6d, 0x69, 0x6e, + 0x73, 0x72, 0x76, 0x3a, 0x3a, 0x52, 0x70, 0x63, 0x92, 0x41, 0xda, 0x02, 0x12, 0x23, 0x0a, 0x0f, + 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x22, + 0x0b, 0x0a, 0x09, 0x52, 0x61, 0x66, 0x61, 0x79, 0x20, 0x44, 0x65, 0x76, 0x32, 0x03, 0x33, 0x2e, + 0x30, 0x2a, 0x01, 0x02, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2f, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x79, 0x61, 0x6d, 0x6c, 0x52, 0x50, 0x0a, 0x03, + 0x34, 0x30, 0x33, 0x12, 0x49, 0x0a, 0x47, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, + 0x77, 0x68, 0x65, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x64, 0x6f, + 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x70, 0x65, 0x72, 0x6d, + 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x52, 0x3b, + 0x0a, 0x03, 0x34, 0x30, 0x34, 0x12, 0x34, 0x0a, 0x2a, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, + 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x65, 0x78, 0x69, + 0x73, 0x74, 0x2e, 0x12, 0x06, 0x0a, 0x04, 0x9a, 0x02, 0x01, 0x07, 0x5a, 0x38, 0x0a, 0x25, 0x0a, + 0x0a, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x41, 0x75, 0x74, 0x68, 0x12, 0x17, 0x08, 0x02, 0x1a, + 0x11, 0x58, 0x2d, 0x52, 0x41, 0x46, 0x41, 0x59, 0x2d, 0x41, 0x50, 0x49, 0x2d, 0x4b, 0x45, 0x59, + 0x49, 0x44, 0x20, 0x02, 0x0a, 0x0f, 0x0a, 0x09, 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, + 0x68, 0x12, 0x02, 0x08, 0x01, 0x62, 0x1f, 0x0a, 0x0e, 0x0a, 0x0a, 0x41, 0x70, 0x69, 0x4b, 0x65, + 0x79, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0x0a, 0x0d, 0x0a, 0x09, 0x42, 0x61, 0x73, 0x69, 0x63, + 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0xc8, 0xe2, 0x1e, 0x01, 0xd0, 0xe2, 0x1e, 0x01, 0xe0, 0xe2, + 0x1e, 0x01, 0xc0, 0xe3, 0x1e, 0x01, 0xc8, 0xe3, 0x1e, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +} + +var file_proto_rpc_project_proto_goTypes = []interface{}{ + (*v3.Project)(nil), // 0: rafay.dev.types.system.v3.Project + (*v3.ProjectList)(nil), // 1: rafay.dev.types.system.v3.ProjectList +} +var file_proto_rpc_project_proto_depIdxs = []int32{ + 0, // 0: rafay.dev.adminsrv.rpc.Project.CreateProject:input_type -> rafay.dev.types.system.v3.Project + 0, // 1: rafay.dev.adminsrv.rpc.Project.GetProjects:input_type -> rafay.dev.types.system.v3.Project + 0, // 2: rafay.dev.adminsrv.rpc.Project.GetProject:input_type -> rafay.dev.types.system.v3.Project + 0, // 3: rafay.dev.adminsrv.rpc.Project.UpdateProject:input_type -> rafay.dev.types.system.v3.Project + 0, // 4: rafay.dev.adminsrv.rpc.Project.DeleteProject:input_type -> rafay.dev.types.system.v3.Project + 0, // 5: rafay.dev.adminsrv.rpc.Project.CreateProject:output_type -> rafay.dev.types.system.v3.Project + 1, // 6: rafay.dev.adminsrv.rpc.Project.GetProjects:output_type -> rafay.dev.types.system.v3.ProjectList + 0, // 7: rafay.dev.adminsrv.rpc.Project.GetProject:output_type -> rafay.dev.types.system.v3.Project + 0, // 8: rafay.dev.adminsrv.rpc.Project.UpdateProject:output_type -> rafay.dev.types.system.v3.Project + 0, // 9: rafay.dev.adminsrv.rpc.Project.DeleteProject:output_type -> rafay.dev.types.system.v3.Project + 5, // [5:10] is the sub-list for method output_type + 0, // [0:5] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_proto_rpc_project_proto_init() } +func file_proto_rpc_project_proto_init() { + if File_proto_rpc_project_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_proto_rpc_project_proto_rawDesc, + NumEnums: 0, + NumMessages: 0, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_proto_rpc_project_proto_goTypes, + DependencyIndexes: file_proto_rpc_project_proto_depIdxs, + }.Build() + File_proto_rpc_project_proto = out.File + file_proto_rpc_project_proto_rawDesc = nil + file_proto_rpc_project_proto_goTypes = nil + file_proto_rpc_project_proto_depIdxs = nil +} diff --git a/components/adminsrv/proto/rpc/v3/project.pb.gw.go b/components/adminsrv/proto/rpc/project.pb.gw.go similarity index 95% rename from components/adminsrv/proto/rpc/v3/project.pb.gw.go rename to components/adminsrv/proto/rpc/project.pb.gw.go index 1018c7a..504a9bd 100644 --- a/components/adminsrv/proto/rpc/v3/project.pb.gw.go +++ b/components/adminsrv/proto/rpc/project.pb.gw.go @@ -1,12 +1,12 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: proto/rpc/v3/project.proto +// source: proto/rpc/project.proto /* -Package rpcv3 is a reverse proxy. +Package rpc is a reverse proxy. It translates gRPC into RESTful JSON APIs. */ -package rpcv3 +package rpc import ( "context" @@ -550,7 +550,7 @@ func RegisterProjectHandlerServer(ctx context.Context, mux *runtime.ServeMux, se var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Project/CreateProject", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/project")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.adminsrv.rpc.Project/CreateProject", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/project")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -573,7 +573,7 @@ func RegisterProjectHandlerServer(ctx context.Context, mux *runtime.ServeMux, se var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Project/GetProjects", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/projects")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.adminsrv.rpc.Project/GetProjects", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/projects")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -596,7 +596,7 @@ func RegisterProjectHandlerServer(ctx context.Context, mux *runtime.ServeMux, se var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Project/GetProject", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/project/{metadata.name}")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.adminsrv.rpc.Project/GetProject", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/project/{metadata.name}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -619,7 +619,7 @@ func RegisterProjectHandlerServer(ctx context.Context, mux *runtime.ServeMux, se var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Project/UpdateProject", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/project/{metadata.name}")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.adminsrv.rpc.Project/UpdateProject", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/project/{metadata.name}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -642,7 +642,7 @@ func RegisterProjectHandlerServer(ctx context.Context, mux *runtime.ServeMux, se var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Project/DeleteProject", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/project/{metadata.name}")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.adminsrv.rpc.Project/DeleteProject", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/project/{metadata.name}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -704,7 +704,7 @@ func RegisterProjectHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Project/CreateProject", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/project")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.adminsrv.rpc.Project/CreateProject", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/project")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -724,7 +724,7 @@ func RegisterProjectHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Project/GetProjects", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/projects")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.adminsrv.rpc.Project/GetProjects", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/projects")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -744,7 +744,7 @@ func RegisterProjectHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Project/GetProject", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/project/{metadata.name}")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.adminsrv.rpc.Project/GetProject", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/project/{metadata.name}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -764,7 +764,7 @@ func RegisterProjectHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Project/UpdateProject", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/project/{metadata.name}")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.adminsrv.rpc.Project/UpdateProject", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/project/{metadata.name}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -784,7 +784,7 @@ func RegisterProjectHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Project/DeleteProject", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/project/{metadata.name}")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.adminsrv.rpc.Project/DeleteProject", runtime.WithHTTPPathPattern("/auth/v3/partner/{metadata.partner}/organization/{metadata.organization}/project/{metadata.name}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return diff --git a/components/adminsrv/proto/rpc/v3/project.proto b/components/adminsrv/proto/rpc/project.proto similarity index 99% rename from components/adminsrv/proto/rpc/v3/project.proto rename to components/adminsrv/proto/rpc/project.proto index 197f452..8238f89 100644 --- a/components/adminsrv/proto/rpc/v3/project.proto +++ b/components/adminsrv/proto/rpc/project.proto @@ -1,5 +1,5 @@ syntax = "proto3"; -package rafay.dev.rpc.v3; +package rafay.dev.adminsrv.rpc; import "google/api/annotations.proto"; import "gogoproto/gogo.proto"; diff --git a/components/adminsrv/proto/rpc/v3/project_grpc.pb.go b/components/adminsrv/proto/rpc/project_grpc.pb.go similarity index 90% rename from components/adminsrv/proto/rpc/v3/project_grpc.pb.go rename to components/adminsrv/proto/rpc/project_grpc.pb.go index f7e4afd..5f65dc0 100644 --- a/components/adminsrv/proto/rpc/v3/project_grpc.pb.go +++ b/components/adminsrv/proto/rpc/project_grpc.pb.go @@ -2,9 +2,9 @@ // versions: // - protoc-gen-go-grpc v1.2.0 // - protoc (unknown) -// source: proto/rpc/v3/project.proto +// source: proto/rpc/project.proto -package rpcv3 +package rpc import ( context "context" @@ -40,7 +40,7 @@ func NewProjectClient(cc grpc.ClientConnInterface) ProjectClient { func (c *projectClient) CreateProject(ctx context.Context, in *v3.Project, opts ...grpc.CallOption) (*v3.Project, error) { out := new(v3.Project) - err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.Project/CreateProject", in, out, opts...) + err := c.cc.Invoke(ctx, "/rafay.dev.adminsrv.rpc.Project/CreateProject", in, out, opts...) if err != nil { return nil, err } @@ -49,7 +49,7 @@ func (c *projectClient) CreateProject(ctx context.Context, in *v3.Project, opts func (c *projectClient) GetProjects(ctx context.Context, in *v3.Project, opts ...grpc.CallOption) (*v3.ProjectList, error) { out := new(v3.ProjectList) - err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.Project/GetProjects", in, out, opts...) + err := c.cc.Invoke(ctx, "/rafay.dev.adminsrv.rpc.Project/GetProjects", in, out, opts...) if err != nil { return nil, err } @@ -58,7 +58,7 @@ func (c *projectClient) GetProjects(ctx context.Context, in *v3.Project, opts .. func (c *projectClient) GetProject(ctx context.Context, in *v3.Project, opts ...grpc.CallOption) (*v3.Project, error) { out := new(v3.Project) - err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.Project/GetProject", in, out, opts...) + err := c.cc.Invoke(ctx, "/rafay.dev.adminsrv.rpc.Project/GetProject", in, out, opts...) if err != nil { return nil, err } @@ -67,7 +67,7 @@ func (c *projectClient) GetProject(ctx context.Context, in *v3.Project, opts ... func (c *projectClient) UpdateProject(ctx context.Context, in *v3.Project, opts ...grpc.CallOption) (*v3.Project, error) { out := new(v3.Project) - err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.Project/UpdateProject", in, out, opts...) + err := c.cc.Invoke(ctx, "/rafay.dev.adminsrv.rpc.Project/UpdateProject", in, out, opts...) if err != nil { return nil, err } @@ -76,7 +76,7 @@ func (c *projectClient) UpdateProject(ctx context.Context, in *v3.Project, opts func (c *projectClient) DeleteProject(ctx context.Context, in *v3.Project, opts ...grpc.CallOption) (*v3.Project, error) { out := new(v3.Project) - err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.Project/DeleteProject", in, out, opts...) + err := c.cc.Invoke(ctx, "/rafay.dev.adminsrv.rpc.Project/DeleteProject", in, out, opts...) if err != nil { return nil, err } @@ -135,7 +135,7 @@ func _Project_CreateProject_Handler(srv interface{}, ctx context.Context, dec fu } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/rafay.dev.rpc.v3.Project/CreateProject", + FullMethod: "/rafay.dev.adminsrv.rpc.Project/CreateProject", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ProjectServer).CreateProject(ctx, req.(*v3.Project)) @@ -153,7 +153,7 @@ func _Project_GetProjects_Handler(srv interface{}, ctx context.Context, dec func } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/rafay.dev.rpc.v3.Project/GetProjects", + FullMethod: "/rafay.dev.adminsrv.rpc.Project/GetProjects", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ProjectServer).GetProjects(ctx, req.(*v3.Project)) @@ -171,7 +171,7 @@ func _Project_GetProject_Handler(srv interface{}, ctx context.Context, dec func( } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/rafay.dev.rpc.v3.Project/GetProject", + FullMethod: "/rafay.dev.adminsrv.rpc.Project/GetProject", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ProjectServer).GetProject(ctx, req.(*v3.Project)) @@ -189,7 +189,7 @@ func _Project_UpdateProject_Handler(srv interface{}, ctx context.Context, dec fu } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/rafay.dev.rpc.v3.Project/UpdateProject", + FullMethod: "/rafay.dev.adminsrv.rpc.Project/UpdateProject", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ProjectServer).UpdateProject(ctx, req.(*v3.Project)) @@ -207,7 +207,7 @@ func _Project_DeleteProject_Handler(srv interface{}, ctx context.Context, dec fu } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/rafay.dev.rpc.v3.Project/DeleteProject", + FullMethod: "/rafay.dev.adminsrv.rpc.Project/DeleteProject", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ProjectServer).DeleteProject(ctx, req.(*v3.Project)) @@ -219,7 +219,7 @@ func _Project_DeleteProject_Handler(srv interface{}, ctx context.Context, dec fu // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var Project_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "rafay.dev.rpc.v3.Project", + ServiceName: "rafay.dev.adminsrv.rpc.Project", HandlerType: (*ProjectServer)(nil), Methods: []grpc.MethodDesc{ { @@ -244,5 +244,5 @@ var Project_ServiceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "proto/rpc/v3/project.proto", + Metadata: "proto/rpc/project.proto", } diff --git a/components/adminsrv/proto/rpc/v3/organization.pb.go b/components/adminsrv/proto/rpc/v3/organization.pb.go deleted file mode 100644 index beaf121..0000000 --- a/components/adminsrv/proto/rpc/v3/organization.pb.go +++ /dev/null @@ -1,189 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.1 -// protoc (unknown) -// source: proto/rpc/v3/organization.proto - -package rpcv3 - -import ( - v3 "github.com/RafaySystems/rcloud-base/components/adminsrv/proto/types/systempb/v3" - _ "github.com/gogo/protobuf/gogoproto" - _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -var File_proto_rpc_v3_organization_proto protoreflect.FileDescriptor - -var file_proto_rpc_v3_organization_proto_rawDesc = []byte{ - 0x0a, 0x1f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x76, 0x33, 0x2f, 0x6f, - 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x10, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, - 0x2e, 0x76, 0x33, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, - 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, - 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2a, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, - 0x79, 0x70, 0x65, 0x73, 0x2f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x70, 0x62, 0x2f, 0x76, 0x33, - 0x2f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x32, 0xf6, 0x07, 0x0a, 0x0c, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0xe4, 0x01, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, - 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x2e, 0x72, 0x61, - 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x79, - 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x27, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, - 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x33, - 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x7c, 0x92, - 0x41, 0x3e, 0x4a, 0x3c, 0x0a, 0x03, 0x32, 0x30, 0x31, 0x12, 0x35, 0x0a, 0x33, 0x52, 0x65, 0x74, - 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x6f, 0x72, 0x67, 0x61, 0x6e, - 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x73, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x64, 0x20, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x66, 0x75, 0x6c, 0x6c, 0x79, 0x2e, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x35, 0x22, 0x30, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, - 0x2f, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x2e, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x7d, 0x2f, 0x6f, 0x72, 0x67, 0x61, - 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x01, 0x2a, 0x12, 0xa3, 0x01, 0x0a, 0x10, - 0x47, 0x65, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x12, 0x27, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, - 0x65, 0x73, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x4f, 0x72, 0x67, - 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x2b, 0x2e, 0x72, 0x61, 0x66, 0x61, - 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x79, 0x73, 0x74, - 0x65, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x39, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x33, 0x12, 0x31, - 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, - 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x61, 0x72, 0x74, 0x6e, - 0x65, 0x72, 0x7d, 0x2f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x12, 0xad, 0x01, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, - 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, - 0x33, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x27, - 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, - 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, - 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x48, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x42, 0x12, - 0x40, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, - 0x72, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x61, 0x72, 0x74, - 0x6e, 0x65, 0x72, 0x7d, 0x2f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6e, 0x61, 0x6d, 0x65, - 0x7d, 0x12, 0xb3, 0x01, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61, - 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, - 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, - 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x1a, 0x27, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, - 0x70, 0x65, 0x73, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x4f, 0x72, - 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x4b, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x45, 0x1a, 0x40, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x61, 0x72, - 0x74, 0x6e, 0x65, 0x72, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, - 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x7d, 0x2f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6e, - 0x61, 0x6d, 0x65, 0x7d, 0x3a, 0x01, 0x2a, 0x12, 0xf2, 0x01, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x27, - 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, - 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, - 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x27, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, - 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, - 0x2e, 0x76, 0x33, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x22, 0x89, 0x01, 0x92, 0x41, 0x3e, 0x4a, 0x3c, 0x0a, 0x03, 0x32, 0x30, 0x34, 0x12, 0x35, 0x0a, - 0x33, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x6f, - 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x73, 0x20, 0x64, - 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x20, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x66, 0x75, - 0x6c, 0x6c, 0x79, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x42, 0x2a, 0x40, 0x2f, 0x61, 0x75, 0x74, - 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x2f, 0x7b, 0x6d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x7d, 0x2f, - 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x6d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x42, 0xcf, 0x04, 0x0a, - 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, - 0x70, 0x63, 0x2e, 0x76, 0x33, 0x42, 0x11, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4a, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x61, 0x66, 0x61, 0x79, 0x53, 0x79, 0x73, 0x74, - 0x65, 0x6d, 0x73, 0x2f, 0x72, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x62, 0x61, 0x73, 0x65, 0x2f, - 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, - 0x73, 0x72, 0x76, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x76, 0x33, - 0x3b, 0x72, 0x70, 0x63, 0x76, 0x33, 0xa2, 0x02, 0x03, 0x52, 0x44, 0x52, 0xaa, 0x02, 0x10, 0x52, - 0x61, 0x66, 0x61, 0x79, 0x2e, 0x44, 0x65, 0x76, 0x2e, 0x52, 0x70, 0x63, 0x2e, 0x56, 0x33, 0xca, - 0x02, 0x10, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x52, 0x70, 0x63, 0x5c, - 0x56, 0x33, 0xe2, 0x02, 0x1c, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x52, - 0x70, 0x63, 0x5c, 0x56, 0x33, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0xea, 0x02, 0x13, 0x52, 0x61, 0x66, 0x61, 0x79, 0x3a, 0x3a, 0x44, 0x65, 0x76, 0x3a, 0x3a, - 0x52, 0x70, 0x63, 0x3a, 0x3a, 0x56, 0x33, 0x92, 0x41, 0xdf, 0x02, 0x12, 0x28, 0x0a, 0x14, 0x4f, - 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x22, 0x0b, 0x0a, 0x09, 0x52, 0x61, 0x66, 0x61, 0x79, 0x20, 0x44, 0x65, 0x76, - 0x32, 0x03, 0x33, 0x2e, 0x30, 0x2a, 0x01, 0x02, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x10, 0x61, 0x70, - 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x10, - 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x79, 0x61, 0x6d, 0x6c, - 0x52, 0x50, 0x0a, 0x03, 0x34, 0x30, 0x33, 0x12, 0x49, 0x0a, 0x47, 0x52, 0x65, 0x74, 0x75, 0x72, - 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, - 0x72, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, - 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x2e, 0x52, 0x3b, 0x0a, 0x03, 0x34, 0x30, 0x34, 0x12, 0x34, 0x0a, 0x2a, 0x52, 0x65, 0x74, - 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, - 0x20, 0x65, 0x78, 0x69, 0x73, 0x74, 0x2e, 0x12, 0x06, 0x0a, 0x04, 0x9a, 0x02, 0x01, 0x07, 0x5a, - 0x38, 0x0a, 0x25, 0x0a, 0x0a, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x41, 0x75, 0x74, 0x68, 0x12, - 0x17, 0x08, 0x02, 0x1a, 0x11, 0x58, 0x2d, 0x52, 0x41, 0x46, 0x41, 0x59, 0x2d, 0x41, 0x50, 0x49, - 0x2d, 0x4b, 0x45, 0x59, 0x49, 0x44, 0x20, 0x02, 0x0a, 0x0f, 0x0a, 0x09, 0x42, 0x61, 0x73, 0x69, - 0x63, 0x41, 0x75, 0x74, 0x68, 0x12, 0x02, 0x08, 0x01, 0x62, 0x1f, 0x0a, 0x0e, 0x0a, 0x0a, 0x41, - 0x70, 0x69, 0x4b, 0x65, 0x79, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0x0a, 0x0d, 0x0a, 0x09, 0x42, - 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0xc8, 0xe2, 0x1e, 0x01, 0xd0, 0xe2, - 0x1e, 0x01, 0xe0, 0xe2, 0x1e, 0x01, 0xc0, 0xe3, 0x1e, 0x01, 0xc8, 0xe3, 0x1e, 0x01, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var file_proto_rpc_v3_organization_proto_goTypes = []interface{}{ - (*v3.Organization)(nil), // 0: rafay.dev.types.system.v3.Organization - (*v3.OrganizationList)(nil), // 1: rafay.dev.types.system.v3.OrganizationList -} -var file_proto_rpc_v3_organization_proto_depIdxs = []int32{ - 0, // 0: rafay.dev.rpc.v3.Organization.CreateOrganization:input_type -> rafay.dev.types.system.v3.Organization - 0, // 1: rafay.dev.rpc.v3.Organization.GetOrganizations:input_type -> rafay.dev.types.system.v3.Organization - 0, // 2: rafay.dev.rpc.v3.Organization.GetOrganization:input_type -> rafay.dev.types.system.v3.Organization - 0, // 3: rafay.dev.rpc.v3.Organization.UpdateOrganization:input_type -> rafay.dev.types.system.v3.Organization - 0, // 4: rafay.dev.rpc.v3.Organization.DeleteOrganization:input_type -> rafay.dev.types.system.v3.Organization - 0, // 5: rafay.dev.rpc.v3.Organization.CreateOrganization:output_type -> rafay.dev.types.system.v3.Organization - 1, // 6: rafay.dev.rpc.v3.Organization.GetOrganizations:output_type -> rafay.dev.types.system.v3.OrganizationList - 0, // 7: rafay.dev.rpc.v3.Organization.GetOrganization:output_type -> rafay.dev.types.system.v3.Organization - 0, // 8: rafay.dev.rpc.v3.Organization.UpdateOrganization:output_type -> rafay.dev.types.system.v3.Organization - 0, // 9: rafay.dev.rpc.v3.Organization.DeleteOrganization:output_type -> rafay.dev.types.system.v3.Organization - 5, // [5:10] is the sub-list for method output_type - 0, // [0:5] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_proto_rpc_v3_organization_proto_init() } -func file_proto_rpc_v3_organization_proto_init() { - if File_proto_rpc_v3_organization_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_proto_rpc_v3_organization_proto_rawDesc, - NumEnums: 0, - NumMessages: 0, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_proto_rpc_v3_organization_proto_goTypes, - DependencyIndexes: file_proto_rpc_v3_organization_proto_depIdxs, - }.Build() - File_proto_rpc_v3_organization_proto = out.File - file_proto_rpc_v3_organization_proto_rawDesc = nil - file_proto_rpc_v3_organization_proto_goTypes = nil - file_proto_rpc_v3_organization_proto_depIdxs = nil -} diff --git a/components/adminsrv/proto/rpc/v3/partner.pb.go b/components/adminsrv/proto/rpc/v3/partner.pb.go deleted file mode 100644 index 2cdb8be..0000000 --- a/components/adminsrv/proto/rpc/v3/partner.pb.go +++ /dev/null @@ -1,161 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.1 -// protoc (unknown) -// source: proto/rpc/v3/partner.proto - -package rpcv3 - -import ( - v3 "github.com/RafaySystems/rcloud-base/components/adminsrv/proto/types/systempb/v3" - _ "github.com/gogo/protobuf/gogoproto" - _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -var File_proto_rpc_v3_partner_proto protoreflect.FileDescriptor - -var file_proto_rpc_v3_partner_proto_rawDesc = []byte{ - 0x0a, 0x1a, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x76, 0x33, 0x2f, 0x70, - 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x72, 0x61, - 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x1a, 0x1c, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, - 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, - 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x25, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, - 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x70, 0x62, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x61, 0x72, 0x74, - 0x6e, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x83, 0x05, 0x0a, 0x07, 0x50, 0x61, - 0x72, 0x74, 0x6e, 0x65, 0x72, 0x12, 0xb0, 0x01, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x12, 0x22, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, - 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, - 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x1a, 0x22, 0x2e, 0x72, 0x61, - 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x79, - 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x22, - 0x57, 0x92, 0x41, 0x39, 0x4a, 0x37, 0x0a, 0x03, 0x32, 0x30, 0x31, 0x12, 0x30, 0x0a, 0x2e, 0x52, - 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x70, 0x61, 0x72, - 0x74, 0x6e, 0x65, 0x72, 0x20, 0x69, 0x73, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, - 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x66, 0x75, 0x6c, 0x6c, 0x79, 0x2e, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x15, 0x22, 0x10, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x61, - 0x72, 0x74, 0x6e, 0x65, 0x72, 0x3a, 0x01, 0x2a, 0x12, 0x7e, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x50, - 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x12, 0x22, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, - 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, - 0x76, 0x33, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x1a, 0x22, 0x2e, 0x72, 0x61, 0x66, - 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x79, 0x73, - 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x22, 0x28, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x12, 0x20, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, - 0x2f, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x12, 0x84, 0x01, 0x0a, 0x0d, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x12, 0x22, 0x2e, 0x72, 0x61, 0x66, - 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x79, 0x73, - 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x1a, 0x22, - 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, - 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x6e, - 0x65, 0x72, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x1a, 0x20, 0x2f, 0x61, 0x75, 0x74, - 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x2f, 0x7b, 0x6d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x3a, 0x01, 0x2a, 0x12, - 0xbd, 0x01, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, - 0x72, 0x12, 0x22, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, - 0x70, 0x65, 0x73, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x61, - 0x72, 0x74, 0x6e, 0x65, 0x72, 0x1a, 0x22, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, - 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, - 0x33, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x22, 0x64, 0x92, 0x41, 0x39, 0x4a, 0x37, - 0x0a, 0x03, 0x32, 0x30, 0x34, 0x12, 0x30, 0x0a, 0x2e, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, - 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x20, 0x69, - 0x73, 0x20, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x20, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x66, 0x75, 0x6c, 0x6c, 0x79, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x2a, 0x20, 0x2f, - 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x2f, - 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x42, - 0xc5, 0x04, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, - 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x42, 0x0c, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, - 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x61, 0x66, 0x61, 0x79, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, - 0x73, 0x2f, 0x72, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x63, 0x6f, - 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x73, 0x72, - 0x76, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x76, 0x33, 0x3b, 0x72, - 0x70, 0x63, 0x76, 0x33, 0xa2, 0x02, 0x03, 0x52, 0x44, 0x52, 0xaa, 0x02, 0x10, 0x52, 0x61, 0x66, - 0x61, 0x79, 0x2e, 0x44, 0x65, 0x76, 0x2e, 0x52, 0x70, 0x63, 0x2e, 0x56, 0x33, 0xca, 0x02, 0x10, - 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x52, 0x70, 0x63, 0x5c, 0x56, 0x33, - 0xe2, 0x02, 0x1c, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x52, 0x70, 0x63, - 0x5c, 0x56, 0x33, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, - 0x02, 0x13, 0x52, 0x61, 0x66, 0x61, 0x79, 0x3a, 0x3a, 0x44, 0x65, 0x76, 0x3a, 0x3a, 0x52, 0x70, - 0x63, 0x3a, 0x3a, 0x56, 0x33, 0x92, 0x41, 0xda, 0x02, 0x12, 0x23, 0x0a, 0x0f, 0x50, 0x61, 0x72, - 0x74, 0x6e, 0x65, 0x72, 0x20, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x22, 0x0b, 0x0a, 0x09, - 0x52, 0x61, 0x66, 0x61, 0x79, 0x20, 0x44, 0x65, 0x76, 0x32, 0x03, 0x33, 0x2e, 0x30, 0x2a, 0x01, - 0x02, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, - 0x73, 0x6f, 0x6e, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x2f, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x79, 0x61, 0x6d, 0x6c, 0x52, 0x50, 0x0a, 0x03, 0x34, 0x30, 0x33, - 0x12, 0x49, 0x0a, 0x47, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, - 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, - 0x6e, 0x6f, 0x74, 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, - 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x52, 0x3b, 0x0a, 0x03, 0x34, - 0x30, 0x34, 0x12, 0x34, 0x0a, 0x2a, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, - 0x68, 0x65, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x65, 0x78, 0x69, 0x73, 0x74, 0x2e, - 0x12, 0x06, 0x0a, 0x04, 0x9a, 0x02, 0x01, 0x07, 0x5a, 0x38, 0x0a, 0x25, 0x0a, 0x0a, 0x41, 0x70, - 0x69, 0x4b, 0x65, 0x79, 0x41, 0x75, 0x74, 0x68, 0x12, 0x17, 0x08, 0x02, 0x1a, 0x11, 0x58, 0x2d, - 0x52, 0x41, 0x46, 0x41, 0x59, 0x2d, 0x41, 0x50, 0x49, 0x2d, 0x4b, 0x45, 0x59, 0x49, 0x44, 0x20, - 0x02, 0x0a, 0x0f, 0x0a, 0x09, 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, 0x68, 0x12, 0x02, - 0x08, 0x01, 0x62, 0x1f, 0x0a, 0x0e, 0x0a, 0x0a, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x41, 0x75, - 0x74, 0x68, 0x12, 0x00, 0x0a, 0x0d, 0x0a, 0x09, 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, - 0x68, 0x12, 0x00, 0xc8, 0xe2, 0x1e, 0x01, 0xd0, 0xe2, 0x1e, 0x01, 0xe0, 0xe2, 0x1e, 0x01, 0xc0, - 0xe3, 0x1e, 0x01, 0xc8, 0xe3, 0x1e, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var file_proto_rpc_v3_partner_proto_goTypes = []interface{}{ - (*v3.Partner)(nil), // 0: rafay.dev.types.system.v3.Partner -} -var file_proto_rpc_v3_partner_proto_depIdxs = []int32{ - 0, // 0: rafay.dev.rpc.v3.Partner.CreatePartner:input_type -> rafay.dev.types.system.v3.Partner - 0, // 1: rafay.dev.rpc.v3.Partner.GetPartner:input_type -> rafay.dev.types.system.v3.Partner - 0, // 2: rafay.dev.rpc.v3.Partner.UpdatePartner:input_type -> rafay.dev.types.system.v3.Partner - 0, // 3: rafay.dev.rpc.v3.Partner.DeletePartner:input_type -> rafay.dev.types.system.v3.Partner - 0, // 4: rafay.dev.rpc.v3.Partner.CreatePartner:output_type -> rafay.dev.types.system.v3.Partner - 0, // 5: rafay.dev.rpc.v3.Partner.GetPartner:output_type -> rafay.dev.types.system.v3.Partner - 0, // 6: rafay.dev.rpc.v3.Partner.UpdatePartner:output_type -> rafay.dev.types.system.v3.Partner - 0, // 7: rafay.dev.rpc.v3.Partner.DeletePartner:output_type -> rafay.dev.types.system.v3.Partner - 4, // [4:8] is the sub-list for method output_type - 0, // [0:4] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_proto_rpc_v3_partner_proto_init() } -func file_proto_rpc_v3_partner_proto_init() { - if File_proto_rpc_v3_partner_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_proto_rpc_v3_partner_proto_rawDesc, - NumEnums: 0, - NumMessages: 0, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_proto_rpc_v3_partner_proto_goTypes, - DependencyIndexes: file_proto_rpc_v3_partner_proto_depIdxs, - }.Build() - File_proto_rpc_v3_partner_proto = out.File - file_proto_rpc_v3_partner_proto_rawDesc = nil - file_proto_rpc_v3_partner_proto_goTypes = nil - file_proto_rpc_v3_partner_proto_depIdxs = nil -} diff --git a/components/adminsrv/proto/rpc/v3/project.pb.go b/components/adminsrv/proto/rpc/v3/project.pb.go deleted file mode 100644 index 3e1deb7..0000000 --- a/components/adminsrv/proto/rpc/v3/project.pb.go +++ /dev/null @@ -1,192 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.1 -// protoc (unknown) -// source: proto/rpc/v3/project.proto - -package rpcv3 - -import ( - v3 "github.com/RafaySystems/rcloud-base/components/adminsrv/proto/types/systempb/v3" - _ "github.com/gogo/protobuf/gogoproto" - _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -var File_proto_rpc_v3_project_proto protoreflect.FileDescriptor - -var file_proto_rpc_v3_project_proto_rawDesc = []byte{ - 0x0a, 0x1a, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x76, 0x33, 0x2f, 0x70, - 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x72, 0x61, - 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x1a, 0x1c, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, - 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, - 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x25, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, - 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x70, 0x62, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x72, 0x6f, 0x6a, - 0x65, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0xbd, 0x08, 0x0a, 0x07, 0x50, 0x72, - 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0xf1, 0x01, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x22, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, - 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, - 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x1a, 0x22, 0x2e, 0x72, 0x61, - 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x79, - 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x22, - 0x97, 0x01, 0x92, 0x41, 0x39, 0x4a, 0x37, 0x0a, 0x03, 0x32, 0x30, 0x31, 0x12, 0x30, 0x0a, 0x2e, - 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x70, 0x72, - 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x69, 0x73, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, - 0x20, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x66, 0x75, 0x6c, 0x6c, 0x79, 0x2e, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x55, 0x22, 0x50, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x70, - 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x2e, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x7d, 0x2f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, - 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x2e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x70, - 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x3a, 0x01, 0x2a, 0x12, 0xb4, 0x01, 0x0a, 0x0b, 0x47, 0x65, - 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x22, 0x2e, 0x72, 0x61, 0x66, 0x61, - 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x79, 0x73, 0x74, - 0x65, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x1a, 0x26, 0x2e, - 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, - 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, - 0x74, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x59, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x53, 0x12, 0x51, 0x2f, - 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x2f, - 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, - 0x72, 0x7d, 0x2f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, - 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, - 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, - 0x12, 0xbe, 0x01, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, - 0x22, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, - 0x73, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, 0x6f, 0x6a, - 0x65, 0x63, 0x74, 0x1a, 0x22, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, - 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x33, 0x2e, - 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x68, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x62, 0x12, - 0x60, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, - 0x72, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x61, 0x72, 0x74, - 0x6e, 0x65, 0x72, 0x7d, 0x2f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6f, 0x72, 0x67, 0x61, - 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, - 0x74, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6e, 0x61, 0x6d, 0x65, - 0x7d, 0x12, 0xc4, 0x01, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x6a, - 0x65, 0x63, 0x74, 0x12, 0x22, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, - 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x33, 0x2e, - 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x1a, 0x22, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, - 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, - 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x6b, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x65, 0x1a, 0x60, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x61, - 0x72, 0x74, 0x6e, 0x65, 0x72, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, - 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x7d, 0x2f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, - 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x70, 0x72, - 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, - 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x3a, 0x01, 0x2a, 0x12, 0xfe, 0x01, 0x0a, 0x0d, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x22, 0x2e, 0x72, 0x61, 0x66, - 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x79, 0x73, - 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x1a, 0x22, - 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, - 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, - 0x63, 0x74, 0x22, 0xa4, 0x01, 0x92, 0x41, 0x39, 0x4a, 0x37, 0x0a, 0x03, 0x32, 0x30, 0x34, 0x12, - 0x30, 0x0a, 0x2e, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, - 0x20, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x69, 0x73, 0x20, 0x64, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x64, 0x20, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x66, 0x75, 0x6c, 0x6c, 0x79, - 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x62, 0x2a, 0x60, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, - 0x33, 0x2f, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x2e, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x7d, 0x2f, 0x6f, 0x72, 0x67, - 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x2e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x7d, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x42, 0xc5, 0x04, 0x0a, 0x14, 0x63, 0x6f, - 0x6d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, - 0x76, 0x33, 0x42, 0x0c, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0x5a, 0x4a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, - 0x61, 0x66, 0x61, 0x79, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x2f, 0x72, 0x63, 0x6c, 0x6f, - 0x75, 0x64, 0x2d, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, - 0x74, 0x73, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x73, 0x72, 0x76, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x76, 0x33, 0x3b, 0x72, 0x70, 0x63, 0x76, 0x33, 0xa2, 0x02, - 0x03, 0x52, 0x44, 0x52, 0xaa, 0x02, 0x10, 0x52, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x44, 0x65, 0x76, - 0x2e, 0x52, 0x70, 0x63, 0x2e, 0x56, 0x33, 0xca, 0x02, 0x10, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, - 0x44, 0x65, 0x76, 0x5c, 0x52, 0x70, 0x63, 0x5c, 0x56, 0x33, 0xe2, 0x02, 0x1c, 0x52, 0x61, 0x66, - 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x52, 0x70, 0x63, 0x5c, 0x56, 0x33, 0x5c, 0x47, 0x50, - 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x52, 0x61, 0x66, 0x61, - 0x79, 0x3a, 0x3a, 0x44, 0x65, 0x76, 0x3a, 0x3a, 0x52, 0x70, 0x63, 0x3a, 0x3a, 0x56, 0x33, 0x92, - 0x41, 0xda, 0x02, 0x12, 0x23, 0x0a, 0x0f, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x22, 0x0b, 0x0a, 0x09, 0x52, 0x61, 0x66, 0x61, 0x79, 0x20, - 0x44, 0x65, 0x76, 0x32, 0x03, 0x33, 0x2e, 0x30, 0x2a, 0x01, 0x02, 0x32, 0x10, 0x61, 0x70, 0x70, - 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x32, 0x10, 0x61, - 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x79, 0x61, 0x6d, 0x6c, 0x3a, - 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, - 0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x79, - 0x61, 0x6d, 0x6c, 0x52, 0x50, 0x0a, 0x03, 0x34, 0x30, 0x33, 0x12, 0x49, 0x0a, 0x47, 0x52, 0x65, - 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, - 0x75, 0x73, 0x65, 0x72, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x68, 0x61, - 0x76, 0x65, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x6f, - 0x20, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x2e, 0x52, 0x3b, 0x0a, 0x03, 0x34, 0x30, 0x34, 0x12, 0x34, 0x0a, 0x2a, - 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x74, 0x68, - 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, - 0x6e, 0x6f, 0x74, 0x20, 0x65, 0x78, 0x69, 0x73, 0x74, 0x2e, 0x12, 0x06, 0x0a, 0x04, 0x9a, 0x02, - 0x01, 0x07, 0x5a, 0x38, 0x0a, 0x25, 0x0a, 0x0a, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x41, 0x75, - 0x74, 0x68, 0x12, 0x17, 0x08, 0x02, 0x1a, 0x11, 0x58, 0x2d, 0x52, 0x41, 0x46, 0x41, 0x59, 0x2d, - 0x41, 0x50, 0x49, 0x2d, 0x4b, 0x45, 0x59, 0x49, 0x44, 0x20, 0x02, 0x0a, 0x0f, 0x0a, 0x09, 0x42, - 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, 0x68, 0x12, 0x02, 0x08, 0x01, 0x62, 0x1f, 0x0a, 0x0e, - 0x0a, 0x0a, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0x0a, 0x0d, - 0x0a, 0x09, 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0xc8, 0xe2, 0x1e, - 0x01, 0xd0, 0xe2, 0x1e, 0x01, 0xe0, 0xe2, 0x1e, 0x01, 0xc0, 0xe3, 0x1e, 0x01, 0xc8, 0xe3, 0x1e, - 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var file_proto_rpc_v3_project_proto_goTypes = []interface{}{ - (*v3.Project)(nil), // 0: rafay.dev.types.system.v3.Project - (*v3.ProjectList)(nil), // 1: rafay.dev.types.system.v3.ProjectList -} -var file_proto_rpc_v3_project_proto_depIdxs = []int32{ - 0, // 0: rafay.dev.rpc.v3.Project.CreateProject:input_type -> rafay.dev.types.system.v3.Project - 0, // 1: rafay.dev.rpc.v3.Project.GetProjects:input_type -> rafay.dev.types.system.v3.Project - 0, // 2: rafay.dev.rpc.v3.Project.GetProject:input_type -> rafay.dev.types.system.v3.Project - 0, // 3: rafay.dev.rpc.v3.Project.UpdateProject:input_type -> rafay.dev.types.system.v3.Project - 0, // 4: rafay.dev.rpc.v3.Project.DeleteProject:input_type -> rafay.dev.types.system.v3.Project - 0, // 5: rafay.dev.rpc.v3.Project.CreateProject:output_type -> rafay.dev.types.system.v3.Project - 1, // 6: rafay.dev.rpc.v3.Project.GetProjects:output_type -> rafay.dev.types.system.v3.ProjectList - 0, // 7: rafay.dev.rpc.v3.Project.GetProject:output_type -> rafay.dev.types.system.v3.Project - 0, // 8: rafay.dev.rpc.v3.Project.UpdateProject:output_type -> rafay.dev.types.system.v3.Project - 0, // 9: rafay.dev.rpc.v3.Project.DeleteProject:output_type -> rafay.dev.types.system.v3.Project - 5, // [5:10] is the sub-list for method output_type - 0, // [0:5] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_proto_rpc_v3_project_proto_init() } -func file_proto_rpc_v3_project_proto_init() { - if File_proto_rpc_v3_project_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_proto_rpc_v3_project_proto_rawDesc, - NumEnums: 0, - NumMessages: 0, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_proto_rpc_v3_project_proto_goTypes, - DependencyIndexes: file_proto_rpc_v3_project_proto_depIdxs, - }.Build() - File_proto_rpc_v3_project_proto = out.File - file_proto_rpc_v3_project_proto_rawDesc = nil - file_proto_rpc_v3_project_proto_goTypes = nil - file_proto_rpc_v3_project_proto_depIdxs = nil -} diff --git a/components/adminsrv/server/audit_info.go b/components/adminsrv/server/audit_info.go new file mode 100644 index 0000000..8a249d4 --- /dev/null +++ b/components/adminsrv/server/audit_info.go @@ -0,0 +1,92 @@ +package server + +import ( + "context" + "fmt" + "strings" + + "github.com/RafaySystems/rcloud-base/components/common/pkg/query" + sentryrpc "github.com/RafaySystems/rcloud-base/components/common/proto/rpc/sentry" + + "github.com/RafaySystems/rcloud-base/components/adminsrv/pkg/sentry/kubeconfig" + "github.com/RafaySystems/rcloud-base/components/adminsrv/pkg/service" + "github.com/RafaySystems/rcloud-base/components/common/pkg/hasher" +) + +type auditInfoServer struct { + bs service.BootstrapService + aps service.AccountPermissionService +} + +var _ sentryrpc.AuditInformationServer = (*auditInfoServer)(nil) + +// NewAuditInfoServer returns new Audit Information Server +func NewAuditInfoServer(bs service.BootstrapService, aps service.AccountPermissionService) sentryrpc.AuditInformationServer { + return &auditInfoServer{bs: bs, aps: aps} +} + +func (s *auditInfoServer) LookupUser(ctx context.Context, req *sentryrpc.LookupUserRequest) (*sentryrpc.LookupUserResponse, error) { + + attrs := kubeconfig.GetCNAttributes(req.UserCN) + + _log.Infow("lookupUser", "attrs", attrs) + + if attrs.SystemUser { + return &sentryrpc.LookupUserResponse{ + UserName: attrs.Username, + AccountID: attrs.AccountID, + IsSSO: kubeconfig.GetStringFromBool(attrs.IsSSO), + OrganizationID: attrs.OrganizationID, + PartnerID: attrs.PartnerID, + SessionType: kubeconfig.GetSessionTypeString(attrs.SessionType), + }, nil + } + + accountID, err := hasher.IDFromHash(attrs.AccountID) + if err != nil { + return nil, err + } + + var userName string + account, err := s.aps.GetAccount(ctx, accountID) + if err != nil { + return nil, err + } + userName = account.Username + + return &sentryrpc.LookupUserResponse{ + UserName: userName, + AccountID: attrs.AccountID, + IsSSO: kubeconfig.GetStringFromBool(attrs.IsSSO), + OrganizationID: attrs.OrganizationID, + PartnerID: attrs.PartnerID, + SessionType: kubeconfig.GetSessionTypeString(attrs.SessionType), + }, nil +} + +func (s *auditInfoServer) LookupCluster(ctx context.Context, req *sentryrpc.LookupClusterRequest) (*sentryrpc.LookupClusterResponse, error) { + + strs := strings.SplitN(req.ClusterSNI, ".", 2) + if len(strs) != 2 { + return nil, fmt.Errorf("invalid cluster SNI %s", req.ClusterSNI) + } + + clusterID, relayHost := strs[0], strs[1] + + relayHost = fmt.Sprintf("*.%s", relayHost) + + bat, err := s.bs.GetBootstrapAgentTemplateForHost(ctx, relayHost) + if err != nil { + return nil, err + } + + ba, err := s.bs.GetBootstrapAgent(ctx, bat.Metadata.Labels["rafay.dev/connectorAgentTemplate"], query.WithName(clusterID), query.WithIgnoreScopeDefault(), query.WithDeleted()) + if err != nil { + _log.Infow("unable to get bootstrap agent", "req", req, "error", err) + return nil, err + } + + return &sentryrpc.LookupClusterResponse{ + Name: ba.Metadata.Labels["rafay.dev/clusterName"], + }, nil +} diff --git a/components/adminsrv/server/bootstrap.go b/components/adminsrv/server/bootstrap.go new file mode 100644 index 0000000..458d79b --- /dev/null +++ b/components/adminsrv/server/bootstrap.go @@ -0,0 +1,264 @@ +package server + +import ( + "context" + "database/sql" + "fmt" + + "github.com/RafaySystems/rcloud-base/components/adminsrv/pkg/service" + configrpc "github.com/RafaySystems/rcloud-base/components/common/proto/rpc/config" + + "github.com/RafaySystems/rcloud-base/components/common/pkg/gateway" + "github.com/RafaySystems/rcloud-base/components/common/pkg/log" + "github.com/RafaySystems/rcloud-base/components/common/pkg/query" + sentryrpc "github.com/RafaySystems/rcloud-base/components/common/proto/rpc/sentry" + commonv3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/commonpb/v3" + "github.com/RafaySystems/rcloud-base/components/common/proto/types/sentry" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + + "github.com/RafaySystems/rcloud-base/components/common/pkg/sentry/cryptoutil" + "github.com/RafaySystems/rcloud-base/components/common/pkg/sentry/util" +) + +var _log = log.GetLogger() + +type RelayNetworkDownloadData struct { + SentryAddr string + PeerHost string + PeerToken string + UserToken string + ConnectorToken string + RelayImage string + UserHostPort string + RelayHostPort string + RelayNetworkID string +} + +type RelayAgentDownloadData struct { + ClusterID string + SentryAddr string + Token string + RelayImage string + HostName string + TemplateName string + TemplateToken string +} + +type bootstrapServer struct { + bs service.BootstrapService + passFunc cryptoutil.PasswordFunc + configPool configrpc.ConfigPool +} + +var _ sentryrpc.BootstrapServer = (*bootstrapServer)(nil) + +func (s *bootstrapServer) GetBootstrapInfra(ctx context.Context, in *sentry.BootstrapInfra) (*sentry.BootstrapInfra, error) { + return s.bs.GetBootstrapInfra(ctx, in.Metadata.Name) +} + +func (s *bootstrapServer) PatchBootstrapInfra(ctx context.Context, in *sentry.BootstrapInfra) (*sentry.BootstrapInfra, error) { + err := s.bs.PatchBootstrapInfra(ctx, in) + return in, err +} + +func (s *bootstrapServer) PatchBootstrapAgentTemplate(ctx context.Context, in *sentry.BootstrapAgentTemplate) (*sentry.BootstrapAgentTemplate, error) { + err := s.bs.PatchBootstrapAgentTemplate(ctx, in) + return in, err +} + +func (s *bootstrapServer) GetBootstrapAgentTemplate(ctx context.Context, in *sentry.BootstrapAgentTemplate) (*sentry.BootstrapAgentTemplate, error) { + return s.bs.GetBootstrapAgentTemplate(ctx, in.Metadata.Name) +} + +func (s *bootstrapServer) CreateBootstrapAgent(ctx context.Context, in *sentry.BootstrapAgent) (*sentry.BootstrapAgent, error) { + err := s.bs.CreateBootstrapAgent(ctx, in) + + return in, err +} + +func (s *bootstrapServer) GetBootstrapAgent(ctx context.Context, in *sentry.BootstrapAgent) (ret *sentry.BootstrapAgent, err error) { + templateRef, err := util.GetTemplateScope(in.Spec.TemplateRef) + if err != nil { + return + } + + ret, err = s.bs.GetBootstrapAgent(ctx, templateRef, query.WithMeta(in.Metadata)) + if err == sql.ErrNoRows { + err = status.Error(codes.NotFound, err.Error()) + } + return +} + +func (s *bootstrapServer) GetBootstrapAgentTemplates(ctx context.Context, qo *commonv3.QueryOptions) (*sentry.BootstrapAgentTemplateList, error) { + return s.bs.SelectBootstrapAgentTemplates(ctx, query.WithOptions(qo)) +} + +func (s *bootstrapServer) GetBootstrapAgents(ctx context.Context, in *sentryrpc.GetBootstrapAgentsRequest) (ret *sentry.BootstrapAgentList, err error) { + templateRef, err := util.GetTemplateScope(in.TemplateScope) + if err != nil { + return + } + + ret, err = s.bs.SelectBootstrapAgents(ctx, templateRef, query.WithOptions(in.Opts)) + if err != nil { + return nil, err + } + + return +} + +func (s *bootstrapServer) DeleteBootstrapAgent(ctx context.Context, in *sentry.BootstrapAgent) (ret *sentryrpc.DeleteBootstrapAgentResponse, err error) { + templateRef, err := util.GetTemplateScope(in.Spec.TemplateRef) + if err != nil { + return + } + + err = s.bs.DeleteBoostrapAgent(ctx, templateRef, query.WithMeta(in.Metadata)) + if err == sql.ErrNoRows { + err = status.Error(codes.NotFound, err.Error()) + } + + return &sentryrpc.DeleteBootstrapAgentResponse{}, err +} + +func (s *bootstrapServer) UpdateBootstrapAgent(ctx context.Context, in *sentry.BootstrapAgent) (ret *sentry.BootstrapAgent, err error) { + + templateRef, err := util.GetTemplateScope(in.Spec.TemplateRef) + if err != nil { + return + } + + err = s.bs.PatchBootstrapAgent(ctx, in, templateRef, query.WithMeta(in.Metadata)) + if err == sql.ErrNoRows { + err = status.Error(codes.NotFound, err.Error()) + } + + ret = in + + return +} + +func (s *bootstrapServer) RegisterBootstrapAgent(ctx context.Context, in *sentryrpc.RegisterAgentRequest) (resp *sentryrpc.RegisterAgentResponse, err error) { + _log.Infow("received agent register", "request", *in) + + resp = &sentryrpc.RegisterAgentResponse{} + + token, err := util.GetTemplateScope(in.TemplateToken) + if err != nil { + _log.Error(err.Error()) + return + } + + var template *sentry.BootstrapAgentTemplate + // bypass for auto registering core relay + if (token == "-" || token == "cd-relay") && !gateway.IsGatewayRequest(ctx) { + template, err = s.bs.GetBootstrapAgentTemplate(ctx, in.TemplateName) + if err != nil { + _log.Error(err.Error()) + return + } + } else { + template, err = s.bs.GetBootstrapAgentTemplateForToken(ctx, token) + if err != nil { + _log.Error(err.Error()) + return + } + } + + infra, err := s.bs.GetBootstrapInfra(ctx, template.Spec.InfraRef) + if err != nil { + _log.Error(err.Error()) + return + } + + var signer cryptoutil.Signer + var opts []cryptoutil.Option + + opts = append(opts, cryptoutil.WithCAKeyDecrypt(s.passFunc)) + + // only add altname for server or mixed templates + if template.Spec.TemplateType == sentry.BootstrapAgentTemplateType_Server || template.Spec.TemplateType == sentry.BootstrapAgentTemplateType_Mixed { + for _, host := range template.Spec.Hosts { + h, _ := util.ParseAddr(host.Host) + opts = append(opts, cryptoutil.WithAltName(h)) + } + } + + if template.Spec.TemplateType == sentry.BootstrapAgentTemplateType_Client { + opts = append(opts, cryptoutil.WithClient(), cryptoutil.WithCSRSubjectValidate(cryptoutil.CNShouldBe(in.Token))) + } else if template.Spec.TemplateType == sentry.BootstrapAgentTemplateType_Server { + opts = append(opts, cryptoutil.WithServer()) + } else if template.Spec.TemplateType == sentry.BootstrapAgentTemplateType_Mixed { + opts = append(opts, cryptoutil.WithServer(), cryptoutil.WithClient()) + } + + signer, err = cryptoutil.NewSigner([]byte(infra.Spec.CaCert), []byte(infra.Spec.CaKey), opts...) + if err != nil { + _log.Errorw("error getting cert signer", "error", err.Error()) + return + } + + signed, err := signer.Sign(in.Csr) + if err != nil { + _log.Error(err.Error()) + return + } + + var agent *sentry.BootstrapAgent + agent, err = s.bs.GetBootstrapAgentForToken(ctx, in.Token) + + // if agent is not found and template has auto register + if err == sql.ErrNoRows && template.Spec.AutoRegister { + agent = &sentry.BootstrapAgent{ + Metadata: &commonv3.Metadata{ + Name: in.Name, + }, Spec: &sentry.BootstrapAgentSpec{Token: in.Token, + TemplateRef: template.Metadata.Name, + }, + } + + err = s.bs.CreateBootstrapAgent(ctx, agent) + if err != nil { + _log.Error(err.Error()) + return + } + } else { + if err != nil { + //agent is nil + _log.Error(err.Error()) + return + } + } + + if agent.Spec.TemplateRef != template.Metadata.Name { + err = fmt.Errorf("token %s cannot be registered for template %s", in.Token, in.TemplateToken) + _log.Error(err.Error()) + return + } + + err = s.bs.RegisterBootstrapAgent(ctx, in.Token) + if err != nil { + _log.Error(err.Error()) + return + } + + resp.Certificate = signed + resp.CaCertificate = []byte(infra.Spec.CaCert) + + if template.Metadata.Name == "rafay-core-relay-agent" { + _log.Info("updating cluster status for :: ", agent.Metadata.Name) + err = s.bs.UpdateClusterStatus(ctx, agent.Metadata.Name) + } + + return +} + +func (s *bootstrapServer) GetBootstrapAgentConfig(ctx context.Context, in *sentry.BootstrapAgent) (*commonv3.HttpBody, error) { + return nil, nil +} + +// NewBootstrapServer return new bootstrap server +func NewBootstrapServer(bs service.BootstrapService, f cryptoutil.PasswordFunc, c configrpc.ConfigPool) sentryrpc.BootstrapServer { + return &bootstrapServer{bs, f, c} +} diff --git a/components/adminsrv/server/cluster_authz.go b/components/adminsrv/server/cluster_authz.go new file mode 100644 index 0000000..648fbbf --- /dev/null +++ b/components/adminsrv/server/cluster_authz.go @@ -0,0 +1,45 @@ +package server + +import ( + "context" + + configrpc "github.com/RafaySystems/rcloud-base/components/common/proto/rpc/config" + sentryrpc "github.com/RafaySystems/rcloud-base/components/common/proto/rpc/sentry" + + "github.com/RafaySystems/rcloud-base/components/adminsrv/pkg/sentry/authz" + "github.com/RafaySystems/rcloud-base/components/adminsrv/pkg/service" +) + +type clusterAuthzServer struct { + bs service.BootstrapService + aps service.AccountPermissionService + gps service.GroupPermissionService + krs service.KubeconfigRevocationService + kcs service.KubectlClusterSettingsService + kss service.KubeconfigSettingService + //apn models.AccountProjectNamespaceService + cPool configrpc.ConfigPool +} + +// GetUserAuthorization return authorization profile of user for a given cluster +func (s *clusterAuthzServer) GetUserAuthorization(ctx context.Context, req *sentryrpc.GetUserAuthorizationRequest) (*sentryrpc.GetUserAuthorizationResponse, error) { + resp, err := authz.GetAuthorization(ctx, req, s.bs, s.aps, s.gps, s.krs, s.kcs, s.kss, s.cPool) + if err != nil { + _log.Errorw("error getting auth profile", "req", req, "error", err.Error()) + return nil, err + } + return resp, nil +} + +// NewClusterAuthzServer returns New ClusterAuthzServer +func NewClusterAuthzServer(bs service.BootstrapService, aps service.AccountPermissionService, gps service.GroupPermissionService, krs service.KubeconfigRevocationService, kcs service.KubectlClusterSettingsService, kss service.KubeconfigSettingService, cPool configrpc.ConfigPool) sentryrpc.ClusterAuthorizationServer { + return &clusterAuthzServer{ + bs: bs, + aps: aps, + gps: gps, + krs: krs, + kcs: kcs, + kss: kss, + cPool: cPool, + } +} diff --git a/components/adminsrv/server/kubeconfig.go b/components/adminsrv/server/kubeconfig.go new file mode 100644 index 0000000..856c372 --- /dev/null +++ b/components/adminsrv/server/kubeconfig.go @@ -0,0 +1,317 @@ +package server + +import ( + "context" + "fmt" + "sort" + "time" + + "github.com/RafaySystems/rcloud-base/components/adminsrv/internal/constants" + "github.com/RafaySystems/rcloud-base/components/adminsrv/pkg/sentry/kubeconfig" + "github.com/RafaySystems/rcloud-base/components/adminsrv/pkg/service" + "github.com/RafaySystems/rcloud-base/components/common/pkg/query" + "github.com/RafaySystems/rcloud-base/components/common/pkg/sentry/cryptoutil" + "github.com/RafaySystems/rcloud-base/components/common/pkg/sentry/util" + sentryrpc "github.com/RafaySystems/rcloud-base/components/common/proto/rpc/sentry" + commonv3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/commonpb/v3" + sentry "github.com/RafaySystems/rcloud-base/components/common/proto/types/sentry" + "google.golang.org/protobuf/types/known/timestamppb" +) + +type kubeConfigServer struct { + bs service.BootstrapService + aps service.AccountPermissionService + gps service.GroupPermissionService + kss service.KubeconfigSettingService + krs service.KubeconfigRevocationService + pf cryptoutil.PasswordFunc +} + +var _ sentryrpc.KubeConfigServer = (*kubeConfigServer)(nil) + +func (s *kubeConfigServer) GetForClusterSystemSession(ctx context.Context, in *sentryrpc.GetForClusterRequest) (*commonv3.HttpBody, error) { + config, err := kubeconfig.GetConfigForCluster(ctx, s.bs, in, s.pf, s.kss, kubeconfig.RafaySystem) + if err != nil { + return nil, err + } + return &commonv3.HttpBody{ + ContentType: "application/yaml", + Data: config, + }, nil +} + +func (s *kubeConfigServer) GetForClusterWebSession(ctx context.Context, in *sentryrpc.GetForClusterRequest) (*commonv3.HttpBody, error) { + config, err := kubeconfig.GetConfigForCluster(ctx, s.bs, in, s.pf, s.kss, kubeconfig.WebShell) + if err != nil { + return nil, err + } + return &commonv3.HttpBody{ + ContentType: "application/yaml", + Data: config, + }, nil +} + +func (s *kubeConfigServer) GetForUser(ctx context.Context, in *sentryrpc.GetForUserRequest) (*commonv3.HttpBody, error) { + config, err := kubeconfig.GetConfigForUser(ctx, s.bs, s.aps, s.gps, in, s.pf, s.kss) + if err != nil { + _log.Errorw("error generating kubeconfig", "error", err.Error()) + return nil, err + } + return &commonv3.HttpBody{ + ContentType: "application/yaml", + Data: config, + }, nil +} + +func (s *kubeConfigServer) RevokeKubeconfig(ctx context.Context, req *sentryrpc.RevokeKubeconfigRequest) (*sentryrpc.RevokeKubeconfigResponse, error) { + opts := req.Opts + accountID, err := query.GetAccountID(opts) + if err != nil { + return nil, err + } + isSSOUser := false + + // if no user scope in url revoke for current user + if opts.UrlScope == "" { + isSSOUser = opts.IsSSOUser + } + err = s.krs.Patch(ctx, &sentry.KubeconfigRevocation{ + OrganizationID: opts.Organization, + PartnerID: opts.Partner, + AccountID: accountID, + IsSSOUser: isSSOUser, + RevokedAt: timestamppb.New(time.Now()), + }) + if err != nil { + return nil, err + } + + /*TODO: pending with events + revokeUser, err := kubeconfig.GetUserNameFromAccountID(ctx, accountID, opts.Organization, s.aps, opts.IsSSOUser) + acID := accountID + partnerID := opts.Partner + orgID := opts.Organization + kubeconfigRevokeEvent(ctx, "user.kubeconfig.revoke", orgID, partnerID, revokeUser, acID, opts.Username, opts.Account, opts.Groups) + */ + + return &sentryrpc.RevokeKubeconfigResponse{}, nil +} + +func (s *kubeConfigServer) GetOrganizationSetting(ctx context.Context, req *sentryrpc.GetKubeconfigSettingRequest) (*sentryrpc.GetKubeconfigSettingResponse, error) { + opts := req.Opts + orgID, err := util.GetOrganizationScope(opts.UrlScope) + + if err != nil { + return nil, err + } + if orgID != opts.Organization { + return nil, fmt.Errorf("invalid request") + } + ks, err := s.kss.Get(ctx, opts.Organization, "", false) + if err == constants.ErrNotFound { + return &sentryrpc.GetKubeconfigSettingResponse{ValiditySeconds: 31536000}, nil + } else if err != nil { + return nil, err + } + + resp := &sentryrpc.GetKubeconfigSettingResponse{ + ValiditySeconds: ks.ValiditySeconds, + EnableSessionCheck: ks.EnableSessionCheck, + EnablePrivateRelay: ks.EnablePrivateRelay, + EnforceOrgAdminSecretAccess: ks.EnforceOrgAdminSecretAccess, + DisableWebKubectl: ks.DisableWebKubectl, + DisableCLIKubectl: ks.DisableCLIKubectl, + } + return resp, nil +} + +func (s *kubeConfigServer) GetUserSetting(ctx context.Context, req *sentryrpc.GetKubeconfigSettingRequest) (*sentryrpc.GetKubeconfigSettingResponse, error) { + opts := req.Opts + accountID, err := util.GetUserScope(opts.UrlScope) + if err != nil { + return nil, err + } + ks, err := s.kss.Get(ctx, opts.Organization, accountID, false) + if err == constants.ErrNotFound { + return s.GetOrganizationSetting(ctx, req) + } else if err != nil { + return nil, err + } + resp := &sentryrpc.GetKubeconfigSettingResponse{ + ValiditySeconds: ks.ValiditySeconds, + EnableSessionCheck: ks.EnableSessionCheck, + EnablePrivateRelay: ks.EnablePrivateRelay, + EnforceOrgAdminSecretAccess: ks.EnforceOrgAdminSecretAccess, + DisableWebKubectl: ks.DisableWebKubectl, + DisableCLIKubectl: ks.DisableCLIKubectl, + } + return resp, nil + +} + +func (s *kubeConfigServer) UpdateOrganizationSetting(ctx context.Context, req *sentryrpc.UpdateKubeconfigSettingRequest) (*sentryrpc.UpdateKubeconfigSettingResponse, error) { + opts := req.Opts + orgID, err := util.GetOrganizationScope(opts.UrlScope) + if err != nil { + return nil, err + } + if orgID != opts.Organization { + return nil, fmt.Errorf("invalid request") + } + + err = s.kss.Patch(ctx, &sentry.KubeconfigSetting{ + OrganizationID: opts.Organization, + PartnerID: opts.Partner, + AccountID: "", + ValiditySeconds: req.ValiditySeconds, + EnableSessionCheck: req.EnableSessionCheck, + EnablePrivateRelay: req.EnablePrivateRelay, + EnforceOrgAdminSecretAccess: req.EnforceOrgAdminSecretAccess, + DisableWebKubectl: req.DisableWebKubectl, + DisableCLIKubectl: req.DisableCLIKubectl, + }) + if err != nil { + return nil, err + } + + /*TODO:pending with events + partnerID := opts.Partner + orgIDString := opts.Organization + kubeconfigSettingEvent(ctx, "user.kubeconfig.setting", orgIDString, partnerID, "", "", opts.Username, opts.Account, opts.Groups, req.ValiditySeconds, req.EnableSessionCheck) + */ + + return &sentryrpc.UpdateKubeconfigSettingResponse{}, nil +} + +func (s *kubeConfigServer) UpdateUserSetting(ctx context.Context, req *sentryrpc.UpdateKubeconfigSettingRequest) (*sentryrpc.UpdateKubeconfigSettingResponse, error) { + opts := req.Opts + accountID, err := util.GetUserScope(opts.UrlScope) + if err != nil { + return nil, err + } + _log.Infow("UpdateUserSetting", "req.EnforceOrgAdminSecretAccess", req.EnforceOrgAdminSecretAccess) + _log.Infow("UpdateUserSetting", "req.DisableWebKubectl", req.DisableWebKubectl) + + err = s.kss.Patch(ctx, &sentry.KubeconfigSetting{ + OrganizationID: opts.Organization, + PartnerID: opts.Partner, + AccountID: accountID, + ValiditySeconds: req.ValiditySeconds, + EnableSessionCheck: req.EnableSessionCheck, + IsSSOUser: false, + EnforceOrgAdminSecretAccess: req.EnforceOrgAdminSecretAccess, + DisableWebKubectl: req.DisableWebKubectl, + DisableCLIKubectl: req.DisableCLIKubectl, + }) + if err != nil { + return nil, err + } + + /*TODO: pending with events + forUser, err := kubeconfig.GetUserNameFromAccountID(ctx, accountID, opts.Organization, s.aps, opts.IsSSOUser) + acID := accountID + partnerID := opts.Partner + orgIDString := opts.Organization + kubeconfigSettingEvent(ctx, "user.kubeconfig.setting", orgIDString, partnerID, forUser, acID, opts.Username, opts.Account, opts.Groups, req.ValiditySeconds, req.EnableSessionCheck) + */ + return &sentryrpc.UpdateKubeconfigSettingResponse{}, nil +} + +// NewKubeConfigServer returns new kube config server +func NewKubeConfigServer(bs service.BootstrapService, aps service.AccountPermissionService, gps service.GroupPermissionService, kss service.KubeconfigSettingService, krs service.KubeconfigRevocationService, pf cryptoutil.PasswordFunc) sentryrpc.KubeConfigServer { + return &kubeConfigServer{bs, aps, gps, kss, krs, pf} +} + +func checkOrgAdmin(groups []string) bool { + orgGrp := "Organization Admins" + sort.Strings(groups) + indx := sort.SearchStrings(groups, orgGrp) + if indx < len(groups) { + if groups[indx] == orgGrp { + return true + } + } + return false +} + +func (s *kubeConfigServer) RevokeKubeconfigSSO(ctx context.Context, req *sentryrpc.RevokeKubeconfigRequest) (*sentryrpc.RevokeKubeconfigResponse, error) { + opts := req.Opts + accountID, err := query.GetAccountID(opts) + if err != nil { + return nil, err + } + err = s.krs.Patch(ctx, &sentry.KubeconfigRevocation{ + OrganizationID: opts.Organization, + PartnerID: opts.Partner, + AccountID: accountID, + IsSSOUser: true, + RevokedAt: timestamppb.New(time.Now()), + }) + if err != nil { + return nil, err + } + + /*TODO: pending with events + revokeUser, err := kubeconfig.GetUserNameFromAccountID(ctx, accountID, opts.Organization, s.aps, opts.IsSSOUser) + acID := accountID + partnerID := opts.Partner + orgID := opts.Organization + kubeconfigRevokeEvent(ctx, "user.kubeconfig.revoke", orgID, partnerID, revokeUser, acID, opts.Username, opts.Account.String(), opts.Groups) + */ + return &sentryrpc.RevokeKubeconfigResponse{}, nil +} +func (s *kubeConfigServer) GetSSOUserSetting(ctx context.Context, req *sentryrpc.GetKubeconfigSettingRequest) (*sentryrpc.GetKubeconfigSettingResponse, error) { + opts := req.Opts + accountID, err := query.GetAccountID(opts) + if err != nil { + return nil, err + } + ks, err := s.kss.Get(ctx, opts.Organization, accountID, true) + if err == constants.ErrNotFound { + return s.GetOrganizationSetting(ctx, req) + } else if err != nil { + return nil, err + } + resp := &sentryrpc.GetKubeconfigSettingResponse{ + ValiditySeconds: ks.ValiditySeconds, + EnableSessionCheck: ks.EnableSessionCheck, + EnablePrivateRelay: ks.EnablePrivateRelay, + EnforceOrgAdminSecretAccess: ks.EnforceOrgAdminSecretAccess, + DisableWebKubectl: ks.DisableWebKubectl, + DisableCLIKubectl: ks.DisableCLIKubectl, + } + return resp, nil +} + +func (s *kubeConfigServer) UpdateSSOUserSetting(ctx context.Context, req *sentryrpc.UpdateKubeconfigSettingRequest) (*sentryrpc.UpdateKubeconfigSettingResponse, error) { + opts := req.Opts + accountID, err := query.GetAccountID(opts) + if err != nil { + return nil, err + } + + err = s.kss.Patch(ctx, &sentry.KubeconfigSetting{ + OrganizationID: opts.Organization, + PartnerID: opts.Partner, + AccountID: accountID, + ValiditySeconds: req.ValiditySeconds, + EnableSessionCheck: req.EnableSessionCheck, + IsSSOUser: true, + EnforceOrgAdminSecretAccess: req.EnforceOrgAdminSecretAccess, + DisableWebKubectl: req.DisableWebKubectl, + DisableCLIKubectl: req.DisableCLIKubectl, + }) + if err != nil { + return nil, err + } + + /* TODO: pending with events + forUser, err := kubeconfig.GetUserNameFromAccountID(ctx, accountID, opts.Organization, s.aps, opts.IsSSOUser) + acID := accountID + partnerID := opts.Partner + orgIDString := opts.Organization + kubeconfigSettingEvent(ctx, "user.kubeconfig.setting", orgIDString, partnerID, forUser, acID, opts.Username, opts.Account.String(), opts.Groups, req.ValiditySeconds, req.EnableSessionCheck) + */ + + return &sentryrpc.UpdateKubeconfigSettingResponse{}, nil +} diff --git a/components/adminsrv/server/kubectl_cluster_settings.go b/components/adminsrv/server/kubectl_cluster_settings.go new file mode 100644 index 0000000..237fec2 --- /dev/null +++ b/components/adminsrv/server/kubectl_cluster_settings.go @@ -0,0 +1,118 @@ +package server + +import ( + "context" + + "github.com/RafaySystems/rcloud-base/components/adminsrv/internal/constants" + "github.com/RafaySystems/rcloud-base/components/adminsrv/pkg/service" + "github.com/RafaySystems/rcloud-base/components/common/pkg/sentry/util" + sentryrpc "github.com/RafaySystems/rcloud-base/components/common/proto/rpc/sentry" + "github.com/RafaySystems/rcloud-base/components/common/proto/types/sentry" + "google.golang.org/grpc/metadata" +) + +type kubectlClusterSettingsServer struct { + bs service.BootstrapService + kcs service.KubectlClusterSettingsService +} + +var _ sentryrpc.KubectlClusterSettingsServer = (*kubectlClusterSettingsServer)(nil) + +func (s *kubectlClusterSettingsServer) GetKubectlClusterSettings(ctx context.Context, in *sentryrpc.GetKubectlClusterSettingsRequest) (*sentryrpc.GetKubectlClusterSettingsResponse, error) { + opts := in.Opts + + clusterID, err := util.GetClusterScope(opts.UrlScope) + if err != nil { + _log.Infow("get kubectl cluster settings failed to get clusterID", "opts", opts) + return nil, err + } + + cnt, err := s.bs.GetBootstrapAgentCountForClusterID(ctx, clusterID, opts.Organization) + if err != nil { + _log.Infow("get kubectl cluster settings invalid request", "opts", opts, "cluster", clusterID) + return nil, err + } + + _log.Infow("get kubectl cluster settings ", "cnt", cnt, "opts", opts, "clusterID", clusterID) + + kc, err := s.kcs.Get(ctx, opts.Organization, clusterID) + if err == constants.ErrNotFound { + return &sentryrpc.GetKubectlClusterSettingsResponse{DisableWebKubectl: false, DisableCLIKubectl: false}, nil + } else if err != nil { + return nil, err + } + return &sentryrpc.GetKubectlClusterSettingsResponse{DisableWebKubectl: kc.DisableWebKubectl, DisableCLIKubectl: kc.DisableCLIKubectl}, nil +} + +func (s *kubectlClusterSettingsServer) UpdateKubectlClusterSettings(ctx context.Context, in *sentryrpc.UpdateKubectlClusterSettingsRequest) (*sentryrpc.UpdateKubectlClusterSettingsResponse, error) { + var clusterName, userAgent, host, remoteAddr string + opts := in.Opts + + if md, ok := metadata.FromIncomingContext(ctx); ok { + ua := md.Get("rafay-gateway-user-agent") + if len(ua) > 0 { + userAgent = ua[0] + } + } + + if md, ok := metadata.FromIncomingContext(ctx); ok { + h := md.Get("rafay-gateway-host") + if len(h) > 0 { + host = h[0] + } + } + + remoteAddr = "127.0.0.1" //default + if md, ok := metadata.FromIncomingContext(ctx); ok { + ra := md.Get("rafay-gateway-remote-addr") + if len(ra) > 0 { + remoteAddr = ra[0] + } + } + + clusterID, err := util.GetClusterScope(opts.UrlScope) + if err != nil { + _log.Infow("update kubectl cluster settings failed to get clusterID", "opts", opts) + return nil, err + } + + _log.Infow("update kubectl cluster settings ", "opts", opts, "clusterID", clusterID) + + _, err = s.bs.GetBootstrapAgentCountForClusterID(ctx, clusterID, opts.Organization) + if err != nil { + _log.Infow("update kubectl cluster settings invalid request", "opts", opts, "cluster", clusterID) + return nil, err + } + + clusterName = "" + ba, _ := s.bs.GetBootstrapAgentForClusterID(ctx, clusterID, opts.Organization) + if ba != nil { + clusterName = ba.Metadata.Labels["rafay.dev/clusterName"] + } + + err = s.kcs.Patch(ctx, &sentry.KubectlClusterSettings{ + Name: clusterID, + OrganizationID: opts.Organization, + PartnerID: opts.Partner, + DisableWebKubectl: in.DisableWebKubectl, + DisableCLIKubectl: in.DisableCLIKubectl, + }) + if err != nil { + return nil, err + } + + _log.Infow("updated kubectl cluster setting with values ", clusterName, userAgent, host, remoteAddr) + + /*TODO: to be done with events + partnerID := opts.Partner + orgIDString := opts.Organization + kubectlSettingEvent("cluster.kubectl.setting", clusterID, orgIDString, partnerID, opts.Username, opts.AccountID.String(), clusterName, userAgent, host, remoteAddr, opts.Groups, in.DisableWebKubectl, in.DisableCLIKubectl) + */ + + return &sentryrpc.UpdateKubectlClusterSettingsResponse{}, nil +} + +// NewKubectlClusterSettingsServer returns new kubectl cluster setting server +func NewKubectlClusterSettingsServer(bs service.BootstrapService, kcs service.KubectlClusterSettingsService) sentryrpc.KubectlClusterSettingsServer { + return &kubectlClusterSettingsServer{bs, kcs} +} diff --git a/components/adminsrv/pkg/server/organization.go b/components/adminsrv/server/organization.go similarity index 90% rename from components/adminsrv/pkg/server/organization.go rename to components/adminsrv/server/organization.go index 15fe35b..e9c8ac8 100644 --- a/components/adminsrv/pkg/server/organization.go +++ b/components/adminsrv/server/organization.go @@ -4,7 +4,7 @@ import ( "context" "github.com/RafaySystems/rcloud-base/components/adminsrv/pkg/service" - rpcv3 "github.com/RafaySystems/rcloud-base/components/adminsrv/proto/rpc/v3" + adminrpc "github.com/RafaySystems/rcloud-base/components/adminsrv/proto/rpc" systempbv3 "github.com/RafaySystems/rcloud-base/components/adminsrv/proto/types/systempb/v3" ) @@ -13,7 +13,7 @@ type organizationServer struct { } // NewOrganizationServer returns new organization server implementation -func NewOrganizationServer(ps service.OrganizationService) rpcv3.OrganizationServer { +func NewOrganizationServer(ps service.OrganizationService) adminrpc.OrganizationServer { return &organizationServer{ps} } diff --git a/components/adminsrv/pkg/server/partner.go b/components/adminsrv/server/partner.go similarity index 89% rename from components/adminsrv/pkg/server/partner.go rename to components/adminsrv/server/partner.go index 4709eab..12cec61 100644 --- a/components/adminsrv/pkg/server/partner.go +++ b/components/adminsrv/server/partner.go @@ -4,7 +4,7 @@ import ( "context" "github.com/RafaySystems/rcloud-base/components/adminsrv/pkg/service" - rpcv3 "github.com/RafaySystems/rcloud-base/components/adminsrv/proto/rpc/v3" + adminrpc "github.com/RafaySystems/rcloud-base/components/adminsrv/proto/rpc" systempbv3 "github.com/RafaySystems/rcloud-base/components/adminsrv/proto/types/systempb/v3" ) @@ -13,7 +13,7 @@ type partnerServer struct { } // NewPartnerServer returns new partner server implementation -func NewPartnerServer(ps service.PartnerService) rpcv3.PartnerServer { +func NewPartnerServer(ps service.PartnerService) adminrpc.PartnerServer { return &partnerServer{ps} } diff --git a/components/adminsrv/pkg/server/project.go b/components/adminsrv/server/project.go similarity index 90% rename from components/adminsrv/pkg/server/project.go rename to components/adminsrv/server/project.go index 2d46596..d263f78 100644 --- a/components/adminsrv/pkg/server/project.go +++ b/components/adminsrv/server/project.go @@ -4,7 +4,7 @@ import ( "context" "github.com/RafaySystems/rcloud-base/components/adminsrv/pkg/service" - rpcv3 "github.com/RafaySystems/rcloud-base/components/adminsrv/proto/rpc/v3" + adminrpc "github.com/RafaySystems/rcloud-base/components/adminsrv/proto/rpc" systempbv3 "github.com/RafaySystems/rcloud-base/components/adminsrv/proto/types/systempb/v3" ) @@ -13,7 +13,7 @@ type projectServer struct { } // NewProjectServer returns new project server implementation -func NewProjectServer(ps service.ProjectService) rpcv3.ProjectServer { +func NewProjectServer(ps service.ProjectService) adminrpc.ProjectServer { return &projectServer{ps} } diff --git a/components/adminsrv/server/relaypeerclient.go b/components/adminsrv/server/relaypeerclient.go new file mode 100644 index 0000000..525ce88 --- /dev/null +++ b/components/adminsrv/server/relaypeerclient.go @@ -0,0 +1,363 @@ +package server + +import ( + "context" + "crypto/tls" + "crypto/x509" + "io/ioutil" + "math/rand" + "net" + "regexp" + "time" + + relayrpc "github.com/RafaySystems/rcloud-base/components/common/proto/rpc/sentry" + "github.com/dgraph-io/ristretto" +) + +//RelayClusterConnectionInfo relay conn info +type RelayClusterConnectionInfo struct { + Relayuuid string + Relayip string +} + +type OnEvict = func(*ristretto.Item) + +// InitPeerCache initialize the cache to store dialin cluster-connection +// information of peers. When a dialin miss happens look into this cache +// to find the peer IP address to forward the user connection. +func InitPeerCache(evict OnEvict) (*ristretto.Cache, error) { + return ristretto.NewCache(&ristretto.Config{ + NumCounters: 1e7, // Num keys to track frequency of (10M). + MaxCost: 1 << 30, // Maximum cost of cache (1GB). + BufferItems: 64, // Number of keys per Get buffer. + OnEvict: evict, + }) +} + +// InsertPeerCache inserts the value to cache +func InsertPeerCache(cache *ristretto.Cache, expiry time.Duration, key, value interface{}) bool { + return cache.SetWithTTL(key, value, 100, expiry) +} + +// GetPeerCache get value from cache and if more than 1 +// rnadomly select the peer +func GetPeerCache(cache *ristretto.Cache, key interface{}) (string, bool) { + value, found := cache.Get(key) + if found { + if value == nil { + return "", false + } + cacheItems := value.([]RelayClusterConnectionInfo) + cnt := len(cacheItems) + if cnt > 1 { + rand.Seed(time.Now().UnixNano()) + min := 0 + max := cnt - 1 + indx := rand.Intn(max-min+1) + min + return cacheItems[indx].Relayip, found + } + return cacheItems[0].Relayip, found + } + return "", found +} + +// sends periodic heartbeats to core service +func helloRPCSend(ctx context.Context, stream relayrpc.RelayPeerService_RelayPeerHelloRPCClient, interval time.Duration, relayUUID string, ip func() string) { + _log.Infow("send first hello") + msg := &relayrpc.PeerHelloRequest{ + Relayuuid: relayUUID, + Relayip: ip(), + } + // send first hello message + err := stream.Send(msg) + if err != nil { + _log.Errorw("failed to send hello message", "error", err) + return + } + + tick := time.NewTicker(interval) + defer tick.Stop() + +helloRPCSendLoop: + for { + select { + case <-ctx.Done(): + stream.CloseSend() + break helloRPCSendLoop + case <-tick.C: + err := stream.Send(msg) + if err != nil { + _log.Errorw("failed to send hello message", err) + break helloRPCSendLoop + } + } + } + _log.Debugw("Exit: helloRPCSendLoop") +} + +//ClientHelloRPC will handle periodic heartbeat messages between relay and the core service. +func ClientHelloRPC(ctx context.Context, stream relayrpc.RelayPeerService_RelayPeerHelloRPCClient, interval time.Duration, relayUUID string, ip func() string) { + + go helloRPCSend(ctx, stream, interval, relayUUID, ip) + + for { + in, err := stream.Recv() + if err != nil { + _log.Errorw("helloRPC stream recv error", err) + stream.CloseSend() + break + } + _log.Debugw("recvd hello resp from service", + "serviceip", in.GetServiceip(), + "serviceuuid", in.GetServiceuuid(), + ) + } + + _log.Debugw("stopping helloRPC routine") +} + +//ClientTLSConfig sets tls config +func ClientTLSConfig(tlsCrt string, tlsKey string, rootCA string, addr string) (*tls.Config, error) { + + cert, err := tls.LoadX509KeyPair(tlsCrt, tlsKey) + if err != nil { + return nil, err + } + + var roots *x509.CertPool + if rootCA != "" { + roots = x509.NewCertPool() + rootPEM, err := ioutil.ReadFile(rootCA) + if err != nil { + return nil, err + } + if ok := roots.AppendCertsFromPEM(rootPEM); !ok { + return nil, err + } + } + + host, _, err := net.SplitHostPort(addr) + if err != nil { + return nil, err + } + + return &tls.Config{ + ServerName: host, + Certificates: []tls.Certificate{cert}, + InsecureSkipVerify: roots == nil, + RootCAs: roots, + SessionTicketsDisabled: true, + MinVersion: tls.VersionTLS12, + CipherSuites: []uint16{ + tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, + tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256}, + PreferServerCipherSuites: true, + }, nil +} + +//send loop of probe rpc. recvs clustersni from PeerProbeChanel and sends to core service +func probeRPCSend(ctx context.Context, stream relayrpc.RelayPeerService_RelayPeerProbeRPCClient, relayUUID string, peerProbeChanel chan string) { +probeRPCSendLoop: + for { + select { + case clustersni := <-peerProbeChanel: + _log.Debugw("probeRPCSend", "clustersni", clustersni) + msg := &relayrpc.PeerProbeRequest{ + Relayuuid: relayUUID, + Clustersni: clustersni, + } + err := stream.Send(msg) + if err != nil { + _log.Errorw( + "failed to send probe message for ", + "clustersni", clustersni, + "error", err, + ) + stream.CloseSend() + break probeRPCSendLoop + } + case <-ctx.Done(): + stream.CloseSend() + break probeRPCSendLoop + } + + } + _log.Debugw("exit: probeRPCSendLoop") +} + +// ClientProbeRPC will manage the probes. +// When a relay neeed to probe for connections for a cluster +// it will add a probe message to probe channel. The probe rpc +// will send that message to probe core service. When a probe response +// get inserted to peerCache. +func ClientProbeRPC(ctx context.Context, stream relayrpc.RelayPeerService_RelayPeerProbeRPCClient, pcache *ristretto.Cache, relayUUID string, expiry time.Duration, peerProbeChanel chan string, ip func() string) { + //send message with empty cluster sni to init the chanl + msg := &relayrpc.PeerProbeRequest{ + Relayuuid: relayUUID, + Clustersni: "", + } + + err := stream.Send(msg) + if err != nil { + stream.CloseSend() + return + } + _log.Debugw("probeRPC send first", "msg", msg) + + go probeRPCSend(ctx, stream, relayUUID, peerProbeChanel) + + //probe response recv loop will process the response + //and push it into peer cache + for { + resp, err := stream.Recv() + if err != nil { + stream.CloseSend() + break + } + + clustersni := resp.GetClustersni() + items := resp.GetItems() + if clustersni != "" && items != nil && len(items) > 0 { + cachevalue := []RelayClusterConnectionInfo{} + //prepare cachevalue + for _, item := range items { + matched, err := regexp.Match(relayUUID, []byte(item.Relayuuid)) + if err == nil && matched { + _log.Errorw("skip duplicate probe resp", + "relayuuid", relayUUID, + "recvd-relayuuid", item.Relayuuid, + ) + //uuid is same as this relay skip this entry + continue + } + + ipAddr := ip() + if ipAddr != "" && ipAddr == item.Relayip { + _log.Errorw("skip duplicate probe resp", "ip address", item.Relayip) + //ip is same as this relay skip this entry + continue + } + + v := RelayClusterConnectionInfo{item.Relayuuid, item.Relayip} + cachevalue = append(cachevalue, v) + } + + _log.Infow( + "cache probeRPC response", + "key", clustersni, + "value", cachevalue, + ) + //insert to peer cache + if !InsertPeerCache(pcache, expiry, clustersni, cachevalue) { + _log.Errorw( + "failed cache probeRPC response", + "key", clustersni, + "value", cachevalue, + ) + } + } else { + _log.Errorw( + "prob response with empty items for ", clustersni, + ) + } + } + + _log.Debug( + "stopping probeRPC routine", + ) +} + +// ClientSurveyRPC will handle the survey RPC. +// When a relay neeed to probe for connections for a cluster +// it will message to probe core service. The service then sends +// survey to all the connected relays (survey-request). +// On survey request, the relay will lookup its local-dialin-map +// and reply to core if connection from the given cluster is available. +func ClientSurveyRPC(ctx context.Context, stream relayrpc.RelayPeerService_RelayPeerSurveyRPCClient, relayUUID string, ip func() string, dialinlookup func(string) int) { + var relayIP string + + relayIP = ip() + + //Send a empty clustersni meesage to init the channel + msg := &relayrpc.PeerSurveyResponse{ + Relayuuid: relayUUID, + Relayip: relayIP, + Clustersni: "", + } + + err := stream.Send(msg) + if err != nil { + stream.CloseSend() + return + } + + _log.Debugw("surveyRPC send first", "msg", msg) + go func() { + surveyRPCStremWatch: + for { + select { + case <-ctx.Done(): + stream.CloseSend() + break surveyRPCStremWatch + } + } + }() + + //survey request recv loop will process the survey requests + for { + + surveyReq, err := stream.Recv() + if err != nil { + stream.CloseSend() + break + } + + clustersni := surveyReq.GetClustersni() + if clustersni == "" { + _log.Errorw( + "prob response with empty items for ", + "clustersni", clustersni, + ) + continue + } + + //lookup the local dialin table for connections\ + cnt := dialinlookup(clustersni) + _log.Infow( + "survey lookup", + "key", clustersni, + "count", cnt, + ) + + if relayIP == "" { + _log.Errorw( + "survey failed to get relay ip", + "key", clustersni, + ) + continue + } + + if cnt > 0 { + msg := &relayrpc.PeerSurveyResponse{ + Relayuuid: relayUUID, + Relayip: relayIP, + Clustersni: clustersni, + } + err = stream.Send(msg) + if err != nil { + _log.Errorw( + "survey send response failed", + "key", clustersni, + "error", err, + ) + stream.CloseSend() + break + } + } + + } + + _log.Debug( + "stopping probeRPC routine", + ) +} diff --git a/components/adminsrv/server/relaypeerservice.go b/components/adminsrv/server/relaypeerservice.go new file mode 100644 index 0000000..ca58430 --- /dev/null +++ b/components/adminsrv/server/relaypeerservice.go @@ -0,0 +1,596 @@ +package server + +import ( + "context" + "net" + "os" + "sync" + "time" + + "github.com/RafaySystems/rcloud-base/components/common/pkg/grpc" + sentryrpc "github.com/RafaySystems/rcloud-base/components/common/proto/rpc/sentry" + "github.com/dgraph-io/ristretto" + "github.com/google/uuid" +) + +// The peering service operate a s follows. +// Performs all grpc send/recv with connected relays +// Recvs probe request from a relay and perform survey across other relays. +// It maintains 3 streams +// 1) HelloRPC heartbeat stream +// 2) Probe stream to recv probe requests and send probe responses +// 3) Survey stream to send survey requests and recv survey responses. +// Maintains the list of relays connected to the service. +// - Relay list is keyed with the UUID of the relay +// - Each relay object has a survey send chnl. Use this chnl to send survey requests. +// - Each relay obect has a probe chnl. Use this chnl to send probe response + +//used for survey broadcasting +type surveyBroadCastRequest struct { + clustersni string + relayuuid string // relay requsting the survey + ou string +} + +//used to maintain list of connected relays +type relayObject struct { + timeStamp int64 + refCnt uint8 + relayip string + ou string + probeReplyChnl chan sentryrpc.PeerProbeResponse + surveyRequestChnl chan sentryrpc.PeerSurveyRequest +} + +//relayPeerService relay peer service +type relayPeerService struct { + cert []byte // rpc server certifciate + key []byte // rpc server key + rootCA []byte // rpc rootCA to verify client certificates. + port int + + //ServiceUUID ... + ServiceUUID string + + //relayMutex to syncrinise operations + relayMutex sync.RWMutex + + //RelayMap list of active + RelayMap map[string]map[string]*relayObject + + //SurveyBroadCast send survey request to all the relays + surveyBroadCast chan surveyBroadCastRequest + + //SurveyCacheExpiry default expiry + surveyCacheExpiry time.Duration + + //peerServiceCache stores peer dialin info + peerServiceCache *ristretto.Cache +} + +var maxRelayIdle = 300 //5 min + +var _ sentryrpc.RelayPeerServiceServer = (*relayPeerService)(nil) + +//var _log = logv2.GetLogger() + +// initPeerServiceCache initialize the cache to store dialin cluster-connection +// information of peers. When a dialin miss happens look into this cache +// to find the peer IP address to forward the user connection. +func initPeerServiceCache() (*ristretto.Cache, error) { + return ristretto.NewCache(&ristretto.Config{ + NumCounters: 1e7, // Num keys to track frequency of (10M). + MaxCost: 1 << 30, // Maximum cost of cache (1GB). + BufferItems: 64, // Number of keys per Get buffer. + }) +} + +// insertPeerServiceCache inserts the value to cache +func (s *relayPeerService) insertPeerServiceCache(key, value interface{}) bool { + return s.peerServiceCache.SetWithTTL(key, value, 100, s.surveyCacheExpiry) +} + +// getPeerServiceCache get value from cache and if more than 1 +// rnadomly select the peer +func (s *relayPeerService) getPeerServiceCache(key interface{}) (string, bool) { + value, found := s.peerServiceCache.Get(key) + if found { + if value == nil { + return "", false + } + relayip := value.(string) + + return relayip, true + } + return "", found +} + +// NewRelayPeerService returns new placement server implementation +func NewRelayPeerService() (sentryrpc.RelayPeerServiceServer, error) { + cache, err := initPeerServiceCache() + if err != nil { + _log.Errorw("failed to init cache", "error", err) + return nil, err + } + + return &relayPeerService{ + ServiceUUID: uuid.New().String(), + RelayMap: make(map[string]map[string]*relayObject), + surveyBroadCast: make(chan surveyBroadCastRequest, 256), + surveyCacheExpiry: 60 * time.Second, + peerServiceCache: cache, + }, nil +} + +// RunRelaySurveyHandler is the cotrol loop that maintains the peer suvey +// messages. +func RunRelaySurveyHandler(stop <-chan struct{}, svc interface{}) { + s := svc.(*relayPeerService) + _log.Infow("started survey request handler") + for { + select { + case <-stop: + _log.Errorw("stopping relay servey handler") + return + case surveyReq := <-s.surveyBroadCast: + go s.handleSurveyReq(surveyReq) + } + } +} + +//process the survey request. +func (s *relayPeerService) handleSurveyReq(req surveyBroadCastRequest) { + // Get All relay objects + // Send survey request to all. + // Featch from cache in intervals of 1 sec for 5 times + // Send result of each fetch to the requesting replay + var relayids []string + var connInfo []*sentryrpc.RelayClusterConnectionInfo + var retry int + var foundStale bool + sreqmsg := sentryrpc.PeerSurveyRequest{ + Clustersni: req.clustersni, + } + + _log.Debugw("handleSurveyReq", "RelayMap length", len(s.RelayMap)) + + foundStale = false + + //broadcast request to all connected relays + s.relayMutex.RLock() + now := time.Now().Unix() + if relayList, ok := s.RelayMap[req.ou]; ok { + for relayuuid, robj := range relayList { + if now > robj.timeStamp && (now-robj.timeStamp) > int64(maxRelayIdle) { //5min max toleration + //skip the relay that did not have heart beat for 5 mins + foundStale = true + continue + } + if relayuuid != req.relayuuid { + relayids = append(relayids, relayuuid) + //wait max of 2 sec to send to chnl + tick := time.NewTicker(2 * time.Second) + handleSurveyReqBreak: + for { + select { + case <-tick.C: + break handleSurveyReqBreak + case robj.surveyRequestChnl <- sreqmsg: + break handleSurveyReqBreak + } + } + tick.Stop() + } + } + } + s.relayMutex.RUnlock() + + _log.Debugw("handleSurveyReq done broadcasting to relays, wait for response") + + //now waiting for reply. Survey responses get cached + //poll the cache few times. + retry = 0 + for { + connInfo = nil + //fecth response from cache + for _, rid := range relayids { + ckey := peerServiceCacheKey(req.clustersni, rid, req.ou) + ip, ok := s.getPeerServiceCache(ckey) + if ok { + //prepare the probe response + cinfo := &sentryrpc.RelayClusterConnectionInfo{ + Relayuuid: rid, + Relayip: ip, + } + connInfo = append(connInfo, cinfo) + } + } + + if len(connInfo) > 0 { + msg := sentryrpc.PeerProbeResponse{ + Clustersni: req.clustersni, + Items: connInfo, + } + + robj := s.getRelayObject(req.relayuuid, req.ou) + if robj != nil { + //send the probe response + robj.probeReplyChnl <- msg + s.putRelayObject(req.relayuuid, req.ou) + } else { + //response chnl not found + break + } + } + + //retry 5 times: total 5 sec wait to get reply from all peers + retry++ + if retry > 5 { + break + } + + time.Sleep(1 * time.Second) + } + + if foundStale { + //remove inactive relays + s.relayMutex.Lock() + now := time.Now().Unix() + for _, relayList := range s.RelayMap { + for relayuuid, robj := range relayList { + if now > robj.timeStamp && (now-robj.timeStamp) > 300 { //5min max toleration + if robj.refCnt > 0 { + _log.Errorw("inactive relay has refcnt") + } else { + //delete the relay that did not have heart beat for 5 mins + delete(relayList, relayuuid) + } + } + } + } + s.relayMutex.Unlock() + } + +} + +//maintains the timestamp of relays heart beat +func (s *relayPeerService) updateRelayIfExist(relayuuid, ou string) bool { + s.relayMutex.RLock() + defer s.relayMutex.RUnlock() + // check relay exist + if relayList, ok := s.RelayMap[ou]; ok { + if robj, found := relayList[relayuuid]; found { + if robj.ou == ou { + //update the time stamp + robj.timeStamp = time.Now().Unix() + return true + } + } + } + return false +} + +func (s *relayPeerService) getRelayObject(relayuuid, ou string) *relayObject { + s.relayMutex.Lock() + defer s.relayMutex.Unlock() + + if relayList, ok := s.RelayMap[ou]; ok { + if robj, found := relayList[relayuuid]; found { + if robj.ou == ou { + robj.refCnt++ + return robj + } + } + } + return nil +} + +func (s *relayPeerService) putRelayObject(relayuuid, ou string) { + s.relayMutex.Lock() + defer s.relayMutex.Unlock() + + if relayList, ok := s.RelayMap[ou]; ok { + if robj, found := relayList[relayuuid]; found { + if robj.ou == ou && robj.refCnt > 0 { + robj.refCnt-- + return + } + } + } +} + +func (s *relayPeerService) insertRelayObject(robj *relayObject, relayuuid, ou string) { + s.relayMutex.Lock() + defer s.relayMutex.Unlock() + relayList := s.RelayMap[ou] + if relayList == nil { + relayList := map[string]*relayObject{ + relayuuid: robj, + } + s.RelayMap[ou] = relayList + } else { + relayList[relayuuid] = robj + } +} + +func (s *relayPeerService) handleHelloRequest(relayuuid, relayip, ou string) { + res := s.updateRelayIfExist(relayuuid, ou) + if res { + return + } + + robj := &relayObject{ + timeStamp: time.Now().Unix(), + relayip: relayip, + refCnt: 0, + ou: ou, + } + + robj.probeReplyChnl = make(chan sentryrpc.PeerProbeResponse, 128) + robj.surveyRequestChnl = make(chan sentryrpc.PeerSurveyRequest, 128) + + s.insertRelayObject(robj, relayuuid, ou) +} + +//getServiceIP .. +func getServiceIP() string { + name, err := os.Hostname() + if err == nil { + addr, err := net.LookupIP(name) + if err == nil { + return addr[0].String() + } + } + return "" +} + +//RelayPeerHelloRPC handles PeerHelloMsg +func (s *relayPeerService) RelayPeerHelloRPC(stream sentryrpc.RelayPeerService_RelayPeerHelloRPCServer) error { + _log.Infow("RelayPeerHelloRPC stream") + name, err := grpc.GetClientName(stream.Context()) + if err != nil { + _log.Errorw("error in getting CN from certificate in relay peer hello rpc", "error", err) + return err + } + + ou, err := grpc.GetClientOU(stream.Context()) + if err != nil { + _log.Errorw("error in getting OU from certificate in relay peer hello rpc", "error", err) + return err + } + + _log.Infow("RelayPeerHelloRPC client ", "name", name) + + for { + in, err := stream.Recv() + if err != nil { + _log.Errorw("RelayPeerHelloRPC recv", "name", name, "error", err) + return err + } + + relayuuid := in.GetRelayuuid() + relayip := in.GetRelayip() + _log.Debugw("RelayPeerHelloRPC:Received value", "relayuuid", relayuuid, "relayip", relayip) + + msg := &sentryrpc.PeerHelloResponse{ + Serviceuuid: s.ServiceUUID, + Serviceip: getServiceIP(), + } + + stream.Send(msg) + go s.handleHelloRequest(relayuuid, relayip, ou) + } +} + +//relayPeerProbeSender send routine to handle sending probe messges +func (s *relayPeerService) relayPeerProbeSender(ctx context.Context, stream sentryrpc.RelayPeerService_RelayPeerProbeRPCServer, relayuuid string, robj *relayObject) { + for { + select { + case <-ctx.Done(): + s.putRelayObject(relayuuid, robj.ou) + return + case probeReply := <-robj.probeReplyChnl: + err := stream.Send(&probeReply) + if err != nil { + s.putRelayObject(relayuuid, robj.ou) + return + } + } + } +} + +//try to fill the response form cache +func (s *relayPeerService) tryResponseFromCache(relayuuid, clustersni, ou string) bool { + var relayids []string + var connInfo []*sentryrpc.RelayClusterConnectionInfo + + s.relayMutex.RLock() + // get all other relays in the peer list + if relayList, ok := s.RelayMap[ou]; ok { + for key := range relayList { + if key != relayuuid { + relayids = append(relayids, key) + } + } + } + s.relayMutex.RUnlock() + + connInfo = nil + //fecth response from cache + for _, rid := range relayids { + ckey := peerServiceCacheKey(clustersni, rid, ou) + ip, ok := s.getPeerServiceCache(ckey) + if ok { + cinfo := &sentryrpc.RelayClusterConnectionInfo{ + Relayuuid: rid, + Relayip: ip, + } + connInfo = append(connInfo, cinfo) + } + } + + if len(connInfo) > 0 { + robj := s.getRelayObject(relayuuid, ou) + if robj != nil { + msg := sentryrpc.PeerProbeResponse{ + Clustersni: clustersni, + Items: connInfo, + } + robj.probeReplyChnl <- msg + s.putRelayObject(relayuuid, ou) + } + return true + } + + return false +} + +//RelayPeerProbeRPC handles PeerHelloMsg +func (s *relayPeerService) RelayPeerProbeRPC(stream sentryrpc.RelayPeerService_RelayPeerProbeRPCServer) error { + var initSend bool + + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + + name, err := grpc.GetClientName(stream.Context()) + if err != nil { + _log.Errorw("RelayPeerProbeRPC", "error", err) + return err + } + + ou, err := grpc.GetClientOU(stream.Context()) + if err != nil { + _log.Errorw("error in getting OU from certificate in relay peer hello rpc", "error", err) + return err + } + + _log.Infow("started probe server stream RelayPeerProbeRPC for client", "name", name, "OU", ou) + + initSend = false + for { + in, err := stream.Recv() + if err != nil { + _log.Errorw("RelayPeerProbeRPC rcv", "name", name, "error", err) + return err + } + + //got a probe request + clustersni := in.GetClustersni() + relayuuid := in.GetRelayuuid() + + _log.Debugw("RelayPeerProbeRPC recvd values", "relayuuid", relayuuid, "clustersni", clustersni) + + if clustersni == "" && relayuuid != "" { + //init dummy probe + if !initSend { + //Get the relay object for relayuuid + robj := s.getRelayObject(relayuuid, ou) + if robj != nil { + //start the send handler for this relay + go s.relayPeerProbeSender(ctx, stream, relayuuid, robj) + initSend = true + _log.Debug("RelayPeerProbeRPC init done") + } + } + continue + } + + // find respone either from cache or via survey + go func() { + if clustersni != "" && relayuuid != "" { + if !s.tryResponseFromCache(relayuuid, clustersni, ou) { + //did not find in cache, trigger survey to all relays + surveyreq := surveyBroadCastRequest{ + clustersni: clustersni, + relayuuid: relayuuid, + ou: ou, + } + s.surveyBroadCast <- surveyreq + } + } + }() + + } + +} + +//relayPeerSurveySender send routine to handle sending probe messges +func (s *relayPeerService) relayPeerSurveySender(ctx context.Context, stream sentryrpc.RelayPeerService_RelayPeerSurveyRPCServer, relayuuid string, robj *relayObject) { + _log.Debugw("started relayPeerSurveySender") + for { + select { + case <-ctx.Done(): + s.putRelayObject(relayuuid, robj.ou) + return + case surveyRequest := <-robj.surveyRequestChnl: + _log.Debugw("msg recvd from survey chnl sending to stream") + err := stream.Send(&surveyRequest) + if err != nil { + s.putRelayObject(relayuuid, robj.ou) + return + } + } + } +} + +//RelayPeerSurveyRPC handles relay survey rpc +func (s *relayPeerService) RelayPeerSurveyRPC(stream sentryrpc.RelayPeerService_RelayPeerSurveyRPCServer) error { + var initSend bool + + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + + name, err := grpc.GetClientName(stream.Context()) + if err != nil { + _log.Errorw("relayPeerSurveyRPC", "error", err) + } + + ou, err := grpc.GetClientOU(stream.Context()) + if err != nil { + _log.Errorw("error in getting OU from certificate in relay peer hello rpc", "error", err) + return err + } + + _log.Infow("started RelayPeerSurveyRPC stream from client ", "name", name, "OU", ou) + + initSend = false + for { + in, err := stream.Recv() + if err != nil { + _log.Error("RelayPeerSurveyRPC rcv ", "name", name, "error", err) + return err + } + + clustersni := in.GetClustersni() + relayuuid := in.GetRelayuuid() + relayip := in.GetRelayip() + _log.Debugw("RelayPeerSurveyRPC:Received values", "clustersni", clustersni, "relayuuid", relayuuid, "relayip", relayip) + + if clustersni == "" && relayuuid != "" { + if !initSend { + //Get the relay object for relayuuid + robj := s.getRelayObject(relayuuid, ou) + if robj != nil { + go s.relayPeerSurveySender(ctx, stream, relayuuid, robj) + initSend = true + _log.Debugw("RelayPeerSurveyRPC init done") + } + } + continue + } + + //insert response to cache + if clustersni != "" && relayuuid != "" && relayip != "" { + ckey := peerServiceCacheKey(clustersni, relayuuid, ou) + if !s.insertPeerServiceCache(ckey, relayip) { + _log.Errorw("failed to insert into cache") + } + } + + } + +} + +func peerServiceCacheKey(clustersni, relayuuid, ou string) string { + return clustersni + relayuuid + ou +} diff --git a/components/adminsrv/server/relaypeerservice_test.go b/components/adminsrv/server/relaypeerservice_test.go new file mode 100644 index 0000000..4bada27 --- /dev/null +++ b/components/adminsrv/server/relaypeerservice_test.go @@ -0,0 +1,272 @@ +package server + +import ( + "context" + "fmt" + "io/ioutil" + "net" + "os" + "os/signal" + "syscall" + "testing" + "time" + + "github.com/RafaySystems/rcloud-base/components/common/pkg/grpc" + "github.com/RafaySystems/rcloud-base/components/common/pkg/sentry/peering" + relayrpc "github.com/RafaySystems/rcloud-base/components/common/proto/rpc/sentry" + "github.com/google/uuid" + "google.golang.org/grpc/credentials" +) + +var relayUUID1 string +var relayUUID2 string + +// steps to test peering protocols +// * start a server +// * runs two client instances, send hello rpc to build active relay list +// * client1 send probe for a dummy cluster id +// * peer service broadcast survey request to clients +// * client2 sends survey reply back +// * peer service sends probe reply +// * client1 get probe reply back + +func exit(cancel context.CancelFunc) { + cancel() + os.Exit(0) +} + +//GenUUID generates a google UUID +func genUUID() string { + id := uuid.New() + return id.String() +} + +//GetRelayIP get relay IP address +func getRelayIP1() string { + return "1.1.1.1" +} + +//GetRelayIP get relay IP address +func getRelayIP2() string { + return "2.2.2.2" +} + +func dummyDialinLookup(clustersni string) int { + return 1 +} + +func readPEM(path string) []byte { + f, err := os.Open(path) + if err != nil { + panic(err) + } + b, err := ioutil.ReadAll(f) + if err != nil { + panic(err) + } + return b +} + +//os signal handler +func signalHandler(sig os.Signal, cancel context.CancelFunc) { + if sig == syscall.SIGINT || sig == syscall.SIGKILL || sig == syscall.SIGTERM || sig == syscall.SIGQUIT { + fmt.Println("Received", "signal", sig) + exit(cancel) + return + } + + fmt.Println("Received", "signal", sig) +} + +func startClient(ctx context.Context, t *testing.T, name, relayUUID string, exitChan chan<- bool, getRelayIP func() string, peerProbeChanel chan string) { + tlsConfig, err := ClientTLSConfig("./testdata/peersvc.crt", "./testdata/peersvc.key", "./testdata/ca.crt", "star.probe.relay.rafay.dev:7001") + if err != nil { + t.Error("Error loading peer TLC config", err) + exitChan <- true + return + } + + //enforce TLS mutual authN + transportCreds := credentials.NewTLS(tlsConfig) + conn, err := grpc.NewSecureClientConn(ctx, "127.0.0.1:7001", transportCreds) + + if err != nil { + t.Error("Error connecting to peer service", err) + exitChan <- true + return + } + + fmt.Println("connected to grpc server") + client := relayrpc.NewRelayPeerServiceClient(conn) + + // create RPC streams + helloStream, err := client.RelayPeerHelloRPC(context.Background()) + if err != nil { + t.Error( + "failed to create HelloRPC stream with peer server", name, err, + ) + conn.Close() + exitChan <- true + } + + probeStream, err := client.RelayPeerProbeRPC(context.Background()) + if err != nil { + t.Error( + err, + "failed to create ProbeRPC stream with peer server", name, err, + ) + conn.Close() + exitChan <- true + } + + surveyStream, err := client.RelayPeerSurveyRPC(context.Background()) + if err != nil { + t.Error( + err, + "failed to create SurveyRPC stream with peer server", name, err, + ) + conn.Close() + exitChan <- true + } + + fmt.Println("created RPC streams with peer server") + + rpcctx, rpccancel := context.WithCancel(context.Background()) + + go ClientHelloRPC(rpcctx, helloStream, 60*time.Second, relayUUID, getRelayIP) + //Add a init time wait for hello stream to finish + time.Sleep(2 * time.Second) + + pcache, err := InitPeerCache(nil) + if err != nil { + t.Error( + err, + "failed to init peer client cache", name, err, + ) + conn.Close() + exitChan <- true + } + + go peering.ClientProbeRPC(rpcctx, probeStream, pcache, relayUUID, 600*time.Second, peerProbeChanel, getRelayIP) + + go peering.ClientSurveyRPC(rpcctx, surveyStream, relayUUID, getRelayIP, dummyDialinLookup) + + for { + //Watch for errors in rpc streams. + //On error cancel the streams and reconnect. + //HelloRPC send heartbeats in every 60Sec. + //If there is underlying connectivity issues + //HelloRPC will detect it with in 60Sec, + select { + case <-helloStream.Context().Done(): + rpccancel() + conn.Close() + t.Error("stopping client", name, ctx.Err()) + exitChan <- true + return + case <-probeStream.Context().Done(): + rpccancel() + conn.Close() + t.Error("stopping client", name, ctx.Err()) + exitChan <- true + return + case <-surveyStream.Context().Done(): + rpccancel() + conn.Close() + t.Error("stopping client", name, ctx.Err()) + exitChan <- true + return + case <-ctx.Done(): + rpccancel() + conn.Close() + t.Error("stopping client", name, ctx.Err()) + exitChan <- true + return + } + } + +} + +func TestRelayPeerRPC(t *testing.T) { + var ExitChan = make(chan bool) + + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + + signalChan := make(chan os.Signal, 2) + signal.Notify(signalChan, + os.Interrupt, + syscall.SIGINT, + syscall.SIGHUP, + syscall.SIGKILL, + syscall.SIGTERM, + syscall.SIGQUIT, + ) + + go func() { + relayPeerService, err := NewRelayPeerService() + if err != nil { + _log.Fatalw("unable to get create relay peer service") + panic(err) + } + + grpcServer, err := grpc.NewSecureServerWithPEM(readPEM("testdata/peersvc.crt"), readPEM("testdata/peersvc.key"), readPEM("testdata/ca.crt")) + if err != nil { + _log.Fatalw("cannot grpc secure server failed", "error", err) + + } + + go func() { + defer grpcServer.GracefulStop() + + <-ctx.Done() + _log.Infow("peer service stoped due to context done") + }() + + relayrpc.RegisterRelayPeerServiceServer(grpcServer, relayPeerService) + + l, err := net.Listen("tcp", fmt.Sprintf(":%d", 7001)) + if err != nil { + _log.Fatalw("failed to listen relay peer service port", "port", 7001, "error", err) + return + } + + _log.Infow("started relay rpc service ", "port", 7001) + if err = grpcServer.Serve(l); err != nil { + _log.Fatalw("failed to server relay peer service", "error", err) + } + }() + + t.Log("started RunRelayPeerRPC") + + relayUUID1 = genUUID() + relayUUID2 = genUUID() + + peerProbeChanel1 := make(chan string, 256) + peerProbeChanel2 := make(chan string, 256) + + go startClient(ctx, t, "client1", relayUUID1, ExitChan, getRelayIP1, peerProbeChanel1) + go startClient(ctx, t, "client2", relayUUID2, ExitChan, getRelayIP2, peerProbeChanel2) + + time.Sleep(5 * time.Second) + + //send a dummy probe from client1 + peerProbeChanel1 <- "dummycluster.relay.rafay.dev" + fmt.Println("send probe from client 1") + + tick := time.NewTicker(10 * time.Second) + defer tick.Stop() + + for { + select { + case <-ExitChan: + t.Errorf("got exit chanl") + exit(cancel) + case sig := <-signalChan: + signalHandler(sig, cancel) + case <-tick.C: + fmt.Println("success: test time reached. no errors from peerservice or clients. see logs showing \"cache probeRPC response\"") + exit(cancel) + } + } +} diff --git a/components/cluster-scheduler/buf.lock b/components/cluster-scheduler/buf.lock index 1da4195..d9fc7e8 100644 --- a/components/cluster-scheduler/buf.lock +++ b/components/cluster-scheduler/buf.lock @@ -12,9 +12,9 @@ deps: owner: googleapis repository: googleapis branch: main - commit: 0039142542b74d11b0ae5a1e9fd4d523 - digest: b1-AzPoqjtlLpx5dVojvgRauI1re5i4LPsghzU0KO-16o4= - create_time: 2022-01-05T15:03:17.46488Z + commit: b53ed4c940ec4644ad883e5f762f72c9 + digest: b1-Hn98QihtUQeHWUou8-tO1IrLAOplFch71V2xunGjBvc= + create_time: 2022-02-09T15:07:44.173247Z - remote: buf.build owner: grpc-ecosystem repository: grpc-gateway @@ -22,3 +22,10 @@ deps: commit: ff83506eb9cc4cf8972f49ce87e6ed3e digest: b1-iLPHgLaoeWWinMiXXqPnxqE4BThtY3eSbswVGh9GOGI= create_time: 2021-10-23T16:26:52.283938Z + - remote: buf.build + owner: rafay + repository: k8s + branch: main + commit: b96f66eb56bc4f279431f4b2187a2fee + digest: b1-U7KVig2Fgpf6eRczjqxrYFa3p6HLqgtEy5QJAOVB8BI= + create_time: 2022-02-09T08:44:35.431677Z diff --git a/components/cluster-scheduler/buf.yaml b/components/cluster-scheduler/buf.yaml index 613dbd0..b533ed4 100644 --- a/components/cluster-scheduler/buf.yaml +++ b/components/cluster-scheduler/buf.yaml @@ -4,6 +4,7 @@ deps: - buf.build/googleapis/googleapis - buf.build/grpc-ecosystem/grpc-gateway - buf.build/gogo/protobuf + - buf.build/rafay/k8s breaking: use: - FILE diff --git a/components/cluster-scheduler/gen/openapi/proto/rpc/metro.swagger.json b/components/cluster-scheduler/gen/openapi/proto/rpc/metro.swagger.json new file mode 100644 index 0000000..597e237 --- /dev/null +++ b/components/cluster-scheduler/gen/openapi/proto/rpc/metro.swagger.json @@ -0,0 +1,1096 @@ +{ + "swagger": "2.0", + "info": { + "title": "Location Service", + "version": "3.0", + "contact": { + "name": "Rafay Dev" + } + }, + "tags": [ + { + "name": "Location" + } + ], + "schemes": [ + "https" + ], + "consumes": [ + "application/json", + "application/yaml" + ], + "produces": [ + "application/json", + "application/yaml" + ], + "paths": { + "/v3/partner/{metadata.partner}/location": { + "get": { + "operationId": "Location_GetLocations", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v3LocationList" + } + }, + "403": { + "description": "Returned when the user does not have permission to access the resource.", + "schema": {} + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": { + "type": "string", + "format": "string" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "metadata.partner", + "description": "Partner to which the resource belongs", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "apiVersion", + "description": "API Version. API Version of the resource", + "in": "query", + "required": false, + "type": "string", + "default": "infra.k8smgmt.io/v3" + }, + { + "name": "kind", + "description": "Kind. Kind of the resource", + "in": "query", + "required": false, + "type": "string", + "default": "Location" + }, + { + "name": "metadata.name", + "description": "Name. name of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.displayName", + "description": "Display Name. display name of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.description", + "description": "Description. description of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.project", + "description": "Project. Project of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.organization", + "description": "Organization. Organization to which the resource belongs", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.id", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.modifiedAt", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "spec.id", + "description": "ID of Location. ID Location of the cluster", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.name", + "description": "Location. Location of the cluster", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.city", + "description": "City. City of the location", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.state", + "description": "State. State of the location", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.country", + "description": "Country. country of the location", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.locale", + "description": "Locale. locale of the location", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.latitude", + "description": "Latitude. Latitude of the location", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.longitude", + "description": "Longitude. Longitude of the location", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.countryCode", + "description": "CountryCode. CountryCode of the location", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.stateCode", + "description": "StateCode. StateCode of the location", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "status.conditionType", + "description": "Condition Type. type of the status condition", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "status.conditionStatus", + "description": "Condition Status. status of the condition", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "StatusNotSet", + "StatusSubmitted", + "StatusOK", + "StatusFailed" + ], + "default": "StatusNotSet" + }, + { + "name": "status.lastUpdated", + "description": "Last Updated. when the condition status is last updated", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "status.reason", + "description": "Reason. reason of the last condition status", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "Location" + ] + }, + "post": { + "operationId": "Location_CreateLocation", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/infrav3Location" + } + }, + "201": { + "description": "Returned when location is created successfully.", + "schema": {} + }, + "403": { + "description": "Returned when the user does not have permission to access the resource.", + "schema": {} + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": { + "type": "string", + "format": "string" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "metadata.partner", + "description": "Partner to which the resource belongs", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/infrav3Location" + } + } + ], + "tags": [ + "Location" + ] + } + }, + "/v3/partner/{metadata.partner}/location/{metadata.name}": { + "get": { + "operationId": "Location_GetLocation", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/infrav3Location" + } + }, + "403": { + "description": "Returned when the user does not have permission to access the resource.", + "schema": {} + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": { + "type": "string", + "format": "string" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "metadata.partner", + "description": "Partner to which the resource belongs", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "metadata.name", + "description": "name of the resource", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "apiVersion", + "description": "API Version. API Version of the resource", + "in": "query", + "required": false, + "type": "string", + "default": "infra.k8smgmt.io/v3" + }, + { + "name": "kind", + "description": "Kind. Kind of the resource", + "in": "query", + "required": false, + "type": "string", + "default": "Location" + }, + { + "name": "metadata.displayName", + "description": "Display Name. display name of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.description", + "description": "Description. description of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.project", + "description": "Project. Project of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.organization", + "description": "Organization. Organization to which the resource belongs", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.id", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.modifiedAt", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "spec.id", + "description": "ID of Location. ID Location of the cluster", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.name", + "description": "Location. Location of the cluster", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.city", + "description": "City. City of the location", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.state", + "description": "State. State of the location", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.country", + "description": "Country. country of the location", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.locale", + "description": "Locale. locale of the location", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.latitude", + "description": "Latitude. Latitude of the location", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.longitude", + "description": "Longitude. Longitude of the location", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.countryCode", + "description": "CountryCode. CountryCode of the location", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.stateCode", + "description": "StateCode. StateCode of the location", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "status.conditionType", + "description": "Condition Type. type of the status condition", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "status.conditionStatus", + "description": "Condition Status. status of the condition", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "StatusNotSet", + "StatusSubmitted", + "StatusOK", + "StatusFailed" + ], + "default": "StatusNotSet" + }, + { + "name": "status.lastUpdated", + "description": "Last Updated. when the condition status is last updated", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "status.reason", + "description": "Reason. reason of the last condition status", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "Location" + ] + }, + "delete": { + "operationId": "Location_DeleteLocation", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/infrav3Location" + } + }, + "204": { + "description": "Returned when organization is deleted successfully.", + "schema": {} + }, + "403": { + "description": "Returned when the user does not have permission to access the resource.", + "schema": {} + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": { + "type": "string", + "format": "string" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "metadata.partner", + "description": "Partner to which the resource belongs", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "metadata.name", + "description": "name of the resource", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "apiVersion", + "description": "API Version. API Version of the resource", + "in": "query", + "required": false, + "type": "string", + "default": "infra.k8smgmt.io/v3" + }, + { + "name": "kind", + "description": "Kind. Kind of the resource", + "in": "query", + "required": false, + "type": "string", + "default": "Location" + }, + { + "name": "metadata.displayName", + "description": "Display Name. display name of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.description", + "description": "Description. description of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.project", + "description": "Project. Project of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.organization", + "description": "Organization. Organization to which the resource belongs", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.id", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.modifiedAt", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "spec.id", + "description": "ID of Location. ID Location of the cluster", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.name", + "description": "Location. Location of the cluster", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.city", + "description": "City. City of the location", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.state", + "description": "State. State of the location", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.country", + "description": "Country. country of the location", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.locale", + "description": "Locale. locale of the location", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.latitude", + "description": "Latitude. Latitude of the location", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.longitude", + "description": "Longitude. Longitude of the location", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.countryCode", + "description": "CountryCode. CountryCode of the location", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.stateCode", + "description": "StateCode. StateCode of the location", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "status.conditionType", + "description": "Condition Type. type of the status condition", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "status.conditionStatus", + "description": "Condition Status. status of the condition", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "StatusNotSet", + "StatusSubmitted", + "StatusOK", + "StatusFailed" + ], + "default": "StatusNotSet" + }, + { + "name": "status.lastUpdated", + "description": "Last Updated. when the condition status is last updated", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "status.reason", + "description": "Reason. reason of the last condition status", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "Location" + ] + }, + "put": { + "operationId": "Location_UpdateLocation", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/infrav3Location" + } + }, + "403": { + "description": "Returned when the user does not have permission to access the resource.", + "schema": {} + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": { + "type": "string", + "format": "string" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "metadata.partner", + "description": "Partner to which the resource belongs", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "metadata.name", + "description": "name of the resource", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/infrav3Location" + } + } + ], + "tags": [ + "Location" + ] + } + } + }, + "definitions": { + "commonv3Status": { + "type": "object", + "properties": { + "conditionType": { + "type": "string", + "description": "type of the status condition", + "title": "Condition Type", + "readOnly": true + }, + "conditionStatus": { + "$ref": "#/definitions/v3ConditionStatus", + "enum": [ + "StatusNotSet", + "StatusSubmitted", + "StatusOK", + "StatusFailed" + ], + "description": "status of the condition", + "title": "Condition Status", + "readOnly": true + }, + "lastUpdated": { + "type": "string", + "format": "date-time", + "description": "when the condition status is last updated", + "title": "Last Updated", + "readOnly": true + }, + "reason": { + "type": "string", + "description": "reason of the last condition status", + "title": "Reason", + "readOnly": true + } + }, + "description": "status of a resource", + "title": "Status", + "readOnly": true + }, + "googlerpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "infrav3Location": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "default": "infra.k8smgmt.io/v3", + "description": "API Version of the resource", + "title": "API Version", + "readOnly": true + }, + "kind": { + "type": "string", + "default": "Location", + "description": "Kind of the resource", + "title": "Kind", + "readOnly": true + }, + "metadata": { + "$ref": "#/definitions/v3Metadata", + "description": "Metadata of the resource", + "title": "Metadata" + }, + "spec": { + "$ref": "#/definitions/v3Metro", + "description": "Spec of the resource", + "title": "Spec" + }, + "status": { + "$ref": "#/definitions/commonv3Status", + "description": "Status of the resource", + "title": "Status", + "readOnly": true + } + }, + "description": "Location", + "title": "Location", + "required": [ + "apiVersion", + "kind", + "metadata", + "spec" + ] + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "v3ConditionStatus": { + "type": "string", + "enum": [ + "StatusNotSet", + "StatusSubmitted", + "StatusOK", + "StatusFailed" + ], + "default": "StatusNotSet", + "title": "$title: ConditionStatus\n$description: status of a condition for a resource" + }, + "v3ListMetadata": { + "type": "object", + "properties": { + "count": { + "type": "string", + "format": "int64" + }, + "offset": { + "type": "string", + "format": "int64" + }, + "limit": { + "type": "string", + "format": "int64" + } + }, + "title": "$title: ListMetadata\n$description: metadata for a list of resources\n$required: enabled" + }, + "v3LocationList": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "default": "infra.k8smgmt.io/v3", + "description": "API Version of the list resource", + "title": "API Version", + "readOnly": true + }, + "kind": { + "type": "string", + "default": "LocationList", + "description": "Kind of the list resource", + "title": "Kind", + "readOnly": true + }, + "metadata": { + "$ref": "#/definitions/v3ListMetadata", + "description": "Metadata of the list resource", + "title": "ListMetadata", + "readOnly": true + }, + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/v3Metro" + }, + "description": "List of the resources", + "title": "Items", + "readOnly": true + } + } + }, + "v3Metadata": { + "type": "object", + "example": { + "name": "some-name", + "project": "defaultproject" + }, + "properties": { + "name": { + "type": "string", + "description": "name of the resource", + "title": "Name" + }, + "displayName": { + "type": "string", + "description": "display name of the resource", + "title": "Display Name" + }, + "description": { + "type": "string", + "description": "description of the resource", + "title": "Description" + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "labels of the resource", + "title": "Lables" + }, + "annotations": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "annotations of the resource", + "title": "Annotations" + }, + "project": { + "type": "string", + "description": "Project of the resource", + "title": "Project" + }, + "organization": { + "type": "string", + "description": "Organization to which the resource belongs", + "title": "Organization" + }, + "partner": { + "type": "string", + "description": "Partner to which the resource belongs", + "title": "Partner" + }, + "id": { + "type": "string", + "readOnly": true + }, + "modifiedAt": { + "type": "string", + "format": "date-time", + "readOnly": true + } + }, + "description": "metadata of the resource", + "title": "Metadata", + "required": [ + "name", + "project" + ] + }, + "v3Metro": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "ID Location of the cluster", + "title": "ID of Location" + }, + "name": { + "type": "string", + "description": "Location of the cluster", + "title": "Location" + }, + "city": { + "type": "string", + "description": "City of the location", + "title": "City", + "readOnly": true + }, + "state": { + "type": "string", + "description": "State of the location", + "title": "State", + "readOnly": true + }, + "country": { + "type": "string", + "description": "country of the location", + "title": "Country", + "readOnly": true + }, + "locale": { + "type": "string", + "description": "locale of the location", + "title": "Locale", + "readOnly": true + }, + "latitude": { + "type": "string", + "description": "Latitude of the location", + "title": "Latitude", + "readOnly": true + }, + "longitude": { + "type": "string", + "description": "Longitude of the location", + "title": "Longitude", + "readOnly": true + }, + "countryCode": { + "type": "string", + "description": "CountryCode of the location", + "title": "CountryCode", + "readOnly": true + }, + "stateCode": { + "type": "string", + "description": "StateCode of the location", + "title": "StateCode", + "readOnly": true + } + } + } + }, + "securityDefinitions": { + "ApiKeyAuth": { + "type": "apiKey", + "name": "X-RAFAY-API-KEYID", + "in": "header" + }, + "BasicAuth": { + "type": "basic" + } + }, + "security": [ + { + "ApiKeyAuth": [], + "BasicAuth": [] + } + ] +} diff --git a/components/cluster-scheduler/go.mod b/components/cluster-scheduler/go.mod index 06dd8cd..418117f 100644 --- a/components/cluster-scheduler/go.mod +++ b/components/cluster-scheduler/go.mod @@ -4,9 +4,8 @@ go 1.17 require ( github.com/RafaySystems/rcloud-base/components/common v0.0.0-unpublished - github.com/gogo/protobuf v1.3.2 github.com/google/uuid v1.3.0 - github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.2 + github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.3 github.com/pkg/errors v0.9.1 github.com/rs/xid v1.3.0 github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546 @@ -15,37 +14,46 @@ require ( github.com/uptrace/bun/dialect/pgdialect v1.0.21 github.com/uptrace/bun/driver/pgdriver v1.0.21 github.com/uptrace/bun/extra/bundebug v1.0.21 - google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa - google.golang.org/grpc v1.43.0 + google.golang.org/grpc v1.44.0 google.golang.org/protobuf v1.27.1 sigs.k8s.io/controller-runtime v0.11.0 ) require ( + github.com/beorn7/perks v1.0.1 // indirect + github.com/cespare/xxhash/v2 v2.1.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect + github.com/evanphx/json-patch v4.12.0+incompatible // indirect github.com/fatih/color v1.13.0 // indirect github.com/fsnotify/fsnotify v1.5.1 // indirect github.com/go-logr/logr v1.2.0 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.2 // indirect - github.com/google/go-cmp v0.5.6 // indirect + github.com/google/go-cmp v0.5.7 // indirect github.com/google/gofuzz v1.1.0 // indirect github.com/googleapis/gnostic v0.5.5 // indirect github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect github.com/hashicorp/hcl v1.0.0 // indirect + github.com/imdario/mergo v0.3.12 // indirect github.com/jinzhu/inflection v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/julienschmidt/httprouter v1.3.0 // indirect - github.com/klauspost/cpuid/v2 v2.0.6 // indirect github.com/magiconair/properties v1.8.5 // indirect github.com/mattn/go-colorable v0.1.12 // indirect github.com/mattn/go-isatty v0.0.14 // indirect + github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect github.com/mitchellh/mapstructure v1.4.3 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pelletier/go-toml v1.9.4 // indirect github.com/processout/grpc-go-pool v1.2.1 // indirect - github.com/segmentio/asm v1.1.0 // indirect - github.com/segmentio/encoding v0.3.2 // indirect + github.com/prometheus/client_golang v1.11.0 // indirect + github.com/prometheus/client_model v0.2.0 // indirect + github.com/prometheus/common v0.28.0 // indirect + github.com/prometheus/procfs v0.6.0 // indirect + github.com/segmentio/asm v1.1.3 // indirect + github.com/segmentio/encoding v0.3.3 // indirect github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749 // indirect github.com/speps/go-hashids v2.0.0+incompatible // indirect github.com/spf13/afero v1.6.0 // indirect @@ -54,28 +62,39 @@ require ( github.com/spf13/pflag v1.0.5 // indirect github.com/subosito/gotenv v1.2.0 // indirect github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc // indirect + github.com/valyala/fastjson v1.6.3 // indirect github.com/vmihailenco/msgpack/v5 v5.3.5 // indirect github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect go.uber.org/atomic v1.7.0 // indirect go.uber.org/multierr v1.6.0 // indirect - go.uber.org/zap v1.19.1 // indirect + go.uber.org/zap v1.20.0 // indirect golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3 // indirect golang.org/x/net v0.0.0-20211209124913-491a49abca63 // indirect + golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e // indirect + golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b // indirect golang.org/x/text v0.3.7 // indirect + golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect + gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect + google.golang.org/appengine v1.6.7 // indirect + google.golang.org/genproto v0.0.0-20220118154757-00ab72f36ad5 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.66.2 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect - k8s.io/apimachinery v0.23.1 // indirect + k8s.io/api v0.23.2 // indirect + k8s.io/apiextensions-apiserver v0.23.2 // indirect + k8s.io/apimachinery v0.23.2 // indirect + k8s.io/client-go v0.23.2 // indirect + k8s.io/component-base v0.23.2 // indirect k8s.io/klog v1.0.0 // indirect k8s.io/klog/v2 v2.30.0 // indirect - k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 // indirect + k8s.io/kube-openapi v0.0.0-20220114203427-a0453230fd26 // indirect k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b // indirect mellium.im/sasl v0.2.1 // indirect sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 // indirect sigs.k8s.io/kustomize/pseudo/k8s v0.1.0 // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.2.0 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect sigs.k8s.io/yaml v1.3.0 // indirect ) diff --git a/components/cluster-scheduler/go.sum b/components/cluster-scheduler/go.sum index 27729db..b5c8f35 100644 --- a/components/cluster-scheduler/go.sum +++ b/components/cluster-scheduler/go.sum @@ -1,91 +1,367 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= +cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= +cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= +cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= +cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= +cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= +cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= +cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= +cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= +cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= +cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= +cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= +cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= +cloud.google.com/go/firestore v1.6.1/go.mod h1:asNXNOzBdyVQmEU+ggO8UPodTkEVFW5Qx+rwHnAz+EY= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/Azure/go-ansiterm v0.0.0-20210608223527-2377c96fe795/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= +github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= github.com/Azure/go-autorest/autorest v0.9.2/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= +github.com/Azure/go-autorest/autorest v0.11.18/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA= github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= github.com/Azure/go-autorest/autorest/adal v0.8.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc= +github.com/Azure/go-autorest/autorest/adal v0.9.13/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M= github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= +github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= +github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= +github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= +github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= +github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= +github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/antlr/antlr4/runtime/Go/antlr v0.0.0-20210826220005-b48c857c3a0e/go.mod h1:F7bn7fEU90QkQ3tnmaTx3LTKLEDqnwWODIYppRQ5hnY= +github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= +github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-metrics v0.3.10/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg= +github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg= +github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= +github.com/aws/aws-sdk-go v1.34.28/go.mod h1:H7NKnBqNVzoTJpGfLrQkkD+ytBA93eiDYi/+8rV9s48= +github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= 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= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= +github.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM= +github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/certifi/gocertifi v0.0.0-20191021191039-0944d244cd40/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= +github.com/certifi/gocertifi v0.0.0-20200922220541-2c3bb06c6054/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= +github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= +github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= +github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211130200136-a8f946100490/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cockroachdb/datadriven v0.0.0-20200714090401-bf6692d28da5/go.mod h1:h6jFvWxBdQXxjopDMZyH2UVceIRfR84bdzbkoKrsWNo= +github.com/cockroachdb/errors v1.2.4/go.mod h1:rQD95gz6FARkaKkQXUksEje/d9a6wBJoCr5oaCLELYA= +github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI= +github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= +github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= +github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v0.0.0-20151105211317-5215b55f46b2/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/spdystream v0.0.0-20181023171402-6480d4af844c/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= +github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/elazarl/goproxy v0.0.0-20191011121108-aa519ddbe484/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= github.com/elazarl/goproxy/ext v0.0.0-20190711103511-473e67f1d7d2/go.mod h1:gNh8nYJoAm43RfaxurUnxr+N1PwuFV3ZMl/efxlIlY8= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= +github.com/envoyproxy/go-control-plane v0.10.1/go.mod h1:AY7fTTXNdv/aJ2O5jwpxAPOWUZ7hQAEvzN5Pf27BkQQ= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/envoyproxy/protoc-gen-validate v0.6.2/go.mod h1:2t7qjJNvHPx8IjnBOzl9E9/baC+qXE/TeeyBRzgJDws= +github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ= github.com/evanphx/json-patch v4.5.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84= github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= +github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= +github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI= github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= github.com/getkin/kin-openapi v0.76.0/go.mod h1:660oXbgy5JFMKreazJaQTw7o+X00qeSyhcnluiMv+Xg= +github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= +github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v1.2.0 h1:QK40JKJyMdUDz+h+xvCsru/bJhvG0UxvePV0ufL/AcE= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/zapr v1.2.0 h1:n4JnPI1T3Qq1SFEi/F8rwLrZERp2bso19PJZDB9dayk= +github.com/go-logr/zapr v1.2.0/go.mod h1:Qa4Bsj2Vb+FAVeAKsLD8RLQ+YRJB8YDmOAKxaBQf7Ro= +github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= +github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= +github.com/go-openapi/analysis v0.18.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= +github.com/go-openapi/analysis v0.19.2/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= +github.com/go-openapi/analysis v0.19.4/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= +github.com/go-openapi/analysis v0.19.5/go.mod h1:hkEAkxagaIvIP7VTn8ygJNkd4kAYON2rCu0v0ObL0AU= +github.com/go-openapi/analysis v0.19.10/go.mod h1:qmhS3VNFxBlquFJ0RGoDtylO9y4pgTAUNE9AEEMdlJQ= +github.com/go-openapi/analysis v0.19.16/go.mod h1:GLInF007N83Ad3m8a/CbQ5TPzdnGT7workfHwuVjNVk= +github.com/go-openapi/analysis v0.20.0/go.mod h1:BMchjvaHDykmRMsK40iPtvyOfFdMMxlOmQr9FBZk+Og= +github.com/go-openapi/analysis v0.20.1/go.mod h1:BMchjvaHDykmRMsK40iPtvyOfFdMMxlOmQr9FBZk+Og= +github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= +github.com/go-openapi/errors v0.18.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= +github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= +github.com/go-openapi/errors v0.19.3/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= +github.com/go-openapi/errors v0.19.6/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= +github.com/go-openapi/errors v0.19.7/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= +github.com/go-openapi/errors v0.19.8/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= +github.com/go-openapi/errors v0.19.9/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= +github.com/go-openapi/errors v0.20.1/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= +github.com/go-openapi/errors v0.20.2/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= +github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= +github.com/go-openapi/jsonpointer v0.18.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= +github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= +github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= +github.com/go-openapi/jsonreference v0.18.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= +github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= +github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= +github.com/go-openapi/jsonreference v0.19.6/go.mod h1:diGHMEHg2IqXZGKxqyvWdfWU/aim5Dprw5bqpKkTvns= +github.com/go-openapi/loads v0.17.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= +github.com/go-openapi/loads v0.18.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= +github.com/go-openapi/loads v0.19.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= +github.com/go-openapi/loads v0.19.2/go.mod h1:QAskZPMX5V0C2gvfkGZzJlINuP7Hx/4+ix5jWFxsNPs= +github.com/go-openapi/loads v0.19.3/go.mod h1:YVfqhUCdahYwR3f3iiwQLhicVRvLlU/WO5WPaZvcvSI= +github.com/go-openapi/loads v0.19.5/go.mod h1:dswLCAdonkRufe/gSUC3gN8nTSaB9uaS2es0x5/IbjY= +github.com/go-openapi/loads v0.19.6/go.mod h1:brCsvE6j8mnbmGBh103PT/QLHfbyDxA4hsKvYBNEGVc= +github.com/go-openapi/loads v0.19.7/go.mod h1:brCsvE6j8mnbmGBh103PT/QLHfbyDxA4hsKvYBNEGVc= +github.com/go-openapi/loads v0.20.0/go.mod h1:2LhKquiE513rN5xC6Aan6lYOSddlL8Mp20AW9kpviM4= +github.com/go-openapi/loads v0.20.2/go.mod h1:hTVUotJ+UonAMMZsvakEgmWKgtulweO9vYP2bQYKA/o= +github.com/go-openapi/loads v0.21.0/go.mod h1:rHYve9nZrQ4CJhyeIIFJINGCg1tQpx2yJrrNo8sf1ws= +github.com/go-openapi/runtime v0.0.0-20180920151709-4f900dc2ade9/go.mod h1:6v9a6LTXWQCdL8k1AO3cvqx5OtZY/Y9wKTgaoP6YRfA= +github.com/go-openapi/runtime v0.19.0/go.mod h1:OwNfisksmmaZse4+gpV3Ne9AyMOlP1lt4sK4FXt0O64= +github.com/go-openapi/runtime v0.19.4/go.mod h1:X277bwSUBxVlCYR3r7xgZZGKVvBd/29gLDlFGtJ8NL4= +github.com/go-openapi/runtime v0.19.15/go.mod h1:dhGWCTKRXlAfGnQG0ONViOZpjfg0m2gUt9nTQPQZuoo= +github.com/go-openapi/runtime v0.19.16/go.mod h1:5P9104EJgYcizotuXhEuUrzVc+j1RiSjahULvYmlv98= +github.com/go-openapi/runtime v0.19.24/go.mod h1:Lm9YGCeecBnUUkFTxPC4s1+lwrkJ0pthx8YvyjCfkgk= +github.com/go-openapi/runtime v0.21.1/go.mod h1:aQg+kaIQEn+A2CRSY1TxbM8+sT9g2V3aLc1FbIAnbbs= github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= +github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= +github.com/go-openapi/spec v0.18.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= +github.com/go-openapi/spec v0.19.2/go.mod h1:sCxk3jxKgioEJikev4fgkNmwS+3kuYdJtcsZsD5zxMY= +github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= +github.com/go-openapi/spec v0.19.6/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= +github.com/go-openapi/spec v0.19.8/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= +github.com/go-openapi/spec v0.19.15/go.mod h1:+81FIL1JwC5P3/Iuuozq3pPE9dXdIEGxFutcFKaVbmU= +github.com/go-openapi/spec v0.20.0/go.mod h1:+81FIL1JwC5P3/Iuuozq3pPE9dXdIEGxFutcFKaVbmU= +github.com/go-openapi/spec v0.20.1/go.mod h1:93x7oh+d+FQsmsieroS4cmR3u0p/ywH649a3qwC9OsQ= +github.com/go-openapi/spec v0.20.3/go.mod h1:gG4F8wdEDN+YPBMVnzE85Rbhf+Th2DTvA9nFPQ5AYEg= +github.com/go-openapi/spec v0.20.4/go.mod h1:faYFR1CvsJZ0mNsmsphTMSoRrNV3TEDoAM7FOEWeq8I= +github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= +github.com/go-openapi/strfmt v0.18.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= +github.com/go-openapi/strfmt v0.19.0/go.mod h1:+uW+93UVvGGq2qGaZxdDeJqSAqBqBdl+ZPMF/cC8nDY= +github.com/go-openapi/strfmt v0.19.2/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= +github.com/go-openapi/strfmt v0.19.3/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= +github.com/go-openapi/strfmt v0.19.4/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk= +github.com/go-openapi/strfmt v0.19.5/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk= +github.com/go-openapi/strfmt v0.19.11/go.mod h1:UukAYgTaQfqJuAFlNxxMWNvMYiwiXtLsF2VwmoFtbtc= +github.com/go-openapi/strfmt v0.20.0/go.mod h1:UukAYgTaQfqJuAFlNxxMWNvMYiwiXtLsF2VwmoFtbtc= +github.com/go-openapi/strfmt v0.20.2/go.mod h1:43urheQI9dNtE5lTZQfuFJvjYJKPrxicATpEfZwHUNk= +github.com/go-openapi/strfmt v0.21.0/go.mod h1:ZRQ409bWMj+SOgXofQAGTIo2Ebu72Gs+WaRADcS5iNg= +github.com/go-openapi/strfmt v0.21.1/go.mod h1:I/XVKeLc5+MM5oPNN7P6urMOpuLXEcNrCX/rPGuWb0k= github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= +github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= +github.com/go-openapi/swag v0.18.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= +github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.7/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY= +github.com/go-openapi/swag v0.19.9/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY= +github.com/go-openapi/swag v0.19.12/go.mod h1:eFdyEBkTdoAf/9RXBvj4cr1nH7GD8Kzo5HTt47gr72M= +github.com/go-openapi/swag v0.19.13/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= +github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= +github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= +github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= +github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA= +github.com/go-openapi/validate v0.19.3/go.mod h1:90Vh6jjkTn+OT1Eefm0ZixWNFjhtOH7vS9k0lo6zwJo= +github.com/go-openapi/validate v0.19.10/go.mod h1:RKEZTUWDkxKQxN2jDT7ZnZi2bhZlbNMAuKvKB+IaGx8= +github.com/go-openapi/validate v0.19.12/go.mod h1:Rzou8hA/CBw8donlS6WNEUQupNvUZ0waH08tGe6kAQ4= +github.com/go-openapi/validate v0.19.15/go.mod h1:tbn/fdOwYHgrhPBzidZfJC2MIVvs9GA7monOmWBbeCI= +github.com/go-openapi/validate v0.20.1/go.mod h1:b60iJT+xNNLfaQJUqLI7946tYiFEOuE9E4k54HpKcJ0= +github.com/go-openapi/validate v0.20.3/go.mod h1:goDdqVGiigM3jChcrYJxD2joalke3ZXeftD16byIjA4= +github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= +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/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= +github.com/gobuffalo/attrs v0.0.0-20190224210810-a9411de4debd/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0= +github.com/gobuffalo/depgen v0.0.0-20190329151759-d478694a28d3/go.mod h1:3STtPUQYuzV0gBVOY3vy6CfMm/ljR4pABfrTeHNLHUY= +github.com/gobuffalo/depgen v0.1.0/go.mod h1:+ifsuy7fhi15RWncXQQKjWS9JPkdah5sZvtHc2RXGlg= +github.com/gobuffalo/envy v1.6.15/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= +github.com/gobuffalo/envy v1.7.0/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= +github.com/gobuffalo/flect v0.1.0/go.mod h1:d2ehjJqGOH/Kjqcoz+F7jHTBbmDb38yXA598Hb50EGs= +github.com/gobuffalo/flect v0.1.1/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= +github.com/gobuffalo/flect v0.1.3/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= +github.com/gobuffalo/genny v0.0.0-20190329151137-27723ad26ef9/go.mod h1:rWs4Z12d1Zbf19rlsn0nurr75KqhYp52EAGGxTbBhNk= +github.com/gobuffalo/genny v0.0.0-20190403191548-3ca520ef0d9e/go.mod h1:80lIj3kVJWwOrXWWMRzzdhW3DsrdjILVil/SFKBzF28= +github.com/gobuffalo/genny v0.1.0/go.mod h1:XidbUqzak3lHdS//TPu2OgiFB+51Ur5f7CSnXZ/JDvo= +github.com/gobuffalo/genny v0.1.1/go.mod h1:5TExbEyY48pfunL4QSXxlDOmdsD44RRq4mVZ0Ex28Xk= +github.com/gobuffalo/gitgen v0.0.0-20190315122116-cc086187d211/go.mod h1:vEHJk/E9DmhejeLeNt7UVvlSGv3ziL+djtTr3yyzcOw= +github.com/gobuffalo/gogen v0.0.0-20190315121717-8f38393713f5/go.mod h1:V9QVDIxsgKNZs6L2IYiGR8datgMhB577vzTDqypH360= +github.com/gobuffalo/gogen v0.1.0/go.mod h1:8NTelM5qd8RZ15VjQTFkAW6qOMx5wBbW4dSCS3BY8gg= +github.com/gobuffalo/gogen v0.1.1/go.mod h1:y8iBtmHmGc4qa3urIyo1shvOD8JftTtfcKi+71xfDNE= +github.com/gobuffalo/logger v0.0.0-20190315122211-86e12af44bc2/go.mod h1:QdxcLw541hSGtBnhUc4gaNIXRjiDppFGaDqzbrBd3v8= +github.com/gobuffalo/mapi v1.0.1/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= +github.com/gobuffalo/mapi v1.0.2/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= +github.com/gobuffalo/packd v0.0.0-20190315124812-a385830c7fc0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= +github.com/gobuffalo/packd v0.1.0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= +github.com/gobuffalo/packr/v2 v2.0.9/go.mod h1:emmyGweYTm6Kdper+iywB6YK5YzuKchGtJQZ0Odn4pQ= +github.com/gobuffalo/packr/v2 v2.2.0/go.mod h1:CaAwI0GPIAv+5wKLtv8Afwl+Cm78K/I/VCm/3ptBN+0= +github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw= +github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v1.0.0 h1:nfP3RFugxnNRyKgeWd4oI1nYvXpxrx8ck8ZrcizshdQ= +github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= +github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191027212112-611e8accdfc9/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= +github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= @@ -95,78 +371,217 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= +github.com/google/cel-go v0.9.0/go.mod h1:U7ayypeSkw23szu4GaQTPJGx66c20mx8JklMSxrmI1w= +github.com/google/cel-spec v0.6.0/go.mod h1:Nwjgxy5CbjlPrtCWjeDjUyKMl8w41YBYGjsyDdqk0xA= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o= +github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= github.com/google/gofuzz v0.0.0-20161122191042-44d81051d367/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-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-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +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.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= +github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU= github.com/googleapis/gnostic v0.5.5 h1:9fHAtK0uDfpveeqqo1hkEZJcFvYXAiCN3UutL8F9xHw= github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97DwqyJO1AENw9kA= github.com/gophercloud/gophercloud v0.6.0/go.mod h1:GICNByuaEBibcjmjvI7QvYJSZEbGkcYwAR7EZK2WMqM= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.2 h1:I/pwhnUln5wbMnTyRbzswA0/JxpK8sZj0aUfI3TV1So= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.2/go.mod h1:lsuH8kb4GlMdSlI4alNIBBSAt5CHJtg3i+0WuN9J5YM= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.3 h1:I8MsauTJQXZ8df8qJvEln0kYNc3bSapuaSsEsnFdEFU= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.3/go.mod h1:lZdb/YAJUSj9OqrCHs2ihjtoO3+xK3G53wTYXFWRGDo= +github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= +github.com/hashicorp/consul/api v1.12.0/go.mod h1:6pVBMo0ebnYdt2S3H87XhekM/HHrUoTD2XXb/VrZVy0= +github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= +github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= +github.com/hashicorp/go-hclog v1.0.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= +github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= +github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= +github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= +github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= +github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= +github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= +github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= +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.3/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +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/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= +github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= +github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= +github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= +github.com/hashicorp/memberlist v0.3.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= +github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= +github.com/hashicorp/serf v0.9.6/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= +github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E= github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= +github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= +github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= +github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= +github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v0.0.0-20180612202835-f2b4162afba3/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0 h1:U0609e9tgbseu3rBINet9P48AI/D3oJs4dN7jwJOQ1U= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= +github.com/karrick/godirwalk v1.8.0/go.mod h1:H5KPZjojv4lE+QYImBI8xVtrBRgYrIVsaRPx4tDPEn4= +github.com/karrick/godirwalk v1.10.3/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA= +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= 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/cpuid/v2 v2.0.6 h1:dQ5ueTiftKxp0gyjKSx5+8BtPWkyQbd95m8Gys/RarI= -github.com/klauspost/cpuid/v2 v2.0.6/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= +github.com/klauspost/compress v1.9.5/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= +github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/lyft/protoc-gen-star v0.5.3/go.mod h1:V0xaHgaf5oCCqmcxYcWiDfTiKsZsRc87/1qhoTACD8w= +github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.5 h1:b6kJs+EmPFMYGkow9GiUyCyOvIwYetYJ3fSaWak/Gls= github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.7.1/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= +github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= +github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= +github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= +github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= +github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= +github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= +github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= +github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= +github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= +github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= +github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.3.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.4.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.3 h1:OVowDSCllw/YjdLkam3/sm7wEtOy59d8ndGgCcyj8cs= github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= +github.com/moby/term v0.0.0-20210610120745-9d4ed1856297/go.mod h1:vgPCkQMyxTZ7IDy8SXRufE172gr8+K/JE/7hHFxHW3A= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -175,24 +590,43 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= +github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= +github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= +github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= +github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.17.0 h1:9Luw4uT5HTjHTN8+aNcSThgH1vdXnmdJ8xIfZ4wyTRE= +github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= +github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= +github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= +github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pelletier/go-toml v1.4.0/go.mod h1:PN7xzY2wHTK0K9p34ErDQMlFxa51Fk0OUruD3k1mMwo= +github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= +github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pelletier/go-toml v1.9.4 h1:tjENF6MfZAg8e4ZmZTeWaWiT2vXtsoO6+iuOjFhECwM= github.com/pelletier/go-toml v1.9.4/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -200,38 +634,102 @@ github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZ github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= +github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= github.com/processout/grpc-go-pool v1.2.1 h1:hbp1BOA02CIxEAoRLHGpUhhPFv77nwfBLBeO3Ya9P7I= github.com/processout/grpc-go-pool v1.2.1/go.mod h1:F4hiNj96O6VQ87jv4rdz8R9tkHdelQQJ/J2B1a5VSt4= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= +github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= +github.com/prometheus/client_golang v1.11.0 h1:HNkLOAEQMIDv/K+04rukrLx6ch7msSRwf3/SASFAGtQ= +github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= +github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= +github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= +github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= +github.com/prometheus/common v0.28.0 h1:vGVfV9KrDTvWt5boZO0I19g2E3CsWfpPPKZM9dt3mEw= +github.com/prometheus/common v0.28.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= +github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.6.0 h1:mxy4L2jP6qMonqmq+aTtOx1ifVWUgG/TAmntgbh3xv4= +github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-charset v0.0.0-20180617210344-2471d30d28b4/go.mod h1:qgYeAmZ5ZIpBWTGllZSQnw97Dj+woV0toclVaRGI8pc= +github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rs/xid v1.3.0 h1:6NjYksEUlhurdVehpc7S7dk6DAmcKv8V9gG0FsVN2U4= github.com/rs/xid v1.3.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= -github.com/segmentio/asm v1.1.0 h1:fkVr8k5J4sKoFjTGVD6r1yKvDKqmvrEh3K7iyVxgBs8= -github.com/segmentio/asm v1.1.0/go.mod h1:4EUJGaKsB8ImLUwOGORVsNd9vTRDeh44JGsY4aKp5I4= -github.com/segmentio/encoding v0.3.2 h1:gkXXteOfNaPPlrXTEf/e5tWvaQGVJWnvT3LqMzUeH7U= -github.com/segmentio/encoding v0.3.2/go.mod h1:waft2p6XI4z2pk07M0YzZV4wEiqaRvsBSyWNHxVx4gU= +github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/sagikazarmark/crypt v0.4.0/go.mod h1:ALv2SRj7GxYV4HO9elxH9nS6M9gW+xDNxqmyJ6RfDFM= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/segmentio/asm v1.1.3 h1:WM03sfUOENvvKexOLp+pCqgb/WDjsi7EK8gIsICtzhc= +github.com/segmentio/asm v1.1.3/go.mod h1:Ld3L4ZXGNcSLRg4JBsZ3//1+f/TjYl0Mzen/DQy1EJg= +github.com/segmentio/encoding v0.3.3 h1:VG1HceOLwHkSDdkxshlu9pD4FftWkScmHc8RDQ+w9uM= +github.com/segmentio/encoding v0.3.3/go.mod h1:n0JeuIqEQrQoPDGsjo8UNd1iA0U8d8+oHAA4E3G3OxM= +github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749 h1:bUGsEnyNbVPw06Bs80sCeARAlK8lhwqGyi6UT8ymuGk= github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546 h1:pXY9qYc/MP5zdvqWEUH6SjNiu7VhSjuVFTFiTcphaLU= github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/speps/go-hashids v2.0.0+incompatible h1:kSfxGfESueJKTx0mpER9Y/1XHl+FVQjtCqRyYcviFbw= github.com/speps/go-hashids v2.0.0+incompatible/go.mod h1:P7hqPzMdnZOfyIk+xrlG1QaSMw+gCBdHKsBDnhpaZvc= +github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= +github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4= github.com/spf13/afero v1.6.0 h1:xoax2sJ2DT8S8xA2paPFjDCScCNeWsg75VG0DLRreiY= github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= +github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.4.1 h1:s0hze+J0196ZfEMTs80N7UlFt0BDuQ7Q+JDnHiMWKdA= github.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= +github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk= +github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= +github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns= github.com/spf13/viper v1.10.1 h1:nuJZuYpG7gTj/XqiUwg8bA0cp1+M2mC3J4g5luUYBKk= github.com/spf13/viper v1.10.1/go.mod h1:IGlFPqhNAPKRxohIzWpI5QEy4kuI7tcl5WvR+8qy1rU= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/testify v0.0.0-20151208002404-e3a8ff8ce365/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= @@ -242,8 +740,12 @@ github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5Cc github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= +github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= +github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc h1:9lRDQMhESg+zvGYmW5DyG0UqvY96Bu5QYsTLvCHdrgo= github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc/go.mod h1:bciPuU6GHm1iF1pBvUfxfsH0Wmnc2VbpgvbI9ZWuIRs= +github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/uptrace/bun v1.0.21 h1:5ek4bnrEmZo6wvY/RHt1dJNXzOPOnrfJeZMoZfZt9Io= github.com/uptrace/bun v1.0.21/go.mod h1:u+QsgCgjGFwshy3euGAN1CLEO9RMf42lga5jQ/ezYsc= github.com/uptrace/bun/dialect/pgdialect v1.0.21 h1:2MoMW1qPpAQkwjNDBmQaZBAR07qpijJsw/p6gYzwdl0= @@ -252,132 +754,561 @@ github.com/uptrace/bun/driver/pgdriver v1.0.21 h1:A6X0aGGkFguVJThhfcq6bZlPU1KAyX github.com/uptrace/bun/driver/pgdriver v1.0.21/go.mod h1:sV53gIuC3GsW/SVjobgMfyQmvhB4CgGQrpiYayuKjVs= github.com/uptrace/bun/extra/bundebug v1.0.21 h1:ILYJLqhx97I9WM+GbCYnF1QjNN63gpI2fvoj04atf8s= github.com/uptrace/bun/extra/bundebug v1.0.21/go.mod h1:n/2QqdhgXrLHDOYqezHmJzBNKf/2NNjE5xMi2fZ38iY= +github.com/valyala/fastjson v1.6.3 h1:tAKFnnwmeMGPbwJ7IwxcTPCNr3uIzoIj3/Fh90ra4xc= +github.com/valyala/fastjson v1.6.3/go.mod h1:CLCAqky6SMuOcxStkYQvblddUtoRxhYMGLrsQns1aXY= +github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw= github.com/vmihailenco/msgpack/v5 v5.3.5 h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9znI5mJU= github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= +github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= +github.com/xdg-go/scram v1.0.2/go.mod h1:1WAq6h33pAW+iRreB34OORO2Nf7qel3VV3fjBj+hCSs= +github.com/xdg-go/stringprep v1.0.2/go.mod h1:8F9zXuvzgwmyT5DUm4GUfZGDdT3W+LCvS6+da4O5kxM= +github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I= +github.com/xdg/stringprep v0.0.0-20180714160509-73f8eece6fdc/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= +github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= +go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= +go.etcd.io/etcd/api/v3 v3.5.1/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= +go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= +go.etcd.io/etcd/client/pkg/v3 v3.5.1/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= +go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= +go.etcd.io/etcd/client/v2 v2.305.1/go.mod h1:pMEacxZW7o8pg4CrFE7pquyCJJzZvkvdD2RibOCCCGs= +go.etcd.io/etcd/client/v3 v3.5.0/go.mod h1:AIKXXVX/DQXtfTEqBryiLTUXwON+GuvO6Z7lLS/oTh0= +go.etcd.io/etcd/pkg/v3 v3.5.0/go.mod h1:UzJGatBQ1lXChBkQF0AuAtkRQMYnHubxAEYIrC3MSsE= +go.etcd.io/etcd/raft/v3 v3.5.0/go.mod h1:UFOHSIvO/nKwd4lhkwabrTD3cqW5yVyYYf/KlD00Szc= +go.etcd.io/etcd/server/v3 v3.5.0/go.mod h1:3Ah5ruV+M+7RZr0+Y/5mNLwC+eQlni+mQmOVdCRJoS4= +go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= +go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= +go.mongodb.org/mongo-driver v1.3.0/go.mod h1:MSWZXKOynuguX+JSvwP8i+58jYCXxbia8HS3gZBapIE= +go.mongodb.org/mongo-driver v1.3.4/go.mod h1:MSWZXKOynuguX+JSvwP8i+58jYCXxbia8HS3gZBapIE= +go.mongodb.org/mongo-driver v1.4.3/go.mod h1:WcMNYLx/IlOxLe6JRJiv2uXuCz6zBLndR4SoGjYphSc= +go.mongodb.org/mongo-driver v1.4.4/go.mod h1:WcMNYLx/IlOxLe6JRJiv2uXuCz6zBLndR4SoGjYphSc= +go.mongodb.org/mongo-driver v1.4.6/go.mod h1:WcMNYLx/IlOxLe6JRJiv2uXuCz6zBLndR4SoGjYphSc= +go.mongodb.org/mongo-driver v1.5.1/go.mod h1:gRXCHX4Jo7J0IJ1oDQyUxF7jfy19UfxniMS4xxMmUqw= +go.mongodb.org/mongo-driver v1.7.3/go.mod h1:NqaYOwnXWr5Pm7AOpO5QFxKJ503nbMse/R79oO62zWg= +go.mongodb.org/mongo-driver v1.7.5/go.mod h1:VXEWRZ6URJIkUq2SCAyapmhH0ZLRBP+FT4xhp5Zvxng= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= +go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +go.opentelemetry.io/contrib v0.20.0/go.mod h1:G/EtFaa6qaN7+LxqfIAT3GiZa7Wv5DTBUzl5H4LY0Kc= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.20.0/go.mod h1:oVGt1LRbBOBq1A5BQLlUg9UaU/54aiHw8cgjV3aWZ/E= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0/go.mod h1:2AboqHi0CiIZU0qwhtUfCYD1GeUzvvIXWNkhDt7ZMG4= +go.opentelemetry.io/otel v0.20.0/go.mod h1:Y3ugLH2oa81t5QO+Lty+zXf8zC9L26ax4Nzoxm/dooo= +go.opentelemetry.io/otel/exporters/otlp v0.20.0/go.mod h1:YIieizyaN77rtLJra0buKiNBOm9XQfkPEKBeuhoMwAM= +go.opentelemetry.io/otel/metric v0.20.0/go.mod h1:598I5tYlH1vzBjn+BTuhzTCSb/9debfNp6R3s7Pr1eU= +go.opentelemetry.io/otel/oteltest v0.20.0/go.mod h1:L7bgKf9ZB7qCwT9Up7i9/pn0PWIa9FqQ2IQ8LoxiGnw= +go.opentelemetry.io/otel/sdk v0.20.0/go.mod h1:g/IcepuwNsoiX5Byy2nNV0ySUF1em498m7hBWC279Yc= +go.opentelemetry.io/otel/sdk/export/metric v0.20.0/go.mod h1:h7RBNMsDJ5pmI1zExLi+bJK+Dr8NQCh0qGhm1KDnNlE= +go.opentelemetry.io/otel/sdk/metric v0.20.0/go.mod h1:knxiS8Xd4E/N+ZqKmUPf3gTTZ4/0TjTXukfxjzSTpHE= +go.opentelemetry.io/otel/trace v0.20.0/go.mod h1:6GjCW8zgDjwGHGa6GkyeB8+/5vjT16gUEi0Nf1iBdgw= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= +go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= +go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.1.12 h1:gZAh5/EyT/HQwlpkCy6wTpqfH9H8Lz8zbm3dZh+OyzA= +go.uber.org/goleak v1.1.12/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= +go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= -go.uber.org/zap v1.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI= +go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= +go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= +go.uber.org/zap v1.20.0 h1:N4oPlghZwYG55MlU6LXk/Zp00FVNE9X9wrYO8CEs4lc= +go.uber.org/zap v1.20.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180910181607-0e37d006457b/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190320223903-b7391e95e576/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190422162423-af44ce270edf/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190530122614-20be4c3c3ed5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3 h1:0es+/5331RGQPcXlMfP+WrnIIS6dNnNRe0WB02W0F4M= golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 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-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190320064053-1272bf9dcd53/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200602114024-627f9648deb9/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= +golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM= +golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= +golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210825183410-e898025ed96a/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211209124913-491a49abca63 h1:iocB37TsdFuN6IBRZ+ry36wrkoV51/tl5vOWqkcPGvY= golang.org/x/net v0.0.0-20211209124913-491a49abca63/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 h1:RerP+noqYHUQ8CMRcPlC2nvTa4dcBIjegkuWdcUDuqg= +golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190412183630-56d357773e84/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190321052220-f7bb7a8bee54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190419153524-e8e3143a4f4a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190531175056-4c3a928424d2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200923182605-d9f96fdee20d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210420072515-93ed5bcd2bfe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211029165221-6e7872819dc8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211110154304-99a53858aa08/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211123173158-ef496fb156ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e h1:fLOSk5Q00efkSvAm+4xcoXD+RRmLmmulPn5I3Y9F2EM= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b h1:9zKuko04nR4gjZ4+DNjHqRlAJqbJETHwiNKDqTfOjfE= +golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac h1:7zkz7BUtwNFFqcowJ+RIgu2MaV/MapERkDIy+mwPyjs= +golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190125232054-d66bd3c5d5a6/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190329151228-23e29df326fe/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190416151739-9c9e1878f421/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190420181800-aa740d480789/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190531172133-b3315ee88b7d/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190617190820-da514acc4774/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= +golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.5 h1:ouewzE6p+/VEB31YYnTbEJdi8pFqKp4P4n85vwo3DHA= +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.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.6-0.20210820212750-d4cc65f0b2ff h1:VX/uD7MK0AHXGiScH3fsieUQUcpmRERPDYtqZdJnA+Q= +golang.org/x/tools v0.1.6-0.20210820212750-d4cc65f0b2ff/go.mod h1:YD9qOF0M9xpSpdWTBbzEl5e/RnCefISl8E5Noe10jFM= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +gomodules.xyz/jsonpatch/v2 v2.2.0 h1:4pT439QV83L+G9FkcCriY6EkpcK6r6bK+A5FBUMI7qY= +gomodules.xyz/jsonpatch/v2 v2.2.0/go.mod h1:WXp+iVDkoLQqPudfQ9GBlwB2eZ5DKOnjQZCYdOS8GPY= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= +google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= +google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= +google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= +google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= +google.golang.org/api v0.44.0/go.mod h1:EBOGZqzyhtvMDoxwS97ctnh0zUmYY6CxqXsc1AvkYD8= +google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= +google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= +google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= +google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= +google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= +google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= +google.golang.org/api v0.59.0/go.mod h1:sT2boj7M9YJxZzgeZqXogmhfmRWDtPzT31xkieUbuZU= +google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= +google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= +google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa h1:I0YcKz0I7OAhddo7ya8kMnvprhcWM045PmkBdMO9zN0= +google.golang.org/genproto v0.0.0-20201102152239-715cce707fb0/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= +google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= +google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= +google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= +google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211008145708-270636b82663/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211028162531-8db9c33dc351/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220118154757-00ab72f36ad5 h1:zzNejm+EgrbLfDZ6lu9Uud2IVvHySPl8vQzf04laR5Q= +google.golang.org/genproto v0.0.0-20220118154757-00ab72f36ad5/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= +google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= +google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= +google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= +google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc v1.43.0 h1:Eeu7bZtDZ2DpRCsLhUlcrLnvYaMK1Gz86a+hMVvELmM= google.golang.org/grpc v1.43.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= +google.golang.org/grpc v1.44.0 h1:weqSxi/TMs1SqFRMHCtBgXRs8k3X39QIDEZ0pRcttUg= +google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -392,34 +1323,68 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.66.2 h1:XfR1dOYubytKy4Shzc2LHrrGhU0lDCfDGG1yLPmpgsI= gopkg.in/ini.v1 v1.66.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= +gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= +gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= +gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -k8s.io/apimachinery v0.23.1 h1:sfBjlDFwj2onG0Ijx5C+SrAoeUscPrmghm7wHP+uXlo= -k8s.io/apimachinery v0.23.1/go.mod h1:SADt2Kl8/sttJ62RRsi9MIV4o8f5S3coArm0Iu3fBno= +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.23.0/go.mod h1:8wmDdLBHBNxtOIytwLstXt5E9PddnZb0GaMcqsvDBpg= +k8s.io/api v0.23.2 h1:62cpzreV3dCuj0hqPi8r4dyWh48ogMcyh+ga9jEGij4= +k8s.io/api v0.23.2/go.mod h1:sYuDb3flCtRPI8ghn6qFrcK5ZBu2mhbElxRE95qpwlI= +k8s.io/apiextensions-apiserver v0.23.0/go.mod h1:xIFAEEDlAZgpVBl/1VSjGDmLoXAWRG40+GsWhKhAxY4= +k8s.io/apiextensions-apiserver v0.23.2 h1:N6CIVAhmF0ahgFKUMDdV/AUyckhUb4nIyVPohPtdUPk= +k8s.io/apiextensions-apiserver v0.23.2/go.mod h1:9cs7avT6+GfzbB0pambTvH11wcaR85QQg4ovl9s15UU= +k8s.io/apimachinery v0.23.0/go.mod h1:fFCTTBKvKcwTPFzjlcxp91uPFZr+JA0FubU4fLzzFYc= +k8s.io/apimachinery v0.23.2 h1:dBmjCOeYBdg2ibcQxMuUq+OopZ9fjfLIR5taP/XKeTs= +k8s.io/apimachinery v0.23.2/go.mod h1:zDqeV0AK62LbCI0CI7KbWCAYdLg+E+8UXJ0rIz5gmS8= +k8s.io/apiserver v0.23.0/go.mod h1:Cec35u/9zAepDPPFyT+UMrgqOCjgJ5qtfVJDxjZYmt4= +k8s.io/apiserver v0.23.2/go.mod h1:Kdt8gafkPev9Gfh+H6lCPbmRu42f7BfhOfHKKa3dtyU= +k8s.io/client-go v0.23.0/go.mod h1:hrDnpnK1mSr65lHHcUuIZIXDgEbzc7/683c6hyG4jTA= +k8s.io/client-go v0.23.2 h1:BNbOcxa99jxHH8mM1cPKGIrrKRnCSAfAtyonYGsbFtE= +k8s.io/client-go v0.23.2/go.mod h1:k3YbsWg6GWdHF1THHTQP88X9RhB1DWPo3Dq7KfU/D1c= +k8s.io/code-generator v0.23.0/go.mod h1:vQvOhDXhuzqiVfM/YHp+dmg10WDZCchJVObc9MvowsE= +k8s.io/code-generator v0.23.2/go.mod h1:S0Q1JVA+kSzTI1oUvbKAxZY/DYbA/ZUb4Uknog12ETk= +k8s.io/component-base v0.23.0/go.mod h1:DHH5uiFvLC1edCpvcTDV++NKULdYYU6pR9Tt3HIKMKI= +k8s.io/component-base v0.23.2 h1:dAYmUhWIBWO762etTjBEEKtYYHi5CoQInSLtK6LM1Zs= +k8s.io/component-base v0.23.2/go.mod h1:wS9Z03MO3oJ0RU8bB/dbXTiluGju+SC/F5i660gxB8c= k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= @@ -431,25 +1396,33 @@ k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.30.0 h1:bUO6drIvCIsvZ/XFgfxoGFQU/a4Qkh0iAlvUR7vlHJw= k8s.io/klog/v2 v2.30.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E= -k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 h1:E3J9oCLlaobFUqsjG9DfKbP2BmgwBL2p7pn0A3dG9W4= k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65/go.mod h1:sX9MT8g7NVZM5lVL/j8QyCCJe8YSMW30QvGZWaCIDIk= +k8s.io/kube-openapi v0.0.0-20220114203427-a0453230fd26 h1:2G24ndYyfk0l23ZrGutxb0s9TRe4m1ZjFlcu4cEU1zA= +k8s.io/kube-openapi v0.0.0-20220114203427-a0453230fd26/go.mod h1:sX9MT8g7NVZM5lVL/j8QyCCJe8YSMW30QvGZWaCIDIk= k8s.io/utils v0.0.0-20191030222137-2b95a09bc58d/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b h1:wxEMGetGMur3J1xuGLQY7GEQYg9bZxKn3tKo5k/eYcs= k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= mellium.im/sasl v0.2.1 h1:nspKSRg7/SyO0cRGY71OkfHab8tf9kCts6a6oTDut0w= mellium.im/sasl v0.2.1/go.mod h1:ROaEDLQNuf9vjKqE1SrAfnsobm2YKXT1gnN1uDp1PjQ= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.25/go.mod h1:Mlj9PNLmG9bZ6BHFwFKDo5afkpWyUISkb9Me0GnK66I= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.27/go.mod h1:tq2nT0Kx7W+/f2JVE+zxYtUhdjuELJkVpNz+x/QN5R4= sigs.k8s.io/controller-runtime v0.11.0 h1:DqO+c8mywcZLFJWILq4iktoECTyn30Bkj0CwgqMpZWQ= sigs.k8s.io/controller-runtime v0.11.0/go.mod h1:KKwLiTooNGu+JmLZGn9Sl3Gjmfj66eMbCQznLP5zcqA= sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 h1:fD1pz4yfdADVNfFmcP2aBEtudwUQ1AlLnRBALr33v3s= sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6/go.mod h1:p4QtZmO4uMYipTQNzagwnNoseA6OxSUutVw05NhYDRs= sigs.k8s.io/kustomize/pseudo/k8s v0.1.0 h1:otg4dLFc03c3gzl+2CV8GPGcd1kk8wjXwD+UhhcCn5I= sigs.k8s.io/kustomize/pseudo/k8s v0.1.0/go.mod h1:bl/gVJgYYhJZCZdYU2BfnaKYAlqFkgbJEkpl302jEss= +sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e h1:4Z09Hglb792X0kfOBBJUPFEyvVfQWrYT/l8h5EKA6JQ= sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/structured-merge-diff/v4 v4.1.2/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= -sigs.k8s.io/structured-merge-diff/v4 v4.2.0 h1:kDvPBbnPk+qYmkHmSo8vKGp438IASWofnbbUKDE/bv0= sigs.k8s.io/structured-merge-diff/v4 v4.2.0/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= +sigs.k8s.io/structured-merge-diff/v4 v4.2.1 h1:bKCqE9GvQ5tiVHn5rfn1r+yao3aLQEaLzkkmAkf+A6Y= +sigs.k8s.io/structured-merge-diff/v4 v4.2.1/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= diff --git a/components/cluster-scheduler/pkg/internal/cluster/cluster.go b/components/cluster-scheduler/internal/cluster/cluster.go similarity index 87% rename from components/cluster-scheduler/pkg/internal/cluster/cluster.go rename to components/cluster-scheduler/internal/cluster/cluster.go index 02e3db7..10c07bb 100644 --- a/components/cluster-scheduler/pkg/internal/cluster/cluster.go +++ b/components/cluster-scheduler/internal/cluster/cluster.go @@ -8,9 +8,10 @@ import ( "regexp" "strings" + "github.com/RafaySystems/rcloud-base/components/cluster-scheduler/internal/cluster/constants" + "github.com/RafaySystems/rcloud-base/components/cluster-scheduler/internal/cluster/util" + "github.com/RafaySystems/rcloud-base/components/cluster-scheduler/internal/fixtures" "github.com/RafaySystems/rcloud-base/components/cluster-scheduler/pkg/bootstrapper" - "github.com/RafaySystems/rcloud-base/components/cluster-scheduler/pkg/internal/cluster/constants" - "github.com/RafaySystems/rcloud-base/components/cluster-scheduler/pkg/internal/fixtures" "github.com/RafaySystems/rcloud-base/components/common/pkg/log" infrav3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/infrapb/v3" ) @@ -45,11 +46,11 @@ func HasValidCharacters(name string) bool { func ExtractV2ClusterLabels(edgeDataLabels, clusterV2Labels map[string]string, edgeName, clusterType, metroName string) map[string]string { // Pre-fill mandatory labels res := map[string]string{ - constants.ClusterLabelKey: SanitizeLabelValues(edgeName), - constants.ClusterTypeKey: SanitizeLabelValues(clusterType), + constants.ClusterLabelKey: util.SanitizeLabelValues(edgeName), + constants.ClusterTypeKey: util.SanitizeLabelValues(clusterType), } if metroName != "" { - res[constants.ClusterLocationKey] = SanitizeLabelValues(metroName) + res[constants.ClusterLocationKey] = util.SanitizeLabelValues(metroName) } // Copy over the labels passed by the user for key, value := range edgeDataLabels { @@ -57,7 +58,7 @@ func ExtractV2ClusterLabels(edgeDataLabels, clusterV2Labels map[string]string, e case "gpu": res[constants.ClusterGPU] = value case "gpu_vendor": - res[constants.ClusterGPUVendor] = SanitizeLabelValues(value) + res[constants.ClusterGPUVendor] = util.SanitizeLabelValues(value) default: res[key] = value } diff --git a/components/cluster-scheduler/pkg/internal/cluster/clusterproxy.go b/components/cluster-scheduler/internal/cluster/clusterproxy.go similarity index 100% rename from components/cluster-scheduler/pkg/internal/cluster/clusterproxy.go rename to components/cluster-scheduler/internal/cluster/clusterproxy.go diff --git a/components/cluster-scheduler/internal/cluster/conditions.go b/components/cluster-scheduler/internal/cluster/conditions.go new file mode 100644 index 0000000..c3e314f --- /dev/null +++ b/components/cluster-scheduler/internal/cluster/conditions.go @@ -0,0 +1,190 @@ +package cluster + +import ( + "time" + + "github.com/RafaySystems/rcloud-base/components/cluster-scheduler/internal/cluster/constants" + commonv3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/commonpb/v3" + infrav3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/infrapb/v3" + "github.com/RafaySystems/rcloud-base/components/common/proto/types/scheduler" + "google.golang.org/protobuf/types/known/timestamppb" +) + +// ClusterConditionFunc is the function signature for creating new cluster condition +type ClusterConditionFunc func(status commonv3.RafayConditionStatus, reason string) *infrav3.ClusterCondition + +// ClusterConditionReadyFunc checks if condition type is ready +type ClusterConditionReadyFunc func(c *infrav3.Cluster) bool + +// NamespaceConditionFunc is the function signature for creating new cluster namespace condition +type NamespaceConditionFunc func(status commonv3.RafayConditionStatus, reason string) *scheduler.ClusterNamespaceCondition + +// NamespaceConditionReadyFunc checks if condition type is ready +type NamespaceConditionReadyFunc func(n *scheduler.ClusterNamespace) bool + +// NamespaceConfitionReasonFunc returns condition status reason +type NamespaceConfitionReasonFunc func(n *scheduler.ClusterNamespace) string + +// ClusterConditionCooledDownFunc checks if condition type is in retry and last updated has passed +type ClusterConditionCooledDownFunc func(c *infrav3.Cluster, passed time.Duration) bool + +var ( + NewClusterRegister ClusterConditionFunc = newClusterCondition(infrav3.ClusterConditionType_ClusterRegister) + NewClusterApprove ClusterConditionFunc = newClusterCondition(infrav3.ClusterConditionType_ClusterApprove) + NewClusterCheckIn ClusterConditionFunc = newClusterCondition(infrav3.ClusterConditionType_ClusterCheckIn) + NewClusterNodeSync ClusterConditionFunc = newClusterCondition(infrav3.ClusterConditionType_ClusterNodeSync) + NewClusterNamespaceSync ClusterConditionFunc = newClusterCondition(infrav3.ClusterConditionType_ClusterNamespaceSync) + NewClusterReady ClusterConditionFunc = newClusterCondition(infrav3.ClusterConditionType_ClusterReady) + NewClusterAuxiliaryTaskSync ClusterConditionFunc = newClusterCondition(infrav3.ClusterConditionType_ClusterAuxiliaryTaskSync) + NewClusterBootstrapAgent ClusterConditionFunc = newClusterCondition(infrav3.ClusterConditionType_ClusterBootstrapAgent) + NewClusterDelete ClusterConditionFunc = newClusterCondition(infrav3.ClusterConditionType_ClusterDelete) + + IsClusterBootstrapAgentPending ClusterConditionReadyFunc = isClusterCondition(constants.Pending, infrav3.ClusterConditionType_ClusterBootstrapAgent) + IsClusterBootstrapAgentRetry ClusterConditionReadyFunc = isClusterCondition(constants.Retry, infrav3.ClusterConditionType_ClusterBootstrapAgent) + IsClusterBootstrapAgentCreated ClusterConditionReadyFunc = isClusterCondition(constants.Success, infrav3.ClusterConditionType_ClusterBootstrapAgent) + IsClusterRegisterd ClusterConditionReadyFunc = isClusterConditionSuccess(infrav3.ClusterConditionType_ClusterRegister) + IsClusterRegisterPending ClusterConditionReadyFunc = isClusterCondition(constants.Pending, infrav3.ClusterConditionType_ClusterRegister) + IsClusterApproved ClusterConditionReadyFunc = isClusterConditionSuccess(infrav3.ClusterConditionType_ClusterApprove) + IsClusterCheckedIn ClusterConditionReadyFunc = isClusterConditionSuccess(infrav3.ClusterConditionType_ClusterCheckIn) + IsClusterNodeSynced ClusterConditionReadyFunc = isClusterConditionSuccess(infrav3.ClusterConditionType_ClusterNodeSync) + IsClusterNamespaceSynced ClusterConditionReadyFunc = isClusterConditionSuccess(infrav3.ClusterConditionType_ClusterNamespaceSync) + IsClusterReady ClusterConditionReadyFunc = isClusterConditionSuccess(infrav3.ClusterConditionType_ClusterReady) + IsClusterDeletePending ClusterConditionReadyFunc = isClusterCondition(constants.Pending, infrav3.ClusterConditionType_ClusterDelete) + IsClusterDeleteRetry ClusterConditionReadyFunc = isClusterCondition(constants.Retry, infrav3.ClusterConditionType_ClusterDelete) + IsClusterDeleted ClusterConditionReadyFunc = isClusterCondition(constants.Success, infrav3.ClusterConditionType_ClusterDelete) + IsClusterDeleteNotSet ClusterConditionReadyFunc = isClusterCondition(constants.NotSet, infrav3.ClusterConditionType_ClusterDelete) + + NewNamespaceAssigned NamespaceConditionFunc = newNamespaceCondition(scheduler.ClusterNamespaceConditionType_ClusterNamespaceAssigned) + NewNamespaceConverged NamespaceConditionFunc = newNamespaceCondition(scheduler.ClusterNamespaceConditionType_ClusterNamespaceConverged) + NewNamespaceReady NamespaceConditionFunc = newNamespaceCondition(scheduler.ClusterNamespaceConditionType_ClusterNamespaceReady) + NewNamespaceDeleted NamespaceConditionFunc = newNamespaceCondition(scheduler.ClusterNamespaceConditionType_ClusterNamespaceDelete) + + IsNamespaceAssigned NamespaceConditionReadyFunc = isNamespaceCondition(scheduler.ClusterNamespaceConditionType_ClusterNamespaceAssigned, constants.Success) + IsNamespaceConverged NamespaceConditionReadyFunc = isNamespaceCondition(scheduler.ClusterNamespaceConditionType_ClusterNamespaceConverged, constants.Success) + IsNamespaceConvergeFailed NamespaceConditionReadyFunc = isNamespaceCondition(scheduler.ClusterNamespaceConditionType_ClusterNamespaceConverged, constants.Failed) + IsNamespaceReady NamespaceConditionReadyFunc = isNamespaceCondition(scheduler.ClusterNamespaceConditionType_ClusterNamespaceReady, constants.Success) + IsNamespaceReadyFailed NamespaceConditionReadyFunc = isNamespaceCondition(scheduler.ClusterNamespaceConditionType_ClusterNamespaceReady, constants.Failed) + IsNamespaceDeleted NamespaceConditionReadyFunc = isNamespaceCondition(scheduler.ClusterNamespaceConditionType_ClusterNamespaceDelete, constants.Success) + NamespaceConvergeFailedReason NamespaceConfitionReasonFunc = namespaceConditionReason(scheduler.ClusterNamespaceConditionType_ClusterNamespaceConverged, constants.Failed) + NamespaceReadyFailedReason NamespaceConfitionReasonFunc = namespaceConditionReason(scheduler.ClusterNamespaceConditionType_ClusterNamespaceReady, constants.Failed) + + IsClusterBootstrapAgentCooledDown ClusterConditionCooledDownFunc = isClusterCooledDown(infrav3.ClusterConditionType_ClusterBootstrapAgent) + IsClusterDeleteCooledDown ClusterConditionCooledDownFunc = isClusterCooledDown(infrav3.ClusterConditionType_ClusterDelete) +) + +// DefaultClusterConditions is the default cluster conditions list +var DefaultClusterConditions = func() []*infrav3.ClusterCondition { + var conditions []*infrav3.ClusterCondition + + var i int32 = 1 + for { + if _, ok := infrav3.ClusterConditionType_name[i]; !ok { + break + } + clstrCnd := newClusterCondition(infrav3.ClusterConditionType(i))(commonv3.RafayConditionStatus_NotSet, "pending") + conditions = append(conditions, clstrCnd) + i++ + } + + return conditions +}() + +func newClusterCondition(conditionType infrav3.ClusterConditionType) func(status commonv3.RafayConditionStatus, reason string) *infrav3.ClusterCondition { + return func(status commonv3.RafayConditionStatus, reason string) *infrav3.ClusterCondition { + return &infrav3.ClusterCondition{ + Type: conditionType, + Status: status, + Reason: reason, + LastUpdated: timestamppb.New(time.Now()), + } + } +} + +// SetClusterCondition sets condition in cluster conditions +var SetClusterCondition = func(c *infrav3.Cluster, condtition *infrav3.ClusterCondition) { + for i, ec := range c.Spec.ClusterData.ClusterStatus.Conditions { + if ec.Type == condtition.Type { + c.Spec.ClusterData.ClusterStatus.Conditions[i] = condtition + break + } + } + +} + +func isClusterCondition(conditionStatus commonv3.RafayConditionStatus, conditionTypes ...infrav3.ClusterConditionType) func(c *infrav3.Cluster) bool { + return func(c *infrav3.Cluster) bool { + for _, condition := range c.Spec.ClusterData.ClusterStatus.Conditions { + for _, conditionType := range conditionTypes { + if condition.Type == conditionType { + if condition.Status == conditionStatus { + return true + } + } + } + } + return false + } +} + +func isClusterConditionSuccess(conditionType infrav3.ClusterConditionType) func(c *infrav3.Cluster) bool { + return func(c *infrav3.Cluster) bool { + for _, condition := range c.Spec.ClusterData.ClusterStatus.Conditions { + if condition.Type == conditionType { + if condition.Status == constants.Success { + return true + } + } + } + return false + } +} + +func newNamespaceCondition(conditionType scheduler.ClusterNamespaceConditionType) func(status commonv3.RafayConditionStatus, reason string) *scheduler.ClusterNamespaceCondition { + return func(status commonv3.RafayConditionStatus, reason string) *scheduler.ClusterNamespaceCondition { + return &scheduler.ClusterNamespaceCondition{ + Type: conditionType, + Status: status, + Reason: reason, + LastUpdated: timestamppb.Now(), + } + } +} + +func isNamespaceCondition(conditionType scheduler.ClusterNamespaceConditionType, conditionStatus commonv3.RafayConditionStatus) func(n *scheduler.ClusterNamespace) bool { + return func(n *scheduler.ClusterNamespace) bool { + for _, condition := range n.Status.Conditions { + if condition.Type == conditionType { + if condition.Status == conditionStatus { + return true + } + } + } + return false + } +} + +func namespaceConditionReason(conditionType scheduler.ClusterNamespaceConditionType, conditionStatus commonv3.RafayConditionStatus) func(n *scheduler.ClusterNamespace) string { + return func(n *scheduler.ClusterNamespace) string { + for _, condition := range n.Status.Conditions { + if condition.Type == conditionType { + if condition.Status == conditionStatus { + return condition.Reason + } + } + } + return "" + } +} + +func isClusterCooledDown(conditionType infrav3.ClusterConditionType) func(c *infrav3.Cluster, passed time.Duration) bool { + return func(c *infrav3.Cluster, passed time.Duration) bool { + for _, condition := range c.Spec.ClusterData.ClusterStatus.Conditions { + if condition.Type == conditionType && condition.Status == constants.Retry { + if condition.LastUpdated.AsTime().Before(time.Now().Add(-passed)) { + return true + } + } + } + return false + } +} diff --git a/components/cluster-scheduler/pkg/internal/cluster/constants/constants.go b/components/cluster-scheduler/internal/cluster/constants/constants.go similarity index 100% rename from components/cluster-scheduler/pkg/internal/cluster/constants/constants.go rename to components/cluster-scheduler/internal/cluster/constants/constants.go diff --git a/components/cluster-scheduler/pkg/internal/cluster/dao/cluster.go b/components/cluster-scheduler/internal/cluster/dao/cluster.go similarity index 76% rename from components/cluster-scheduler/pkg/internal/cluster/dao/cluster.go rename to components/cluster-scheduler/internal/cluster/dao/cluster.go index 6c908de..3e165f6 100644 --- a/components/cluster-scheduler/pkg/internal/cluster/dao/cluster.go +++ b/components/cluster-scheduler/internal/cluster/dao/cluster.go @@ -6,8 +6,8 @@ import ( "strings" "time" - "github.com/RafaySystems/rcloud-base/components/cluster-scheduler/pkg/internal/cluster/constants" - "github.com/RafaySystems/rcloud-base/components/cluster-scheduler/pkg/internal/models" + "github.com/RafaySystems/rcloud-base/components/cluster-scheduler/internal/cluster/constants" + "github.com/RafaySystems/rcloud-base/components/cluster-scheduler/internal/models" "github.com/RafaySystems/rcloud-base/components/common/pkg/persistence/provider/pg" commonv3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/commonpb/v3" "github.com/google/uuid" @@ -28,6 +28,10 @@ type ClusterDao interface { GetCluster(ctx context.Context, c *models.Cluster) (*models.Cluster, error) //get cluster for token GetClusterForToken(ctx context.Context, token string) (cluster *models.Cluster, err error) + // update relay config information + UpdateClusterAnnotations(ctx context.Context, c *models.Cluster) error + // Notify channel + Notify(chanName, value string) error } // clusterDao implements ClusterDao @@ -108,6 +112,18 @@ func (s *clusterDao) UpdateCluster(ctx context.Context, c *models.Cluster) error return nil } +func (s *clusterDao) UpdateClusterAnnotations(ctx context.Context, c *models.Cluster) error { + + _, err := s.cdao.GetInstance().NewUpdate().Model((*models.Cluster)(nil)). + Set("annotations = ?", c.Annotations). + Where("id = ?", c.ID).Exec(ctx) + if err != nil { + return err + } + + return nil +} + func (s *clusterDao) GetCluster(ctx context.Context, cluster *models.Cluster) (*models.Cluster, error) { if cluster.ID != uuid.Nil { @@ -126,33 +142,19 @@ func (s *clusterDao) GetCluster(ctx context.Context, cluster *models.Cluster) (* } func (s *clusterDao) DeleteCluster(ctx context.Context, c *models.Cluster) error { - return s.cdao.Delete(ctx, c.ID, c) + _, err := s.cdao.GetInstance(). + NewUpdate().Model(c). + Set("trash = ?", true). + Set("deleted_at = ?", time.Now()). + Where("id = ?", c.ID).Exec(ctx) + return err } func (s *clusterDao) ListClusters(ctx context.Context, qo commonv3.QueryOptions) (clusters []models.Cluster, err error) { - var pid, oid, prid uuid.NullUUID - - id, err := uuid.Parse(qo.PartnerID) - if err != nil { - pid = uuid.NullUUID{UUID: uuid.Nil, Valid: false} - } else { - pid = uuid.NullUUID{UUID: id, Valid: true} - } - - id, err = uuid.Parse(qo.OrganizationID) - if err != nil { - oid = uuid.NullUUID{UUID: uuid.Nil, Valid: false} - } else { - oid = uuid.NullUUID{UUID: id, Valid: true} - } - - id, err = uuid.Parse(qo.ProjectID) - if err != nil { - prid = uuid.NullUUID{UUID: uuid.Nil, Valid: false} - } else { - prid = uuid.NullUUID{UUID: id, Valid: true} - } + pid := uuid.NullUUID{UUID: uuid.MustParse(qo.Partner), Valid: true} + oid := uuid.NullUUID{UUID: uuid.MustParse(qo.Organization), Valid: true} + prid := uuid.NullUUID{UUID: uuid.MustParse(qo.Project), Valid: true} err = s.cdao.ListByProject(ctx, pid, oid, prid, &clusters) if err != nil { @@ -162,6 +164,14 @@ func (s *clusterDao) ListClusters(ctx context.Context, qo commonv3.QueryOptions) } func (s *clusterDao) GetClusterForToken(ctx context.Context, token string) (cluster *models.Cluster, err error) { - entity, err := s.cdao.GetX(ctx, "token", token, &cluster) + entity, err := s.cdao.GetX(ctx, "token", token, &models.Cluster{}) + if err != nil { + return nil, err + } return entity.(*models.Cluster), err } + +func (s *clusterDao) Notify(chanName, value string) error { + _, err := s.cdao.GetInstance().Exec("NOTIFY ?, ?", bun.Ident(chanName), value) + return err +} diff --git a/components/cluster-scheduler/pkg/internal/cluster/dao/clusteroperatorbootstrap.go b/components/cluster-scheduler/internal/cluster/dao/clusteroperatorbootstrap.go similarity index 99% rename from components/cluster-scheduler/pkg/internal/cluster/dao/clusteroperatorbootstrap.go rename to components/cluster-scheduler/internal/cluster/dao/clusteroperatorbootstrap.go index e077b81..9f5bdfa 100644 --- a/components/cluster-scheduler/pkg/internal/cluster/dao/clusteroperatorbootstrap.go +++ b/components/cluster-scheduler/internal/cluster/dao/clusteroperatorbootstrap.go @@ -4,7 +4,7 @@ import ( "context" "database/sql" - "github.com/RafaySystems/rcloud-base/components/cluster-scheduler/pkg/internal/models" + "github.com/RafaySystems/rcloud-base/components/cluster-scheduler/internal/models" "github.com/RafaySystems/rcloud-base/components/common/pkg/log" "github.com/RafaySystems/rcloud-base/components/common/pkg/persistence/provider/pg" "github.com/uptrace/bun" diff --git a/components/cluster-scheduler/pkg/internal/cluster/dao/clustertoken.go b/components/cluster-scheduler/internal/cluster/dao/clustertoken.go similarity index 91% rename from components/cluster-scheduler/pkg/internal/cluster/dao/clustertoken.go rename to components/cluster-scheduler/internal/cluster/dao/clustertoken.go index ed5ec47..9641660 100644 --- a/components/cluster-scheduler/pkg/internal/cluster/dao/clustertoken.go +++ b/components/cluster-scheduler/internal/cluster/dao/clustertoken.go @@ -4,7 +4,7 @@ import ( "context" "errors" - "github.com/RafaySystems/rcloud-base/components/cluster-scheduler/pkg/internal/models" + "github.com/RafaySystems/rcloud-base/components/cluster-scheduler/internal/models" "github.com/RafaySystems/rcloud-base/components/common/pkg/persistence/provider/pg" infrav3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/infrapb/v3" "github.com/rs/xid" @@ -47,11 +47,11 @@ func (s *clusterTokenDao) CreateToken(ctx context.Context, token *models.Cluster // registerToken registers the cluster token func (s *clusterTokenDao) RegisterToken(ctx context.Context, token string) (*models.ClusterToken, error) { - entity, err := s.dao.GetX(ctx, "name", token, models.ClusterToken{}) + entity, err := s.dao.GetX(ctx, "name", token, &models.ClusterToken{}) if err != nil { return nil, ErrInvalidToken } - ct := entity.(models.ClusterToken) + ct := entity.(*models.ClusterToken) ct.State = infrav3.ClusterTokenState_TokenUsed.String() s.dao.Update(ctx, ct.ID, ct) @@ -59,5 +59,5 @@ func (s *clusterTokenDao) RegisterToken(ctx context.Context, token string) (*mod return nil, ErrInvalidToken } - return &ct, nil + return ct, nil } diff --git a/components/cluster-scheduler/internal/cluster/dao/const.go b/components/cluster-scheduler/internal/cluster/dao/const.go new file mode 100644 index 0000000..dd4e08e --- /dev/null +++ b/components/cluster-scheduler/internal/cluster/dao/const.go @@ -0,0 +1,8 @@ +package dao + +const ( + deletingExpr = "not (((conditions -> ?) @> ?::jsonb)) as deleting" + conditionStatusQ = "(conditions -> ?) @> ?::jsonb" + notConditionStatusQ = "not ((conditions -> ?) @> ?::jsonb)" + conditionLastUpdatedQ = "(conditions #>> '{?, lastUpdated}')::timestamp with time zone < ?::timestamp with time zone" +) diff --git a/components/cluster-scheduler/internal/cluster/dao/namespaces.go b/components/cluster-scheduler/internal/cluster/dao/namespaces.go new file mode 100644 index 0000000..1dfd4bc --- /dev/null +++ b/components/cluster-scheduler/internal/cluster/dao/namespaces.go @@ -0,0 +1,119 @@ +package dao + +import ( + "context" + "time" + + "github.com/RafaySystems/rcloud-base/components/cluster-scheduler/internal/models" + "github.com/RafaySystems/rcloud-base/components/common/pkg/persistence/provider/pg" + commonv3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/commonpb/v3" + infrav3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/infrapb/v3" + "github.com/RafaySystems/rcloud-base/components/common/proto/types/scheduler" + "github.com/google/uuid" + "github.com/uptrace/bun" +) + +// ClusterNamespacesDao is the interface for cluster namespaces operations +type ClusterNamespacesDao interface { + // Get Namespace + GetNamespace(ctx context.Context, clusterID uuid.UUID, name string) (models.ClusterNamespace, error) + // GetNamespaces + GetNamespaces(ctx context.Context, clusterID uuid.UUID) ([]models.ClusterNamespace, error) + // GetNamespacesForConditions + GetNamespacesForConditions(ctx context.Context, clusterID uuid.UUID, conditions []scheduler.ClusterNamespaceCondition) ([]models.ClusterNamespace, int, error) + // UpdateNamespaceStatus + UpdateNamespaceStatus(ctx context.Context, updated *models.ClusterNamespace) error + // GetNamespaceHashes + GetNamespaceHashes(ctx context.Context, clusterID uuid.UUID) ([]infrav3.NameHash, error) +} + +// clusterNamespacesDao implements ClusterNamespacesDao +type clusterNamespacesDao struct { + dao pg.EntityDAO +} + +// ClusterNamespacesDao return new cluster namespaces dao +func NewClusterNamespacesDao(dao pg.EntityDAO) ClusterNamespacesDao { + return &clusterNamespacesDao{ + dao: dao, + } +} + +func (s clusterNamespacesDao) GetNamespace(ctx context.Context, clusterID uuid.UUID, name string) (models.ClusterNamespace, error) { + + var cn models.ClusterNamespace + + err := s.dao.GetInstance().NewSelect().Model(&cn). + Where("cluster_id = ?", clusterID). + Where("name = ?", name). + Scan(ctx) + + if err != nil { + return cn, err + } + + return cn, nil +} + +func (s clusterNamespacesDao) GetNamespaces(ctx context.Context, clusterID uuid.UUID) ([]models.ClusterNamespace, error) { + var cns []models.ClusterNamespace + + _, err := s.dao.GetX(ctx, "cluster_id", clusterID, &cns) + return cns, err +} + +func (s clusterNamespacesDao) GetNamespacesForConditions(ctx context.Context, clusterID uuid.UUID, conditions []scheduler.ClusterNamespaceCondition) ([]models.ClusterNamespace, int, error) { + var cns []models.ClusterNamespace + + q := s.dao.GetInstance().NewSelect().Model(&cns).Where("cluster_id = ?", clusterID) + + for _, condition := range conditions { + q.WhereGroup("", func(sq *bun.SelectQuery) *bun.SelectQuery { + sq = sq.Where(conditionStatusQ, int(condition.Type), map[string]string{ + "status": condition.Status.String(), + }) + since := time.Now().Add(-time.Minute) + if !condition.LastUpdated.IsValid() { + since = condition.LastUpdated.AsTime().Add(-time.Minute) + } + + sq = sq.Where(conditionLastUpdatedQ, int(condition.Type), since) + + return sq + }) + } + + count, err := q.ScanAndCount(ctx) + return cns, count, err +} + +func (s clusterNamespacesDao) UpdateNamespaceStatus(ctx context.Context, updated *models.ClusterNamespace) error { + + _, err := s.dao.GetInstance().NewUpdate().Model(updated). + Set("conditions = ?", updated.Conditions). + Set("status = ?", updated.Status). + Where("cluster_id = ?", updated.ClusterId). + Where("name = ?", updated.Name). + Exec(ctx, updated) + + return err +} + +func (s clusterNamespacesDao) GetNamespaceHashes(ctx context.Context, clusterID uuid.UUID) ([]infrav3.NameHash, error) { + + var nameHashes []infrav3.NameHash + + err := s.dao.GetInstance().NewSelect(). + Model((*models.ClusterNamespace)(nil)). + Column("name", "hash"). + //TODO: to be changed to ClusterTaskDeleted later once task is supported + ColumnExpr(deletingExpr, 3, map[string]string{"status": commonv3.RafayConditionStatus_NotSet.String()}). + Where("cluster_id = ?", clusterID). + Scan(ctx, &nameHashes) + + if err != nil { + return nil, err + } + + return nameHashes, nil +} diff --git a/components/cluster-scheduler/pkg/internal/cluster/dao/projectcluster.go b/components/cluster-scheduler/internal/cluster/dao/projectcluster.go similarity index 68% rename from components/cluster-scheduler/pkg/internal/cluster/dao/projectcluster.go rename to components/cluster-scheduler/internal/cluster/dao/projectcluster.go index 9e41163..440793d 100644 --- a/components/cluster-scheduler/pkg/internal/cluster/dao/projectcluster.go +++ b/components/cluster-scheduler/internal/cluster/dao/projectcluster.go @@ -3,8 +3,10 @@ package dao import ( "context" - "github.com/RafaySystems/rcloud-base/components/cluster-scheduler/pkg/internal/models" + "github.com/RafaySystems/rcloud-base/components/cluster-scheduler/internal/models" "github.com/RafaySystems/rcloud-base/components/common/pkg/persistence/provider/pg" + "github.com/RafaySystems/rcloud-base/components/common/pkg/query" + commonv3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/commonpb/v3" "github.com/google/uuid" ) @@ -16,6 +18,8 @@ type ProjectClusterDao interface { GetProjectsForCluster(ctx context.Context, clusterID uuid.UUID) ([]models.ProjectCluster, error) // delete projects for cluster DeleteProjectsForCluster(ctx context.Context, clusterID uuid.UUID) error + // Validate if the project in scope is owner of the cluster + ValidateClusterAccess(ctx context.Context, opts commonv3.QueryOptions) (bool, error) } // projectClusterDao implements ProjectClusterDao @@ -50,3 +54,19 @@ func (s *projectClusterDao) GetProjectsForCluster(ctx context.Context, clusterID func (s *projectClusterDao) DeleteProjectsForCluster(ctx context.Context, clusterID uuid.UUID) error { return s.dao.DeleteX(ctx, "cluster_id", clusterID, &models.ProjectCluster{}) } + +// Check if the project in scope is owner of the cluster +func (s *projectClusterDao) ValidateClusterAccess(ctx context.Context, opts commonv3.QueryOptions) (bool, error) { + var _c models.Cluster + q, err := query.Select(s.dao.GetInstance().NewSelect().Model(&_c), &opts) + if err != nil { + return false, err + } + + count, err := q.ScanAndCount(ctx) + if err != nil { + return false, err + } + + return count > 0, nil +} diff --git a/components/cluster-scheduler/pkg/internal/cluster/hasher/hash.go b/components/cluster-scheduler/internal/cluster/hash/hash.go similarity index 79% rename from components/cluster-scheduler/pkg/internal/cluster/hasher/hash.go rename to components/cluster-scheduler/internal/cluster/hash/hash.go index 6dae55a..008bc4c 100644 --- a/components/cluster-scheduler/pkg/internal/cluster/hasher/hash.go +++ b/components/cluster-scheduler/internal/cluster/hash/hash.go @@ -1,16 +1,16 @@ -package hasher +package hash import ( "crypto/sha256" "fmt" "sort" - commonv3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/commonpb/v3" + corev1 "k8s.io/api/core/v1" ) // Node Hash should take Labels into the hash calculation since it can be // set from either side: From core or from cluster -func GetNodeHashFrom(labels map[string]string, taints []*commonv3.Taint, unscheduleable bool) (string, error) { +func GetNodeHashFrom(labels map[string]string, taints []*corev1.Taint, unscheduleable bool) (string, error) { //add sorted labels labelsKeys := make([]string, 0) for k, _ := range labels { @@ -23,7 +23,7 @@ func GetNodeHashFrom(labels map[string]string, taints []*commonv3.Taint, unsched } //add sorted taints taintKeys := make([]string, 0) - taintMap := make(map[string]commonv3.Taint) + taintMap := make(map[string]corev1.Taint) for _, taint := range taints { taintKeys = append(taintKeys, taint.Key) taintMap[taint.Key] = *taint diff --git a/components/cluster-scheduler/pkg/internal/cluster/operator/clusterscheduler.go b/components/cluster-scheduler/internal/cluster/operator/clusterscheduler.go similarity index 94% rename from components/cluster-scheduler/pkg/internal/cluster/operator/clusterscheduler.go rename to components/cluster-scheduler/internal/cluster/operator/clusterscheduler.go index 720de17..4c594a6 100644 --- a/components/cluster-scheduler/pkg/internal/cluster/operator/clusterscheduler.go +++ b/components/cluster-scheduler/internal/cluster/operator/clusterscheduler.go @@ -5,10 +5,10 @@ import ( "fmt" "time" - rpcv3 "github.com/RafaySystems/rcloud-base/components/cluster-scheduler/proto/rpc/v3" "github.com/RafaySystems/rcloud-base/components/common/pkg/common" rgrpc "github.com/RafaySystems/rcloud-base/components/common/pkg/grpc" "github.com/RafaySystems/rcloud-base/components/common/pkg/log" + rpcv3 "github.com/RafaySystems/rcloud-base/components/common/proto/rpc/scheduler" "github.com/spf13/viper" "google.golang.org/grpc" ) diff --git a/components/cluster-scheduler/pkg/internal/cluster/labels.go b/components/cluster-scheduler/internal/cluster/util/labels.go similarity index 59% rename from components/cluster-scheduler/pkg/internal/cluster/labels.go rename to components/cluster-scheduler/internal/cluster/util/labels.go index fb4d8f3..b119fc1 100644 --- a/components/cluster-scheduler/pkg/internal/cluster/labels.go +++ b/components/cluster-scheduler/internal/cluster/util/labels.go @@ -1,11 +1,11 @@ -package cluster +package util import ( "fmt" "regexp" "strings" - "github.com/RafaySystems/rcloud-base/components/cluster-scheduler/pkg/internal/cluster/constants" + "github.com/RafaySystems/rcloud-base/components/cluster-scheduler/internal/cluster/constants" ) func IsValidKubernetesLabelNameValueRegex(input string) bool { @@ -103,3 +103,67 @@ func SanitizeLabelValues(labelValue string) string { return sanitizeLabelValue } + +func ValidateFullKey(k, v string) error { + if k == "" { + return fmt.Errorf("invalid custom label key; key shouldn't be empty, but received an empty key for value: %s", v) + } + prefix, key := getLabelPrefixAndKey(k) + err := ValidatePrefix(prefix) + if err != nil { + return err + } + err = ValidateKey(key, v) + return err +} + +func getLabelPrefixAndKey(labelKey string) (string, string) { + prefixAndKey := strings.SplitN(labelKey, "/", 2) + if len(prefixAndKey) == 1 { + return "", prefixAndKey[0] + } else { + return prefixAndKey[0], prefixAndKey[1] + } +} + +func ValidateKey(key, value string) error { + if key == "" { + return fmt.Errorf("invalid custom label key; key shouldn't be empty, but received an empty key for value: %s", value) + } + if len(key) > 63 { + return fmt.Errorf("invalid custom label key; label keys should be less than or equal to 63 characters (%s)", key) + } + if !IsValidKubernetesLabelNameValueRegex(key) { + return fmt.Errorf("invalid custom label key (%s); key should start and end with alpha numerical value and can have dashes (-), underscores (_) and dots (.)", key) + } + return nil +} + +func ValidatePrefix(prefix string) error { + if prefix == "" { + return nil + } + if len(prefix) > 253 { + return fmt.Errorf("invalid custom label key; label key prefix should be less than or equal to 253 characters (%s)", prefix) + } + if prefix == constants.RafayDomainLabel { + return fmt.Errorf("invalid custom label key; rafay.dev is a reserved domain for Rafay and custom labels shouldn't use this domain: %s", prefix) + } + if !IsValidKubernetesLabelNameValueRegex(prefix) { + return fmt.Errorf("invalid custom label key prefix (%s); prefix should start and end with alpha numerical value and can have dashes (-), underscores (_) and dots (.)", prefix) + } + return nil +} + +func ValidateValue(key, value string) error { + if value == "" { + return nil + } + if len(value) > 63 { + return fmt.Errorf("invalid custom label value; label keys should be less than or equal to 63 characters (%s)", key) + } + if !IsValidKubernetesLabelNameValueRegex(value) { + return fmt.Errorf("invalid custom label value (%s) for key (%s); value should start and end with alpha numerical value and can have dashes (-), underscores (_) and dots (.)", value, key) + } + return nil +} diff --git a/components/cluster-scheduler/internal/cluster/util/taints.go b/components/cluster-scheduler/internal/cluster/util/taints.go new file mode 100644 index 0000000..9e6b42f --- /dev/null +++ b/components/cluster-scheduler/internal/cluster/util/taints.go @@ -0,0 +1,34 @@ +package util + +import ( + "fmt" + + v1 "k8s.io/api/core/v1" +) + +func ValidateTaints(taints []*v1.Taint) error { + for _, taint := range taints { + err := ValidateFullKey(taint.Key, taint.Value) + if err != nil { + return err + } + err = ValidateValue(taint.Key, taint.Value) + if err != nil { + return err + } + err = ValidateEffect(taint.Key, taint.Effect) + if err != nil { + return err + } + } + return nil +} + +func ValidateEffect(key string, effect v1.TaintEffect) error { + switch effect { + case v1.TaintEffectNoSchedule, v1.TaintEffectNoExecute, v1.TaintEffectPreferNoSchedule: + return nil + default: + return fmt.Errorf("invalid taint effect '%s' for the key '%s'", effect, key) + } +} diff --git a/components/cluster-scheduler/pkg/internal/fix.go b/components/cluster-scheduler/internal/fix.go similarity index 100% rename from components/cluster-scheduler/pkg/internal/fix.go rename to components/cluster-scheduler/internal/fix.go diff --git a/components/cluster-scheduler/pkg/internal/fixtures/data/download.yaml b/components/cluster-scheduler/internal/fixtures/data/download.yaml similarity index 66% rename from components/cluster-scheduler/pkg/internal/fixtures/data/download.yaml rename to components/cluster-scheduler/internal/fixtures/data/download.yaml index 3d12564..e89f958 100644 --- a/components/cluster-scheduler/pkg/internal/fixtures/data/download.yaml +++ b/components/cluster-scheduler/internal/fixtures/data/download.yaml @@ -12,32 +12,6 @@ metadata: name: system-sa namespace: rafay-system --- -apiVersion: policy/v1beta1 -kind: PodSecurityPolicy -metadata: - name: rafay-privileged-psp -spec: - privileged: true - allowPrivilegeEscalation: true - allowedCapabilities: - - "*" - volumes: - - "*" - hostNetwork: true - hostPorts: - - min: 0 - max: 65535 - hostIPC: true - hostPID: true - runAsUser: - rule: "RunAsAny" - seLinux: - rule: "RunAsAny" - supplementalGroups: - rule: "RunAsAny" - fsGroup: - rule: "RunAsAny" ---- {{- if and .Cluster.Metadata.Labels (eq (index .Cluster.Metadata.Labels "rafay.dev/kubernetesProvider") "OPENSHIFT") }} apiVersion: security.openshift.io/v1 kind: SecurityContextConstraints @@ -90,15 +64,6 @@ users: - system:serviceaccount:rafay-system:ingress-nginx-admission - system:serviceaccount:rafay-system:gatekeeper-admin - system:serviceaccount:rafay-system:gatekeeper-update-namespace-label -- system:serviceaccount:rafay-infra:rafay-prometheus-adapter -- system:serviceaccount:rafay-infra:rafay-prometheus-alertmanager -- system:serviceaccount:rafay-infra:rafay-prometheus-helm-exporter -- system:serviceaccount:rafay-infra:rafay-prometheus-kube-state-metrics -- system:serviceaccount:rafay-infra:rafay-prometheus-metrics-server -- system:serviceaccount:rafay-infra:rafay-prometheus-server -- system:serviceaccount:rafay-infra:default -- system:serviceaccount:rafay-infra:system-sa -- system:serviceaccount:rafay-infra:rafay-prometheus-node-exporter volumes: - '*' --- @@ -423,93 +388,6 @@ status: storedVersions: [] --- apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "8443" - prometheus.io/scheme: https - prometheus.io/scrape: "true" - labels: - control-plane: controller-manager - name: controller-manager-metrics-service - namespace: rafay-system -spec: - ports: - - name: https - port: 8443 - targetPort: https - selector: - control-plane: controller-manager ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: controller-manager - namespace: rafay-system - labels: - control-plane: controller-manager - app.kubernetes.io/managed-by: Helm - annotations: - meta.helm.sh/release-name: v2-infra - meta.helm.sh/release-namespace: rafay-system -spec: - selector: - matchLabels: - control-plane: controller-manager - replicas: 1 - template: - metadata: - labels: - control-plane: controller-manager - spec: - affinity: - nodeAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - nodeSelectorTerms: - - matchExpressions: - - key: kubernetes.io/os - operator: In - values: - - linux - - key: kubernetes.io/arch - operator: In - values: - - amd64 - priorityClassName: rafay-cluster-critical - serviceAccountName: system-sa - containers: - - command: - - /manager - args: - - --enable-leader-election - image: "{{ .DownloadData.ControllerImage }}" - name: manager - resources: - limits: - cpu: 250m - memory: 128Mi - requests: - cpu: 250m - memory: 128Mi - terminationGracePeriodSeconds: 10 ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: connector-config - namespace: rafay-system - labels: - app.kubernetes.io/managed-by: Helm - annotations: - meta.helm.sh/release-name: v2-infra - meta.helm.sh/release-namespace: rafay-system - -data: - controlAddr: "{{ .DownloadData.ControlAddr }}" - apiAddr: "{{ .DownloadData.APIAddr }}" - token: "{{ .Cluster.Spec.ClusterData.ClusterStatus.Token }}" ---- -apiVersion: v1 kind: ConfigMap metadata: name: proxy-config @@ -523,14 +401,28 @@ data: httpProxy: "{{if .Cluster.Spec.ProxyConfig}}{{ if .Cluster.Spec.ProxyConfig.Enabled }}{{- .Cluster.Spec.ProxyConfig.HttpProxy -}}{{end}}{{end}}" httpsProxy: "{{if .Cluster.Spec.ProxyConfig}}{{ if .Cluster.Spec.ProxyConfig.Enabled }}{{- .Cluster.Spec.ProxyConfig.HttpsProxy -}}{{end}}{{end}}" noProxy: "{{if .Cluster.Spec.ProxyConfig}}{{ if .Cluster.Spec.ProxyConfig.Enabled }}{{- .Cluster.Spec.ProxyConfig.NoProxy -}}{{end}}{{end}}" - proxyAuth: "{{if .Cluster.Spec.ProxyConfig}}{{ if .Cluster.Spec.ProxyConfig.Enabled }}{{- .Cluster.Spec.ProxyConfig.GetProxyAuthorization -}}{{end}}{{end}}" + proxyAuth: "{{if .Cluster.Spec.ProxyConfig}}{{ if .Cluster.Spec.ProxyConfig.Enabled }}{{- .Cluster.Spec.ProxyConfig.ProxyAuth -}}{{end}}{{end}}" bootstrapCA: "{{if .Cluster.Spec.ProxyConfig}}{{ if .Cluster.Spec.ProxyConfig.Enabled }}{{- .Cluster.Spec.ProxyConfig.BootstrapCA -}}{{end}}{{end}}" allowInsecureBootstrap: "{{if .Cluster.Spec.ProxyConfig}}{{ if .Cluster.Spec.ProxyConfig.Enabled }} {{- .Cluster.Spec.ProxyConfig.AllowInsecureBootstrap -}}{{end}}{{end}}" --- +apiVersion: v1 +kind: ConfigMap +metadata: + name: relay-agent-config + namespace: rafay-system + labels: + app.kubernetes.io/managed-by: Helm + annotations: + meta.helm.sh/release-name: v2-infra + meta.helm.sh/release-namespace: rafay-system +data: + clusterID: {{if .Cluster.Metadata.Labels}}{{ index .Cluster.Metadata.Labels "rafay.dev/clusterID" }}{{end}} + relays: {{if .Cluster.Metadata.Annotations}}{{ index .Cluster.Metadata.Annotations "relays" }}{{end}} +--- apiVersion: apps/v1 kind: Deployment metadata: - name: rafay-connector + name: relay-agent namespace: rafay-system labels: app.kubernetes.io/managed-by: Helm @@ -540,12 +432,13 @@ metadata: spec: selector: matchLabels: - app: rafay-connector + app: relay-agent replicas: 1 + progressDeadlineSeconds: 1800 template: metadata: labels: - app: rafay-connector + app: relay-agent spec: affinity: nodeAffinity: @@ -563,12 +456,16 @@ spec: terminationGracePeriodSeconds: 10 priorityClassName: rafay-cluster-critical serviceAccountName: system-sa + initContainers: + - name: set-limits + image: "registry.rafay-edge.net/rafay/busybox:1.33" + command: ["sh", "-c", "ulimit -n 65536"] + securityContext: + privileged: true containers: - - name: connector - image: "{{ .DownloadData.ConnectorImage }}" - volumeMounts: - - name: connector-config - mountPath: /etc/config + - name: relay-agent + image: "{{ .DownloadData.RelayAgentImage }}" + args: ["--mode=client", "--log-level=3"] env: - name: POD_NAME valueFrom: @@ -578,6 +475,24 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace + - name: MAX_DIALS + valueFrom: + configMapKeyRef: + name: relay-agent-config + key: maxDials + optional: true + - name: DIALOUT_PROXY + valueFrom: + configMapKeyRef: + name: proxy-config + key: httpsProxy + optional: true + - name: DIALOUT_PROXY_AUTHENTICATION + valueFrom: + configMapKeyRef: + name: proxy-config + key: proxyAuth + optional: true - name: HTTP_PROXY valueFrom: configMapKeyRef: @@ -607,70 +522,18 @@ spec: configMapKeyRef: name: proxy-config key: allowInsecureBootstrap - optional: true - - name: Proxy-Authorization - valueFrom: - configMapKeyRef: - name: proxy-config - key: proxyAuth optional: true - livenessProbe: - httpGet: - path: /healthz - port: 8080 - scheme: HTTP - initialDelaySeconds: 90 - periodSeconds: 30 - timeoutSeconds: 10 - failureThreshold: 3 + volumeMounts: + - name: relay-agent-config + mountPath: /etc/config + resources: + requests: + cpu: 100m + memory: 128Mi + limits: + cpu: 500m + memory: 512Mi volumes: - - name: connector-config + - name: relay-agent-config configMap: - name: connector-config ---- -apiVersion: v1 -kind: Service -metadata: - name: rafay-drift - namespace: rafay-system - labels: - app.kubernetes.io/managed-by: Helm - annotations: - meta.helm.sh/release-name: v2-infra - meta.helm.sh/release-namespace: rafay-system -spec: - selector: - app: rafay-connector - ports: - - protocol: TCP - port: 8081 - targetPort: 8081 ---- -apiVersion: admissionregistration.k8s.io/v1 -kind: ValidatingWebhookConfiguration -metadata: - name: "rafay-drift-validate" - labels: - app.kubernetes.io/managed-by: Helm - annotations: - meta.helm.sh/release-name: v2-infra - meta.helm.sh/release-namespace: rafay-system -webhooks: - - name: "rafay.drift.validate" - rules: - - apiGroups: ["*"] - apiVersions: ["*"] - operations: ["*"] - resources: ["*/*"] - scope: "*" - clientConfig: - caBundle: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUNCVENDQWF5Z0F3SUJBZ0lVZHA0OFF6TVVLQWFDc3lJM0hZL0ZUbXB4ekZrd0NnWUlLb1pJemowRUF3SXcKWVRFTE1Ba0dBMVVFQmhNQ1ZWTXhDekFKQmdOVkJBZ1RBa05CTVJJd0VBWURWUVFIRXdsVGRXNXVlWFpoYkdVeApGakFVQmdOVkJBb1REVkpoWm1GNUlGTjVjM1JsYlhNeEdUQVhCZ05WQkFNTUVGSmhabUY1WDFkbFltaHZiMnRmClEwRXdIaGNOTWpBeE1URTVNREl4TlRBd1doY05NalV4TVRFNE1ESXhOVEF3V2pCaE1Rc3dDUVlEVlFRR0V3SlYKVXpFTE1Ba0dBMVVFQ0JNQ1EwRXhFakFRQmdOVkJBY1RDVk4xYm01NWRtRnNaVEVXTUJRR0ExVUVDaE1OVW1GbQpZWGtnVTNsemRHVnRjekVaTUJjR0ExVUVBd3dRVW1GbVlYbGZWMlZpYUc5dmExOURRVEJaTUJNR0J5cUdTTTQ5CkFnRUdDQ3FHU000OUF3RUhBMElBQkJKZFBxK0ZhWTB6K1BMU1hsbmc5cEFXWXUyaDZYeGlsUnhjaGZIVHpHU1QKZjR5NkZTdkZNMGd4ZlAvV080bmJwOUJzS3ViTnBMYkllUHpPYkluOVRmMmpRakJBTUE0R0ExVWREd0VCL3dRRQpBd0lCQmpBUEJnTlZIUk1CQWY4RUJUQURBUUgvTUIwR0ExVWREZ1FXQkJSd25qck1SYVRjTHpUNWoxaE51VUJjCnBoQTIzakFLQmdncWhrak9QUVFEQWdOSEFEQkVBaUFsMVlobXhsQlM5cmZBOWhwdFhUMGUyb2hUajFrOHVjbXQKaHFjVzBsUDgzUUlnUVhlUUU1RUJQWUkwU05ETzZsUk5PS20wQjBUbFFUbEtwR1RpMmhXdmNZbz0KLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo= - service: - namespace: "rafay-system" - name: "rafay-drift" - path: "/drifthandler" - port: 8081 - admissionReviewVersions: ["v1", "v1beta1"] - sideEffects: None - failurePolicy: Ignore - timeoutSeconds: 1 + name: relay-agent-config \ No newline at end of file diff --git a/components/cluster-scheduler/pkg/internal/fixtures/download.go b/components/cluster-scheduler/internal/fixtures/download.go similarity index 100% rename from components/cluster-scheduler/pkg/internal/fixtures/download.go rename to components/cluster-scheduler/internal/fixtures/download.go diff --git a/components/cluster-scheduler/internal/fixtures/fixtures.go b/components/cluster-scheduler/internal/fixtures/fixtures.go new file mode 100644 index 0000000..64b8c95 --- /dev/null +++ b/components/cluster-scheduler/internal/fixtures/fixtures.go @@ -0,0 +1,184 @@ +// Code generated by vfsgen; DO NOT EDIT. + +package fixtures + +import ( + "bytes" + "compress/gzip" + "fmt" + "io" + "io/ioutil" + "net/http" + "os" + pathpkg "path" + "time" +) + +// Fixtures statically implements the virtual filesystem provided to vfsgen. +var Fixtures = func() http.FileSystem { + fs := vfsgenÛ°FS{ + "/": &vfsgenÛ°DirInfo{ + name: "/", + modTime: time.Date(2022, 1, 19, 10, 7, 49, 970979989, time.UTC), + }, + "/download.yaml": &vfsgenÛ°CompressedFileInfo{ + name: "download.yaml", + modTime: time.Date(2022, 2, 10, 11, 10, 33, 69528254, time.UTC), + uncompressedSize: 12626, + + compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x02\xff\xec\x1a\x5d\x6f\x1b\x37\xf2\x7d\x7f\x05\xa1\x97\xb4\x87\xae\x1c\x37\x97\xa2\x58\xa0\x0f\x8a\xa4\xc4\x42\x6d\x59\x90\xe4\xb4\x87\xa2\x30\x28\x72\xb4\xe2\x99\x4b\x6e\x49\xae\xac\x3d\x23\xff\xfd\x40\xee\xf7\x6a\xa5\xd8\x69\xac\x4b\x0e\xd1\x83\xbd\x4b\x0e\xe7\x7b\x86\x33\x5c\xfa\xbe\xef\xe1\x98\xbd\x07\xa5\x99\x14\x01\xda\x9e\x7b\x77\x4c\xd0\x00\x4d\x71\x04\x3a\xc6\x04\xbc\x08\x0c\xa6\xd8\xe0\xc0\x43\x88\xe3\x15\x70\x6d\x9f\x10\x22\x52\x18\x25\xb9\x1f\x73\x2c\x20\x28\x5e\x39\x28\x3f\xc2\x02\x87\xa0\x3c\x84\x04\x8e\x20\x40\x0a\xaf\x71\xea\xeb\x54\x1b\x88\xbc\x83\x14\x17\xa0\xb6\x8c\xc0\x80\x10\x99\x08\xd3\x20\x9b\xa1\xc9\x10\xf8\x1a\xe7\x23\x8e\xbd\x0e\xec\x0f\x0f\x3e\x62\x6b\x84\x05\x45\xfd\x21\x4f\xb4\x01\xd5\xbf\xca\xb1\xf5\x2f\x9d\x04\xe8\x3b\xf8\x0b\x7d\xc7\x04\x85\xdd\x61\x98\x9e\xc3\xdc\xa7\xb0\x3d\xbb\x4b\x56\xa0\x04\x18\xd0\x33\x25\xb7\x8c\x82\xea\x7d\x8f\x7a\xd7\xb3\xf1\x74\x71\x31\x79\xbb\xec\x7d\x8f\x3e\x7c\x68\x48\xa5\x81\x24\x8a\x99\xb4\x2f\x63\x10\x7a\xc3\xd6\xa6\xcf\xe4\x59\x4d\xd6\x6c\x7a\x28\x85\x81\x9d\x19\x4a\xa1\x8d\xc2\x4c\x18\xdd\x21\x77\x26\x60\xac\xd8\x96\x71\x08\x81\xfa\x9a\x10\x0f\x21\x2c\x84\x34\xd8\x30\x29\x72\x83\x30\x41\x78\x42\xa1\xaf\x80\x03\xd6\xd0\x24\xcd\x56\x91\x4f\xb8\x4c\x68\x6e\x1d\x1a\xa0\x9e\x51\x09\xf4\x3e\xbe\x54\x03\x5f\x17\xab\xfc\x0d\x0b\x37\x3e\xde\x62\xc6\xf1\x8a\x71\x66\xd2\x27\xe0\x61\x22\xe4\xe0\x0b\x49\xc1\xa7\xb0\x05\x2e\x63\x50\x8d\xe5\x95\x9a\x2d\x3c\x05\x4d\x14\x8b\x8d\x53\xe8\x8b\x4a\x7e\x84\x39\x97\xf7\x1a\x61\x42\x40\x6b\x64\xa4\x1d\x40\xf5\x79\x41\xd1\x46\x6a\xe3\x70\x22\xb4\x06\x6c\x12\x05\xda\x8d\x9b\x0d\xa0\x9c\x73\xbb\x52\x25\x02\x61\x3b\x93\xa2\x44\x83\xfa\xc1\x3d\x85\x4a\x26\x71\xf6\xb8\xd6\xef\x8a\x17\x8a\xee\x99\xd9\xe4\x38\xed\xdc\x62\x7c\xc9\x44\xb2\x73\x9e\x0f\x3b\xd3\x47\xe8\xb7\xc1\x7c\x3a\x99\xbe\x0b\x90\xd9\x30\x8d\x98\x76\xd4\x22\xa9\x0d\x52\xc0\xf1\x0e\x28\x5a\x0c\x87\x0e\x95\xde\xc8\x84\x53\xb4\x02\x4b\x96\xe6\x48\xa5\xe0\x29\x5a\x4b\x85\x48\xe6\x91\x08\xd3\x88\x09\x66\x5d\xc3\x2a\xa1\x8f\xde\x29\x2c\x8c\x63\x03\x11\x9c\xb8\xb1\x17\x6e\x6d\xa7\xbe\x89\x02\x6c\xc0\xb7\x58\x6b\x5a\xae\x87\xb0\x82\xd8\xbf\x97\xea\x8e\x4b\x6c\xfd\xa1\xcb\xd1\x7a\x9e\xd3\xf6\x85\xd4\x66\xc4\xd4\x7b\xc9\x93\x08\x66\x3c\x09\x99\x08\x90\x45\x59\x4d\x4f\x66\xc3\xf6\xd0\x14\x8c\x45\xdf\x1e\x9e\x4d\x46\x7b\x43\x52\x19\x5d\x1f\x9c\x15\x5c\x8c\x35\xc1\x1c\x67\x4e\xd0\x31\x4d\x6d\x08\x61\x26\xac\x27\x55\xd3\x40\x87\x38\xce\xcc\xcc\x40\x07\x9e\x8f\x5e\xfc\xe3\x45\x31\x75\x23\x34\x5e\xc3\x22\xd5\xc4\xf0\x72\x8e\xc2\x1a\x27\xdc\x0c\x68\x73\x25\x12\x09\xe7\x5e\xee\x05\x56\x69\x26\x8d\x21\x40\xf3\x44\x0c\xf4\x40\xa4\x9e\x73\x15\x87\x24\x4b\x40\x41\x6e\x3a\xdf\x99\x4e\x57\xe3\xd6\xeb\x6b\xaf\x11\xb6\x50\xda\x8b\x15\x93\xca\x45\x91\x23\xa4\x00\xd3\x6b\xc1\xd3\xb9\x94\xe6\x2d\xe3\x90\x43\xa3\x35\xe6\x1a\x3c\x05\x7f\x25\x4c\x01\x1d\x29\x19\x77\x70\xa9\x2c\x53\x37\x1a\x54\x07\x9f\x1a\x9c\xaf\xe6\xf9\xa6\x13\x80\x10\x19\xc5\x33\x25\xd7\x96\x6e\xa1\x16\x9d\xc4\x31\x87\x08\x84\xc1\xfc\x5d\x2e\xeb\xde\x5a\x1b\x39\x75\x1d\xe8\x2c\x93\xe3\x2c\x93\x07\xf5\x04\x1d\xe4\x7a\x7e\x1c\x70\x95\xf1\x1f\x05\xce\x44\xa8\x40\x6b\x5f\x84\x4c\xec\x3e\x61\x89\x33\x9a\xb6\x09\xfc\x71\x8b\x43\x6c\xe0\x0e\x20\x2e\xcc\xfd\xe4\x55\x49\x4c\x6d\x84\x96\x9b\x99\xef\x82\xd3\xdb\xba\x28\x2b\x6d\x50\xec\x69\x20\x68\x7b\x9b\x51\x2b\x4c\xfa\x38\x31\x1b\xa9\xd8\x7f\xb2\x24\x71\xf7\xb3\x6e\x6c\x35\xf9\xee\x36\x97\x1c\x0e\xed\x2d\x41\xb1\x61\xab\x24\x37\x3d\x8e\x59\x65\xed\x8c\x0b\x9b\x2d\xb4\x4c\x14\x81\xc6\xe0\x16\xd4\xaa\x36\xe0\x23\x21\xc5\x3c\x07\xbc\x99\x5f\x1e\x87\x6d\x91\xc9\x63\xa7\x5f\xee\xbb\xfb\x44\x4b\x55\xe9\x26\xbe\x2c\xd7\xb9\x47\x0a\x1c\xf2\xc7\x10\x8c\xfb\xcf\x99\xce\x1e\x62\x6c\xc8\xc6\x3d\x65\xaa\x77\x8f\xf7\x6e\xf0\xef\x71\x73\xa6\x0d\x36\x49\x8b\xa9\x82\xfc\x1e\xd5\x4f\xa1\x65\xb0\xbe\xe3\x60\xbe\x08\xb9\x0b\x5e\x4e\x23\xf5\x17\x23\xf2\x53\xe5\x6d\x55\xba\x4f\x0b\xd6\x37\x4c\x50\x26\xc2\x83\x31\xdb\xc8\x29\x79\x00\xfb\x4a\x72\x58\xe5\x0b\xed\xf3\x1c\xd6\x76\x5d\x21\xee\x11\x1e\x3c\x84\xf6\xf3\x45\x77\x96\xd0\xc9\xea\xdf\x40\x8c\x4b\x14\x9d\xa5\xfb\x93\x0a\xf6\xe3\x28\x8a\xed\xe2\x78\xc5\xff\x0c\x29\x31\x56\x72\x97\x3a\x7d\x1e\xcc\x8a\x96\x08\x08\xc3\x48\x4b\x8f\x6d\xcf\x91\x77\x20\x14\x6c\x19\xdc\x77\x7b\x72\x27\xe2\x0e\xfb\xb4\xf0\xe6\x66\xc8\xaa\xe0\xa3\xf8\x4f\xe7\x87\x95\xd6\x0a\x2f\x3c\x6c\xb8\xcf\xee\x9f\x35\x93\x7d\xd9\x2e\xaa\xc9\x06\x68\xc2\x99\x08\x6b\x8a\x6f\x74\x3b\x4b\xdb\x3f\x14\xb5\x21\x22\x1c\x6b\xdd\x6a\x19\x5c\x9f\xe0\xa8\xa0\xbc\xd8\x40\xb1\xa4\xda\xf5\x10\xfd\xdc\x8a\xb3\x1c\xc1\xd0\xae\x3f\xd8\x58\x16\x15\x2b\x51\xcc\xfa\x32\xf7\xb6\x98\x27\x10\xa0\xf3\x97\xc5\xef\x53\x3c\xe8\x68\x70\x71\xc0\x14\x94\x0f\x1c\x88\x5d\x9c\xd9\xec\x88\xa7\x1c\x08\xc0\x5e\x6f\x3f\x2a\x88\x14\x6b\x16\x46\x38\x3e\x90\xa5\xcb\xfd\xe1\xbe\x4c\xd7\xb5\x0d\xa5\xb6\x55\x54\xe9\x3c\xdf\x65\x9e\x48\xfe\xe8\x5e\xb1\x47\xe7\x51\xc8\x61\x0b\xc2\x7c\xb6\x18\x7f\x4c\x70\x77\x19\xea\xd9\x22\xbb\x23\xa4\x3b\x1d\xe5\xcb\x0e\x6e\x1c\x33\xd8\x19\x10\xf6\x4d\xef\x27\xd6\x44\x1b\x19\x15\x05\xf2\x08\xd6\x4c\x30\x2b\x59\x87\x05\xaa\xe2\xb2\xbf\x5f\x9f\xe8\x18\x88\x05\x25\x52\x6c\x73\xca\xae\xa3\x77\x67\x05\x10\xa6\x01\x9a\x4a\x61\xb5\x19\x66\xda\xef\xaa\x70\x1c\x81\x6c\x59\xfb\xcc\xcf\x8e\xd9\x48\xf9\xb5\x39\x7e\xc9\xf2\x43\x95\x98\x27\x0a\xf3\xa0\x59\x8e\x23\x9b\xa2\x94\x99\x56\x68\x7d\xa4\x44\x3e\xc3\x44\x98\x70\xac\x6a\x4b\x3c\x84\x34\x91\xb6\x91\x2c\xf1\xd3\xcc\xb7\x75\x71\xa6\xe5\xe7\xaa\xd8\xfe\x98\x21\x01\xb5\x05\x9a\xf7\xf9\x99\xb4\x52\xe1\x10\xea\x23\x64\x03\x11\x0e\x8a\x03\x95\x18\xc4\x60\x36\x79\xff\x6a\xd1\x18\x46\x28\x56\x32\x06\x95\x9d\x0d\xa0\xf2\x57\x33\x63\x6d\xb4\x68\x77\xb5\x51\x99\xdb\x17\x3f\xa7\xb4\xc7\x00\xd6\x6d\xdb\x06\x96\xce\x97\x6b\x13\x85\x65\x3f\x0a\x88\xd0\xce\xaf\x0e\xcc\xfc\x58\x81\xd3\x8f\x9f\x88\x3b\x21\xef\x85\xbf\x66\xc0\xa9\xae\xe9\x26\xc7\xef\xd2\xd2\xf3\x51\xd8\xc3\xa5\x93\x55\x23\x8f\xd5\x98\x40\x0f\x1f\xbc\x8a\x1f\x5b\xc9\xc4\x06\xe8\xb4\xed\x97\xbd\x5e\xc3\xe9\xdc\x2b\x91\x82\xb2\xec\xf0\x13\xfd\xf1\xa7\x97\xf9\x02\xd0\xf7\x85\xf7\xd8\xc1\x67\x0b\xcd\xa2\xff\x39\x55\x60\x2e\x33\x7a\xad\xb0\xcc\x47\xf7\x82\xb2\xd6\x29\x76\x86\xa4\xe1\xad\x90\x34\x25\xfa\x6f\x01\xf9\x2d\x20\xbf\xd6\x80\x3c\x69\x34\x76\x84\x62\x67\x1c\x1e\x0e\xc2\x8e\x18\xfc\x16\x80\xdf\x02\xf0\xb4\x01\x58\xc5\x9a\xeb\x5b\xae\x70\xdc\x11\x5c\x59\x5f\x9d\x75\x36\x47\x0a\xe1\xe6\xa7\x25\x1c\xc7\xfd\xe6\xe7\xbc\xe2\x0b\xe2\x2a\x0d\xd0\x05\xf0\xa8\xeb\x13\xa6\x25\xde\xdf\x00\x8f\xfa\x7a\x73\x96\x7f\xd4\xf2\x0b\x8f\xf7\x99\x58\x2b\x7c\x1c\xae\x8b\xb1\x42\x9a\x8d\x31\xf1\xcc\xca\x12\xa0\xde\xc3\x03\x5b\x57\x5f\x7e\x17\x31\x90\xbe\x9b\xca\xf4\xf0\xe1\xc3\xc3\x03\x3a\x06\xd0\x1f\x0b\xbc\xe2\x40\x91\x85\xf4\x8f\xc0\x5d\x14\x34\x91\x6f\x41\x41\xd0\xf2\x5f\x2f\x67\x49\xff\x2f\x78\xd2\x47\x98\x12\xf2\xd4\x1c\x4d\xe5\x11\x76\x9c\xfb\x0d\x12\xb3\x39\x21\x43\xb3\x82\x66\x37\x4b\x2b\x29\x8d\xdd\x42\xe2\xe1\xe0\x84\x4c\xbd\xa9\xa8\x76\xb3\xe5\xbe\x6f\x4e\x84\xbb\x7b\x00\x25\xf4\x67\xe5\x10\x1d\x67\x71\xd0\xc9\x41\x17\xb7\x9f\x94\x89\x14\x70\x9c\xfa\x38\x04\x61\xfe\x0f\xf2\x51\x5e\x6c\x4c\x46\x01\x6a\x1a\xa8\x75\x11\x25\xb3\xcf\xa3\xef\xaa\x94\x68\x7b\xa8\xd4\xb7\x3b\x4b\xe2\x38\xd5\x07\x49\x0d\x2a\xd1\x8f\xd2\xab\xc1\xa1\x5e\x86\xb3\x4e\x67\xbf\xc2\x8b\x75\x55\xd1\x8d\x20\xe6\x32\x8d\xa0\xf3\x7a\x4f\xcd\xb8\x5f\xa3\x55\x8b\x2a\x45\xbb\xc3\x2a\xa9\x72\x52\xd8\x90\xcd\x65\x8d\x63\xc7\x73\x5b\x58\x05\x31\x67\x04\xeb\x00\x9d\x67\x09\xcf\x7d\x94\x1e\x01\xa6\x9c\x09\x58\x80\xdd\xda\xed\xe4\xcf\x2f\x5f\x7a\x08\x19\x88\x62\x8e\x0d\x54\xc2\xd4\x4b\x29\xde\x20\xd6\x49\xae\x59\x52\xe1\xb5\x2b\xac\xd3\x6a\x89\x90\x14\x06\x7b\xa3\x96\xcd\xfc\xfe\x41\x62\xcb\xb9\x45\x79\x8a\x3d\x09\x85\x2c\x87\xc7\x3b\x20\xee\x6a\x4a\xb3\xa0\xb2\x38\x17\xb9\x6a\x96\xa0\xa2\x56\xbd\x65\x2b\x5b\xa7\xab\xf1\xce\x16\x55\xba\x32\x56\x1b\xea\x0e\xd2\xa0\x75\x51\x48\xea\x0e\x48\x57\xeb\x2a\x6c\x2d\x81\x26\xa2\x13\xc0\x1d\x74\x77\x92\xc9\x48\x71\x26\x92\xdd\x63\x99\xc0\x8a\x6c\x9e\x87\x0d\x1c\xd1\x9f\xfe\x99\xcf\x1a\x50\x11\x13\xce\x99\xdf\x29\x4c\x60\x06\x8a\x49\x5a\x79\xc8\x4b\xaf\x28\xe7\x6b\x47\xff\xd3\x63\xa7\xfd\x79\xf9\xd9\x38\xfe\x9c\xee\x1d\x9f\x66\x97\xbb\x98\x29\x6f\xdb\x94\xfc\x16\x1d\x89\x06\xe3\x73\x16\x31\x53\x19\x83\x45\xae\x15\xe9\x29\x08\x99\x36\x2a\xcd\xda\x2a\x1f\x68\x08\x7d\x01\xe6\xcc\xbd\x9e\xad\x12\x9d\xae\xe4\x2e\x38\xef\xbf\x7a\xd5\x2b\xd7\x12\x19\x45\xd8\xe6\x8c\x3f\x7a\x7a\xd3\xfb\x01\xf5\x7c\x62\xff\x26\x8e\x04\xf2\x05\xfa\xe9\xf5\xeb\x57\x3f\xf5\xfe\x2c\x17\xe8\xe6\x95\xba\xba\x3a\xab\x1b\x4d\x8d\xca\x9c\x1c\x94\xa5\x1d\x2e\x75\x61\x1e\x1e\x50\x7f\x24\xef\x05\x97\x98\x8e\x6c\x46\x9c\x5b\xe0\x81\x85\x9d\x58\x10\x94\xed\xc5\x79\x6c\xa9\xd0\x16\xde\x3d\xdf\x8f\x24\x85\x5f\x08\x67\x20\x8c\x93\xc6\xe7\x32\xf4\x39\x6c\x81\xff\xf2\xaa\x26\x05\x88\x6d\xc5\x79\xc1\xce\xec\x7a\x74\x3b\x1d\x5c\x8d\xbd\x96\xcf\xbc\x55\x32\x6a\xba\x8d\xeb\x3f\xf2\xa3\xf7\xbd\xf1\x19\xb6\x35\x54\x91\x2f\xfa\x16\xf7\x41\x52\x8b\xd9\x60\xf8\x0c\xf4\xaa\xd3\xe5\x3a\xd1\xab\xc1\xef\xb7\xa3\xc9\xe0\x72\xf1\x71\x82\xa4\xa8\x0e\x7e\x85\xb4\x83\xee\x91\x32\xa1\xfe\x73\xe1\x1b\xe1\xdd\x88\x61\xde\xce\x1d\xd2\x7d\x82\x73\xfd\x7b\xbd\x89\x2b\x78\xb5\x7c\x5e\xdf\x2c\x6f\x67\xf3\xeb\xdf\xff\xf5\x99\xf8\x6d\x35\x58\x7b\x9c\x56\x5d\xc2\xdf\xe0\xf5\x76\x70\xb3\xbc\x18\x4f\x97\x93\xe1\x60\x39\xb9\x9e\x9e\x88\xf5\xb2\x78\x7f\x1a\xe7\x17\xcb\xe5\xec\xe4\x2a\xfe\x04\x0d\x5b\x3e\x17\x5f\x85\x2f\x4c\xaf\x4f\xca\x66\xde\x43\x3e\x8d\xc7\x37\xd7\xd7\xcb\xc5\x72\x3e\x98\xdd\x0e\x07\xb7\xc3\xf1\x7c\x79\x22\x66\x6b\xed\xdc\xd3\x18\x1e\x5c\x5e\x5e\xff\x76\x3b\x99\x2e\xc6\xc3\x9b\xf9\xf8\xb6\xe4\xff\x44\x7c\x77\xf7\x7b\x8f\x13\x21\xbb\x63\x78\x65\x77\xfb\x46\xe9\xe1\x3f\x2e\x87\x46\x76\x61\x96\xe0\xcf\xc0\x90\xb3\x16\xc8\xde\xf1\x56\x51\x3e\x82\x36\xad\x4a\x87\xc4\x89\xbb\x6b\x10\x35\xf1\x43\x24\x55\x1a\xa0\xf3\x1f\x7f\xbe\x62\xb5\x99\xac\xc2\xe8\xc0\xf0\xfa\x10\x86\xd7\xe7\x3f\x5e\x31\x37\xe2\xd5\x25\x3f\xb6\xe7\xb7\x05\x2e\x8d\x55\xa7\x7b\x68\xd5\x7f\x03\x00\x00\xff\xff\xb4\xee\xf7\x9e\x52\x31\x00\x00"), + }, + } + fs["/"].(*vfsgenÛ°DirInfo).entries = []os.FileInfo{ + fs["/download.yaml"].(os.FileInfo), + } + + return fs +}() + +type vfsgenÛ°FS map[string]interface{} + +func (fs vfsgenÛ°FS) Open(path string) (http.File, error) { + path = pathpkg.Clean("/" + path) + f, ok := fs[path] + if !ok { + return nil, &os.PathError{Op: "open", Path: path, Err: os.ErrNotExist} + } + + switch f := f.(type) { + case *vfsgenÛ°CompressedFileInfo: + gr, err := gzip.NewReader(bytes.NewReader(f.compressedContent)) + if err != nil { + // This should never happen because we generate the gzip bytes such that they are always valid. + panic("unexpected error reading own gzip compressed bytes: " + err.Error()) + } + return &vfsgenÛ°CompressedFile{ + vfsgenÛ°CompressedFileInfo: f, + gr: gr, + }, nil + case *vfsgenÛ°DirInfo: + return &vfsgenÛ°Dir{ + vfsgenÛ°DirInfo: f, + }, nil + default: + // This should never happen because we generate only the above types. + panic(fmt.Sprintf("unexpected type %T", f)) + } +} + +// vfsgenÛ°CompressedFileInfo is a static definition of a gzip compressed file. +type vfsgenÛ°CompressedFileInfo struct { + name string + modTime time.Time + compressedContent []byte + uncompressedSize int64 +} + +func (f *vfsgenÛ°CompressedFileInfo) Readdir(count int) ([]os.FileInfo, error) { + return nil, fmt.Errorf("cannot Readdir from file %s", f.name) +} +func (f *vfsgenÛ°CompressedFileInfo) Stat() (os.FileInfo, error) { return f, nil } + +func (f *vfsgenÛ°CompressedFileInfo) GzipBytes() []byte { + return f.compressedContent +} + +func (f *vfsgenÛ°CompressedFileInfo) Name() string { return f.name } +func (f *vfsgenÛ°CompressedFileInfo) Size() int64 { return f.uncompressedSize } +func (f *vfsgenÛ°CompressedFileInfo) Mode() os.FileMode { return 0444 } +func (f *vfsgenÛ°CompressedFileInfo) ModTime() time.Time { return f.modTime } +func (f *vfsgenÛ°CompressedFileInfo) IsDir() bool { return false } +func (f *vfsgenÛ°CompressedFileInfo) Sys() interface{} { return nil } + +// vfsgenÛ°CompressedFile is an opened compressedFile instance. +type vfsgenÛ°CompressedFile struct { + *vfsgenÛ°CompressedFileInfo + gr *gzip.Reader + grPos int64 // Actual gr uncompressed position. + seekPos int64 // Seek uncompressed position. +} + +func (f *vfsgenÛ°CompressedFile) Read(p []byte) (n int, err error) { + if f.grPos > f.seekPos { + // Rewind to beginning. + err = f.gr.Reset(bytes.NewReader(f.compressedContent)) + if err != nil { + return 0, err + } + f.grPos = 0 + } + if f.grPos < f.seekPos { + // Fast-forward. + _, err = io.CopyN(ioutil.Discard, f.gr, f.seekPos-f.grPos) + if err != nil { + return 0, err + } + f.grPos = f.seekPos + } + n, err = f.gr.Read(p) + f.grPos += int64(n) + f.seekPos = f.grPos + return n, err +} +func (f *vfsgenÛ°CompressedFile) Seek(offset int64, whence int) (int64, error) { + switch whence { + case io.SeekStart: + f.seekPos = 0 + offset + case io.SeekCurrent: + f.seekPos += offset + case io.SeekEnd: + f.seekPos = f.uncompressedSize + offset + default: + panic(fmt.Errorf("invalid whence value: %v", whence)) + } + return f.seekPos, nil +} +func (f *vfsgenÛ°CompressedFile) Close() error { + return f.gr.Close() +} + +// vfsgenÛ°DirInfo is a static definition of a directory. +type vfsgenÛ°DirInfo struct { + name string + modTime time.Time + entries []os.FileInfo +} + +func (d *vfsgenÛ°DirInfo) Read([]byte) (int, error) { + return 0, fmt.Errorf("cannot Read from directory %s", d.name) +} +func (d *vfsgenÛ°DirInfo) Close() error { return nil } +func (d *vfsgenÛ°DirInfo) Stat() (os.FileInfo, error) { return d, nil } + +func (d *vfsgenÛ°DirInfo) Name() string { return d.name } +func (d *vfsgenÛ°DirInfo) Size() int64 { return 0 } +func (d *vfsgenÛ°DirInfo) Mode() os.FileMode { return 0755 | os.ModeDir } +func (d *vfsgenÛ°DirInfo) ModTime() time.Time { return d.modTime } +func (d *vfsgenÛ°DirInfo) IsDir() bool { return true } +func (d *vfsgenÛ°DirInfo) Sys() interface{} { return nil } + +// vfsgenÛ°Dir is an opened dir instance. +type vfsgenÛ°Dir struct { + *vfsgenÛ°DirInfo + pos int // Position within entries for Seek and Readdir. +} + +func (d *vfsgenÛ°Dir) Seek(offset int64, whence int) (int64, error) { + if offset == 0 && whence == io.SeekStart { + d.pos = 0 + return 0, nil + } + return 0, fmt.Errorf("unsupported Seek in directory %s", d.name) +} + +func (d *vfsgenÛ°Dir) Readdir(count int) ([]os.FileInfo, error) { + if d.pos >= len(d.entries) && count > 0 { + return nil, io.EOF + } + if count <= 0 || count > len(d.entries)-d.pos { + count = len(d.entries) - d.pos + } + e := d.entries[d.pos : d.pos+count] + d.pos += count + return e, nil +} diff --git a/components/cluster-scheduler/pkg/internal/generate/fixtures/fixtures_generate.go b/components/cluster-scheduler/internal/generate/fixtures/fixtures_generate.go similarity index 100% rename from components/cluster-scheduler/pkg/internal/generate/fixtures/fixtures_generate.go rename to components/cluster-scheduler/internal/generate/fixtures/fixtures_generate.go diff --git a/components/cluster-scheduler/pkg/internal/models/cluster.go b/components/cluster-scheduler/internal/models/cluster.go similarity index 100% rename from components/cluster-scheduler/pkg/internal/models/cluster.go rename to components/cluster-scheduler/internal/models/cluster.go diff --git a/components/cluster-scheduler/internal/models/clusternamespaces.go b/components/cluster-scheduler/internal/models/clusternamespaces.go new file mode 100644 index 0000000..cbaecf9 --- /dev/null +++ b/components/cluster-scheduler/internal/models/clusternamespaces.go @@ -0,0 +1,22 @@ +package models + +import ( + "encoding/json" + "time" + + "github.com/google/uuid" + "github.com/uptrace/bun" +) + +type ClusterNamespace struct { + bun.BaseModel `bun:"table:cluster_namespaces,alias:cns"` + + ClusterId uuid.UUID `bun:"cluster_id,type:uuid"` + Name string `bun:"name,notnull"` + Hash string `bun:"hash,notnull"` + DeletedAt time.Time `bun:"deleted_at"` + Type string `bun:"type,notnull"` + Namespace json.RawMessage `bun:"namespace,type:jsonb,notnull"` + Conditions json.RawMessage `bun:"conditions,type:jsonb,notnull,default:'[]'"` + Status json.RawMessage `bun:"status,type:jsonb,notnull,default:'{}'"` +} diff --git a/components/cluster-scheduler/pkg/internal/models/clusteroperatorbootstrap.go b/components/cluster-scheduler/internal/models/clusteroperatorbootstrap.go similarity index 100% rename from components/cluster-scheduler/pkg/internal/models/clusteroperatorbootstrap.go rename to components/cluster-scheduler/internal/models/clusteroperatorbootstrap.go diff --git a/components/cluster-scheduler/pkg/internal/models/clustertoken.go b/components/cluster-scheduler/internal/models/clustertoken.go similarity index 100% rename from components/cluster-scheduler/pkg/internal/models/clustertoken.go rename to components/cluster-scheduler/internal/models/clustertoken.go diff --git a/components/cluster-scheduler/internal/models/metro.go b/components/cluster-scheduler/internal/models/metro.go new file mode 100644 index 0000000..14bfcad --- /dev/null +++ b/components/cluster-scheduler/internal/models/metro.go @@ -0,0 +1,27 @@ +package models + +import ( + "time" + + "github.com/google/uuid" + "github.com/uptrace/bun" +) + +type Metro struct { + bun.BaseModel `bun:"table:cluster_metro,alias:metro"` + + ID uuid.UUID `bun:"id,pk,type:uuid,default:uuid_generate_v4()"` + Name string `bun:"name,notnull"` + CreatedAt time.Time `bun:"created_at,notnull,default:current_timestamp"` + ModifiedAt time.Time `bun:"modified_at,notnull,default:current_timestamp"` + Trash bool `bun:"trash,notnull,default:false"` + Latitude string `bun:"latitude,notnull"` + Longitude string `bun:"longitude,notnull"` + City string `bun:"city"` + State string `bun:"state"` + Country string `bun:"country"` + CountryCode string `bun:"cc"` + StateCode string `bun:"st"` + OrganizationId uuid.UUID `bun:"organization_id,type:uuid"` + PartnerId uuid.UUID `bun:"partner_id,type:uuid,notnull"` +} diff --git a/components/cluster-scheduler/pkg/internal/models/projectcluster.go b/components/cluster-scheduler/internal/models/projectcluster.go similarity index 100% rename from components/cluster-scheduler/pkg/internal/models/projectcluster.go rename to components/cluster-scheduler/internal/models/projectcluster.go diff --git a/components/cluster-scheduler/internal/testutil/db.go b/components/cluster-scheduler/internal/testutil/db.go new file mode 100644 index 0000000..9b7718d --- /dev/null +++ b/components/cluster-scheduler/internal/testutil/db.go @@ -0,0 +1,40 @@ +package testutil + +import ( + "database/sql" + + "github.com/RafaySystems/rcloud-base/components/common/pkg/log" + "github.com/uptrace/bun" + "github.com/uptrace/bun/dialect/pgdialect" + "github.com/uptrace/bun/driver/pgdriver" + "github.com/uptrace/bun/extra/bundebug" +) + +var ( + _log = log.GetLogger() +) + +// test db constants +const ( + ClusterDB = "clusterdb" + ClusterDBUser = "clusterdbuser" + ClusterDBPassword = "clusterdbpassword" +) + +type queryHook struct { +} + +// GetDB returns testdb +func GetDB() *bun.DB { + + dsn := "postgres://" + ClusterDBUser + ":" + ClusterDBPassword + "@localhost:5432" + "/" + ClusterDB + "?sslmode=disable" + sqldb := sql.OpenDB(pgdriver.NewConnector(pgdriver.WithDSN(dsn))) + db := bun.NewDB(sqldb, pgdialect.New()) + + db.AddQueryHook(bundebug.NewQueryHook( + bundebug.WithVerbose(true), + bundebug.FromEnv("BUNDEBUG"), + )) + + return db +} diff --git a/components/cluster-scheduler/internal/testutil/models.go b/components/cluster-scheduler/internal/testutil/models.go new file mode 100644 index 0000000..52215ae --- /dev/null +++ b/components/cluster-scheduler/internal/testutil/models.go @@ -0,0 +1,12 @@ +package testutil + +import ( + "github.com/RafaySystems/rcloud-base/components/cluster-scheduler/pkg/service" +) + +func NewClusterService() (service.ClusterService, error) { + db := GetDB() + + cs := service.NewClusterService(db, db, nil, nil) + return cs, nil +} diff --git a/components/cluster-scheduler/main.go b/components/cluster-scheduler/main.go index 096383e..b273b3a 100644 --- a/components/cluster-scheduler/main.go +++ b/components/cluster-scheduler/main.go @@ -12,16 +12,21 @@ import ( "github.com/RafaySystems/rcloud-base/components/cluster-scheduler/pkg/bootstrapper" "github.com/RafaySystems/rcloud-base/components/cluster-scheduler/pkg/credentials" "github.com/RafaySystems/rcloud-base/components/cluster-scheduler/pkg/notify" - "github.com/RafaySystems/rcloud-base/components/cluster-scheduler/pkg/server" + "github.com/RafaySystems/rcloud-base/components/cluster-scheduler/pkg/reconcile" "github.com/RafaySystems/rcloud-base/components/cluster-scheduler/pkg/service" - rpcv3 "github.com/RafaySystems/rcloud-base/components/cluster-scheduler/proto/rpc/v3" + adminrpc "github.com/RafaySystems/rcloud-base/components/cluster-scheduler/proto/rpc" + "github.com/RafaySystems/rcloud-base/components/cluster-scheduler/server" "github.com/RafaySystems/rcloud-base/components/common/pkg/auth/interceptors" authv3 "github.com/RafaySystems/rcloud-base/components/common/pkg/auth/v3" "github.com/RafaySystems/rcloud-base/components/common/pkg/gateway" grpcutil "github.com/RafaySystems/rcloud-base/components/common/pkg/grpc" + "github.com/RafaySystems/rcloud-base/components/common/pkg/leaderelection" "github.com/RafaySystems/rcloud-base/components/common/pkg/log" configrpc "github.com/RafaySystems/rcloud-base/components/common/proto/rpc/config" + schedulerrpc "github.com/RafaySystems/rcloud-base/components/common/proto/rpc/scheduler" + sentryrpc "github.com/RafaySystems/rcloud-base/components/common/proto/rpc/sentry" "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/rs/xid" "github.com/spf13/viper" "github.com/uptrace/bun" "github.com/uptrace/bun/dialect/pgdialect" @@ -36,25 +41,22 @@ import ( const ( rpcPortEnv = "RPC_PORT" apiPortEnv = "API_PORT" - peerPortENV = "PEER_PORT" - connectorPortENV = "CONNECTOR_PORT" configAddrENV = "CONFIG_ADDR" sentryAddrENV = "SENTRY_ADDR" dbAddrEnv = "DB_ADDR" dbNameEnv = "DB_NAME" dbUserEnv = "DB_USER" dbPasswordEnv = "DB_PASSWORD" + adbNameEnv = "ADMIN_DB_NAME" + adbUserEnv = "ADMIN_DB_USER" + adbPasswordEnv = "ADMIN_DB_PASSWORD" devEnv = "DEV" secretPathEnv = "SECRET_PATH" controlAddrEnv = "CONTROL_ADDR" apiAddrEnv = "API_ADDR" authAddrEnv = "AUTH_ADDR" - connectorCert = "connector.pem" - connectorKey = "connector-key.pem" caCert = "ca.pem" caKey = "ca-key.pem" - controllerImageEnv = "CONTROLLER_IMAGE" - connectorImageEnv = "CONNECTOR_IMAGE" relayAgentImageEnv = "RELAY_AGENT_IMAGE" sentryBootstrapAddrENV = "SENTRY_BOOTSTRAP_ADDR" podNameEnv = "POD_NAME" @@ -66,8 +68,6 @@ const ( var ( rpcPort int apiPort int - peerPort int - connectorPort int configAddr string controlAddr string sentryAddr string @@ -76,42 +76,45 @@ var ( dbName string dbUser string dbPassword string + adbName string + adbUser string + adbPassword string dev bool secretPath string podName string _log = log.GetLogger() db *bun.DB + adb *bun.DB cs service.ClusterService + ms service.MetroService signer credentials.Signer allowReuseToken string // featureflag - controllerImage string - connectorImage string relayAgentImage string downloadData *bootstrapper.DownloadData authAddr string schedulerNamespace string authPool authv3.AuthPool configPool configrpc.ConfigPool + sentryPool sentryrpc.SentryPool ) func setup() { viper.SetDefault(apiPortEnv, 8000) viper.SetDefault(rpcPortEnv, 5000) - viper.SetDefault(peerPortENV, 5001) - viper.SetDefault(connectorPortENV, 5002) viper.SetDefault(dbAddrEnv, "localhost:5432") viper.SetDefault(dbNameEnv, "clusterdb") viper.SetDefault(dbUserEnv, "clusterdbuser") viper.SetDefault(dbPasswordEnv, "clusterdbpassword") + viper.SetDefault(adbNameEnv, "admindb") + viper.SetDefault(adbUserEnv, "admindbuser") + viper.SetDefault(adbPasswordEnv, "admindbpassword") viper.SetDefault(devEnv, true) - viper.SetDefault(secretPathEnv, "/secrets") + viper.SetDefault(secretPathEnv, "/home/infracloud/Documents/warehouse/rafay/test data/cluster-scheduler") viper.SetDefault(configAddrENV, ":7000") viper.SetDefault(allowReuseToken, "true") viper.SetDefault(controlAddrEnv, "localhost:5002") viper.SetDefault(apiAddrEnv, "localhost:8000") - viper.SetDefault(controllerImageEnv, "rafaysystems/cluster-controller:latest") - viper.SetDefault(connectorImageEnv, "rafaysystems/rafay-connector:latest") - viper.SetDefault(relayAgentImageEnv, "registry.dev.rafay-edge.net:5000/rafay/rafay-relay-agent:v1.6.x-122") + viper.SetDefault(relayAgentImageEnv, "rafaysystems/rafay-relay:latest") viper.SetDefault(authAddrEnv, "authsrv.rcloud-admin.svc.cluster.local:50011") viper.SetDefault(sentryAddrENV, "localhost:10000") viper.SetDefault(sentryBootstrapAddrENV, "api.sentry.rafay.local:11000") @@ -120,8 +123,6 @@ func setup() { viper.BindEnv(rpcPortEnv) viper.BindEnv(apiPortEnv) - viper.BindEnv(peerPortENV) - viper.BindEnv(connectorPortENV) viper.BindEnv(dbAddrEnv) viper.BindEnv(dbNameEnv) viper.BindEnv(dbPasswordEnv) @@ -132,9 +133,7 @@ func setup() { viper.BindEnv(allowReuseToken) viper.BindEnv(controlAddrEnv) viper.BindEnv(apiAddrEnv) - viper.BindEnv(connectorImageEnv) viper.BindEnv(relayAgentImageEnv) - viper.BindEnv(controllerImageEnv) viper.BindEnv(authAddrEnv) viper.BindEnv(sentryAddrENV) viper.BindEnv(sentryBootstrapAddrENV) @@ -143,20 +142,19 @@ func setup() { rpcPort = viper.GetInt(rpcPortEnv) apiPort = viper.GetInt(apiPortEnv) - peerPort = viper.GetInt(peerPortENV) - connectorPort = viper.GetInt(connectorPortENV) dbAddr = viper.GetString(dbAddrEnv) dbName = viper.GetString(dbNameEnv) dbUser = viper.GetString(dbUserEnv) dbPassword = viper.GetString(dbPasswordEnv) + adbName = viper.GetString(adbNameEnv) + adbUser = viper.GetString(adbUserEnv) + adbPassword = viper.GetString(adbPasswordEnv) dev = viper.GetBool(devEnv) secretPath = viper.GetString(secretPathEnv) configAddr = viper.GetString(configAddrENV) allowReuseToken = viper.GetString(allowReuseToken) controlAddr = viper.GetString(controlAddrEnv) apiAddr = viper.GetString(apiAddrEnv) - controllerImage = viper.GetString(controllerImageEnv) - connectorImage = viper.GetString(connectorImageEnv) relayAgentImage = viper.GetString(relayAgentImageEnv) authAddr = viper.GetString(authAddrEnv) sentryAddr = viper.GetString(sentryAddrENV) @@ -167,6 +165,11 @@ func setup() { sqldb := sql.OpenDB(pgdriver.NewConnector(pgdriver.WithDSN(dsn))) db = bun.NewDB(sqldb, pgdialect.New()) + //TODO: this should be microservice call to admin service + dsn = "postgres://" + adbUser + ":" + adbPassword + "@" + dbAddr + "/" + adbName + "?sslmode=disable" + sqldb = sql.OpenDB(pgdriver.NewConnector(pgdriver.WithDSN(dsn))) + adb = bun.NewDB(sqldb, pgdialect.New()) + if dev { db.AddQueryHook(bundebug.NewQueryHook( bundebug.WithVerbose(true), @@ -177,8 +180,6 @@ func setup() { _log.Infow("setup finished", "rpcPort", rpcPort, "apiPort", apiPort, - "peerPort", peerPort, - "connectorPort", connectorPort, "dbAddr", dbAddr, "dbName", dbName, "dbUser", dbUser, @@ -204,17 +205,19 @@ func setup() { downloadData = &bootstrapper.DownloadData{ ControlAddr: controlAddr, APIAddr: apiAddr, - ControllerImage: controllerImage, - ConnectorImage: connectorImage, RelayAgentImage: relayAgentImage, } - var err error + //TODO: add auth pool as required + configPool = configrpc.NewConfigPool(configAddr, 5*goruntime.NumCPU()) + sentryPool = sentryrpc.NewSentryPool(sentryAddr, 5*goruntime.NumCPU()) - cs = service.NewClusterService(db, downloadData) + cs = service.NewClusterService(db, adb, downloadData, sentryPool) + ms = service.NewMetroService(db, adb) notify.Init(cs) + var err error signer, err = credentials.NewSigner(secretPath) if err != nil { @@ -223,9 +226,6 @@ func setup() { _log.Infow("queried number of cpus", "numCPUs", goruntime.NumCPU()) - //TODO: add sentry, auth pool as required - configPool = configrpc.NewConfigPool(configAddr, 5*goruntime.NumCPU()) - } func run() { @@ -246,7 +246,7 @@ func run() { wg.Add(5) go runAPI(&wg, ctx) go runRPC(&wg, ctx) - go runPeer(&wg, ctx) + go runEventHandlers(&wg, ctx) <-ctx.Done() _log.Infow("shutting down, waiting for children to die") @@ -264,7 +264,8 @@ func runAPI(wg *sync.WaitGroup, ctx context.Context) { ctx, fmt.Sprintf(":%d", rpcPort), make([]runtime.ServeMuxOption, 0), - rpcv3.RegisterClusterHandlerFromEndpoint, + schedulerrpc.RegisterClusterHandlerFromEndpoint, + adminrpc.RegisterLocationHandlerFromEndpoint, ) if err != nil { _log.Fatalw("unable to create gateway", "error", err) @@ -290,17 +291,13 @@ func runAPI(wg *sync.WaitGroup, ctx context.Context) { } -func runPeer(wg *sync.WaitGroup, ctx context.Context) { - defer wg.Done() - <-ctx.Done() -} - func runRPC(wg *sync.WaitGroup, ctx context.Context) { defer wg.Done() defer cs.Close() defer configPool.Close() crpc := server.NewClusterServer(cs, signer, downloadData) + mserver := server.NewLocationServer(ms) l, err := net.Listen("tcp", fmt.Sprintf(":%d", rpcPort)) if err != nil { @@ -336,7 +333,8 @@ func runRPC(wg *sync.WaitGroup, ctx context.Context) { }() // register all the rpc servers - rpcv3.RegisterClusterServer(s, crpc) + schedulerrpc.RegisterClusterServer(s, crpc) + adminrpc.RegisterLocationServer(s, mserver) _log.Infow("starting rpc server", "port", rpcPort) err = s.Serve(l) @@ -345,6 +343,35 @@ func runRPC(wg *sync.WaitGroup, ctx context.Context) { } } +func runEventHandlers(wg *sync.WaitGroup, ctx context.Context) { + defer wg.Done() + + //TODO: need to add a bunch of other handlers with gitops + ceh := reconcile.NewClusterEventHandler(cs, sentryPool, configPool) + _log.Infow("starting cluster event handler") + go ceh.Handle(ctx.Done()) + + // listen to cluster events + cs.AddEventHandler(ceh.ClusterHook()) + + if !dev { + rl, err := leaderelection.NewConfigMapLock("cluster-scheduler", schedulerNamespace, xid.New().String()) + if err != nil { + _log.Fatalw("unable to create configmap lock", "error", err) + } + go func() { + err := leaderelection.Run(rl, func(stop <-chan struct{}) { + }, ctx.Done()) + + if err != nil { + _log.Fatalw("unable to run leader election", "error", err) + } + }() + } + + <-ctx.Done() +} + func main() { setup() run() diff --git a/components/cluster-scheduler/pkg/bootstrapper/agent/create.go b/components/cluster-scheduler/pkg/bootstrapper/agent/create.go new file mode 100644 index 0000000..86a9578 --- /dev/null +++ b/components/cluster-scheduler/pkg/bootstrapper/agent/create.go @@ -0,0 +1,197 @@ +package agent + +import ( + "context" + "encoding/json" + "fmt" + + configrpc "github.com/RafaySystems/rcloud-base/components/common/proto/rpc/config" + sentryrpc "github.com/RafaySystems/rcloud-base/components/common/proto/rpc/sentry" + commonv3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/commonpb/v3" + infrapbv3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/infrapb/v3" + "github.com/RafaySystems/rcloud-base/components/common/proto/types/sentry" + "github.com/pkg/errors" + "github.com/rs/xid" + "github.com/spf13/viper" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + + log "github.com/RafaySystems/rcloud-base/components/common/pkg/log" +) + +var ( + _log = log.GetLogger() +) + +const ( + maxDials = 2 +) + +func getRelayBootstrapAddr() string { + return viper.GetString("SENTRY_BOOTSTRAP_ADDR") +} + +type Relay struct { + Token string `json:"token"` + Addr string `json:"addr"` + Endpoint string `json:"endpoint"` + Name string `json:"name"` + TemplateToken string `json:"templateToken"` +} + +// CreateForCluster creates bootstrap agent for cluster +func CreateForCluster(ctx context.Context, sp sentryrpc.SentryPool, cp configrpc.ConfigPool, cluster *infrapbv3.Cluster) error { + sc, err := sp.NewClient(ctx) + if err != nil { + err = errors.Wrap(err, "unable to create sentry client") + return err + } + defer sc.Close() + + var relays []Relay + + resp, err := sc.GetBootstrapAgentTemplates(ctx, &commonv3.QueryOptions{ + GlobalScope: true, + Selector: "rafay.dev/defaultRelay=true", + }) + if err != nil { + err = errors.Wrap(err, "unable to get bootstrap agent template") + return err + } + + // create bootstrap agent + for _, bat := range resp.Items { + found := true + agent, err := sc.GetBootstrapAgent(ctx, &sentry.BootstrapAgent{ + Metadata: &commonv3.Metadata{ + Name: cluster.Metadata.Id, + //RequestMeta: cluster.RequestMeta, TODO + }, + Spec: &sentry.BootstrapAgentSpec{ + TemplateRef: fmt.Sprintf("template/%s", bat.Metadata.Name), + }, + }) + if err != nil { + if s, ok := status.FromError(err); ok { + switch s.Code() { + case codes.NotFound: + found = false + default: + return err + } + } else { + err = errors.Wrap(err, "unable to get bootstrap agent") + return err + } + + } + + if !found { + agent = &sentry.BootstrapAgent{ + Metadata: &commonv3.Metadata{ + Name: cluster.Metadata.Id, + Description: cluster.Metadata.Name, + Labels: map[string]string{ + "rafay.dev/clusterName": cluster.Metadata.Name, + }, + Partner: cluster.Metadata.Partner, + Organization: cluster.Metadata.Organization, + Project: cluster.Metadata.Project, + }, + Spec: &sentry.BootstrapAgentSpec{ + TemplateRef: bat.Metadata.Name, + Token: xid.New().String(), + }, + } + + for _, project := range cluster.Spec.ClusterData.Projects { + agent.Metadata.Labels[fmt.Sprintf("project/%s", project.ProjectID)] = "" + } + + _, err := sc.CreateBootstrapAgent(ctx, agent) + if err != nil { + _log.Infow("unable to create bootstrap agent", "error", err, "agent", *agent) + err = errors.Wrap(err, "unable to create bootstrap agent") + return err + } + } + endpoint := "" + for _, host := range bat.Spec.Hosts { + if host.Type == sentry.BootstrapTemplateHostType_HostTypeExternal { + endpoint = host.Host + } + } + + if endpoint == "" { + return fmt.Errorf("no external endpoint for bootstrap template %s", bat.Metadata.Name) + } + + relays = append(relays, Relay{ + agent.Spec.Token, getRelayBootstrapAddr(), endpoint, bat.Metadata.Name, bat.Spec.Token, + }) + } + + relaysBytes, _ := json.Marshal(relays) + if cluster.Metadata.Annotations == nil { + cluster.Metadata.Annotations = make(map[string]string) + } + cluster.Metadata.Annotations["relays"] = string(relaysBytes) + + //TODO: to revisit during gitops config component + /* relayAgentConfig := &corev1.ConfigMap{ + TypeMeta: metav1.TypeMeta{ + APIVersion: "v1", + Kind: "ConfigMap", + }, + ObjectMeta: metav1.ObjectMeta{ + Name: "relay-agent-config", + }, + Data: map[string]string{ + "clusterID": cluster.Metadata.Id, + "relays": string(relaysBytes), + "maxDials": strconv.FormatInt(maxDials, 10), + // "dialoutProxy": "", + // "dialoutProxyAuthentication": "", + }, + } + relayAgentConfigObj, err := runtime.FromObject(relayAgentConfig) + if err != nil { + return err + } + + override := &config.Override{ + Metadata: &commonv3.Metadata{ + Name: fmt.Sprintf("relay-override-%s", cluster.Metadata.Name), + Partner: cluster.Metadata.Partner, + Organization: cluster.Metadata.Organization, + Labels: map[string]string{ + config.OverrideScope: config.OverrideScopeSpecificCluster, + config.OverrideCluster: cluster.Metadata.Name, + }, + Annotations: map[string]string{ + "rafay.dev/weight": "10", + }, + }, + Spec: &config.OverrideSpec{ + ResourceSelector: "rafay.dev/system=true", + Overrides: []*clusterv2.StepObject{ + relayAgentConfigObj, + }, + }, + } + + // create override + cc, err := cp.NewClient(ctx) + if err != nil { + err = errors.Wrap(err, "unable to create config client") + return err + } + defer cc.Close() + + _, err = cc.UpdateOverride(ctx, override) + if err != nil { + return err + } */ + + return nil +} diff --git a/components/cluster-scheduler/pkg/bootstrapper/agent/delete.go b/components/cluster-scheduler/pkg/bootstrapper/agent/delete.go new file mode 100644 index 0000000..76eba73 --- /dev/null +++ b/components/cluster-scheduler/pkg/bootstrapper/agent/delete.go @@ -0,0 +1,66 @@ +package agent + +import ( + "context" + "fmt" + + "github.com/RafaySystems/rcloud-base/components/common/pkg/query" + sentryrpc "github.com/RafaySystems/rcloud-base/components/common/proto/rpc/sentry" + commonv3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/commonpb/v3" + infrav3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/infrapb/v3" + "github.com/RafaySystems/rcloud-base/components/common/proto/types/sentry" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +// DeleteForCluster delete bootstrap agent +func DeleteForCluster(ctx context.Context, sp sentryrpc.SentryPool, cluster infrav3.Cluster, opts ...query.Option) error { + + sc, err := sp.NewClient(ctx) + if err != nil { + return err + } + defer sc.Close() + + resp, err := sc.GetBootstrapAgentTemplates(ctx, &commonv3.QueryOptions{ + GlobalScope: true, + Selector: "rafay.dev/defaultRelay=true", + }) + if err != nil { + return err + } + + for _, bat := range resp.Items { + + agent := &sentry.BootstrapAgent{ + Metadata: &commonv3.Metadata{ + Id: cluster.Metadata.Id, + Name: cluster.Metadata.Name, + Partner: cluster.Metadata.Partner, + Organization: cluster.Metadata.Organization, + Project: cluster.Metadata.Project, + }, + Spec: &sentry.BootstrapAgentSpec{ + TemplateRef: fmt.Sprintf("template/%s", bat.Metadata.Name), + }, + } + + _, err := sc.DeleteBootstrapAgent(ctx, agent) + if err != nil { + if s, ok := status.FromError(err); ok { + switch s.Code() { + case codes.NotFound: + continue + default: + return err + } + } else { + return err + } + + } + + } + + return nil +} diff --git a/components/cluster-scheduler/pkg/bootstrapper/agent/get.go b/components/cluster-scheduler/pkg/bootstrapper/agent/get.go new file mode 100644 index 0000000..1550f59 --- /dev/null +++ b/components/cluster-scheduler/pkg/bootstrapper/agent/get.go @@ -0,0 +1,73 @@ +package agent + +import ( + "context" + "fmt" + + "github.com/pkg/errors" + + sentryrpc "github.com/RafaySystems/rcloud-base/components/common/proto/rpc/sentry" + commonv3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/commonpb/v3" + infrapbv3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/infrapb/v3" + "github.com/RafaySystems/rcloud-base/components/common/proto/types/sentry" +) + +// GetRelayAgentsForCluster creates bootstrap agent for cluster +func GetRelaysConfigForCluster(ctx context.Context, sp sentryrpc.SentryPool, cluster *infrapbv3.Cluster) ([]Relay, error) { + sc, err := sp.NewClient(ctx) + if err != nil { + _log.Infow("unable to create sentry client", "error", err) + err = errors.Wrap(err, "unable to create sentry client") + return nil, err + } + defer sc.Close() + + var relays []Relay + + resp, err := sc.GetBootstrapAgentTemplates(ctx, &commonv3.QueryOptions{ + GlobalScope: true, + Selector: "rafay.dev/defaultRelay=true", + }) + if err != nil { + err = errors.Wrap(err, "unable to get bootstrap agent template") + return nil, err + } + + for _, bat := range resp.Items { + agent, err := sc.GetBootstrapAgent(ctx, &sentry.BootstrapAgent{ + Metadata: &commonv3.Metadata{ + Id: cluster.Metadata.Id, + Name: cluster.Metadata.Name, + Partner: cluster.Metadata.Partner, + Organization: cluster.Metadata.Organization, + Project: cluster.Metadata.Project, + /*RequestMeta: cluster.RequestMeta,*/ + }, + Spec: &sentry.BootstrapAgentSpec{ + TemplateRef: fmt.Sprintf("template/%s", bat.Metadata.Name), + }, + }) + if err != nil { + err = errors.Wrap(err, "unable to get bootstrap agent") + return nil, err + + } + + endpoint := "" + for _, host := range bat.Spec.Hosts { + if host.Type == sentry.BootstrapTemplateHostType_HostTypeExternal { + endpoint = host.Host + } + } + + if endpoint == "" { + return nil, fmt.Errorf("no external endpoint for relay bootstrap template %s", bat.Metadata.Name) + } + + relays = append(relays, Relay{ + agent.Spec.Token, getRelayBootstrapAddr(), endpoint, bat.Metadata.Name, bat.Spec.Token, + }) + } + + return relays, nil +} diff --git a/components/cluster-scheduler/pkg/bootstrapper/agent/projects.go b/components/cluster-scheduler/pkg/bootstrapper/agent/projects.go new file mode 100644 index 0000000..2575f0f --- /dev/null +++ b/components/cluster-scheduler/pkg/bootstrapper/agent/projects.go @@ -0,0 +1,75 @@ +package agent + +import ( + "context" + "fmt" + + sentryrpc "github.com/RafaySystems/rcloud-base/components/common/proto/rpc/sentry" + commonv3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/commonpb/v3" + infrav3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/infrapb/v3" + "github.com/RafaySystems/rcloud-base/components/common/proto/types/sentry" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +// UpdateProjectsForCluster updates projects for bootstrap agent for cluster +func UpdateProjectsForCluster(ctx context.Context, sp sentryrpc.SentryPool, cluster infrav3.Cluster) error { + + sc, err := sp.NewClient(ctx) + if err != nil { + return err + } + defer sc.Close() + + //TODO: handle multiple bootstrap agents + // by fetching other agent templates in partner scope + + resp, err := sc.GetBootstrapAgentTemplates(ctx, &commonv3.QueryOptions{ + GlobalScope: true, + Selector: "rafay.dev/defaultRelay=true", + }) + if err != nil { + return err + } + + // create bootstrap agent + for _, bat := range resp.Items { + + agent := &sentry.BootstrapAgent{ + Metadata: &commonv3.Metadata{ + Id: cluster.Metadata.Id, + Name: cluster.Metadata.Name, + Partner: cluster.Metadata.Partner, + Organization: cluster.Metadata.Organization, + Project: cluster.Metadata.Project, + Labels: map[string]string{ + "rafay.dev/clusterName": cluster.Metadata.Name, + }, + }, + Spec: &sentry.BootstrapAgentSpec{ + TemplateRef: fmt.Sprintf("template/%s", bat.Metadata.Name), + }, + } + + for _, project := range cluster.Spec.ClusterData.Projects { + agent.Metadata.Labels[fmt.Sprintf("project/%s", project.ProjectID)] = "" + } + + _, err = sc.UpdateBootstrapAgent(ctx, agent) + + if err != nil { + if s, ok := status.FromError(err); ok { + switch s.Code() { + case codes.NotFound: + default: + return err + } + } else { + return err + } + + } + + } + return nil +} diff --git a/components/cluster-scheduler/pkg/bootstrapper/download.go b/components/cluster-scheduler/pkg/bootstrapper/download.go index e850c5e..106ab94 100644 --- a/components/cluster-scheduler/pkg/bootstrapper/download.go +++ b/components/cluster-scheduler/pkg/bootstrapper/download.go @@ -3,7 +3,5 @@ package bootstrapper type DownloadData struct { ControlAddr string APIAddr string - ControllerImage string - ConnectorImage string RelayAgentImage string } diff --git a/components/cluster-scheduler/pkg/internal/cluster/conditions.go b/components/cluster-scheduler/pkg/internal/cluster/conditions.go deleted file mode 100644 index 3665986..0000000 --- a/components/cluster-scheduler/pkg/internal/cluster/conditions.go +++ /dev/null @@ -1,116 +0,0 @@ -package cluster - -import ( - "time" - - "github.com/RafaySystems/rcloud-base/components/cluster-scheduler/pkg/internal/cluster/constants" - commonv3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/commonpb/v3" - infrav3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/infrapb/v3" - "google.golang.org/protobuf/types/known/timestamppb" -) - -// ClusterConditionFunc is the function signature for creating new cluster condition -type ClusterConditionFunc func(status commonv3.RafayConditionStatus, reason string) *infrav3.ClusterCondition - -// ClusterConditionReadyFunc checks if condition type is ready -type ClusterConditionReadyFunc func(c *infrav3.Cluster) bool - -var ( - NewClusterRegister ClusterConditionFunc = newClusterCondition(infrav3.ClusterConditionType_ClusterRegister) - NewClusterApprove ClusterConditionFunc = newClusterCondition(infrav3.ClusterConditionType_ClusterApprove) - NewClusterCheckIn ClusterConditionFunc = newClusterCondition(infrav3.ClusterConditionType_ClusterCheckIn) - NewClusterNodeSync ClusterConditionFunc = newClusterCondition(infrav3.ClusterConditionType_ClusterNodeSync) - NewClusterNamespaceSync ClusterConditionFunc = newClusterCondition(infrav3.ClusterConditionType_ClusterNamespaceSync) - NewClusterBlueprintSync ClusterConditionFunc = newClusterCondition(infrav3.ClusterConditionType_ClusterBlueprintSync) - NewClusterReady ClusterConditionFunc = newClusterCondition(infrav3.ClusterConditionType_ClusterReady) - NewClusterAuxiliaryTaskSync ClusterConditionFunc = newClusterCondition(infrav3.ClusterConditionType_ClusterAuxiliaryTaskSync) - NewClusterBootstrapAgent ClusterConditionFunc = newClusterCondition(infrav3.ClusterConditionType_ClusterBootstrapAgent) - NewClusterDelete ClusterConditionFunc = newClusterCondition(infrav3.ClusterConditionType_ClusterDelete) - - IsClusterBootstrapAgentPending ClusterConditionReadyFunc = isClusterCondition(constants.Pending, infrav3.ClusterConditionType_ClusterBootstrapAgent) - IsClusterBootstrapAgentRetry ClusterConditionReadyFunc = isClusterCondition(constants.Retry, infrav3.ClusterConditionType_ClusterBootstrapAgent) - IsClusterBootstrapAgentCreated ClusterConditionReadyFunc = isClusterCondition(constants.Success, infrav3.ClusterConditionType_ClusterBootstrapAgent) - IsClusterRegisterd ClusterConditionReadyFunc = isClusterConditionSuccess(infrav3.ClusterConditionType_ClusterRegister) - IsClusterRegisterPending ClusterConditionReadyFunc = isClusterCondition(constants.Pending, infrav3.ClusterConditionType_ClusterRegister) - IsClusterApproved ClusterConditionReadyFunc = isClusterConditionSuccess(infrav3.ClusterConditionType_ClusterApprove) - IsClusterCheckedIn ClusterConditionReadyFunc = isClusterConditionSuccess(infrav3.ClusterConditionType_ClusterCheckIn) - IsClusterNodeSynced ClusterConditionReadyFunc = isClusterConditionSuccess(infrav3.ClusterConditionType_ClusterNodeSync) - IsClusterNamespaceSynced ClusterConditionReadyFunc = isClusterConditionSuccess(infrav3.ClusterConditionType_ClusterNamespaceSync) - IsClusterBlueprintSynced ClusterConditionReadyFunc = isClusterConditionSuccess(infrav3.ClusterConditionType_ClusterBlueprintSync) - IsClusterBlueprintSyncPending ClusterConditionReadyFunc = isClusterCondition(constants.Pending, infrav3.ClusterConditionType_ClusterBlueprintSync) - IsClusterBlueprintSyncRetry ClusterConditionReadyFunc = isClusterCondition(constants.Retry, infrav3.ClusterConditionType_ClusterBlueprintSync) - IsClusterBlueprintSyncSuccess ClusterConditionReadyFunc = isClusterCondition(constants.Success, infrav3.ClusterConditionType_ClusterBlueprintSync) - IsClusterBlueprintSyncInprogress ClusterConditionReadyFunc = isClusterCondition(constants.InProgress, infrav3.ClusterConditionType_ClusterBlueprintSync) - IsClusterBlueprintSyncFailed ClusterConditionReadyFunc = isClusterCondition(constants.Failed, infrav3.ClusterConditionType_ClusterBlueprintSync) - IsClusterReady ClusterConditionReadyFunc = isClusterConditionSuccess(infrav3.ClusterConditionType_ClusterReady) - IsClusterDeletePending ClusterConditionReadyFunc = isClusterCondition(constants.Pending, infrav3.ClusterConditionType_ClusterDelete) - IsClusterDeleteRetry ClusterConditionReadyFunc = isClusterCondition(constants.Retry, infrav3.ClusterConditionType_ClusterDelete) - IsClusterDeleted ClusterConditionReadyFunc = isClusterCondition(constants.Success, infrav3.ClusterConditionType_ClusterDelete) - IsClusterDeleteNotSet ClusterConditionReadyFunc = isClusterCondition(constants.NotSet, infrav3.ClusterConditionType_ClusterDelete) -) - -// DefaultClusterConditions is the default cluster conditions list -var DefaultClusterConditions = func() []*infrav3.ClusterCondition { - var conditions []*infrav3.ClusterCondition - - var i int32 = 0 - for { - if _, ok := infrav3.ClusterConditionType_name[i]; !ok { - break - } - conditions = append(conditions, newClusterCondition(infrav3.ClusterConditionType(i))(commonv3.RafayConditionStatus_NotSet, "pending")) - i++ - } - - return conditions -}() - -func newClusterCondition(conditionType infrav3.ClusterConditionType) func(status commonv3.RafayConditionStatus, reason string) *infrav3.ClusterCondition { - return func(status commonv3.RafayConditionStatus, reason string) *infrav3.ClusterCondition { - return &infrav3.ClusterCondition{ - Type: conditionType, - Status: status, - Reason: reason, - LastUpdated: timestamppb.New(time.Now()), - } - } -} - -// SetClusterCondition sets condition in cluster conditions -var SetClusterCondition = func(c *infrav3.Cluster, condtition *infrav3.ClusterCondition) { - for i, ec := range c.Spec.ClusterData.ClusterStatus.Conditions { - if ec.Type == condtition.Type { - c.Spec.ClusterData.ClusterStatus.Conditions[i] = condtition - break - } - } - -} - -func isClusterCondition(conditionStatus commonv3.RafayConditionStatus, conditionTypes ...infrav3.ClusterConditionType) func(c *infrav3.Cluster) bool { - return func(c *infrav3.Cluster) bool { - for _, condition := range c.Spec.ClusterData.ClusterStatus.Conditions { - for _, conditionType := range conditionTypes { - if condition.Type == conditionType { - if condition.Status == conditionStatus { - return true - } - } - } - } - return false - } -} - -func isClusterConditionSuccess(conditionType infrav3.ClusterConditionType) func(c *infrav3.Cluster) bool { - return func(c *infrav3.Cluster) bool { - for _, condition := range c.Spec.ClusterData.ClusterStatus.Conditions { - if condition.Type == conditionType { - if condition.Status == constants.Success { - return true - } - } - } - return false - } -} diff --git a/components/cluster-scheduler/pkg/internal/fixtures/fixtures.go b/components/cluster-scheduler/pkg/internal/fixtures/fixtures.go deleted file mode 100644 index 4f166d3..0000000 --- a/components/cluster-scheduler/pkg/internal/fixtures/fixtures.go +++ /dev/null @@ -1,184 +0,0 @@ -// Code generated by vfsgen; DO NOT EDIT. - -package fixtures - -import ( - "bytes" - "compress/gzip" - "fmt" - "io" - "io/ioutil" - "net/http" - "os" - pathpkg "path" - "time" -) - -// Fixtures statically implements the virtual filesystem provided to vfsgen. -var Fixtures = func() http.FileSystem { - fs := vfsgenÛ°FS{ - "/": &vfsgenÛ°DirInfo{ - name: "/", - modTime: time.Date(2022, 1, 14, 10, 57, 24, 402123249, time.UTC), - }, - "/download.yaml": &vfsgenÛ°CompressedFileInfo{ - name: "download.yaml", - modTime: time.Date(2022, 1, 18, 6, 43, 17, 268443520, time.UTC), - uncompressedSize: 16866, - - compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x02\xff\xec\x3c\x5d\x73\xe2\xb8\xb2\xef\xfc\x0a\x15\x2f\x7b\xce\xa9\x35\x03\x93\xc9\xd6\x1e\xaa\xee\x43\x00\x9b\x84\x24\x7c\x18\x6c\x12\x4e\x9d\x9a\x12\x76\x83\x1d\x64\xc9\x2b\xc9\x24\xcc\xd4\xfc\xf7\x5b\x92\x6d\x30\x60\x32\x49\x76\x37\x77\xf6\xd6\xe6\x65\xa0\xd5\xea\x6e\xb5\xfa\x4b\x2d\x31\x86\x61\x54\x70\x1c\xba\xc0\x45\xc8\x68\x13\xad\x1b\x95\x55\x48\xfd\x26\xea\xe3\x08\x44\x8c\x3d\xa8\x44\x20\xb1\x8f\x25\x6e\x56\x10\x22\x78\x0e\x44\xa8\x4f\x08\x79\x8c\x4a\xce\x88\x11\x13\x4c\xa1\x99\x7f\x25\xc0\x8d\x08\x53\xbc\x04\x5e\x41\x88\xe2\x08\x9a\x88\xe3\x05\xde\x18\x62\x23\x24\x44\x95\x93\x1c\xc7\xc0\xd7\xa1\x07\x17\x9e\xc7\x12\x2a\xf7\xd8\xa6\x64\x52\x02\x86\xc0\x19\x44\x8b\xf7\x1d\xea\x31\x23\xa1\xb7\xf9\xb0\x6e\xcc\x41\xe2\x9c\xd3\x90\xf9\x63\xf0\x12\x1e\xca\xcd\x50\x8f\x97\x30\x4b\xa9\xc6\x3c\x5c\x87\x04\x96\xe0\x1b\xb1\x88\x2b\x22\x06\x4f\xa1\xec\xc0\x4d\x24\x79\x02\x15\x84\x30\x21\xec\x71\x98\xc3\x4d\xe1\x61\x82\xa5\x16\xa1\x88\x00\x7e\x1b\xc7\x78\x1e\x92\x50\x86\x90\xe9\xd1\x40\xd5\x7f\x55\x2b\x08\xad\x19\x49\xa2\x43\x60\xc0\x84\xec\x83\x7c\x64\x7c\xb5\xa5\xa4\x60\x43\xc6\xe5\x16\x35\x0a\x69\x13\xd5\xf5\x17\x84\x22\xfc\xd4\x44\xbf\x9c\x9f\x9f\x9d\x67\xa8\x57\xc3\xf6\xfe\xd4\xab\xce\xf6\x3b\x4f\xe8\x85\x70\x04\xf0\x94\x14\x4f\x08\x34\x51\xd5\x56\xd0\x0b\xba\x51\x02\x08\xb8\x09\x69\xf2\x74\x7a\x3c\x89\x63\x02\x11\x50\x89\x49\x97\xb3\x24\x16\x27\x51\x17\x42\x23\x9c\x18\x57\x3b\xf7\xf5\xab\x81\xc2\x05\xc2\xd4\x47\xb5\x36\x49\x84\x04\x5e\xbb\xcd\xb6\xa6\x76\xa3\x6d\x0f\xfd\x03\x7e\x43\xff\x08\xa9\x0f\x4f\xa7\x71\xaa\x7a\xf7\x6a\x3e\xac\x3f\xac\x92\x39\x70\x0a\x12\xc4\x90\xb3\x75\xe8\x03\xaf\xfe\x13\x55\x07\x43\xb3\x3f\xbe\xbc\xb2\x26\xd5\x7f\xa2\x6f\xdf\xf6\x2c\x46\x64\x96\x51\x63\x31\x50\x11\x84\x0b\x59\x0b\xd9\x87\x82\x95\xa6\xc3\x6d\x46\x25\x3c\xc9\x36\xa3\x42\x72\x1c\x52\x29\x5e\x62\x44\xc2\xf3\x94\x29\x50\xca\xa4\xb6\x8e\x4c\x59\x21\xf5\x48\xe2\x43\x8d\x03\x01\x2c\x60\x9f\x75\x38\x8f\x0c\x8f\xb0\xc4\xcf\xfc\xca\x6f\xa2\xaa\xda\xbe\xea\xf7\xa7\x0a\x20\x8b\x7c\x96\x11\x84\xcb\xc0\xc0\x6b\x1c\x92\xd4\x00\x37\xaf\xa0\x13\xd2\x25\x01\x83\x32\x1f\x0c\x1f\xd6\x40\x58\x0c\x7c\x6f\xfa\x4e\xcd\x0a\xdf\x07\xe1\xf1\x30\x4e\xed\xff\xa7\xdd\xfa\x53\x27\x10\x08\x7b\x1e\x08\x81\x24\x53\x00\x54\x1c\xa7\xbe\xb6\xd1\xcc\x96\x17\x80\x65\xc2\x41\x68\xb8\x0c\x00\x65\x92\xab\x99\x3c\xa1\x08\xab\x91\x0d\x4a\x04\xf0\x9f\xf5\xa7\xa5\x32\xb0\xf4\x63\x66\x6d\x3f\xeb\xb9\x8f\xa1\x0c\x32\x9a\x6a\x6c\x6c\x6a\xa3\xd6\x31\x0b\x9e\x64\x0d\xa1\xe9\x85\xdd\xbf\xea\x77\x9b\x48\x06\xa1\x40\xa1\xd0\xdc\x22\x26\x24\xe2\x40\xf0\x13\xf8\x68\xdc\x6e\x6b\x52\x22\x60\x09\xf1\xd1\x1c\x14\x5b\x3f\x23\xca\x28\xd9\xa0\x05\xe3\xc8\x4b\x2d\x12\x61\x3f\x0a\x69\xa8\x4c\x43\x29\xa1\x86\xba\x1c\x53\xa9\xc5\x40\x1e\x4e\x34\xec\xa7\xd4\x0f\xca\xf4\xed\x71\xc0\x12\x0c\x45\xb5\xa0\xe5\x62\xf0\xe5\x10\x1b\x2a\x28\x10\x86\x95\x3d\x94\x19\x5a\xb5\xa2\xb5\x7d\xc9\x84\xec\x84\xdc\xd5\xd1\x65\x48\x92\x65\x98\xc7\xa4\xed\xf0\x2e\x42\x6c\x41\xfb\x31\x67\x0b\xde\xc5\x8e\x1d\x48\x47\xa2\x02\xf0\x74\x10\xdc\x1f\xf6\x95\x0b\xe1\x90\x2a\x4b\xda\x0d\x1f\x46\x48\x03\xfd\xf4\xaf\x9f\xf2\x21\x87\x0a\xbc\x80\xf1\x46\x78\x92\x6c\xc7\x7c\x58\xe0\x84\xc8\x0b\x7f\x7f\x26\xa2\x09\x21\x95\x42\xcc\x91\x9b\x18\x9a\x28\x0f\x38\x95\x65\x16\xac\x8c\x2c\xaf\x34\xb3\xad\x33\xf4\xd6\x89\x1d\x5c\x59\x7d\xe1\x6b\x84\x15\x96\xa8\xc4\x3c\x64\x5c\x7b\x91\x66\xc4\x01\xfb\x03\x4a\x36\x36\x63\xd2\x0a\x09\x64\xd8\x68\x81\x89\x80\x0a\x87\xdf\x92\x90\x83\xdf\xe1\x2c\x2e\x91\x72\x2f\x0c\x1f\xc8\x99\x05\xe0\x2c\xde\x94\x22\x78\x1e\x8b\xe2\x21\x67\x0b\xc5\x37\x57\x4b\x79\x60\x3e\x98\xab\x3c\xa7\xa8\x03\x91\xe6\x60\x9c\xe6\xe0\x66\x31\xb5\x36\x33\x3d\xbf\x0c\x79\x97\xab\x5f\x84\x1e\xd2\x25\x07\x21\x0c\xba\x0c\xe9\xd3\x1b\xa6\xe8\x4d\x13\x2a\x80\xbf\x6c\xf2\x12\x4b\x58\x01\xc4\xf9\x76\xbf\x7a\x56\x12\xfb\xca\x43\xb7\x65\x88\xa1\x9d\xf3\x3b\x64\x42\xba\xe0\xb8\x99\xfb\x2a\x8b\x40\x06\x90\x08\x03\xfb\x38\x96\xc0\xdf\x38\x99\x00\x97\x79\xc1\xf5\x26\x0a\x01\x90\xc8\x80\xa7\x98\xf1\x37\x0b\xa1\xa2\xbf\x21\xa4\xd2\x48\x04\x92\x87\x9e\x78\x1b\x9d\x6c\xb2\xa1\xe6\xbc\x55\x96\x57\xcc\x7d\x99\x45\xa7\xb8\x2f\x35\xe8\x13\x52\xe9\xd4\xb9\x55\xf2\xb6\xd4\x4b\x5d\x35\x2f\x7d\x80\xfa\x87\xd5\x08\x9f\x63\xaf\x86\x13\x19\x30\x1e\x7e\x49\x73\xc9\xea\x57\xb1\x57\x91\x64\x45\x90\xcd\x08\x9c\x2a\x41\x9a\xb9\x81\xa8\xaa\x4b\xb3\xc5\x71\xb8\x0b\x0a\xa9\x14\x2a\xa9\x08\x96\x70\x0f\xf6\x80\x6b\xe0\xf3\x02\xc0\x40\x94\x51\x3b\x43\x74\xec\x9b\xe7\x71\x0f\xd8\x64\x21\xb6\xb6\x2d\xcf\x8e\x99\x6e\x3d\x4a\xec\xd3\x4b\x53\xa2\xfe\xe8\x03\x81\xec\xe3\x12\xa4\xfe\x97\x84\x22\xfd\x10\x63\xe9\x05\xfa\x53\xea\xa1\xfa\xe3\xa3\x06\xfe\x3e\x69\x3e\x28\xf3\x4e\x0e\x84\xca\xd9\x1f\x71\x7d\x0b\x2f\x89\xc5\x8a\x80\xfc\x21\xd6\x9d\xcb\xf2\x3e\xab\xfe\x61\x96\xfc\xda\xf5\x1e\x1c\x36\x5f\xe7\xac\xad\x90\xfa\x21\x5d\x9e\xf4\xd9\xbd\xd4\x93\x39\xb0\xc1\x19\x81\x79\x36\x51\x7d\xb6\x61\xa1\xe6\xe5\xcb\x7d\x46\x86\x0a\x42\xc7\xf1\xa2\x3c\x4a\x88\x64\xfe\x00\x9e\xd4\x81\xa2\xf4\x6c\xfe\xaa\x13\xf9\xf3\x24\xf2\x18\xfc\xf2\x23\xfd\x1f\x14\x12\x63\xce\x9e\x36\x5a\x9f\x27\xa3\xa2\x62\x02\x54\x86\xde\x81\x1e\x0f\x2d\x87\xad\x80\x72\x58\x87\xf0\x58\x6e\xc9\xa5\x84\x4b\xf6\xe7\x80\x6e\xb6\x0d\xe9\x61\xe9\x59\xfa\xef\x67\x87\x3b\xad\xe5\x56\x78\x7a\xe3\xfe\x70\xfb\x2c\x6c\xd9\x8f\x6d\xa2\xc2\x0b\xc0\x4f\x48\x48\x97\x05\xc5\xef\x1d\x8a\x27\xea\x98\x99\x1f\x21\x90\x47\xb0\x10\x07\x27\x4b\x7d\x9c\xd4\x5c\x50\x56\x68\xa0\x98\xf9\x42\x1f\x35\x6b\x79\x23\x2b\x23\xd0\x56\xf3\x4f\xf6\x1f\xf2\x83\x8d\xc7\x43\x65\xcb\xa4\xb2\xc6\x24\x81\x26\x6a\xd4\xf3\xbf\xb7\x58\xd0\xb3\xce\x45\x00\xfb\xc0\x0d\x20\xe0\xa9\xc9\xe9\x9e\x3d\x63\x29\x27\x1c\xb0\x5a\x3d\xf6\x0a\x8f\xd1\x45\xb8\x8c\x70\x7c\x22\x4a\x6f\xf3\xc3\xe3\x36\x5c\x17\x12\x4a\x21\x55\xec\xc2\x79\x96\x65\x5e\xc9\xfe\xd9\x5c\x71\xc4\xe7\x45\xc4\x61\x0d\x54\xfe\x61\x3e\xfe\x12\xe7\x2e\xdb\xa8\x3f\xcd\xb3\x4b\x5c\xba\xd4\x50\x7e\x6c\xe7\xc6\x71\x08\x4f\x12\xa8\xfa\x26\x8e\x03\x6b\x22\x24\x8b\xf2\x02\xb9\x03\x8b\x90\x86\x6a\x65\x25\x3b\xb0\x2b\x2e\x6b\xc7\xf5\x49\xde\x6a\xf6\x18\x5d\x67\x9c\x75\xe3\x47\xb7\x94\x60\xb9\x69\xa2\x3e\xa3\x4a\x9b\xcb\x54\xfb\x65\x15\x8e\x66\x90\x4e\x3b\x6c\xea\x2b\x98\xf2\x94\xeb\x7d\xf8\x4d\x98\xf5\xde\x62\x92\x70\x4c\x9a\xfb\xe5\x38\x52\x21\x8a\xcb\x3e\x2e\xb4\xa9\x39\xcd\x46\x42\xba\x4c\x08\xe6\x85\x29\x15\x84\x84\xc7\x62\x28\xd0\xf7\x53\xdb\x16\x79\xeb\xd3\xc8\x54\xb1\xfe\x98\x12\x51\x67\xb7\x5d\x4f\x5d\xad\x96\x71\xbc\x84\x22\xc4\x0b\x20\xc2\xcd\xbc\xef\x16\x03\xbd\x18\x5e\xb9\x67\xe3\x3d\x30\x42\x31\x67\x31\xf0\x5d\x93\x3d\xeb\xfd\xed\xb6\xb1\x00\xcd\xbb\x22\x42\xf2\xd4\xec\xf3\x3f\xad\xb4\x97\x20\x16\xf7\xf6\x10\x99\x69\x5b\x2e\x0c\xe4\x3b\xfb\x5d\x44\x84\x9e\x8c\x5d\x5f\xd5\x88\x39\x68\xfd\x18\x09\x5d\x51\xf6\x48\x8d\x45\x08\xc4\x17\x05\xdd\x64\xf4\x75\x58\xfa\xf3\x38\x1c\xd1\x12\xc9\x7c\x2f\x8e\x15\x84\x40\x5f\xbf\x55\x76\xf2\xa8\x4a\x26\x96\xe0\xf7\x0f\xed\xb2\x5a\xdd\x33\x3a\xfd\xd5\x63\xd4\x0f\xd3\x1e\x39\xfa\xcf\x7f\x2b\xa9\x2d\x80\xef\xe6\xd6\xa3\x80\x7f\x9a\x6b\xe6\xe7\x9f\xf7\x72\xcc\x49\xca\xef\xc0\x2d\x33\xe8\x91\x53\x16\x4e\x8a\xa5\x2e\x29\xc9\x81\x4b\xca\x2d\xf9\xbf\x1d\xf2\x6f\x87\xfc\xab\x3a\xe4\xbb\x7a\x63\x89\x2b\x96\xfa\xe1\x69\x27\x2c\xf1\xc1\xbf\x1d\xf0\x6f\x07\x7c\x5f\x07\x3c\x7c\x5d\xb1\xe7\x5a\x47\xf7\xd0\xbb\x86\xb5\xf2\xd3\x98\x71\xd9\x44\xd5\x5f\x3f\x7d\x3a\xab\x96\x0c\x6b\xbb\x83\x26\x0a\xa4\x8c\x45\xe9\x38\xc7\x4a\x2f\xa5\xf7\x97\x2f\x7f\x3c\x72\x3c\xb4\x77\x4d\x10\x7a\xcf\x1d\x2c\xb7\x0f\x36\xf2\xe7\x12\xb9\x7b\x15\x84\xd6\xab\x54\x8b\xd4\x5f\x25\xe6\x4b\xd0\x97\x9a\x3b\x24\xa1\x8f\x27\x8c\xbf\x54\xf4\xe3\x28\x18\x8b\x5d\xd4\xeb\x40\x4c\xd8\x26\x82\xd2\x37\x2e\x27\x15\x51\xb6\xba\xd7\xab\x54\x39\x7c\x5c\xdb\xbf\xac\xcf\xdf\x07\xcc\x37\x4d\x74\x09\x24\x2a\x33\x0c\x25\x68\x2d\x00\x12\xd5\x44\xf0\x21\xbb\xb2\x36\xf2\x40\x95\xde\x79\x3c\x8f\xf7\xdc\xe6\xec\xab\x37\x52\xc7\xe5\x9b\xc2\xba\x5e\xb6\x32\x0e\x31\x09\x3d\x2c\x9a\xa8\x51\x41\x48\x42\x14\x13\x2c\x61\x27\x7d\x31\x18\x91\x3d\xea\x2f\xd5\x5c\x31\x4a\xe1\x85\xce\x55\x9b\x1d\x0d\xca\x7c\xb8\x38\x82\x2a\xb9\xb2\x9b\xdf\x44\x45\xc8\xf1\xb6\x31\x74\xb5\xa4\x6c\x0b\x36\x9f\xc0\xd3\x8f\x02\xf6\x63\x94\xa2\x39\xce\x94\x33\x01\x1e\x1d\x84\x30\xfd\xf4\x47\x69\xcb\x7c\x52\x71\x4a\xec\xb6\xeb\x10\x6b\x05\x9b\xe6\xc1\x13\x0d\x26\x4a\x30\x75\xfa\xe0\x58\xed\x05\xba\xa2\xa5\x08\xba\x77\x54\xca\x26\x65\x45\x42\x9a\x3c\xbd\x54\x08\xcc\xbd\xe0\xcf\x11\x03\x47\xfe\x2f\x9f\x2a\x79\xe6\x2b\x74\xc9\xfa\xcf\x35\xc6\xb2\x48\xbd\xd7\x29\xe8\x1f\x75\x1a\x72\x93\xd1\x6f\x17\xb6\x32\x18\xc8\x63\x51\x84\x8b\xf9\xd1\x40\x1f\x8a\x06\xa4\x0d\x87\x2f\x45\x11\xc1\x30\x80\xe2\x39\x01\xe3\xa0\x11\xb2\x45\x09\x23\x9d\xed\xab\x5f\xbf\xa2\x5a\x87\x3d\x52\xc2\xb0\xdf\xc1\x12\xd7\xda\x5b\x2b\xbd\x52\x28\xe8\xdb\xb7\xea\xce\x18\xb5\xcc\x87\xbc\x8f\x52\x52\x5a\xe2\x44\xa1\x3c\x50\xa4\x17\x27\x4d\xf4\xf1\xbc\x1e\xed\x41\x23\x88\x18\xdf\x34\x51\xe3\xe3\xaf\xb7\xe1\x81\x85\x83\x78\x3b\x0d\x09\x3c\x0a\xa9\x8e\x36\x5d\x8e\x3d\x18\x02\x0f\xf5\x03\x3d\x46\x55\xa6\x6d\xd4\x4f\x27\xb5\xb6\x6e\xc6\xdd\xe2\xb8\x3c\x92\x52\xed\x39\x46\xda\xb2\x7b\x71\x1c\xfd\x81\x22\x64\x25\x5f\x52\x16\x92\x2e\x7c\x9f\x3f\x63\x0b\x6a\x38\xb3\x03\x1c\x87\xa7\x90\x2f\x86\x57\x05\x44\x7d\x79\x91\xa1\xe5\xcf\xe9\xc6\x31\x78\xf9\x97\x94\x7e\xfa\x79\xac\xeb\x96\xda\x44\x4d\xd1\xd3\xdf\xb4\x31\x69\x17\xff\xaf\xbb\x29\xf9\x6a\x54\x75\x30\x54\x6b\xd1\xda\x0b\x17\x07\xfa\xd3\x43\xa9\x1e\xbe\x7d\xfb\xfa\x15\x3d\x87\x50\x33\x75\x10\xf0\x91\xc2\x34\x9e\xc1\xbb\xcc\x79\x22\x43\xa1\x02\xf5\xb7\xff\x54\x33\x91\xc4\xff\x85\x4c\xe2\x19\xa1\x28\x7b\x6f\x89\xfa\xec\x19\x71\xb4\xf9\x5d\x24\x32\x78\x47\x81\xba\x20\x87\x39\xdb\x6d\x77\xbc\x5c\xbc\x39\x63\x52\x1d\x5e\xe3\xf6\xc5\x3b\x0a\xd8\xda\x71\x2d\x17\x4b\x3f\xc0\xbb\xa2\xfa\x71\x2c\x6c\xb1\xff\x50\x09\xd1\xf3\x22\x5e\x94\x4a\x50\x26\xed\xef\x28\xbf\xb3\xba\x20\x4f\x1d\x7f\xc5\xf0\xf4\xe2\xaa\x1a\xc7\x71\xd9\x82\x7f\x4f\x21\x7d\x82\xe4\xdf\xb5\xf3\x5f\xb6\x76\xfe\x7e\x71\xf6\xbe\x35\xf6\x41\x6d\xf7\xa2\x32\x39\x45\x3d\xae\x92\xd3\x57\x78\xb7\x4a\x80\xbd\x9a\xfc\x64\xfd\xb8\xad\x62\xd5\x94\x21\x56\x29\xe4\x03\x48\xef\xc3\x01\x02\xd0\xf5\x31\xb9\xe1\xa0\xf3\xb9\x7f\x71\x6b\x56\x0e\xf6\xc1\xe2\x2c\xda\xdf\x0a\xdd\x62\xca\x6e\x57\x8f\xe0\x29\xd7\xdc\x0f\x6b\x8a\xf6\x49\x56\xe3\xe1\x45\xfb\x4f\xe0\xb7\xbb\x40\x2c\x32\xbd\x9c\x4c\x86\x9f\x87\xf6\xe0\xee\xfe\xfb\x1c\xbd\xbc\x3a\xbc\x86\x4d\x09\xe3\xd2\x32\xb1\xf8\xa7\xbd\x61\x5b\x7e\x55\x0e\xcd\x5f\x19\xab\x6e\xcf\x16\x7b\x74\x45\x39\xc7\xef\x2e\xa8\x78\x83\xa4\xfd\xc1\xbb\x8a\x99\x95\x69\xaf\x93\xb1\x35\x18\x4c\xc6\x13\xfb\x62\xf8\xb9\x7d\xf1\xb9\x6d\xda\x93\x77\x12\xb6\x50\x25\xbd\x4e\xe0\x8b\x9b\x9b\xc1\xf4\xf3\x55\x7f\x6c\xb6\x1d\xdb\xfc\xbc\x95\xff\x9d\xe4\x2e\x2f\xa3\x9e\x5d\x82\x06\x1d\xfb\xb8\x66\xb4\x57\x4f\xbe\xd3\x12\xb6\xf5\xf3\xcb\x14\x4f\xc2\x35\x50\x10\xca\x01\xe6\x50\xe4\xa8\xdc\xa2\x0b\x72\x5f\x88\x38\x0d\xaa\x01\x60\x22\x83\x2f\xfb\x43\x69\x9f\xb6\xfe\x6b\x7d\x0f\x9c\x77\xa1\x95\x5f\x17\x06\xf4\x4d\x12\x26\x1d\x20\x78\xb3\xcd\x56\xff\x2e\x4e\x8d\xf7\x33\xd9\x59\x71\x4c\x86\x11\xb0\x44\x1e\xa7\x39\x1d\x17\x71\x48\x12\x0e\x93\x80\x83\x08\x18\xf1\x9b\xe8\xac\x52\x4c\x28\xa7\xb3\xd5\xa1\x56\xb7\xfb\x51\x54\xc2\x89\x39\xaf\x6a\xec\x17\x8b\x59\x9f\x87\x0b\xf9\xff\xa7\x90\x3d\x51\x62\xc6\xc5\xdf\x43\xc6\x9c\x49\xe6\x31\xd2\x44\x93\x76\x6e\x14\x5b\xf3\x69\xe4\x95\x4d\xa1\xd1\xaf\xc1\x47\xc7\x86\xfc\x27\x25\x1c\x96\xbb\x5f\x72\x1d\xde\x61\xba\x98\x84\x3e\x96\x21\x5d\x4e\x61\x1e\x30\xb6\x4a\x8f\x2b\x49\x8a\x5e\xb2\x2b\xd5\xc2\xb6\x18\xeb\x74\xf6\xd1\xf5\xc8\x0f\xb4\x0d\x8f\xe9\xb2\xf6\x6e\x4f\xf2\xdf\x57\xaa\x35\xd4\x8a\x6b\x48\x7f\xd7\x59\xf0\x80\xdd\xa3\x37\xf4\x9f\xea\xbf\xaa\xff\xad\x1c\x5f\x3c\x1e\x0d\xa5\x05\x6c\xd9\xc8\xae\x83\xa9\x06\x3e\x14\x87\xb2\x7b\xd5\xf4\x57\xb3\x08\x79\x24\x04\x2a\xd3\xbd\xd8\x5e\x23\xe0\x56\x42\x7d\x02\x4d\x74\x33\xae\xcb\x9b\x71\xa3\x6d\x3b\x7e\x6f\x12\xb6\x3a\xb6\xdb\x73\xc6\xce\xac\x37\xaa\x5b\x8e\xad\xc7\xea\xb2\xbd\x6a\xf4\xc6\x4e\xbf\xed\x9a\xfd\xce\x68\x6a\x9d\xcf\xea\xd6\xd9\xd8\xe9\xb5\x66\x75\xe2\xce\x2e\x2f\xea\x03\xcb\xfa\x65\xe2\xba\x37\xa3\xa9\xd5\xf1\xce\x48\xef\xb6\x1e\xcc\x6e\xea\x33\x67\x7e\xd7\xfa\x04\xab\x19\xf7\xeb\x7d\x3a\x75\xc8\xcd\xbc\x11\xf7\x20\x62\x8f\xb6\x63\x9d\x8d\xef\xbc\xeb\xa9\x6b\x5b\x13\xb3\xd1\xc2\x75\xbf\x75\xeb\xba\xd6\x28\x0a\xfa\xa3\xc6\x6c\x3a\xb9\x0b\x3a\xb0\xb2\xae\x47\x91\x3f\x70\x57\xbd\xd6\xac\x61\xb7\x70\xfd\xbc\x3d\x71\x7b\x3d\xbf\xee\xb6\xa6\x8e\x3d\x75\x5c\xeb\xca\xbe\xf3\x85\xdb\xb5\xef\xfa\x77\x2e\x99\x5a\x31\xbb\x5f\xf9\x2e\x5c\xc4\x5d\xbc\xb2\xdc\x7c\xee\xbc\x61\x9b\xee\x2a\x66\xd3\xa8\xd1\xed\x3b\xa4\x3b\x79\x70\x1f\x6e\x1b\x3d\x71\x4f\x82\x3e\x98\xbe\x33\x72\x83\xf6\xac\x7e\x3e\x1d\xad\xac\xfe\xc4\x71\xbb\xe3\x28\xc0\x73\xe7\xbe\x31\xed\x58\xab\xb9\x45\x24\xbe\x9c\x85\xb7\xd4\x8e\xda\xc4\x7c\xb4\xef\xfc\x2b\xdc\xed\x0f\x26\xd3\xb8\x05\x66\xc3\xb1\x27\x6e\xdf\x36\xc9\xa7\x09\xb1\x5b\x7e\xc3\x67\xf7\xf5\xf3\x3e\x26\xee\xa7\x89\x6b\x5b\x7d\xb3\x61\x8e\xef\x82\x81\x6b\x5a\x67\xee\xc7\xb8\x8d\xcd\x86\xed\x9d\xf9\x1d\xc7\x25\xa6\x4b\x2c\xdb\xae\xbb\x67\x63\x72\x7f\xed\xde\xc5\xfb\x3a\xa8\xf7\xfa\xa3\x86\xe2\x15\x58\x78\x65\xd9\xf9\x3a\xee\x1b\x76\xc7\x5d\x7d\x7a\xba\x8f\xea\x8d\xfe\xd4\x96\x36\xed\x63\xd7\x74\xef\x26\x4e\xcf\xb6\xeb\xe6\x93\xeb\xb8\x1d\x6c\x36\x06\xee\xb4\xd1\x9d\x8f\xe2\xd9\xb4\x2b\xa9\x3b\xe9\x0b\x88\xec\x4b\x97\xda\x0f\xb0\x72\xf1\xc4\xe9\x3d\x64\xb8\x2d\xff\xcc\xb7\x35\xae\x4b\xee\xe7\xdd\xd9\xf4\x96\xcc\xe2\x7b\xc7\x3b\xf7\x23\xf3\x69\xe0\xd8\xb6\x6b\xf6\x14\x7e\xdf\xae\xf7\xce\x3d\xc7\x9f\x4c\x26\xa3\xf3\xf6\xca\xa2\xb6\xe3\x77\x46\x67\xd6\xa5\x53\xaf\xd7\x07\x8e\x75\x66\x3b\x41\xeb\xd6\x24\xad\xd1\xaa\x77\x3d\xb3\x5a\x4f\xd7\xf5\x59\x30\x9d\xb4\x7e\xb9\x6e\xb4\x6e\x9d\x46\x20\xe6\x91\x77\xee\x99\xd6\xdd\xf4\xce\xd9\xe0\xce\xec\x1e\xba\x44\x38\x34\x78\xc0\xdd\xd9\x95\x7b\x19\x5f\x3a\x8d\xd1\xf5\xec\xc1\x3e\xef\xaf\x66\x13\x7f\x35\xeb\xdf\x76\xfd\x4f\x33\x72\xb1\x76\xeb\xbf\xd6\xe7\x51\xef\x71\xe0\xf4\xbe\x8c\xcf\xdc\x70\x42\x5b\xb7\xf7\x2b\x42\x9c\xcb\x78\x78\xbf\x22\xc9\xc0\xb5\xa3\xdb\x28\xb6\xf1\xaa\xd7\x9a\x38\x66\x5d\xaf\x6b\x6a\x9b\x7e\xdd\x6d\xdf\x9c\xf9\xb6\x3d\x8a\x5b\x7e\x9d\xb4\x47\x51\xdc\x72\xcc\x1e\x9d\x90\xd9\x95\xb3\x6a\xb4\x47\xd3\xfb\x4f\xb6\xd3\x73\x46\x8e\xdd\x72\x9c\xe5\x7a\xe2\x5c\x3d\xe6\x73\x67\x0d\xeb\x6e\xb4\xea\x8d\xfd\x8f\xe7\xbf\x79\xab\xc6\xf8\xde\xb5\x1f\x26\x97\xb1\xd3\x9f\xb2\x27\x6c\x9e\x37\x5c\xa7\xf7\xd0\xa6\x2d\x36\x9a\x5c\x7d\xc1\x2b\xeb\x66\x14\xf9\xd4\x9b\x06\x1c\xaf\xfe\x3d\x72\x5c\xcb\x1c\x4d\xfd\xc1\xd8\xb4\xcc\xd1\xca\x6d\x61\xc7\x12\xb7\x2e\x61\xf3\xbb\x40\x8c\xc8\xed\xb9\x17\xcd\x5a\x83\x69\xf0\xe8\x5b\x81\x73\xdb\x75\x36\xf3\x8f\x81\x83\x1f\x2c\x3e\xb8\x74\x1f\xe6\x77\xa3\x6b\x7c\x69\x3d\xb8\x5f\x5a\xc2\xe9\x2c\xbf\x38\x0e\xa1\x8e\x1b\x10\xc7\x71\x1a\xb6\xd3\x1b\x4d\x9d\xd5\xa3\x53\x3f\x37\x27\x5f\x66\xc2\x59\x9d\x0f\xc7\x1f\xeb\x8f\xa3\x87\x96\x33\xb7\x2c\x67\x6e\xca\x47\xbb\x61\xc7\xb7\x51\x70\xe7\x47\xfd\xd9\xfc\x4b\xfd\x3a\xf3\x69\x6b\xb2\x1a\x2d\x47\x75\x77\xec\x9a\xa4\x3b\x76\xfa\x2d\xd7\x74\xb4\x3f\xdf\x8c\xd8\xff\xec\x1f\x3e\x9b\x7b\xf7\x25\x59\xec\xab\x16\x83\xdf\xe1\x8d\x4a\x31\x76\xef\xc6\xd2\xa2\xa5\xfa\x41\x83\x03\xac\x42\x0c\x2f\x8c\xee\x27\x9e\x6d\x56\xb1\xf5\x83\xfe\x62\x0c\x5c\x37\xaa\x3f\xa3\x6a\xf6\x5f\x15\x64\xa1\x4d\x84\x3e\x98\x8b\x85\x7e\x0d\x9b\x3f\x65\xd9\x96\x20\xe9\x7f\x5e\xd0\x44\x69\x3f\xa4\x52\x5a\xb9\x54\xfe\x37\x00\x00\xff\xff\x80\xc9\x83\x15\xe2\x41\x00\x00"), - }, - } - fs["/"].(*vfsgenÛ°DirInfo).entries = []os.FileInfo{ - fs["/download.yaml"].(os.FileInfo), - } - - return fs -}() - -type vfsgenÛ°FS map[string]interface{} - -func (fs vfsgenÛ°FS) Open(path string) (http.File, error) { - path = pathpkg.Clean("/" + path) - f, ok := fs[path] - if !ok { - return nil, &os.PathError{Op: "open", Path: path, Err: os.ErrNotExist} - } - - switch f := f.(type) { - case *vfsgenÛ°CompressedFileInfo: - gr, err := gzip.NewReader(bytes.NewReader(f.compressedContent)) - if err != nil { - // This should never happen because we generate the gzip bytes such that they are always valid. - panic("unexpected error reading own gzip compressed bytes: " + err.Error()) - } - return &vfsgenÛ°CompressedFile{ - vfsgenÛ°CompressedFileInfo: f, - gr: gr, - }, nil - case *vfsgenÛ°DirInfo: - return &vfsgenÛ°Dir{ - vfsgenÛ°DirInfo: f, - }, nil - default: - // This should never happen because we generate only the above types. - panic(fmt.Sprintf("unexpected type %T", f)) - } -} - -// vfsgenÛ°CompressedFileInfo is a static definition of a gzip compressed file. -type vfsgenÛ°CompressedFileInfo struct { - name string - modTime time.Time - compressedContent []byte - uncompressedSize int64 -} - -func (f *vfsgenÛ°CompressedFileInfo) Readdir(count int) ([]os.FileInfo, error) { - return nil, fmt.Errorf("cannot Readdir from file %s", f.name) -} -func (f *vfsgenÛ°CompressedFileInfo) Stat() (os.FileInfo, error) { return f, nil } - -func (f *vfsgenÛ°CompressedFileInfo) GzipBytes() []byte { - return f.compressedContent -} - -func (f *vfsgenÛ°CompressedFileInfo) Name() string { return f.name } -func (f *vfsgenÛ°CompressedFileInfo) Size() int64 { return f.uncompressedSize } -func (f *vfsgenÛ°CompressedFileInfo) Mode() os.FileMode { return 0444 } -func (f *vfsgenÛ°CompressedFileInfo) ModTime() time.Time { return f.modTime } -func (f *vfsgenÛ°CompressedFileInfo) IsDir() bool { return false } -func (f *vfsgenÛ°CompressedFileInfo) Sys() interface{} { return nil } - -// vfsgenÛ°CompressedFile is an opened compressedFile instance. -type vfsgenÛ°CompressedFile struct { - *vfsgenÛ°CompressedFileInfo - gr *gzip.Reader - grPos int64 // Actual gr uncompressed position. - seekPos int64 // Seek uncompressed position. -} - -func (f *vfsgenÛ°CompressedFile) Read(p []byte) (n int, err error) { - if f.grPos > f.seekPos { - // Rewind to beginning. - err = f.gr.Reset(bytes.NewReader(f.compressedContent)) - if err != nil { - return 0, err - } - f.grPos = 0 - } - if f.grPos < f.seekPos { - // Fast-forward. - _, err = io.CopyN(ioutil.Discard, f.gr, f.seekPos-f.grPos) - if err != nil { - return 0, err - } - f.grPos = f.seekPos - } - n, err = f.gr.Read(p) - f.grPos += int64(n) - f.seekPos = f.grPos - return n, err -} -func (f *vfsgenÛ°CompressedFile) Seek(offset int64, whence int) (int64, error) { - switch whence { - case io.SeekStart: - f.seekPos = 0 + offset - case io.SeekCurrent: - f.seekPos += offset - case io.SeekEnd: - f.seekPos = f.uncompressedSize + offset - default: - panic(fmt.Errorf("invalid whence value: %v", whence)) - } - return f.seekPos, nil -} -func (f *vfsgenÛ°CompressedFile) Close() error { - return f.gr.Close() -} - -// vfsgenÛ°DirInfo is a static definition of a directory. -type vfsgenÛ°DirInfo struct { - name string - modTime time.Time - entries []os.FileInfo -} - -func (d *vfsgenÛ°DirInfo) Read([]byte) (int, error) { - return 0, fmt.Errorf("cannot Read from directory %s", d.name) -} -func (d *vfsgenÛ°DirInfo) Close() error { return nil } -func (d *vfsgenÛ°DirInfo) Stat() (os.FileInfo, error) { return d, nil } - -func (d *vfsgenÛ°DirInfo) Name() string { return d.name } -func (d *vfsgenÛ°DirInfo) Size() int64 { return 0 } -func (d *vfsgenÛ°DirInfo) Mode() os.FileMode { return 0755 | os.ModeDir } -func (d *vfsgenÛ°DirInfo) ModTime() time.Time { return d.modTime } -func (d *vfsgenÛ°DirInfo) IsDir() bool { return true } -func (d *vfsgenÛ°DirInfo) Sys() interface{} { return nil } - -// vfsgenÛ°Dir is an opened dir instance. -type vfsgenÛ°Dir struct { - *vfsgenÛ°DirInfo - pos int // Position within entries for Seek and Readdir. -} - -func (d *vfsgenÛ°Dir) Seek(offset int64, whence int) (int64, error) { - if offset == 0 && whence == io.SeekStart { - d.pos = 0 - return 0, nil - } - return 0, fmt.Errorf("unsupported Seek in directory %s", d.name) -} - -func (d *vfsgenÛ°Dir) Readdir(count int) ([]os.FileInfo, error) { - if d.pos >= len(d.entries) && count > 0 { - return nil, io.EOF - } - if count <= 0 || count > len(d.entries)-d.pos { - count = len(d.entries) - d.pos - } - e := d.entries[d.pos : d.pos+count] - d.pos += count - return e, nil -} diff --git a/components/cluster-scheduler/pkg/internal/models/clusternodes.go b/components/cluster-scheduler/pkg/internal/models/clusternodes.go deleted file mode 100644 index ebcfc50..0000000 --- a/components/cluster-scheduler/pkg/internal/models/clusternodes.go +++ /dev/null @@ -1,35 +0,0 @@ -package models - -import ( - "encoding/json" - "time" - - "github.com/google/uuid" - "github.com/uptrace/bun" -) - -type ClusterNodes struct { - bun.BaseModel `bun:"table:cluster_nodes,alias:clusternodes"` - - ID uuid.UUID `bun:"id,pk,type:uuid,default:uuid_generate_v4()"` - ClusterId uuid.UUID `bun:"cluster_id,type:uuid,notnull"` - OrganizationId uuid.UUID `bun:"organization_id,type:uuid,notnull"` - PartnerId uuid.UUID `bun:"partner_id,type:uuid,notnull"` - ProjectId uuid.UUID `bun:"project_id,type:uuid,notnull"` - Name string `bun:"name,notnull"` - DisplayName string `bun:"display_name,notnull"` - CreatedAt time.Time `bun:"created_at,notnull,default:current_timestamp"` - ModifiedAt time.Time `bun:"modified_at"` - DeletedAt time.Time `bun:"deleted_at"` - Labels json.RawMessage `bun:"labels,type:jsonb,notnull,default:'{}'"` - Annotations json.RawMessage `bun:"annotations,type:jsonb,notnull,default:'{}'"` - Unschedulable bool `bun:"unschedulable,notnull,default:false"` - Taints json.RawMessage `bun:"taints,type:jsonb,notnull,default:'{}'"` - Conditions json.RawMessage `bun:"conditions,type:jsonb,notnull,default:'{}'"` - NodeInfo json.RawMessage `bun:"node_info,type:jsonb,notnull,default:'{}'"` - State string `bun:"state,notnull"` - Capacity json.RawMessage `bun:"capacity,type:jsonb,notnull,default:'{}'"` - Allocatable json.RawMessage `bun:"allocatable,type:jsonb,notnull,default:'{}'"` - Allocated json.RawMessage `bun:"allocated,type:jsonb,notnull,default:'{}'"` - Ips json.RawMessage `bun:"ips,type:jsonb,notnull,default:'[]'"` -} diff --git a/components/cluster-scheduler/pkg/patch/status.go b/components/cluster-scheduler/pkg/patch/status.go index 3ca7358..8eda9da 100644 --- a/components/cluster-scheduler/pkg/patch/status.go +++ b/components/cluster-scheduler/pkg/patch/status.go @@ -5,6 +5,7 @@ import ( sp "github.com/RafaySystems/rcloud-base/components/common/pkg/controller/strategicpatch" infrav3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/infrapb/v3" + "github.com/RafaySystems/rcloud-base/components/common/proto/types/scheduler" ) type clusterConditions struct { @@ -74,3 +75,33 @@ func ClusterNodeStatus(existing, current *infrav3.ClusterNodeStatus) error { return nil } + +// NamespaceStatus patches existing namespace status with current +func NamespaceStatus(existing, current *scheduler.ClusterNamespaceStatus) error { + eb, err := json.Marshal(existing) + if err != nil { + return err + } + + cb, err := json.Marshal(current) + if err != nil { + return err + } + + pb, err := sp.CreateTwoWayMergePatch(eb, cb, (*scheduler.ClusterNamespaceStatus)(nil)) + if err != nil { + return err + } + + fb, err := sp.StrategicMergePatch(eb, pb, (*scheduler.ClusterNamespaceStatus)(nil)) + if err != nil { + return err + } + + err = json.Unmarshal(fb, existing) + if err != nil { + return err + } + + return nil +} diff --git a/components/cluster-scheduler/pkg/reconcile/cluster_conditions_reconciler.go b/components/cluster-scheduler/pkg/reconcile/cluster_conditions_reconciler.go new file mode 100644 index 0000000..9cebcfb --- /dev/null +++ b/components/cluster-scheduler/pkg/reconcile/cluster_conditions_reconciler.go @@ -0,0 +1,164 @@ +package reconcile + +import ( + "context" + "fmt" + + clstrutil "github.com/RafaySystems/rcloud-base/components/cluster-scheduler/internal/cluster" + "github.com/RafaySystems/rcloud-base/components/cluster-scheduler/internal/cluster/constants" + "github.com/RafaySystems/rcloud-base/components/cluster-scheduler/pkg/service" + "github.com/RafaySystems/rcloud-base/components/common/pkg/log" + infrav3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/infrapb/v3" +) + +var _log = log.GetLogger() + +const ( + _bpInprogress int = iota + _bpFailed +) + +type blueprintError struct { + errorType int + reason string +} + +func (e blueprintError) Error() string { + return e.reason +} + +type clusterConditionReconciler struct { + cs service.ClusterService + /*ps models.PlacementService*/ +} + +// ClusterConditionReconciler is the interface for reconciling cluster conditions +type ClusterConditionReconciler interface { + Reconcile(ctx context.Context, cluster *infrav3.Cluster) error +} + +// NewClusterConditionReconciler returns cluster condition reconciler +func NewClusterConditionReconciler(cs service.ClusterService) ClusterConditionReconciler { + return &clusterConditionReconciler{cs: cs} +} + +func (r *clusterConditionReconciler) Reconcile(ctx context.Context, cluster *infrav3.Cluster) error { + _log.Debugw("reconciling cluster conditions", "cluster", cluster.Metadata) + namespaceConditions, err := r.getNamespaceConditions(ctx, cluster) + if err != nil { + _log.Infow("unable to get namespace condition of cluster", "error", err, "cluster", cluster.Metadata) + return err + } + + /*TODO + auxillaryConditions, err := r.getAuxillaryCondition(ctx, cluster) + if err != nil { + _log.Infow("unable to get auxillary condition of cluster", "error", err, "cluster", cluster.Metadata) + return err + }*/ + + var conditions []*infrav3.ClusterCondition + conditions = append(conditions, namespaceConditions...) + + clusterStatus := &infrav3.Cluster{ + Metadata: cluster.Metadata, + Spec: &infrav3.ClusterSpec{ + ClusterData: &infrav3.ClusterData{ + ClusterStatus: &infrav3.ClusterStatus{ + Conditions: conditions, + }, + }, + }, + } + + if shouldUpdateClusterStatus(clusterStatus, cluster) { + err = r.cs.UpdateClusterConditionStatus(ctx, cluster) + if err != nil { + _log.Infow("unable to update cluster status", "error", err) + return err + } + + _log.Debugw("successfully reconciled cluster condition", "cluster", cluster.Metadata) + } + + return nil +} + +func mergeClusterConditions(conditions []infrav3.ClusterCondition) []infrav3.ClusterCondition { + condMap := map[infrav3.ClusterConditionType]infrav3.ClusterCondition{} + var retConditions []infrav3.ClusterCondition + + for _, cond := range conditions { + if ec, ok := condMap[cond.Type]; ok { + ec.Reason = ec.Reason + ", " + cond.Reason + condMap[cond.Type] = ec + } else { + condMap[cond.Type] = cond + } + } + + for _, cond := range condMap { + retConditions = append(retConditions, cond) + } + + return retConditions +} + +func shouldUpdateClusterStatus(current, modified *infrav3.Cluster) bool { + + // check if any of the modified conditions are different from + // current conditions + for _, modifiedCondition := range modified.Spec.ClusterData.ClusterStatus.Conditions { + for _, currentCondition := range current.Spec.ClusterData.ClusterStatus.Conditions { + if modifiedCondition.Type == currentCondition.Type { + if (modifiedCondition.Status != currentCondition.Status) || + (modifiedCondition.Reason != currentCondition.Reason) { + return true + } + } + } + } + + return false +} + +func (r *clusterConditionReconciler) getNamespaceConditions(ctx context.Context, cluster *infrav3.Cluster) ([]*infrav3.ClusterCondition, error) { + + var conditions []*infrav3.ClusterCondition + + cnl, err := r.cs.GetNamespaces(ctx, cluster.Metadata.Id) + if err != nil { + _log.Infow("unable to get namespaces ", "error", err, "cluster", cluster.Metadata) + return nil, err + } + ready := true + failed := false + failedReason := "" + for _, namespace := range cnl.Items { + + if clstrutil.IsNamespaceConvergeFailed(namespace) { + failed = true + failedReason = fmt.Sprintf("Namespace: %s, failed reason %s", namespace.Metadata.Name, clstrutil.NamespaceConvergeFailedReason(namespace)) + } else if clstrutil.IsNamespaceReadyFailed(namespace) { + failed = true + failedReason = fmt.Sprintf("Namespace: %s, failed reason %s", namespace.Metadata.Name, clstrutil.NamespaceReadyFailedReason(namespace)) + } + + if !clstrutil.IsNamespaceReady(namespace) { + ready = false + } + + } + + if len(cnl.Items) > 0 { + if failed { + conditions = append(conditions, clstrutil.NewClusterNamespaceSync(constants.Failed, failedReason)) + _log.Infow("cluster namespace sync failed", "cluster", cluster.Metadata) + } else if ready { + conditions = append(conditions, clstrutil.NewClusterNamespaceSync(constants.Success, "all namespaces synced")) + } + + } + + return conditions, nil +} diff --git a/components/cluster-scheduler/pkg/reconcile/cluster_handler.go b/components/cluster-scheduler/pkg/reconcile/cluster_handler.go new file mode 100644 index 0000000..1abc06e --- /dev/null +++ b/components/cluster-scheduler/pkg/reconcile/cluster_handler.go @@ -0,0 +1,214 @@ +package reconcile + +import ( + "context" + "time" + + "github.com/RafaySystems/rcloud-base/components/cluster-scheduler/pkg/service" + "github.com/RafaySystems/rcloud-base/components/common/pkg/event" + "github.com/RafaySystems/rcloud-base/components/common/pkg/query" + configrpc "github.com/RafaySystems/rcloud-base/components/common/proto/rpc/config" + sentryrpc "github.com/RafaySystems/rcloud-base/components/common/proto/rpc/sentry" + commonv3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/commonpb/v3" + infrav3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/infrapb/v3" + "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/client-go/util/workqueue" +) + +const ( + numClusterWorkers = 3 + clusterEventHandleDuration = time.Second * 10 +) + +// ClusterEventHandler is the interface for handling cluster events +type ClusterEventHandler interface { + // ClusterHook should be registred in cluster service to listen on + // Cluster create/update/delete + ClusterHook() event.Handler + + // ClusterWorkloadHook should be registered in cluster service to listen on + // Task/Namespace/Workload ready events + ClusterWorkloadHook() event.Handler + // AntiEntropyHook should be used to handle anti entropy for + // cluster + AntiEntropyHook() event.Handler + + // Handle runs the placement event handler + Handle(stop <-chan struct{}) +} + +type clusterEventHandler struct { + cs service.ClusterService + sp sentryrpc.SentryPool + cp configrpc.ConfigPool + + // cluster work queue + cwq workqueue.RateLimitingInterface + + // cluster workload work queue + wwq workqueue.RateLimitingInterface +} + +// NewClusterEventHandler returns new cluster event handler +func NewClusterEventHandler(cs service.ClusterService, sp sentryrpc.SentryPool, cp configrpc.ConfigPool) ClusterEventHandler { + return &clusterEventHandler{ + cs: cs, + sp: sp, + cp: cp, + cwq: workqueue.NewRateLimitingQueue(workqueue.DefaultItemBasedRateLimiter()), + wwq: workqueue.NewRateLimitingQueue(workqueue.DefaultItemBasedRateLimiter()), + } +} + +func (h *clusterEventHandler) ClusterHook() event.Handler { + return event.HandlerFuncs{ + OnChangeFunc: func(r event.Resource) { + h.cwq.Add(resourceToKey(r)) + }, + } +} + +func (h *clusterEventHandler) ClusterWorkloadHook() event.Handler { + return event.HandlerFuncs{ + OnChangeFunc: func(r event.Resource) { + h.wwq.Add(resourceToKey(r)) + }, + } +} + +func (h *clusterEventHandler) AntiEntropyHook() event.Handler { + return event.HandlerFuncs{ + OnChangeFunc: func(r event.Resource) { + h.cwq.Add(resourceToKey(r)) + }, + } +} + +func (h *clusterEventHandler) processNextCluster() bool { + item, shutdown := h.cwq.Get() + if shutdown { + return false + } + + defer h.cwq.Done(item) + + ev := keyToResource(item.(string)) + + h.handleClusterEvent(ev) + + return true +} + +func (h *clusterEventHandler) runClusterWorker() { + for h.processNextCluster() { + } +} + +func (h *clusterEventHandler) Handle(stop <-chan struct{}) { + + for i := 0; i < numClusterWorkers; i++ { + go wait.Until(h.runClusterWorker, time.Second, stop) + go wait.Until(h.runClusterWorkloadWorker, time.Second, stop) + } + + <-stop +} + +func (h *clusterEventHandler) processNextClusterWorkload() bool { + item, shutdown := h.wwq.Get() + if shutdown { + return false + } + + defer h.wwq.Done(item) + + ev := keyToResource(item.(string)) + + h.handleClusterWorkloadEvent(ev) + + return true +} + +func (h *clusterEventHandler) runClusterWorkloadWorker() { + for h.processNextClusterWorkload() { + } +} + +func (h *clusterEventHandler) handleClusterEvent(ev event.Resource) { + ctx, cancel := context.WithTimeout(context.Background(), clusterEventHandleDuration) + defer cancel() + + var cluster *infrav3.Cluster + var err error + + if ev.ID != "" { + cluster, err = h.cs.Select(ctx, &infrav3.Cluster{ + Metadata: &commonv3.Metadata{Id: ev.ID}, + }, true) + } else { + + cluster, err = h.cs.Get(ctx, + query.WithName(ev.Name), + query.WithPartnerID(ev.PartnerID), + query.WithOrganizationID(ev.OrganizationID), + ) + } + + if err != nil { + _log.Infow("unable to get cluster for event", "event", ev, "error", err) + return + } + + //Update back the Ids + cluster.Metadata.Project = ev.ProjectID + cluster.Metadata.Organization = ev.OrganizationID + cluster.Metadata.Partner = ev.PartnerID + cluster.Metadata.Id = ev.ID + + _log.Debugw("handling cluster reconcile", "cluster", cluster.Metadata, "event", ev, "cluster status", cluster.Spec.ClusterData.ClusterStatus) + + reconciler := NewClusterReconciler(h.cs, h.sp, h.cp) + err = reconciler.Reconcile(ctx, cluster) + if err != nil { + _log.Infow("unable to reconcile cluster", "error", err, "event", "ev") + return + } + _log.Debugw("successfully reconciled cluster for event", "event", ev) +} + +func (h *clusterEventHandler) handleClusterWorkloadEvent(ev event.Resource) { + + ctx, cancel := context.WithTimeout(context.Background(), clusterEventHandleDuration) + defer cancel() + + var cluster *infrav3.Cluster + var err error + + if ev.ID != "" { + cluster, err = h.cs.Select(ctx, &infrav3.Cluster{ + Metadata: &commonv3.Metadata{Id: ev.ID}, + }, true) + } else { + cluster, err = h.cs.Get(ctx, + query.WithName(ev.Name), + query.WithPartnerID(ev.PartnerID), + query.WithOrganizationID(ev.OrganizationID), + query.WithProjectID(ev.ProjectID), + ) + } + + if err != nil { + _log.Infow("unable to get cluster for event", "event", ev, "error", err) + return + } + + _log.Debugw("handling cluster reconcile", "cluster", cluster.Metadata, "event", ev) + + reconciler := NewClusterConditionReconciler(h.cs) + err = reconciler.Reconcile(ctx, cluster) + if err != nil { + _log.Infow("unable to reconcile cluster workload event", "error", err, "event", "ev") + return + } + _log.Debugw("successfully reconciled cluster workload event", "event", ev) +} diff --git a/components/cluster-scheduler/pkg/reconcile/cluster_reconciler.go b/components/cluster-scheduler/pkg/reconcile/cluster_reconciler.go new file mode 100644 index 0000000..47aa6b3 --- /dev/null +++ b/components/cluster-scheduler/pkg/reconcile/cluster_reconciler.go @@ -0,0 +1,201 @@ +package reconcile + +import ( + "context" + "fmt" + "time" + + clstrutil "github.com/RafaySystems/rcloud-base/components/cluster-scheduler/internal/cluster" + "github.com/RafaySystems/rcloud-base/components/cluster-scheduler/internal/cluster/constants" + bootstrapagent "github.com/RafaySystems/rcloud-base/components/cluster-scheduler/pkg/bootstrapper/agent" + "github.com/RafaySystems/rcloud-base/components/cluster-scheduler/pkg/service" + infrav3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/infrapb/v3" + + "github.com/RafaySystems/rcloud-base/components/common/pkg/query" + configrpc "github.com/RafaySystems/rcloud-base/components/common/proto/rpc/config" + sentryrpc "github.com/RafaySystems/rcloud-base/components/common/proto/rpc/sentry" + "github.com/pkg/errors" +) + +const ( + clusterCoolDown = time.Minute +) + +// ClusterReconciler reconciles cluster state +type ClusterReconciler interface { + Reconcile(ctx context.Context, cluster *infrav3.Cluster) error +} + +type clusterReconciler struct { + cs service.ClusterService + sp sentryrpc.SentryPool + cp configrpc.ConfigPool +} + +// NewClusterReconciler returns new cluster reconciler +func NewClusterReconciler(cs service.ClusterService, sp sentryrpc.SentryPool, cp configrpc.ConfigPool) ClusterReconciler { + return &clusterReconciler{cs: cs, sp: sp, cp: cp} +} + +func (r *clusterReconciler) Reconcile(ctx context.Context, cluster *infrav3.Cluster) error { + + switch { + case canReconcileClusterDelete(cluster): + return r.handleClusterDelete(ctx, cluster) + case canReconcileClusterBootstrapAgent(cluster): + return r.handleClusterBootstrapAgent(ctx, cluster) + default: + return nil + } +} + +func canReconcileClusterDelete(c *infrav3.Cluster) bool { + switch { + case clstrutil.IsClusterDeletePending(c): + return true + case clstrutil.IsClusterDeleteRetry(c) && clstrutil.IsClusterDeleteCooledDown(c, clusterCoolDown): + return true + default: + return false + } +} + +func canReconcileClusterBootstrapAgent(c *infrav3.Cluster) bool { + switch { + case clstrutil.IsClusterBootstrapAgentPending(c): + return true + case clstrutil.IsClusterBootstrapAgentRetry(c) && clstrutil.IsClusterBootstrapAgentCooledDown(c, clusterCoolDown): + return true + default: + return false + } +} + +func (r *clusterReconciler) handleClusterDelete(ctx context.Context, cluster *infrav3.Cluster) error { + _log.Infow("handling cluster delete", "cluster.Name", cluster.Metadata.Name) + try := func() error { + _log.Debugw("no relay networks to disassociate", "cluster name", cluster.Metadata.Name) + return nil + } + + onSuccess := func() error { + ctx, cancel := context.WithTimeout(context.Background(), time.Second*10) + defer cancel() + + err := r.cs.UpdateStatus(ctx, &infrav3.Cluster{ + Metadata: cluster.Metadata, + Spec: &infrav3.ClusterSpec{ + ClusterData: &infrav3.ClusterData{ + ClusterStatus: &infrav3.ClusterStatus{ + Conditions: []*infrav3.ClusterCondition{ + clstrutil.NewClusterDelete(constants.Success, "cluster deleted")}, + }, + }, + }, + }, query.WithMeta(cluster.Metadata)) + return err + } + + onFailure := func(reason string) error { + ctx, cancel := context.WithTimeout(context.Background(), time.Second*10) + defer cancel() + + err := r.cs.UpdateStatus(ctx, &infrav3.Cluster{ + Metadata: cluster.Metadata, + Spec: &infrav3.ClusterSpec{ + ClusterData: &infrav3.ClusterData{ + ClusterStatus: &infrav3.ClusterStatus{ + Conditions: []*infrav3.ClusterCondition{ + clstrutil.NewClusterDelete(constants.Retry, reason)}, + }, + }, + }, + }, query.WithMeta(cluster.Metadata)) + return err + } + + if err := try(); err != nil { + _log.Infow("unable to delete cluster", "name", cluster.Metadata.Name, "error", err) + err = errors.Wrap(err, "unable to delete cluster") + sErr := onFailure(err.Error()) + if sErr != nil { + _log.Infow("unable to update status", "error", err) + } + return err + } + + if err := onSuccess(); err != nil { + _log.Infow("unable to update status", "error", err) + } + + return nil +} + +func (r *clusterReconciler) handleClusterBootstrapAgent(ctx context.Context, cluster *infrav3.Cluster) error { + _log.Infow("handling cluster bootstrap agent", "cluster", cluster.Metadata) + try := func() error { + err := bootstrapagent.CreateForCluster(ctx, r.sp, r.cp, cluster) + return err + } + + onSuccess := func() error { + ctx, cancel := context.WithTimeout(context.Background(), time.Second*10) + defer cancel() + + fmt.Print("annotations in reconciler :: ", cluster.Metadata.Annotations) + + err := r.cs.UpdateStatus(ctx, &infrav3.Cluster{ + Metadata: cluster.Metadata, + Spec: &infrav3.ClusterSpec{ + ClusterData: &infrav3.ClusterData{ + ClusterStatus: &infrav3.ClusterStatus{ + Conditions: []*infrav3.ClusterCondition{ + clstrutil.NewClusterBootstrapAgent(constants.Success, "bootstrap agent created")}, + }, + }, + }, + }, query.WithMeta(cluster.Metadata)) + + //update relays to annotations + if err == nil { + fmt.Print("annotations in reconciler before update :: ", cluster.Metadata.Annotations) + fmt.Print("id in reconciler before update :: ", cluster.Metadata.Id) + err = r.cs.UpdateClusterAnnotations(ctx, cluster) + } + return err + } + + onFailure := func(reason string) error { + ctx, cancel := context.WithTimeout(context.Background(), time.Second*10) + defer cancel() + + err := r.cs.UpdateStatus(ctx, &infrav3.Cluster{ + Metadata: cluster.Metadata, + Spec: &infrav3.ClusterSpec{ + ClusterData: &infrav3.ClusterData{ + ClusterStatus: &infrav3.ClusterStatus{ + Conditions: []*infrav3.ClusterCondition{ + clstrutil.NewClusterBootstrapAgent(constants.Retry, reason)}, + }, + }, + }, + }, query.WithMeta(cluster.Metadata)) + return err + } + + if err := try(); err != nil { + _log.Infow("unable to create cluster bootstrap agent", "error", err) + err = errors.Wrap(err, "unable to create cluster boostrap agent") + sErr := onFailure(err.Error()) + if sErr != nil { + _log.Infow("unable to update status", "error", err) + } + return err + } + + if err := onSuccess(); err != nil { + _log.Infow("unable to update status", "error", err) + } + + return nil +} diff --git a/components/cluster-scheduler/pkg/reconcile/utils.go b/components/cluster-scheduler/pkg/reconcile/utils.go new file mode 100644 index 0000000..ee226e8 --- /dev/null +++ b/components/cluster-scheduler/pkg/reconcile/utils.go @@ -0,0 +1,18 @@ +package reconcile + +import ( + "encoding/json" + + "github.com/RafaySystems/rcloud-base/components/common/pkg/event" +) + +func resourceToKey(r event.Resource) string { + b, _ := json.Marshal(r) + return string(b) +} + +func keyToResource(k string) event.Resource { + var r event.Resource + json.Unmarshal([]byte(k), &r) + return r +} diff --git a/components/cluster-scheduler/pkg/service/cluster.go b/components/cluster-scheduler/pkg/service/cluster.go index 9a8178e..3e8db86 100644 --- a/components/cluster-scheduler/pkg/service/cluster.go +++ b/components/cluster-scheduler/pkg/service/cluster.go @@ -11,17 +11,23 @@ import ( "sync" "time" + clstrutil "github.com/RafaySystems/rcloud-base/components/cluster-scheduler/internal/cluster" + "github.com/RafaySystems/rcloud-base/components/cluster-scheduler/internal/cluster/constants" + "github.com/RafaySystems/rcloud-base/components/cluster-scheduler/internal/cluster/dao" + "github.com/RafaySystems/rcloud-base/components/cluster-scheduler/internal/cluster/util" + "github.com/RafaySystems/rcloud-base/components/cluster-scheduler/internal/models" "github.com/RafaySystems/rcloud-base/components/cluster-scheduler/pkg/bootstrapper" - clstrutil "github.com/RafaySystems/rcloud-base/components/cluster-scheduler/pkg/internal/cluster" - "github.com/RafaySystems/rcloud-base/components/cluster-scheduler/pkg/internal/cluster/constants" - "github.com/RafaySystems/rcloud-base/components/cluster-scheduler/pkg/internal/cluster/dao" - "github.com/RafaySystems/rcloud-base/components/cluster-scheduler/pkg/internal/models" + bootstrapagent "github.com/RafaySystems/rcloud-base/components/cluster-scheduler/pkg/bootstrapper/agent" "github.com/RafaySystems/rcloud-base/components/cluster-scheduler/pkg/patch" + "github.com/RafaySystems/rcloud-base/components/common/pkg/event" "github.com/RafaySystems/rcloud-base/components/common/pkg/log" + cmodels "github.com/RafaySystems/rcloud-base/components/common/pkg/models" "github.com/RafaySystems/rcloud-base/components/common/pkg/persistence/provider/pg" "github.com/RafaySystems/rcloud-base/components/common/pkg/query" + sentryrpc "github.com/RafaySystems/rcloud-base/components/common/proto/rpc/sentry" commonv3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/commonpb/v3" infrav3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/infrapb/v3" + "github.com/RafaySystems/rcloud-base/components/common/proto/types/scheduler" "github.com/google/uuid" "github.com/pkg/errors" bun "github.com/uptrace/bun" @@ -42,7 +48,7 @@ type ClusterService interface { // create Cluster Create(ctx context.Context, cluster *infrav3.Cluster) (*infrav3.Cluster, error) // get cluster - Select(ctx context.Context, cluster *infrav3.Cluster) (*infrav3.Cluster, error) + Select(ctx context.Context, cluster *infrav3.Cluster, isExtended bool) (*infrav3.Cluster, error) // get cluster Get(ctx context.Context, opts ...query.Option) (*infrav3.Cluster, error) // create or update cluster @@ -52,62 +58,74 @@ type ClusterService interface { // list cluster List(ctx context.Context, opts ...query.Option) (*infrav3.ClusterList, error) //update cluster status - UpdateClusterStatus(ctx context.Context, current *infrav3.Cluster) error + UpdateClusterConditionStatus(ctx context.Context, current *infrav3.Cluster) error + // update cluster annotations + UpdateClusterAnnotations(ctx context.Context, cluster *infrav3.Cluster) error //register cluster Register(ctx context.Context, token string) (*infrav3.ClusterToken, error) //listen clusters ListenClusters(ctx context.Context, mChan chan<- commonv3.Metadata) + //Get cluster projects + GetClusterProjects(ctx context.Context, cluster *infrav3.Cluster) ([]models.ProjectCluster, error) + //Validate and update cluster status + UpdateStatus(ctx context.Context, current *infrav3.Cluster, opts ...query.Option) error + // Get Namespaces for cluster and conditions + GetNamespacesForConditions(ctx context.Context, conditions []scheduler.ClusterNamespaceCondition, clusterID string) (*scheduler.ClusterNamespaceList, error) + // Get Namespaces for given cluster + GetNamespaces(ctx context.Context, clusterID string) (*scheduler.ClusterNamespaceList, error) + // Get Namespace + GetNamespace(ctx context.Context, namespace string, clusterID string) (*scheduler.ClusterNamespace, error) + // Update Namespace Status + UpdateNamespaceStatus(ctx context.Context, current *scheduler.ClusterNamespace) error + // Get Namespace hashes + GetNamespaceHashes(ctx context.Context, clusterID string) ([]infrav3.NameHash, error) + //Add event handlers + AddEventHandler(evh event.Handler) } // clusterService implements ClusterService type clusterService struct { - dao pg.EntityDAO - cns ClusterNodesService - cdao dao.ClusterDao - eobdao dao.ClusterOperatorBootstrapDao - pcdao dao.ProjectClusterDao - ctdao dao.ClusterTokenDao - downloadData bootstrapper.DownloadData + dao pg.EntityDAO + adao pg.EntityDAO + cdao dao.ClusterDao + eobdao dao.ClusterOperatorBootstrapDao + pcdao dao.ProjectClusterDao + ctdao dao.ClusterTokenDao + cndao dao.ClusterNamespacesDao + downloadData bootstrapper.DownloadData + clusterHandlers []event.Handler + sentryPool sentryrpc.SentryPool } // NewClusterService return new cluster service -func NewClusterService(db *bun.DB, data *bootstrapper.DownloadData) ClusterService { +func NewClusterService(db *bun.DB, adb *bun.DB, data *bootstrapper.DownloadData, sentrypool sentryrpc.SentryPool) ClusterService { entityDao := pg.NewEntityDAO(db) return &clusterService{ dao: entityDao, - cns: NewClusterNodesService(db), + adao: pg.NewEntityDAO(adb), cdao: dao.NewClusterDao(entityDao), eobdao: dao.NewClusterOperatorBootstrapDao(entityDao), pcdao: dao.NewProjectClusterDao(entityDao), ctdao: dao.NewClusterTokenDao(entityDao), + cndao: dao.NewClusterNamespacesDao(entityDao), downloadData: *data, + sentryPool: sentrypool, } } func (es *clusterService) Create(ctx context.Context, cluster *infrav3.Cluster) (*infrav3.Cluster, error) { var errormsg string - - partId, err := uuid.Parse(cluster.Metadata.Partner) - if err != nil { + if cluster.Metadata.Project == "" { cluster.Status = &commonv3.Status{ ConditionType: "Create", ConditionStatus: commonv3.ConditionStatus_StatusFailed, - Reason: err.Error(), + Reason: "Invalid project association, project is missing.", } - return cluster, err + return cluster, fmt.Errorf("invalid cluster data, project is missing") } - orgId, err := uuid.Parse(cluster.Metadata.Organization) - if err != nil { - cluster.Status = &commonv3.Status{ - ConditionType: "Create", - ConditionStatus: commonv3.ConditionStatus_StatusFailed, - Reason: err.Error(), - } - return cluster, err - } - - projId, err := uuid.Parse(cluster.Metadata.Project) + var proj cmodels.Project + _, err := es.adao.GetByName(ctx, cluster.Metadata.Project, &proj) if err != nil { cluster.Status = &commonv3.Status{ ConditionType: "Create", @@ -170,8 +188,8 @@ func (es *clusterService) Create(ctx context.Context, cluster *infrav3.Cluster) return cluster, fmt.Errorf(errormsg) } - clusterPresent, err := es.dao.GetByNamePartnerOrg(ctx, cluster.Metadata.Name, uuid.NullUUID{UUID: orgId, Valid: true}, - uuid.NullUUID{UUID: partId, Valid: true}, &models.Cluster{}) + clusterPresent, err := es.dao.GetByNamePartnerOrg(ctx, cluster.Metadata.Name, uuid.NullUUID{UUID: proj.PartnerId, Valid: true}, + uuid.NullUUID{UUID: proj.OrganizationId, Valid: true}, &models.Cluster{}) if err != nil && err.Error() == "sql: no rows in result set" { _log.Infof("Skipping as first time cluster create ") } else if clusterPresent != nil { @@ -186,7 +204,7 @@ func (es *clusterService) Create(ctx context.Context, cluster *infrav3.Cluster) metro := &models.Metro{} if cluster.Spec.Metro != nil && cluster.Spec.Metro.Name != "" { - if mdb, err := es.dao.GetByNamePartnerOrg(ctx, cluster.Spec.Metro.Name, uuid.NullUUID{UUID: orgId, Valid: true}, uuid.NullUUID{UUID: partId, Valid: true}, metro); err != nil { + if mdb, err := es.dao.GetByNamePartnerOrg(ctx, cluster.Spec.Metro.Name, uuid.NullUUID{UUID: proj.PartnerId, Valid: true}, uuid.NullUUID{UUID: uuid.Nil, Valid: false}, metro); err != nil { errormsg = "Invalid cluster location, provide a valid metro name" cluster.Status = &commonv3.Status{ ConditionType: "Create", @@ -203,7 +221,7 @@ func (es *clusterService) Create(ctx context.Context, cluster *infrav3.Cluster) if len(cluster.Metadata.Labels) == 0 { cluster.Metadata.Labels = make(map[string]string) } - if err := clstrutil.ValidateCustomLabels(cluster.Metadata.Labels); err != nil { + if err := util.ValidateCustomLabels(cluster.Metadata.Labels); err != nil { cluster.Status = &commonv3.Status{ ConditionType: "Create", ConditionStatus: commonv3.ConditionStatus_StatusFailed, @@ -225,10 +243,10 @@ func (es *clusterService) Create(ctx context.Context, cluster *infrav3.Cluster) ModifiedAt: time.Now(), Trash: false, DisplayName: cluster.Metadata.Name, - ProjectId: projId, + ProjectId: proj.ID, ShareMode: infrav3.ClusterShareMode_CUSTOM.String(), - OrganizationId: orgId, - PartnerId: partId, + OrganizationId: proj.OrganizationId, + PartnerId: proj.PartnerId, MetroId: metro.ID, Labels: json.RawMessage(lbsBytes), BlueprintRef: constants.DefaultBlueprint, @@ -250,6 +268,7 @@ func (es *clusterService) Create(ctx context.Context, cluster *infrav3.Cluster) }, } clstrutil.SetClusterCondition(cluster, clstrutil.NewClusterBootstrapAgent(commonv3.RafayConditionStatus_Pending, "created")) + fmt.Print("conditions while create :: ", clstrutil.DefaultClusterConditions) cnds, _ := json.Marshal(clstrutil.DefaultClusterConditions) edb.Conditions = json.RawMessage(cnds) @@ -285,26 +304,7 @@ func (es *clusterService) Create(ctx context.Context, cluster *infrav3.Cluster) } _log.Infow("Created the cluster: ", "Cluster", edb) - //TODO: do we need create nodes while creating cluster or bootstrapping ? - /*// add nodes - for _, node := range cluster.Spec.ClusterData.ClusterStatus.Nodes { - err := es.cndao.CreateOrUpdateNode(edb, &models.ClusterNodes{ - ClusterId: edb.ID, - OrganizationId: edb.OrganizationId, - PartnerId: edb.PartnerId, - ProjectId: edb.ProjectId, - Name: node.Metadata.Name, - DisplayName: node.Metadata.Name, - Unschedulable: node.Spec.Unschedulable, - //Labels: json.RawMessage(node.Metadata.Labels[]), - //TODO: lot more like taints and annotations etc - }) - if err != nil { - return nil, err - } - }*/ - - clusterResp := prepareClusterResponse(cluster, edb, *metro, pcList, nil) + clusterResp := es.prepareClusterResponse(ctx, cluster, edb, metro, pcList, true) if clusterGeneration == constants.Cluster_V2 && edb.PartnerId != uuid.Nil && edb.OrganizationId != uuid.Nil { operatorSpecStr, err := clstrutil.GetClusterOperatorYaml(ctx, &es.downloadData, clusterResp) @@ -317,7 +317,6 @@ func (es *clusterService) Create(ctx context.Context, cluster *infrav3.Cluster) } return cluster, err } - //fmt.Println(resp) _log.Infow("Creating cluster operator yaml", "clusterid", edb.ID) operatorSpecEncoded := base64.StdEncoding.EncodeToString([]byte(operatorSpecStr)) boostrapData := models.ClusterOperatorBootstrap{ @@ -326,13 +325,25 @@ func (es *clusterService) Create(ctx context.Context, cluster *infrav3.Cluster) } es.eobdao.CreateOperatorBootstrap(ctx, &boostrapData) } - //TODO: while integrating events framework - //CreateClusterEvent(c, "cluster.create.success", e, reqAuth.projectID, r, reqAuth.sd) + + ev := event.Resource{ + PartnerID: edb.PartnerId.String(), + OrganizationID: edb.OrganizationId.String(), + ProjectID: edb.ProjectId.String(), + Name: edb.Name, + EventType: event.ResourceCreate, + ID: edb.ID.String(), + } + + for _, h := range es.clusterHandlers { + h.OnChange(ev) + } return cluster, nil } -func (s *clusterService) Select(ctx context.Context, cluster *infrav3.Cluster) (*infrav3.Cluster, error) { +func (s *clusterService) Select(ctx context.Context, cluster *infrav3.Cluster, isExtended bool) (*infrav3.Cluster, error) { + clstr := &infrav3.Cluster{ ApiVersion: constants.ApiVersion, Kind: constants.ClusterKind, @@ -351,34 +362,30 @@ func (s *clusterService) Select(ctx context.Context, cluster *infrav3.Cluster) ( } return clstr, err } - nodes, err := s.cns.GetClusterNodes(ctx, c.ID) - if err != nil { - clstr.Status = &commonv3.Status{ - ConditionStatus: commonv3.ConditionStatus_StatusFailed, - Reason: err.Error(), - LastUpdated: timestamppb.Now(), + var projects []models.ProjectCluster + if isExtended { + projects, err = s.pcdao.GetProjectsForCluster(ctx, c.ID) + if err != nil { + clstr.Status = &commonv3.Status{ + ConditionStatus: commonv3.ConditionStatus_StatusFailed, + Reason: err.Error(), + LastUpdated: timestamppb.Now(), + } + return clstr, err } - return clstr, err - } - projects, err := s.pcdao.GetProjectsForCluster(ctx, c.ID) - if err != nil { - clstr.Status = &commonv3.Status{ - ConditionStatus: commonv3.ConditionStatus_StatusFailed, - Reason: err.Error(), - LastUpdated: timestamppb.Now(), - } - return clstr, err } - entity, err := s.dao.GetByID(ctx, c.MetroId, &models.Metro{}) - if err != nil { - _log.Errorf("failed to fetch metro details", err) + var metro *models.Metro + if c.MetroId != uuid.Nil { + entity, err := s.dao.GetByID(ctx, c.MetroId, &models.Metro{}) + if err != nil { + _log.Errorf("failed to fetch metro details", err) + } + metro = entity.(*models.Metro) } - metro := entity.(*models.Metro) //TODO: Get cluster workload information - - clstr = prepareClusterResponse(clstr, c, *metro, projects, nodes) + clstr = s.prepareClusterResponse(ctx, clstr, c, metro, projects, isExtended) return clstr, nil } @@ -389,43 +396,89 @@ func (s *clusterService) Get(ctx context.Context, opts ...query.Option) (*infrav opt(&queryOptions) } - cluster := &infrav3.Cluster{ - Metadata: &commonv3.Metadata{ - Name: queryOptions.Name, - Partner: queryOptions.PartnerID, - Organization: queryOptions.OrganizationID, - Project: queryOptions.ProjectID, - Id: queryOptions.ID, - }, + clstr := &infrav3.Cluster{ + ApiVersion: constants.ApiVersion, + Kind: constants.ClusterKind, } - return s.Select(ctx, cluster) + + id, err := uuid.Parse(queryOptions.ClusterID) + if err != nil { + id = uuid.Nil + } + c, err := s.cdao.GetCluster(ctx, &models.Cluster{ID: id, Name: queryOptions.Name}) + if err != nil { + clstr.Status = &commonv3.Status{ + ConditionStatus: commonv3.ConditionStatus_StatusFailed, + Reason: err.Error(), + LastUpdated: timestamppb.Now(), + } + return clstr, err + } + var projects []models.ProjectCluster + if queryOptions.Extended { + projects, err = s.pcdao.GetProjectsForCluster(ctx, c.ID) + if err != nil { + clstr.Status = &commonv3.Status{ + ConditionStatus: commonv3.ConditionStatus_StatusFailed, + Reason: err.Error(), + LastUpdated: timestamppb.Now(), + } + return clstr, err + } + } + + s.prepareClusterResponse(ctx, clstr, c, nil, projects, queryOptions.Extended) + clstr.Metadata.Id = c.ID.String() + clstr.Metadata.Project = c.ProjectId.String() + clstr.Metadata.Organization = c.OrganizationId.String() + clstr.Metadata.Partner = c.PartnerId.String() + + return clstr, nil } -func prepareClusterResponse(clstr *infrav3.Cluster, c *models.Cluster, metro models.Metro, projects []models.ProjectCluster, nodes []infrav3.ClusterNode) *infrav3.Cluster { +func (s *clusterService) prepareClusterResponse(ctx context.Context, clstr *infrav3.Cluster, c *models.Cluster, metro *models.Metro, projects []models.ProjectCluster, isExtended bool) *infrav3.Cluster { + + var part cmodels.Partner + _, err := s.adao.GetNameById(ctx, c.PartnerId, &part) + if err != nil { + _log.Infow("unable to fetch partner information, ", err.Error()) + } + + var org cmodels.Organization + _, err = s.adao.GetNameById(ctx, c.OrganizationId, &org) + if err != nil { + _log.Infow("unable to fetch organization information, ", err.Error()) + } + + var proj cmodels.Project + _, err = s.adao.GetNameById(ctx, c.ProjectId, &proj) + if err != nil { + _log.Infow("unable to fetch project information, ", err.Error()) + } var lbls map[string]string - if c.Labels != nil { - json.Unmarshal(c.Labels, lbls) + if isExtended && c.Labels != nil { + json.Unmarshal(c.Labels, &lbls) } var ann map[string]string - if c.Annotations != nil { - json.Unmarshal(c.Annotations, ann) + if isExtended && c.Annotations != nil { + json.Unmarshal(c.Annotations, &ann) } clstr.Metadata = &commonv3.Metadata{ Name: c.Name, Description: c.DisplayName, Labels: lbls, Annotations: ann, - Project: c.ProjectId.String(), - Organization: c.OrganizationId.String(), - Partner: c.PartnerId.String(), - Id: c.ID.String(), + Project: proj.Name, + Organization: org.Name, + Partner: part.Name, ModifiedAt: timestamppb.New(c.ModifiedAt), } + sm, _ := strconv.Atoi(c.ShareMode) var proxy infrav3.ProxyConfig if c.ProxyConfig != nil { - json.Unmarshal(c.ProxyConfig, proxy) + json.Unmarshal(c.ProxyConfig, &proxy) } var pcs []*infrav3.ProjectCluster if len(projects) > 0 { @@ -437,32 +490,18 @@ func prepareClusterResponse(clstr *infrav3.Cluster, c *models.Cluster, metro mod }) } } - var nds []*infrav3.ClusterNode - if len(nodes) > 0 { - for _, node := range nodes { - nds = append(nds, &node) - } - clstr.Spec.ClusterData.Nodes = nds - } var conditions []*infrav3.ClusterCondition - if c.Conditions != nil { + if isExtended && c.Conditions != nil { json.Unmarshal(c.Conditions, &conditions) } clstr.Spec = &infrav3.ClusterSpec{ - ClusterType: c.ClusterType, - Metro: &infrav3.Metro{ - Name: metro.Name, - City: metro.City, - State: metro.State, - Country: metro.Country, - }, + ClusterType: c.ClusterType, OverrideSelector: c.OverrideSelector, ShareMode: infrav3.ClusterShareMode(sm), ProxyConfig: &proxy, ClusterData: &infrav3.ClusterData{ ClusterBlueprint: c.BlueprintRef, Projects: pcs, - Nodes: nds, ClusterStatus: &infrav3.ClusterStatus{ Conditions: conditions, Token: c.Token, @@ -470,6 +509,14 @@ func prepareClusterResponse(clstr *infrav3.Cluster, c *models.Cluster, metro mod }, }, } + if metro != nil { + clstr.Spec.Metro = &infrav3.Metro{ + Name: metro.Name, + City: metro.City, + State: metro.State, + Country: metro.Country, + } + } clstr.Status = &commonv3.Status{ ConditionStatus: commonv3.ConditionStatus_StatusOK, LastUpdated: timestamppb.New(c.ModifiedAt), @@ -501,9 +548,7 @@ func (cs *clusterService) Update(ctx context.Context, cluster *infrav3.Cluster) } cdb := edb.(*models.Cluster) - oid := cdb.OrganizationId pid := cdb.PartnerId - if cluster.Spec.ClusterType == "" { cluster.Status = &commonv3.Status{ ConditionType: "Update", @@ -526,14 +571,6 @@ func (cs *clusterService) Update(ctx context.Context, cluster *infrav3.Cluster) if len(cluster.Metadata.Labels) == 0 { cluster.Metadata.Labels = make(map[string]string) } - if err := clstrutil.ValidateCustomLabels(cluster.Metadata.Labels); err != nil { - cluster.Status = &commonv3.Status{ - ConditionType: "Create", - ConditionStatus: commonv3.ConditionStatus_StatusFailed, - Reason: err.Error(), - } - return cluster, err - } clusterLabels := clstrutil.ExtractV2ClusterLabels(cluster.Metadata.Labels, nil, cluster.Metadata.Name, cluster.Spec.ClusterType, "") if clusterLabels == nil { @@ -548,11 +585,16 @@ func (cs *clusterService) Update(ctx context.Context, cluster *infrav3.Cluster) cdb.ShareMode = cluster.Spec.ShareMode.String() cdb.Labels = json.RawMessage(lbsBytes) + if len(cluster.Metadata.Annotations) > 0 { + annBytes, _ := json.Marshal(cluster.Metadata.Annotations) + cdb.Annotations = json.RawMessage(annBytes) + } + //location of cluster is updated if cluster.Spec.Metro != nil && cdb.MetroId.String() != cluster.Spec.Metro.Id { metro := &models.Metro{} if cluster.Spec.Metro.Name != "" { - if mdb, err := cs.dao.GetByNamePartnerOrg(ctx, cluster.Spec.Metro.Name, uuid.NullUUID{UUID: oid, Valid: true}, uuid.NullUUID{UUID: pid, Valid: true}, metro); err != nil { + if mdb, err := cs.dao.GetByNamePartnerOrg(ctx, cluster.Spec.Metro.Name, uuid.NullUUID{UUID: pid, Valid: true}, uuid.NullUUID{UUID: uuid.Nil, Valid: false}, metro); err != nil { errormsg = "Invalid cluster location, provide a valid metro name" cluster.Status = &commonv3.Status{ ConditionType: "Update", @@ -579,14 +621,13 @@ func (cs *clusterService) Update(ctx context.Context, cluster *infrav3.Cluster) cdb.BlueprintRef = cluster.Spec.ClusterData.ClusterBlueprint if cluster.Spec.ClusterData.ClusterStatus != nil { cdb.PublishedBlueprint = cluster.Spec.ClusterData.ClusterStatus.PublishedBlueprint + + if len(cluster.Spec.ClusterData.ClusterStatus.Conditions) > 0 { + cndBytes, _ := json.Marshal(cluster.Spec.ClusterData.ClusterStatus.Conditions) + cdb.Conditions = json.RawMessage(cndBytes) + } } - for _, node := range cluster.Spec.ClusterData.Nodes { - node.Metadata.Project = cluster.Metadata.Project - node.Metadata.Organization = cluster.Metadata.Organization - node.Metadata.Partner = cluster.Metadata.Partner - cs.cns.CreateOrUpdateNode(ctx, uuid.MustParse(cluster.Metadata.Id), node) - } } err = cs.cdao.UpdateCluster(ctx, cdb) if err != nil { @@ -604,36 +645,41 @@ func (cs *clusterService) Update(ctx context.Context, cluster *infrav3.Cluster) LastUpdated: timestamppb.New(cdb.ModifiedAt), } - return cluster, nil - - //TODO: revisit later - /*notifyCluster(s.db.WithContext(ctx), c) + cs.notifyCluster(ctx, cluster) ev := event.Resource{ - PartnerID: c.PartnerID, - OrganizationID: c.OrganizationID, - ProjectID: c.ProjectID, - Name: c.Name, - EventType: event.ResourceDelete, - ID: c.ID, + PartnerID: cluster.Metadata.Partner, + OrganizationID: cluster.Metadata.Organization, + ProjectID: cluster.Metadata.Project, + Name: cluster.Metadata.Name, + EventType: event.ResourceUpdate, + ID: cluster.Metadata.Id, } - // for _, h := range s.clusterHandlers { - // h.OnChange(ev) - // } - for _, h := range s.placementHandlers { + for _, h := range cs.clusterHandlers { + h.OnChange(ev) + } + /*for _, h := range s.placementHandlers { h.OnChange(ev) }*/ + + return cluster, nil } func (cs *clusterService) Delete(ctx context.Context, cluster *infrav3.Cluster) error { - //TODO: - /*err = bootstrapagent.DeleteForCluster(ctx, s.sentryPool, s.ClusterService, query.WithMeta(cluster)) - if err != nil { - return nil, err - }*/ - cluster, err := cs.Select(ctx, cluster) + cluster, err := cs.Get(ctx, func(qo *commonv3.QueryOptions) { + qo.Name = cluster.Metadata.Name + qo.Project = cluster.Metadata.Project + qo.Extended = true + }) + if err != nil { + return err + } + clusterId := cluster.Metadata.Id + projectId := cluster.Metadata.Project + + err = bootstrapagent.DeleteForCluster(ctx, cs.sentryPool, *cluster, query.WithMeta(cluster.Metadata)) if err != nil { return err } @@ -643,26 +689,37 @@ func (cs *clusterService) Delete(ctx context.Context, cluster *infrav3.Cluster) _log.Debugw("setting cluster condition to pending delete", "name", cluster.Metadata.Name, "conditions", cluster.Spec.ClusterData.ClusterStatus.Conditions) clstrutil.SetClusterCondition(cluster, clstrutil.NewClusterDelete(constants.Pending, "deleted")) - err = cs.UpdateClusterStatus(ctx, cluster) + err = cs.UpdateClusterConditionStatus(ctx, cluster) if err != nil { return errors.Wrapf(err, "could not update cluster %s status to pending delete", cluster.Metadata.Name) } - _log.Infow("updated cluster status to pending delete", "name", cluster.Metadata.Name) + ev := event.Resource{ + PartnerID: cluster.Metadata.Partner, + OrganizationID: cluster.Metadata.Organization, + ProjectID: projectId, + Name: cluster.Metadata.Name, + EventType: event.ResourceDelete, + ID: clusterId, + } + + for _, h := range cs.clusterHandlers { + h.OnChange(ev) + } return nil } -func (cs *clusterService) deleteCluster(ctx context.Context, cluster *infrav3.Cluster) error { +func (cs *clusterService) deleteCluster(ctx context.Context, clusterId, projectId string) error { c := models.Cluster{ - ID: uuid.MustParse(cluster.Metadata.Id), - ProjectId: uuid.MustParse(cluster.Metadata.Project), + ID: uuid.MustParse(clusterId), + ProjectId: uuid.MustParse(projectId), } - err := cs.pcdao.DeleteProjectsForCluster(ctx, uuid.MustParse(cluster.Metadata.Id)) + err := cs.pcdao.DeleteProjectsForCluster(ctx, uuid.MustParse(clusterId)) if err != nil { - return errors.Wrapf(err, "could not delete projects for cluster %s", cluster.Metadata.Name) + return errors.Wrapf(err, "could not delete projects for cluster %s", clusterId) } return cs.cdao.DeleteCluster(ctx, &c) } @@ -674,7 +731,17 @@ func (cs *clusterService) List(ctx context.Context, opts ...query.Option) (*infr opt(&queryOptions) } - cdb, err := cs.cdao.ListClusters(ctx, queryOptions) + var proj cmodels.Project + _, err := cs.adao.GetByName(ctx, queryOptions.Project, &proj) + if err != nil { + return nil, err + } + + cdb, err := cs.cdao.ListClusters(ctx, commonv3.QueryOptions{ + Project: proj.ID.String(), + Organization: proj.OrganizationId.String(), + Partner: proj.PartnerId.String(), + }) if err != nil { return nil, err } @@ -691,10 +758,6 @@ func (cs *clusterService) List(ctx context.Context, opts ...query.Option) (*infr var items []*infrav3.Cluster for _, clstr := range cdb { - nodes, err := cs.cns.GetClusterNodes(ctx, clstr.ID) - if err != nil { - return nil, err - } projects, err := cs.pcdao.GetProjectsForCluster(ctx, clstr.ID) if err != nil { return nil, err @@ -705,7 +768,7 @@ func (cs *clusterService) List(ctx context.Context, opts ...query.Option) (*infr } metro := entity.(*models.Metro) //TODO: workload related stuff pending - cluster := prepareClusterResponse(&infrav3.Cluster{}, &clstr, *metro, projects, nodes) + cluster := cs.prepareClusterResponse(ctx, &infrav3.Cluster{}, &clstr, metro, projects, false) items = append(items, cluster) } @@ -731,18 +794,34 @@ func (s *clusterService) Register(ctx context.Context, token string) (*infrav3.C } cdb, err := s.cdao.GetClusterForToken(ctx, token) if err != nil { + _log.Infow("Cluster not found for token", token, "error", err) return err } cluster = &infrav3.Cluster{} - cluster = prepareClusterResponse(cluster, cdb, models.Metro{}, nil, nil) + cluster = s.prepareClusterResponse(ctx, cluster, cdb, nil, nil, true) cluster.Spec.ClusterData.ClusterStatus.Conditions = []*infrav3.ClusterCondition{ clstrutil.NewClusterRegister(commonv3.RafayConditionStatus_Success, "registered"), } - err = s.UpdateClusterStatus(ctx, cluster) + err = s.UpdateClusterConditionStatus(ctx, cluster) if err != nil { + _log.Infow("error updating cluster status", "error", err) return err } + + ev := event.Resource{ + PartnerID: cdb.PartnerId.String(), + OrganizationID: cdb.OrganizationId.String(), + ProjectID: cdb.ProjectId.String(), + Name: cdb.Name, + EventType: event.ResourceUpdateStatus, + ID: cdb.ID.String(), + } + + for _, h := range s.clusterHandlers { + h.OnChange(ev) + } + tt, _ := strconv.Atoi(ct.TokenType) clusterToken = &infrav3.ClusterToken{ Spec: &infrav3.ClusterTokenSpec{ @@ -757,33 +836,29 @@ func (s *clusterService) Register(ctx context.Context, token string) (*infrav3.C } return nil }) - /* - ev := event.Resource{ - EventType: event.ResourceUpdateStatus, - ID: c.ID, - } - for _, h := range s.clusterHandlers { - h.OnChange(ev) - }*/ - - //notifyCluster(s.db.WithContext(ctx), c.Cluster) + s.notifyCluster(ctx, cluster) return clusterToken, nil } -func (s *clusterService) UpdateClusterStatus(ctx context.Context, current *infrav3.Cluster) error { +func (s *clusterService) UpdateClusterConditionStatus(ctx context.Context, current *infrav3.Cluster) error { - existing, err := s.Select(ctx, current) + existing, err := s.Get(ctx, func(qo *commonv3.QueryOptions) { + qo.ClusterID = current.Metadata.Id + qo.Name = current.Metadata.Name + qo.Project = current.Metadata.Project + qo.Extended = true + }) if err != nil { return err } _log.Debugw("existing cluster conditions", "name", existing.Spec.ClusterData.ClusterStatus.Conditions) - _log.Debugw("retrieved cluster to update cluster status", "name", existing.Metadata.Name) _log.Debugw("current cluster conditions", "name", current.Spec.ClusterData.ClusterStatus.Conditions) err = patch.ClusterStatus(existing.Spec.ClusterData.ClusterStatus, current.Spec.ClusterData.ClusterStatus) if err != nil { + _log.Debugw("failed to update cluster status, ", err.Error()) return err } @@ -792,11 +867,14 @@ func (s *clusterService) UpdateClusterStatus(ctx context.Context, current *infra //update the cluster _, err = s.Update(ctx, existing) + if err != nil { + return err + } _log.Debugw("updated cluster in db", "name", existing.Metadata.Name) if clstrutil.IsClusterDeleted(existing) { - err = s.deleteCluster(ctx, existing) + err = s.deleteCluster(ctx, existing.Metadata.Id, existing.Metadata.Project) if err != nil { return err } @@ -809,6 +887,17 @@ func (s *clusterService) UpdateClusterStatus(ctx context.Context, current *infra return err } +func (s *clusterService) UpdateClusterAnnotations(ctx context.Context, cluster *infrav3.Cluster) error { + if len(cluster.Metadata.Annotations) > 0 { + annBytes, _ := json.Marshal(cluster.Metadata.Annotations) + return s.cdao.UpdateClusterAnnotations(ctx, &models.Cluster{ + ID: uuid.MustParse(cluster.Metadata.Id), + Annotations: json.RawMessage(annBytes), + }) + } + return nil +} + func (s *clusterService) ListenClusters(ctx context.Context, mChan chan<- commonv3.Metadata) { listener := pgdriver.NewListener(s.dao.GetInstance()) listener.Listen(ctx, clusterNotifyChan) @@ -841,6 +930,80 @@ listenerLoop: } +func (s *clusterService) GetClusterProjects(ctx context.Context, cluster *infrav3.Cluster) ([]models.ProjectCluster, error) { + + id, err := uuid.Parse(cluster.Metadata.Id) + if err != nil { + id = uuid.Nil + } + c, err := s.cdao.GetCluster(ctx, &models.Cluster{ID: id, Name: cluster.Metadata.Name}) + if err != nil { + return nil, err + } + projects, err := s.pcdao.GetProjectsForCluster(ctx, c.ID) + if err != nil { + return nil, err + } + + return projects, nil +} + +func (s *clusterService) UpdateStatus(ctx context.Context, current *infrav3.Cluster, opts ...query.Option) error { + queryOptions := commonv3.QueryOptions{} + for _, opt := range opts { + opt(&queryOptions) + } + + isAllowed, err := s.pcdao.ValidateClusterAccess(ctx, queryOptions) + if err != nil { + return err + } + + if !isAllowed { + return fmt.Errorf("forbidden: access to cluster %s from project in scope is not allowed", current.Metadata.Name) + } + + err = s.UpdateClusterConditionStatus(ctx, current) + if err != nil { + return err + } + + ev := event.Resource{ + PartnerID: current.Metadata.Partner, + OrganizationID: current.Metadata.Organization, + ProjectID: current.Metadata.Project, + Name: current.Metadata.Name, + EventType: event.ResourceUpdateStatus, + ID: current.Metadata.Id, + } + + for _, h := range s.clusterHandlers { + h.OnChange(ev) + } + + s.notifyCluster(ctx, current) + + return nil +} + +func (s *clusterService) notifyCluster(ctx context.Context, c *infrav3.Cluster) { + b, err := json.Marshal(c.Metadata) + if err != nil { + _log.Infow("unable to marshal cluster meta", "error", err) + return + } + + err = s.cdao.Notify(clusterNotifyChan, string(b)) + if err != nil { + _log.Infow("unable to send cluster notification", "error", err) + return + } +} + +func (s *clusterService) AddEventHandler(evh event.Handler) { + s.clusterHandlers = append(s.clusterHandlers, evh) +} + func (s *clusterService) Close() error { return s.dao.Close() } diff --git a/components/cluster-scheduler/pkg/service/clusternodes.go b/components/cluster-scheduler/pkg/service/clusternodes.go deleted file mode 100644 index 7a7a272..0000000 --- a/components/cluster-scheduler/pkg/service/clusternodes.go +++ /dev/null @@ -1,198 +0,0 @@ -package service - -import ( - "context" - "encoding/json" - "fmt" - "strconv" - "time" - - "github.com/RafaySystems/rcloud-base/components/cluster-scheduler/pkg/internal/cluster/constants" - "github.com/RafaySystems/rcloud-base/components/cluster-scheduler/pkg/internal/cluster/hasher" - "github.com/RafaySystems/rcloud-base/components/cluster-scheduler/pkg/internal/models" - hash "github.com/RafaySystems/rcloud-base/components/common/pkg/hasher" - "github.com/RafaySystems/rcloud-base/components/common/pkg/persistence/provider/pg" - commonv3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/commonpb/v3" - infrav3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/infrapb/v3" - "github.com/google/uuid" - "github.com/uptrace/bun" -) - -// ClusterNodesService is the interface for cluster nodes operations -type ClusterNodesService interface { - // create cluster nodes - CreateOrUpdateNode(ctx context.Context, clusterId uuid.UUID, cn *infrav3.ClusterNode) error - //get cluster nodes - GetClusterNodes(ctx context.Context, clusterID uuid.UUID) ([]infrav3.ClusterNode, error) -} - -// clusterNodesService implements ClusterNodesService -type clusterNodesService struct { - dao pg.EntityDAO -} - -// NewClusterNodesService return new cluster nodes service -func NewClusterNodesService(db *bun.DB) ClusterNodesService { - return &clusterNodesService{ - dao: pg.NewEntityDAO(db), - } -} - -func (s *clusterNodesService) CreateOrUpdateNode(ctx context.Context, clusterId uuid.UUID, cn *infrav3.ClusterNode) error { - - nodeid, err := uuid.Parse(cn.Metadata.Id) - if err != nil { - nodeid = uuid.Nil - } - - // add public lable if public ip is assigned - if isPublic(cn.Status.Ips) { - if cn.Metadata.Labels == nil { - cn.Metadata.Labels = make(map[string]string) - } - cn.Metadata.Labels[constants.Public] = "true" - } else { - delete(cn.Metadata.Labels, constants.Public) - } - - //add hash annotation - if cn.Metadata.Annotations == nil { - cn.Metadata.Annotations = make(map[string]string) - } - h, err := hasher.GetNodeHashFrom(cn.Metadata.Labels, cn.Spec.Taints, cn.Spec.Unschedulable) - if err != nil { - err = fmt.Errorf("unable to create hash %s", err.Error()) - return err - } - cn.Metadata.Annotations[hash.ObjectHash] = h - - node := &models.ClusterNodes{ - ID: nodeid, - ClusterId: clusterId, - Name: cn.Metadata.Name, - DisplayName: cn.Metadata.Name, - OrganizationId: uuid.MustParse(cn.Metadata.Organization), - PartnerId: uuid.MustParse(cn.Metadata.Partner), - ProjectId: uuid.MustParse(cn.Metadata.Project), - ModifiedAt: time.Now(), - State: strconv.Itoa(int(cn.Status.State)), - } - - if lbls, err := json.Marshal(cn.Metadata.Labels); err == nil { - node.Labels = json.RawMessage(lbls) - } - if ann, err := json.Marshal(cn.Metadata.Annotations); err == nil { - node.Annotations = json.RawMessage(ann) - } - if tnts, err := json.Marshal(cn.Spec.Taints); err == nil { - node.Taints = json.RawMessage(tnts) - } - if ips, err := json.Marshal(cn.Status.Ips); err == nil { - node.Ips = json.RawMessage(ips) - } - if all, err := json.Marshal(cn.Status.Allocatable); err == nil { - node.Allocatable = json.RawMessage(all) - } - if cndts, err := json.Marshal(cn.Status.Conditions); err == nil { - node.Conditions = json.RawMessage(cndts) - } - if info, err := json.Marshal(cn.Status.NodeInfo); err == nil { - node.NodeInfo = json.RawMessage(info) - } - - if nodeid == uuid.Nil { - s.dao.Create(ctx, cn) - } else { - s.dao.Update(ctx, nodeid, cn) - } - - return err -} - -func (s *clusterNodesService) GetClusterNodes(ctx context.Context, clusterID uuid.UUID) ([]infrav3.ClusterNode, error) { - var cns []models.ClusterNodes - - entities, err := s.dao.GetX(ctx, "cluster_id", clusterID, cns) - - if entities == nil { - return nil, nil - } - cns = entities.([]models.ClusterNodes) - - var clusterNodes []infrav3.ClusterNode - for _, node := range cns { - var lbls map[string]string - if node.Labels != nil { - json.Unmarshal(node.Labels, lbls) - } - var ann map[string]string - if node.Annotations != nil { - json.Unmarshal(node.Annotations, ann) - } - var tnts []*commonv3.Taint - if node.Taints != nil { - json.Unmarshal(node.Taints, tnts) - } - state, _ := strconv.Atoi(node.State) - var cnds []*commonv3.NodeCondition - if node.Conditions != nil { - json.Unmarshal(node.Conditions, cnds) - } - var info *commonv3.NodeSystemInfo - if node.NodeInfo != nil { - json.Unmarshal(node.NodeInfo, info) - } - var capacity *infrav3.Resources - if node.Capacity != nil { - json.Unmarshal(node.Capacity, capacity) - } - var allocatable *infrav3.Resources - if node.Allocatable != nil { - json.Unmarshal(node.Allocatable, allocatable) - } - var allocated *infrav3.Resources - if node.Allocated != nil { - json.Unmarshal(node.Allocated, allocated) - } - var ips []*infrav3.ClusterNodeIP - if node.Ips != nil { - json.Unmarshal(node.Ips, ips) - } - clusterNodes = append(clusterNodes, infrav3.ClusterNode{ - Metadata: &commonv3.Metadata{ - Name: node.Name, - Description: node.DisplayName, - Labels: lbls, - Annotations: ann, - Id: node.ID.String(), - Project: node.ProjectId.String(), - Organization: node.OrganizationId.String(), - Partner: node.PartnerId.String(), - }, - Spec: &infrav3.ClusterNodeSpec{ - Unschedulable: node.Unschedulable, - Taints: tnts, - }, - Status: &infrav3.ClusterNodeStatus{ - State: infrav3.ClusterNodeState(state), - Conditions: cnds, - NodeInfo: info, - Capacity: capacity, - Allocatable: allocatable, - Allocated: allocated, - Ips: ips, - }, - }) - } - - return clusterNodes, err -} - -func isPublic(ips []*infrav3.ClusterNodeIP) bool { - for _, nodeIP := range ips { - if nodeIP.PublicIP != "" { - return true - } - } - return false -} diff --git a/components/cluster-scheduler/pkg/service/metro.go b/components/cluster-scheduler/pkg/service/metro.go new file mode 100644 index 0000000..27b289d --- /dev/null +++ b/components/cluster-scheduler/pkg/service/metro.go @@ -0,0 +1,247 @@ +package service + +import ( + "context" + "time" + + "github.com/RafaySystems/rcloud-base/components/common/pkg/models" + "github.com/RafaySystems/rcloud-base/components/common/pkg/persistence/provider/pg" + commonv3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/commonpb/v3" + infrav3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/infrapb/v3" + "github.com/google/uuid" + bun "github.com/uptrace/bun" + "google.golang.org/protobuf/types/known/timestamppb" +) + +// MetroService is the interface for metro operations +type MetroService interface { + Close() error + // create metro + Create(ctx context.Context, metro *infrav3.Location) (*infrav3.Location, error) + // get metro by id + GetById(ctx context.Context, id uuid.UUID) (*infrav3.Location, error) + // get metro by name + GetByName(ctx context.Context, name string) (*infrav3.Location, error) + // get metro id by name + GetIDByName(ctx context.Context, name string) (uuid.UUID, error) + // create or update metro + Update(ctx context.Context, metro *infrav3.Location) (*infrav3.Location, error) + // delete metro + Delete(ctx context.Context, metro *infrav3.Location) (*infrav3.Location, error) + // list metro + List(ctx context.Context, partner string) (*infrav3.LocationList, error) +} + +// metroService implements MetroService +type metroService struct { + dao pg.EntityDAO + adao pg.EntityDAO +} + +// NewProjectService return new project service +func NewMetroService(db *bun.DB, adb *bun.DB) MetroService { + return &metroService{ + dao: pg.NewEntityDAO(db), + adao: pg.NewEntityDAO(adb), + } +} + +func (s *metroService) Create(ctx context.Context, metro *infrav3.Location) (*infrav3.Location, error) { + + var part models.Partner + _, err := s.adao.GetByName(ctx, metro.Metadata.Partner, &part) + if err != nil { + return nil, err + } + + //convert v3 spec to internal models + metrodb := models.Metro{ + Name: metro.Spec.Name, + CreatedAt: time.Now(), + ModifiedAt: time.Now(), + Trash: false, + Latitude: metro.Spec.Latitude, + Longitude: metro.Spec.Longitude, + City: metro.Spec.City, + State: metro.Spec.State, + Country: metro.Spec.Country, + CountryCode: metro.Spec.CountryCode, + StateCode: metro.Spec.StateCode, + OrganizationId: uuid.Nil, + PartnerId: part.ID, + } + _, err = s.dao.Create(ctx, &metrodb) + if err != nil { + return nil, err + } + + return metro, nil + +} + +func (s *metroService) GetByName(ctx context.Context, name string) (*infrav3.Location, error) { + + var metro infrav3.Location + + entity, err := s.dao.GetByName(ctx, name, &models.Metro{}) + if err != nil { + return nil, err + } + + if metrodb, ok := entity.(*models.Metro); ok { + location := &infrav3.Location{ + Metadata: &commonv3.Metadata{ + Name: metrodb.Name, + ModifiedAt: timestamppb.New(metrodb.ModifiedAt), + }, + Spec: &infrav3.Metro{ + Name: metrodb.Name, + Country: metrodb.Country, + City: metrodb.City, + State: metrodb.State, + Latitude: metrodb.Latitude, + Longitude: metrodb.Longitude, + StateCode: metrodb.StateCode, + CountryCode: metrodb.CountryCode, + }, + } + return location, nil + + } + return &metro, nil +} + +func (s *metroService) GetById(ctx context.Context, id uuid.UUID) (*infrav3.Location, error) { + var location infrav3.Location + + entity, err := s.dao.GetByID(ctx, id, &models.Metro{}) + if err != nil { + return nil, err + } + + if metrodb, ok := entity.(*models.Metro); ok { + + location := &infrav3.Location{ + Metadata: &commonv3.Metadata{ + Name: metrodb.Name, + ModifiedAt: timestamppb.New(metrodb.ModifiedAt), + }, + Spec: &infrav3.Metro{ + Name: metrodb.Name, + Country: metrodb.Country, + City: metrodb.City, + State: metrodb.State, + Latitude: metrodb.Latitude, + Longitude: metrodb.Longitude, + StateCode: metrodb.StateCode, + CountryCode: metrodb.CountryCode, + }, + } + + return location, nil + + } + return &location, nil +} + +func (s *metroService) Update(ctx context.Context, metro *infrav3.Location) (*infrav3.Location, error) { + + entity, err := s.dao.GetByName(ctx, metro.Metadata.Name, &models.Metro{}) + if err != nil { + return metro, err + } + + if metrodb, ok := entity.(*models.Metro); ok { + //update metro details + metrodb.City = metro.Spec.City + metrodb.Country = metro.Spec.Country + metrodb.State = metro.Spec.State + metrodb.StateCode = metro.Spec.StateCode + metrodb.CountryCode = metro.Spec.CountryCode + metrodb.Latitude = metro.Spec.Latitude + metrodb.Longitude = metro.Spec.Longitude + metrodb.ModifiedAt = time.Now() + + _, err = s.dao.Update(ctx, metrodb.ID, metrodb) + if err != nil { + return metro, err + } + } + + return metro, nil +} + +func (s *metroService) Delete(ctx context.Context, metro *infrav3.Location) (*infrav3.Location, error) { + + entity, err := s.dao.GetByName(ctx, metro.Metadata.Name, &models.Metro{}) + if err != nil { + return metro, err + } + if metrodb, ok := entity.(*models.Metro); ok { + err = s.dao.Delete(ctx, metrodb.ID, metrodb) + if err != nil { + return metro, err + } + } + + return metro, nil +} + +func (s *metroService) List(ctx context.Context, partner string) (*infrav3.LocationList, error) { + var locations infrav3.LocationList + var metros []*infrav3.Metro + var metrodbs []models.Metro + + var part models.Partner + _, err := s.adao.GetByName(ctx, partner, &part) + if err != nil { + return nil, err + } + + entities, err := s.dao.List(ctx, uuid.NullUUID{UUID: part.ID, Valid: true}, uuid.NullUUID{UUID: uuid.Nil, Valid: false}, &metrodbs) + if err != nil { + return nil, err + } + + if metrodbs, ok := entities.(*[]models.Metro); ok { + for _, metrodb := range *metrodbs { + + metro := &infrav3.Metro{ + Name: metrodb.Name, + City: metrodb.City, + State: metrodb.State, + Country: metrodb.Country, + Latitude: metrodb.Latitude, + Longitude: metrodb.Longitude, + StateCode: metrodb.StateCode, + CountryCode: metrodb.CountryCode, + } + metros = append(metros, metro) + } + + locations = infrav3.LocationList{ + Metadata: &commonv3.ListMetadata{ + Count: int64(len(metros)), + }, + Items: metros, + } + } + + return &locations, nil +} + +func (s *metroService) GetIDByName(ctx context.Context, name string) (uuid.UUID, error) { + entity, err := s.dao.GetByName(ctx, name, &models.Metro{}) + if err != nil { + return uuid.Nil, err + } + + if metrodb, ok := entity.(*models.Metro); ok { + return metrodb.ID, nil + } + return uuid.Nil, nil +} + +func (s *metroService) Close() error { + return s.dao.Close() +} diff --git a/components/cluster-scheduler/pkg/service/namespace.go b/components/cluster-scheduler/pkg/service/namespace.go new file mode 100644 index 0000000..821c5d2 --- /dev/null +++ b/components/cluster-scheduler/pkg/service/namespace.go @@ -0,0 +1,198 @@ +package service + +import ( + "context" + "encoding/json" + "strconv" + + "github.com/RafaySystems/rcloud-base/components/cluster-scheduler/internal/models" + "github.com/RafaySystems/rcloud-base/components/cluster-scheduler/pkg/patch" + "github.com/RafaySystems/rcloud-base/components/common/pkg/converter" + commonv3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/commonpb/v3" + "github.com/RafaySystems/rcloud-base/components/common/proto/types/config" + "github.com/RafaySystems/rcloud-base/components/common/proto/types/controller" + infrav3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/infrapb/v3" + "github.com/RafaySystems/rcloud-base/components/common/proto/types/scheduler" + "github.com/google/uuid" +) + +func (s *clusterService) GetNamespacesForConditions(ctx context.Context, conditions []scheduler.ClusterNamespaceCondition, clusterID string) (*scheduler.ClusterNamespaceList, error) { + + cns, count, err := s.cndao.GetNamespacesForConditions(ctx, uuid.MustParse(clusterID), conditions) + if err != nil { + return nil, err + } + + cnl := scheduler.ClusterNamespaceList{} + cnl.Metadata.Count = int64(count) + + var items []*scheduler.ClusterNamespace + for _, cn := range cns { + ns := &config.NamespaceTemplate{} + if err = json.Unmarshal(cn.Namespace, ns); err != nil { + return nil, nil + } + cnd := make([]*scheduler.ClusterNamespaceCondition, 0, 10) + if err = json.Unmarshal(cn.Conditions, &cnd); err != nil { + return nil, nil + } + st := &controller.NamespaceStatus{} + if err = json.Unmarshal(cn.Status, st); err != nil { + return nil, nil + } + nstype, err := strconv.Atoi(cn.Type) + if err != nil { + return nil, nil + } + items = append(items, &scheduler.ClusterNamespace{ + Metadata: &commonv3.Metadata{ + Name: cn.Name, + }, + Spec: &scheduler.ClusterNamespaceSpec{ + Type: scheduler.ClusterNamespaceType(nstype), + ClusterID: cn.ClusterId.String(), + Namespace: ns, + }, + Status: &scheduler.ClusterNamespaceStatus{ + Conditions: cnd, + Status: st, + }, + }) + } + cnl.Items = items + + return &cnl, nil +} + +func (s *clusterService) GetNamespaces(ctx context.Context, clusterID string) (*scheduler.ClusterNamespaceList, error) { + + cns, err := s.cndao.GetNamespaces(ctx, uuid.MustParse(clusterID)) + if err != nil { + return nil, err + } + + cnl := scheduler.ClusterNamespaceList{} + + var items []*scheduler.ClusterNamespace + for _, cn := range cns { + ns := &config.NamespaceTemplate{} + if err = json.Unmarshal(cn.Namespace, ns); err != nil { + return nil, nil + } + cnd := make([]*scheduler.ClusterNamespaceCondition, 0, 10) + if err = json.Unmarshal(cn.Conditions, &cnd); err != nil { + return nil, nil + } + st := &controller.NamespaceStatus{} + if err = json.Unmarshal(cn.Status, st); err != nil { + return nil, nil + } + nstype, err := strconv.Atoi(cn.Type) + if err != nil { + return nil, nil + } + items = append(items, &scheduler.ClusterNamespace{ + Metadata: &commonv3.Metadata{ + Name: cn.Name, + }, + Spec: &scheduler.ClusterNamespaceSpec{ + Type: scheduler.ClusterNamespaceType(nstype), + ClusterID: cn.ClusterId.String(), + Namespace: ns, + }, + Status: &scheduler.ClusterNamespaceStatus{ + Conditions: cnd, + Status: st, + }, + }) + } + cnl.Items = items + cnl.Metadata.Count = int64(len(items)) + + return &cnl, nil +} + +func (s *clusterService) GetNamespace(ctx context.Context, namespace string, clusterID string) (*scheduler.ClusterNamespace, error) { + + cn, err := s.cndao.GetNamespace(ctx, uuid.MustParse(clusterID), namespace) + if err != nil { + return nil, err + } + + ns := &config.NamespaceTemplate{} + if err = json.Unmarshal(cn.Namespace, ns); err != nil { + return nil, nil + } + cnd := make([]*scheduler.ClusterNamespaceCondition, 0, 10) + if err = json.Unmarshal(cn.Conditions, &cnd); err != nil { + return nil, nil + } + st := &controller.NamespaceStatus{} + if err = json.Unmarshal(cn.Status, st); err != nil { + return nil, nil + } + nstype, err := strconv.Atoi(cn.Type) + if err != nil { + return nil, nil + } + cns := &scheduler.ClusterNamespace{ + Metadata: &commonv3.Metadata{ + Name: cn.Name, + }, + Spec: &scheduler.ClusterNamespaceSpec{ + Type: scheduler.ClusterNamespaceType(nstype), + ClusterID: cn.ClusterId.String(), + Namespace: ns, + }, + Status: &scheduler.ClusterNamespaceStatus{ + Conditions: cnd, + Status: st, + }, + } + + return cns, nil +} + +func (s *clusterService) UpdateNamespaceStatus(ctx context.Context, current *scheduler.ClusterNamespace) error { + + existing, err := s.GetNamespace(ctx, current.Metadata.Name, current.Spec.ClusterID) + if err != nil { + return err + } + + err = patch.NamespaceStatus(existing.Status, current.Status) + if err != nil { + return err + } + + cn := models.ClusterNamespace{ + ClusterId: uuid.MustParse(existing.Spec.ClusterID), + Name: existing.Metadata.Name, + Type: existing.Spec.Type.String(), + Namespace: converter.ConvertToJsonRawMessage(existing.Spec.Namespace), + Conditions: converter.ConvertToJsonRawMessage(existing.Status.Conditions), + Status: converter.ConvertToJsonRawMessage(existing.Status), + } + + err = s.cndao.UpdateNamespaceStatus(ctx, &cn) + if err != nil { + return err + } + + //TODO: as part of gitops + /*ev := event.Resource{ + EventType: event.ResourceUpdateStatus, + ID: namespace.ClusterID, + } + + for _, h := range s.workloadHandlers { + h.OnChange(ev) + }*/ + + return nil +} + +func (s *clusterService) GetNamespaceHashes(ctx context.Context, clusterID string) ([]infrav3.NameHash, error) { + nameHashes, err := s.cndao.GetNamespaceHashes(ctx, uuid.MustParse(clusterID)) + return nameHashes, err +} diff --git a/components/cluster-scheduler/proto/rpc/metro.pb.go b/components/cluster-scheduler/proto/rpc/metro.pb.go new file mode 100644 index 0000000..aa5d779 --- /dev/null +++ b/components/cluster-scheduler/proto/rpc/metro.pb.go @@ -0,0 +1,178 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc (unknown) +// source: proto/rpc/metro.proto + +package rpc + +import ( + v3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/infrapb/v3" + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +var File_proto_rpc_metro_proto protoreflect.FileDescriptor + +var file_proto_rpc_metro_proto_rawDesc = []byte{ + 0x0a, 0x15, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x6d, 0x65, 0x74, 0x72, + 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, + 0x65, 0x76, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x73, 0x72, 0x76, 0x2e, 0x72, 0x70, 0x63, 0x1a, + 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, + 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x69, 0x6e, 0x66, 0x72, 0x61, + 0x70, 0x62, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x32, 0xfa, 0x06, 0x0a, 0x08, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0xc9, 0x01, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x4c, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x22, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, + 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2e, + 0x76, 0x33, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x6f, 0x92, 0x41, 0x3a, + 0x4a, 0x38, 0x0a, 0x03, 0x32, 0x30, 0x31, 0x12, 0x31, 0x0a, 0x2f, 0x52, 0x65, 0x74, 0x75, 0x72, + 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x20, 0x69, 0x73, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x73, 0x75, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x66, 0x75, 0x6c, 0x6c, 0x79, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c, + 0x22, 0x27, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x2f, 0x7b, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x7d, + 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x01, 0x2a, 0x12, 0x8b, 0x01, 0x0a, + 0x0c, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x22, 0x2e, + 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, + 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x1a, 0x26, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x2f, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x29, 0x12, 0x27, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x2f, 0x7b, + 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, + 0x7d, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x96, 0x01, 0x0a, 0x0b, 0x47, + 0x65, 0x74, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x2e, 0x72, 0x61, 0x66, + 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x66, + 0x72, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x22, + 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x22, 0x3f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x39, 0x12, 0x37, 0x2f, 0x76, 0x33, 0x2f, + 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x2e, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x7d, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6e, 0x61, + 0x6d, 0x65, 0x7d, 0x12, 0x9c, 0x01, 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4c, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, + 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2e, 0x76, + 0x33, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x22, 0x2e, 0x72, 0x61, 0x66, + 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x66, + 0x72, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x42, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3c, 0x1a, 0x37, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x61, 0x72, 0x74, + 0x6e, 0x65, 0x72, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x61, + 0x72, 0x74, 0x6e, 0x65, 0x72, 0x7d, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, + 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x3a, + 0x01, 0x2a, 0x12, 0xdb, 0x01, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, + 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2e, 0x76, 0x33, + 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x22, 0x2e, 0x72, 0x61, 0x66, 0x61, + 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x66, 0x72, + 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x80, 0x01, + 0x92, 0x41, 0x3e, 0x4a, 0x3c, 0x0a, 0x03, 0x32, 0x30, 0x34, 0x12, 0x35, 0x0a, 0x33, 0x52, 0x65, + 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x6f, 0x72, 0x67, 0x61, + 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x73, 0x20, 0x64, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x64, 0x20, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x66, 0x75, 0x6c, 0x6c, 0x79, + 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x39, 0x2a, 0x37, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x61, 0x72, + 0x74, 0x6e, 0x65, 0x72, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, + 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x7d, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, + 0x42, 0xcf, 0x04, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, + 0x65, 0x76, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x73, 0x72, 0x76, 0x2e, 0x72, 0x70, 0x63, 0x42, + 0x0a, 0x4d, 0x65, 0x74, 0x72, 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4a, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x61, 0x66, 0x61, 0x79, 0x53, + 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x2f, 0x72, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x62, 0x61, + 0x73, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x63, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x2d, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x70, 0x63, 0xa2, 0x02, 0x04, 0x52, 0x44, 0x41, 0x52, + 0xaa, 0x02, 0x16, 0x52, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x44, 0x65, 0x76, 0x2e, 0x41, 0x64, 0x6d, + 0x69, 0x6e, 0x73, 0x72, 0x76, 0x2e, 0x52, 0x70, 0x63, 0xca, 0x02, 0x16, 0x52, 0x61, 0x66, 0x61, + 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x73, 0x72, 0x76, 0x5c, 0x52, + 0x70, 0x63, 0xe2, 0x02, 0x22, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x41, + 0x64, 0x6d, 0x69, 0x6e, 0x73, 0x72, 0x76, 0x5c, 0x52, 0x70, 0x63, 0x5c, 0x47, 0x50, 0x42, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x19, 0x52, 0x61, 0x66, 0x61, 0x79, 0x3a, + 0x3a, 0x44, 0x65, 0x76, 0x3a, 0x3a, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x73, 0x72, 0x76, 0x3a, 0x3a, + 0x52, 0x70, 0x63, 0x92, 0x41, 0xdb, 0x02, 0x12, 0x24, 0x0a, 0x10, 0x4c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x20, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x22, 0x0b, 0x0a, 0x09, 0x52, + 0x61, 0x66, 0x61, 0x79, 0x20, 0x44, 0x65, 0x76, 0x32, 0x03, 0x33, 0x2e, 0x30, 0x2a, 0x01, 0x02, + 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, + 0x6f, 0x6e, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, + 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2f, 0x79, 0x61, 0x6d, 0x6c, 0x52, 0x50, 0x0a, 0x03, 0x34, 0x30, 0x33, 0x12, + 0x49, 0x0a, 0x47, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, + 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, + 0x6f, 0x74, 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x65, + 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x52, 0x3b, 0x0a, 0x03, 0x34, 0x30, + 0x34, 0x12, 0x34, 0x0a, 0x2a, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, + 0x65, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, + 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x65, 0x78, 0x69, 0x73, 0x74, 0x2e, 0x12, + 0x06, 0x0a, 0x04, 0x9a, 0x02, 0x01, 0x07, 0x5a, 0x38, 0x0a, 0x25, 0x0a, 0x0a, 0x41, 0x70, 0x69, + 0x4b, 0x65, 0x79, 0x41, 0x75, 0x74, 0x68, 0x12, 0x17, 0x08, 0x02, 0x1a, 0x11, 0x58, 0x2d, 0x52, + 0x41, 0x46, 0x41, 0x59, 0x2d, 0x41, 0x50, 0x49, 0x2d, 0x4b, 0x45, 0x59, 0x49, 0x44, 0x20, 0x02, + 0x0a, 0x0f, 0x0a, 0x09, 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, 0x68, 0x12, 0x02, 0x08, + 0x01, 0x62, 0x1f, 0x0a, 0x0e, 0x0a, 0x0a, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x41, 0x75, 0x74, + 0x68, 0x12, 0x00, 0x0a, 0x0d, 0x0a, 0x09, 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, 0x68, + 0x12, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var file_proto_rpc_metro_proto_goTypes = []interface{}{ + (*v3.Location)(nil), // 0: rafay.dev.types.infra.v3.Location + (*v3.LocationList)(nil), // 1: rafay.dev.types.infra.v3.LocationList +} +var file_proto_rpc_metro_proto_depIdxs = []int32{ + 0, // 0: rafay.dev.adminsrv.rpc.Location.CreateLocation:input_type -> rafay.dev.types.infra.v3.Location + 0, // 1: rafay.dev.adminsrv.rpc.Location.GetLocations:input_type -> rafay.dev.types.infra.v3.Location + 0, // 2: rafay.dev.adminsrv.rpc.Location.GetLocation:input_type -> rafay.dev.types.infra.v3.Location + 0, // 3: rafay.dev.adminsrv.rpc.Location.UpdateLocation:input_type -> rafay.dev.types.infra.v3.Location + 0, // 4: rafay.dev.adminsrv.rpc.Location.DeleteLocation:input_type -> rafay.dev.types.infra.v3.Location + 0, // 5: rafay.dev.adminsrv.rpc.Location.CreateLocation:output_type -> rafay.dev.types.infra.v3.Location + 1, // 6: rafay.dev.adminsrv.rpc.Location.GetLocations:output_type -> rafay.dev.types.infra.v3.LocationList + 0, // 7: rafay.dev.adminsrv.rpc.Location.GetLocation:output_type -> rafay.dev.types.infra.v3.Location + 0, // 8: rafay.dev.adminsrv.rpc.Location.UpdateLocation:output_type -> rafay.dev.types.infra.v3.Location + 0, // 9: rafay.dev.adminsrv.rpc.Location.DeleteLocation:output_type -> rafay.dev.types.infra.v3.Location + 5, // [5:10] is the sub-list for method output_type + 0, // [0:5] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_proto_rpc_metro_proto_init() } +func file_proto_rpc_metro_proto_init() { + if File_proto_rpc_metro_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_proto_rpc_metro_proto_rawDesc, + NumEnums: 0, + NumMessages: 0, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_proto_rpc_metro_proto_goTypes, + DependencyIndexes: file_proto_rpc_metro_proto_depIdxs, + }.Build() + File_proto_rpc_metro_proto = out.File + file_proto_rpc_metro_proto_rawDesc = nil + file_proto_rpc_metro_proto_goTypes = nil + file_proto_rpc_metro_proto_depIdxs = nil +} diff --git a/components/cluster-scheduler/proto/rpc/metro.pb.gw.go b/components/cluster-scheduler/proto/rpc/metro.pb.gw.go new file mode 100644 index 0000000..e45678a --- /dev/null +++ b/components/cluster-scheduler/proto/rpc/metro.pb.gw.go @@ -0,0 +1,728 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: proto/rpc/metro.proto + +/* +Package rpc is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package rpc + +import ( + "context" + "io" + "net/http" + + "github.com/RafaySystems/rcloud-base/components/common/proto/types/infrapb/v3" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + +func request_Location_CreateLocation_0(ctx context.Context, marshaler runtime.Marshaler, client LocationClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq infrav3.Location + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["metadata.partner"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.partner") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.partner", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.partner", err) + } + + msg, err := client.CreateLocation(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Location_CreateLocation_0(ctx context.Context, marshaler runtime.Marshaler, server LocationServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq infrav3.Location + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["metadata.partner"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.partner") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.partner", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.partner", err) + } + + msg, err := server.CreateLocation(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Location_GetLocations_0 = &utilities.DoubleArray{Encoding: map[string]int{"metadata": 0, "partner": 1}, Base: []int{1, 1, 1, 0}, Check: []int{0, 1, 2, 3}} +) + +func request_Location_GetLocations_0(ctx context.Context, marshaler runtime.Marshaler, client LocationClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq infrav3.Location + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["metadata.partner"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.partner") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.partner", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.partner", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Location_GetLocations_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetLocations(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Location_GetLocations_0(ctx context.Context, marshaler runtime.Marshaler, server LocationServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq infrav3.Location + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["metadata.partner"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.partner") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.partner", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.partner", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Location_GetLocations_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetLocations(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Location_GetLocation_0 = &utilities.DoubleArray{Encoding: map[string]int{"metadata": 0, "partner": 1, "name": 2}, Base: []int{1, 1, 1, 2, 0, 0}, Check: []int{0, 1, 2, 2, 3, 4}} +) + +func request_Location_GetLocation_0(ctx context.Context, marshaler runtime.Marshaler, client LocationClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq infrav3.Location + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["metadata.partner"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.partner") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.partner", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.partner", err) + } + + val, ok = pathParams["metadata.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.name", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Location_GetLocation_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetLocation(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Location_GetLocation_0(ctx context.Context, marshaler runtime.Marshaler, server LocationServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq infrav3.Location + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["metadata.partner"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.partner") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.partner", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.partner", err) + } + + val, ok = pathParams["metadata.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.name", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Location_GetLocation_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetLocation(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Location_UpdateLocation_0(ctx context.Context, marshaler runtime.Marshaler, client LocationClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq infrav3.Location + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["metadata.partner"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.partner") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.partner", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.partner", err) + } + + val, ok = pathParams["metadata.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.name", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.name", err) + } + + msg, err := client.UpdateLocation(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Location_UpdateLocation_0(ctx context.Context, marshaler runtime.Marshaler, server LocationServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq infrav3.Location + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["metadata.partner"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.partner") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.partner", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.partner", err) + } + + val, ok = pathParams["metadata.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.name", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.name", err) + } + + msg, err := server.UpdateLocation(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Location_DeleteLocation_0 = &utilities.DoubleArray{Encoding: map[string]int{"metadata": 0, "partner": 1, "name": 2}, Base: []int{1, 1, 1, 2, 0, 0}, Check: []int{0, 1, 2, 2, 3, 4}} +) + +func request_Location_DeleteLocation_0(ctx context.Context, marshaler runtime.Marshaler, client LocationClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq infrav3.Location + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["metadata.partner"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.partner") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.partner", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.partner", err) + } + + val, ok = pathParams["metadata.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.name", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Location_DeleteLocation_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.DeleteLocation(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Location_DeleteLocation_0(ctx context.Context, marshaler runtime.Marshaler, server LocationServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq infrav3.Location + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["metadata.partner"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.partner") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.partner", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.partner", err) + } + + val, ok = pathParams["metadata.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.name", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Location_DeleteLocation_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.DeleteLocation(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterLocationHandlerServer registers the http handlers for service Location to "mux". +// UnaryRPC :call LocationServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterLocationHandlerFromEndpoint instead. +func RegisterLocationHandlerServer(ctx context.Context, mux *runtime.ServeMux, server LocationServer) error { + + mux.Handle("POST", pattern_Location_CreateLocation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.adminsrv.rpc.Location/CreateLocation", runtime.WithHTTPPathPattern("/v3/partner/{metadata.partner}/location")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Location_CreateLocation_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Location_CreateLocation_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Location_GetLocations_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.adminsrv.rpc.Location/GetLocations", runtime.WithHTTPPathPattern("/v3/partner/{metadata.partner}/location")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Location_GetLocations_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Location_GetLocations_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Location_GetLocation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.adminsrv.rpc.Location/GetLocation", runtime.WithHTTPPathPattern("/v3/partner/{metadata.partner}/location/{metadata.name}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Location_GetLocation_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Location_GetLocation_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_Location_UpdateLocation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.adminsrv.rpc.Location/UpdateLocation", runtime.WithHTTPPathPattern("/v3/partner/{metadata.partner}/location/{metadata.name}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Location_UpdateLocation_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Location_UpdateLocation_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("DELETE", pattern_Location_DeleteLocation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.adminsrv.rpc.Location/DeleteLocation", runtime.WithHTTPPathPattern("/v3/partner/{metadata.partner}/location/{metadata.name}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Location_DeleteLocation_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Location_DeleteLocation_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterLocationHandlerFromEndpoint is same as RegisterLocationHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterLocationHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterLocationHandler(ctx, mux, conn) +} + +// RegisterLocationHandler registers the http handlers for service Location to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterLocationHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterLocationHandlerClient(ctx, mux, NewLocationClient(conn)) +} + +// RegisterLocationHandlerClient registers the http handlers for service Location +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "LocationClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "LocationClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "LocationClient" to call the correct interceptors. +func RegisterLocationHandlerClient(ctx context.Context, mux *runtime.ServeMux, client LocationClient) error { + + mux.Handle("POST", pattern_Location_CreateLocation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.adminsrv.rpc.Location/CreateLocation", runtime.WithHTTPPathPattern("/v3/partner/{metadata.partner}/location")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Location_CreateLocation_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Location_CreateLocation_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Location_GetLocations_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.adminsrv.rpc.Location/GetLocations", runtime.WithHTTPPathPattern("/v3/partner/{metadata.partner}/location")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Location_GetLocations_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Location_GetLocations_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Location_GetLocation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.adminsrv.rpc.Location/GetLocation", runtime.WithHTTPPathPattern("/v3/partner/{metadata.partner}/location/{metadata.name}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Location_GetLocation_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Location_GetLocation_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_Location_UpdateLocation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.adminsrv.rpc.Location/UpdateLocation", runtime.WithHTTPPathPattern("/v3/partner/{metadata.partner}/location/{metadata.name}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Location_UpdateLocation_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Location_UpdateLocation_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("DELETE", pattern_Location_DeleteLocation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.adminsrv.rpc.Location/DeleteLocation", runtime.WithHTTPPathPattern("/v3/partner/{metadata.partner}/location/{metadata.name}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Location_DeleteLocation_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Location_DeleteLocation_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Location_CreateLocation_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"v3", "partner", "metadata.partner", "location"}, "")) + + pattern_Location_GetLocations_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"v3", "partner", "metadata.partner", "location"}, "")) + + pattern_Location_GetLocation_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"v3", "partner", "metadata.partner", "location", "metadata.name"}, "")) + + pattern_Location_UpdateLocation_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"v3", "partner", "metadata.partner", "location", "metadata.name"}, "")) + + pattern_Location_DeleteLocation_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"v3", "partner", "metadata.partner", "location", "metadata.name"}, "")) +) + +var ( + forward_Location_CreateLocation_0 = runtime.ForwardResponseMessage + + forward_Location_GetLocations_0 = runtime.ForwardResponseMessage + + forward_Location_GetLocation_0 = runtime.ForwardResponseMessage + + forward_Location_UpdateLocation_0 = runtime.ForwardResponseMessage + + forward_Location_DeleteLocation_0 = runtime.ForwardResponseMessage +) diff --git a/components/cluster-scheduler/proto/rpc/metro.proto b/components/cluster-scheduler/proto/rpc/metro.proto new file mode 100644 index 0000000..de0b34e --- /dev/null +++ b/components/cluster-scheduler/proto/rpc/metro.proto @@ -0,0 +1,110 @@ +syntax = "proto3"; +package rafay.dev.adminsrv.rpc; + +import "google/api/annotations.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; +import "proto/types/infrapb/v3/cluster.proto"; + +option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { + info: { + title: "Location Service" + version: "3.0" + contact: { name: "Rafay Dev" } + } + schemes: HTTPS + consumes: "application/json" + consumes: "application/yaml" + produces: "application/json" + produces: "application/yaml" + security_definitions: { + security: { + key: "BasicAuth" + value: { type: TYPE_BASIC } + } + security: { + key: "ApiKeyAuth" + value: { type: TYPE_API_KEY in: IN_HEADER name: "X-RAFAY-API-KEYID" } + } + } + security: { + security_requirement: { + key: "BasicAuth" + value: {} + } + security_requirement: { + key: "ApiKeyAuth" + value: {} + } + } + responses: { + key: "403" + value: { + description: "Returned when the user does not have permission to access the resource." + } + } + responses: { + key: "404" + value: { + description: "Returned when the resource does not exist." + schema: { json_schema: { type: STRING } } + } + } + }; + + service Location { + rpc CreateLocation(rafay.dev.types.infra.v3.Location) + returns (rafay.dev.types.infra.v3.Location) { + option (google.api.http) = { + post : "/v3/partner/{metadata.partner}/location" + body : "*" + }; + + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + responses : { + key : "201" + value : { + description : "Returned when location is created successfully." + } + } + }; + }; + + rpc GetLocations(rafay.dev.types.infra.v3.Location) + returns (rafay.dev.types.infra.v3.LocationList) { + option (google.api.http) = { + get : "/v3/partner/{metadata.partner}/location" + }; + }; + + rpc GetLocation(rafay.dev.types.infra.v3.Location) + returns (rafay.dev.types.infra.v3.Location) { + option (google.api.http) = { + get : "/v3/partner/{metadata.partner}/location/{metadata.name}" + }; + }; + + rpc UpdateLocation(rafay.dev.types.infra.v3.Location) + returns (rafay.dev.types.infra.v3.Location) { + option (google.api.http) = { + put : "/v3/partner/{metadata.partner}/location/{metadata.name}" + body : "*" + }; + }; + + rpc DeleteLocation(rafay.dev.types.infra.v3.Location) + returns (rafay.dev.types.infra.v3.Location) { + option (google.api.http) = { + delete : "/v3/partner/{metadata.partner}/location/{metadata.name}" + }; + + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + responses : { + key : "204" + value : { + description : "Returned when organization is deleted successfully." + } + } + }; + }; + + } \ No newline at end of file diff --git a/components/cluster-scheduler/proto/rpc/metro_grpc.pb.go b/components/cluster-scheduler/proto/rpc/metro_grpc.pb.go new file mode 100644 index 0000000..4846c09 --- /dev/null +++ b/components/cluster-scheduler/proto/rpc/metro_grpc.pb.go @@ -0,0 +1,248 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.2.0 +// - protoc (unknown) +// source: proto/rpc/metro.proto + +package rpc + +import ( + context "context" + v3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/infrapb/v3" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// LocationClient is the client API for Location service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type LocationClient interface { + CreateLocation(ctx context.Context, in *v3.Location, opts ...grpc.CallOption) (*v3.Location, error) + GetLocations(ctx context.Context, in *v3.Location, opts ...grpc.CallOption) (*v3.LocationList, error) + GetLocation(ctx context.Context, in *v3.Location, opts ...grpc.CallOption) (*v3.Location, error) + UpdateLocation(ctx context.Context, in *v3.Location, opts ...grpc.CallOption) (*v3.Location, error) + DeleteLocation(ctx context.Context, in *v3.Location, opts ...grpc.CallOption) (*v3.Location, error) +} + +type locationClient struct { + cc grpc.ClientConnInterface +} + +func NewLocationClient(cc grpc.ClientConnInterface) LocationClient { + return &locationClient{cc} +} + +func (c *locationClient) CreateLocation(ctx context.Context, in *v3.Location, opts ...grpc.CallOption) (*v3.Location, error) { + out := new(v3.Location) + err := c.cc.Invoke(ctx, "/rafay.dev.adminsrv.rpc.Location/CreateLocation", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *locationClient) GetLocations(ctx context.Context, in *v3.Location, opts ...grpc.CallOption) (*v3.LocationList, error) { + out := new(v3.LocationList) + err := c.cc.Invoke(ctx, "/rafay.dev.adminsrv.rpc.Location/GetLocations", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *locationClient) GetLocation(ctx context.Context, in *v3.Location, opts ...grpc.CallOption) (*v3.Location, error) { + out := new(v3.Location) + err := c.cc.Invoke(ctx, "/rafay.dev.adminsrv.rpc.Location/GetLocation", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *locationClient) UpdateLocation(ctx context.Context, in *v3.Location, opts ...grpc.CallOption) (*v3.Location, error) { + out := new(v3.Location) + err := c.cc.Invoke(ctx, "/rafay.dev.adminsrv.rpc.Location/UpdateLocation", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *locationClient) DeleteLocation(ctx context.Context, in *v3.Location, opts ...grpc.CallOption) (*v3.Location, error) { + out := new(v3.Location) + err := c.cc.Invoke(ctx, "/rafay.dev.adminsrv.rpc.Location/DeleteLocation", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// LocationServer is the server API for Location service. +// All implementations should embed UnimplementedLocationServer +// for forward compatibility +type LocationServer interface { + CreateLocation(context.Context, *v3.Location) (*v3.Location, error) + GetLocations(context.Context, *v3.Location) (*v3.LocationList, error) + GetLocation(context.Context, *v3.Location) (*v3.Location, error) + UpdateLocation(context.Context, *v3.Location) (*v3.Location, error) + DeleteLocation(context.Context, *v3.Location) (*v3.Location, error) +} + +// UnimplementedLocationServer should be embedded to have forward compatible implementations. +type UnimplementedLocationServer struct { +} + +func (UnimplementedLocationServer) CreateLocation(context.Context, *v3.Location) (*v3.Location, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateLocation not implemented") +} +func (UnimplementedLocationServer) GetLocations(context.Context, *v3.Location) (*v3.LocationList, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetLocations not implemented") +} +func (UnimplementedLocationServer) GetLocation(context.Context, *v3.Location) (*v3.Location, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetLocation not implemented") +} +func (UnimplementedLocationServer) UpdateLocation(context.Context, *v3.Location) (*v3.Location, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateLocation not implemented") +} +func (UnimplementedLocationServer) DeleteLocation(context.Context, *v3.Location) (*v3.Location, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteLocation not implemented") +} + +// UnsafeLocationServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to LocationServer will +// result in compilation errors. +type UnsafeLocationServer interface { + mustEmbedUnimplementedLocationServer() +} + +func RegisterLocationServer(s grpc.ServiceRegistrar, srv LocationServer) { + s.RegisterService(&Location_ServiceDesc, srv) +} + +func _Location_CreateLocation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v3.Location) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(LocationServer).CreateLocation(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rafay.dev.adminsrv.rpc.Location/CreateLocation", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(LocationServer).CreateLocation(ctx, req.(*v3.Location)) + } + return interceptor(ctx, in, info, handler) +} + +func _Location_GetLocations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v3.Location) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(LocationServer).GetLocations(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rafay.dev.adminsrv.rpc.Location/GetLocations", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(LocationServer).GetLocations(ctx, req.(*v3.Location)) + } + return interceptor(ctx, in, info, handler) +} + +func _Location_GetLocation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v3.Location) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(LocationServer).GetLocation(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rafay.dev.adminsrv.rpc.Location/GetLocation", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(LocationServer).GetLocation(ctx, req.(*v3.Location)) + } + return interceptor(ctx, in, info, handler) +} + +func _Location_UpdateLocation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v3.Location) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(LocationServer).UpdateLocation(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rafay.dev.adminsrv.rpc.Location/UpdateLocation", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(LocationServer).UpdateLocation(ctx, req.(*v3.Location)) + } + return interceptor(ctx, in, info, handler) +} + +func _Location_DeleteLocation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v3.Location) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(LocationServer).DeleteLocation(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rafay.dev.adminsrv.rpc.Location/DeleteLocation", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(LocationServer).DeleteLocation(ctx, req.(*v3.Location)) + } + return interceptor(ctx, in, info, handler) +} + +// Location_ServiceDesc is the grpc.ServiceDesc for Location service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Location_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "rafay.dev.adminsrv.rpc.Location", + HandlerType: (*LocationServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateLocation", + Handler: _Location_CreateLocation_Handler, + }, + { + MethodName: "GetLocations", + Handler: _Location_GetLocations_Handler, + }, + { + MethodName: "GetLocation", + Handler: _Location_GetLocation_Handler, + }, + { + MethodName: "UpdateLocation", + Handler: _Location_UpdateLocation_Handler, + }, + { + MethodName: "DeleteLocation", + Handler: _Location_DeleteLocation_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "proto/rpc/metro.proto", +} diff --git a/components/cluster-scheduler/proto/rpc/v3/cluster.pb.go b/components/cluster-scheduler/proto/rpc/v3/cluster.pb.go deleted file mode 100644 index 39a770c..0000000 --- a/components/cluster-scheduler/proto/rpc/v3/cluster.pb.go +++ /dev/null @@ -1,428 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.1 -// protoc (unknown) -// source: proto/rpc/v3/cluster.proto - -package rpcv3 - -import ( - v31 "github.com/RafaySystems/rcloud-base/components/common/proto/types/commonpb/v3" - v3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/infrapb/v3" - _ "github.com/gogo/protobuf/gogoproto" - _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type RegisterClusterRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` - SigningRequest []byte `protobuf:"bytes,2,opt,name=signingRequest,proto3" json:"signingRequest,omitempty"` -} - -func (x *RegisterClusterRequest) Reset() { - *x = RegisterClusterRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_rpc_v3_cluster_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RegisterClusterRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RegisterClusterRequest) ProtoMessage() {} - -func (x *RegisterClusterRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_rpc_v3_cluster_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RegisterClusterRequest.ProtoReflect.Descriptor instead. -func (*RegisterClusterRequest) Descriptor() ([]byte, []int) { - return file_proto_rpc_v3_cluster_proto_rawDescGZIP(), []int{0} -} - -func (x *RegisterClusterRequest) GetToken() string { - if x != nil { - return x.Token - } - return "" -} - -func (x *RegisterClusterRequest) GetSigningRequest() []byte { - if x != nil { - return x.SigningRequest - } - return nil -} - -type RegisterClusterResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Certificate []byte `protobuf:"bytes,1,opt,name=certificate,proto3" json:"certificate,omitempty"` - CaCertificate []byte `protobuf:"bytes,2,opt,name=caCertificate,proto3" json:"caCertificate,omitempty"` -} - -func (x *RegisterClusterResponse) Reset() { - *x = RegisterClusterResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_rpc_v3_cluster_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RegisterClusterResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RegisterClusterResponse) ProtoMessage() {} - -func (x *RegisterClusterResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_rpc_v3_cluster_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RegisterClusterResponse.ProtoReflect.Descriptor instead. -func (*RegisterClusterResponse) Descriptor() ([]byte, []int) { - return file_proto_rpc_v3_cluster_proto_rawDescGZIP(), []int{1} -} - -func (x *RegisterClusterResponse) GetCertificate() []byte { - if x != nil { - return x.Certificate - } - return nil -} - -func (x *RegisterClusterResponse) GetCaCertificate() []byte { - if x != nil { - return x.CaCertificate - } - return nil -} - -type DeleteClusterResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *DeleteClusterResponse) Reset() { - *x = DeleteClusterResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_rpc_v3_cluster_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteClusterResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteClusterResponse) ProtoMessage() {} - -func (x *DeleteClusterResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_rpc_v3_cluster_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteClusterResponse.ProtoReflect.Descriptor instead. -func (*DeleteClusterResponse) Descriptor() ([]byte, []int) { - return file_proto_rpc_v3_cluster_proto_rawDescGZIP(), []int{2} -} - -var File_proto_rpc_v3_cluster_proto protoreflect.FileDescriptor - -var file_proto_rpc_v3_cluster_proto_rawDesc = []byte{ - 0x0a, 0x1a, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x76, 0x33, 0x2f, 0x63, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x72, 0x61, - 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x1a, 0x1c, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, - 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, - 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x24, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, - 0x69, 0x6e, 0x66, 0x72, 0x61, 0x70, 0x62, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, - 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x70, 0x62, 0x2f, 0x76, - 0x33, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x56, - 0x0a, 0x16, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, - 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x26, - 0x0a, 0x0e, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0e, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x61, 0x0a, 0x17, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, - 0x65, 0x72, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, - 0x61, 0x74, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x63, 0x61, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, - 0x63, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x63, 0x61, 0x43, 0x65, - 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x22, 0x17, 0x0a, 0x15, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x32, 0xc4, 0x09, 0x0a, 0x07, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0xc7, - 0x01, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x12, 0x21, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, - 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x1a, 0x21, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, - 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x43, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x22, 0x70, 0x92, 0x41, 0x36, 0x4a, 0x34, 0x0a, 0x03, 0x32, - 0x30, 0x31, 0x12, 0x2d, 0x0a, 0x2b, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, - 0x68, 0x65, 0x6e, 0x20, 0x65, 0x64, 0x67, 0x65, 0x20, 0x69, 0x73, 0x20, 0x63, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x64, 0x20, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x66, 0x75, 0x6c, 0x6c, 0x79, - 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x22, 0x2c, 0x2f, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2f, - 0x76, 0x33, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x63, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x3a, 0x01, 0x2a, 0x12, 0x8c, 0x01, 0x0a, 0x0b, 0x47, 0x65, 0x74, - 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, 0x27, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, - 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, - 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x1a, 0x25, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, - 0x70, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x2d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, - 0x12, 0x25, 0x2f, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x72, 0x6f, 0x6a, - 0x65, 0x63, 0x74, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x44, 0x7d, 0x2f, - 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x98, 0x01, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x43, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x21, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, - 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2e, 0x76, - 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x1a, 0x21, 0x2e, 0x72, 0x61, 0x66, 0x61, - 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x66, 0x72, - 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x22, 0x44, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x3e, 0x12, 0x3c, 0x2f, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2f, 0x76, 0x33, 0x2f, - 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6e, 0x61, 0x6d, - 0x65, 0x7d, 0x12, 0x9e, 0x01, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x12, 0x21, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, - 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2e, 0x76, 0x33, 0x2e, - 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x1a, 0x21, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, - 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2e, - 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x22, 0x47, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x41, 0x1a, 0x3c, 0x2f, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x72, - 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, - 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, - 0x3a, 0x01, 0x2a, 0x12, 0xde, 0x01, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x21, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, - 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2e, 0x76, 0x33, - 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x1a, 0x27, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, - 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x80, 0x01, 0x92, 0x41, 0x39, 0x4a, 0x37, 0x0a, 0x03, 0x32, 0x30, 0x34, 0x12, 0x30, - 0x0a, 0x2e, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, - 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x69, 0x73, 0x20, 0x64, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x64, 0x20, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x66, 0x75, 0x6c, 0x6c, 0x79, 0x2e, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3e, 0x2a, 0x3c, 0x2f, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2f, 0x76, - 0x33, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x63, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6e, - 0x61, 0x6d, 0x65, 0x7d, 0x12, 0x97, 0x01, 0x0a, 0x0f, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, - 0x72, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x28, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, - 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x67, 0x69, - 0x73, 0x74, 0x65, 0x72, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, - 0x70, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x22, 0x24, 0x2f, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2f, 0x76, 0x33, - 0x2f, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x3a, 0x01, 0x2a, 0x12, 0xa8, - 0x01, 0x0a, 0x0f, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x43, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x12, 0x21, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, - 0x79, 0x70, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x1a, 0x23, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, - 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, - 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x42, 0x6f, 0x64, 0x79, 0x22, 0x4d, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x47, 0x12, 0x45, 0x2f, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x72, - 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, - 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, - 0x2f, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0xce, 0x04, 0x0a, 0x14, 0x63, 0x6f, - 0x6d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, - 0x76, 0x33, 0x42, 0x0c, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0x5a, 0x53, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, - 0x61, 0x66, 0x61, 0x79, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x2f, 0x72, 0x63, 0x6c, 0x6f, - 0x75, 0x64, 0x2d, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, - 0x74, 0x73, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2d, 0x73, 0x63, 0x68, 0x65, 0x64, - 0x75, 0x6c, 0x65, 0x72, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x76, - 0x33, 0x3b, 0x72, 0x70, 0x63, 0x76, 0x33, 0xa2, 0x02, 0x03, 0x52, 0x44, 0x52, 0xaa, 0x02, 0x10, - 0x52, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x44, 0x65, 0x76, 0x2e, 0x52, 0x70, 0x63, 0x2e, 0x56, 0x33, - 0xca, 0x02, 0x10, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x52, 0x70, 0x63, - 0x5c, 0x56, 0x33, 0xe2, 0x02, 0x1c, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, - 0x52, 0x70, 0x63, 0x5c, 0x56, 0x33, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0xea, 0x02, 0x13, 0x52, 0x61, 0x66, 0x61, 0x79, 0x3a, 0x3a, 0x44, 0x65, 0x76, 0x3a, - 0x3a, 0x52, 0x70, 0x63, 0x3a, 0x3a, 0x56, 0x33, 0x92, 0x41, 0xda, 0x02, 0x12, 0x23, 0x0a, 0x0f, - 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x20, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x22, - 0x0b, 0x0a, 0x09, 0x52, 0x61, 0x66, 0x61, 0x79, 0x20, 0x44, 0x65, 0x76, 0x32, 0x03, 0x33, 0x2e, - 0x30, 0x2a, 0x01, 0x02, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x2f, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x79, 0x61, 0x6d, 0x6c, 0x52, 0x50, 0x0a, 0x03, - 0x34, 0x30, 0x33, 0x12, 0x49, 0x0a, 0x47, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, - 0x77, 0x68, 0x65, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x64, 0x6f, - 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x70, 0x65, 0x72, 0x6d, - 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, - 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x52, 0x3b, - 0x0a, 0x03, 0x34, 0x30, 0x34, 0x12, 0x34, 0x0a, 0x2a, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, - 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x65, 0x78, 0x69, - 0x73, 0x74, 0x2e, 0x12, 0x06, 0x0a, 0x04, 0x9a, 0x02, 0x01, 0x07, 0x5a, 0x38, 0x0a, 0x25, 0x0a, - 0x0a, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x41, 0x75, 0x74, 0x68, 0x12, 0x17, 0x08, 0x02, 0x1a, - 0x11, 0x58, 0x2d, 0x52, 0x41, 0x46, 0x41, 0x59, 0x2d, 0x41, 0x50, 0x49, 0x2d, 0x4b, 0x45, 0x59, - 0x49, 0x44, 0x20, 0x02, 0x0a, 0x0f, 0x0a, 0x09, 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, - 0x68, 0x12, 0x02, 0x08, 0x01, 0x62, 0x1f, 0x0a, 0x0e, 0x0a, 0x0a, 0x41, 0x70, 0x69, 0x4b, 0x65, - 0x79, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0x0a, 0x0d, 0x0a, 0x09, 0x42, 0x61, 0x73, 0x69, 0x63, - 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0xc8, 0xe2, 0x1e, 0x01, 0xd0, 0xe2, 0x1e, 0x01, 0xe0, 0xe2, - 0x1e, 0x01, 0xc0, 0xe3, 0x1e, 0x01, 0xc8, 0xe3, 0x1e, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, -} - -var ( - file_proto_rpc_v3_cluster_proto_rawDescOnce sync.Once - file_proto_rpc_v3_cluster_proto_rawDescData = file_proto_rpc_v3_cluster_proto_rawDesc -) - -func file_proto_rpc_v3_cluster_proto_rawDescGZIP() []byte { - file_proto_rpc_v3_cluster_proto_rawDescOnce.Do(func() { - file_proto_rpc_v3_cluster_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_rpc_v3_cluster_proto_rawDescData) - }) - return file_proto_rpc_v3_cluster_proto_rawDescData -} - -var file_proto_rpc_v3_cluster_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_proto_rpc_v3_cluster_proto_goTypes = []interface{}{ - (*RegisterClusterRequest)(nil), // 0: rafay.dev.rpc.v3.RegisterClusterRequest - (*RegisterClusterResponse)(nil), // 1: rafay.dev.rpc.v3.RegisterClusterResponse - (*DeleteClusterResponse)(nil), // 2: rafay.dev.rpc.v3.DeleteClusterResponse - (*v3.Cluster)(nil), // 3: rafay.dev.types.infra.v3.Cluster - (*v31.QueryOptions)(nil), // 4: rafay.dev.types.common.v3.QueryOptions - (*v3.ClusterList)(nil), // 5: rafay.dev.types.infra.v3.ClusterList - (*v31.HttpBody)(nil), // 6: rafay.dev.types.common.v3.HttpBody -} -var file_proto_rpc_v3_cluster_proto_depIdxs = []int32{ - 3, // 0: rafay.dev.rpc.v3.Cluster.CreateCluster:input_type -> rafay.dev.types.infra.v3.Cluster - 4, // 1: rafay.dev.rpc.v3.Cluster.GetClusters:input_type -> rafay.dev.types.common.v3.QueryOptions - 3, // 2: rafay.dev.rpc.v3.Cluster.GetCluster:input_type -> rafay.dev.types.infra.v3.Cluster - 3, // 3: rafay.dev.rpc.v3.Cluster.UpdateCluster:input_type -> rafay.dev.types.infra.v3.Cluster - 3, // 4: rafay.dev.rpc.v3.Cluster.DeleteCluster:input_type -> rafay.dev.types.infra.v3.Cluster - 0, // 5: rafay.dev.rpc.v3.Cluster.RegisterCluster:input_type -> rafay.dev.rpc.v3.RegisterClusterRequest - 3, // 6: rafay.dev.rpc.v3.Cluster.DownloadCluster:input_type -> rafay.dev.types.infra.v3.Cluster - 3, // 7: rafay.dev.rpc.v3.Cluster.CreateCluster:output_type -> rafay.dev.types.infra.v3.Cluster - 5, // 8: rafay.dev.rpc.v3.Cluster.GetClusters:output_type -> rafay.dev.types.infra.v3.ClusterList - 3, // 9: rafay.dev.rpc.v3.Cluster.GetCluster:output_type -> rafay.dev.types.infra.v3.Cluster - 3, // 10: rafay.dev.rpc.v3.Cluster.UpdateCluster:output_type -> rafay.dev.types.infra.v3.Cluster - 2, // 11: rafay.dev.rpc.v3.Cluster.DeleteCluster:output_type -> rafay.dev.rpc.v3.DeleteClusterResponse - 1, // 12: rafay.dev.rpc.v3.Cluster.RegisterCluster:output_type -> rafay.dev.rpc.v3.RegisterClusterResponse - 6, // 13: rafay.dev.rpc.v3.Cluster.DownloadCluster:output_type -> rafay.dev.types.common.v3.HttpBody - 7, // [7:14] is the sub-list for method output_type - 0, // [0:7] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_proto_rpc_v3_cluster_proto_init() } -func file_proto_rpc_v3_cluster_proto_init() { - if File_proto_rpc_v3_cluster_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_proto_rpc_v3_cluster_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RegisterClusterRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_rpc_v3_cluster_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RegisterClusterResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_rpc_v3_cluster_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteClusterResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_proto_rpc_v3_cluster_proto_rawDesc, - NumEnums: 0, - NumMessages: 3, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_proto_rpc_v3_cluster_proto_goTypes, - DependencyIndexes: file_proto_rpc_v3_cluster_proto_depIdxs, - MessageInfos: file_proto_rpc_v3_cluster_proto_msgTypes, - }.Build() - File_proto_rpc_v3_cluster_proto = out.File - file_proto_rpc_v3_cluster_proto_rawDesc = nil - file_proto_rpc_v3_cluster_proto_goTypes = nil - file_proto_rpc_v3_cluster_proto_depIdxs = nil -} diff --git a/components/cluster-scheduler/pkg/server/cluster.go b/components/cluster-scheduler/server/cluster.go similarity index 88% rename from components/cluster-scheduler/pkg/server/cluster.go rename to components/cluster-scheduler/server/cluster.go index bb16a13..9a819e7 100644 --- a/components/cluster-scheduler/pkg/server/cluster.go +++ b/components/cluster-scheduler/server/cluster.go @@ -5,12 +5,12 @@ import ( "context" "encoding/base64" + "github.com/RafaySystems/rcloud-base/components/cluster-scheduler/internal/fixtures" "github.com/RafaySystems/rcloud-base/components/cluster-scheduler/pkg/bootstrapper" "github.com/RafaySystems/rcloud-base/components/cluster-scheduler/pkg/credentials" - "github.com/RafaySystems/rcloud-base/components/cluster-scheduler/pkg/internal/fixtures" "github.com/RafaySystems/rcloud-base/components/cluster-scheduler/pkg/service" - rpcv3 "github.com/RafaySystems/rcloud-base/components/cluster-scheduler/proto/rpc/v3" "github.com/RafaySystems/rcloud-base/components/common/pkg/query" + rpcv3 "github.com/RafaySystems/rcloud-base/components/common/proto/rpc/scheduler" commonv3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/commonpb/v3" infrapbv3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/infrapb/v3" ) @@ -47,7 +47,7 @@ func (s *clusterServer) GetClusters(ctx context.Context, e *commonv3.QueryOption } func (s *clusterServer) GetCluster(ctx context.Context, e *infrapbv3.Cluster) (*infrapbv3.Cluster, error) { - cluster, err := s.Select(ctx, e) + cluster, err := s.Select(ctx, e, true) if err != nil { return nil, err } @@ -81,8 +81,6 @@ func (s *clusterServer) RegisterCluster(ctx context.Context, rcr *rpcv3.Register return nil, err } - //_log.Infow("registered cluster", "cluster token", rcr.Token) - return &rpcv3.RegisterClusterResponse{ Certificate: cert, CaCertificate: s.GetCACert(), @@ -90,7 +88,7 @@ func (s *clusterServer) RegisterCluster(ctx context.Context, rcr *rpcv3.Register } func (s *clusterServer) DownloadCluster(ctx context.Context, cluster *infrapbv3.Cluster) (*commonv3.HttpBody, error) { - c, err := s.Select(ctx, cluster) + c, err := s.Select(ctx, cluster, true) if err != nil { return nil, err } @@ -118,3 +116,11 @@ func (s *clusterServer) DownloadCluster(ctx context.Context, cluster *infrapbv3. Data: bb.Bytes(), }, nil } + +func (s *clusterServer) UpdateClusterStatus(ctx context.Context, cluster *infrapbv3.Cluster) (*infrapbv3.Cluster, error) { + err := s.UpdateClusterConditionStatus(ctx, cluster) + if err != nil { + return nil, err + } + return cluster, nil +} diff --git a/components/cluster-scheduler/server/metro.go b/components/cluster-scheduler/server/metro.go new file mode 100644 index 0000000..94bb9d7 --- /dev/null +++ b/components/cluster-scheduler/server/metro.go @@ -0,0 +1,68 @@ +package server + +import ( + "context" + + "github.com/RafaySystems/rcloud-base/components/cluster-scheduler/pkg/service" + adminrpc "github.com/RafaySystems/rcloud-base/components/cluster-scheduler/proto/rpc" + infrav3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/infrapb/v3" + "github.com/google/uuid" +) + +type locationServer struct { + ms service.MetroService +} + +// NewLocationServer returns new location server implementation +func NewLocationServer(ms service.MetroService) adminrpc.LocationServer { + return &locationServer{ms} +} + +func (s *locationServer) CreateLocation(ctx context.Context, p *infrav3.Location) (*infrav3.Location, error) { + p, err := s.ms.Create(ctx, p) + if err != nil { + return nil, err + } + return p, nil +} + +func (s *locationServer) GetLocation(ctx context.Context, p *infrav3.Location) (*infrav3.Location, error) { + + partner, err := s.ms.GetByName(ctx, p.Metadata.Name) + if err != nil { + id, err := uuid.Parse(p.Metadata.Id) + if err != nil { + return nil, err + } + partner, err = s.ms.GetById(ctx, id) + if err != nil { + return nil, err + } + } + + return partner, nil +} + +func (s *locationServer) DeleteLocation(ctx context.Context, p *infrav3.Location) (*infrav3.Location, error) { + partner, err := s.ms.Delete(ctx, p) + if err != nil { + return nil, err + } + return partner, nil +} + +func (s *locationServer) UpdateLocation(ctx context.Context, p *infrav3.Location) (*infrav3.Location, error) { + partner, err := s.ms.Update(ctx, p) + if err != nil { + return nil, err + } + return partner, nil +} + +func (s *locationServer) GetLocations(ctx context.Context, m *infrav3.Location) (*infrav3.LocationList, error) { + organizations, err := s.ms.List(ctx, m.Metadata.Partner) + if err != nil { + return nil, err + } + return organizations, nil +} diff --git a/components/common/api/def/clients/config/client/override/override_add_default_overrides_parameters.go b/components/common/api/def/clients/config/client/override/override_add_default_overrides_parameters.go new file mode 100644 index 0000000..121af5b --- /dev/null +++ b/components/common/api/def/clients/config/client/override/override_add_default_overrides_parameters.go @@ -0,0 +1,148 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package override + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/RafaySystems/rcloud-base/components/common/api/def/clients/config/models" +) + +// NewOverrideAddDefaultOverridesParams creates a new OverrideAddDefaultOverridesParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewOverrideAddDefaultOverridesParams() *OverrideAddDefaultOverridesParams { + return &OverrideAddDefaultOverridesParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewOverrideAddDefaultOverridesParamsWithTimeout creates a new OverrideAddDefaultOverridesParams object +// with the ability to set a timeout on a request. +func NewOverrideAddDefaultOverridesParamsWithTimeout(timeout time.Duration) *OverrideAddDefaultOverridesParams { + return &OverrideAddDefaultOverridesParams{ + timeout: timeout, + } +} + +// NewOverrideAddDefaultOverridesParamsWithContext creates a new OverrideAddDefaultOverridesParams object +// with the ability to set a context for a request. +func NewOverrideAddDefaultOverridesParamsWithContext(ctx context.Context) *OverrideAddDefaultOverridesParams { + return &OverrideAddDefaultOverridesParams{ + Context: ctx, + } +} + +// NewOverrideAddDefaultOverridesParamsWithHTTPClient creates a new OverrideAddDefaultOverridesParams object +// with the ability to set a custom HTTPClient for a request. +func NewOverrideAddDefaultOverridesParamsWithHTTPClient(client *http.Client) *OverrideAddDefaultOverridesParams { + return &OverrideAddDefaultOverridesParams{ + HTTPClient: client, + } +} + +/* OverrideAddDefaultOverridesParams contains all the parameters to send to the API endpoint + for the override add default overrides operation. + + Typically these are written to a http.Request. +*/ +type OverrideAddDefaultOverridesParams struct { + + // Body. + Body *models.RPCAddDefaultOverridesRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the override add default overrides params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *OverrideAddDefaultOverridesParams) WithDefaults() *OverrideAddDefaultOverridesParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the override add default overrides params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *OverrideAddDefaultOverridesParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the override add default overrides params +func (o *OverrideAddDefaultOverridesParams) WithTimeout(timeout time.Duration) *OverrideAddDefaultOverridesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the override add default overrides params +func (o *OverrideAddDefaultOverridesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the override add default overrides params +func (o *OverrideAddDefaultOverridesParams) WithContext(ctx context.Context) *OverrideAddDefaultOverridesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the override add default overrides params +func (o *OverrideAddDefaultOverridesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the override add default overrides params +func (o *OverrideAddDefaultOverridesParams) WithHTTPClient(client *http.Client) *OverrideAddDefaultOverridesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the override add default overrides params +func (o *OverrideAddDefaultOverridesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the override add default overrides params +func (o *OverrideAddDefaultOverridesParams) WithBody(body *models.RPCAddDefaultOverridesRequest) *OverrideAddDefaultOverridesParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the override add default overrides params +func (o *OverrideAddDefaultOverridesParams) SetBody(body *models.RPCAddDefaultOverridesRequest) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *OverrideAddDefaultOverridesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/components/common/api/def/clients/config/client/override/override_add_default_overrides_responses.go b/components/common/api/def/clients/config/client/override/override_add_default_overrides_responses.go new file mode 100644 index 0000000..25a2254 --- /dev/null +++ b/components/common/api/def/clients/config/client/override/override_add_default_overrides_responses.go @@ -0,0 +1,185 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package override + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/RafaySystems/rcloud-base/components/common/api/def/clients/config/models" +) + +// OverrideAddDefaultOverridesReader is a Reader for the OverrideAddDefaultOverrides structure. +type OverrideAddDefaultOverridesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *OverrideAddDefaultOverridesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewOverrideAddDefaultOverridesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 403: + result := NewOverrideAddDefaultOverridesForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewOverrideAddDefaultOverridesNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + result := NewOverrideAddDefaultOverridesDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewOverrideAddDefaultOverridesOK creates a OverrideAddDefaultOverridesOK with default headers values +func NewOverrideAddDefaultOverridesOK() *OverrideAddDefaultOverridesOK { + return &OverrideAddDefaultOverridesOK{} +} + +/* OverrideAddDefaultOverridesOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type OverrideAddDefaultOverridesOK struct { + Payload models.RPCAddDefaultOverridesResponse +} + +func (o *OverrideAddDefaultOverridesOK) Error() string { + return fmt.Sprintf("[POST /v2/config/override/default/cluster][%d] overrideAddDefaultOverridesOK %+v", 200, o.Payload) +} +func (o *OverrideAddDefaultOverridesOK) GetPayload() models.RPCAddDefaultOverridesResponse { + return o.Payload +} + +func (o *OverrideAddDefaultOverridesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewOverrideAddDefaultOverridesForbidden creates a OverrideAddDefaultOverridesForbidden with default headers values +func NewOverrideAddDefaultOverridesForbidden() *OverrideAddDefaultOverridesForbidden { + return &OverrideAddDefaultOverridesForbidden{} +} + +/* OverrideAddDefaultOverridesForbidden describes a response with status code 403, with default header values. + +Returned when the user does not have permission to access the resource. +*/ +type OverrideAddDefaultOverridesForbidden struct { + Payload interface{} +} + +func (o *OverrideAddDefaultOverridesForbidden) Error() string { + return fmt.Sprintf("[POST /v2/config/override/default/cluster][%d] overrideAddDefaultOverridesForbidden %+v", 403, o.Payload) +} +func (o *OverrideAddDefaultOverridesForbidden) GetPayload() interface{} { + return o.Payload +} + +func (o *OverrideAddDefaultOverridesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewOverrideAddDefaultOverridesNotFound creates a OverrideAddDefaultOverridesNotFound with default headers values +func NewOverrideAddDefaultOverridesNotFound() *OverrideAddDefaultOverridesNotFound { + return &OverrideAddDefaultOverridesNotFound{} +} + +/* OverrideAddDefaultOverridesNotFound describes a response with status code 404, with default header values. + +Returned when the resource does not exist. +*/ +type OverrideAddDefaultOverridesNotFound struct { + Payload string +} + +func (o *OverrideAddDefaultOverridesNotFound) Error() string { + return fmt.Sprintf("[POST /v2/config/override/default/cluster][%d] overrideAddDefaultOverridesNotFound %+v", 404, o.Payload) +} +func (o *OverrideAddDefaultOverridesNotFound) GetPayload() string { + return o.Payload +} + +func (o *OverrideAddDefaultOverridesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewOverrideAddDefaultOverridesDefault creates a OverrideAddDefaultOverridesDefault with default headers values +func NewOverrideAddDefaultOverridesDefault(code int) *OverrideAddDefaultOverridesDefault { + return &OverrideAddDefaultOverridesDefault{ + _statusCode: code, + } +} + +/* OverrideAddDefaultOverridesDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type OverrideAddDefaultOverridesDefault struct { + _statusCode int + + Payload *models.GooglerpcStatus +} + +// Code gets the status code for the override add default overrides default response +func (o *OverrideAddDefaultOverridesDefault) Code() int { + return o._statusCode +} + +func (o *OverrideAddDefaultOverridesDefault) Error() string { + return fmt.Sprintf("[POST /v2/config/override/default/cluster][%d] Override_AddDefaultOverrides default %+v", o._statusCode, o.Payload) +} +func (o *OverrideAddDefaultOverridesDefault) GetPayload() *models.GooglerpcStatus { + return o.Payload +} + +func (o *OverrideAddDefaultOverridesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.GooglerpcStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/components/common/api/def/clients/config/client/override/override_apply_override_parameters.go b/components/common/api/def/clients/config/client/override/override_apply_override_parameters.go new file mode 100644 index 0000000..d9dca55 --- /dev/null +++ b/components/common/api/def/clients/config/client/override/override_apply_override_parameters.go @@ -0,0 +1,148 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package override + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/RafaySystems/rcloud-base/components/common/api/def/clients/config/models" +) + +// NewOverrideApplyOverrideParams creates a new OverrideApplyOverrideParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewOverrideApplyOverrideParams() *OverrideApplyOverrideParams { + return &OverrideApplyOverrideParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewOverrideApplyOverrideParamsWithTimeout creates a new OverrideApplyOverrideParams object +// with the ability to set a timeout on a request. +func NewOverrideApplyOverrideParamsWithTimeout(timeout time.Duration) *OverrideApplyOverrideParams { + return &OverrideApplyOverrideParams{ + timeout: timeout, + } +} + +// NewOverrideApplyOverrideParamsWithContext creates a new OverrideApplyOverrideParams object +// with the ability to set a context for a request. +func NewOverrideApplyOverrideParamsWithContext(ctx context.Context) *OverrideApplyOverrideParams { + return &OverrideApplyOverrideParams{ + Context: ctx, + } +} + +// NewOverrideApplyOverrideParamsWithHTTPClient creates a new OverrideApplyOverrideParams object +// with the ability to set a custom HTTPClient for a request. +func NewOverrideApplyOverrideParamsWithHTTPClient(client *http.Client) *OverrideApplyOverrideParams { + return &OverrideApplyOverrideParams{ + HTTPClient: client, + } +} + +/* OverrideApplyOverrideParams contains all the parameters to send to the API endpoint + for the override apply override operation. + + Typically these are written to a http.Request. +*/ +type OverrideApplyOverrideParams struct { + + // Body. + Body *models.RPCApplyOverrideRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the override apply override params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *OverrideApplyOverrideParams) WithDefaults() *OverrideApplyOverrideParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the override apply override params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *OverrideApplyOverrideParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the override apply override params +func (o *OverrideApplyOverrideParams) WithTimeout(timeout time.Duration) *OverrideApplyOverrideParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the override apply override params +func (o *OverrideApplyOverrideParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the override apply override params +func (o *OverrideApplyOverrideParams) WithContext(ctx context.Context) *OverrideApplyOverrideParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the override apply override params +func (o *OverrideApplyOverrideParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the override apply override params +func (o *OverrideApplyOverrideParams) WithHTTPClient(client *http.Client) *OverrideApplyOverrideParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the override apply override params +func (o *OverrideApplyOverrideParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the override apply override params +func (o *OverrideApplyOverrideParams) WithBody(body *models.RPCApplyOverrideRequest) *OverrideApplyOverrideParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the override apply override params +func (o *OverrideApplyOverrideParams) SetBody(body *models.RPCApplyOverrideRequest) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *OverrideApplyOverrideParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/components/common/api/def/clients/config/client/override/override_apply_override_responses.go b/components/common/api/def/clients/config/client/override/override_apply_override_responses.go new file mode 100644 index 0000000..73ccc80 --- /dev/null +++ b/components/common/api/def/clients/config/client/override/override_apply_override_responses.go @@ -0,0 +1,187 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package override + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/RafaySystems/rcloud-base/components/common/api/def/clients/config/models" +) + +// OverrideApplyOverrideReader is a Reader for the OverrideApplyOverride structure. +type OverrideApplyOverrideReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *OverrideApplyOverrideReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewOverrideApplyOverrideOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 403: + result := NewOverrideApplyOverrideForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewOverrideApplyOverrideNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + result := NewOverrideApplyOverrideDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewOverrideApplyOverrideOK creates a OverrideApplyOverrideOK with default headers values +func NewOverrideApplyOverrideOK() *OverrideApplyOverrideOK { + return &OverrideApplyOverrideOK{} +} + +/* OverrideApplyOverrideOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type OverrideApplyOverrideOK struct { + Payload *models.RPCApplyOverrideResponse +} + +func (o *OverrideApplyOverrideOK) Error() string { + return fmt.Sprintf("[POST /v2/config/override/apply][%d] overrideApplyOverrideOK %+v", 200, o.Payload) +} +func (o *OverrideApplyOverrideOK) GetPayload() *models.RPCApplyOverrideResponse { + return o.Payload +} + +func (o *OverrideApplyOverrideOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.RPCApplyOverrideResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewOverrideApplyOverrideForbidden creates a OverrideApplyOverrideForbidden with default headers values +func NewOverrideApplyOverrideForbidden() *OverrideApplyOverrideForbidden { + return &OverrideApplyOverrideForbidden{} +} + +/* OverrideApplyOverrideForbidden describes a response with status code 403, with default header values. + +Returned when the user does not have permission to access the resource. +*/ +type OverrideApplyOverrideForbidden struct { + Payload interface{} +} + +func (o *OverrideApplyOverrideForbidden) Error() string { + return fmt.Sprintf("[POST /v2/config/override/apply][%d] overrideApplyOverrideForbidden %+v", 403, o.Payload) +} +func (o *OverrideApplyOverrideForbidden) GetPayload() interface{} { + return o.Payload +} + +func (o *OverrideApplyOverrideForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewOverrideApplyOverrideNotFound creates a OverrideApplyOverrideNotFound with default headers values +func NewOverrideApplyOverrideNotFound() *OverrideApplyOverrideNotFound { + return &OverrideApplyOverrideNotFound{} +} + +/* OverrideApplyOverrideNotFound describes a response with status code 404, with default header values. + +Returned when the resource does not exist. +*/ +type OverrideApplyOverrideNotFound struct { + Payload string +} + +func (o *OverrideApplyOverrideNotFound) Error() string { + return fmt.Sprintf("[POST /v2/config/override/apply][%d] overrideApplyOverrideNotFound %+v", 404, o.Payload) +} +func (o *OverrideApplyOverrideNotFound) GetPayload() string { + return o.Payload +} + +func (o *OverrideApplyOverrideNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewOverrideApplyOverrideDefault creates a OverrideApplyOverrideDefault with default headers values +func NewOverrideApplyOverrideDefault(code int) *OverrideApplyOverrideDefault { + return &OverrideApplyOverrideDefault{ + _statusCode: code, + } +} + +/* OverrideApplyOverrideDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type OverrideApplyOverrideDefault struct { + _statusCode int + + Payload *models.GooglerpcStatus +} + +// Code gets the status code for the override apply override default response +func (o *OverrideApplyOverrideDefault) Code() int { + return o._statusCode +} + +func (o *OverrideApplyOverrideDefault) Error() string { + return fmt.Sprintf("[POST /v2/config/override/apply][%d] Override_ApplyOverride default %+v", o._statusCode, o.Payload) +} +func (o *OverrideApplyOverrideDefault) GetPayload() *models.GooglerpcStatus { + return o.Payload +} + +func (o *OverrideApplyOverrideDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.GooglerpcStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/components/common/api/def/clients/config/client/override/override_client.go b/components/common/api/def/clients/config/client/override/override_client.go new file mode 100644 index 0000000..506c5e5 --- /dev/null +++ b/components/common/api/def/clients/config/client/override/override_client.go @@ -0,0 +1,321 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package override + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new override API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for override API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientOption is the option for Client methods +type ClientOption func(*runtime.ClientOperation) + +// ClientService is the interface for Client methods +type ClientService interface { + OverrideAddDefaultOverrides(params *OverrideAddDefaultOverridesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*OverrideAddDefaultOverridesOK, error) + + OverrideApplyOverride(params *OverrideApplyOverrideParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*OverrideApplyOverrideOK, error) + + OverrideCreateOverride(params *OverrideCreateOverrideParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*OverrideCreateOverrideOK, *OverrideCreateOverrideCreated, error) + + OverrideDeleteOverride(params *OverrideDeleteOverrideParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*OverrideDeleteOverrideOK, *OverrideDeleteOverrideNoContent, error) + + OverrideGetOverride(params *OverrideGetOverrideParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*OverrideGetOverrideOK, error) + + OverrideGetOverrides(params *OverrideGetOverridesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*OverrideGetOverridesOK, error) + + OverrideUpdateOverride(params *OverrideUpdateOverrideParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*OverrideUpdateOverrideOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* + OverrideAddDefaultOverrides override add default overrides API +*/ +func (a *Client) OverrideAddDefaultOverrides(params *OverrideAddDefaultOverridesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*OverrideAddDefaultOverridesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewOverrideAddDefaultOverridesParams() + } + op := &runtime.ClientOperation{ + ID: "Override_AddDefaultOverrides", + Method: "POST", + PathPattern: "/v2/config/override/default/cluster", + ProducesMediaTypes: []string{"application/json", "application/yaml"}, + ConsumesMediaTypes: []string{"application/json", "application/yaml"}, + Schemes: []string{"https"}, + Params: params, + Reader: &OverrideAddDefaultOverridesReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*OverrideAddDefaultOverridesOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*OverrideAddDefaultOverridesDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* + OverrideApplyOverride override apply override API +*/ +func (a *Client) OverrideApplyOverride(params *OverrideApplyOverrideParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*OverrideApplyOverrideOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewOverrideApplyOverrideParams() + } + op := &runtime.ClientOperation{ + ID: "Override_ApplyOverride", + Method: "POST", + PathPattern: "/v2/config/override/apply", + ProducesMediaTypes: []string{"application/json", "application/yaml"}, + ConsumesMediaTypes: []string{"application/json", "application/yaml"}, + Schemes: []string{"https"}, + Params: params, + Reader: &OverrideApplyOverrideReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*OverrideApplyOverrideOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*OverrideApplyOverrideDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* + OverrideCreateOverride override create override API +*/ +func (a *Client) OverrideCreateOverride(params *OverrideCreateOverrideParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*OverrideCreateOverrideOK, *OverrideCreateOverrideCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewOverrideCreateOverrideParams() + } + op := &runtime.ClientOperation{ + ID: "Override_CreateOverride", + Method: "POST", + PathPattern: "/v2/config/project/{metadata.project}/override", + ProducesMediaTypes: []string{"application/json", "application/yaml"}, + ConsumesMediaTypes: []string{"application/json", "application/yaml"}, + Schemes: []string{"https"}, + Params: params, + Reader: &OverrideCreateOverrideReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, nil, err + } + switch value := result.(type) { + case *OverrideCreateOverrideOK: + return value, nil, nil + case *OverrideCreateOverrideCreated: + return nil, value, nil + } + // unexpected success response + unexpectedSuccess := result.(*OverrideCreateOverrideDefault) + return nil, nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* + OverrideDeleteOverride override delete override API +*/ +func (a *Client) OverrideDeleteOverride(params *OverrideDeleteOverrideParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*OverrideDeleteOverrideOK, *OverrideDeleteOverrideNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewOverrideDeleteOverrideParams() + } + op := &runtime.ClientOperation{ + ID: "Override_DeleteOverride", + Method: "DELETE", + PathPattern: "/v2/config/project/{metadata.project}/override/{metadata.name}", + ProducesMediaTypes: []string{"application/json", "application/yaml"}, + ConsumesMediaTypes: []string{"application/json", "application/yaml"}, + Schemes: []string{"https"}, + Params: params, + Reader: &OverrideDeleteOverrideReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, nil, err + } + switch value := result.(type) { + case *OverrideDeleteOverrideOK: + return value, nil, nil + case *OverrideDeleteOverrideNoContent: + return nil, value, nil + } + // unexpected success response + unexpectedSuccess := result.(*OverrideDeleteOverrideDefault) + return nil, nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* + OverrideGetOverride override get override API +*/ +func (a *Client) OverrideGetOverride(params *OverrideGetOverrideParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*OverrideGetOverrideOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewOverrideGetOverrideParams() + } + op := &runtime.ClientOperation{ + ID: "Override_GetOverride", + Method: "GET", + PathPattern: "/v2/config/project/{metadata.project}/override/{metadata.name}", + ProducesMediaTypes: []string{"application/json", "application/yaml"}, + ConsumesMediaTypes: []string{"application/json", "application/yaml"}, + Schemes: []string{"https"}, + Params: params, + Reader: &OverrideGetOverrideReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*OverrideGetOverrideOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*OverrideGetOverrideDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* + OverrideGetOverrides override get overrides API +*/ +func (a *Client) OverrideGetOverrides(params *OverrideGetOverridesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*OverrideGetOverridesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewOverrideGetOverridesParams() + } + op := &runtime.ClientOperation{ + ID: "Override_GetOverrides", + Method: "GET", + PathPattern: "/v2/config/{urlScope}/override", + ProducesMediaTypes: []string{"application/json", "application/yaml"}, + ConsumesMediaTypes: []string{"application/json", "application/yaml"}, + Schemes: []string{"https"}, + Params: params, + Reader: &OverrideGetOverridesReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*OverrideGetOverridesOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*OverrideGetOverridesDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* + OverrideUpdateOverride override update override API +*/ +func (a *Client) OverrideUpdateOverride(params *OverrideUpdateOverrideParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*OverrideUpdateOverrideOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewOverrideUpdateOverrideParams() + } + op := &runtime.ClientOperation{ + ID: "Override_UpdateOverride", + Method: "PUT", + PathPattern: "/v2/config/project/{metadata.project}/override/{metadata.name}", + ProducesMediaTypes: []string{"application/json", "application/yaml"}, + ConsumesMediaTypes: []string{"application/json", "application/yaml"}, + Schemes: []string{"https"}, + Params: params, + Reader: &OverrideUpdateOverrideReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*OverrideUpdateOverrideOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*OverrideUpdateOverrideDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/components/common/api/def/clients/config/client/override/override_create_override_parameters.go b/components/common/api/def/clients/config/client/override/override_create_override_parameters.go new file mode 100644 index 0000000..29ca0c5 --- /dev/null +++ b/components/common/api/def/clients/config/client/override/override_create_override_parameters.go @@ -0,0 +1,170 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package override + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/RafaySystems/rcloud-base/components/common/api/def/clients/config/models" +) + +// NewOverrideCreateOverrideParams creates a new OverrideCreateOverrideParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewOverrideCreateOverrideParams() *OverrideCreateOverrideParams { + return &OverrideCreateOverrideParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewOverrideCreateOverrideParamsWithTimeout creates a new OverrideCreateOverrideParams object +// with the ability to set a timeout on a request. +func NewOverrideCreateOverrideParamsWithTimeout(timeout time.Duration) *OverrideCreateOverrideParams { + return &OverrideCreateOverrideParams{ + timeout: timeout, + } +} + +// NewOverrideCreateOverrideParamsWithContext creates a new OverrideCreateOverrideParams object +// with the ability to set a context for a request. +func NewOverrideCreateOverrideParamsWithContext(ctx context.Context) *OverrideCreateOverrideParams { + return &OverrideCreateOverrideParams{ + Context: ctx, + } +} + +// NewOverrideCreateOverrideParamsWithHTTPClient creates a new OverrideCreateOverrideParams object +// with the ability to set a custom HTTPClient for a request. +func NewOverrideCreateOverrideParamsWithHTTPClient(client *http.Client) *OverrideCreateOverrideParams { + return &OverrideCreateOverrideParams{ + HTTPClient: client, + } +} + +/* OverrideCreateOverrideParams contains all the parameters to send to the API endpoint + for the override create override operation. + + Typically these are written to a http.Request. +*/ +type OverrideCreateOverrideParams struct { + + // Body. + Body *models.ConfigOverride + + /* MetadataProject. + + Project of the resource + */ + MetadataProject string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the override create override params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *OverrideCreateOverrideParams) WithDefaults() *OverrideCreateOverrideParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the override create override params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *OverrideCreateOverrideParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the override create override params +func (o *OverrideCreateOverrideParams) WithTimeout(timeout time.Duration) *OverrideCreateOverrideParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the override create override params +func (o *OverrideCreateOverrideParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the override create override params +func (o *OverrideCreateOverrideParams) WithContext(ctx context.Context) *OverrideCreateOverrideParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the override create override params +func (o *OverrideCreateOverrideParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the override create override params +func (o *OverrideCreateOverrideParams) WithHTTPClient(client *http.Client) *OverrideCreateOverrideParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the override create override params +func (o *OverrideCreateOverrideParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the override create override params +func (o *OverrideCreateOverrideParams) WithBody(body *models.ConfigOverride) *OverrideCreateOverrideParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the override create override params +func (o *OverrideCreateOverrideParams) SetBody(body *models.ConfigOverride) { + o.Body = body +} + +// WithMetadataProject adds the metadataProject to the override create override params +func (o *OverrideCreateOverrideParams) WithMetadataProject(metadataProject string) *OverrideCreateOverrideParams { + o.SetMetadataProject(metadataProject) + return o +} + +// SetMetadataProject adds the metadataProject to the override create override params +func (o *OverrideCreateOverrideParams) SetMetadataProject(metadataProject string) { + o.MetadataProject = metadataProject +} + +// WriteToRequest writes these params to a swagger request +func (o *OverrideCreateOverrideParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param metadata.project + if err := r.SetPathParam("metadata.project", o.MetadataProject); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/components/common/api/def/clients/config/client/override/override_create_override_responses.go b/components/common/api/def/clients/config/client/override/override_create_override_responses.go new file mode 100644 index 0000000..1bfc896 --- /dev/null +++ b/components/common/api/def/clients/config/client/override/override_create_override_responses.go @@ -0,0 +1,223 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package override + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/RafaySystems/rcloud-base/components/common/api/def/clients/config/models" +) + +// OverrideCreateOverrideReader is a Reader for the OverrideCreateOverride structure. +type OverrideCreateOverrideReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *OverrideCreateOverrideReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewOverrideCreateOverrideOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 201: + result := NewOverrideCreateOverrideCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 403: + result := NewOverrideCreateOverrideForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewOverrideCreateOverrideNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + result := NewOverrideCreateOverrideDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewOverrideCreateOverrideOK creates a OverrideCreateOverrideOK with default headers values +func NewOverrideCreateOverrideOK() *OverrideCreateOverrideOK { + return &OverrideCreateOverrideOK{} +} + +/* OverrideCreateOverrideOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type OverrideCreateOverrideOK struct { + Payload *models.ConfigOverride +} + +func (o *OverrideCreateOverrideOK) Error() string { + return fmt.Sprintf("[POST /v2/config/project/{metadata.project}/override][%d] overrideCreateOverrideOK %+v", 200, o.Payload) +} +func (o *OverrideCreateOverrideOK) GetPayload() *models.ConfigOverride { + return o.Payload +} + +func (o *OverrideCreateOverrideOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ConfigOverride) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewOverrideCreateOverrideCreated creates a OverrideCreateOverrideCreated with default headers values +func NewOverrideCreateOverrideCreated() *OverrideCreateOverrideCreated { + return &OverrideCreateOverrideCreated{} +} + +/* OverrideCreateOverrideCreated describes a response with status code 201, with default header values. + +Returned when taskset is created successfully. +*/ +type OverrideCreateOverrideCreated struct { + Payload interface{} +} + +func (o *OverrideCreateOverrideCreated) Error() string { + return fmt.Sprintf("[POST /v2/config/project/{metadata.project}/override][%d] overrideCreateOverrideCreated %+v", 201, o.Payload) +} +func (o *OverrideCreateOverrideCreated) GetPayload() interface{} { + return o.Payload +} + +func (o *OverrideCreateOverrideCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewOverrideCreateOverrideForbidden creates a OverrideCreateOverrideForbidden with default headers values +func NewOverrideCreateOverrideForbidden() *OverrideCreateOverrideForbidden { + return &OverrideCreateOverrideForbidden{} +} + +/* OverrideCreateOverrideForbidden describes a response with status code 403, with default header values. + +Returned when the user does not have permission to access the resource. +*/ +type OverrideCreateOverrideForbidden struct { + Payload interface{} +} + +func (o *OverrideCreateOverrideForbidden) Error() string { + return fmt.Sprintf("[POST /v2/config/project/{metadata.project}/override][%d] overrideCreateOverrideForbidden %+v", 403, o.Payload) +} +func (o *OverrideCreateOverrideForbidden) GetPayload() interface{} { + return o.Payload +} + +func (o *OverrideCreateOverrideForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewOverrideCreateOverrideNotFound creates a OverrideCreateOverrideNotFound with default headers values +func NewOverrideCreateOverrideNotFound() *OverrideCreateOverrideNotFound { + return &OverrideCreateOverrideNotFound{} +} + +/* OverrideCreateOverrideNotFound describes a response with status code 404, with default header values. + +Returned when the resource does not exist. +*/ +type OverrideCreateOverrideNotFound struct { + Payload string +} + +func (o *OverrideCreateOverrideNotFound) Error() string { + return fmt.Sprintf("[POST /v2/config/project/{metadata.project}/override][%d] overrideCreateOverrideNotFound %+v", 404, o.Payload) +} +func (o *OverrideCreateOverrideNotFound) GetPayload() string { + return o.Payload +} + +func (o *OverrideCreateOverrideNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewOverrideCreateOverrideDefault creates a OverrideCreateOverrideDefault with default headers values +func NewOverrideCreateOverrideDefault(code int) *OverrideCreateOverrideDefault { + return &OverrideCreateOverrideDefault{ + _statusCode: code, + } +} + +/* OverrideCreateOverrideDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type OverrideCreateOverrideDefault struct { + _statusCode int + + Payload *models.GooglerpcStatus +} + +// Code gets the status code for the override create override default response +func (o *OverrideCreateOverrideDefault) Code() int { + return o._statusCode +} + +func (o *OverrideCreateOverrideDefault) Error() string { + return fmt.Sprintf("[POST /v2/config/project/{metadata.project}/override][%d] Override_CreateOverride default %+v", o._statusCode, o.Payload) +} +func (o *OverrideCreateOverrideDefault) GetPayload() *models.GooglerpcStatus { + return o.Payload +} + +func (o *OverrideCreateOverrideDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.GooglerpcStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/components/common/api/def/clients/config/client/override/override_delete_override_parameters.go b/components/common/api/def/clients/config/client/override/override_delete_override_parameters.go new file mode 100644 index 0000000..71d9ec4 --- /dev/null +++ b/components/common/api/def/clients/config/client/override/override_delete_override_parameters.go @@ -0,0 +1,1502 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package override + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewOverrideDeleteOverrideParams creates a new OverrideDeleteOverrideParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewOverrideDeleteOverrideParams() *OverrideDeleteOverrideParams { + return &OverrideDeleteOverrideParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewOverrideDeleteOverrideParamsWithTimeout creates a new OverrideDeleteOverrideParams object +// with the ability to set a timeout on a request. +func NewOverrideDeleteOverrideParamsWithTimeout(timeout time.Duration) *OverrideDeleteOverrideParams { + return &OverrideDeleteOverrideParams{ + timeout: timeout, + } +} + +// NewOverrideDeleteOverrideParamsWithContext creates a new OverrideDeleteOverrideParams object +// with the ability to set a context for a request. +func NewOverrideDeleteOverrideParamsWithContext(ctx context.Context) *OverrideDeleteOverrideParams { + return &OverrideDeleteOverrideParams{ + Context: ctx, + } +} + +// NewOverrideDeleteOverrideParamsWithHTTPClient creates a new OverrideDeleteOverrideParams object +// with the ability to set a custom HTTPClient for a request. +func NewOverrideDeleteOverrideParamsWithHTTPClient(client *http.Client) *OverrideDeleteOverrideParams { + return &OverrideDeleteOverrideParams{ + HTTPClient: client, + } +} + +/* OverrideDeleteOverrideParams contains all the parameters to send to the API endpoint + for the override delete override operation. + + Typically these are written to a http.Request. +*/ +type OverrideDeleteOverrideParams struct { + + /* APIVersion. + + API Version. API Version of the resource + + Default: "config.k8smgmt.io/v3" + */ + APIVersion *string + + /* Kind. + + Kind. Kind of the resource + + Default: "Cluster" + */ + Kind *string + + /* MetadataDescription. + + Description. description of the resource + */ + MetadataDescription *string + + // MetadataID. + MetadataID *string + + // MetadataModifiedAt. + // + // Format: date-time + MetadataModifiedAt *strfmt.DateTime + + /* MetadataName. + + name of the resource + */ + MetadataName string + + /* MetadataOrganization. + + Organization. Organization to which the resource belongs + */ + MetadataOrganization *string + + /* MetadataPartner. + + Partner. Partner to which the resource belongs + */ + MetadataPartner *string + + /* MetadataProject. + + Project of the resource + */ + MetadataProject string + + // SpecClusterPlacementClusterSelector. + SpecClusterPlacementClusterSelector *string + + // SpecClusterPlacementDriftAction. + // + // Default: "DriftReconcillationActionNotSet" + SpecClusterPlacementDriftAction *string + + // SpecClusterPlacementNodeGroupingKeys. + SpecClusterPlacementNodeGroupingKeys []string + + /* SpecClusterPlacementPlacementType. + + placementType is the type of placement. + + Default: "ClusterSelector" + */ + SpecClusterPlacementPlacementType *string + + // SpecClusterSelector. + SpecClusterSelector *string + + // SpecRepoArtifactMetaGitRevision. + SpecRepoArtifactMetaGitRevision *string + + // SpecRepoArtifactMetaHelmChartName. + SpecRepoArtifactMetaHelmChartName *string + + // SpecRepoArtifactMetaHelmTag. + SpecRepoArtifactMetaHelmTag *string + + // SpecRepoArtifactMetaTimeout. + // + // Format: int64 + SpecRepoArtifactMetaTimeout *string + + // SpecRepositoryRef. + SpecRepositoryRef *string + + /* SpecResourceSelector. + + an override is only applied if selector matches the taskset/namespace + labels. + */ + SpecResourceSelector *string + + // SpecTemplateOverridesV2EventFrameworkFQDN. + SpecTemplateOverridesV2EventFrameworkFQDN *string + + // SpecTemplateOverridesClusterName. + SpecTemplateOverridesClusterName *string + + // SpecTemplateOverridesOrgDisplayName. + SpecTemplateOverridesOrgDisplayName *string + + // SpecTemplateOverridesOrganizationHash. + SpecTemplateOverridesOrganizationHash *string + + // SpecTemplateOverridesOrganizationID. + // + // Format: int64 + SpecTemplateOverridesOrganizationID *string + + // SpecTemplateOverridesPartnerDisplayName. + SpecTemplateOverridesPartnerDisplayName *string + + // SpecTemplateOverridesPartnerHash. + SpecTemplateOverridesPartnerHash *string + + // SpecTemplateOverridesPartnerID. + // + // Format: int64 + SpecTemplateOverridesPartnerID *string + + // SpecTemplateOverridesProjectID. + // + // Format: int64 + SpecTemplateOverridesProjectID *string + + // SpecTemplateOverridesProxyURL. + SpecTemplateOverridesProxyURL *string + + // SpecTemplateOverridesV1DeploymentEnv. + SpecTemplateOverridesV1DeploymentEnv *string + + // SpecTemplateOverridesV1EdgeDisplayName. + SpecTemplateOverridesV1EdgeDisplayName *string + + // SpecTemplateOverridesV1EdgeID. + SpecTemplateOverridesV1EdgeID *string + + // SpecTemplateOverridesV1FluentdAggregatorAddr. + SpecTemplateOverridesV1FluentdAggregatorAddr *string + + // SpecTemplateOverridesV1InfluxDBFQDN. + SpecTemplateOverridesV1InfluxDBFQDN *string + + // SpecTemplateOverridesV1InfluxDBPassword. + SpecTemplateOverridesV1InfluxDBPassword *string + + // SpecTemplateOverridesV1PromethuesRelayFQDN. + SpecTemplateOverridesV1PromethuesRelayFQDN *string + + // SpecValuesFile. + SpecValuesFile *string + + /* StatusConditionStatus. + + Condition Status. status of the condition + + Default: "StatusNotSet" + */ + StatusConditionStatus *string + + /* StatusConditionType. + + Condition Type. type of the status condition + */ + StatusConditionType *string + + /* StatusLastUpdated. + + Last Updated. when the condition status is last updated + + Format: date-time + */ + StatusLastUpdated *strfmt.DateTime + + /* StatusReason. + + Reason. reason of the last condition status + */ + StatusReason *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the override delete override params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *OverrideDeleteOverrideParams) WithDefaults() *OverrideDeleteOverrideParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the override delete override params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *OverrideDeleteOverrideParams) SetDefaults() { + var ( + aPIVersionDefault = string("config.k8smgmt.io/v3") + + kindDefault = string("Cluster") + + specClusterPlacementDriftActionDefault = string("DriftReconcillationActionNotSet") + + specClusterPlacementPlacementTypeDefault = string("ClusterSelector") + + statusConditionStatusDefault = string("StatusNotSet") + ) + + val := OverrideDeleteOverrideParams{ + APIVersion: &aPIVersionDefault, + Kind: &kindDefault, + SpecClusterPlacementDriftAction: &specClusterPlacementDriftActionDefault, + SpecClusterPlacementPlacementType: &specClusterPlacementPlacementTypeDefault, + StatusConditionStatus: &statusConditionStatusDefault, + } + + val.timeout = o.timeout + val.Context = o.Context + val.HTTPClient = o.HTTPClient + *o = val +} + +// WithTimeout adds the timeout to the override delete override params +func (o *OverrideDeleteOverrideParams) WithTimeout(timeout time.Duration) *OverrideDeleteOverrideParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the override delete override params +func (o *OverrideDeleteOverrideParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the override delete override params +func (o *OverrideDeleteOverrideParams) WithContext(ctx context.Context) *OverrideDeleteOverrideParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the override delete override params +func (o *OverrideDeleteOverrideParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the override delete override params +func (o *OverrideDeleteOverrideParams) WithHTTPClient(client *http.Client) *OverrideDeleteOverrideParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the override delete override params +func (o *OverrideDeleteOverrideParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAPIVersion adds the aPIVersion to the override delete override params +func (o *OverrideDeleteOverrideParams) WithAPIVersion(aPIVersion *string) *OverrideDeleteOverrideParams { + o.SetAPIVersion(aPIVersion) + return o +} + +// SetAPIVersion adds the apiVersion to the override delete override params +func (o *OverrideDeleteOverrideParams) SetAPIVersion(aPIVersion *string) { + o.APIVersion = aPIVersion +} + +// WithKind adds the kind to the override delete override params +func (o *OverrideDeleteOverrideParams) WithKind(kind *string) *OverrideDeleteOverrideParams { + o.SetKind(kind) + return o +} + +// SetKind adds the kind to the override delete override params +func (o *OverrideDeleteOverrideParams) SetKind(kind *string) { + o.Kind = kind +} + +// WithMetadataDescription adds the metadataDescription to the override delete override params +func (o *OverrideDeleteOverrideParams) WithMetadataDescription(metadataDescription *string) *OverrideDeleteOverrideParams { + o.SetMetadataDescription(metadataDescription) + return o +} + +// SetMetadataDescription adds the metadataDescription to the override delete override params +func (o *OverrideDeleteOverrideParams) SetMetadataDescription(metadataDescription *string) { + o.MetadataDescription = metadataDescription +} + +// WithMetadataID adds the metadataID to the override delete override params +func (o *OverrideDeleteOverrideParams) WithMetadataID(metadataID *string) *OverrideDeleteOverrideParams { + o.SetMetadataID(metadataID) + return o +} + +// SetMetadataID adds the metadataId to the override delete override params +func (o *OverrideDeleteOverrideParams) SetMetadataID(metadataID *string) { + o.MetadataID = metadataID +} + +// WithMetadataModifiedAt adds the metadataModifiedAt to the override delete override params +func (o *OverrideDeleteOverrideParams) WithMetadataModifiedAt(metadataModifiedAt *strfmt.DateTime) *OverrideDeleteOverrideParams { + o.SetMetadataModifiedAt(metadataModifiedAt) + return o +} + +// SetMetadataModifiedAt adds the metadataModifiedAt to the override delete override params +func (o *OverrideDeleteOverrideParams) SetMetadataModifiedAt(metadataModifiedAt *strfmt.DateTime) { + o.MetadataModifiedAt = metadataModifiedAt +} + +// WithMetadataName adds the metadataName to the override delete override params +func (o *OverrideDeleteOverrideParams) WithMetadataName(metadataName string) *OverrideDeleteOverrideParams { + o.SetMetadataName(metadataName) + return o +} + +// SetMetadataName adds the metadataName to the override delete override params +func (o *OverrideDeleteOverrideParams) SetMetadataName(metadataName string) { + o.MetadataName = metadataName +} + +// WithMetadataOrganization adds the metadataOrganization to the override delete override params +func (o *OverrideDeleteOverrideParams) WithMetadataOrganization(metadataOrganization *string) *OverrideDeleteOverrideParams { + o.SetMetadataOrganization(metadataOrganization) + return o +} + +// SetMetadataOrganization adds the metadataOrganization to the override delete override params +func (o *OverrideDeleteOverrideParams) SetMetadataOrganization(metadataOrganization *string) { + o.MetadataOrganization = metadataOrganization +} + +// WithMetadataPartner adds the metadataPartner to the override delete override params +func (o *OverrideDeleteOverrideParams) WithMetadataPartner(metadataPartner *string) *OverrideDeleteOverrideParams { + o.SetMetadataPartner(metadataPartner) + return o +} + +// SetMetadataPartner adds the metadataPartner to the override delete override params +func (o *OverrideDeleteOverrideParams) SetMetadataPartner(metadataPartner *string) { + o.MetadataPartner = metadataPartner +} + +// WithMetadataProject adds the metadataProject to the override delete override params +func (o *OverrideDeleteOverrideParams) WithMetadataProject(metadataProject string) *OverrideDeleteOverrideParams { + o.SetMetadataProject(metadataProject) + return o +} + +// SetMetadataProject adds the metadataProject to the override delete override params +func (o *OverrideDeleteOverrideParams) SetMetadataProject(metadataProject string) { + o.MetadataProject = metadataProject +} + +// WithSpecClusterPlacementClusterSelector adds the specClusterPlacementClusterSelector to the override delete override params +func (o *OverrideDeleteOverrideParams) WithSpecClusterPlacementClusterSelector(specClusterPlacementClusterSelector *string) *OverrideDeleteOverrideParams { + o.SetSpecClusterPlacementClusterSelector(specClusterPlacementClusterSelector) + return o +} + +// SetSpecClusterPlacementClusterSelector adds the specClusterPlacementClusterSelector to the override delete override params +func (o *OverrideDeleteOverrideParams) SetSpecClusterPlacementClusterSelector(specClusterPlacementClusterSelector *string) { + o.SpecClusterPlacementClusterSelector = specClusterPlacementClusterSelector +} + +// WithSpecClusterPlacementDriftAction adds the specClusterPlacementDriftAction to the override delete override params +func (o *OverrideDeleteOverrideParams) WithSpecClusterPlacementDriftAction(specClusterPlacementDriftAction *string) *OverrideDeleteOverrideParams { + o.SetSpecClusterPlacementDriftAction(specClusterPlacementDriftAction) + return o +} + +// SetSpecClusterPlacementDriftAction adds the specClusterPlacementDriftAction to the override delete override params +func (o *OverrideDeleteOverrideParams) SetSpecClusterPlacementDriftAction(specClusterPlacementDriftAction *string) { + o.SpecClusterPlacementDriftAction = specClusterPlacementDriftAction +} + +// WithSpecClusterPlacementNodeGroupingKeys adds the specClusterPlacementNodeGroupingKeys to the override delete override params +func (o *OverrideDeleteOverrideParams) WithSpecClusterPlacementNodeGroupingKeys(specClusterPlacementNodeGroupingKeys []string) *OverrideDeleteOverrideParams { + o.SetSpecClusterPlacementNodeGroupingKeys(specClusterPlacementNodeGroupingKeys) + return o +} + +// SetSpecClusterPlacementNodeGroupingKeys adds the specClusterPlacementNodeGroupingKeys to the override delete override params +func (o *OverrideDeleteOverrideParams) SetSpecClusterPlacementNodeGroupingKeys(specClusterPlacementNodeGroupingKeys []string) { + o.SpecClusterPlacementNodeGroupingKeys = specClusterPlacementNodeGroupingKeys +} + +// WithSpecClusterPlacementPlacementType adds the specClusterPlacementPlacementType to the override delete override params +func (o *OverrideDeleteOverrideParams) WithSpecClusterPlacementPlacementType(specClusterPlacementPlacementType *string) *OverrideDeleteOverrideParams { + o.SetSpecClusterPlacementPlacementType(specClusterPlacementPlacementType) + return o +} + +// SetSpecClusterPlacementPlacementType adds the specClusterPlacementPlacementType to the override delete override params +func (o *OverrideDeleteOverrideParams) SetSpecClusterPlacementPlacementType(specClusterPlacementPlacementType *string) { + o.SpecClusterPlacementPlacementType = specClusterPlacementPlacementType +} + +// WithSpecClusterSelector adds the specClusterSelector to the override delete override params +func (o *OverrideDeleteOverrideParams) WithSpecClusterSelector(specClusterSelector *string) *OverrideDeleteOverrideParams { + o.SetSpecClusterSelector(specClusterSelector) + return o +} + +// SetSpecClusterSelector adds the specClusterSelector to the override delete override params +func (o *OverrideDeleteOverrideParams) SetSpecClusterSelector(specClusterSelector *string) { + o.SpecClusterSelector = specClusterSelector +} + +// WithSpecRepoArtifactMetaGitRevision adds the specRepoArtifactMetaGitRevision to the override delete override params +func (o *OverrideDeleteOverrideParams) WithSpecRepoArtifactMetaGitRevision(specRepoArtifactMetaGitRevision *string) *OverrideDeleteOverrideParams { + o.SetSpecRepoArtifactMetaGitRevision(specRepoArtifactMetaGitRevision) + return o +} + +// SetSpecRepoArtifactMetaGitRevision adds the specRepoArtifactMetaGitRevision to the override delete override params +func (o *OverrideDeleteOverrideParams) SetSpecRepoArtifactMetaGitRevision(specRepoArtifactMetaGitRevision *string) { + o.SpecRepoArtifactMetaGitRevision = specRepoArtifactMetaGitRevision +} + +// WithSpecRepoArtifactMetaHelmChartName adds the specRepoArtifactMetaHelmChartName to the override delete override params +func (o *OverrideDeleteOverrideParams) WithSpecRepoArtifactMetaHelmChartName(specRepoArtifactMetaHelmChartName *string) *OverrideDeleteOverrideParams { + o.SetSpecRepoArtifactMetaHelmChartName(specRepoArtifactMetaHelmChartName) + return o +} + +// SetSpecRepoArtifactMetaHelmChartName adds the specRepoArtifactMetaHelmChartName to the override delete override params +func (o *OverrideDeleteOverrideParams) SetSpecRepoArtifactMetaHelmChartName(specRepoArtifactMetaHelmChartName *string) { + o.SpecRepoArtifactMetaHelmChartName = specRepoArtifactMetaHelmChartName +} + +// WithSpecRepoArtifactMetaHelmTag adds the specRepoArtifactMetaHelmTag to the override delete override params +func (o *OverrideDeleteOverrideParams) WithSpecRepoArtifactMetaHelmTag(specRepoArtifactMetaHelmTag *string) *OverrideDeleteOverrideParams { + o.SetSpecRepoArtifactMetaHelmTag(specRepoArtifactMetaHelmTag) + return o +} + +// SetSpecRepoArtifactMetaHelmTag adds the specRepoArtifactMetaHelmTag to the override delete override params +func (o *OverrideDeleteOverrideParams) SetSpecRepoArtifactMetaHelmTag(specRepoArtifactMetaHelmTag *string) { + o.SpecRepoArtifactMetaHelmTag = specRepoArtifactMetaHelmTag +} + +// WithSpecRepoArtifactMetaTimeout adds the specRepoArtifactMetaTimeout to the override delete override params +func (o *OverrideDeleteOverrideParams) WithSpecRepoArtifactMetaTimeout(specRepoArtifactMetaTimeout *string) *OverrideDeleteOverrideParams { + o.SetSpecRepoArtifactMetaTimeout(specRepoArtifactMetaTimeout) + return o +} + +// SetSpecRepoArtifactMetaTimeout adds the specRepoArtifactMetaTimeout to the override delete override params +func (o *OverrideDeleteOverrideParams) SetSpecRepoArtifactMetaTimeout(specRepoArtifactMetaTimeout *string) { + o.SpecRepoArtifactMetaTimeout = specRepoArtifactMetaTimeout +} + +// WithSpecRepositoryRef adds the specRepositoryRef to the override delete override params +func (o *OverrideDeleteOverrideParams) WithSpecRepositoryRef(specRepositoryRef *string) *OverrideDeleteOverrideParams { + o.SetSpecRepositoryRef(specRepositoryRef) + return o +} + +// SetSpecRepositoryRef adds the specRepositoryRef to the override delete override params +func (o *OverrideDeleteOverrideParams) SetSpecRepositoryRef(specRepositoryRef *string) { + o.SpecRepositoryRef = specRepositoryRef +} + +// WithSpecResourceSelector adds the specResourceSelector to the override delete override params +func (o *OverrideDeleteOverrideParams) WithSpecResourceSelector(specResourceSelector *string) *OverrideDeleteOverrideParams { + o.SetSpecResourceSelector(specResourceSelector) + return o +} + +// SetSpecResourceSelector adds the specResourceSelector to the override delete override params +func (o *OverrideDeleteOverrideParams) SetSpecResourceSelector(specResourceSelector *string) { + o.SpecResourceSelector = specResourceSelector +} + +// WithSpecTemplateOverridesV2EventFrameworkFQDN adds the specTemplateOverridesV2EventFrameworkFQDN to the override delete override params +func (o *OverrideDeleteOverrideParams) WithSpecTemplateOverridesV2EventFrameworkFQDN(specTemplateOverridesV2EventFrameworkFQDN *string) *OverrideDeleteOverrideParams { + o.SetSpecTemplateOverridesV2EventFrameworkFQDN(specTemplateOverridesV2EventFrameworkFQDN) + return o +} + +// SetSpecTemplateOverridesV2EventFrameworkFQDN adds the specTemplateOverridesV2EventFrameworkFQDN to the override delete override params +func (o *OverrideDeleteOverrideParams) SetSpecTemplateOverridesV2EventFrameworkFQDN(specTemplateOverridesV2EventFrameworkFQDN *string) { + o.SpecTemplateOverridesV2EventFrameworkFQDN = specTemplateOverridesV2EventFrameworkFQDN +} + +// WithSpecTemplateOverridesClusterName adds the specTemplateOverridesClusterName to the override delete override params +func (o *OverrideDeleteOverrideParams) WithSpecTemplateOverridesClusterName(specTemplateOverridesClusterName *string) *OverrideDeleteOverrideParams { + o.SetSpecTemplateOverridesClusterName(specTemplateOverridesClusterName) + return o +} + +// SetSpecTemplateOverridesClusterName adds the specTemplateOverridesClusterName to the override delete override params +func (o *OverrideDeleteOverrideParams) SetSpecTemplateOverridesClusterName(specTemplateOverridesClusterName *string) { + o.SpecTemplateOverridesClusterName = specTemplateOverridesClusterName +} + +// WithSpecTemplateOverridesOrgDisplayName adds the specTemplateOverridesOrgDisplayName to the override delete override params +func (o *OverrideDeleteOverrideParams) WithSpecTemplateOverridesOrgDisplayName(specTemplateOverridesOrgDisplayName *string) *OverrideDeleteOverrideParams { + o.SetSpecTemplateOverridesOrgDisplayName(specTemplateOverridesOrgDisplayName) + return o +} + +// SetSpecTemplateOverridesOrgDisplayName adds the specTemplateOverridesOrgDisplayName to the override delete override params +func (o *OverrideDeleteOverrideParams) SetSpecTemplateOverridesOrgDisplayName(specTemplateOverridesOrgDisplayName *string) { + o.SpecTemplateOverridesOrgDisplayName = specTemplateOverridesOrgDisplayName +} + +// WithSpecTemplateOverridesOrganizationHash adds the specTemplateOverridesOrganizationHash to the override delete override params +func (o *OverrideDeleteOverrideParams) WithSpecTemplateOverridesOrganizationHash(specTemplateOverridesOrganizationHash *string) *OverrideDeleteOverrideParams { + o.SetSpecTemplateOverridesOrganizationHash(specTemplateOverridesOrganizationHash) + return o +} + +// SetSpecTemplateOverridesOrganizationHash adds the specTemplateOverridesOrganizationHash to the override delete override params +func (o *OverrideDeleteOverrideParams) SetSpecTemplateOverridesOrganizationHash(specTemplateOverridesOrganizationHash *string) { + o.SpecTemplateOverridesOrganizationHash = specTemplateOverridesOrganizationHash +} + +// WithSpecTemplateOverridesOrganizationID adds the specTemplateOverridesOrganizationID to the override delete override params +func (o *OverrideDeleteOverrideParams) WithSpecTemplateOverridesOrganizationID(specTemplateOverridesOrganizationID *string) *OverrideDeleteOverrideParams { + o.SetSpecTemplateOverridesOrganizationID(specTemplateOverridesOrganizationID) + return o +} + +// SetSpecTemplateOverridesOrganizationID adds the specTemplateOverridesOrganizationId to the override delete override params +func (o *OverrideDeleteOverrideParams) SetSpecTemplateOverridesOrganizationID(specTemplateOverridesOrganizationID *string) { + o.SpecTemplateOverridesOrganizationID = specTemplateOverridesOrganizationID +} + +// WithSpecTemplateOverridesPartnerDisplayName adds the specTemplateOverridesPartnerDisplayName to the override delete override params +func (o *OverrideDeleteOverrideParams) WithSpecTemplateOverridesPartnerDisplayName(specTemplateOverridesPartnerDisplayName *string) *OverrideDeleteOverrideParams { + o.SetSpecTemplateOverridesPartnerDisplayName(specTemplateOverridesPartnerDisplayName) + return o +} + +// SetSpecTemplateOverridesPartnerDisplayName adds the specTemplateOverridesPartnerDisplayName to the override delete override params +func (o *OverrideDeleteOverrideParams) SetSpecTemplateOverridesPartnerDisplayName(specTemplateOverridesPartnerDisplayName *string) { + o.SpecTemplateOverridesPartnerDisplayName = specTemplateOverridesPartnerDisplayName +} + +// WithSpecTemplateOverridesPartnerHash adds the specTemplateOverridesPartnerHash to the override delete override params +func (o *OverrideDeleteOverrideParams) WithSpecTemplateOverridesPartnerHash(specTemplateOverridesPartnerHash *string) *OverrideDeleteOverrideParams { + o.SetSpecTemplateOverridesPartnerHash(specTemplateOverridesPartnerHash) + return o +} + +// SetSpecTemplateOverridesPartnerHash adds the specTemplateOverridesPartnerHash to the override delete override params +func (o *OverrideDeleteOverrideParams) SetSpecTemplateOverridesPartnerHash(specTemplateOverridesPartnerHash *string) { + o.SpecTemplateOverridesPartnerHash = specTemplateOverridesPartnerHash +} + +// WithSpecTemplateOverridesPartnerID adds the specTemplateOverridesPartnerID to the override delete override params +func (o *OverrideDeleteOverrideParams) WithSpecTemplateOverridesPartnerID(specTemplateOverridesPartnerID *string) *OverrideDeleteOverrideParams { + o.SetSpecTemplateOverridesPartnerID(specTemplateOverridesPartnerID) + return o +} + +// SetSpecTemplateOverridesPartnerID adds the specTemplateOverridesPartnerId to the override delete override params +func (o *OverrideDeleteOverrideParams) SetSpecTemplateOverridesPartnerID(specTemplateOverridesPartnerID *string) { + o.SpecTemplateOverridesPartnerID = specTemplateOverridesPartnerID +} + +// WithSpecTemplateOverridesProjectID adds the specTemplateOverridesProjectID to the override delete override params +func (o *OverrideDeleteOverrideParams) WithSpecTemplateOverridesProjectID(specTemplateOverridesProjectID *string) *OverrideDeleteOverrideParams { + o.SetSpecTemplateOverridesProjectID(specTemplateOverridesProjectID) + return o +} + +// SetSpecTemplateOverridesProjectID adds the specTemplateOverridesProjectId to the override delete override params +func (o *OverrideDeleteOverrideParams) SetSpecTemplateOverridesProjectID(specTemplateOverridesProjectID *string) { + o.SpecTemplateOverridesProjectID = specTemplateOverridesProjectID +} + +// WithSpecTemplateOverridesProxyURL adds the specTemplateOverridesProxyURL to the override delete override params +func (o *OverrideDeleteOverrideParams) WithSpecTemplateOverridesProxyURL(specTemplateOverridesProxyURL *string) *OverrideDeleteOverrideParams { + o.SetSpecTemplateOverridesProxyURL(specTemplateOverridesProxyURL) + return o +} + +// SetSpecTemplateOverridesProxyURL adds the specTemplateOverridesProxyUrl to the override delete override params +func (o *OverrideDeleteOverrideParams) SetSpecTemplateOverridesProxyURL(specTemplateOverridesProxyURL *string) { + o.SpecTemplateOverridesProxyURL = specTemplateOverridesProxyURL +} + +// WithSpecTemplateOverridesV1DeploymentEnv adds the specTemplateOverridesV1DeploymentEnv to the override delete override params +func (o *OverrideDeleteOverrideParams) WithSpecTemplateOverridesV1DeploymentEnv(specTemplateOverridesV1DeploymentEnv *string) *OverrideDeleteOverrideParams { + o.SetSpecTemplateOverridesV1DeploymentEnv(specTemplateOverridesV1DeploymentEnv) + return o +} + +// SetSpecTemplateOverridesV1DeploymentEnv adds the specTemplateOverridesV1DeploymentEnv to the override delete override params +func (o *OverrideDeleteOverrideParams) SetSpecTemplateOverridesV1DeploymentEnv(specTemplateOverridesV1DeploymentEnv *string) { + o.SpecTemplateOverridesV1DeploymentEnv = specTemplateOverridesV1DeploymentEnv +} + +// WithSpecTemplateOverridesV1EdgeDisplayName adds the specTemplateOverridesV1EdgeDisplayName to the override delete override params +func (o *OverrideDeleteOverrideParams) WithSpecTemplateOverridesV1EdgeDisplayName(specTemplateOverridesV1EdgeDisplayName *string) *OverrideDeleteOverrideParams { + o.SetSpecTemplateOverridesV1EdgeDisplayName(specTemplateOverridesV1EdgeDisplayName) + return o +} + +// SetSpecTemplateOverridesV1EdgeDisplayName adds the specTemplateOverridesV1EdgeDisplayName to the override delete override params +func (o *OverrideDeleteOverrideParams) SetSpecTemplateOverridesV1EdgeDisplayName(specTemplateOverridesV1EdgeDisplayName *string) { + o.SpecTemplateOverridesV1EdgeDisplayName = specTemplateOverridesV1EdgeDisplayName +} + +// WithSpecTemplateOverridesV1EdgeID adds the specTemplateOverridesV1EdgeID to the override delete override params +func (o *OverrideDeleteOverrideParams) WithSpecTemplateOverridesV1EdgeID(specTemplateOverridesV1EdgeID *string) *OverrideDeleteOverrideParams { + o.SetSpecTemplateOverridesV1EdgeID(specTemplateOverridesV1EdgeID) + return o +} + +// SetSpecTemplateOverridesV1EdgeID adds the specTemplateOverridesV1EdgeId to the override delete override params +func (o *OverrideDeleteOverrideParams) SetSpecTemplateOverridesV1EdgeID(specTemplateOverridesV1EdgeID *string) { + o.SpecTemplateOverridesV1EdgeID = specTemplateOverridesV1EdgeID +} + +// WithSpecTemplateOverridesV1FluentdAggregatorAddr adds the specTemplateOverridesV1FluentdAggregatorAddr to the override delete override params +func (o *OverrideDeleteOverrideParams) WithSpecTemplateOverridesV1FluentdAggregatorAddr(specTemplateOverridesV1FluentdAggregatorAddr *string) *OverrideDeleteOverrideParams { + o.SetSpecTemplateOverridesV1FluentdAggregatorAddr(specTemplateOverridesV1FluentdAggregatorAddr) + return o +} + +// SetSpecTemplateOverridesV1FluentdAggregatorAddr adds the specTemplateOverridesV1FluentdAggregatorAddr to the override delete override params +func (o *OverrideDeleteOverrideParams) SetSpecTemplateOverridesV1FluentdAggregatorAddr(specTemplateOverridesV1FluentdAggregatorAddr *string) { + o.SpecTemplateOverridesV1FluentdAggregatorAddr = specTemplateOverridesV1FluentdAggregatorAddr +} + +// WithSpecTemplateOverridesV1InfluxDBFQDN adds the specTemplateOverridesV1InfluxDBFQDN to the override delete override params +func (o *OverrideDeleteOverrideParams) WithSpecTemplateOverridesV1InfluxDBFQDN(specTemplateOverridesV1InfluxDBFQDN *string) *OverrideDeleteOverrideParams { + o.SetSpecTemplateOverridesV1InfluxDBFQDN(specTemplateOverridesV1InfluxDBFQDN) + return o +} + +// SetSpecTemplateOverridesV1InfluxDBFQDN adds the specTemplateOverridesV1InfluxDBFQDN to the override delete override params +func (o *OverrideDeleteOverrideParams) SetSpecTemplateOverridesV1InfluxDBFQDN(specTemplateOverridesV1InfluxDBFQDN *string) { + o.SpecTemplateOverridesV1InfluxDBFQDN = specTemplateOverridesV1InfluxDBFQDN +} + +// WithSpecTemplateOverridesV1InfluxDBPassword adds the specTemplateOverridesV1InfluxDBPassword to the override delete override params +func (o *OverrideDeleteOverrideParams) WithSpecTemplateOverridesV1InfluxDBPassword(specTemplateOverridesV1InfluxDBPassword *string) *OverrideDeleteOverrideParams { + o.SetSpecTemplateOverridesV1InfluxDBPassword(specTemplateOverridesV1InfluxDBPassword) + return o +} + +// SetSpecTemplateOverridesV1InfluxDBPassword adds the specTemplateOverridesV1InfluxDBPassword to the override delete override params +func (o *OverrideDeleteOverrideParams) SetSpecTemplateOverridesV1InfluxDBPassword(specTemplateOverridesV1InfluxDBPassword *string) { + o.SpecTemplateOverridesV1InfluxDBPassword = specTemplateOverridesV1InfluxDBPassword +} + +// WithSpecTemplateOverridesV1PromethuesRelayFQDN adds the specTemplateOverridesV1PromethuesRelayFQDN to the override delete override params +func (o *OverrideDeleteOverrideParams) WithSpecTemplateOverridesV1PromethuesRelayFQDN(specTemplateOverridesV1PromethuesRelayFQDN *string) *OverrideDeleteOverrideParams { + o.SetSpecTemplateOverridesV1PromethuesRelayFQDN(specTemplateOverridesV1PromethuesRelayFQDN) + return o +} + +// SetSpecTemplateOverridesV1PromethuesRelayFQDN adds the specTemplateOverridesV1PromethuesRelayFQDN to the override delete override params +func (o *OverrideDeleteOverrideParams) SetSpecTemplateOverridesV1PromethuesRelayFQDN(specTemplateOverridesV1PromethuesRelayFQDN *string) { + o.SpecTemplateOverridesV1PromethuesRelayFQDN = specTemplateOverridesV1PromethuesRelayFQDN +} + +// WithSpecValuesFile adds the specValuesFile to the override delete override params +func (o *OverrideDeleteOverrideParams) WithSpecValuesFile(specValuesFile *string) *OverrideDeleteOverrideParams { + o.SetSpecValuesFile(specValuesFile) + return o +} + +// SetSpecValuesFile adds the specValuesFile to the override delete override params +func (o *OverrideDeleteOverrideParams) SetSpecValuesFile(specValuesFile *string) { + o.SpecValuesFile = specValuesFile +} + +// WithStatusConditionStatus adds the statusConditionStatus to the override delete override params +func (o *OverrideDeleteOverrideParams) WithStatusConditionStatus(statusConditionStatus *string) *OverrideDeleteOverrideParams { + o.SetStatusConditionStatus(statusConditionStatus) + return o +} + +// SetStatusConditionStatus adds the statusConditionStatus to the override delete override params +func (o *OverrideDeleteOverrideParams) SetStatusConditionStatus(statusConditionStatus *string) { + o.StatusConditionStatus = statusConditionStatus +} + +// WithStatusConditionType adds the statusConditionType to the override delete override params +func (o *OverrideDeleteOverrideParams) WithStatusConditionType(statusConditionType *string) *OverrideDeleteOverrideParams { + o.SetStatusConditionType(statusConditionType) + return o +} + +// SetStatusConditionType adds the statusConditionType to the override delete override params +func (o *OverrideDeleteOverrideParams) SetStatusConditionType(statusConditionType *string) { + o.StatusConditionType = statusConditionType +} + +// WithStatusLastUpdated adds the statusLastUpdated to the override delete override params +func (o *OverrideDeleteOverrideParams) WithStatusLastUpdated(statusLastUpdated *strfmt.DateTime) *OverrideDeleteOverrideParams { + o.SetStatusLastUpdated(statusLastUpdated) + return o +} + +// SetStatusLastUpdated adds the statusLastUpdated to the override delete override params +func (o *OverrideDeleteOverrideParams) SetStatusLastUpdated(statusLastUpdated *strfmt.DateTime) { + o.StatusLastUpdated = statusLastUpdated +} + +// WithStatusReason adds the statusReason to the override delete override params +func (o *OverrideDeleteOverrideParams) WithStatusReason(statusReason *string) *OverrideDeleteOverrideParams { + o.SetStatusReason(statusReason) + return o +} + +// SetStatusReason adds the statusReason to the override delete override params +func (o *OverrideDeleteOverrideParams) SetStatusReason(statusReason *string) { + o.StatusReason = statusReason +} + +// WriteToRequest writes these params to a swagger request +func (o *OverrideDeleteOverrideParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.APIVersion != nil { + + // query param apiVersion + var qrAPIVersion string + + if o.APIVersion != nil { + qrAPIVersion = *o.APIVersion + } + qAPIVersion := qrAPIVersion + if qAPIVersion != "" { + + if err := r.SetQueryParam("apiVersion", qAPIVersion); err != nil { + return err + } + } + } + + if o.Kind != nil { + + // query param kind + var qrKind string + + if o.Kind != nil { + qrKind = *o.Kind + } + qKind := qrKind + if qKind != "" { + + if err := r.SetQueryParam("kind", qKind); err != nil { + return err + } + } + } + + if o.MetadataDescription != nil { + + // query param metadata.description + var qrMetadataDescription string + + if o.MetadataDescription != nil { + qrMetadataDescription = *o.MetadataDescription + } + qMetadataDescription := qrMetadataDescription + if qMetadataDescription != "" { + + if err := r.SetQueryParam("metadata.description", qMetadataDescription); err != nil { + return err + } + } + } + + if o.MetadataID != nil { + + // query param metadata.id + var qrMetadataID string + + if o.MetadataID != nil { + qrMetadataID = *o.MetadataID + } + qMetadataID := qrMetadataID + if qMetadataID != "" { + + if err := r.SetQueryParam("metadata.id", qMetadataID); err != nil { + return err + } + } + } + + if o.MetadataModifiedAt != nil { + + // query param metadata.modifiedAt + var qrMetadataModifiedAt strfmt.DateTime + + if o.MetadataModifiedAt != nil { + qrMetadataModifiedAt = *o.MetadataModifiedAt + } + qMetadataModifiedAt := qrMetadataModifiedAt.String() + if qMetadataModifiedAt != "" { + + if err := r.SetQueryParam("metadata.modifiedAt", qMetadataModifiedAt); err != nil { + return err + } + } + } + + // path param metadata.name + if err := r.SetPathParam("metadata.name", o.MetadataName); err != nil { + return err + } + + if o.MetadataOrganization != nil { + + // query param metadata.organization + var qrMetadataOrganization string + + if o.MetadataOrganization != nil { + qrMetadataOrganization = *o.MetadataOrganization + } + qMetadataOrganization := qrMetadataOrganization + if qMetadataOrganization != "" { + + if err := r.SetQueryParam("metadata.organization", qMetadataOrganization); err != nil { + return err + } + } + } + + if o.MetadataPartner != nil { + + // query param metadata.partner + var qrMetadataPartner string + + if o.MetadataPartner != nil { + qrMetadataPartner = *o.MetadataPartner + } + qMetadataPartner := qrMetadataPartner + if qMetadataPartner != "" { + + if err := r.SetQueryParam("metadata.partner", qMetadataPartner); err != nil { + return err + } + } + } + + // path param metadata.project + if err := r.SetPathParam("metadata.project", o.MetadataProject); err != nil { + return err + } + + if o.SpecClusterPlacementClusterSelector != nil { + + // query param spec.clusterPlacement.clusterSelector + var qrSpecClusterPlacementClusterSelector string + + if o.SpecClusterPlacementClusterSelector != nil { + qrSpecClusterPlacementClusterSelector = *o.SpecClusterPlacementClusterSelector + } + qSpecClusterPlacementClusterSelector := qrSpecClusterPlacementClusterSelector + if qSpecClusterPlacementClusterSelector != "" { + + if err := r.SetQueryParam("spec.clusterPlacement.clusterSelector", qSpecClusterPlacementClusterSelector); err != nil { + return err + } + } + } + + if o.SpecClusterPlacementDriftAction != nil { + + // query param spec.clusterPlacement.driftAction + var qrSpecClusterPlacementDriftAction string + + if o.SpecClusterPlacementDriftAction != nil { + qrSpecClusterPlacementDriftAction = *o.SpecClusterPlacementDriftAction + } + qSpecClusterPlacementDriftAction := qrSpecClusterPlacementDriftAction + if qSpecClusterPlacementDriftAction != "" { + + if err := r.SetQueryParam("spec.clusterPlacement.driftAction", qSpecClusterPlacementDriftAction); err != nil { + return err + } + } + } + + if o.SpecClusterPlacementNodeGroupingKeys != nil { + + // binding items for spec.clusterPlacement.nodeGroupingKeys + joinedSpecClusterPlacementNodeGroupingKeys := o.bindParamSpecClusterPlacementNodeGroupingKeys(reg) + + // query array param spec.clusterPlacement.nodeGroupingKeys + if err := r.SetQueryParam("spec.clusterPlacement.nodeGroupingKeys", joinedSpecClusterPlacementNodeGroupingKeys...); err != nil { + return err + } + } + + if o.SpecClusterPlacementPlacementType != nil { + + // query param spec.clusterPlacement.placementType + var qrSpecClusterPlacementPlacementType string + + if o.SpecClusterPlacementPlacementType != nil { + qrSpecClusterPlacementPlacementType = *o.SpecClusterPlacementPlacementType + } + qSpecClusterPlacementPlacementType := qrSpecClusterPlacementPlacementType + if qSpecClusterPlacementPlacementType != "" { + + if err := r.SetQueryParam("spec.clusterPlacement.placementType", qSpecClusterPlacementPlacementType); err != nil { + return err + } + } + } + + if o.SpecClusterSelector != nil { + + // query param spec.clusterSelector + var qrSpecClusterSelector string + + if o.SpecClusterSelector != nil { + qrSpecClusterSelector = *o.SpecClusterSelector + } + qSpecClusterSelector := qrSpecClusterSelector + if qSpecClusterSelector != "" { + + if err := r.SetQueryParam("spec.clusterSelector", qSpecClusterSelector); err != nil { + return err + } + } + } + + if o.SpecRepoArtifactMetaGitRevision != nil { + + // query param spec.repoArtifactMeta.git.revision + var qrSpecRepoArtifactMetaGitRevision string + + if o.SpecRepoArtifactMetaGitRevision != nil { + qrSpecRepoArtifactMetaGitRevision = *o.SpecRepoArtifactMetaGitRevision + } + qSpecRepoArtifactMetaGitRevision := qrSpecRepoArtifactMetaGitRevision + if qSpecRepoArtifactMetaGitRevision != "" { + + if err := r.SetQueryParam("spec.repoArtifactMeta.git.revision", qSpecRepoArtifactMetaGitRevision); err != nil { + return err + } + } + } + + if o.SpecRepoArtifactMetaHelmChartName != nil { + + // query param spec.repoArtifactMeta.helm.chartName + var qrSpecRepoArtifactMetaHelmChartName string + + if o.SpecRepoArtifactMetaHelmChartName != nil { + qrSpecRepoArtifactMetaHelmChartName = *o.SpecRepoArtifactMetaHelmChartName + } + qSpecRepoArtifactMetaHelmChartName := qrSpecRepoArtifactMetaHelmChartName + if qSpecRepoArtifactMetaHelmChartName != "" { + + if err := r.SetQueryParam("spec.repoArtifactMeta.helm.chartName", qSpecRepoArtifactMetaHelmChartName); err != nil { + return err + } + } + } + + if o.SpecRepoArtifactMetaHelmTag != nil { + + // query param spec.repoArtifactMeta.helm.tag + var qrSpecRepoArtifactMetaHelmTag string + + if o.SpecRepoArtifactMetaHelmTag != nil { + qrSpecRepoArtifactMetaHelmTag = *o.SpecRepoArtifactMetaHelmTag + } + qSpecRepoArtifactMetaHelmTag := qrSpecRepoArtifactMetaHelmTag + if qSpecRepoArtifactMetaHelmTag != "" { + + if err := r.SetQueryParam("spec.repoArtifactMeta.helm.tag", qSpecRepoArtifactMetaHelmTag); err != nil { + return err + } + } + } + + if o.SpecRepoArtifactMetaTimeout != nil { + + // query param spec.repoArtifactMeta.timeout + var qrSpecRepoArtifactMetaTimeout string + + if o.SpecRepoArtifactMetaTimeout != nil { + qrSpecRepoArtifactMetaTimeout = *o.SpecRepoArtifactMetaTimeout + } + qSpecRepoArtifactMetaTimeout := qrSpecRepoArtifactMetaTimeout + if qSpecRepoArtifactMetaTimeout != "" { + + if err := r.SetQueryParam("spec.repoArtifactMeta.timeout", qSpecRepoArtifactMetaTimeout); err != nil { + return err + } + } + } + + if o.SpecRepositoryRef != nil { + + // query param spec.repositoryRef + var qrSpecRepositoryRef string + + if o.SpecRepositoryRef != nil { + qrSpecRepositoryRef = *o.SpecRepositoryRef + } + qSpecRepositoryRef := qrSpecRepositoryRef + if qSpecRepositoryRef != "" { + + if err := r.SetQueryParam("spec.repositoryRef", qSpecRepositoryRef); err != nil { + return err + } + } + } + + if o.SpecResourceSelector != nil { + + // query param spec.resourceSelector + var qrSpecResourceSelector string + + if o.SpecResourceSelector != nil { + qrSpecResourceSelector = *o.SpecResourceSelector + } + qSpecResourceSelector := qrSpecResourceSelector + if qSpecResourceSelector != "" { + + if err := r.SetQueryParam("spec.resourceSelector", qSpecResourceSelector); err != nil { + return err + } + } + } + + if o.SpecTemplateOverridesV2EventFrameworkFQDN != nil { + + // query param spec.templateOverrides.V2EventFrameworkFQDN + var qrSpecTemplateOverridesV2EventFrameworkFQDN string + + if o.SpecTemplateOverridesV2EventFrameworkFQDN != nil { + qrSpecTemplateOverridesV2EventFrameworkFQDN = *o.SpecTemplateOverridesV2EventFrameworkFQDN + } + qSpecTemplateOverridesV2EventFrameworkFQDN := qrSpecTemplateOverridesV2EventFrameworkFQDN + if qSpecTemplateOverridesV2EventFrameworkFQDN != "" { + + if err := r.SetQueryParam("spec.templateOverrides.V2EventFrameworkFQDN", qSpecTemplateOverridesV2EventFrameworkFQDN); err != nil { + return err + } + } + } + + if o.SpecTemplateOverridesClusterName != nil { + + // query param spec.templateOverrides.clusterName + var qrSpecTemplateOverridesClusterName string + + if o.SpecTemplateOverridesClusterName != nil { + qrSpecTemplateOverridesClusterName = *o.SpecTemplateOverridesClusterName + } + qSpecTemplateOverridesClusterName := qrSpecTemplateOverridesClusterName + if qSpecTemplateOverridesClusterName != "" { + + if err := r.SetQueryParam("spec.templateOverrides.clusterName", qSpecTemplateOverridesClusterName); err != nil { + return err + } + } + } + + if o.SpecTemplateOverridesOrgDisplayName != nil { + + // query param spec.templateOverrides.orgDisplayName + var qrSpecTemplateOverridesOrgDisplayName string + + if o.SpecTemplateOverridesOrgDisplayName != nil { + qrSpecTemplateOverridesOrgDisplayName = *o.SpecTemplateOverridesOrgDisplayName + } + qSpecTemplateOverridesOrgDisplayName := qrSpecTemplateOverridesOrgDisplayName + if qSpecTemplateOverridesOrgDisplayName != "" { + + if err := r.SetQueryParam("spec.templateOverrides.orgDisplayName", qSpecTemplateOverridesOrgDisplayName); err != nil { + return err + } + } + } + + if o.SpecTemplateOverridesOrganizationHash != nil { + + // query param spec.templateOverrides.organizationHash + var qrSpecTemplateOverridesOrganizationHash string + + if o.SpecTemplateOverridesOrganizationHash != nil { + qrSpecTemplateOverridesOrganizationHash = *o.SpecTemplateOverridesOrganizationHash + } + qSpecTemplateOverridesOrganizationHash := qrSpecTemplateOverridesOrganizationHash + if qSpecTemplateOverridesOrganizationHash != "" { + + if err := r.SetQueryParam("spec.templateOverrides.organizationHash", qSpecTemplateOverridesOrganizationHash); err != nil { + return err + } + } + } + + if o.SpecTemplateOverridesOrganizationID != nil { + + // query param spec.templateOverrides.organizationID + var qrSpecTemplateOverridesOrganizationID string + + if o.SpecTemplateOverridesOrganizationID != nil { + qrSpecTemplateOverridesOrganizationID = *o.SpecTemplateOverridesOrganizationID + } + qSpecTemplateOverridesOrganizationID := qrSpecTemplateOverridesOrganizationID + if qSpecTemplateOverridesOrganizationID != "" { + + if err := r.SetQueryParam("spec.templateOverrides.organizationID", qSpecTemplateOverridesOrganizationID); err != nil { + return err + } + } + } + + if o.SpecTemplateOverridesPartnerDisplayName != nil { + + // query param spec.templateOverrides.partnerDisplayName + var qrSpecTemplateOverridesPartnerDisplayName string + + if o.SpecTemplateOverridesPartnerDisplayName != nil { + qrSpecTemplateOverridesPartnerDisplayName = *o.SpecTemplateOverridesPartnerDisplayName + } + qSpecTemplateOverridesPartnerDisplayName := qrSpecTemplateOverridesPartnerDisplayName + if qSpecTemplateOverridesPartnerDisplayName != "" { + + if err := r.SetQueryParam("spec.templateOverrides.partnerDisplayName", qSpecTemplateOverridesPartnerDisplayName); err != nil { + return err + } + } + } + + if o.SpecTemplateOverridesPartnerHash != nil { + + // query param spec.templateOverrides.partnerHash + var qrSpecTemplateOverridesPartnerHash string + + if o.SpecTemplateOverridesPartnerHash != nil { + qrSpecTemplateOverridesPartnerHash = *o.SpecTemplateOverridesPartnerHash + } + qSpecTemplateOverridesPartnerHash := qrSpecTemplateOverridesPartnerHash + if qSpecTemplateOverridesPartnerHash != "" { + + if err := r.SetQueryParam("spec.templateOverrides.partnerHash", qSpecTemplateOverridesPartnerHash); err != nil { + return err + } + } + } + + if o.SpecTemplateOverridesPartnerID != nil { + + // query param spec.templateOverrides.partnerID + var qrSpecTemplateOverridesPartnerID string + + if o.SpecTemplateOverridesPartnerID != nil { + qrSpecTemplateOverridesPartnerID = *o.SpecTemplateOverridesPartnerID + } + qSpecTemplateOverridesPartnerID := qrSpecTemplateOverridesPartnerID + if qSpecTemplateOverridesPartnerID != "" { + + if err := r.SetQueryParam("spec.templateOverrides.partnerID", qSpecTemplateOverridesPartnerID); err != nil { + return err + } + } + } + + if o.SpecTemplateOverridesProjectID != nil { + + // query param spec.templateOverrides.projectID + var qrSpecTemplateOverridesProjectID string + + if o.SpecTemplateOverridesProjectID != nil { + qrSpecTemplateOverridesProjectID = *o.SpecTemplateOverridesProjectID + } + qSpecTemplateOverridesProjectID := qrSpecTemplateOverridesProjectID + if qSpecTemplateOverridesProjectID != "" { + + if err := r.SetQueryParam("spec.templateOverrides.projectID", qSpecTemplateOverridesProjectID); err != nil { + return err + } + } + } + + if o.SpecTemplateOverridesProxyURL != nil { + + // query param spec.templateOverrides.proxyURL + var qrSpecTemplateOverridesProxyURL string + + if o.SpecTemplateOverridesProxyURL != nil { + qrSpecTemplateOverridesProxyURL = *o.SpecTemplateOverridesProxyURL + } + qSpecTemplateOverridesProxyURL := qrSpecTemplateOverridesProxyURL + if qSpecTemplateOverridesProxyURL != "" { + + if err := r.SetQueryParam("spec.templateOverrides.proxyURL", qSpecTemplateOverridesProxyURL); err != nil { + return err + } + } + } + + if o.SpecTemplateOverridesV1DeploymentEnv != nil { + + // query param spec.templateOverrides.v1DeploymentEnv + var qrSpecTemplateOverridesV1DeploymentEnv string + + if o.SpecTemplateOverridesV1DeploymentEnv != nil { + qrSpecTemplateOverridesV1DeploymentEnv = *o.SpecTemplateOverridesV1DeploymentEnv + } + qSpecTemplateOverridesV1DeploymentEnv := qrSpecTemplateOverridesV1DeploymentEnv + if qSpecTemplateOverridesV1DeploymentEnv != "" { + + if err := r.SetQueryParam("spec.templateOverrides.v1DeploymentEnv", qSpecTemplateOverridesV1DeploymentEnv); err != nil { + return err + } + } + } + + if o.SpecTemplateOverridesV1EdgeDisplayName != nil { + + // query param spec.templateOverrides.v1EdgeDisplayName + var qrSpecTemplateOverridesV1EdgeDisplayName string + + if o.SpecTemplateOverridesV1EdgeDisplayName != nil { + qrSpecTemplateOverridesV1EdgeDisplayName = *o.SpecTemplateOverridesV1EdgeDisplayName + } + qSpecTemplateOverridesV1EdgeDisplayName := qrSpecTemplateOverridesV1EdgeDisplayName + if qSpecTemplateOverridesV1EdgeDisplayName != "" { + + if err := r.SetQueryParam("spec.templateOverrides.v1EdgeDisplayName", qSpecTemplateOverridesV1EdgeDisplayName); err != nil { + return err + } + } + } + + if o.SpecTemplateOverridesV1EdgeID != nil { + + // query param spec.templateOverrides.v1EdgeID + var qrSpecTemplateOverridesV1EdgeID string + + if o.SpecTemplateOverridesV1EdgeID != nil { + qrSpecTemplateOverridesV1EdgeID = *o.SpecTemplateOverridesV1EdgeID + } + qSpecTemplateOverridesV1EdgeID := qrSpecTemplateOverridesV1EdgeID + if qSpecTemplateOverridesV1EdgeID != "" { + + if err := r.SetQueryParam("spec.templateOverrides.v1EdgeID", qSpecTemplateOverridesV1EdgeID); err != nil { + return err + } + } + } + + if o.SpecTemplateOverridesV1FluentdAggregatorAddr != nil { + + // query param spec.templateOverrides.v1FluentdAggregatorAddr + var qrSpecTemplateOverridesV1FluentdAggregatorAddr string + + if o.SpecTemplateOverridesV1FluentdAggregatorAddr != nil { + qrSpecTemplateOverridesV1FluentdAggregatorAddr = *o.SpecTemplateOverridesV1FluentdAggregatorAddr + } + qSpecTemplateOverridesV1FluentdAggregatorAddr := qrSpecTemplateOverridesV1FluentdAggregatorAddr + if qSpecTemplateOverridesV1FluentdAggregatorAddr != "" { + + if err := r.SetQueryParam("spec.templateOverrides.v1FluentdAggregatorAddr", qSpecTemplateOverridesV1FluentdAggregatorAddr); err != nil { + return err + } + } + } + + if o.SpecTemplateOverridesV1InfluxDBFQDN != nil { + + // query param spec.templateOverrides.v1InfluxDBFQDN + var qrSpecTemplateOverridesV1InfluxDBFQDN string + + if o.SpecTemplateOverridesV1InfluxDBFQDN != nil { + qrSpecTemplateOverridesV1InfluxDBFQDN = *o.SpecTemplateOverridesV1InfluxDBFQDN + } + qSpecTemplateOverridesV1InfluxDBFQDN := qrSpecTemplateOverridesV1InfluxDBFQDN + if qSpecTemplateOverridesV1InfluxDBFQDN != "" { + + if err := r.SetQueryParam("spec.templateOverrides.v1InfluxDBFQDN", qSpecTemplateOverridesV1InfluxDBFQDN); err != nil { + return err + } + } + } + + if o.SpecTemplateOverridesV1InfluxDBPassword != nil { + + // query param spec.templateOverrides.v1InfluxDBPassword + var qrSpecTemplateOverridesV1InfluxDBPassword string + + if o.SpecTemplateOverridesV1InfluxDBPassword != nil { + qrSpecTemplateOverridesV1InfluxDBPassword = *o.SpecTemplateOverridesV1InfluxDBPassword + } + qSpecTemplateOverridesV1InfluxDBPassword := qrSpecTemplateOverridesV1InfluxDBPassword + if qSpecTemplateOverridesV1InfluxDBPassword != "" { + + if err := r.SetQueryParam("spec.templateOverrides.v1InfluxDBPassword", qSpecTemplateOverridesV1InfluxDBPassword); err != nil { + return err + } + } + } + + if o.SpecTemplateOverridesV1PromethuesRelayFQDN != nil { + + // query param spec.templateOverrides.v1PromethuesRelayFQDN + var qrSpecTemplateOverridesV1PromethuesRelayFQDN string + + if o.SpecTemplateOverridesV1PromethuesRelayFQDN != nil { + qrSpecTemplateOverridesV1PromethuesRelayFQDN = *o.SpecTemplateOverridesV1PromethuesRelayFQDN + } + qSpecTemplateOverridesV1PromethuesRelayFQDN := qrSpecTemplateOverridesV1PromethuesRelayFQDN + if qSpecTemplateOverridesV1PromethuesRelayFQDN != "" { + + if err := r.SetQueryParam("spec.templateOverrides.v1PromethuesRelayFQDN", qSpecTemplateOverridesV1PromethuesRelayFQDN); err != nil { + return err + } + } + } + + if o.SpecValuesFile != nil { + + // query param spec.valuesFile + var qrSpecValuesFile string + + if o.SpecValuesFile != nil { + qrSpecValuesFile = *o.SpecValuesFile + } + qSpecValuesFile := qrSpecValuesFile + if qSpecValuesFile != "" { + + if err := r.SetQueryParam("spec.valuesFile", qSpecValuesFile); err != nil { + return err + } + } + } + + if o.StatusConditionStatus != nil { + + // query param status.conditionStatus + var qrStatusConditionStatus string + + if o.StatusConditionStatus != nil { + qrStatusConditionStatus = *o.StatusConditionStatus + } + qStatusConditionStatus := qrStatusConditionStatus + if qStatusConditionStatus != "" { + + if err := r.SetQueryParam("status.conditionStatus", qStatusConditionStatus); err != nil { + return err + } + } + } + + if o.StatusConditionType != nil { + + // query param status.conditionType + var qrStatusConditionType string + + if o.StatusConditionType != nil { + qrStatusConditionType = *o.StatusConditionType + } + qStatusConditionType := qrStatusConditionType + if qStatusConditionType != "" { + + if err := r.SetQueryParam("status.conditionType", qStatusConditionType); err != nil { + return err + } + } + } + + if o.StatusLastUpdated != nil { + + // query param status.lastUpdated + var qrStatusLastUpdated strfmt.DateTime + + if o.StatusLastUpdated != nil { + qrStatusLastUpdated = *o.StatusLastUpdated + } + qStatusLastUpdated := qrStatusLastUpdated.String() + if qStatusLastUpdated != "" { + + if err := r.SetQueryParam("status.lastUpdated", qStatusLastUpdated); err != nil { + return err + } + } + } + + if o.StatusReason != nil { + + // query param status.reason + var qrStatusReason string + + if o.StatusReason != nil { + qrStatusReason = *o.StatusReason + } + qStatusReason := qrStatusReason + if qStatusReason != "" { + + if err := r.SetQueryParam("status.reason", qStatusReason); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// bindParamOverrideDeleteOverride binds the parameter spec.clusterPlacement.nodeGroupingKeys +func (o *OverrideDeleteOverrideParams) bindParamSpecClusterPlacementNodeGroupingKeys(formats strfmt.Registry) []string { + specClusterPlacementNodeGroupingKeysIR := o.SpecClusterPlacementNodeGroupingKeys + + var specClusterPlacementNodeGroupingKeysIC []string + for _, specClusterPlacementNodeGroupingKeysIIR := range specClusterPlacementNodeGroupingKeysIR { // explode []string + + specClusterPlacementNodeGroupingKeysIIV := specClusterPlacementNodeGroupingKeysIIR // string as string + specClusterPlacementNodeGroupingKeysIC = append(specClusterPlacementNodeGroupingKeysIC, specClusterPlacementNodeGroupingKeysIIV) + } + + // items.CollectionFormat: "multi" + specClusterPlacementNodeGroupingKeysIS := swag.JoinByFormat(specClusterPlacementNodeGroupingKeysIC, "multi") + + return specClusterPlacementNodeGroupingKeysIS +} diff --git a/components/common/api/def/clients/config/client/override/override_delete_override_responses.go b/components/common/api/def/clients/config/client/override/override_delete_override_responses.go new file mode 100644 index 0000000..cba2a5f --- /dev/null +++ b/components/common/api/def/clients/config/client/override/override_delete_override_responses.go @@ -0,0 +1,221 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package override + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/RafaySystems/rcloud-base/components/common/api/def/clients/config/models" +) + +// OverrideDeleteOverrideReader is a Reader for the OverrideDeleteOverride structure. +type OverrideDeleteOverrideReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *OverrideDeleteOverrideReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewOverrideDeleteOverrideOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 204: + result := NewOverrideDeleteOverrideNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 403: + result := NewOverrideDeleteOverrideForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewOverrideDeleteOverrideNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + result := NewOverrideDeleteOverrideDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewOverrideDeleteOverrideOK creates a OverrideDeleteOverrideOK with default headers values +func NewOverrideDeleteOverrideOK() *OverrideDeleteOverrideOK { + return &OverrideDeleteOverrideOK{} +} + +/* OverrideDeleteOverrideOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type OverrideDeleteOverrideOK struct { + Payload models.RPCDeleteOverrideResponse +} + +func (o *OverrideDeleteOverrideOK) Error() string { + return fmt.Sprintf("[DELETE /v2/config/project/{metadata.project}/override/{metadata.name}][%d] overrideDeleteOverrideOK %+v", 200, o.Payload) +} +func (o *OverrideDeleteOverrideOK) GetPayload() models.RPCDeleteOverrideResponse { + return o.Payload +} + +func (o *OverrideDeleteOverrideOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewOverrideDeleteOverrideNoContent creates a OverrideDeleteOverrideNoContent with default headers values +func NewOverrideDeleteOverrideNoContent() *OverrideDeleteOverrideNoContent { + return &OverrideDeleteOverrideNoContent{} +} + +/* OverrideDeleteOverrideNoContent describes a response with status code 204, with default header values. + +Returned when namespace is deleted successfully. +*/ +type OverrideDeleteOverrideNoContent struct { + Payload interface{} +} + +func (o *OverrideDeleteOverrideNoContent) Error() string { + return fmt.Sprintf("[DELETE /v2/config/project/{metadata.project}/override/{metadata.name}][%d] overrideDeleteOverrideNoContent %+v", 204, o.Payload) +} +func (o *OverrideDeleteOverrideNoContent) GetPayload() interface{} { + return o.Payload +} + +func (o *OverrideDeleteOverrideNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewOverrideDeleteOverrideForbidden creates a OverrideDeleteOverrideForbidden with default headers values +func NewOverrideDeleteOverrideForbidden() *OverrideDeleteOverrideForbidden { + return &OverrideDeleteOverrideForbidden{} +} + +/* OverrideDeleteOverrideForbidden describes a response with status code 403, with default header values. + +Returned when the user does not have permission to access the resource. +*/ +type OverrideDeleteOverrideForbidden struct { + Payload interface{} +} + +func (o *OverrideDeleteOverrideForbidden) Error() string { + return fmt.Sprintf("[DELETE /v2/config/project/{metadata.project}/override/{metadata.name}][%d] overrideDeleteOverrideForbidden %+v", 403, o.Payload) +} +func (o *OverrideDeleteOverrideForbidden) GetPayload() interface{} { + return o.Payload +} + +func (o *OverrideDeleteOverrideForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewOverrideDeleteOverrideNotFound creates a OverrideDeleteOverrideNotFound with default headers values +func NewOverrideDeleteOverrideNotFound() *OverrideDeleteOverrideNotFound { + return &OverrideDeleteOverrideNotFound{} +} + +/* OverrideDeleteOverrideNotFound describes a response with status code 404, with default header values. + +Returned when the resource does not exist. +*/ +type OverrideDeleteOverrideNotFound struct { + Payload string +} + +func (o *OverrideDeleteOverrideNotFound) Error() string { + return fmt.Sprintf("[DELETE /v2/config/project/{metadata.project}/override/{metadata.name}][%d] overrideDeleteOverrideNotFound %+v", 404, o.Payload) +} +func (o *OverrideDeleteOverrideNotFound) GetPayload() string { + return o.Payload +} + +func (o *OverrideDeleteOverrideNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewOverrideDeleteOverrideDefault creates a OverrideDeleteOverrideDefault with default headers values +func NewOverrideDeleteOverrideDefault(code int) *OverrideDeleteOverrideDefault { + return &OverrideDeleteOverrideDefault{ + _statusCode: code, + } +} + +/* OverrideDeleteOverrideDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type OverrideDeleteOverrideDefault struct { + _statusCode int + + Payload *models.GooglerpcStatus +} + +// Code gets the status code for the override delete override default response +func (o *OverrideDeleteOverrideDefault) Code() int { + return o._statusCode +} + +func (o *OverrideDeleteOverrideDefault) Error() string { + return fmt.Sprintf("[DELETE /v2/config/project/{metadata.project}/override/{metadata.name}][%d] Override_DeleteOverride default %+v", o._statusCode, o.Payload) +} +func (o *OverrideDeleteOverrideDefault) GetPayload() *models.GooglerpcStatus { + return o.Payload +} + +func (o *OverrideDeleteOverrideDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.GooglerpcStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/components/common/api/def/clients/config/client/override/override_get_override_parameters.go b/components/common/api/def/clients/config/client/override/override_get_override_parameters.go new file mode 100644 index 0000000..d5fb38f --- /dev/null +++ b/components/common/api/def/clients/config/client/override/override_get_override_parameters.go @@ -0,0 +1,1502 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package override + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewOverrideGetOverrideParams creates a new OverrideGetOverrideParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewOverrideGetOverrideParams() *OverrideGetOverrideParams { + return &OverrideGetOverrideParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewOverrideGetOverrideParamsWithTimeout creates a new OverrideGetOverrideParams object +// with the ability to set a timeout on a request. +func NewOverrideGetOverrideParamsWithTimeout(timeout time.Duration) *OverrideGetOverrideParams { + return &OverrideGetOverrideParams{ + timeout: timeout, + } +} + +// NewOverrideGetOverrideParamsWithContext creates a new OverrideGetOverrideParams object +// with the ability to set a context for a request. +func NewOverrideGetOverrideParamsWithContext(ctx context.Context) *OverrideGetOverrideParams { + return &OverrideGetOverrideParams{ + Context: ctx, + } +} + +// NewOverrideGetOverrideParamsWithHTTPClient creates a new OverrideGetOverrideParams object +// with the ability to set a custom HTTPClient for a request. +func NewOverrideGetOverrideParamsWithHTTPClient(client *http.Client) *OverrideGetOverrideParams { + return &OverrideGetOverrideParams{ + HTTPClient: client, + } +} + +/* OverrideGetOverrideParams contains all the parameters to send to the API endpoint + for the override get override operation. + + Typically these are written to a http.Request. +*/ +type OverrideGetOverrideParams struct { + + /* APIVersion. + + API Version. API Version of the resource + + Default: "config.k8smgmt.io/v3" + */ + APIVersion *string + + /* Kind. + + Kind. Kind of the resource + + Default: "Cluster" + */ + Kind *string + + /* MetadataDescription. + + Description. description of the resource + */ + MetadataDescription *string + + // MetadataID. + MetadataID *string + + // MetadataModifiedAt. + // + // Format: date-time + MetadataModifiedAt *strfmt.DateTime + + /* MetadataName. + + name of the resource + */ + MetadataName string + + /* MetadataOrganization. + + Organization. Organization to which the resource belongs + */ + MetadataOrganization *string + + /* MetadataPartner. + + Partner. Partner to which the resource belongs + */ + MetadataPartner *string + + /* MetadataProject. + + Project of the resource + */ + MetadataProject string + + // SpecClusterPlacementClusterSelector. + SpecClusterPlacementClusterSelector *string + + // SpecClusterPlacementDriftAction. + // + // Default: "DriftReconcillationActionNotSet" + SpecClusterPlacementDriftAction *string + + // SpecClusterPlacementNodeGroupingKeys. + SpecClusterPlacementNodeGroupingKeys []string + + /* SpecClusterPlacementPlacementType. + + placementType is the type of placement. + + Default: "ClusterSelector" + */ + SpecClusterPlacementPlacementType *string + + // SpecClusterSelector. + SpecClusterSelector *string + + // SpecRepoArtifactMetaGitRevision. + SpecRepoArtifactMetaGitRevision *string + + // SpecRepoArtifactMetaHelmChartName. + SpecRepoArtifactMetaHelmChartName *string + + // SpecRepoArtifactMetaHelmTag. + SpecRepoArtifactMetaHelmTag *string + + // SpecRepoArtifactMetaTimeout. + // + // Format: int64 + SpecRepoArtifactMetaTimeout *string + + // SpecRepositoryRef. + SpecRepositoryRef *string + + /* SpecResourceSelector. + + an override is only applied if selector matches the taskset/namespace + labels. + */ + SpecResourceSelector *string + + // SpecTemplateOverridesV2EventFrameworkFQDN. + SpecTemplateOverridesV2EventFrameworkFQDN *string + + // SpecTemplateOverridesClusterName. + SpecTemplateOverridesClusterName *string + + // SpecTemplateOverridesOrgDisplayName. + SpecTemplateOverridesOrgDisplayName *string + + // SpecTemplateOverridesOrganizationHash. + SpecTemplateOverridesOrganizationHash *string + + // SpecTemplateOverridesOrganizationID. + // + // Format: int64 + SpecTemplateOverridesOrganizationID *string + + // SpecTemplateOverridesPartnerDisplayName. + SpecTemplateOverridesPartnerDisplayName *string + + // SpecTemplateOverridesPartnerHash. + SpecTemplateOverridesPartnerHash *string + + // SpecTemplateOverridesPartnerID. + // + // Format: int64 + SpecTemplateOverridesPartnerID *string + + // SpecTemplateOverridesProjectID. + // + // Format: int64 + SpecTemplateOverridesProjectID *string + + // SpecTemplateOverridesProxyURL. + SpecTemplateOverridesProxyURL *string + + // SpecTemplateOverridesV1DeploymentEnv. + SpecTemplateOverridesV1DeploymentEnv *string + + // SpecTemplateOverridesV1EdgeDisplayName. + SpecTemplateOverridesV1EdgeDisplayName *string + + // SpecTemplateOverridesV1EdgeID. + SpecTemplateOverridesV1EdgeID *string + + // SpecTemplateOverridesV1FluentdAggregatorAddr. + SpecTemplateOverridesV1FluentdAggregatorAddr *string + + // SpecTemplateOverridesV1InfluxDBFQDN. + SpecTemplateOverridesV1InfluxDBFQDN *string + + // SpecTemplateOverridesV1InfluxDBPassword. + SpecTemplateOverridesV1InfluxDBPassword *string + + // SpecTemplateOverridesV1PromethuesRelayFQDN. + SpecTemplateOverridesV1PromethuesRelayFQDN *string + + // SpecValuesFile. + SpecValuesFile *string + + /* StatusConditionStatus. + + Condition Status. status of the condition + + Default: "StatusNotSet" + */ + StatusConditionStatus *string + + /* StatusConditionType. + + Condition Type. type of the status condition + */ + StatusConditionType *string + + /* StatusLastUpdated. + + Last Updated. when the condition status is last updated + + Format: date-time + */ + StatusLastUpdated *strfmt.DateTime + + /* StatusReason. + + Reason. reason of the last condition status + */ + StatusReason *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the override get override params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *OverrideGetOverrideParams) WithDefaults() *OverrideGetOverrideParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the override get override params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *OverrideGetOverrideParams) SetDefaults() { + var ( + aPIVersionDefault = string("config.k8smgmt.io/v3") + + kindDefault = string("Cluster") + + specClusterPlacementDriftActionDefault = string("DriftReconcillationActionNotSet") + + specClusterPlacementPlacementTypeDefault = string("ClusterSelector") + + statusConditionStatusDefault = string("StatusNotSet") + ) + + val := OverrideGetOverrideParams{ + APIVersion: &aPIVersionDefault, + Kind: &kindDefault, + SpecClusterPlacementDriftAction: &specClusterPlacementDriftActionDefault, + SpecClusterPlacementPlacementType: &specClusterPlacementPlacementTypeDefault, + StatusConditionStatus: &statusConditionStatusDefault, + } + + val.timeout = o.timeout + val.Context = o.Context + val.HTTPClient = o.HTTPClient + *o = val +} + +// WithTimeout adds the timeout to the override get override params +func (o *OverrideGetOverrideParams) WithTimeout(timeout time.Duration) *OverrideGetOverrideParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the override get override params +func (o *OverrideGetOverrideParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the override get override params +func (o *OverrideGetOverrideParams) WithContext(ctx context.Context) *OverrideGetOverrideParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the override get override params +func (o *OverrideGetOverrideParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the override get override params +func (o *OverrideGetOverrideParams) WithHTTPClient(client *http.Client) *OverrideGetOverrideParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the override get override params +func (o *OverrideGetOverrideParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAPIVersion adds the aPIVersion to the override get override params +func (o *OverrideGetOverrideParams) WithAPIVersion(aPIVersion *string) *OverrideGetOverrideParams { + o.SetAPIVersion(aPIVersion) + return o +} + +// SetAPIVersion adds the apiVersion to the override get override params +func (o *OverrideGetOverrideParams) SetAPIVersion(aPIVersion *string) { + o.APIVersion = aPIVersion +} + +// WithKind adds the kind to the override get override params +func (o *OverrideGetOverrideParams) WithKind(kind *string) *OverrideGetOverrideParams { + o.SetKind(kind) + return o +} + +// SetKind adds the kind to the override get override params +func (o *OverrideGetOverrideParams) SetKind(kind *string) { + o.Kind = kind +} + +// WithMetadataDescription adds the metadataDescription to the override get override params +func (o *OverrideGetOverrideParams) WithMetadataDescription(metadataDescription *string) *OverrideGetOverrideParams { + o.SetMetadataDescription(metadataDescription) + return o +} + +// SetMetadataDescription adds the metadataDescription to the override get override params +func (o *OverrideGetOverrideParams) SetMetadataDescription(metadataDescription *string) { + o.MetadataDescription = metadataDescription +} + +// WithMetadataID adds the metadataID to the override get override params +func (o *OverrideGetOverrideParams) WithMetadataID(metadataID *string) *OverrideGetOverrideParams { + o.SetMetadataID(metadataID) + return o +} + +// SetMetadataID adds the metadataId to the override get override params +func (o *OverrideGetOverrideParams) SetMetadataID(metadataID *string) { + o.MetadataID = metadataID +} + +// WithMetadataModifiedAt adds the metadataModifiedAt to the override get override params +func (o *OverrideGetOverrideParams) WithMetadataModifiedAt(metadataModifiedAt *strfmt.DateTime) *OverrideGetOverrideParams { + o.SetMetadataModifiedAt(metadataModifiedAt) + return o +} + +// SetMetadataModifiedAt adds the metadataModifiedAt to the override get override params +func (o *OverrideGetOverrideParams) SetMetadataModifiedAt(metadataModifiedAt *strfmt.DateTime) { + o.MetadataModifiedAt = metadataModifiedAt +} + +// WithMetadataName adds the metadataName to the override get override params +func (o *OverrideGetOverrideParams) WithMetadataName(metadataName string) *OverrideGetOverrideParams { + o.SetMetadataName(metadataName) + return o +} + +// SetMetadataName adds the metadataName to the override get override params +func (o *OverrideGetOverrideParams) SetMetadataName(metadataName string) { + o.MetadataName = metadataName +} + +// WithMetadataOrganization adds the metadataOrganization to the override get override params +func (o *OverrideGetOverrideParams) WithMetadataOrganization(metadataOrganization *string) *OverrideGetOverrideParams { + o.SetMetadataOrganization(metadataOrganization) + return o +} + +// SetMetadataOrganization adds the metadataOrganization to the override get override params +func (o *OverrideGetOverrideParams) SetMetadataOrganization(metadataOrganization *string) { + o.MetadataOrganization = metadataOrganization +} + +// WithMetadataPartner adds the metadataPartner to the override get override params +func (o *OverrideGetOverrideParams) WithMetadataPartner(metadataPartner *string) *OverrideGetOverrideParams { + o.SetMetadataPartner(metadataPartner) + return o +} + +// SetMetadataPartner adds the metadataPartner to the override get override params +func (o *OverrideGetOverrideParams) SetMetadataPartner(metadataPartner *string) { + o.MetadataPartner = metadataPartner +} + +// WithMetadataProject adds the metadataProject to the override get override params +func (o *OverrideGetOverrideParams) WithMetadataProject(metadataProject string) *OverrideGetOverrideParams { + o.SetMetadataProject(metadataProject) + return o +} + +// SetMetadataProject adds the metadataProject to the override get override params +func (o *OverrideGetOverrideParams) SetMetadataProject(metadataProject string) { + o.MetadataProject = metadataProject +} + +// WithSpecClusterPlacementClusterSelector adds the specClusterPlacementClusterSelector to the override get override params +func (o *OverrideGetOverrideParams) WithSpecClusterPlacementClusterSelector(specClusterPlacementClusterSelector *string) *OverrideGetOverrideParams { + o.SetSpecClusterPlacementClusterSelector(specClusterPlacementClusterSelector) + return o +} + +// SetSpecClusterPlacementClusterSelector adds the specClusterPlacementClusterSelector to the override get override params +func (o *OverrideGetOverrideParams) SetSpecClusterPlacementClusterSelector(specClusterPlacementClusterSelector *string) { + o.SpecClusterPlacementClusterSelector = specClusterPlacementClusterSelector +} + +// WithSpecClusterPlacementDriftAction adds the specClusterPlacementDriftAction to the override get override params +func (o *OverrideGetOverrideParams) WithSpecClusterPlacementDriftAction(specClusterPlacementDriftAction *string) *OverrideGetOverrideParams { + o.SetSpecClusterPlacementDriftAction(specClusterPlacementDriftAction) + return o +} + +// SetSpecClusterPlacementDriftAction adds the specClusterPlacementDriftAction to the override get override params +func (o *OverrideGetOverrideParams) SetSpecClusterPlacementDriftAction(specClusterPlacementDriftAction *string) { + o.SpecClusterPlacementDriftAction = specClusterPlacementDriftAction +} + +// WithSpecClusterPlacementNodeGroupingKeys adds the specClusterPlacementNodeGroupingKeys to the override get override params +func (o *OverrideGetOverrideParams) WithSpecClusterPlacementNodeGroupingKeys(specClusterPlacementNodeGroupingKeys []string) *OverrideGetOverrideParams { + o.SetSpecClusterPlacementNodeGroupingKeys(specClusterPlacementNodeGroupingKeys) + return o +} + +// SetSpecClusterPlacementNodeGroupingKeys adds the specClusterPlacementNodeGroupingKeys to the override get override params +func (o *OverrideGetOverrideParams) SetSpecClusterPlacementNodeGroupingKeys(specClusterPlacementNodeGroupingKeys []string) { + o.SpecClusterPlacementNodeGroupingKeys = specClusterPlacementNodeGroupingKeys +} + +// WithSpecClusterPlacementPlacementType adds the specClusterPlacementPlacementType to the override get override params +func (o *OverrideGetOverrideParams) WithSpecClusterPlacementPlacementType(specClusterPlacementPlacementType *string) *OverrideGetOverrideParams { + o.SetSpecClusterPlacementPlacementType(specClusterPlacementPlacementType) + return o +} + +// SetSpecClusterPlacementPlacementType adds the specClusterPlacementPlacementType to the override get override params +func (o *OverrideGetOverrideParams) SetSpecClusterPlacementPlacementType(specClusterPlacementPlacementType *string) { + o.SpecClusterPlacementPlacementType = specClusterPlacementPlacementType +} + +// WithSpecClusterSelector adds the specClusterSelector to the override get override params +func (o *OverrideGetOverrideParams) WithSpecClusterSelector(specClusterSelector *string) *OverrideGetOverrideParams { + o.SetSpecClusterSelector(specClusterSelector) + return o +} + +// SetSpecClusterSelector adds the specClusterSelector to the override get override params +func (o *OverrideGetOverrideParams) SetSpecClusterSelector(specClusterSelector *string) { + o.SpecClusterSelector = specClusterSelector +} + +// WithSpecRepoArtifactMetaGitRevision adds the specRepoArtifactMetaGitRevision to the override get override params +func (o *OverrideGetOverrideParams) WithSpecRepoArtifactMetaGitRevision(specRepoArtifactMetaGitRevision *string) *OverrideGetOverrideParams { + o.SetSpecRepoArtifactMetaGitRevision(specRepoArtifactMetaGitRevision) + return o +} + +// SetSpecRepoArtifactMetaGitRevision adds the specRepoArtifactMetaGitRevision to the override get override params +func (o *OverrideGetOverrideParams) SetSpecRepoArtifactMetaGitRevision(specRepoArtifactMetaGitRevision *string) { + o.SpecRepoArtifactMetaGitRevision = specRepoArtifactMetaGitRevision +} + +// WithSpecRepoArtifactMetaHelmChartName adds the specRepoArtifactMetaHelmChartName to the override get override params +func (o *OverrideGetOverrideParams) WithSpecRepoArtifactMetaHelmChartName(specRepoArtifactMetaHelmChartName *string) *OverrideGetOverrideParams { + o.SetSpecRepoArtifactMetaHelmChartName(specRepoArtifactMetaHelmChartName) + return o +} + +// SetSpecRepoArtifactMetaHelmChartName adds the specRepoArtifactMetaHelmChartName to the override get override params +func (o *OverrideGetOverrideParams) SetSpecRepoArtifactMetaHelmChartName(specRepoArtifactMetaHelmChartName *string) { + o.SpecRepoArtifactMetaHelmChartName = specRepoArtifactMetaHelmChartName +} + +// WithSpecRepoArtifactMetaHelmTag adds the specRepoArtifactMetaHelmTag to the override get override params +func (o *OverrideGetOverrideParams) WithSpecRepoArtifactMetaHelmTag(specRepoArtifactMetaHelmTag *string) *OverrideGetOverrideParams { + o.SetSpecRepoArtifactMetaHelmTag(specRepoArtifactMetaHelmTag) + return o +} + +// SetSpecRepoArtifactMetaHelmTag adds the specRepoArtifactMetaHelmTag to the override get override params +func (o *OverrideGetOverrideParams) SetSpecRepoArtifactMetaHelmTag(specRepoArtifactMetaHelmTag *string) { + o.SpecRepoArtifactMetaHelmTag = specRepoArtifactMetaHelmTag +} + +// WithSpecRepoArtifactMetaTimeout adds the specRepoArtifactMetaTimeout to the override get override params +func (o *OverrideGetOverrideParams) WithSpecRepoArtifactMetaTimeout(specRepoArtifactMetaTimeout *string) *OverrideGetOverrideParams { + o.SetSpecRepoArtifactMetaTimeout(specRepoArtifactMetaTimeout) + return o +} + +// SetSpecRepoArtifactMetaTimeout adds the specRepoArtifactMetaTimeout to the override get override params +func (o *OverrideGetOverrideParams) SetSpecRepoArtifactMetaTimeout(specRepoArtifactMetaTimeout *string) { + o.SpecRepoArtifactMetaTimeout = specRepoArtifactMetaTimeout +} + +// WithSpecRepositoryRef adds the specRepositoryRef to the override get override params +func (o *OverrideGetOverrideParams) WithSpecRepositoryRef(specRepositoryRef *string) *OverrideGetOverrideParams { + o.SetSpecRepositoryRef(specRepositoryRef) + return o +} + +// SetSpecRepositoryRef adds the specRepositoryRef to the override get override params +func (o *OverrideGetOverrideParams) SetSpecRepositoryRef(specRepositoryRef *string) { + o.SpecRepositoryRef = specRepositoryRef +} + +// WithSpecResourceSelector adds the specResourceSelector to the override get override params +func (o *OverrideGetOverrideParams) WithSpecResourceSelector(specResourceSelector *string) *OverrideGetOverrideParams { + o.SetSpecResourceSelector(specResourceSelector) + return o +} + +// SetSpecResourceSelector adds the specResourceSelector to the override get override params +func (o *OverrideGetOverrideParams) SetSpecResourceSelector(specResourceSelector *string) { + o.SpecResourceSelector = specResourceSelector +} + +// WithSpecTemplateOverridesV2EventFrameworkFQDN adds the specTemplateOverridesV2EventFrameworkFQDN to the override get override params +func (o *OverrideGetOverrideParams) WithSpecTemplateOverridesV2EventFrameworkFQDN(specTemplateOverridesV2EventFrameworkFQDN *string) *OverrideGetOverrideParams { + o.SetSpecTemplateOverridesV2EventFrameworkFQDN(specTemplateOverridesV2EventFrameworkFQDN) + return o +} + +// SetSpecTemplateOverridesV2EventFrameworkFQDN adds the specTemplateOverridesV2EventFrameworkFQDN to the override get override params +func (o *OverrideGetOverrideParams) SetSpecTemplateOverridesV2EventFrameworkFQDN(specTemplateOverridesV2EventFrameworkFQDN *string) { + o.SpecTemplateOverridesV2EventFrameworkFQDN = specTemplateOverridesV2EventFrameworkFQDN +} + +// WithSpecTemplateOverridesClusterName adds the specTemplateOverridesClusterName to the override get override params +func (o *OverrideGetOverrideParams) WithSpecTemplateOverridesClusterName(specTemplateOverridesClusterName *string) *OverrideGetOverrideParams { + o.SetSpecTemplateOverridesClusterName(specTemplateOverridesClusterName) + return o +} + +// SetSpecTemplateOverridesClusterName adds the specTemplateOverridesClusterName to the override get override params +func (o *OverrideGetOverrideParams) SetSpecTemplateOverridesClusterName(specTemplateOverridesClusterName *string) { + o.SpecTemplateOverridesClusterName = specTemplateOverridesClusterName +} + +// WithSpecTemplateOverridesOrgDisplayName adds the specTemplateOverridesOrgDisplayName to the override get override params +func (o *OverrideGetOverrideParams) WithSpecTemplateOverridesOrgDisplayName(specTemplateOverridesOrgDisplayName *string) *OverrideGetOverrideParams { + o.SetSpecTemplateOverridesOrgDisplayName(specTemplateOverridesOrgDisplayName) + return o +} + +// SetSpecTemplateOverridesOrgDisplayName adds the specTemplateOverridesOrgDisplayName to the override get override params +func (o *OverrideGetOverrideParams) SetSpecTemplateOverridesOrgDisplayName(specTemplateOverridesOrgDisplayName *string) { + o.SpecTemplateOverridesOrgDisplayName = specTemplateOverridesOrgDisplayName +} + +// WithSpecTemplateOverridesOrganizationHash adds the specTemplateOverridesOrganizationHash to the override get override params +func (o *OverrideGetOverrideParams) WithSpecTemplateOverridesOrganizationHash(specTemplateOverridesOrganizationHash *string) *OverrideGetOverrideParams { + o.SetSpecTemplateOverridesOrganizationHash(specTemplateOverridesOrganizationHash) + return o +} + +// SetSpecTemplateOverridesOrganizationHash adds the specTemplateOverridesOrganizationHash to the override get override params +func (o *OverrideGetOverrideParams) SetSpecTemplateOverridesOrganizationHash(specTemplateOverridesOrganizationHash *string) { + o.SpecTemplateOverridesOrganizationHash = specTemplateOverridesOrganizationHash +} + +// WithSpecTemplateOverridesOrganizationID adds the specTemplateOverridesOrganizationID to the override get override params +func (o *OverrideGetOverrideParams) WithSpecTemplateOverridesOrganizationID(specTemplateOverridesOrganizationID *string) *OverrideGetOverrideParams { + o.SetSpecTemplateOverridesOrganizationID(specTemplateOverridesOrganizationID) + return o +} + +// SetSpecTemplateOverridesOrganizationID adds the specTemplateOverridesOrganizationId to the override get override params +func (o *OverrideGetOverrideParams) SetSpecTemplateOverridesOrganizationID(specTemplateOverridesOrganizationID *string) { + o.SpecTemplateOverridesOrganizationID = specTemplateOverridesOrganizationID +} + +// WithSpecTemplateOverridesPartnerDisplayName adds the specTemplateOverridesPartnerDisplayName to the override get override params +func (o *OverrideGetOverrideParams) WithSpecTemplateOverridesPartnerDisplayName(specTemplateOverridesPartnerDisplayName *string) *OverrideGetOverrideParams { + o.SetSpecTemplateOverridesPartnerDisplayName(specTemplateOverridesPartnerDisplayName) + return o +} + +// SetSpecTemplateOverridesPartnerDisplayName adds the specTemplateOverridesPartnerDisplayName to the override get override params +func (o *OverrideGetOverrideParams) SetSpecTemplateOverridesPartnerDisplayName(specTemplateOverridesPartnerDisplayName *string) { + o.SpecTemplateOverridesPartnerDisplayName = specTemplateOverridesPartnerDisplayName +} + +// WithSpecTemplateOverridesPartnerHash adds the specTemplateOverridesPartnerHash to the override get override params +func (o *OverrideGetOverrideParams) WithSpecTemplateOverridesPartnerHash(specTemplateOverridesPartnerHash *string) *OverrideGetOverrideParams { + o.SetSpecTemplateOverridesPartnerHash(specTemplateOverridesPartnerHash) + return o +} + +// SetSpecTemplateOverridesPartnerHash adds the specTemplateOverridesPartnerHash to the override get override params +func (o *OverrideGetOverrideParams) SetSpecTemplateOverridesPartnerHash(specTemplateOverridesPartnerHash *string) { + o.SpecTemplateOverridesPartnerHash = specTemplateOverridesPartnerHash +} + +// WithSpecTemplateOverridesPartnerID adds the specTemplateOverridesPartnerID to the override get override params +func (o *OverrideGetOverrideParams) WithSpecTemplateOverridesPartnerID(specTemplateOverridesPartnerID *string) *OverrideGetOverrideParams { + o.SetSpecTemplateOverridesPartnerID(specTemplateOverridesPartnerID) + return o +} + +// SetSpecTemplateOverridesPartnerID adds the specTemplateOverridesPartnerId to the override get override params +func (o *OverrideGetOverrideParams) SetSpecTemplateOverridesPartnerID(specTemplateOverridesPartnerID *string) { + o.SpecTemplateOverridesPartnerID = specTemplateOverridesPartnerID +} + +// WithSpecTemplateOverridesProjectID adds the specTemplateOverridesProjectID to the override get override params +func (o *OverrideGetOverrideParams) WithSpecTemplateOverridesProjectID(specTemplateOverridesProjectID *string) *OverrideGetOverrideParams { + o.SetSpecTemplateOverridesProjectID(specTemplateOverridesProjectID) + return o +} + +// SetSpecTemplateOverridesProjectID adds the specTemplateOverridesProjectId to the override get override params +func (o *OverrideGetOverrideParams) SetSpecTemplateOverridesProjectID(specTemplateOverridesProjectID *string) { + o.SpecTemplateOverridesProjectID = specTemplateOverridesProjectID +} + +// WithSpecTemplateOverridesProxyURL adds the specTemplateOverridesProxyURL to the override get override params +func (o *OverrideGetOverrideParams) WithSpecTemplateOverridesProxyURL(specTemplateOverridesProxyURL *string) *OverrideGetOverrideParams { + o.SetSpecTemplateOverridesProxyURL(specTemplateOverridesProxyURL) + return o +} + +// SetSpecTemplateOverridesProxyURL adds the specTemplateOverridesProxyUrl to the override get override params +func (o *OverrideGetOverrideParams) SetSpecTemplateOverridesProxyURL(specTemplateOverridesProxyURL *string) { + o.SpecTemplateOverridesProxyURL = specTemplateOverridesProxyURL +} + +// WithSpecTemplateOverridesV1DeploymentEnv adds the specTemplateOverridesV1DeploymentEnv to the override get override params +func (o *OverrideGetOverrideParams) WithSpecTemplateOverridesV1DeploymentEnv(specTemplateOverridesV1DeploymentEnv *string) *OverrideGetOverrideParams { + o.SetSpecTemplateOverridesV1DeploymentEnv(specTemplateOverridesV1DeploymentEnv) + return o +} + +// SetSpecTemplateOverridesV1DeploymentEnv adds the specTemplateOverridesV1DeploymentEnv to the override get override params +func (o *OverrideGetOverrideParams) SetSpecTemplateOverridesV1DeploymentEnv(specTemplateOverridesV1DeploymentEnv *string) { + o.SpecTemplateOverridesV1DeploymentEnv = specTemplateOverridesV1DeploymentEnv +} + +// WithSpecTemplateOverridesV1EdgeDisplayName adds the specTemplateOverridesV1EdgeDisplayName to the override get override params +func (o *OverrideGetOverrideParams) WithSpecTemplateOverridesV1EdgeDisplayName(specTemplateOverridesV1EdgeDisplayName *string) *OverrideGetOverrideParams { + o.SetSpecTemplateOverridesV1EdgeDisplayName(specTemplateOverridesV1EdgeDisplayName) + return o +} + +// SetSpecTemplateOverridesV1EdgeDisplayName adds the specTemplateOverridesV1EdgeDisplayName to the override get override params +func (o *OverrideGetOverrideParams) SetSpecTemplateOverridesV1EdgeDisplayName(specTemplateOverridesV1EdgeDisplayName *string) { + o.SpecTemplateOverridesV1EdgeDisplayName = specTemplateOverridesV1EdgeDisplayName +} + +// WithSpecTemplateOverridesV1EdgeID adds the specTemplateOverridesV1EdgeID to the override get override params +func (o *OverrideGetOverrideParams) WithSpecTemplateOverridesV1EdgeID(specTemplateOverridesV1EdgeID *string) *OverrideGetOverrideParams { + o.SetSpecTemplateOverridesV1EdgeID(specTemplateOverridesV1EdgeID) + return o +} + +// SetSpecTemplateOverridesV1EdgeID adds the specTemplateOverridesV1EdgeId to the override get override params +func (o *OverrideGetOverrideParams) SetSpecTemplateOverridesV1EdgeID(specTemplateOverridesV1EdgeID *string) { + o.SpecTemplateOverridesV1EdgeID = specTemplateOverridesV1EdgeID +} + +// WithSpecTemplateOverridesV1FluentdAggregatorAddr adds the specTemplateOverridesV1FluentdAggregatorAddr to the override get override params +func (o *OverrideGetOverrideParams) WithSpecTemplateOverridesV1FluentdAggregatorAddr(specTemplateOverridesV1FluentdAggregatorAddr *string) *OverrideGetOverrideParams { + o.SetSpecTemplateOverridesV1FluentdAggregatorAddr(specTemplateOverridesV1FluentdAggregatorAddr) + return o +} + +// SetSpecTemplateOverridesV1FluentdAggregatorAddr adds the specTemplateOverridesV1FluentdAggregatorAddr to the override get override params +func (o *OverrideGetOverrideParams) SetSpecTemplateOverridesV1FluentdAggregatorAddr(specTemplateOverridesV1FluentdAggregatorAddr *string) { + o.SpecTemplateOverridesV1FluentdAggregatorAddr = specTemplateOverridesV1FluentdAggregatorAddr +} + +// WithSpecTemplateOverridesV1InfluxDBFQDN adds the specTemplateOverridesV1InfluxDBFQDN to the override get override params +func (o *OverrideGetOverrideParams) WithSpecTemplateOverridesV1InfluxDBFQDN(specTemplateOverridesV1InfluxDBFQDN *string) *OverrideGetOverrideParams { + o.SetSpecTemplateOverridesV1InfluxDBFQDN(specTemplateOverridesV1InfluxDBFQDN) + return o +} + +// SetSpecTemplateOverridesV1InfluxDBFQDN adds the specTemplateOverridesV1InfluxDBFQDN to the override get override params +func (o *OverrideGetOverrideParams) SetSpecTemplateOverridesV1InfluxDBFQDN(specTemplateOverridesV1InfluxDBFQDN *string) { + o.SpecTemplateOverridesV1InfluxDBFQDN = specTemplateOverridesV1InfluxDBFQDN +} + +// WithSpecTemplateOverridesV1InfluxDBPassword adds the specTemplateOverridesV1InfluxDBPassword to the override get override params +func (o *OverrideGetOverrideParams) WithSpecTemplateOverridesV1InfluxDBPassword(specTemplateOverridesV1InfluxDBPassword *string) *OverrideGetOverrideParams { + o.SetSpecTemplateOverridesV1InfluxDBPassword(specTemplateOverridesV1InfluxDBPassword) + return o +} + +// SetSpecTemplateOverridesV1InfluxDBPassword adds the specTemplateOverridesV1InfluxDBPassword to the override get override params +func (o *OverrideGetOverrideParams) SetSpecTemplateOverridesV1InfluxDBPassword(specTemplateOverridesV1InfluxDBPassword *string) { + o.SpecTemplateOverridesV1InfluxDBPassword = specTemplateOverridesV1InfluxDBPassword +} + +// WithSpecTemplateOverridesV1PromethuesRelayFQDN adds the specTemplateOverridesV1PromethuesRelayFQDN to the override get override params +func (o *OverrideGetOverrideParams) WithSpecTemplateOverridesV1PromethuesRelayFQDN(specTemplateOverridesV1PromethuesRelayFQDN *string) *OverrideGetOverrideParams { + o.SetSpecTemplateOverridesV1PromethuesRelayFQDN(specTemplateOverridesV1PromethuesRelayFQDN) + return o +} + +// SetSpecTemplateOverridesV1PromethuesRelayFQDN adds the specTemplateOverridesV1PromethuesRelayFQDN to the override get override params +func (o *OverrideGetOverrideParams) SetSpecTemplateOverridesV1PromethuesRelayFQDN(specTemplateOverridesV1PromethuesRelayFQDN *string) { + o.SpecTemplateOverridesV1PromethuesRelayFQDN = specTemplateOverridesV1PromethuesRelayFQDN +} + +// WithSpecValuesFile adds the specValuesFile to the override get override params +func (o *OverrideGetOverrideParams) WithSpecValuesFile(specValuesFile *string) *OverrideGetOverrideParams { + o.SetSpecValuesFile(specValuesFile) + return o +} + +// SetSpecValuesFile adds the specValuesFile to the override get override params +func (o *OverrideGetOverrideParams) SetSpecValuesFile(specValuesFile *string) { + o.SpecValuesFile = specValuesFile +} + +// WithStatusConditionStatus adds the statusConditionStatus to the override get override params +func (o *OverrideGetOverrideParams) WithStatusConditionStatus(statusConditionStatus *string) *OverrideGetOverrideParams { + o.SetStatusConditionStatus(statusConditionStatus) + return o +} + +// SetStatusConditionStatus adds the statusConditionStatus to the override get override params +func (o *OverrideGetOverrideParams) SetStatusConditionStatus(statusConditionStatus *string) { + o.StatusConditionStatus = statusConditionStatus +} + +// WithStatusConditionType adds the statusConditionType to the override get override params +func (o *OverrideGetOverrideParams) WithStatusConditionType(statusConditionType *string) *OverrideGetOverrideParams { + o.SetStatusConditionType(statusConditionType) + return o +} + +// SetStatusConditionType adds the statusConditionType to the override get override params +func (o *OverrideGetOverrideParams) SetStatusConditionType(statusConditionType *string) { + o.StatusConditionType = statusConditionType +} + +// WithStatusLastUpdated adds the statusLastUpdated to the override get override params +func (o *OverrideGetOverrideParams) WithStatusLastUpdated(statusLastUpdated *strfmt.DateTime) *OverrideGetOverrideParams { + o.SetStatusLastUpdated(statusLastUpdated) + return o +} + +// SetStatusLastUpdated adds the statusLastUpdated to the override get override params +func (o *OverrideGetOverrideParams) SetStatusLastUpdated(statusLastUpdated *strfmt.DateTime) { + o.StatusLastUpdated = statusLastUpdated +} + +// WithStatusReason adds the statusReason to the override get override params +func (o *OverrideGetOverrideParams) WithStatusReason(statusReason *string) *OverrideGetOverrideParams { + o.SetStatusReason(statusReason) + return o +} + +// SetStatusReason adds the statusReason to the override get override params +func (o *OverrideGetOverrideParams) SetStatusReason(statusReason *string) { + o.StatusReason = statusReason +} + +// WriteToRequest writes these params to a swagger request +func (o *OverrideGetOverrideParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.APIVersion != nil { + + // query param apiVersion + var qrAPIVersion string + + if o.APIVersion != nil { + qrAPIVersion = *o.APIVersion + } + qAPIVersion := qrAPIVersion + if qAPIVersion != "" { + + if err := r.SetQueryParam("apiVersion", qAPIVersion); err != nil { + return err + } + } + } + + if o.Kind != nil { + + // query param kind + var qrKind string + + if o.Kind != nil { + qrKind = *o.Kind + } + qKind := qrKind + if qKind != "" { + + if err := r.SetQueryParam("kind", qKind); err != nil { + return err + } + } + } + + if o.MetadataDescription != nil { + + // query param metadata.description + var qrMetadataDescription string + + if o.MetadataDescription != nil { + qrMetadataDescription = *o.MetadataDescription + } + qMetadataDescription := qrMetadataDescription + if qMetadataDescription != "" { + + if err := r.SetQueryParam("metadata.description", qMetadataDescription); err != nil { + return err + } + } + } + + if o.MetadataID != nil { + + // query param metadata.id + var qrMetadataID string + + if o.MetadataID != nil { + qrMetadataID = *o.MetadataID + } + qMetadataID := qrMetadataID + if qMetadataID != "" { + + if err := r.SetQueryParam("metadata.id", qMetadataID); err != nil { + return err + } + } + } + + if o.MetadataModifiedAt != nil { + + // query param metadata.modifiedAt + var qrMetadataModifiedAt strfmt.DateTime + + if o.MetadataModifiedAt != nil { + qrMetadataModifiedAt = *o.MetadataModifiedAt + } + qMetadataModifiedAt := qrMetadataModifiedAt.String() + if qMetadataModifiedAt != "" { + + if err := r.SetQueryParam("metadata.modifiedAt", qMetadataModifiedAt); err != nil { + return err + } + } + } + + // path param metadata.name + if err := r.SetPathParam("metadata.name", o.MetadataName); err != nil { + return err + } + + if o.MetadataOrganization != nil { + + // query param metadata.organization + var qrMetadataOrganization string + + if o.MetadataOrganization != nil { + qrMetadataOrganization = *o.MetadataOrganization + } + qMetadataOrganization := qrMetadataOrganization + if qMetadataOrganization != "" { + + if err := r.SetQueryParam("metadata.organization", qMetadataOrganization); err != nil { + return err + } + } + } + + if o.MetadataPartner != nil { + + // query param metadata.partner + var qrMetadataPartner string + + if o.MetadataPartner != nil { + qrMetadataPartner = *o.MetadataPartner + } + qMetadataPartner := qrMetadataPartner + if qMetadataPartner != "" { + + if err := r.SetQueryParam("metadata.partner", qMetadataPartner); err != nil { + return err + } + } + } + + // path param metadata.project + if err := r.SetPathParam("metadata.project", o.MetadataProject); err != nil { + return err + } + + if o.SpecClusterPlacementClusterSelector != nil { + + // query param spec.clusterPlacement.clusterSelector + var qrSpecClusterPlacementClusterSelector string + + if o.SpecClusterPlacementClusterSelector != nil { + qrSpecClusterPlacementClusterSelector = *o.SpecClusterPlacementClusterSelector + } + qSpecClusterPlacementClusterSelector := qrSpecClusterPlacementClusterSelector + if qSpecClusterPlacementClusterSelector != "" { + + if err := r.SetQueryParam("spec.clusterPlacement.clusterSelector", qSpecClusterPlacementClusterSelector); err != nil { + return err + } + } + } + + if o.SpecClusterPlacementDriftAction != nil { + + // query param spec.clusterPlacement.driftAction + var qrSpecClusterPlacementDriftAction string + + if o.SpecClusterPlacementDriftAction != nil { + qrSpecClusterPlacementDriftAction = *o.SpecClusterPlacementDriftAction + } + qSpecClusterPlacementDriftAction := qrSpecClusterPlacementDriftAction + if qSpecClusterPlacementDriftAction != "" { + + if err := r.SetQueryParam("spec.clusterPlacement.driftAction", qSpecClusterPlacementDriftAction); err != nil { + return err + } + } + } + + if o.SpecClusterPlacementNodeGroupingKeys != nil { + + // binding items for spec.clusterPlacement.nodeGroupingKeys + joinedSpecClusterPlacementNodeGroupingKeys := o.bindParamSpecClusterPlacementNodeGroupingKeys(reg) + + // query array param spec.clusterPlacement.nodeGroupingKeys + if err := r.SetQueryParam("spec.clusterPlacement.nodeGroupingKeys", joinedSpecClusterPlacementNodeGroupingKeys...); err != nil { + return err + } + } + + if o.SpecClusterPlacementPlacementType != nil { + + // query param spec.clusterPlacement.placementType + var qrSpecClusterPlacementPlacementType string + + if o.SpecClusterPlacementPlacementType != nil { + qrSpecClusterPlacementPlacementType = *o.SpecClusterPlacementPlacementType + } + qSpecClusterPlacementPlacementType := qrSpecClusterPlacementPlacementType + if qSpecClusterPlacementPlacementType != "" { + + if err := r.SetQueryParam("spec.clusterPlacement.placementType", qSpecClusterPlacementPlacementType); err != nil { + return err + } + } + } + + if o.SpecClusterSelector != nil { + + // query param spec.clusterSelector + var qrSpecClusterSelector string + + if o.SpecClusterSelector != nil { + qrSpecClusterSelector = *o.SpecClusterSelector + } + qSpecClusterSelector := qrSpecClusterSelector + if qSpecClusterSelector != "" { + + if err := r.SetQueryParam("spec.clusterSelector", qSpecClusterSelector); err != nil { + return err + } + } + } + + if o.SpecRepoArtifactMetaGitRevision != nil { + + // query param spec.repoArtifactMeta.git.revision + var qrSpecRepoArtifactMetaGitRevision string + + if o.SpecRepoArtifactMetaGitRevision != nil { + qrSpecRepoArtifactMetaGitRevision = *o.SpecRepoArtifactMetaGitRevision + } + qSpecRepoArtifactMetaGitRevision := qrSpecRepoArtifactMetaGitRevision + if qSpecRepoArtifactMetaGitRevision != "" { + + if err := r.SetQueryParam("spec.repoArtifactMeta.git.revision", qSpecRepoArtifactMetaGitRevision); err != nil { + return err + } + } + } + + if o.SpecRepoArtifactMetaHelmChartName != nil { + + // query param spec.repoArtifactMeta.helm.chartName + var qrSpecRepoArtifactMetaHelmChartName string + + if o.SpecRepoArtifactMetaHelmChartName != nil { + qrSpecRepoArtifactMetaHelmChartName = *o.SpecRepoArtifactMetaHelmChartName + } + qSpecRepoArtifactMetaHelmChartName := qrSpecRepoArtifactMetaHelmChartName + if qSpecRepoArtifactMetaHelmChartName != "" { + + if err := r.SetQueryParam("spec.repoArtifactMeta.helm.chartName", qSpecRepoArtifactMetaHelmChartName); err != nil { + return err + } + } + } + + if o.SpecRepoArtifactMetaHelmTag != nil { + + // query param spec.repoArtifactMeta.helm.tag + var qrSpecRepoArtifactMetaHelmTag string + + if o.SpecRepoArtifactMetaHelmTag != nil { + qrSpecRepoArtifactMetaHelmTag = *o.SpecRepoArtifactMetaHelmTag + } + qSpecRepoArtifactMetaHelmTag := qrSpecRepoArtifactMetaHelmTag + if qSpecRepoArtifactMetaHelmTag != "" { + + if err := r.SetQueryParam("spec.repoArtifactMeta.helm.tag", qSpecRepoArtifactMetaHelmTag); err != nil { + return err + } + } + } + + if o.SpecRepoArtifactMetaTimeout != nil { + + // query param spec.repoArtifactMeta.timeout + var qrSpecRepoArtifactMetaTimeout string + + if o.SpecRepoArtifactMetaTimeout != nil { + qrSpecRepoArtifactMetaTimeout = *o.SpecRepoArtifactMetaTimeout + } + qSpecRepoArtifactMetaTimeout := qrSpecRepoArtifactMetaTimeout + if qSpecRepoArtifactMetaTimeout != "" { + + if err := r.SetQueryParam("spec.repoArtifactMeta.timeout", qSpecRepoArtifactMetaTimeout); err != nil { + return err + } + } + } + + if o.SpecRepositoryRef != nil { + + // query param spec.repositoryRef + var qrSpecRepositoryRef string + + if o.SpecRepositoryRef != nil { + qrSpecRepositoryRef = *o.SpecRepositoryRef + } + qSpecRepositoryRef := qrSpecRepositoryRef + if qSpecRepositoryRef != "" { + + if err := r.SetQueryParam("spec.repositoryRef", qSpecRepositoryRef); err != nil { + return err + } + } + } + + if o.SpecResourceSelector != nil { + + // query param spec.resourceSelector + var qrSpecResourceSelector string + + if o.SpecResourceSelector != nil { + qrSpecResourceSelector = *o.SpecResourceSelector + } + qSpecResourceSelector := qrSpecResourceSelector + if qSpecResourceSelector != "" { + + if err := r.SetQueryParam("spec.resourceSelector", qSpecResourceSelector); err != nil { + return err + } + } + } + + if o.SpecTemplateOverridesV2EventFrameworkFQDN != nil { + + // query param spec.templateOverrides.V2EventFrameworkFQDN + var qrSpecTemplateOverridesV2EventFrameworkFQDN string + + if o.SpecTemplateOverridesV2EventFrameworkFQDN != nil { + qrSpecTemplateOverridesV2EventFrameworkFQDN = *o.SpecTemplateOverridesV2EventFrameworkFQDN + } + qSpecTemplateOverridesV2EventFrameworkFQDN := qrSpecTemplateOverridesV2EventFrameworkFQDN + if qSpecTemplateOverridesV2EventFrameworkFQDN != "" { + + if err := r.SetQueryParam("spec.templateOverrides.V2EventFrameworkFQDN", qSpecTemplateOverridesV2EventFrameworkFQDN); err != nil { + return err + } + } + } + + if o.SpecTemplateOverridesClusterName != nil { + + // query param spec.templateOverrides.clusterName + var qrSpecTemplateOverridesClusterName string + + if o.SpecTemplateOverridesClusterName != nil { + qrSpecTemplateOverridesClusterName = *o.SpecTemplateOverridesClusterName + } + qSpecTemplateOverridesClusterName := qrSpecTemplateOverridesClusterName + if qSpecTemplateOverridesClusterName != "" { + + if err := r.SetQueryParam("spec.templateOverrides.clusterName", qSpecTemplateOverridesClusterName); err != nil { + return err + } + } + } + + if o.SpecTemplateOverridesOrgDisplayName != nil { + + // query param spec.templateOverrides.orgDisplayName + var qrSpecTemplateOverridesOrgDisplayName string + + if o.SpecTemplateOverridesOrgDisplayName != nil { + qrSpecTemplateOverridesOrgDisplayName = *o.SpecTemplateOverridesOrgDisplayName + } + qSpecTemplateOverridesOrgDisplayName := qrSpecTemplateOverridesOrgDisplayName + if qSpecTemplateOverridesOrgDisplayName != "" { + + if err := r.SetQueryParam("spec.templateOverrides.orgDisplayName", qSpecTemplateOverridesOrgDisplayName); err != nil { + return err + } + } + } + + if o.SpecTemplateOverridesOrganizationHash != nil { + + // query param spec.templateOverrides.organizationHash + var qrSpecTemplateOverridesOrganizationHash string + + if o.SpecTemplateOverridesOrganizationHash != nil { + qrSpecTemplateOverridesOrganizationHash = *o.SpecTemplateOverridesOrganizationHash + } + qSpecTemplateOverridesOrganizationHash := qrSpecTemplateOverridesOrganizationHash + if qSpecTemplateOverridesOrganizationHash != "" { + + if err := r.SetQueryParam("spec.templateOverrides.organizationHash", qSpecTemplateOverridesOrganizationHash); err != nil { + return err + } + } + } + + if o.SpecTemplateOverridesOrganizationID != nil { + + // query param spec.templateOverrides.organizationID + var qrSpecTemplateOverridesOrganizationID string + + if o.SpecTemplateOverridesOrganizationID != nil { + qrSpecTemplateOverridesOrganizationID = *o.SpecTemplateOverridesOrganizationID + } + qSpecTemplateOverridesOrganizationID := qrSpecTemplateOverridesOrganizationID + if qSpecTemplateOverridesOrganizationID != "" { + + if err := r.SetQueryParam("spec.templateOverrides.organizationID", qSpecTemplateOverridesOrganizationID); err != nil { + return err + } + } + } + + if o.SpecTemplateOverridesPartnerDisplayName != nil { + + // query param spec.templateOverrides.partnerDisplayName + var qrSpecTemplateOverridesPartnerDisplayName string + + if o.SpecTemplateOverridesPartnerDisplayName != nil { + qrSpecTemplateOverridesPartnerDisplayName = *o.SpecTemplateOverridesPartnerDisplayName + } + qSpecTemplateOverridesPartnerDisplayName := qrSpecTemplateOverridesPartnerDisplayName + if qSpecTemplateOverridesPartnerDisplayName != "" { + + if err := r.SetQueryParam("spec.templateOverrides.partnerDisplayName", qSpecTemplateOverridesPartnerDisplayName); err != nil { + return err + } + } + } + + if o.SpecTemplateOverridesPartnerHash != nil { + + // query param spec.templateOverrides.partnerHash + var qrSpecTemplateOverridesPartnerHash string + + if o.SpecTemplateOverridesPartnerHash != nil { + qrSpecTemplateOverridesPartnerHash = *o.SpecTemplateOverridesPartnerHash + } + qSpecTemplateOverridesPartnerHash := qrSpecTemplateOverridesPartnerHash + if qSpecTemplateOverridesPartnerHash != "" { + + if err := r.SetQueryParam("spec.templateOverrides.partnerHash", qSpecTemplateOverridesPartnerHash); err != nil { + return err + } + } + } + + if o.SpecTemplateOverridesPartnerID != nil { + + // query param spec.templateOverrides.partnerID + var qrSpecTemplateOverridesPartnerID string + + if o.SpecTemplateOverridesPartnerID != nil { + qrSpecTemplateOverridesPartnerID = *o.SpecTemplateOverridesPartnerID + } + qSpecTemplateOverridesPartnerID := qrSpecTemplateOverridesPartnerID + if qSpecTemplateOverridesPartnerID != "" { + + if err := r.SetQueryParam("spec.templateOverrides.partnerID", qSpecTemplateOverridesPartnerID); err != nil { + return err + } + } + } + + if o.SpecTemplateOverridesProjectID != nil { + + // query param spec.templateOverrides.projectID + var qrSpecTemplateOverridesProjectID string + + if o.SpecTemplateOverridesProjectID != nil { + qrSpecTemplateOverridesProjectID = *o.SpecTemplateOverridesProjectID + } + qSpecTemplateOverridesProjectID := qrSpecTemplateOverridesProjectID + if qSpecTemplateOverridesProjectID != "" { + + if err := r.SetQueryParam("spec.templateOverrides.projectID", qSpecTemplateOverridesProjectID); err != nil { + return err + } + } + } + + if o.SpecTemplateOverridesProxyURL != nil { + + // query param spec.templateOverrides.proxyURL + var qrSpecTemplateOverridesProxyURL string + + if o.SpecTemplateOverridesProxyURL != nil { + qrSpecTemplateOverridesProxyURL = *o.SpecTemplateOverridesProxyURL + } + qSpecTemplateOverridesProxyURL := qrSpecTemplateOverridesProxyURL + if qSpecTemplateOverridesProxyURL != "" { + + if err := r.SetQueryParam("spec.templateOverrides.proxyURL", qSpecTemplateOverridesProxyURL); err != nil { + return err + } + } + } + + if o.SpecTemplateOverridesV1DeploymentEnv != nil { + + // query param spec.templateOverrides.v1DeploymentEnv + var qrSpecTemplateOverridesV1DeploymentEnv string + + if o.SpecTemplateOverridesV1DeploymentEnv != nil { + qrSpecTemplateOverridesV1DeploymentEnv = *o.SpecTemplateOverridesV1DeploymentEnv + } + qSpecTemplateOverridesV1DeploymentEnv := qrSpecTemplateOverridesV1DeploymentEnv + if qSpecTemplateOverridesV1DeploymentEnv != "" { + + if err := r.SetQueryParam("spec.templateOverrides.v1DeploymentEnv", qSpecTemplateOverridesV1DeploymentEnv); err != nil { + return err + } + } + } + + if o.SpecTemplateOverridesV1EdgeDisplayName != nil { + + // query param spec.templateOverrides.v1EdgeDisplayName + var qrSpecTemplateOverridesV1EdgeDisplayName string + + if o.SpecTemplateOverridesV1EdgeDisplayName != nil { + qrSpecTemplateOverridesV1EdgeDisplayName = *o.SpecTemplateOverridesV1EdgeDisplayName + } + qSpecTemplateOverridesV1EdgeDisplayName := qrSpecTemplateOverridesV1EdgeDisplayName + if qSpecTemplateOverridesV1EdgeDisplayName != "" { + + if err := r.SetQueryParam("spec.templateOverrides.v1EdgeDisplayName", qSpecTemplateOverridesV1EdgeDisplayName); err != nil { + return err + } + } + } + + if o.SpecTemplateOverridesV1EdgeID != nil { + + // query param spec.templateOverrides.v1EdgeID + var qrSpecTemplateOverridesV1EdgeID string + + if o.SpecTemplateOverridesV1EdgeID != nil { + qrSpecTemplateOverridesV1EdgeID = *o.SpecTemplateOverridesV1EdgeID + } + qSpecTemplateOverridesV1EdgeID := qrSpecTemplateOverridesV1EdgeID + if qSpecTemplateOverridesV1EdgeID != "" { + + if err := r.SetQueryParam("spec.templateOverrides.v1EdgeID", qSpecTemplateOverridesV1EdgeID); err != nil { + return err + } + } + } + + if o.SpecTemplateOverridesV1FluentdAggregatorAddr != nil { + + // query param spec.templateOverrides.v1FluentdAggregatorAddr + var qrSpecTemplateOverridesV1FluentdAggregatorAddr string + + if o.SpecTemplateOverridesV1FluentdAggregatorAddr != nil { + qrSpecTemplateOverridesV1FluentdAggregatorAddr = *o.SpecTemplateOverridesV1FluentdAggregatorAddr + } + qSpecTemplateOverridesV1FluentdAggregatorAddr := qrSpecTemplateOverridesV1FluentdAggregatorAddr + if qSpecTemplateOverridesV1FluentdAggregatorAddr != "" { + + if err := r.SetQueryParam("spec.templateOverrides.v1FluentdAggregatorAddr", qSpecTemplateOverridesV1FluentdAggregatorAddr); err != nil { + return err + } + } + } + + if o.SpecTemplateOverridesV1InfluxDBFQDN != nil { + + // query param spec.templateOverrides.v1InfluxDBFQDN + var qrSpecTemplateOverridesV1InfluxDBFQDN string + + if o.SpecTemplateOverridesV1InfluxDBFQDN != nil { + qrSpecTemplateOverridesV1InfluxDBFQDN = *o.SpecTemplateOverridesV1InfluxDBFQDN + } + qSpecTemplateOverridesV1InfluxDBFQDN := qrSpecTemplateOverridesV1InfluxDBFQDN + if qSpecTemplateOverridesV1InfluxDBFQDN != "" { + + if err := r.SetQueryParam("spec.templateOverrides.v1InfluxDBFQDN", qSpecTemplateOverridesV1InfluxDBFQDN); err != nil { + return err + } + } + } + + if o.SpecTemplateOverridesV1InfluxDBPassword != nil { + + // query param spec.templateOverrides.v1InfluxDBPassword + var qrSpecTemplateOverridesV1InfluxDBPassword string + + if o.SpecTemplateOverridesV1InfluxDBPassword != nil { + qrSpecTemplateOverridesV1InfluxDBPassword = *o.SpecTemplateOverridesV1InfluxDBPassword + } + qSpecTemplateOverridesV1InfluxDBPassword := qrSpecTemplateOverridesV1InfluxDBPassword + if qSpecTemplateOverridesV1InfluxDBPassword != "" { + + if err := r.SetQueryParam("spec.templateOverrides.v1InfluxDBPassword", qSpecTemplateOverridesV1InfluxDBPassword); err != nil { + return err + } + } + } + + if o.SpecTemplateOverridesV1PromethuesRelayFQDN != nil { + + // query param spec.templateOverrides.v1PromethuesRelayFQDN + var qrSpecTemplateOverridesV1PromethuesRelayFQDN string + + if o.SpecTemplateOverridesV1PromethuesRelayFQDN != nil { + qrSpecTemplateOverridesV1PromethuesRelayFQDN = *o.SpecTemplateOverridesV1PromethuesRelayFQDN + } + qSpecTemplateOverridesV1PromethuesRelayFQDN := qrSpecTemplateOverridesV1PromethuesRelayFQDN + if qSpecTemplateOverridesV1PromethuesRelayFQDN != "" { + + if err := r.SetQueryParam("spec.templateOverrides.v1PromethuesRelayFQDN", qSpecTemplateOverridesV1PromethuesRelayFQDN); err != nil { + return err + } + } + } + + if o.SpecValuesFile != nil { + + // query param spec.valuesFile + var qrSpecValuesFile string + + if o.SpecValuesFile != nil { + qrSpecValuesFile = *o.SpecValuesFile + } + qSpecValuesFile := qrSpecValuesFile + if qSpecValuesFile != "" { + + if err := r.SetQueryParam("spec.valuesFile", qSpecValuesFile); err != nil { + return err + } + } + } + + if o.StatusConditionStatus != nil { + + // query param status.conditionStatus + var qrStatusConditionStatus string + + if o.StatusConditionStatus != nil { + qrStatusConditionStatus = *o.StatusConditionStatus + } + qStatusConditionStatus := qrStatusConditionStatus + if qStatusConditionStatus != "" { + + if err := r.SetQueryParam("status.conditionStatus", qStatusConditionStatus); err != nil { + return err + } + } + } + + if o.StatusConditionType != nil { + + // query param status.conditionType + var qrStatusConditionType string + + if o.StatusConditionType != nil { + qrStatusConditionType = *o.StatusConditionType + } + qStatusConditionType := qrStatusConditionType + if qStatusConditionType != "" { + + if err := r.SetQueryParam("status.conditionType", qStatusConditionType); err != nil { + return err + } + } + } + + if o.StatusLastUpdated != nil { + + // query param status.lastUpdated + var qrStatusLastUpdated strfmt.DateTime + + if o.StatusLastUpdated != nil { + qrStatusLastUpdated = *o.StatusLastUpdated + } + qStatusLastUpdated := qrStatusLastUpdated.String() + if qStatusLastUpdated != "" { + + if err := r.SetQueryParam("status.lastUpdated", qStatusLastUpdated); err != nil { + return err + } + } + } + + if o.StatusReason != nil { + + // query param status.reason + var qrStatusReason string + + if o.StatusReason != nil { + qrStatusReason = *o.StatusReason + } + qStatusReason := qrStatusReason + if qStatusReason != "" { + + if err := r.SetQueryParam("status.reason", qStatusReason); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// bindParamOverrideGetOverride binds the parameter spec.clusterPlacement.nodeGroupingKeys +func (o *OverrideGetOverrideParams) bindParamSpecClusterPlacementNodeGroupingKeys(formats strfmt.Registry) []string { + specClusterPlacementNodeGroupingKeysIR := o.SpecClusterPlacementNodeGroupingKeys + + var specClusterPlacementNodeGroupingKeysIC []string + for _, specClusterPlacementNodeGroupingKeysIIR := range specClusterPlacementNodeGroupingKeysIR { // explode []string + + specClusterPlacementNodeGroupingKeysIIV := specClusterPlacementNodeGroupingKeysIIR // string as string + specClusterPlacementNodeGroupingKeysIC = append(specClusterPlacementNodeGroupingKeysIC, specClusterPlacementNodeGroupingKeysIIV) + } + + // items.CollectionFormat: "multi" + specClusterPlacementNodeGroupingKeysIS := swag.JoinByFormat(specClusterPlacementNodeGroupingKeysIC, "multi") + + return specClusterPlacementNodeGroupingKeysIS +} diff --git a/components/common/api/def/clients/config/client/override/override_get_override_responses.go b/components/common/api/def/clients/config/client/override/override_get_override_responses.go new file mode 100644 index 0000000..7ff8092 --- /dev/null +++ b/components/common/api/def/clients/config/client/override/override_get_override_responses.go @@ -0,0 +1,187 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package override + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/RafaySystems/rcloud-base/components/common/api/def/clients/config/models" +) + +// OverrideGetOverrideReader is a Reader for the OverrideGetOverride structure. +type OverrideGetOverrideReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *OverrideGetOverrideReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewOverrideGetOverrideOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 403: + result := NewOverrideGetOverrideForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewOverrideGetOverrideNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + result := NewOverrideGetOverrideDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewOverrideGetOverrideOK creates a OverrideGetOverrideOK with default headers values +func NewOverrideGetOverrideOK() *OverrideGetOverrideOK { + return &OverrideGetOverrideOK{} +} + +/* OverrideGetOverrideOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type OverrideGetOverrideOK struct { + Payload *models.ConfigOverride +} + +func (o *OverrideGetOverrideOK) Error() string { + return fmt.Sprintf("[GET /v2/config/project/{metadata.project}/override/{metadata.name}][%d] overrideGetOverrideOK %+v", 200, o.Payload) +} +func (o *OverrideGetOverrideOK) GetPayload() *models.ConfigOverride { + return o.Payload +} + +func (o *OverrideGetOverrideOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ConfigOverride) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewOverrideGetOverrideForbidden creates a OverrideGetOverrideForbidden with default headers values +func NewOverrideGetOverrideForbidden() *OverrideGetOverrideForbidden { + return &OverrideGetOverrideForbidden{} +} + +/* OverrideGetOverrideForbidden describes a response with status code 403, with default header values. + +Returned when the user does not have permission to access the resource. +*/ +type OverrideGetOverrideForbidden struct { + Payload interface{} +} + +func (o *OverrideGetOverrideForbidden) Error() string { + return fmt.Sprintf("[GET /v2/config/project/{metadata.project}/override/{metadata.name}][%d] overrideGetOverrideForbidden %+v", 403, o.Payload) +} +func (o *OverrideGetOverrideForbidden) GetPayload() interface{} { + return o.Payload +} + +func (o *OverrideGetOverrideForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewOverrideGetOverrideNotFound creates a OverrideGetOverrideNotFound with default headers values +func NewOverrideGetOverrideNotFound() *OverrideGetOverrideNotFound { + return &OverrideGetOverrideNotFound{} +} + +/* OverrideGetOverrideNotFound describes a response with status code 404, with default header values. + +Returned when the resource does not exist. +*/ +type OverrideGetOverrideNotFound struct { + Payload string +} + +func (o *OverrideGetOverrideNotFound) Error() string { + return fmt.Sprintf("[GET /v2/config/project/{metadata.project}/override/{metadata.name}][%d] overrideGetOverrideNotFound %+v", 404, o.Payload) +} +func (o *OverrideGetOverrideNotFound) GetPayload() string { + return o.Payload +} + +func (o *OverrideGetOverrideNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewOverrideGetOverrideDefault creates a OverrideGetOverrideDefault with default headers values +func NewOverrideGetOverrideDefault(code int) *OverrideGetOverrideDefault { + return &OverrideGetOverrideDefault{ + _statusCode: code, + } +} + +/* OverrideGetOverrideDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type OverrideGetOverrideDefault struct { + _statusCode int + + Payload *models.GooglerpcStatus +} + +// Code gets the status code for the override get override default response +func (o *OverrideGetOverrideDefault) Code() int { + return o._statusCode +} + +func (o *OverrideGetOverrideDefault) Error() string { + return fmt.Sprintf("[GET /v2/config/project/{metadata.project}/override/{metadata.name}][%d] Override_GetOverride default %+v", o._statusCode, o.Payload) +} +func (o *OverrideGetOverrideDefault) GetPayload() *models.GooglerpcStatus { + return o.Payload +} + +func (o *OverrideGetOverrideDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.GooglerpcStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/components/common/api/def/clients/config/client/override/override_get_overrides_parameters.go b/components/common/api/def/clients/config/client/override/override_get_overrides_parameters.go new file mode 100644 index 0000000..8d6970c --- /dev/null +++ b/components/common/api/def/clients/config/client/override/override_get_overrides_parameters.go @@ -0,0 +1,866 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package override + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewOverrideGetOverridesParams creates a new OverrideGetOverridesParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewOverrideGetOverridesParams() *OverrideGetOverridesParams { + return &OverrideGetOverridesParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewOverrideGetOverridesParamsWithTimeout creates a new OverrideGetOverridesParams object +// with the ability to set a timeout on a request. +func NewOverrideGetOverridesParamsWithTimeout(timeout time.Duration) *OverrideGetOverridesParams { + return &OverrideGetOverridesParams{ + timeout: timeout, + } +} + +// NewOverrideGetOverridesParamsWithContext creates a new OverrideGetOverridesParams object +// with the ability to set a context for a request. +func NewOverrideGetOverridesParamsWithContext(ctx context.Context) *OverrideGetOverridesParams { + return &OverrideGetOverridesParams{ + Context: ctx, + } +} + +// NewOverrideGetOverridesParamsWithHTTPClient creates a new OverrideGetOverridesParams object +// with the ability to set a custom HTTPClient for a request. +func NewOverrideGetOverridesParamsWithHTTPClient(client *http.Client) *OverrideGetOverridesParams { + return &OverrideGetOverridesParams{ + HTTPClient: client, + } +} + +/* OverrideGetOverridesParams contains all the parameters to send to the API endpoint + for the override get overrides operation. + + Typically these are written to a http.Request. +*/ +type OverrideGetOverridesParams struct { + + // ID. + ID *string + + // BlueprintRef. + BlueprintRef *string + + // ClusterID. + ClusterID *string + + // Count. + // + // Format: int64 + Count *string + + // Deleted. + Deleted *bool + + /* DisplayName. + + displayName only used for update queries to set displayName (READONLY). + */ + DisplayName *string + + // Extended. + Extended *bool + + /* GlobalScope. + + globalScope sets partnerID,organizationID,projectID = 0. + */ + GlobalScope *bool + + // Groups. + Groups []string + + /* IgnoreScopeDefault. + + ignoreScopeDefault ignores default values for partnerID, organizationID and + projectID. + */ + IgnoreScopeDefault *bool + + // IsSSOUser. + IsSSOUser *bool + + // Limit. + // + // Format: int64 + Limit *string + + /* Name. + + name is unique ID of a resource along with (partnerID, organizationID, + projectID). + */ + Name *string + + // Offset. + // + // Format: int64 + Offset *string + + // Order. + Order *string + + // OrderBy. + OrderBy *string + + // OrganizationID. + OrganizationID *string + + // PartnerID. + PartnerID *string + + // ProjectID. + ProjectID *string + + // PublishedVersion. + PublishedVersion *string + + /* Selector. + + selector is used to filter the labels of a resource. + */ + Selector *string + + /* URLScope. + + urlScope is supposed to be passed in the URL as kind/HashID(value) + */ + URLScope string + + // Username. + Username *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the override get overrides params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *OverrideGetOverridesParams) WithDefaults() *OverrideGetOverridesParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the override get overrides params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *OverrideGetOverridesParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the override get overrides params +func (o *OverrideGetOverridesParams) WithTimeout(timeout time.Duration) *OverrideGetOverridesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the override get overrides params +func (o *OverrideGetOverridesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the override get overrides params +func (o *OverrideGetOverridesParams) WithContext(ctx context.Context) *OverrideGetOverridesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the override get overrides params +func (o *OverrideGetOverridesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the override get overrides params +func (o *OverrideGetOverridesParams) WithHTTPClient(client *http.Client) *OverrideGetOverridesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the override get overrides params +func (o *OverrideGetOverridesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the override get overrides params +func (o *OverrideGetOverridesParams) WithID(id *string) *OverrideGetOverridesParams { + o.SetID(id) + return o +} + +// SetID adds the id to the override get overrides params +func (o *OverrideGetOverridesParams) SetID(id *string) { + o.ID = id +} + +// WithBlueprintRef adds the blueprintRef to the override get overrides params +func (o *OverrideGetOverridesParams) WithBlueprintRef(blueprintRef *string) *OverrideGetOverridesParams { + o.SetBlueprintRef(blueprintRef) + return o +} + +// SetBlueprintRef adds the blueprintRef to the override get overrides params +func (o *OverrideGetOverridesParams) SetBlueprintRef(blueprintRef *string) { + o.BlueprintRef = blueprintRef +} + +// WithClusterID adds the clusterID to the override get overrides params +func (o *OverrideGetOverridesParams) WithClusterID(clusterID *string) *OverrideGetOverridesParams { + o.SetClusterID(clusterID) + return o +} + +// SetClusterID adds the clusterId to the override get overrides params +func (o *OverrideGetOverridesParams) SetClusterID(clusterID *string) { + o.ClusterID = clusterID +} + +// WithCount adds the count to the override get overrides params +func (o *OverrideGetOverridesParams) WithCount(count *string) *OverrideGetOverridesParams { + o.SetCount(count) + return o +} + +// SetCount adds the count to the override get overrides params +func (o *OverrideGetOverridesParams) SetCount(count *string) { + o.Count = count +} + +// WithDeleted adds the deleted to the override get overrides params +func (o *OverrideGetOverridesParams) WithDeleted(deleted *bool) *OverrideGetOverridesParams { + o.SetDeleted(deleted) + return o +} + +// SetDeleted adds the deleted to the override get overrides params +func (o *OverrideGetOverridesParams) SetDeleted(deleted *bool) { + o.Deleted = deleted +} + +// WithDisplayName adds the displayName to the override get overrides params +func (o *OverrideGetOverridesParams) WithDisplayName(displayName *string) *OverrideGetOverridesParams { + o.SetDisplayName(displayName) + return o +} + +// SetDisplayName adds the displayName to the override get overrides params +func (o *OverrideGetOverridesParams) SetDisplayName(displayName *string) { + o.DisplayName = displayName +} + +// WithExtended adds the extended to the override get overrides params +func (o *OverrideGetOverridesParams) WithExtended(extended *bool) *OverrideGetOverridesParams { + o.SetExtended(extended) + return o +} + +// SetExtended adds the extended to the override get overrides params +func (o *OverrideGetOverridesParams) SetExtended(extended *bool) { + o.Extended = extended +} + +// WithGlobalScope adds the globalScope to the override get overrides params +func (o *OverrideGetOverridesParams) WithGlobalScope(globalScope *bool) *OverrideGetOverridesParams { + o.SetGlobalScope(globalScope) + return o +} + +// SetGlobalScope adds the globalScope to the override get overrides params +func (o *OverrideGetOverridesParams) SetGlobalScope(globalScope *bool) { + o.GlobalScope = globalScope +} + +// WithGroups adds the groups to the override get overrides params +func (o *OverrideGetOverridesParams) WithGroups(groups []string) *OverrideGetOverridesParams { + o.SetGroups(groups) + return o +} + +// SetGroups adds the groups to the override get overrides params +func (o *OverrideGetOverridesParams) SetGroups(groups []string) { + o.Groups = groups +} + +// WithIgnoreScopeDefault adds the ignoreScopeDefault to the override get overrides params +func (o *OverrideGetOverridesParams) WithIgnoreScopeDefault(ignoreScopeDefault *bool) *OverrideGetOverridesParams { + o.SetIgnoreScopeDefault(ignoreScopeDefault) + return o +} + +// SetIgnoreScopeDefault adds the ignoreScopeDefault to the override get overrides params +func (o *OverrideGetOverridesParams) SetIgnoreScopeDefault(ignoreScopeDefault *bool) { + o.IgnoreScopeDefault = ignoreScopeDefault +} + +// WithIsSSOUser adds the isSSOUser to the override get overrides params +func (o *OverrideGetOverridesParams) WithIsSSOUser(isSSOUser *bool) *OverrideGetOverridesParams { + o.SetIsSSOUser(isSSOUser) + return o +} + +// SetIsSSOUser adds the isSSOUser to the override get overrides params +func (o *OverrideGetOverridesParams) SetIsSSOUser(isSSOUser *bool) { + o.IsSSOUser = isSSOUser +} + +// WithLimit adds the limit to the override get overrides params +func (o *OverrideGetOverridesParams) WithLimit(limit *string) *OverrideGetOverridesParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the override get overrides params +func (o *OverrideGetOverridesParams) SetLimit(limit *string) { + o.Limit = limit +} + +// WithName adds the name to the override get overrides params +func (o *OverrideGetOverridesParams) WithName(name *string) *OverrideGetOverridesParams { + o.SetName(name) + return o +} + +// SetName adds the name to the override get overrides params +func (o *OverrideGetOverridesParams) SetName(name *string) { + o.Name = name +} + +// WithOffset adds the offset to the override get overrides params +func (o *OverrideGetOverridesParams) WithOffset(offset *string) *OverrideGetOverridesParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the override get overrides params +func (o *OverrideGetOverridesParams) SetOffset(offset *string) { + o.Offset = offset +} + +// WithOrder adds the order to the override get overrides params +func (o *OverrideGetOverridesParams) WithOrder(order *string) *OverrideGetOverridesParams { + o.SetOrder(order) + return o +} + +// SetOrder adds the order to the override get overrides params +func (o *OverrideGetOverridesParams) SetOrder(order *string) { + o.Order = order +} + +// WithOrderBy adds the orderBy to the override get overrides params +func (o *OverrideGetOverridesParams) WithOrderBy(orderBy *string) *OverrideGetOverridesParams { + o.SetOrderBy(orderBy) + return o +} + +// SetOrderBy adds the orderBy to the override get overrides params +func (o *OverrideGetOverridesParams) SetOrderBy(orderBy *string) { + o.OrderBy = orderBy +} + +// WithOrganizationID adds the organizationID to the override get overrides params +func (o *OverrideGetOverridesParams) WithOrganizationID(organizationID *string) *OverrideGetOverridesParams { + o.SetOrganizationID(organizationID) + return o +} + +// SetOrganizationID adds the organizationId to the override get overrides params +func (o *OverrideGetOverridesParams) SetOrganizationID(organizationID *string) { + o.OrganizationID = organizationID +} + +// WithPartnerID adds the partnerID to the override get overrides params +func (o *OverrideGetOverridesParams) WithPartnerID(partnerID *string) *OverrideGetOverridesParams { + o.SetPartnerID(partnerID) + return o +} + +// SetPartnerID adds the partnerId to the override get overrides params +func (o *OverrideGetOverridesParams) SetPartnerID(partnerID *string) { + o.PartnerID = partnerID +} + +// WithProjectID adds the projectID to the override get overrides params +func (o *OverrideGetOverridesParams) WithProjectID(projectID *string) *OverrideGetOverridesParams { + o.SetProjectID(projectID) + return o +} + +// SetProjectID adds the projectId to the override get overrides params +func (o *OverrideGetOverridesParams) SetProjectID(projectID *string) { + o.ProjectID = projectID +} + +// WithPublishedVersion adds the publishedVersion to the override get overrides params +func (o *OverrideGetOverridesParams) WithPublishedVersion(publishedVersion *string) *OverrideGetOverridesParams { + o.SetPublishedVersion(publishedVersion) + return o +} + +// SetPublishedVersion adds the publishedVersion to the override get overrides params +func (o *OverrideGetOverridesParams) SetPublishedVersion(publishedVersion *string) { + o.PublishedVersion = publishedVersion +} + +// WithSelector adds the selector to the override get overrides params +func (o *OverrideGetOverridesParams) WithSelector(selector *string) *OverrideGetOverridesParams { + o.SetSelector(selector) + return o +} + +// SetSelector adds the selector to the override get overrides params +func (o *OverrideGetOverridesParams) SetSelector(selector *string) { + o.Selector = selector +} + +// WithURLScope adds the uRLScope to the override get overrides params +func (o *OverrideGetOverridesParams) WithURLScope(uRLScope string) *OverrideGetOverridesParams { + o.SetURLScope(uRLScope) + return o +} + +// SetURLScope adds the urlScope to the override get overrides params +func (o *OverrideGetOverridesParams) SetURLScope(uRLScope string) { + o.URLScope = uRLScope +} + +// WithUsername adds the username to the override get overrides params +func (o *OverrideGetOverridesParams) WithUsername(username *string) *OverrideGetOverridesParams { + o.SetUsername(username) + return o +} + +// SetUsername adds the username to the override get overrides params +func (o *OverrideGetOverridesParams) SetUsername(username *string) { + o.Username = username +} + +// WriteToRequest writes these params to a swagger request +func (o *OverrideGetOverridesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.ID != nil { + + // query param ID + var qrID string + + if o.ID != nil { + qrID = *o.ID + } + qID := qrID + if qID != "" { + + if err := r.SetQueryParam("ID", qID); err != nil { + return err + } + } + } + + if o.BlueprintRef != nil { + + // query param blueprintRef + var qrBlueprintRef string + + if o.BlueprintRef != nil { + qrBlueprintRef = *o.BlueprintRef + } + qBlueprintRef := qrBlueprintRef + if qBlueprintRef != "" { + + if err := r.SetQueryParam("blueprintRef", qBlueprintRef); err != nil { + return err + } + } + } + + if o.ClusterID != nil { + + // query param clusterID + var qrClusterID string + + if o.ClusterID != nil { + qrClusterID = *o.ClusterID + } + qClusterID := qrClusterID + if qClusterID != "" { + + if err := r.SetQueryParam("clusterID", qClusterID); err != nil { + return err + } + } + } + + if o.Count != nil { + + // query param count + var qrCount string + + if o.Count != nil { + qrCount = *o.Count + } + qCount := qrCount + if qCount != "" { + + if err := r.SetQueryParam("count", qCount); err != nil { + return err + } + } + } + + if o.Deleted != nil { + + // query param deleted + var qrDeleted bool + + if o.Deleted != nil { + qrDeleted = *o.Deleted + } + qDeleted := swag.FormatBool(qrDeleted) + if qDeleted != "" { + + if err := r.SetQueryParam("deleted", qDeleted); err != nil { + return err + } + } + } + + if o.DisplayName != nil { + + // query param displayName + var qrDisplayName string + + if o.DisplayName != nil { + qrDisplayName = *o.DisplayName + } + qDisplayName := qrDisplayName + if qDisplayName != "" { + + if err := r.SetQueryParam("displayName", qDisplayName); err != nil { + return err + } + } + } + + if o.Extended != nil { + + // query param extended + var qrExtended bool + + if o.Extended != nil { + qrExtended = *o.Extended + } + qExtended := swag.FormatBool(qrExtended) + if qExtended != "" { + + if err := r.SetQueryParam("extended", qExtended); err != nil { + return err + } + } + } + + if o.GlobalScope != nil { + + // query param globalScope + var qrGlobalScope bool + + if o.GlobalScope != nil { + qrGlobalScope = *o.GlobalScope + } + qGlobalScope := swag.FormatBool(qrGlobalScope) + if qGlobalScope != "" { + + if err := r.SetQueryParam("globalScope", qGlobalScope); err != nil { + return err + } + } + } + + if o.Groups != nil { + + // binding items for groups + joinedGroups := o.bindParamGroups(reg) + + // query array param groups + if err := r.SetQueryParam("groups", joinedGroups...); err != nil { + return err + } + } + + if o.IgnoreScopeDefault != nil { + + // query param ignoreScopeDefault + var qrIgnoreScopeDefault bool + + if o.IgnoreScopeDefault != nil { + qrIgnoreScopeDefault = *o.IgnoreScopeDefault + } + qIgnoreScopeDefault := swag.FormatBool(qrIgnoreScopeDefault) + if qIgnoreScopeDefault != "" { + + if err := r.SetQueryParam("ignoreScopeDefault", qIgnoreScopeDefault); err != nil { + return err + } + } + } + + if o.IsSSOUser != nil { + + // query param isSSOUser + var qrIsSSOUser bool + + if o.IsSSOUser != nil { + qrIsSSOUser = *o.IsSSOUser + } + qIsSSOUser := swag.FormatBool(qrIsSSOUser) + if qIsSSOUser != "" { + + if err := r.SetQueryParam("isSSOUser", qIsSSOUser); err != nil { + return err + } + } + } + + if o.Limit != nil { + + // query param limit + var qrLimit string + + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := qrLimit + if qLimit != "" { + + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + } + + if o.Name != nil { + + // query param name + var qrName string + + if o.Name != nil { + qrName = *o.Name + } + qName := qrName + if qName != "" { + + if err := r.SetQueryParam("name", qName); err != nil { + return err + } + } + } + + if o.Offset != nil { + + // query param offset + var qrOffset string + + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := qrOffset + if qOffset != "" { + + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + } + + if o.Order != nil { + + // query param order + var qrOrder string + + if o.Order != nil { + qrOrder = *o.Order + } + qOrder := qrOrder + if qOrder != "" { + + if err := r.SetQueryParam("order", qOrder); err != nil { + return err + } + } + } + + if o.OrderBy != nil { + + // query param orderBy + var qrOrderBy string + + if o.OrderBy != nil { + qrOrderBy = *o.OrderBy + } + qOrderBy := qrOrderBy + if qOrderBy != "" { + + if err := r.SetQueryParam("orderBy", qOrderBy); err != nil { + return err + } + } + } + + if o.OrganizationID != nil { + + // query param organizationID + var qrOrganizationID string + + if o.OrganizationID != nil { + qrOrganizationID = *o.OrganizationID + } + qOrganizationID := qrOrganizationID + if qOrganizationID != "" { + + if err := r.SetQueryParam("organizationID", qOrganizationID); err != nil { + return err + } + } + } + + if o.PartnerID != nil { + + // query param partnerID + var qrPartnerID string + + if o.PartnerID != nil { + qrPartnerID = *o.PartnerID + } + qPartnerID := qrPartnerID + if qPartnerID != "" { + + if err := r.SetQueryParam("partnerID", qPartnerID); err != nil { + return err + } + } + } + + if o.ProjectID != nil { + + // query param projectID + var qrProjectID string + + if o.ProjectID != nil { + qrProjectID = *o.ProjectID + } + qProjectID := qrProjectID + if qProjectID != "" { + + if err := r.SetQueryParam("projectID", qProjectID); err != nil { + return err + } + } + } + + if o.PublishedVersion != nil { + + // query param publishedVersion + var qrPublishedVersion string + + if o.PublishedVersion != nil { + qrPublishedVersion = *o.PublishedVersion + } + qPublishedVersion := qrPublishedVersion + if qPublishedVersion != "" { + + if err := r.SetQueryParam("publishedVersion", qPublishedVersion); err != nil { + return err + } + } + } + + if o.Selector != nil { + + // query param selector + var qrSelector string + + if o.Selector != nil { + qrSelector = *o.Selector + } + qSelector := qrSelector + if qSelector != "" { + + if err := r.SetQueryParam("selector", qSelector); err != nil { + return err + } + } + } + + // path param urlScope + if err := r.SetPathParam("urlScope", o.URLScope); err != nil { + return err + } + + if o.Username != nil { + + // query param username + var qrUsername string + + if o.Username != nil { + qrUsername = *o.Username + } + qUsername := qrUsername + if qUsername != "" { + + if err := r.SetQueryParam("username", qUsername); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// bindParamOverrideGetOverrides binds the parameter groups +func (o *OverrideGetOverridesParams) bindParamGroups(formats strfmt.Registry) []string { + groupsIR := o.Groups + + var groupsIC []string + for _, groupsIIR := range groupsIR { // explode []string + + groupsIIV := groupsIIR // string as string + groupsIC = append(groupsIC, groupsIIV) + } + + // items.CollectionFormat: "multi" + groupsIS := swag.JoinByFormat(groupsIC, "multi") + + return groupsIS +} diff --git a/components/common/api/def/clients/config/client/override/override_get_overrides_responses.go b/components/common/api/def/clients/config/client/override/override_get_overrides_responses.go new file mode 100644 index 0000000..5686a8f --- /dev/null +++ b/components/common/api/def/clients/config/client/override/override_get_overrides_responses.go @@ -0,0 +1,187 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package override + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/RafaySystems/rcloud-base/components/common/api/def/clients/config/models" +) + +// OverrideGetOverridesReader is a Reader for the OverrideGetOverrides structure. +type OverrideGetOverridesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *OverrideGetOverridesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewOverrideGetOverridesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 403: + result := NewOverrideGetOverridesForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewOverrideGetOverridesNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + result := NewOverrideGetOverridesDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewOverrideGetOverridesOK creates a OverrideGetOverridesOK with default headers values +func NewOverrideGetOverridesOK() *OverrideGetOverridesOK { + return &OverrideGetOverridesOK{} +} + +/* OverrideGetOverridesOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type OverrideGetOverridesOK struct { + Payload *models.ConfigOverrideList +} + +func (o *OverrideGetOverridesOK) Error() string { + return fmt.Sprintf("[GET /v2/config/{urlScope}/override][%d] overrideGetOverridesOK %+v", 200, o.Payload) +} +func (o *OverrideGetOverridesOK) GetPayload() *models.ConfigOverrideList { + return o.Payload +} + +func (o *OverrideGetOverridesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ConfigOverrideList) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewOverrideGetOverridesForbidden creates a OverrideGetOverridesForbidden with default headers values +func NewOverrideGetOverridesForbidden() *OverrideGetOverridesForbidden { + return &OverrideGetOverridesForbidden{} +} + +/* OverrideGetOverridesForbidden describes a response with status code 403, with default header values. + +Returned when the user does not have permission to access the resource. +*/ +type OverrideGetOverridesForbidden struct { + Payload interface{} +} + +func (o *OverrideGetOverridesForbidden) Error() string { + return fmt.Sprintf("[GET /v2/config/{urlScope}/override][%d] overrideGetOverridesForbidden %+v", 403, o.Payload) +} +func (o *OverrideGetOverridesForbidden) GetPayload() interface{} { + return o.Payload +} + +func (o *OverrideGetOverridesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewOverrideGetOverridesNotFound creates a OverrideGetOverridesNotFound with default headers values +func NewOverrideGetOverridesNotFound() *OverrideGetOverridesNotFound { + return &OverrideGetOverridesNotFound{} +} + +/* OverrideGetOverridesNotFound describes a response with status code 404, with default header values. + +Returned when the resource does not exist. +*/ +type OverrideGetOverridesNotFound struct { + Payload string +} + +func (o *OverrideGetOverridesNotFound) Error() string { + return fmt.Sprintf("[GET /v2/config/{urlScope}/override][%d] overrideGetOverridesNotFound %+v", 404, o.Payload) +} +func (o *OverrideGetOverridesNotFound) GetPayload() string { + return o.Payload +} + +func (o *OverrideGetOverridesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewOverrideGetOverridesDefault creates a OverrideGetOverridesDefault with default headers values +func NewOverrideGetOverridesDefault(code int) *OverrideGetOverridesDefault { + return &OverrideGetOverridesDefault{ + _statusCode: code, + } +} + +/* OverrideGetOverridesDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type OverrideGetOverridesDefault struct { + _statusCode int + + Payload *models.GooglerpcStatus +} + +// Code gets the status code for the override get overrides default response +func (o *OverrideGetOverridesDefault) Code() int { + return o._statusCode +} + +func (o *OverrideGetOverridesDefault) Error() string { + return fmt.Sprintf("[GET /v2/config/{urlScope}/override][%d] Override_GetOverrides default %+v", o._statusCode, o.Payload) +} +func (o *OverrideGetOverridesDefault) GetPayload() *models.GooglerpcStatus { + return o.Payload +} + +func (o *OverrideGetOverridesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.GooglerpcStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/components/common/api/def/clients/config/client/override/override_update_override_parameters.go b/components/common/api/def/clients/config/client/override/override_update_override_parameters.go new file mode 100644 index 0000000..53522e3 --- /dev/null +++ b/components/common/api/def/clients/config/client/override/override_update_override_parameters.go @@ -0,0 +1,192 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package override + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/RafaySystems/rcloud-base/components/common/api/def/clients/config/models" +) + +// NewOverrideUpdateOverrideParams creates a new OverrideUpdateOverrideParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewOverrideUpdateOverrideParams() *OverrideUpdateOverrideParams { + return &OverrideUpdateOverrideParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewOverrideUpdateOverrideParamsWithTimeout creates a new OverrideUpdateOverrideParams object +// with the ability to set a timeout on a request. +func NewOverrideUpdateOverrideParamsWithTimeout(timeout time.Duration) *OverrideUpdateOverrideParams { + return &OverrideUpdateOverrideParams{ + timeout: timeout, + } +} + +// NewOverrideUpdateOverrideParamsWithContext creates a new OverrideUpdateOverrideParams object +// with the ability to set a context for a request. +func NewOverrideUpdateOverrideParamsWithContext(ctx context.Context) *OverrideUpdateOverrideParams { + return &OverrideUpdateOverrideParams{ + Context: ctx, + } +} + +// NewOverrideUpdateOverrideParamsWithHTTPClient creates a new OverrideUpdateOverrideParams object +// with the ability to set a custom HTTPClient for a request. +func NewOverrideUpdateOverrideParamsWithHTTPClient(client *http.Client) *OverrideUpdateOverrideParams { + return &OverrideUpdateOverrideParams{ + HTTPClient: client, + } +} + +/* OverrideUpdateOverrideParams contains all the parameters to send to the API endpoint + for the override update override operation. + + Typically these are written to a http.Request. +*/ +type OverrideUpdateOverrideParams struct { + + // Body. + Body *models.ConfigOverride + + /* MetadataName. + + name of the resource + */ + MetadataName string + + /* MetadataProject. + + Project of the resource + */ + MetadataProject string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the override update override params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *OverrideUpdateOverrideParams) WithDefaults() *OverrideUpdateOverrideParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the override update override params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *OverrideUpdateOverrideParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the override update override params +func (o *OverrideUpdateOverrideParams) WithTimeout(timeout time.Duration) *OverrideUpdateOverrideParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the override update override params +func (o *OverrideUpdateOverrideParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the override update override params +func (o *OverrideUpdateOverrideParams) WithContext(ctx context.Context) *OverrideUpdateOverrideParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the override update override params +func (o *OverrideUpdateOverrideParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the override update override params +func (o *OverrideUpdateOverrideParams) WithHTTPClient(client *http.Client) *OverrideUpdateOverrideParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the override update override params +func (o *OverrideUpdateOverrideParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the override update override params +func (o *OverrideUpdateOverrideParams) WithBody(body *models.ConfigOverride) *OverrideUpdateOverrideParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the override update override params +func (o *OverrideUpdateOverrideParams) SetBody(body *models.ConfigOverride) { + o.Body = body +} + +// WithMetadataName adds the metadataName to the override update override params +func (o *OverrideUpdateOverrideParams) WithMetadataName(metadataName string) *OverrideUpdateOverrideParams { + o.SetMetadataName(metadataName) + return o +} + +// SetMetadataName adds the metadataName to the override update override params +func (o *OverrideUpdateOverrideParams) SetMetadataName(metadataName string) { + o.MetadataName = metadataName +} + +// WithMetadataProject adds the metadataProject to the override update override params +func (o *OverrideUpdateOverrideParams) WithMetadataProject(metadataProject string) *OverrideUpdateOverrideParams { + o.SetMetadataProject(metadataProject) + return o +} + +// SetMetadataProject adds the metadataProject to the override update override params +func (o *OverrideUpdateOverrideParams) SetMetadataProject(metadataProject string) { + o.MetadataProject = metadataProject +} + +// WriteToRequest writes these params to a swagger request +func (o *OverrideUpdateOverrideParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param metadata.name + if err := r.SetPathParam("metadata.name", o.MetadataName); err != nil { + return err + } + + // path param metadata.project + if err := r.SetPathParam("metadata.project", o.MetadataProject); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/components/common/api/def/clients/config/client/override/override_update_override_responses.go b/components/common/api/def/clients/config/client/override/override_update_override_responses.go new file mode 100644 index 0000000..f2b6101 --- /dev/null +++ b/components/common/api/def/clients/config/client/override/override_update_override_responses.go @@ -0,0 +1,187 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package override + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/RafaySystems/rcloud-base/components/common/api/def/clients/config/models" +) + +// OverrideUpdateOverrideReader is a Reader for the OverrideUpdateOverride structure. +type OverrideUpdateOverrideReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *OverrideUpdateOverrideReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewOverrideUpdateOverrideOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 403: + result := NewOverrideUpdateOverrideForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewOverrideUpdateOverrideNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + result := NewOverrideUpdateOverrideDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewOverrideUpdateOverrideOK creates a OverrideUpdateOverrideOK with default headers values +func NewOverrideUpdateOverrideOK() *OverrideUpdateOverrideOK { + return &OverrideUpdateOverrideOK{} +} + +/* OverrideUpdateOverrideOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type OverrideUpdateOverrideOK struct { + Payload *models.ConfigOverride +} + +func (o *OverrideUpdateOverrideOK) Error() string { + return fmt.Sprintf("[PUT /v2/config/project/{metadata.project}/override/{metadata.name}][%d] overrideUpdateOverrideOK %+v", 200, o.Payload) +} +func (o *OverrideUpdateOverrideOK) GetPayload() *models.ConfigOverride { + return o.Payload +} + +func (o *OverrideUpdateOverrideOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ConfigOverride) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewOverrideUpdateOverrideForbidden creates a OverrideUpdateOverrideForbidden with default headers values +func NewOverrideUpdateOverrideForbidden() *OverrideUpdateOverrideForbidden { + return &OverrideUpdateOverrideForbidden{} +} + +/* OverrideUpdateOverrideForbidden describes a response with status code 403, with default header values. + +Returned when the user does not have permission to access the resource. +*/ +type OverrideUpdateOverrideForbidden struct { + Payload interface{} +} + +func (o *OverrideUpdateOverrideForbidden) Error() string { + return fmt.Sprintf("[PUT /v2/config/project/{metadata.project}/override/{metadata.name}][%d] overrideUpdateOverrideForbidden %+v", 403, o.Payload) +} +func (o *OverrideUpdateOverrideForbidden) GetPayload() interface{} { + return o.Payload +} + +func (o *OverrideUpdateOverrideForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewOverrideUpdateOverrideNotFound creates a OverrideUpdateOverrideNotFound with default headers values +func NewOverrideUpdateOverrideNotFound() *OverrideUpdateOverrideNotFound { + return &OverrideUpdateOverrideNotFound{} +} + +/* OverrideUpdateOverrideNotFound describes a response with status code 404, with default header values. + +Returned when the resource does not exist. +*/ +type OverrideUpdateOverrideNotFound struct { + Payload string +} + +func (o *OverrideUpdateOverrideNotFound) Error() string { + return fmt.Sprintf("[PUT /v2/config/project/{metadata.project}/override/{metadata.name}][%d] overrideUpdateOverrideNotFound %+v", 404, o.Payload) +} +func (o *OverrideUpdateOverrideNotFound) GetPayload() string { + return o.Payload +} + +func (o *OverrideUpdateOverrideNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewOverrideUpdateOverrideDefault creates a OverrideUpdateOverrideDefault with default headers values +func NewOverrideUpdateOverrideDefault(code int) *OverrideUpdateOverrideDefault { + return &OverrideUpdateOverrideDefault{ + _statusCode: code, + } +} + +/* OverrideUpdateOverrideDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type OverrideUpdateOverrideDefault struct { + _statusCode int + + Payload *models.GooglerpcStatus +} + +// Code gets the status code for the override update override default response +func (o *OverrideUpdateOverrideDefault) Code() int { + return o._statusCode +} + +func (o *OverrideUpdateOverrideDefault) Error() string { + return fmt.Sprintf("[PUT /v2/config/project/{metadata.project}/override/{metadata.name}][%d] Override_UpdateOverride default %+v", o._statusCode, o.Payload) +} +func (o *OverrideUpdateOverrideDefault) GetPayload() *models.GooglerpcStatus { + return o.Payload +} + +func (o *OverrideUpdateOverrideDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.GooglerpcStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/components/common/api/def/clients/config/client/override_service_client.go b/components/common/api/def/clients/config/client/override_service_client.go new file mode 100644 index 0000000..b9bfde1 --- /dev/null +++ b/components/common/api/def/clients/config/client/override_service_client.go @@ -0,0 +1,112 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package client + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/RafaySystems/rcloud-base/components/common/api/def/clients/config/client/override" +) + +// Default override service HTTP client. +var Default = NewHTTPClient(nil) + +const ( + // DefaultHost is the default Host + // found in Meta (info) section of spec file + DefaultHost string = "localhost" + // DefaultBasePath is the default BasePath + // found in Meta (info) section of spec file + DefaultBasePath string = "/" +) + +// DefaultSchemes are the default schemes found in Meta (info) section of spec file +var DefaultSchemes = []string{"https"} + +// NewHTTPClient creates a new override service HTTP client. +func NewHTTPClient(formats strfmt.Registry) *OverrideService { + return NewHTTPClientWithConfig(formats, nil) +} + +// NewHTTPClientWithConfig creates a new override service HTTP client, +// using a customizable transport config. +func NewHTTPClientWithConfig(formats strfmt.Registry, cfg *TransportConfig) *OverrideService { + // ensure nullable parameters have default + if cfg == nil { + cfg = DefaultTransportConfig() + } + + // create transport and client + transport := httptransport.New(cfg.Host, cfg.BasePath, cfg.Schemes) + return New(transport, formats) +} + +// New creates a new override service client +func New(transport runtime.ClientTransport, formats strfmt.Registry) *OverrideService { + // ensure nullable parameters have default + if formats == nil { + formats = strfmt.Default + } + + cli := new(OverrideService) + cli.Transport = transport + cli.Override = override.New(transport, formats) + return cli +} + +// DefaultTransportConfig creates a TransportConfig with the +// default settings taken from the meta section of the spec file. +func DefaultTransportConfig() *TransportConfig { + return &TransportConfig{ + Host: DefaultHost, + BasePath: DefaultBasePath, + Schemes: DefaultSchemes, + } +} + +// TransportConfig contains the transport related info, +// found in the meta section of the spec file. +type TransportConfig struct { + Host string + BasePath string + Schemes []string +} + +// WithHost overrides the default host, +// provided by the meta section of the spec file. +func (cfg *TransportConfig) WithHost(host string) *TransportConfig { + cfg.Host = host + return cfg +} + +// WithBasePath overrides the default basePath, +// provided by the meta section of the spec file. +func (cfg *TransportConfig) WithBasePath(basePath string) *TransportConfig { + cfg.BasePath = basePath + return cfg +} + +// WithSchemes overrides the default schemes, +// provided by the meta section of the spec file. +func (cfg *TransportConfig) WithSchemes(schemes []string) *TransportConfig { + cfg.Schemes = schemes + return cfg +} + +// OverrideService is a client for override service +type OverrideService struct { + Override override.ClientService + + Transport runtime.ClientTransport +} + +// SetTransport changes the transport on the client and all its subresources +func (c *OverrideService) SetTransport(transport runtime.ClientTransport) { + c.Transport = transport + c.Override.SetTransport(transport) +} diff --git a/components/common/api/def/clients/config/models/commonv3_status.go b/components/common/api/def/clients/config/models/commonv3_status.go new file mode 100644 index 0000000..f5e5828 --- /dev/null +++ b/components/common/api/def/clients/config/models/commonv3_status.go @@ -0,0 +1,221 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// Commonv3Status Status +// +// status of a resource +// +// swagger:model commonv3Status +type Commonv3Status struct { + + // Condition Status + // + // status of the condition + // Read Only: true + // Enum: [StatusNotSet StatusSubmitted StatusOK StatusFailed] + ConditionStatus *V3ConditionStatus `json:"conditionStatus,omitempty"` + + // Condition Type + // + // type of the status condition + // Read Only: true + ConditionType string `json:"conditionType,omitempty"` + + // Last Updated + // + // when the condition status is last updated + // Read Only: true + // Format: date-time + LastUpdated strfmt.DateTime `json:"lastUpdated,omitempty"` + + // Reason + // + // reason of the last condition status + // Read Only: true + Reason string `json:"reason,omitempty"` +} + +// Validate validates this commonv3 status +func (m *Commonv3Status) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateConditionStatus(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLastUpdated(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var commonv3StatusTypeConditionStatusPropEnum []interface{} + +func init() { + var res []V3ConditionStatus + if err := json.Unmarshal([]byte(`["StatusNotSet","StatusSubmitted","StatusOK","StatusFailed"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + commonv3StatusTypeConditionStatusPropEnum = append(commonv3StatusTypeConditionStatusPropEnum, v) + } +} + +const ( + + // Commonv3StatusConditionStatusStatusNotSet captures enum value "StatusNotSet" + Commonv3StatusConditionStatusStatusNotSet V3ConditionStatus = "StatusNotSet" + + // Commonv3StatusConditionStatusStatusSubmitted captures enum value "StatusSubmitted" + Commonv3StatusConditionStatusStatusSubmitted V3ConditionStatus = "StatusSubmitted" + + // Commonv3StatusConditionStatusStatusOK captures enum value "StatusOK" + Commonv3StatusConditionStatusStatusOK V3ConditionStatus = "StatusOK" + + // Commonv3StatusConditionStatusStatusFailed captures enum value "StatusFailed" + Commonv3StatusConditionStatusStatusFailed V3ConditionStatus = "StatusFailed" +) + +// prop value enum +func (m *Commonv3Status) validateConditionStatusEnum(path, location string, value V3ConditionStatus) error { + if err := validate.EnumCase(path, location, value, commonv3StatusTypeConditionStatusPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *Commonv3Status) validateConditionStatus(formats strfmt.Registry) error { + if swag.IsZero(m.ConditionStatus) { // not required + return nil + } + + if m.ConditionStatus != nil { + if err := m.ConditionStatus.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("conditionStatus") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("conditionStatus") + } + return err + } + } + + return nil +} + +func (m *Commonv3Status) validateLastUpdated(formats strfmt.Registry) error { + if swag.IsZero(m.LastUpdated) { // not required + return nil + } + + if err := validate.FormatOf("lastUpdated", "body", "date-time", m.LastUpdated.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this commonv3 status based on the context it is used +func (m *Commonv3Status) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateConditionStatus(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateConditionType(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLastUpdated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateReason(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *Commonv3Status) contextValidateConditionStatus(ctx context.Context, formats strfmt.Registry) error { + + if m.ConditionStatus != nil { + if err := m.ConditionStatus.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("conditionStatus") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("conditionStatus") + } + return err + } + } + + return nil +} + +func (m *Commonv3Status) contextValidateConditionType(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "conditionType", "body", string(m.ConditionType)); err != nil { + return err + } + + return nil +} + +func (m *Commonv3Status) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "lastUpdated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + return err + } + + return nil +} + +func (m *Commonv3Status) contextValidateReason(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "reason", "body", string(m.Reason)); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *Commonv3Status) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Commonv3Status) UnmarshalBinary(b []byte) error { + var res Commonv3Status + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/config_drift_reconcillation_action.go b/components/common/api/def/clients/config/models/config_drift_reconcillation_action.go new file mode 100644 index 0000000..33f7bdf --- /dev/null +++ b/components/common/api/def/clients/config/models/config_drift_reconcillation_action.go @@ -0,0 +1,81 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" +) + +// ConfigDriftReconcillationAction config drift reconcillation action +// +// swagger:model configDriftReconcillationAction +type ConfigDriftReconcillationAction string + +func NewConfigDriftReconcillationAction(value ConfigDriftReconcillationAction) *ConfigDriftReconcillationAction { + return &value +} + +// Pointer returns a pointer to a freshly-allocated ConfigDriftReconcillationAction. +func (m ConfigDriftReconcillationAction) Pointer() *ConfigDriftReconcillationAction { + return &m +} + +const ( + + // ConfigDriftReconcillationActionDriftReconcillationActionNotSet captures enum value "DriftReconcillationActionNotSet" + ConfigDriftReconcillationActionDriftReconcillationActionNotSet ConfigDriftReconcillationAction = "DriftReconcillationActionNotSet" + + // ConfigDriftReconcillationActionDriftReconcillationActionNotify captures enum value "DriftReconcillationActionNotify" + ConfigDriftReconcillationActionDriftReconcillationActionNotify ConfigDriftReconcillationAction = "DriftReconcillationActionNotify" + + // ConfigDriftReconcillationActionDriftReconcillationActionDeny captures enum value "DriftReconcillationActionDeny" + ConfigDriftReconcillationActionDriftReconcillationActionDeny ConfigDriftReconcillationAction = "DriftReconcillationActionDeny" +) + +// for schema +var configDriftReconcillationActionEnum []interface{} + +func init() { + var res []ConfigDriftReconcillationAction + if err := json.Unmarshal([]byte(`["DriftReconcillationActionNotSet","DriftReconcillationActionNotify","DriftReconcillationActionDeny"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + configDriftReconcillationActionEnum = append(configDriftReconcillationActionEnum, v) + } +} + +func (m ConfigDriftReconcillationAction) validateConfigDriftReconcillationActionEnum(path, location string, value ConfigDriftReconcillationAction) error { + if err := validate.EnumCase(path, location, value, configDriftReconcillationActionEnum, true); err != nil { + return err + } + return nil +} + +// Validate validates this config drift reconcillation action +func (m ConfigDriftReconcillationAction) Validate(formats strfmt.Registry) error { + var res []error + + // value enum + if err := m.validateConfigDriftReconcillationActionEnum("", "body", m); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// ContextValidate validates this config drift reconcillation action based on context it is used +func (m ConfigDriftReconcillationAction) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} diff --git a/components/common/api/def/clients/config/models/config_file_type.go b/components/common/api/def/clients/config/models/config_file_type.go new file mode 100644 index 0000000..9afc45e --- /dev/null +++ b/components/common/api/def/clients/config/models/config_file_type.go @@ -0,0 +1,87 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" +) + +// ConfigFileType config file type +// +// swagger:model configFileType +type ConfigFileType string + +func NewConfigFileType(value ConfigFileType) *ConfigFileType { + return &value +} + +// Pointer returns a pointer to a freshly-allocated ConfigFileType. +func (m ConfigFileType) Pointer() *ConfigFileType { + return &m +} + +const ( + + // ConfigFileTypeFileTypeNotSet captures enum value "FileTypeNotSet" + ConfigFileTypeFileTypeNotSet ConfigFileType = "FileTypeNotSet" + + // ConfigFileTypeK8sYAMLFile captures enum value "K8sYAMLFile" + ConfigFileTypeK8sYAMLFile ConfigFileType = "K8sYAMLFile" + + // ConfigFileTypeHelmChartFile captures enum value "HelmChartFile" + ConfigFileTypeHelmChartFile ConfigFileType = "HelmChartFile" + + // ConfigFileTypeHelmValuesFile captures enum value "HelmValuesFile" + ConfigFileTypeHelmValuesFile ConfigFileType = "HelmValuesFile" + + // ConfigFileTypeJSONFile captures enum value "JSONFile" + ConfigFileTypeJSONFile ConfigFileType = "JSONFile" +) + +// for schema +var configFileTypeEnum []interface{} + +func init() { + var res []ConfigFileType + if err := json.Unmarshal([]byte(`["FileTypeNotSet","K8sYAMLFile","HelmChartFile","HelmValuesFile","JSONFile"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + configFileTypeEnum = append(configFileTypeEnum, v) + } +} + +func (m ConfigFileType) validateConfigFileTypeEnum(path, location string, value ConfigFileType) error { + if err := validate.EnumCase(path, location, value, configFileTypeEnum, true); err != nil { + return err + } + return nil +} + +// Validate validates this config file type +func (m ConfigFileType) Validate(formats strfmt.Registry) error { + var res []error + + // value enum + if err := m.validateConfigFileTypeEnum("", "body", m); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// ContextValidate validates this config file type based on context it is used +func (m ConfigFileType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} diff --git a/components/common/api/def/clients/config/models/config_git_options.go b/components/common/api/def/clients/config/models/config_git_options.go new file mode 100644 index 0000000..6f90386 --- /dev/null +++ b/components/common/api/def/clients/config/models/config_git_options.go @@ -0,0 +1,119 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// ConfigGitOptions config git options +// +// swagger:model configGitOptions +type ConfigGitOptions struct { + + // repo artifact files + RepoArtifactFiles []*ConfigRepoFile `json:"repoArtifactFiles"` + + // revision + Revision string `json:"revision,omitempty"` +} + +// Validate validates this config git options +func (m *ConfigGitOptions) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateRepoArtifactFiles(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ConfigGitOptions) validateRepoArtifactFiles(formats strfmt.Registry) error { + if swag.IsZero(m.RepoArtifactFiles) { // not required + return nil + } + + for i := 0; i < len(m.RepoArtifactFiles); i++ { + if swag.IsZero(m.RepoArtifactFiles[i]) { // not required + continue + } + + if m.RepoArtifactFiles[i] != nil { + if err := m.RepoArtifactFiles[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("repoArtifactFiles" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("repoArtifactFiles" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this config git options based on the context it is used +func (m *ConfigGitOptions) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateRepoArtifactFiles(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ConfigGitOptions) contextValidateRepoArtifactFiles(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.RepoArtifactFiles); i++ { + + if m.RepoArtifactFiles[i] != nil { + if err := m.RepoArtifactFiles[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("repoArtifactFiles" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("repoArtifactFiles" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ConfigGitOptions) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ConfigGitOptions) UnmarshalBinary(b []byte) error { + var res ConfigGitOptions + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/config_helm_options.go b/components/common/api/def/clients/config/models/config_helm_options.go new file mode 100644 index 0000000..e0fdcce --- /dev/null +++ b/components/common/api/def/clients/config/models/config_helm_options.go @@ -0,0 +1,53 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// ConfigHelmOptions config helm options +// +// swagger:model configHelmOptions +type ConfigHelmOptions struct { + + // chart name + ChartName string `json:"chartName,omitempty"` + + // tag + Tag string `json:"tag,omitempty"` +} + +// Validate validates this config helm options +func (m *ConfigHelmOptions) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this config helm options based on context it is used +func (m *ConfigHelmOptions) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *ConfigHelmOptions) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ConfigHelmOptions) UnmarshalBinary(b []byte) error { + var res ConfigHelmOptions + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/config_namespace_template.go b/components/common/api/def/clients/config/models/config_namespace_template.go new file mode 100644 index 0000000..9ed11bd --- /dev/null +++ b/components/common/api/def/clients/config/models/config_namespace_template.go @@ -0,0 +1,346 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// ConfigNamespaceTemplate NamespaceTemplate is the template for creating namespace +// +// swagger:model configNamespaceTemplate +type ConfigNamespaceTemplate struct { + + // limit range + LimitRange *TypesconfigLimitRange `json:"limitRange,omitempty"` + + // namespace from file + NamespaceFromFile string `json:"namespaceFromFile,omitempty"` + + // namespace from repo + NamespaceFromRepo string `json:"namespaceFromRepo,omitempty"` + + // object meta + ObjectMeta *V1ObjectMeta `json:"objectMeta,omitempty"` + + // placement + Placement *TypesconfigPlacementSpec `json:"placement,omitempty"` + + // repo artifact meta + RepoArtifactMeta *ConfigRepoArtifactMeta `json:"repoArtifactMeta,omitempty"` + + // repo ref + RepoRef string `json:"repoRef,omitempty"` + + // resource quota + ResourceQuota *TypesconfigResourceQuota `json:"resourceQuota,omitempty"` + + // spec + Spec *TypescontrollerNamespaceSpec `json:"spec,omitempty"` + + // type + Type string `json:"type,omitempty"` +} + +// Validate validates this config namespace template +func (m *ConfigNamespaceTemplate) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLimitRange(formats); err != nil { + res = append(res, err) + } + + if err := m.validateObjectMeta(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePlacement(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRepoArtifactMeta(formats); err != nil { + res = append(res, err) + } + + if err := m.validateResourceQuota(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ConfigNamespaceTemplate) validateLimitRange(formats strfmt.Registry) error { + if swag.IsZero(m.LimitRange) { // not required + return nil + } + + if m.LimitRange != nil { + if err := m.LimitRange.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("limitRange") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("limitRange") + } + return err + } + } + + return nil +} + +func (m *ConfigNamespaceTemplate) validateObjectMeta(formats strfmt.Registry) error { + if swag.IsZero(m.ObjectMeta) { // not required + return nil + } + + if m.ObjectMeta != nil { + if err := m.ObjectMeta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("objectMeta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("objectMeta") + } + return err + } + } + + return nil +} + +func (m *ConfigNamespaceTemplate) validatePlacement(formats strfmt.Registry) error { + if swag.IsZero(m.Placement) { // not required + return nil + } + + if m.Placement != nil { + if err := m.Placement.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("placement") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("placement") + } + return err + } + } + + return nil +} + +func (m *ConfigNamespaceTemplate) validateRepoArtifactMeta(formats strfmt.Registry) error { + if swag.IsZero(m.RepoArtifactMeta) { // not required + return nil + } + + if m.RepoArtifactMeta != nil { + if err := m.RepoArtifactMeta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("repoArtifactMeta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("repoArtifactMeta") + } + return err + } + } + + return nil +} + +func (m *ConfigNamespaceTemplate) validateResourceQuota(formats strfmt.Registry) error { + if swag.IsZero(m.ResourceQuota) { // not required + return nil + } + + if m.ResourceQuota != nil { + if err := m.ResourceQuota.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resourceQuota") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resourceQuota") + } + return err + } + } + + return nil +} + +func (m *ConfigNamespaceTemplate) validateSpec(formats strfmt.Registry) error { + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("spec") + } + return err + } + } + + return nil +} + +// ContextValidate validate this config namespace template based on the context it is used +func (m *ConfigNamespaceTemplate) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateLimitRange(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateObjectMeta(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidatePlacement(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateRepoArtifactMeta(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateResourceQuota(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateSpec(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ConfigNamespaceTemplate) contextValidateLimitRange(ctx context.Context, formats strfmt.Registry) error { + + if m.LimitRange != nil { + if err := m.LimitRange.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("limitRange") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("limitRange") + } + return err + } + } + + return nil +} + +func (m *ConfigNamespaceTemplate) contextValidateObjectMeta(ctx context.Context, formats strfmt.Registry) error { + + if m.ObjectMeta != nil { + if err := m.ObjectMeta.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("objectMeta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("objectMeta") + } + return err + } + } + + return nil +} + +func (m *ConfigNamespaceTemplate) contextValidatePlacement(ctx context.Context, formats strfmt.Registry) error { + + if m.Placement != nil { + if err := m.Placement.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("placement") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("placement") + } + return err + } + } + + return nil +} + +func (m *ConfigNamespaceTemplate) contextValidateRepoArtifactMeta(ctx context.Context, formats strfmt.Registry) error { + + if m.RepoArtifactMeta != nil { + if err := m.RepoArtifactMeta.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("repoArtifactMeta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("repoArtifactMeta") + } + return err + } + } + + return nil +} + +func (m *ConfigNamespaceTemplate) contextValidateResourceQuota(ctx context.Context, formats strfmt.Registry) error { + + if m.ResourceQuota != nil { + if err := m.ResourceQuota.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resourceQuota") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resourceQuota") + } + return err + } + } + + return nil +} + +func (m *ConfigNamespaceTemplate) contextValidateSpec(ctx context.Context, formats strfmt.Registry) error { + + if m.Spec != nil { + if err := m.Spec.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ConfigNamespaceTemplate) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ConfigNamespaceTemplate) UnmarshalBinary(b []byte) error { + var res ConfigNamespaceTemplate + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/config_override.go b/components/common/api/def/clients/config/models/config_override.go new file mode 100644 index 0000000..8cf575a --- /dev/null +++ b/components/common/api/def/clients/config/models/config_override.go @@ -0,0 +1,274 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// ConfigOverride Override +// +// Override +// +// swagger:model configOverride +type ConfigOverride struct { + + // API Version + // + // API Version of the resource + // Required: true + // Read Only: true + APIVersion string `json:"apiVersion"` + + // Kind + // + // Kind of the resource + // Required: true + // Read Only: true + Kind string `json:"kind"` + + // Metadata + // + // Metadata of the resource + // Required: true + Metadata *V3Metadata `json:"metadata"` + + // spec + // Required: true + Spec *ConfigOverrideSpec `json:"spec"` + + // Status + // + // Status of the resource + // Read Only: true + Status *Commonv3Status `json:"status,omitempty"` +} + +// Validate validates this config override +func (m *ConfigOverride) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAPIVersion(formats); err != nil { + res = append(res, err) + } + + if err := m.validateKind(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ConfigOverride) validateAPIVersion(formats strfmt.Registry) error { + + if err := validate.RequiredString("apiVersion", "body", m.APIVersion); err != nil { + return err + } + + return nil +} + +func (m *ConfigOverride) validateKind(formats strfmt.Registry) error { + + if err := validate.RequiredString("kind", "body", m.Kind); err != nil { + return err + } + + return nil +} + +func (m *ConfigOverride) validateMetadata(formats strfmt.Registry) error { + + if err := validate.Required("metadata", "body", m.Metadata); err != nil { + return err + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *ConfigOverride) validateSpec(formats strfmt.Registry) error { + + if err := validate.Required("spec", "body", m.Spec); err != nil { + return err + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *ConfigOverride) validateStatus(formats strfmt.Registry) error { + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("status") + } + return err + } + } + + return nil +} + +// ContextValidate validate this config override based on the context it is used +func (m *ConfigOverride) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateAPIVersion(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateKind(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateMetadata(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateSpec(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateStatus(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ConfigOverride) contextValidateAPIVersion(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "apiVersion", "body", string(m.APIVersion)); err != nil { + return err + } + + return nil +} + +func (m *ConfigOverride) contextValidateKind(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "kind", "body", string(m.Kind)); err != nil { + return err + } + + return nil +} + +func (m *ConfigOverride) contextValidateMetadata(ctx context.Context, formats strfmt.Registry) error { + + if m.Metadata != nil { + if err := m.Metadata.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *ConfigOverride) contextValidateSpec(ctx context.Context, formats strfmt.Registry) error { + + if m.Spec != nil { + if err := m.Spec.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *ConfigOverride) contextValidateStatus(ctx context.Context, formats strfmt.Registry) error { + + if m.Status != nil { + if err := m.Status.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ConfigOverride) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ConfigOverride) UnmarshalBinary(b []byte) error { + var res ConfigOverride + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/config_override_list.go b/components/common/api/def/clients/config/models/config_override_list.go new file mode 100644 index 0000000..ca935a3 --- /dev/null +++ b/components/common/api/def/clients/config/models/config_override_list.go @@ -0,0 +1,204 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// ConfigOverrideList OverrideList is a list of overrides +// +// swagger:model configOverrideList +type ConfigOverrideList struct { + + // API Version + // + // API Version of the list resource + // Read Only: true + APIVersion string `json:"apiVersion,omitempty"` + + // items + Items []*ConfigOverride `json:"items"` + + // Kind + // + // Kind of the list resource + // Read Only: true + Kind string `json:"kind,omitempty"` + + // ListMetadata + // + // Metadata of the list resource + // Read Only: true + Metadata *V3ListMetadata `json:"metadata,omitempty"` +} + +// Validate validates this config override list +func (m *ConfigOverrideList) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ConfigOverrideList) validateItems(formats strfmt.Registry) error { + if swag.IsZero(m.Items) { // not required + return nil + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *ConfigOverrideList) validateMetadata(formats strfmt.Registry) error { + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("metadata") + } + return err + } + } + + return nil +} + +// ContextValidate validate this config override list based on the context it is used +func (m *ConfigOverrideList) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateAPIVersion(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateItems(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateKind(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateMetadata(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ConfigOverrideList) contextValidateAPIVersion(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "apiVersion", "body", string(m.APIVersion)); err != nil { + return err + } + + return nil +} + +func (m *ConfigOverrideList) contextValidateItems(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Items); i++ { + + if m.Items[i] != nil { + if err := m.Items[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *ConfigOverrideList) contextValidateKind(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "kind", "body", string(m.Kind)); err != nil { + return err + } + + return nil +} + +func (m *ConfigOverrideList) contextValidateMetadata(ctx context.Context, formats strfmt.Registry) error { + + if m.Metadata != nil { + if err := m.Metadata.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("metadata") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ConfigOverrideList) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ConfigOverrideList) UnmarshalBinary(b []byte) error { + var res ConfigOverrideList + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/config_override_spec.go b/components/common/api/def/clients/config/models/config_override_spec.go new file mode 100644 index 0000000..37c121f --- /dev/null +++ b/components/common/api/def/clients/config/models/config_override_spec.go @@ -0,0 +1,267 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// ConfigOverrideSpec OverrideSpec is the specification of override +// +// swagger:model configOverrideSpec +type ConfigOverrideSpec struct { + + // cluster placement + ClusterPlacement *TypesconfigPlacementSpec `json:"clusterPlacement,omitempty"` + + // cluster selector + ClusterSelector string `json:"clusterSelector,omitempty"` + + // overrides is list of objects to be overriden + Overrides []*ControllerStepObject `json:"overrides"` + + // repo artifact meta + RepoArtifactMeta *ConfigRepoArtifactMeta `json:"repoArtifactMeta,omitempty"` + + // repository ref + RepositoryRef string `json:"repositoryRef,omitempty"` + + // an override is only applied if selector matches the taskset/namespace + // labels + ResourceSelector string `json:"resourceSelector,omitempty"` + + // template overrides + TemplateOverrides *ConfigTemplateOverrides `json:"templateOverrides,omitempty"` + + // values file + ValuesFile string `json:"valuesFile,omitempty"` +} + +// Validate validates this config override spec +func (m *ConfigOverrideSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusterPlacement(formats); err != nil { + res = append(res, err) + } + + if err := m.validateOverrides(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRepoArtifactMeta(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTemplateOverrides(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ConfigOverrideSpec) validateClusterPlacement(formats strfmt.Registry) error { + if swag.IsZero(m.ClusterPlacement) { // not required + return nil + } + + if m.ClusterPlacement != nil { + if err := m.ClusterPlacement.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterPlacement") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("clusterPlacement") + } + return err + } + } + + return nil +} + +func (m *ConfigOverrideSpec) validateOverrides(formats strfmt.Registry) error { + if swag.IsZero(m.Overrides) { // not required + return nil + } + + for i := 0; i < len(m.Overrides); i++ { + if swag.IsZero(m.Overrides[i]) { // not required + continue + } + + if m.Overrides[i] != nil { + if err := m.Overrides[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("overrides" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("overrides" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *ConfigOverrideSpec) validateRepoArtifactMeta(formats strfmt.Registry) error { + if swag.IsZero(m.RepoArtifactMeta) { // not required + return nil + } + + if m.RepoArtifactMeta != nil { + if err := m.RepoArtifactMeta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("repoArtifactMeta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("repoArtifactMeta") + } + return err + } + } + + return nil +} + +func (m *ConfigOverrideSpec) validateTemplateOverrides(formats strfmt.Registry) error { + if swag.IsZero(m.TemplateOverrides) { // not required + return nil + } + + if m.TemplateOverrides != nil { + if err := m.TemplateOverrides.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("templateOverrides") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("templateOverrides") + } + return err + } + } + + return nil +} + +// ContextValidate validate this config override spec based on the context it is used +func (m *ConfigOverrideSpec) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateClusterPlacement(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateOverrides(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateRepoArtifactMeta(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateTemplateOverrides(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ConfigOverrideSpec) contextValidateClusterPlacement(ctx context.Context, formats strfmt.Registry) error { + + if m.ClusterPlacement != nil { + if err := m.ClusterPlacement.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterPlacement") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("clusterPlacement") + } + return err + } + } + + return nil +} + +func (m *ConfigOverrideSpec) contextValidateOverrides(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Overrides); i++ { + + if m.Overrides[i] != nil { + if err := m.Overrides[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("overrides" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("overrides" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *ConfigOverrideSpec) contextValidateRepoArtifactMeta(ctx context.Context, formats strfmt.Registry) error { + + if m.RepoArtifactMeta != nil { + if err := m.RepoArtifactMeta.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("repoArtifactMeta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("repoArtifactMeta") + } + return err + } + } + + return nil +} + +func (m *ConfigOverrideSpec) contextValidateTemplateOverrides(ctx context.Context, formats strfmt.Registry) error { + + if m.TemplateOverrides != nil { + if err := m.TemplateOverrides.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("templateOverrides") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("templateOverrides") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ConfigOverrideSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ConfigOverrideSpec) UnmarshalBinary(b []byte) error { + var res ConfigOverrideSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/config_placement_type.go b/components/common/api/def/clients/config/models/config_placement_type.go new file mode 100644 index 0000000..77baa3c --- /dev/null +++ b/components/common/api/def/clients/config/models/config_placement_type.go @@ -0,0 +1,84 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" +) + +// ConfigPlacementType config placement type +// +// swagger:model configPlacementType +type ConfigPlacementType string + +func NewConfigPlacementType(value ConfigPlacementType) *ConfigPlacementType { + return &value +} + +// Pointer returns a pointer to a freshly-allocated ConfigPlacementType. +func (m ConfigPlacementType) Pointer() *ConfigPlacementType { + return &m +} + +const ( + + // ConfigPlacementTypeClusterSelector captures enum value "ClusterSelector" + ConfigPlacementTypeClusterSelector ConfigPlacementType = "ClusterSelector" + + // ConfigPlacementTypeClusterLocations captures enum value "ClusterLocations" + ConfigPlacementTypeClusterLocations ConfigPlacementType = "ClusterLocations" + + // ConfigPlacementTypeClusterLabels captures enum value "ClusterLabels" + ConfigPlacementTypeClusterLabels ConfigPlacementType = "ClusterLabels" + + // ConfigPlacementTypeClusterSpecific captures enum value "ClusterSpecific" + ConfigPlacementTypeClusterSpecific ConfigPlacementType = "ClusterSpecific" +) + +// for schema +var configPlacementTypeEnum []interface{} + +func init() { + var res []ConfigPlacementType + if err := json.Unmarshal([]byte(`["ClusterSelector","ClusterLocations","ClusterLabels","ClusterSpecific"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + configPlacementTypeEnum = append(configPlacementTypeEnum, v) + } +} + +func (m ConfigPlacementType) validateConfigPlacementTypeEnum(path, location string, value ConfigPlacementType) error { + if err := validate.EnumCase(path, location, value, configPlacementTypeEnum, true); err != nil { + return err + } + return nil +} + +// Validate validates this config placement type +func (m ConfigPlacementType) Validate(formats strfmt.Registry) error { + var res []error + + // value enum + if err := m.validateConfigPlacementTypeEnum("", "body", m); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// ContextValidate validates this config placement type based on context it is used +func (m ConfigPlacementType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} diff --git a/components/common/api/def/clients/config/models/config_repo_artifact_meta.go b/components/common/api/def/clients/config/models/config_repo_artifact_meta.go new file mode 100644 index 0000000..3548fef --- /dev/null +++ b/components/common/api/def/clients/config/models/config_repo_artifact_meta.go @@ -0,0 +1,153 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// ConfigRepoArtifactMeta config repo artifact meta +// +// swagger:model configRepoArtifactMeta +type ConfigRepoArtifactMeta struct { + + // git + Git *ConfigGitOptions `json:"git,omitempty"` + + // helm + Helm *ConfigHelmOptions `json:"helm,omitempty"` + + // timeout + Timeout string `json:"timeout,omitempty"` +} + +// Validate validates this config repo artifact meta +func (m *ConfigRepoArtifactMeta) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateGit(formats); err != nil { + res = append(res, err) + } + + if err := m.validateHelm(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ConfigRepoArtifactMeta) validateGit(formats strfmt.Registry) error { + if swag.IsZero(m.Git) { // not required + return nil + } + + if m.Git != nil { + if err := m.Git.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("git") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("git") + } + return err + } + } + + return nil +} + +func (m *ConfigRepoArtifactMeta) validateHelm(formats strfmt.Registry) error { + if swag.IsZero(m.Helm) { // not required + return nil + } + + if m.Helm != nil { + if err := m.Helm.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("helm") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("helm") + } + return err + } + } + + return nil +} + +// ContextValidate validate this config repo artifact meta based on the context it is used +func (m *ConfigRepoArtifactMeta) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateGit(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateHelm(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ConfigRepoArtifactMeta) contextValidateGit(ctx context.Context, formats strfmt.Registry) error { + + if m.Git != nil { + if err := m.Git.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("git") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("git") + } + return err + } + } + + return nil +} + +func (m *ConfigRepoArtifactMeta) contextValidateHelm(ctx context.Context, formats strfmt.Registry) error { + + if m.Helm != nil { + if err := m.Helm.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("helm") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("helm") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ConfigRepoArtifactMeta) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ConfigRepoArtifactMeta) UnmarshalBinary(b []byte) error { + var res ConfigRepoArtifactMeta + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/config_repo_file.go b/components/common/api/def/clients/config/models/config_repo_file.go new file mode 100644 index 0000000..0cde5f9 --- /dev/null +++ b/components/common/api/def/clients/config/models/config_repo_file.go @@ -0,0 +1,110 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// ConfigRepoFile config repo file +// +// swagger:model configRepoFile +type ConfigRepoFile struct { + + // file type + FileType *ConfigFileType `json:"fileType,omitempty"` + + // name + Name string `json:"name,omitempty"` + + // rel path + RelPath string `json:"relPath,omitempty"` +} + +// Validate validates this config repo file +func (m *ConfigRepoFile) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateFileType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ConfigRepoFile) validateFileType(formats strfmt.Registry) error { + if swag.IsZero(m.FileType) { // not required + return nil + } + + if m.FileType != nil { + if err := m.FileType.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("fileType") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("fileType") + } + return err + } + } + + return nil +} + +// ContextValidate validate this config repo file based on the context it is used +func (m *ConfigRepoFile) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateFileType(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ConfigRepoFile) contextValidateFileType(ctx context.Context, formats strfmt.Registry) error { + + if m.FileType != nil { + if err := m.FileType.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("fileType") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("fileType") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ConfigRepoFile) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ConfigRepoFile) UnmarshalBinary(b []byte) error { + var res ConfigRepoFile + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/config_template_overrides.go b/components/common/api/def/clients/config/models/config_template_overrides.go new file mode 100644 index 0000000..6be7f86 --- /dev/null +++ b/components/common/api/def/clients/config/models/config_template_overrides.go @@ -0,0 +1,98 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// ConfigTemplateOverrides config template overrides +// +// swagger:model configTemplateOverrides +type ConfigTemplateOverrides struct { + + // v2 event framework f q d n + V2EventFrameworkFQDN string `json:"V2EventFrameworkFQDN,omitempty"` + + // cluster name + ClusterName string `json:"clusterName,omitempty"` + + // org display name + OrgDisplayName string `json:"orgDisplayName,omitempty"` + + // organization hash + OrganizationHash string `json:"organizationHash,omitempty"` + + // organization ID + OrganizationID string `json:"organizationID,omitempty"` + + // partner display name + PartnerDisplayName string `json:"partnerDisplayName,omitempty"` + + // partner hash + PartnerHash string `json:"partnerHash,omitempty"` + + // partner ID + PartnerID string `json:"partnerID,omitempty"` + + // project ID + ProjectID string `json:"projectID,omitempty"` + + // proxy URL + ProxyURL string `json:"proxyURL,omitempty"` + + // v1 deployment env + V1DeploymentEnv string `json:"v1DeploymentEnv,omitempty"` + + // v1 edge display name + V1EdgeDisplayName string `json:"v1EdgeDisplayName,omitempty"` + + // v1 edge ID + V1EdgeID string `json:"v1EdgeID,omitempty"` + + // v1 fluentd aggregator addr + V1FluentdAggregatorAddr string `json:"v1FluentdAggregatorAddr,omitempty"` + + // v1 influx d b f q d n + V1InfluxDBFQDN string `json:"v1InfluxDBFQDN,omitempty"` + + // v1 influx d b password + V1InfluxDBPassword string `json:"v1InfluxDBPassword,omitempty"` + + // v1 promethues relay f q d n + V1PromethuesRelayFQDN string `json:"v1PromethuesRelayFQDN,omitempty"` +} + +// Validate validates this config template overrides +func (m *ConfigTemplateOverrides) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this config template overrides based on context it is used +func (m *ConfigTemplateOverrides) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *ConfigTemplateOverrides) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ConfigTemplateOverrides) UnmarshalBinary(b []byte) error { + var res ConfigTemplateOverrides + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/controller_step_object.go b/components/common/api/def/clients/config/models/controller_step_object.go new file mode 100644 index 0000000..29dd584 --- /dev/null +++ b/components/common/api/def/clients/config/models/controller_step_object.go @@ -0,0 +1,112 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// ControllerStepObject +kubebuilder:object:generate=true +// StepObject can represent any kubernetes object +// +// swagger:model controllerStepObject +type ControllerStepObject struct { + + // name + Name string `json:"name,omitempty"` + + // raw + // Format: byte + Raw strfmt.Base64 `json:"raw,omitempty"` + + // type meta + TypeMeta *Metav1TypeMeta `json:"typeMeta,omitempty"` +} + +// Validate validates this controller step object +func (m *ControllerStepObject) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateTypeMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ControllerStepObject) validateTypeMeta(formats strfmt.Registry) error { + if swag.IsZero(m.TypeMeta) { // not required + return nil + } + + if m.TypeMeta != nil { + if err := m.TypeMeta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("typeMeta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("typeMeta") + } + return err + } + } + + return nil +} + +// ContextValidate validate this controller step object based on the context it is used +func (m *ControllerStepObject) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateTypeMeta(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ControllerStepObject) contextValidateTypeMeta(ctx context.Context, formats strfmt.Registry) error { + + if m.TypeMeta != nil { + if err := m.TypeMeta.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("typeMeta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("typeMeta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ControllerStepObject) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ControllerStepObject) UnmarshalBinary(b []byte) error { + var res ControllerStepObject + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/controller_step_template.go b/components/common/api/def/clients/config/models/controller_step_template.go new file mode 100644 index 0000000..b996834 --- /dev/null +++ b/components/common/api/def/clients/config/models/controller_step_template.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// ControllerStepTemplate +kubebuilder:object:generate=true +// StepTemplate is the description of a step +// +// swagger:model controllerStepTemplate +type ControllerStepTemplate struct { + + // job template + JobTemplate *V1beta1JobTemplateSpec `json:"jobTemplate,omitempty"` + + // name + Name string `json:"name,omitempty"` + + // object + Object *ControllerStepObject `json:"object,omitempty"` + + // on failed + OnFailed string `json:"onFailed,omitempty"` +} + +// Validate validates this controller step template +func (m *ControllerStepTemplate) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateJobTemplate(formats); err != nil { + res = append(res, err) + } + + if err := m.validateObject(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ControllerStepTemplate) validateJobTemplate(formats strfmt.Registry) error { + if swag.IsZero(m.JobTemplate) { // not required + return nil + } + + if m.JobTemplate != nil { + if err := m.JobTemplate.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("jobTemplate") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("jobTemplate") + } + return err + } + } + + return nil +} + +func (m *ControllerStepTemplate) validateObject(formats strfmt.Registry) error { + if swag.IsZero(m.Object) { // not required + return nil + } + + if m.Object != nil { + if err := m.Object.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("object") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("object") + } + return err + } + } + + return nil +} + +// ContextValidate validate this controller step template based on the context it is used +func (m *ControllerStepTemplate) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateJobTemplate(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateObject(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ControllerStepTemplate) contextValidateJobTemplate(ctx context.Context, formats strfmt.Registry) error { + + if m.JobTemplate != nil { + if err := m.JobTemplate.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("jobTemplate") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("jobTemplate") + } + return err + } + } + + return nil +} + +func (m *ControllerStepTemplate) contextValidateObject(ctx context.Context, formats strfmt.Registry) error { + + if m.Object != nil { + if err := m.Object.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("object") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("object") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ControllerStepTemplate) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ControllerStepTemplate) UnmarshalBinary(b []byte) error { + var res ControllerStepTemplate + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/corev1_resource_requirements.go b/components/common/api/def/clients/config/models/corev1_resource_requirements.go new file mode 100644 index 0000000..af1be73 --- /dev/null +++ b/components/common/api/def/clients/config/models/corev1_resource_requirements.go @@ -0,0 +1,169 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// Corev1ResourceRequirements ResourceRequirements describes the compute resource requirements. +// +// swagger:model corev1ResourceRequirements +type Corev1ResourceRequirements struct { + + // Limits describes the maximum amount of compute resources allowed. + // More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + // +optional + Limits map[string]ResourceQuantity `json:"limits,omitempty"` + + // Requests describes the minimum amount of compute resources required. + // If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, + // otherwise to an implementation-defined value. + // More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + // +optional + Requests map[string]ResourceQuantity `json:"requests,omitempty"` +} + +// Validate validates this corev1 resource requirements +func (m *Corev1ResourceRequirements) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLimits(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRequests(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *Corev1ResourceRequirements) validateLimits(formats strfmt.Registry) error { + if swag.IsZero(m.Limits) { // not required + return nil + } + + for k := range m.Limits { + + if err := validate.Required("limits"+"."+k, "body", m.Limits[k]); err != nil { + return err + } + if val, ok := m.Limits[k]; ok { + if err := val.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("limits" + "." + k) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("limits" + "." + k) + } + return err + } + } + + } + + return nil +} + +func (m *Corev1ResourceRequirements) validateRequests(formats strfmt.Registry) error { + if swag.IsZero(m.Requests) { // not required + return nil + } + + for k := range m.Requests { + + if err := validate.Required("requests"+"."+k, "body", m.Requests[k]); err != nil { + return err + } + if val, ok := m.Requests[k]; ok { + if err := val.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("requests" + "." + k) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("requests" + "." + k) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this corev1 resource requirements based on the context it is used +func (m *Corev1ResourceRequirements) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateLimits(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateRequests(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *Corev1ResourceRequirements) contextValidateLimits(ctx context.Context, formats strfmt.Registry) error { + + for k := range m.Limits { + + if val, ok := m.Limits[k]; ok { + if err := val.ContextValidate(ctx, formats); err != nil { + return err + } + } + + } + + return nil +} + +func (m *Corev1ResourceRequirements) contextValidateRequests(ctx context.Context, formats strfmt.Registry) error { + + for k := range m.Requests { + + if val, ok := m.Requests[k]; ok { + if err := val.ContextValidate(ctx, formats); err != nil { + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *Corev1ResourceRequirements) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Corev1ResourceRequirements) UnmarshalBinary(b []byte) error { + var res Corev1ResourceRequirements + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/corev1_volume_mount.go b/components/common/api/def/clients/config/models/corev1_volume_mount.go new file mode 100644 index 0000000..9e2385a --- /dev/null +++ b/components/common/api/def/clients/config/models/corev1_volume_mount.go @@ -0,0 +1,78 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// Corev1VolumeMount VolumeMount describes a mounting of a Volume within a container. +// +// swagger:model corev1VolumeMount +type Corev1VolumeMount struct { + + // Path within the container at which the volume should be mounted. Must + // not contain ':'. + MountPath string `json:"mountPath,omitempty"` + + // mountPropagation determines how mounts are propagated from the host + // to container and the other way around. + // When not set, MountPropagationNone is used. + // This field is beta in 1.10. + // +optional + MountPropagation string `json:"mountPropagation,omitempty"` + + // This must match the Name of a Volume. + Name string `json:"name,omitempty"` + + // Mounted read-only if true, read-write otherwise (false or unspecified). + // Defaults to false. + // +optional + ReadOnly bool `json:"readOnly,omitempty"` + + // Path within the volume from which the container's volume should be mounted. + // Defaults to "" (volume's root). + // +optional + SubPath string `json:"subPath,omitempty"` + + // Expanded path within the volume from which the container's volume should be mounted. + // Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. + // Defaults to "" (volume's root). + // SubPathExpr and SubPath are mutually exclusive. + // +optional + SubPathExpr string `json:"subPathExpr,omitempty"` +} + +// Validate validates this corev1 volume mount +func (m *Corev1VolumeMount) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this corev1 volume mount based on context it is used +func (m *Corev1VolumeMount) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *Corev1VolumeMount) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Corev1VolumeMount) UnmarshalBinary(b []byte) error { + var res Corev1VolumeMount + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/googlerpc_status.go b/components/common/api/def/clients/config/models/googlerpc_status.go new file mode 100644 index 0000000..dc0414a --- /dev/null +++ b/components/common/api/def/clients/config/models/googlerpc_status.go @@ -0,0 +1,122 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// GooglerpcStatus googlerpc status +// +// swagger:model googlerpcStatus +type GooglerpcStatus struct { + + // code + Code int32 `json:"code,omitempty"` + + // details + Details []*ProtobufAny `json:"details"` + + // message + Message string `json:"message,omitempty"` +} + +// Validate validates this googlerpc status +func (m *GooglerpcStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDetails(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *GooglerpcStatus) validateDetails(formats strfmt.Registry) error { + if swag.IsZero(m.Details) { // not required + return nil + } + + for i := 0; i < len(m.Details); i++ { + if swag.IsZero(m.Details[i]) { // not required + continue + } + + if m.Details[i] != nil { + if err := m.Details[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("details" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("details" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this googlerpc status based on the context it is used +func (m *GooglerpcStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateDetails(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *GooglerpcStatus) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Details); i++ { + + if m.Details[i] != nil { + if err := m.Details[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("details" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("details" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *GooglerpcStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *GooglerpcStatus) UnmarshalBinary(b []byte) error { + var res GooglerpcStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/intstr_int_or_string.go b/components/common/api/def/clients/config/models/intstr_int_or_string.go new file mode 100644 index 0000000..2a0a5f7 --- /dev/null +++ b/components/common/api/def/clients/config/models/intstr_int_or_string.go @@ -0,0 +1,64 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// IntstrIntOrString IntOrString is a type that can hold an int32 or a string. When used in +// JSON or YAML marshalling and unmarshalling, it produces or consumes the +// inner type. This allows you to have, for example, a JSON field that can +// accept a name or number. +// TODO: Rename to Int32OrString +// +// +protobuf=true +// +protobuf.options.(gogoproto.goproto_stringer)=false +// +k8s:openapi-gen=true +// +// swagger:model intstrIntOrString +type IntstrIntOrString struct { + + // int val + IntVal int32 `json:"intVal,omitempty"` + + // str val + StrVal string `json:"strVal,omitempty"` + + // type + Type string `json:"type,omitempty"` +} + +// Validate validates this intstr int or string +func (m *IntstrIntOrString) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this intstr int or string based on context it is used +func (m *IntstrIntOrString) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *IntstrIntOrString) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *IntstrIntOrString) UnmarshalBinary(b []byte) error { + var res IntstrIntOrString + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/metav1_type_meta.go b/components/common/api/def/clients/config/models/metav1_type_meta.go new file mode 100644 index 0000000..5fd9db2 --- /dev/null +++ b/components/common/api/def/clients/config/models/metav1_type_meta.go @@ -0,0 +1,66 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// Metav1TypeMeta TypeMeta describes an individual object in an API response or request +// with strings representing the type of the object and its API schema version. +// Structures that are versioned or persisted should inline TypeMeta. +// +// +k8s:deepcopy-gen=false +// +// swagger:model metav1TypeMeta +type Metav1TypeMeta struct { + + // APIVersion defines the versioned schema of this representation of an object. + // Servers should convert recognized schemas to the latest internal value, and + // may reject unrecognized values. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + // +optional + APIVersion string `json:"apiVersion,omitempty"` + + // Kind is a string value representing the REST resource this object represents. + // Servers may infer this from the endpoint the client submits requests to. + // Cannot be updated. + // In CamelCase. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + // +optional + Kind string `json:"kind,omitempty"` +} + +// Validate validates this metav1 type meta +func (m *Metav1TypeMeta) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this metav1 type meta based on context it is used +func (m *Metav1TypeMeta) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *Metav1TypeMeta) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Metav1TypeMeta) UnmarshalBinary(b []byte) error { + var res Metav1TypeMeta + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/protobuf_any.go b/components/common/api/def/clients/config/models/protobuf_any.go new file mode 100644 index 0000000..cbc9799 --- /dev/null +++ b/components/common/api/def/clients/config/models/protobuf_any.go @@ -0,0 +1,50 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// ProtobufAny protobuf any +// +// swagger:model protobufAny +type ProtobufAny struct { + + // at type + AtType string `json:"@type,omitempty"` +} + +// Validate validates this protobuf any +func (m *ProtobufAny) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this protobuf any based on context it is used +func (m *ProtobufAny) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *ProtobufAny) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ProtobufAny) UnmarshalBinary(b []byte) error { + var res ProtobufAny + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/resource_quantity.go b/components/common/api/def/clients/config/models/resource_quantity.go new file mode 100644 index 0000000..9467b74 --- /dev/null +++ b/components/common/api/def/clients/config/models/resource_quantity.go @@ -0,0 +1,107 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// ResourceQuantity Quantity is a fixed-point representation of a number. +// It provides convenient marshaling/unmarshaling in JSON and YAML, +// in addition to String() and AsInt64() accessors. +// +// The serialization format is: +// +// ::= +// (Note that may be empty, from the "" case in .) +// ::= 0 | 1 | ... | 9 +// ::= | +// ::= | . | . | . +// ::= "+" | "-" +// ::= | +// ::= | | +// ::= Ki | Mi | Gi | Ti | Pi | Ei +// (International System of units; See: http://physics.nist.gov/cuu/Units/binary.html) +// ::= m | "" | k | M | G | T | P | E +// (Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.) +// ::= "e" | "E" +// +// No matter which of the three exponent forms is used, no quantity may represent +// a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal +// places. Numbers larger or more precise will be capped or rounded up. +// (E.g.: 0.1m will rounded up to 1m.) +// This may be extended in the future if we require larger or smaller quantities. +// +// When a Quantity is parsed from a string, it will remember the type of suffix +// it had, and will use the same type again when it is serialized. +// +// Before serializing, Quantity will be put in "canonical form". +// This means that Exponent/suffix will be adjusted up or down (with a +// corresponding increase or decrease in Mantissa) such that: +// a. No precision is lost +// b. No fractional digits will be emitted +// c. The exponent (or suffix) is as large as possible. +// The sign will be omitted unless the number is negative. +// +// Examples: +// 1.5 will be serialized as "1500m" +// 1.5Gi will be serialized as "1536Mi" +// +// Note that the quantity will NEVER be internally represented by a +// floating point number. That is the whole point of this exercise. +// +// Non-canonical values will still parse as long as they are well formed, +// but will be re-emitted in their canonical form. (So always use canonical +// form, or don't diff.) +// +// This format is intended to make it difficult to use these numbers without +// writing some sort of special handling code in the hopes that that will +// cause implementors to also use a fixed point implementation. +// +// +protobuf=true +// +protobuf.embed=string +// +protobuf.options.marshal=false +// +protobuf.options.(gogoproto.goproto_stringer)=false +// +k8s:deepcopy-gen=true +// +k8s:openapi-gen=true +// +// swagger:model resourceQuantity +type ResourceQuantity struct { + + // string + String string `json:"string,omitempty"` +} + +// Validate validates this resource quantity +func (m *ResourceQuantity) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this resource quantity based on context it is used +func (m *ResourceQuantity) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *ResourceQuantity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ResourceQuantity) UnmarshalBinary(b []byte) error { + var res ResourceQuantity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/rpc_add_default_overrides_request.go b/components/common/api/def/clients/config/models/rpc_add_default_overrides_request.go new file mode 100644 index 0000000..a49ea92 --- /dev/null +++ b/components/common/api/def/clients/config/models/rpc_add_default_overrides_request.go @@ -0,0 +1,230 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// RPCAddDefaultOverridesRequest rpc add default overrides request +// +// swagger:model rpcAddDefaultOverridesRequest +type RPCAddDefaultOverridesRequest struct { + + // v2 event framework f q d n + V2EventFrameworkFQDN string `json:"V2EventFrameworkFQDN,omitempty"` + + // api addr + APIAddr string `json:"apiAddr,omitempty"` + + // cluster name + ClusterName string `json:"clusterName,omitempty"` + + // cluster type + ClusterType string `json:"clusterType,omitempty"` + + // cni provider + CniProvider string `json:"cniProvider,omitempty"` + + // connector container spec override + ConnectorContainerSpecOverride string `json:"connectorContainerSpecOverride,omitempty"` + + // connector pod spec override + ConnectorPodSpecOverride string `json:"connectorPodSpecOverride,omitempty"` + + // control addr + ControlAddr string `json:"controlAddr,omitempty"` + + // ingress controller override + IngressControllerOverride string `json:"ingressControllerOverride,omitempty"` + + // org display name + OrgDisplayName string `json:"orgDisplayName,omitempty"` + + // organization hash + OrganizationHash string `json:"organizationHash,omitempty"` + + // organization ID + OrganizationID string `json:"organizationID,omitempty"` + + // partner display name + PartnerDisplayName string `json:"partnerDisplayName,omitempty"` + + // partner hash + PartnerHash string `json:"partnerHash,omitempty"` + + // partner ID + PartnerID string `json:"partnerID,omitempty"` + + // project ID + ProjectID string `json:"projectID,omitempty"` + + // proxy config + ProxyConfig *RPCProxyConfig `json:"proxyConfig,omitempty"` + + // pull secret + PullSecret string `json:"pullSecret,omitempty"` + + // token + Token string `json:"token,omitempty"` + + // v1 alert manager yaml + V1AlertManagerYaml string `json:"v1AlertManagerYaml,omitempty"` + + // v1 c a cert + V1CACert string `json:"v1CACert,omitempty"` + + // v1 config edge cert + V1ConfigEdgeCert string `json:"v1ConfigEdgeCert,omitempty"` + + // v1 config edge key + V1ConfigEdgeKey string `json:"v1ConfigEdgeKey,omitempty"` + + // v1 crypot k m i key + V1CrypotKMIKey string `json:"v1CrypotKMIKey,omitempty"` + + // v1 crypto edge cert + V1CryptoEdgeCert string `json:"v1CryptoEdgeCert,omitempty"` + + // v1 crypto edge key + V1CryptoEdgeKey string `json:"v1CryptoEdgeKey,omitempty"` + + // v1 debug cert + V1DebugCert string `json:"v1DebugCert,omitempty"` + + // v1 debug key + V1DebugKey string `json:"v1DebugKey,omitempty"` + + // v1 deployment env + V1DeploymentEnv string `json:"v1DeploymentEnv,omitempty"` + + // v1 edge client cert + V1EdgeClientCert string `json:"v1EdgeClientCert,omitempty"` + + // v1 edge client key + V1EdgeClientKey string `json:"v1EdgeClientKey,omitempty"` + + // v1 edge display name + V1EdgeDisplayName string `json:"v1EdgeDisplayName,omitempty"` + + // v1 edge ID + V1EdgeID string `json:"v1EdgeID,omitempty"` + + // v1 edge metadata + V1EdgeMetadata string `json:"v1EdgeMetadata,omitempty"` + + // v1 fluentd aggregator addr + V1FluentdAggregatorAddr string `json:"v1FluentdAggregatorAddr,omitempty"` + + // v1 influx d b f q d n + V1InfluxDBFQDN string `json:"v1InfluxDBFQDN,omitempty"` + + // v1 influx d b password + V1InfluxDBPassword string `json:"v1InfluxDBPassword,omitempty"` + + // v1 postgres password + V1PostgresPassword string `json:"v1PostgresPassword,omitempty"` + + // v1 promethues relay f q d n + V1PromethuesRelayFQDN string `json:"v1PromethuesRelayFQDN,omitempty"` + + // v1 workload client cert + V1WorkloadClientCert string `json:"v1WorkloadClientCert,omitempty"` + + // v1 workload client key + V1WorkloadClientKey string `json:"v1WorkloadClientKey,omitempty"` + + // v2 event frmwk cert + V2EventFrmwkCert string `json:"v2EventFrmwkCert,omitempty"` + + // v2 event frmwk key + V2EventFrmwkKey string `json:"v2EventFrmwkKey,omitempty"` +} + +// Validate validates this rpc add default overrides request +func (m *RPCAddDefaultOverridesRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateProxyConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *RPCAddDefaultOverridesRequest) validateProxyConfig(formats strfmt.Registry) error { + if swag.IsZero(m.ProxyConfig) { // not required + return nil + } + + if m.ProxyConfig != nil { + if err := m.ProxyConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("proxyConfig") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("proxyConfig") + } + return err + } + } + + return nil +} + +// ContextValidate validate this rpc add default overrides request based on the context it is used +func (m *RPCAddDefaultOverridesRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateProxyConfig(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *RPCAddDefaultOverridesRequest) contextValidateProxyConfig(ctx context.Context, formats strfmt.Registry) error { + + if m.ProxyConfig != nil { + if err := m.ProxyConfig.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("proxyConfig") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("proxyConfig") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *RPCAddDefaultOverridesRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *RPCAddDefaultOverridesRequest) UnmarshalBinary(b []byte) error { + var res RPCAddDefaultOverridesRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/rpc_add_default_overrides_response.go b/components/common/api/def/clients/config/models/rpc_add_default_overrides_response.go new file mode 100644 index 0000000..0f1c02a --- /dev/null +++ b/components/common/api/def/clients/config/models/rpc_add_default_overrides_response.go @@ -0,0 +1,11 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +// RPCAddDefaultOverridesResponse rpc add default overrides response +// +// swagger:model rpcAddDefaultOverridesResponse +type RPCAddDefaultOverridesResponse interface{} diff --git a/components/common/api/def/clients/config/models/rpc_apply_override_request.go b/components/common/api/def/clients/config/models/rpc_apply_override_request.go new file mode 100644 index 0000000..2615ed3 --- /dev/null +++ b/components/common/api/def/clients/config/models/rpc_apply_override_request.go @@ -0,0 +1,125 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// RPCApplyOverrideRequest rpc apply override request +// +// swagger:model rpcApplyOverrideRequest +type RPCApplyOverrideRequest struct { + + // atleast one + AtleastOne bool `json:"atleastOne,omitempty"` + + // namespace + Namespace *ConfigNamespaceTemplate `json:"namespace,omitempty"` + + // organization ID + OrganizationID string `json:"organizationID,omitempty"` + + // partner ID + PartnerID string `json:"partnerID,omitempty"` + + // project ID + ProjectID string `json:"projectID,omitempty"` + + // selector + Selector string `json:"selector,omitempty"` + + // set namespace + SetNamespace bool `json:"setNamespace,omitempty"` + + // type + Type string `json:"type,omitempty"` +} + +// Validate validates this rpc apply override request +func (m *RPCApplyOverrideRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateNamespace(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *RPCApplyOverrideRequest) validateNamespace(formats strfmt.Registry) error { + if swag.IsZero(m.Namespace) { // not required + return nil + } + + if m.Namespace != nil { + if err := m.Namespace.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("namespace") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("namespace") + } + return err + } + } + + return nil +} + +// ContextValidate validate this rpc apply override request based on the context it is used +func (m *RPCApplyOverrideRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateNamespace(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *RPCApplyOverrideRequest) contextValidateNamespace(ctx context.Context, formats strfmt.Registry) error { + + if m.Namespace != nil { + if err := m.Namespace.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("namespace") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("namespace") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *RPCApplyOverrideRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *RPCApplyOverrideRequest) UnmarshalBinary(b []byte) error { + var res RPCApplyOverrideRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/rpc_apply_override_response.go b/components/common/api/def/clients/config/models/rpc_apply_override_response.go new file mode 100644 index 0000000..b39ed01 --- /dev/null +++ b/components/common/api/def/clients/config/models/rpc_apply_override_response.go @@ -0,0 +1,104 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// RPCApplyOverrideResponse rpc apply override response +// +// swagger:model rpcApplyOverrideResponse +type RPCApplyOverrideResponse struct { + + // namespace + Namespace *ConfigNamespaceTemplate `json:"namespace,omitempty"` +} + +// Validate validates this rpc apply override response +func (m *RPCApplyOverrideResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateNamespace(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *RPCApplyOverrideResponse) validateNamespace(formats strfmt.Registry) error { + if swag.IsZero(m.Namespace) { // not required + return nil + } + + if m.Namespace != nil { + if err := m.Namespace.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("namespace") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("namespace") + } + return err + } + } + + return nil +} + +// ContextValidate validate this rpc apply override response based on the context it is used +func (m *RPCApplyOverrideResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateNamespace(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *RPCApplyOverrideResponse) contextValidateNamespace(ctx context.Context, formats strfmt.Registry) error { + + if m.Namespace != nil { + if err := m.Namespace.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("namespace") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("namespace") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *RPCApplyOverrideResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *RPCApplyOverrideResponse) UnmarshalBinary(b []byte) error { + var res RPCApplyOverrideResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/rpc_delete_override_response.go b/components/common/api/def/clients/config/models/rpc_delete_override_response.go new file mode 100644 index 0000000..53951b7 --- /dev/null +++ b/components/common/api/def/clients/config/models/rpc_delete_override_response.go @@ -0,0 +1,11 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +// RPCDeleteOverrideResponse rpc delete override response +// +// swagger:model rpcDeleteOverrideResponse +type RPCDeleteOverrideResponse interface{} diff --git a/components/common/api/def/clients/config/models/rpc_proxy_config.go b/components/common/api/def/clients/config/models/rpc_proxy_config.go new file mode 100644 index 0000000..8d06ef7 --- /dev/null +++ b/components/common/api/def/clients/config/models/rpc_proxy_config.go @@ -0,0 +1,68 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// RPCProxyConfig rpc proxy config +// +// swagger:model rpcProxyConfig +type RPCProxyConfig struct { + + // allow insecure bootstrap + AllowInsecureBootstrap bool `json:"allowInsecureBootstrap,omitempty"` + + // bootstrap c a + BootstrapCA string `json:"bootstrapCA,omitempty"` + + // enabled + Enabled bool `json:"enabled,omitempty"` + + // http proxy + HTTPProxy string `json:"httpProxy,omitempty"` + + // https proxy + HTTPSProxy string `json:"httpsProxy,omitempty"` + + // no proxy + NoProxy string `json:"noProxy,omitempty"` + + // proxy auth + ProxyAuth string `json:"proxyAuth,omitempty"` +} + +// Validate validates this rpc proxy config +func (m *RPCProxyConfig) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this rpc proxy config based on context it is used +func (m *RPCProxyConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *RPCProxyConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *RPCProxyConfig) UnmarshalBinary(b []byte) error { + var res RPCProxyConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/typesconfig_limit_range.go b/components/common/api/def/clients/config/models/typesconfig_limit_range.go new file mode 100644 index 0000000..d34c572 --- /dev/null +++ b/components/common/api/def/clients/config/models/typesconfig_limit_range.go @@ -0,0 +1,150 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// TypesconfigLimitRange typesconfig limit range +// +// swagger:model typesconfigLimitRange +type TypesconfigLimitRange struct { + + // container limits + ContainerLimits *TypesconfigLimitRangeItem `json:"containerLimits,omitempty"` + + // pod limits + PodLimits *TypesconfigLimitRangeItem `json:"podLimits,omitempty"` +} + +// Validate validates this typesconfig limit range +func (m *TypesconfigLimitRange) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateContainerLimits(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePodLimits(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *TypesconfigLimitRange) validateContainerLimits(formats strfmt.Registry) error { + if swag.IsZero(m.ContainerLimits) { // not required + return nil + } + + if m.ContainerLimits != nil { + if err := m.ContainerLimits.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("containerLimits") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("containerLimits") + } + return err + } + } + + return nil +} + +func (m *TypesconfigLimitRange) validatePodLimits(formats strfmt.Registry) error { + if swag.IsZero(m.PodLimits) { // not required + return nil + } + + if m.PodLimits != nil { + if err := m.PodLimits.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("podLimits") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("podLimits") + } + return err + } + } + + return nil +} + +// ContextValidate validate this typesconfig limit range based on the context it is used +func (m *TypesconfigLimitRange) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateContainerLimits(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidatePodLimits(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *TypesconfigLimitRange) contextValidateContainerLimits(ctx context.Context, formats strfmt.Registry) error { + + if m.ContainerLimits != nil { + if err := m.ContainerLimits.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("containerLimits") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("containerLimits") + } + return err + } + } + + return nil +} + +func (m *TypesconfigLimitRange) contextValidatePodLimits(ctx context.Context, formats strfmt.Registry) error { + + if m.PodLimits != nil { + if err := m.PodLimits.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("podLimits") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("podLimits") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *TypesconfigLimitRange) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *TypesconfigLimitRange) UnmarshalBinary(b []byte) error { + var res TypesconfigLimitRange + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/typesconfig_limit_range_item.go b/components/common/api/def/clients/config/models/typesconfig_limit_range_item.go new file mode 100644 index 0000000..fc839df --- /dev/null +++ b/components/common/api/def/clients/config/models/typesconfig_limit_range_item.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// TypesconfigLimitRangeItem typesconfig limit range item +// +// swagger:model typesconfigLimitRangeItem +type TypesconfigLimitRangeItem struct { + + // default Cpu + DefaultCPU float32 `json:"defaultCpu,omitempty"` + + // default memory + DefaultMemory float32 `json:"defaultMemory,omitempty"` + + // default request Cpu + DefaultRequestCPU float32 `json:"defaultRequestCpu,omitempty"` + + // default request memory + DefaultRequestMemory float32 `json:"defaultRequestMemory,omitempty"` + + // max Cpu + MaxCPU float32 `json:"maxCpu,omitempty"` + + // max limit request ratio Cpu + MaxLimitRequestRatioCPU float32 `json:"maxLimitRequestRatioCpu,omitempty"` + + // max limit request ratio memory + MaxLimitRequestRatioMemory float32 `json:"maxLimitRequestRatioMemory,omitempty"` + + // max memory + MaxMemory float32 `json:"maxMemory,omitempty"` + + // min Cpu + MinCPU float32 `json:"minCpu,omitempty"` + + // min memory + MinMemory float32 `json:"minMemory,omitempty"` +} + +// Validate validates this typesconfig limit range item +func (m *TypesconfigLimitRangeItem) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this typesconfig limit range item based on context it is used +func (m *TypesconfigLimitRangeItem) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *TypesconfigLimitRangeItem) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *TypesconfigLimitRangeItem) UnmarshalBinary(b []byte) error { + var res TypesconfigLimitRangeItem + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/typesconfig_placement_label.go b/components/common/api/def/clients/config/models/typesconfig_placement_label.go new file mode 100644 index 0000000..4d3e2fe --- /dev/null +++ b/components/common/api/def/clients/config/models/typesconfig_placement_label.go @@ -0,0 +1,53 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// TypesconfigPlacementLabel typesconfig placement label +// +// swagger:model typesconfigPlacementLabel +type TypesconfigPlacementLabel struct { + + // key + Key string `json:"key,omitempty"` + + // value + Value string `json:"value,omitempty"` +} + +// Validate validates this typesconfig placement label +func (m *TypesconfigPlacementLabel) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this typesconfig placement label based on context it is used +func (m *TypesconfigPlacementLabel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *TypesconfigPlacementLabel) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *TypesconfigPlacementLabel) UnmarshalBinary(b []byte) error { + var res TypesconfigPlacementLabel + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/typesconfig_placement_spec.go b/components/common/api/def/clients/config/models/typesconfig_placement_spec.go new file mode 100644 index 0000000..e15e51a --- /dev/null +++ b/components/common/api/def/clients/config/models/typesconfig_placement_spec.go @@ -0,0 +1,214 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// TypesconfigPlacementSpec PlacementSpec is the specification of placement +// +// swagger:model typesconfigPlacementSpec +type TypesconfigPlacementSpec struct { + + // cluster labels + ClusterLabels []*TypesconfigPlacementLabel `json:"clusterLabels"` + + // cluster selector + ClusterSelector string `json:"clusterSelector,omitempty"` + + // drift action + DriftAction *ConfigDriftReconcillationAction `json:"driftAction,omitempty"` + + // node grouping keys + NodeGroupingKeys []string `json:"nodeGroupingKeys"` + + // placementType is the type of placement + PlacementType *ConfigPlacementType `json:"placementType,omitempty"` +} + +// Validate validates this typesconfig placement spec +func (m *TypesconfigPlacementSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusterLabels(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDriftAction(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePlacementType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *TypesconfigPlacementSpec) validateClusterLabels(formats strfmt.Registry) error { + if swag.IsZero(m.ClusterLabels) { // not required + return nil + } + + for i := 0; i < len(m.ClusterLabels); i++ { + if swag.IsZero(m.ClusterLabels[i]) { // not required + continue + } + + if m.ClusterLabels[i] != nil { + if err := m.ClusterLabels[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterLabels" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("clusterLabels" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *TypesconfigPlacementSpec) validateDriftAction(formats strfmt.Registry) error { + if swag.IsZero(m.DriftAction) { // not required + return nil + } + + if m.DriftAction != nil { + if err := m.DriftAction.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("driftAction") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("driftAction") + } + return err + } + } + + return nil +} + +func (m *TypesconfigPlacementSpec) validatePlacementType(formats strfmt.Registry) error { + if swag.IsZero(m.PlacementType) { // not required + return nil + } + + if m.PlacementType != nil { + if err := m.PlacementType.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("placementType") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("placementType") + } + return err + } + } + + return nil +} + +// ContextValidate validate this typesconfig placement spec based on the context it is used +func (m *TypesconfigPlacementSpec) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateClusterLabels(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateDriftAction(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidatePlacementType(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *TypesconfigPlacementSpec) contextValidateClusterLabels(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.ClusterLabels); i++ { + + if m.ClusterLabels[i] != nil { + if err := m.ClusterLabels[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterLabels" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("clusterLabels" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *TypesconfigPlacementSpec) contextValidateDriftAction(ctx context.Context, formats strfmt.Registry) error { + + if m.DriftAction != nil { + if err := m.DriftAction.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("driftAction") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("driftAction") + } + return err + } + } + + return nil +} + +func (m *TypesconfigPlacementSpec) contextValidatePlacementType(ctx context.Context, formats strfmt.Registry) error { + + if m.PlacementType != nil { + if err := m.PlacementType.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("placementType") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("placementType") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *TypesconfigPlacementSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *TypesconfigPlacementSpec) UnmarshalBinary(b []byte) error { + var res TypesconfigPlacementSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/typesconfig_resource_quota.go b/components/common/api/def/clients/config/models/typesconfig_resource_quota.go new file mode 100644 index 0000000..5c8cfb3 --- /dev/null +++ b/components/common/api/def/clients/config/models/typesconfig_resource_quota.go @@ -0,0 +1,59 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// TypesconfigResourceQuota typesconfig resource quota +// +// swagger:model typesconfigResourceQuota +type TypesconfigResourceQuota struct { + + // cpu limits + CPULimits float32 `json:"cpuLimits,omitempty"` + + // cpu requests + CPURequests float32 `json:"cpuRequests,omitempty"` + + // memory limits + MemoryLimits float32 `json:"memoryLimits,omitempty"` + + // memory requests + MemoryRequests float32 `json:"memoryRequests,omitempty"` +} + +// Validate validates this typesconfig resource quota +func (m *TypesconfigResourceQuota) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this typesconfig resource quota based on context it is used +func (m *TypesconfigResourceQuota) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *TypesconfigResourceQuota) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *TypesconfigResourceQuota) UnmarshalBinary(b []byte) error { + var res TypesconfigResourceQuota + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/typescontroller_namespace_spec.go b/components/common/api/def/clients/config/models/typescontroller_namespace_spec.go new file mode 100644 index 0000000..190b17b --- /dev/null +++ b/components/common/api/def/clients/config/models/typescontroller_namespace_spec.go @@ -0,0 +1,277 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// TypescontrollerNamespaceSpec +kubebuilder:object:generate=true +// NamespaceSpec is the spec of the namespace +// +// swagger:model typescontrollerNamespaceSpec +type TypescontrollerNamespaceSpec struct { + + // init + Init []*ControllerStepTemplate `json:"init"` + + // namespace meta + NamespaceMeta *V1ObjectMeta `json:"namespaceMeta,omitempty"` + + // post create + PostCreate []*ControllerStepTemplate `json:"postCreate"` + + // pre delete + PreDelete []*ControllerStepTemplate `json:"preDelete"` +} + +// Validate validates this typescontroller namespace spec +func (m *TypescontrollerNamespaceSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateInit(formats); err != nil { + res = append(res, err) + } + + if err := m.validateNamespaceMeta(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePostCreate(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePreDelete(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *TypescontrollerNamespaceSpec) validateInit(formats strfmt.Registry) error { + if swag.IsZero(m.Init) { // not required + return nil + } + + for i := 0; i < len(m.Init); i++ { + if swag.IsZero(m.Init[i]) { // not required + continue + } + + if m.Init[i] != nil { + if err := m.Init[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("init" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("init" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *TypescontrollerNamespaceSpec) validateNamespaceMeta(formats strfmt.Registry) error { + if swag.IsZero(m.NamespaceMeta) { // not required + return nil + } + + if m.NamespaceMeta != nil { + if err := m.NamespaceMeta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("namespaceMeta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("namespaceMeta") + } + return err + } + } + + return nil +} + +func (m *TypescontrollerNamespaceSpec) validatePostCreate(formats strfmt.Registry) error { + if swag.IsZero(m.PostCreate) { // not required + return nil + } + + for i := 0; i < len(m.PostCreate); i++ { + if swag.IsZero(m.PostCreate[i]) { // not required + continue + } + + if m.PostCreate[i] != nil { + if err := m.PostCreate[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("postCreate" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("postCreate" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *TypescontrollerNamespaceSpec) validatePreDelete(formats strfmt.Registry) error { + if swag.IsZero(m.PreDelete) { // not required + return nil + } + + for i := 0; i < len(m.PreDelete); i++ { + if swag.IsZero(m.PreDelete[i]) { // not required + continue + } + + if m.PreDelete[i] != nil { + if err := m.PreDelete[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("preDelete" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("preDelete" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this typescontroller namespace spec based on the context it is used +func (m *TypescontrollerNamespaceSpec) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateInit(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateNamespaceMeta(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidatePostCreate(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidatePreDelete(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *TypescontrollerNamespaceSpec) contextValidateInit(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Init); i++ { + + if m.Init[i] != nil { + if err := m.Init[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("init" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("init" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *TypescontrollerNamespaceSpec) contextValidateNamespaceMeta(ctx context.Context, formats strfmt.Registry) error { + + if m.NamespaceMeta != nil { + if err := m.NamespaceMeta.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("namespaceMeta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("namespaceMeta") + } + return err + } + } + + return nil +} + +func (m *TypescontrollerNamespaceSpec) contextValidatePostCreate(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.PostCreate); i++ { + + if m.PostCreate[i] != nil { + if err := m.PostCreate[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("postCreate" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("postCreate" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *TypescontrollerNamespaceSpec) contextValidatePreDelete(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.PreDelete); i++ { + + if m.PreDelete[i] != nil { + if err := m.PreDelete[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("preDelete" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("preDelete" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *TypescontrollerNamespaceSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *TypescontrollerNamespaceSpec) UnmarshalBinary(b []byte) error { + var res TypescontrollerNamespaceSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_a_w_s_elastic_block_store_volume_source.go b/components/common/api/def/clients/config/models/v1_a_w_s_elastic_block_store_volume_source.go new file mode 100644 index 0000000..6c23173 --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_a_w_s_elastic_block_store_volume_source.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AWSElasticBlockStoreVolumeSource Represents a Persistent Disk resource in AWS. +// +// An AWS EBS disk must exist before mounting to a container. The disk +// must also be in the same AWS zone as the kubelet. An AWS EBS disk +// can only be mounted as read/write once. AWS EBS volumes support +// ownership management and SELinux relabeling. +// +// swagger:model v1AWSElasticBlockStoreVolumeSource +type V1AWSElasticBlockStoreVolumeSource struct { + + // Filesystem type of the volume that you want to mount. + // Tip: Ensure that the filesystem type is supported by the host operating system. + // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + // More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + // TODO: how do we prevent errors in the filesystem from compromising the machine + // +optional + FsType string `json:"fsType,omitempty"` + + // The partition in the volume that you want to mount. + // If omitted, the default is to mount by volume name. + // Examples: For volume /dev/sda1, you specify the partition as "1". + // Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty). + // +optional + Partition int32 `json:"partition,omitempty"` + + // Specify "true" to force and set the ReadOnly property in VolumeMounts to "true". + // If omitted, the default is "false". + // More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + // +optional + ReadOnly bool `json:"readOnly,omitempty"` + + // Unique ID of the persistent disk resource in AWS (Amazon EBS volume). + // More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + VolumeID string `json:"volumeID,omitempty"` +} + +// Validate validates this v1 a w s elastic block store volume source +func (m *V1AWSElasticBlockStoreVolumeSource) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v1 a w s elastic block store volume source based on context it is used +func (m *V1AWSElasticBlockStoreVolumeSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1AWSElasticBlockStoreVolumeSource) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AWSElasticBlockStoreVolumeSource) UnmarshalBinary(b []byte) error { + var res V1AWSElasticBlockStoreVolumeSource + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_affinity.go b/components/common/api/def/clients/config/models/v1_affinity.go new file mode 100644 index 0000000..d74d9f5 --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_affinity.go @@ -0,0 +1,199 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1Affinity Affinity is a group of affinity scheduling rules. +// +// swagger:model v1Affinity +type V1Affinity struct { + + // Describes node affinity scheduling rules for the pod. + // +optional + NodeAffinity *V1NodeAffinity `json:"nodeAffinity,omitempty"` + + // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). + // +optional + PodAffinity *V1PodAffinity `json:"podAffinity,omitempty"` + + // Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)). + // +optional + PodAntiAffinity *V1PodAntiAffinity `json:"podAntiAffinity,omitempty"` +} + +// Validate validates this v1 affinity +func (m *V1Affinity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateNodeAffinity(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePodAffinity(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePodAntiAffinity(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1Affinity) validateNodeAffinity(formats strfmt.Registry) error { + if swag.IsZero(m.NodeAffinity) { // not required + return nil + } + + if m.NodeAffinity != nil { + if err := m.NodeAffinity.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("nodeAffinity") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("nodeAffinity") + } + return err + } + } + + return nil +} + +func (m *V1Affinity) validatePodAffinity(formats strfmt.Registry) error { + if swag.IsZero(m.PodAffinity) { // not required + return nil + } + + if m.PodAffinity != nil { + if err := m.PodAffinity.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("podAffinity") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("podAffinity") + } + return err + } + } + + return nil +} + +func (m *V1Affinity) validatePodAntiAffinity(formats strfmt.Registry) error { + if swag.IsZero(m.PodAntiAffinity) { // not required + return nil + } + + if m.PodAntiAffinity != nil { + if err := m.PodAntiAffinity.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("podAntiAffinity") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("podAntiAffinity") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v1 affinity based on the context it is used +func (m *V1Affinity) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateNodeAffinity(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidatePodAffinity(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidatePodAntiAffinity(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1Affinity) contextValidateNodeAffinity(ctx context.Context, formats strfmt.Registry) error { + + if m.NodeAffinity != nil { + if err := m.NodeAffinity.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("nodeAffinity") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("nodeAffinity") + } + return err + } + } + + return nil +} + +func (m *V1Affinity) contextValidatePodAffinity(ctx context.Context, formats strfmt.Registry) error { + + if m.PodAffinity != nil { + if err := m.PodAffinity.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("podAffinity") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("podAffinity") + } + return err + } + } + + return nil +} + +func (m *V1Affinity) contextValidatePodAntiAffinity(ctx context.Context, formats strfmt.Registry) error { + + if m.PodAntiAffinity != nil { + if err := m.PodAntiAffinity.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("podAntiAffinity") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("podAntiAffinity") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1Affinity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1Affinity) UnmarshalBinary(b []byte) error { + var res V1Affinity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_azure_disk_volume_source.go b/components/common/api/def/clients/config/models/v1_azure_disk_volume_source.go new file mode 100644 index 0000000..308e0e6 --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_azure_disk_volume_source.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AzureDiskVolumeSource AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. +// +// swagger:model v1AzureDiskVolumeSource +type V1AzureDiskVolumeSource struct { + + // Host Caching mode: None, Read Only, Read Write. + // +optional + CachingMode string `json:"cachingMode,omitempty"` + + // The Name of the data disk in the blob storage + DiskName string `json:"diskName,omitempty"` + + // The URI the data disk in the blob storage + DiskURI string `json:"diskURI,omitempty"` + + // Filesystem type to mount. + // Must be a filesystem type supported by the host operating system. + // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + // +optional + FsType string `json:"fsType,omitempty"` + + // Expected values Shared: multiple blob disks per storage account Dedicated: single blob disk per storage account Managed: azure managed data disk (only in managed availability set). defaults to shared + Kind string `json:"kind,omitempty"` + + // Defaults to false (read/write). ReadOnly here will force + // the ReadOnly setting in VolumeMounts. + // +optional + ReadOnly bool `json:"readOnly,omitempty"` +} + +// Validate validates this v1 azure disk volume source +func (m *V1AzureDiskVolumeSource) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v1 azure disk volume source based on context it is used +func (m *V1AzureDiskVolumeSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1AzureDiskVolumeSource) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AzureDiskVolumeSource) UnmarshalBinary(b []byte) error { + var res V1AzureDiskVolumeSource + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_azure_file_volume_source.go b/components/common/api/def/clients/config/models/v1_azure_file_volume_source.go new file mode 100644 index 0000000..3dc2c38 --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_azure_file_volume_source.go @@ -0,0 +1,58 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AzureFileVolumeSource AzureFile represents an Azure File Service mount on the host and bind mount to the pod. +// +// swagger:model v1AzureFileVolumeSource +type V1AzureFileVolumeSource struct { + + // Defaults to false (read/write). ReadOnly here will force + // the ReadOnly setting in VolumeMounts. + // +optional + ReadOnly bool `json:"readOnly,omitempty"` + + // the name of secret that contains Azure Storage Account Name and Key + SecretName string `json:"secretName,omitempty"` + + // Share Name + ShareName string `json:"shareName,omitempty"` +} + +// Validate validates this v1 azure file volume source +func (m *V1AzureFileVolumeSource) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v1 azure file volume source based on context it is used +func (m *V1AzureFileVolumeSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1AzureFileVolumeSource) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AzureFileVolumeSource) UnmarshalBinary(b []byte) error { + var res V1AzureFileVolumeSource + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_c_s_i_volume_source.go b/components/common/api/def/clients/config/models/v1_c_s_i_volume_source.go new file mode 100644 index 0000000..9a53d9b --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_c_s_i_volume_source.go @@ -0,0 +1,129 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1CSIVolumeSource Represents a source location of a volume to mount, managed by an external CSI driver +// +// swagger:model v1CSIVolumeSource +type V1CSIVolumeSource struct { + + // Driver is the name of the CSI driver that handles this volume. + // Consult with your admin for the correct name as registered in the cluster. + Driver string `json:"driver,omitempty"` + + // Filesystem type to mount. Ex. "ext4", "xfs", "ntfs". + // If not provided, the empty value is passed to the associated CSI driver + // which will determine the default filesystem to apply. + // +optional + FsType string `json:"fsType,omitempty"` + + // NodePublishSecretRef is a reference to the secret object containing + // sensitive information to pass to the CSI driver to complete the CSI + // NodePublishVolume and NodeUnpublishVolume calls. + // This field is optional, and may be empty if no secret is required. If the + // secret object contains more than one secret, all secret references are passed. + // +optional + NodePublishSecretRef *V1LocalObjectReference `json:"nodePublishSecretRef,omitempty"` + + // Specifies a read-only configuration for the volume. + // Defaults to false (read/write). + // +optional + ReadOnly bool `json:"readOnly,omitempty"` + + // VolumeAttributes stores driver-specific properties that are passed to the CSI + // driver. Consult your driver's documentation for supported values. + // +optional + VolumeAttributes map[string]string `json:"volumeAttributes,omitempty"` +} + +// Validate validates this v1 c s i volume source +func (m *V1CSIVolumeSource) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateNodePublishSecretRef(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1CSIVolumeSource) validateNodePublishSecretRef(formats strfmt.Registry) error { + if swag.IsZero(m.NodePublishSecretRef) { // not required + return nil + } + + if m.NodePublishSecretRef != nil { + if err := m.NodePublishSecretRef.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("nodePublishSecretRef") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("nodePublishSecretRef") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v1 c s i volume source based on the context it is used +func (m *V1CSIVolumeSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateNodePublishSecretRef(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1CSIVolumeSource) contextValidateNodePublishSecretRef(ctx context.Context, formats strfmt.Registry) error { + + if m.NodePublishSecretRef != nil { + if err := m.NodePublishSecretRef.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("nodePublishSecretRef") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("nodePublishSecretRef") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1CSIVolumeSource) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CSIVolumeSource) UnmarshalBinary(b []byte) error { + var res V1CSIVolumeSource + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_capabilities.go b/components/common/api/def/clients/config/models/v1_capabilities.go new file mode 100644 index 0000000..c13156c --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_capabilities.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1Capabilities Adds and removes POSIX capabilities from running containers. +// +// swagger:model v1Capabilities +type V1Capabilities struct { + + // Added capabilities + // +optional + Add []string `json:"add"` + + // Removed capabilities + // +optional + Drop []string `json:"drop"` +} + +// Validate validates this v1 capabilities +func (m *V1Capabilities) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v1 capabilities based on context it is used +func (m *V1Capabilities) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1Capabilities) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1Capabilities) UnmarshalBinary(b []byte) error { + var res V1Capabilities + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_ceph_f_s_volume_source.go b/components/common/api/def/clients/config/models/v1_ceph_f_s_volume_source.go new file mode 100644 index 0000000..a141e03 --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_ceph_f_s_volume_source.go @@ -0,0 +1,131 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1CephFSVolumeSource Represents a Ceph Filesystem mount that lasts the lifetime of a pod +// Cephfs volumes do not support ownership management or SELinux relabeling. +// +// swagger:model v1CephFSVolumeSource +type V1CephFSVolumeSource struct { + + // Required: Monitors is a collection of Ceph monitors + // More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it + Monitors []string `json:"monitors"` + + // Optional: Used as the mounted root, rather than the full Ceph tree, default is / + // +optional + Path string `json:"path,omitempty"` + + // Optional: Defaults to false (read/write). ReadOnly here will force + // the ReadOnly setting in VolumeMounts. + // More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it + // +optional + ReadOnly bool `json:"readOnly,omitempty"` + + // Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret + // More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it + // +optional + SecretFile string `json:"secretFile,omitempty"` + + // Optional: SecretRef is reference to the authentication secret for User, default is empty. + // More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it + // +optional + SecretRef *V1LocalObjectReference `json:"secretRef,omitempty"` + + // Optional: User is the rados user name, default is admin + // More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it + // +optional + User string `json:"user,omitempty"` +} + +// Validate validates this v1 ceph f s volume source +func (m *V1CephFSVolumeSource) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateSecretRef(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1CephFSVolumeSource) validateSecretRef(formats strfmt.Registry) error { + if swag.IsZero(m.SecretRef) { // not required + return nil + } + + if m.SecretRef != nil { + if err := m.SecretRef.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("secretRef") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("secretRef") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v1 ceph f s volume source based on the context it is used +func (m *V1CephFSVolumeSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateSecretRef(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1CephFSVolumeSource) contextValidateSecretRef(ctx context.Context, formats strfmt.Registry) error { + + if m.SecretRef != nil { + if err := m.SecretRef.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("secretRef") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("secretRef") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1CephFSVolumeSource) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CephFSVolumeSource) UnmarshalBinary(b []byte) error { + var res V1CephFSVolumeSource + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_cinder_volume_source.go b/components/common/api/def/clients/config/models/v1_cinder_volume_source.go new file mode 100644 index 0000000..c9f7689 --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_cinder_volume_source.go @@ -0,0 +1,126 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1CinderVolumeSource Represents a cinder volume resource in Openstack. +// A Cinder volume must exist before mounting to a container. +// The volume must also be in the same region as the kubelet. +// Cinder volumes support ownership management and SELinux relabeling. +// +// swagger:model v1CinderVolumeSource +type V1CinderVolumeSource struct { + + // Filesystem type to mount. + // Must be a filesystem type supported by the host operating system. + // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + // More info: https://examples.k8s.io/mysql-cinder-pd/README.md + // +optional + FsType string `json:"fsType,omitempty"` + + // Optional: Defaults to false (read/write). ReadOnly here will force + // the ReadOnly setting in VolumeMounts. + // More info: https://examples.k8s.io/mysql-cinder-pd/README.md + // +optional + ReadOnly bool `json:"readOnly,omitempty"` + + // Optional: points to a secret object containing parameters used to connect + // to OpenStack. + // +optional + SecretRef *V1LocalObjectReference `json:"secretRef,omitempty"` + + // volume id used to identify the volume in cinder. + // More info: https://examples.k8s.io/mysql-cinder-pd/README.md + VolumeID string `json:"volumeID,omitempty"` +} + +// Validate validates this v1 cinder volume source +func (m *V1CinderVolumeSource) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateSecretRef(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1CinderVolumeSource) validateSecretRef(formats strfmt.Registry) error { + if swag.IsZero(m.SecretRef) { // not required + return nil + } + + if m.SecretRef != nil { + if err := m.SecretRef.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("secretRef") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("secretRef") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v1 cinder volume source based on the context it is used +func (m *V1CinderVolumeSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateSecretRef(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1CinderVolumeSource) contextValidateSecretRef(ctx context.Context, formats strfmt.Registry) error { + + if m.SecretRef != nil { + if err := m.SecretRef.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("secretRef") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("secretRef") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1CinderVolumeSource) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CinderVolumeSource) UnmarshalBinary(b []byte) error { + var res V1CinderVolumeSource + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_config_map_env_source.go b/components/common/api/def/clients/config/models/v1_config_map_env_source.go new file mode 100644 index 0000000..d7b7883 --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_config_map_env_source.go @@ -0,0 +1,112 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ConfigMapEnvSource ConfigMapEnvSource selects a ConfigMap to populate the environment +// variables with. +// +// The contents of the target ConfigMap's Data field will represent the +// key-value pairs as environment variables. +// +// swagger:model v1ConfigMapEnvSource +type V1ConfigMapEnvSource struct { + + // The ConfigMap to select from. + LocalObjectReference *V1LocalObjectReference `json:"localObjectReference,omitempty"` + + // Specify whether the ConfigMap must be defined + // +optional + Optional bool `json:"optional,omitempty"` +} + +// Validate validates this v1 config map env source +func (m *V1ConfigMapEnvSource) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLocalObjectReference(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ConfigMapEnvSource) validateLocalObjectReference(formats strfmt.Registry) error { + if swag.IsZero(m.LocalObjectReference) { // not required + return nil + } + + if m.LocalObjectReference != nil { + if err := m.LocalObjectReference.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("localObjectReference") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("localObjectReference") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v1 config map env source based on the context it is used +func (m *V1ConfigMapEnvSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateLocalObjectReference(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ConfigMapEnvSource) contextValidateLocalObjectReference(ctx context.Context, formats strfmt.Registry) error { + + if m.LocalObjectReference != nil { + if err := m.LocalObjectReference.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("localObjectReference") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("localObjectReference") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ConfigMapEnvSource) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ConfigMapEnvSource) UnmarshalBinary(b []byte) error { + var res V1ConfigMapEnvSource + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_config_map_key_selector.go b/components/common/api/def/clients/config/models/v1_config_map_key_selector.go new file mode 100644 index 0000000..3d9d5e6 --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_config_map_key_selector.go @@ -0,0 +1,111 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ConfigMapKeySelector Selects a key from a ConfigMap. +// +// swagger:model v1ConfigMapKeySelector +type V1ConfigMapKeySelector struct { + + // The key to select. + Key string `json:"key,omitempty"` + + // The ConfigMap to select from. + LocalObjectReference *V1LocalObjectReference `json:"localObjectReference,omitempty"` + + // Specify whether the ConfigMap or its key must be defined + // +optional + Optional bool `json:"optional,omitempty"` +} + +// Validate validates this v1 config map key selector +func (m *V1ConfigMapKeySelector) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLocalObjectReference(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ConfigMapKeySelector) validateLocalObjectReference(formats strfmt.Registry) error { + if swag.IsZero(m.LocalObjectReference) { // not required + return nil + } + + if m.LocalObjectReference != nil { + if err := m.LocalObjectReference.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("localObjectReference") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("localObjectReference") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v1 config map key selector based on the context it is used +func (m *V1ConfigMapKeySelector) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateLocalObjectReference(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ConfigMapKeySelector) contextValidateLocalObjectReference(ctx context.Context, formats strfmt.Registry) error { + + if m.LocalObjectReference != nil { + if err := m.LocalObjectReference.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("localObjectReference") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("localObjectReference") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ConfigMapKeySelector) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ConfigMapKeySelector) UnmarshalBinary(b []byte) error { + var res V1ConfigMapKeySelector + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_config_map_projection.go b/components/common/api/def/clients/config/models/v1_config_map_projection.go new file mode 100644 index 0000000..bb70591 --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_config_map_projection.go @@ -0,0 +1,179 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ConfigMapProjection Adapts a ConfigMap into a projected volume. +// +// The contents of the target ConfigMap's Data field will be presented in a +// projected volume as files using the keys in the Data field as the file names, +// unless the items element is populated with specific mappings of keys to paths. +// Note that this is identical to a configmap volume source without the default +// mode. +// +// swagger:model v1ConfigMapProjection +type V1ConfigMapProjection struct { + + // If unspecified, each key-value pair in the Data field of the referenced + // ConfigMap will be projected into the volume as a file whose name is the + // key and content is the value. If specified, the listed keys will be + // projected into the specified paths, and unlisted keys will not be + // present. If a key is specified which is not present in the ConfigMap, + // the volume setup will error unless it is marked optional. Paths must be + // relative and may not contain the '..' path or start with '..'. + // +optional + Items []*V1KeyToPath `json:"items"` + + // local object reference + LocalObjectReference *V1LocalObjectReference `json:"localObjectReference,omitempty"` + + // Specify whether the ConfigMap or its keys must be defined + // +optional + Optional bool `json:"optional,omitempty"` +} + +// Validate validates this v1 config map projection +func (m *V1ConfigMapProjection) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLocalObjectReference(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ConfigMapProjection) validateItems(formats strfmt.Registry) error { + if swag.IsZero(m.Items) { // not required + return nil + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1ConfigMapProjection) validateLocalObjectReference(formats strfmt.Registry) error { + if swag.IsZero(m.LocalObjectReference) { // not required + return nil + } + + if m.LocalObjectReference != nil { + if err := m.LocalObjectReference.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("localObjectReference") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("localObjectReference") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v1 config map projection based on the context it is used +func (m *V1ConfigMapProjection) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateItems(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLocalObjectReference(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ConfigMapProjection) contextValidateItems(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Items); i++ { + + if m.Items[i] != nil { + if err := m.Items[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1ConfigMapProjection) contextValidateLocalObjectReference(ctx context.Context, formats strfmt.Registry) error { + + if m.LocalObjectReference != nil { + if err := m.LocalObjectReference.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("localObjectReference") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("localObjectReference") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ConfigMapProjection) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ConfigMapProjection) UnmarshalBinary(b []byte) error { + var res V1ConfigMapProjection + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_config_map_volume_source.go b/components/common/api/def/clients/config/models/v1_config_map_volume_source.go new file mode 100644 index 0000000..e46bb74 --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_config_map_volume_source.go @@ -0,0 +1,188 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ConfigMapVolumeSource Adapts a ConfigMap into a volume. +// +// The contents of the target ConfigMap's Data field will be presented in a +// volume as files using the keys in the Data field as the file names, unless +// the items element is populated with specific mappings of keys to paths. +// ConfigMap volumes support ownership management and SELinux relabeling. +// +// swagger:model v1ConfigMapVolumeSource +type V1ConfigMapVolumeSource struct { + + // Optional: mode bits used to set permissions on created files by default. + // Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. + // YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. + // Defaults to 0644. + // Directories within the path are not affected by this setting. + // This might be in conflict with other options that affect the file + // mode, like fsGroup, and the result can be other mode bits set. + // +optional + DefaultMode int32 `json:"defaultMode,omitempty"` + + // If unspecified, each key-value pair in the Data field of the referenced + // ConfigMap will be projected into the volume as a file whose name is the + // key and content is the value. If specified, the listed keys will be + // projected into the specified paths, and unlisted keys will not be + // present. If a key is specified which is not present in the ConfigMap, + // the volume setup will error unless it is marked optional. Paths must be + // relative and may not contain the '..' path or start with '..'. + // +optional + Items []*V1KeyToPath `json:"items"` + + // local object reference + LocalObjectReference *V1LocalObjectReference `json:"localObjectReference,omitempty"` + + // Specify whether the ConfigMap or its keys must be defined + // +optional + Optional bool `json:"optional,omitempty"` +} + +// Validate validates this v1 config map volume source +func (m *V1ConfigMapVolumeSource) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLocalObjectReference(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ConfigMapVolumeSource) validateItems(formats strfmt.Registry) error { + if swag.IsZero(m.Items) { // not required + return nil + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1ConfigMapVolumeSource) validateLocalObjectReference(formats strfmt.Registry) error { + if swag.IsZero(m.LocalObjectReference) { // not required + return nil + } + + if m.LocalObjectReference != nil { + if err := m.LocalObjectReference.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("localObjectReference") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("localObjectReference") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v1 config map volume source based on the context it is used +func (m *V1ConfigMapVolumeSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateItems(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLocalObjectReference(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ConfigMapVolumeSource) contextValidateItems(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Items); i++ { + + if m.Items[i] != nil { + if err := m.Items[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1ConfigMapVolumeSource) contextValidateLocalObjectReference(ctx context.Context, formats strfmt.Registry) error { + + if m.LocalObjectReference != nil { + if err := m.LocalObjectReference.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("localObjectReference") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("localObjectReference") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ConfigMapVolumeSource) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ConfigMapVolumeSource) UnmarshalBinary(b []byte) error { + var res V1ConfigMapVolumeSource + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_container.go b/components/common/api/def/clients/config/models/v1_container.go new file mode 100644 index 0000000..ca957e3 --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_container.go @@ -0,0 +1,762 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1Container A single application container that you want to run within a pod. +// +// swagger:model v1Container +type V1Container struct { + + // Arguments to the entrypoint. + // The docker image's CMD is used if this is not provided. + // Variable references $(VAR_NAME) are expanded using the container's environment. If a variable + // cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax + // can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, + // regardless of whether the variable exists or not. + // Cannot be updated. + // More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell + // +optional + Args []string `json:"args"` + + // Entrypoint array. Not executed within a shell. + // The docker image's ENTRYPOINT is used if this is not provided. + // Variable references $(VAR_NAME) are expanded using the container's environment. If a variable + // cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax + // can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, + // regardless of whether the variable exists or not. + // Cannot be updated. + // More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell + // +optional + Command []string `json:"command"` + + // List of environment variables to set in the container. + // Cannot be updated. + // +optional + // +patchMergeKey=name + // +patchStrategy=merge + Env []*V1EnvVar `json:"env"` + + // List of sources to populate environment variables in the container. + // The keys defined within a source must be a C_IDENTIFIER. All invalid keys + // will be reported as an event when the container is starting. When a key exists in multiple + // sources, the value associated with the last source will take precedence. + // Values defined by an Env with a duplicate key will take precedence. + // Cannot be updated. + // +optional + EnvFrom []*V1EnvFromSource `json:"envFrom"` + + // Docker image name. + // More info: https://kubernetes.io/docs/concepts/containers/images + // This field is optional to allow higher level config management to default or override + // container images in workload controllers like Deployments and StatefulSets. + // +optional + Image string `json:"image,omitempty"` + + // Image pull policy. + // One of Always, Never, IfNotPresent. + // Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. + // Cannot be updated. + // More info: https://kubernetes.io/docs/concepts/containers/images#updating-images + // +optional + ImagePullPolicy string `json:"imagePullPolicy,omitempty"` + + // Actions that the management system should take in response to container lifecycle events. + // Cannot be updated. + // +optional + Lifecycle *V1Lifecycle `json:"lifecycle,omitempty"` + + // Periodic probe of container liveness. + // Container will be restarted if the probe fails. + // Cannot be updated. + // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + // +optional + LivenessProbe *V1Probe `json:"livenessProbe,omitempty"` + + // Name of the container specified as a DNS_LABEL. + // Each container in a pod must have a unique name (DNS_LABEL). + // Cannot be updated. + Name string `json:"name,omitempty"` + + // List of ports to expose from the container. Exposing a port here gives + // the system additional information about the network connections a + // container uses, but is primarily informational. Not specifying a port here + // DOES NOT prevent that port from being exposed. Any port which is + // listening on the default "0.0.0.0" address inside a container will be + // accessible from the network. + // Cannot be updated. + // +optional + // +patchMergeKey=containerPort + // +patchStrategy=merge + // +listType=map + // +listMapKey=containerPort + // +listMapKey=protocol + Ports []*V1ContainerPort `json:"ports"` + + // Periodic probe of container service readiness. + // Container will be removed from service endpoints if the probe fails. + // Cannot be updated. + // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + // +optional + ReadinessProbe *V1Probe `json:"readinessProbe,omitempty"` + + // Compute Resources required by this container. + // Cannot be updated. + // More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + // +optional + Resources *Corev1ResourceRequirements `json:"resources,omitempty"` + + // Security options the pod should run with. + // More info: https://kubernetes.io/docs/concepts/policy/security-context/ + // More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ + // +optional + SecurityContext *V1SecurityContext `json:"securityContext,omitempty"` + + // StartupProbe indicates that the Pod has successfully initialized. + // If specified, no other probes are executed until this completes successfully. + // If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. + // This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, + // when it might take a long time to load data or warm a cache, than during steady-state operation. + // This cannot be updated. + // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + // +optional + StartupProbe *V1Probe `json:"startupProbe,omitempty"` + + // Whether this container should allocate a buffer for stdin in the container runtime. If this + // is not set, reads from stdin in the container will always result in EOF. + // Default is false. + // +optional + Stdin bool `json:"stdin,omitempty"` + + // Whether the container runtime should close the stdin channel after it has been opened by + // a single attach. When stdin is true the stdin stream will remain open across multiple attach + // sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the + // first client attaches to stdin, and then remains open and accepts data until the client disconnects, + // at which time stdin is closed and remains closed until the container is restarted. If this + // flag is false, a container processes that reads from stdin will never receive an EOF. + // Default is false + // +optional + StdinOnce bool `json:"stdinOnce,omitempty"` + + // Optional: Path at which the file to which the container's termination message + // will be written is mounted into the container's filesystem. + // Message written is intended to be brief final status, such as an assertion failure message. + // Will be truncated by the node if greater than 4096 bytes. The total message length across + // all containers will be limited to 12kb. + // Defaults to /dev/termination-log. + // Cannot be updated. + // +optional + TerminationMessagePath string `json:"terminationMessagePath,omitempty"` + + // Indicate how the termination message should be populated. File will use the contents of + // terminationMessagePath to populate the container status message on both success and failure. + // FallbackToLogsOnError will use the last chunk of container log output if the termination + // message file is empty and the container exited with an error. + // The log output is limited to 2048 bytes or 80 lines, whichever is smaller. + // Defaults to File. + // Cannot be updated. + // +optional + TerminationMessagePolicy string `json:"terminationMessagePolicy,omitempty"` + + // Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. + // Default is false. + // +optional + Tty bool `json:"tty,omitempty"` + + // volumeDevices is the list of block devices to be used by the container. + // +patchMergeKey=devicePath + // +patchStrategy=merge + // +optional + VolumeDevices []*V1VolumeDevice `json:"volumeDevices"` + + // Pod volumes to mount into the container's filesystem. + // Cannot be updated. + // +optional + // +patchMergeKey=mountPath + // +patchStrategy=merge + VolumeMounts []*Corev1VolumeMount `json:"volumeMounts"` + + // Container's working directory. + // If not specified, the container runtime's default will be used, which + // might be configured in the container image. + // Cannot be updated. + // +optional + WorkingDir string `json:"workingDir,omitempty"` +} + +// Validate validates this v1 container +func (m *V1Container) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateEnv(formats); err != nil { + res = append(res, err) + } + + if err := m.validateEnvFrom(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLifecycle(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLivenessProbe(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePorts(formats); err != nil { + res = append(res, err) + } + + if err := m.validateReadinessProbe(formats); err != nil { + res = append(res, err) + } + + if err := m.validateResources(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSecurityContext(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStartupProbe(formats); err != nil { + res = append(res, err) + } + + if err := m.validateVolumeDevices(formats); err != nil { + res = append(res, err) + } + + if err := m.validateVolumeMounts(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1Container) validateEnv(formats strfmt.Registry) error { + if swag.IsZero(m.Env) { // not required + return nil + } + + for i := 0; i < len(m.Env); i++ { + if swag.IsZero(m.Env[i]) { // not required + continue + } + + if m.Env[i] != nil { + if err := m.Env[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("env" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("env" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1Container) validateEnvFrom(formats strfmt.Registry) error { + if swag.IsZero(m.EnvFrom) { // not required + return nil + } + + for i := 0; i < len(m.EnvFrom); i++ { + if swag.IsZero(m.EnvFrom[i]) { // not required + continue + } + + if m.EnvFrom[i] != nil { + if err := m.EnvFrom[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("envFrom" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("envFrom" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1Container) validateLifecycle(formats strfmt.Registry) error { + if swag.IsZero(m.Lifecycle) { // not required + return nil + } + + if m.Lifecycle != nil { + if err := m.Lifecycle.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("lifecycle") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("lifecycle") + } + return err + } + } + + return nil +} + +func (m *V1Container) validateLivenessProbe(formats strfmt.Registry) error { + if swag.IsZero(m.LivenessProbe) { // not required + return nil + } + + if m.LivenessProbe != nil { + if err := m.LivenessProbe.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("livenessProbe") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("livenessProbe") + } + return err + } + } + + return nil +} + +func (m *V1Container) validatePorts(formats strfmt.Registry) error { + if swag.IsZero(m.Ports) { // not required + return nil + } + + for i := 0; i < len(m.Ports); i++ { + if swag.IsZero(m.Ports[i]) { // not required + continue + } + + if m.Ports[i] != nil { + if err := m.Ports[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("ports" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("ports" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1Container) validateReadinessProbe(formats strfmt.Registry) error { + if swag.IsZero(m.ReadinessProbe) { // not required + return nil + } + + if m.ReadinessProbe != nil { + if err := m.ReadinessProbe.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("readinessProbe") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("readinessProbe") + } + return err + } + } + + return nil +} + +func (m *V1Container) validateResources(formats strfmt.Registry) error { + if swag.IsZero(m.Resources) { // not required + return nil + } + + if m.Resources != nil { + if err := m.Resources.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resources") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resources") + } + return err + } + } + + return nil +} + +func (m *V1Container) validateSecurityContext(formats strfmt.Registry) error { + if swag.IsZero(m.SecurityContext) { // not required + return nil + } + + if m.SecurityContext != nil { + if err := m.SecurityContext.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("securityContext") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("securityContext") + } + return err + } + } + + return nil +} + +func (m *V1Container) validateStartupProbe(formats strfmt.Registry) error { + if swag.IsZero(m.StartupProbe) { // not required + return nil + } + + if m.StartupProbe != nil { + if err := m.StartupProbe.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("startupProbe") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("startupProbe") + } + return err + } + } + + return nil +} + +func (m *V1Container) validateVolumeDevices(formats strfmt.Registry) error { + if swag.IsZero(m.VolumeDevices) { // not required + return nil + } + + for i := 0; i < len(m.VolumeDevices); i++ { + if swag.IsZero(m.VolumeDevices[i]) { // not required + continue + } + + if m.VolumeDevices[i] != nil { + if err := m.VolumeDevices[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("volumeDevices" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("volumeDevices" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1Container) validateVolumeMounts(formats strfmt.Registry) error { + if swag.IsZero(m.VolumeMounts) { // not required + return nil + } + + for i := 0; i < len(m.VolumeMounts); i++ { + if swag.IsZero(m.VolumeMounts[i]) { // not required + continue + } + + if m.VolumeMounts[i] != nil { + if err := m.VolumeMounts[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("volumeMounts" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("volumeMounts" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this v1 container based on the context it is used +func (m *V1Container) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateEnv(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateEnvFrom(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLifecycle(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLivenessProbe(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidatePorts(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateReadinessProbe(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateResources(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateSecurityContext(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateStartupProbe(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateVolumeDevices(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateVolumeMounts(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1Container) contextValidateEnv(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Env); i++ { + + if m.Env[i] != nil { + if err := m.Env[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("env" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("env" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1Container) contextValidateEnvFrom(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.EnvFrom); i++ { + + if m.EnvFrom[i] != nil { + if err := m.EnvFrom[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("envFrom" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("envFrom" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1Container) contextValidateLifecycle(ctx context.Context, formats strfmt.Registry) error { + + if m.Lifecycle != nil { + if err := m.Lifecycle.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("lifecycle") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("lifecycle") + } + return err + } + } + + return nil +} + +func (m *V1Container) contextValidateLivenessProbe(ctx context.Context, formats strfmt.Registry) error { + + if m.LivenessProbe != nil { + if err := m.LivenessProbe.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("livenessProbe") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("livenessProbe") + } + return err + } + } + + return nil +} + +func (m *V1Container) contextValidatePorts(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Ports); i++ { + + if m.Ports[i] != nil { + if err := m.Ports[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("ports" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("ports" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1Container) contextValidateReadinessProbe(ctx context.Context, formats strfmt.Registry) error { + + if m.ReadinessProbe != nil { + if err := m.ReadinessProbe.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("readinessProbe") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("readinessProbe") + } + return err + } + } + + return nil +} + +func (m *V1Container) contextValidateResources(ctx context.Context, formats strfmt.Registry) error { + + if m.Resources != nil { + if err := m.Resources.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resources") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resources") + } + return err + } + } + + return nil +} + +func (m *V1Container) contextValidateSecurityContext(ctx context.Context, formats strfmt.Registry) error { + + if m.SecurityContext != nil { + if err := m.SecurityContext.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("securityContext") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("securityContext") + } + return err + } + } + + return nil +} + +func (m *V1Container) contextValidateStartupProbe(ctx context.Context, formats strfmt.Registry) error { + + if m.StartupProbe != nil { + if err := m.StartupProbe.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("startupProbe") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("startupProbe") + } + return err + } + } + + return nil +} + +func (m *V1Container) contextValidateVolumeDevices(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.VolumeDevices); i++ { + + if m.VolumeDevices[i] != nil { + if err := m.VolumeDevices[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("volumeDevices" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("volumeDevices" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1Container) contextValidateVolumeMounts(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.VolumeMounts); i++ { + + if m.VolumeMounts[i] != nil { + if err := m.VolumeMounts[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("volumeMounts" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("volumeMounts" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1Container) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1Container) UnmarshalBinary(b []byte) error { + var res V1Container + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_container_port.go b/components/common/api/def/clients/config/models/v1_container_port.go new file mode 100644 index 0000000..286142a --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_container_port.go @@ -0,0 +1,74 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ContainerPort ContainerPort represents a network port in a single container. +// +// swagger:model v1ContainerPort +type V1ContainerPort struct { + + // Number of port to expose on the pod's IP address. + // This must be a valid port number, 0 < x < 65536. + ContainerPort int32 `json:"containerPort,omitempty"` + + // What host IP to bind the external port to. + // +optional + HostIP string `json:"hostIP,omitempty"` + + // Number of port to expose on the host. + // If specified, this must be a valid port number, 0 < x < 65536. + // If HostNetwork is specified, this must match ContainerPort. + // Most containers do not need this. + // +optional + HostPort int32 `json:"hostPort,omitempty"` + + // If specified, this must be an IANA_SVC_NAME and unique within the pod. Each + // named port in a pod must have a unique name. Name for the port that can be + // referred to by services. + // +optional + Name string `json:"name,omitempty"` + + // Protocol for port. Must be UDP, TCP, or SCTP. + // Defaults to "TCP". + // +optional + // +default="TCP" + Protocol string `json:"protocol,omitempty"` +} + +// Validate validates this v1 container port +func (m *V1ContainerPort) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v1 container port based on context it is used +func (m *V1ContainerPort) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ContainerPort) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ContainerPort) UnmarshalBinary(b []byte) error { + var res V1ContainerPort + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_downward_api_projection.go b/components/common/api/def/clients/config/models/v1_downward_api_projection.go new file mode 100644 index 0000000..bb4c399 --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_downward_api_projection.go @@ -0,0 +1,119 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1DownwardAPIProjection Represents downward API info for projecting into a projected volume. +// Note that this is identical to a downwardAPI volume source without the default +// mode. +// +// swagger:model v1DownwardAPIProjection +type V1DownwardAPIProjection struct { + + // Items is a list of DownwardAPIVolume file + // +optional + Items []*V1DownwardAPIVolumeFile `json:"items"` +} + +// Validate validates this v1 downward API projection +func (m *V1DownwardAPIProjection) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1DownwardAPIProjection) validateItems(formats strfmt.Registry) error { + if swag.IsZero(m.Items) { // not required + return nil + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this v1 downward API projection based on the context it is used +func (m *V1DownwardAPIProjection) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateItems(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1DownwardAPIProjection) contextValidateItems(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Items); i++ { + + if m.Items[i] != nil { + if err := m.Items[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1DownwardAPIProjection) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1DownwardAPIProjection) UnmarshalBinary(b []byte) error { + var res V1DownwardAPIProjection + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_downward_api_volume_file.go b/components/common/api/def/clients/config/models/v1_downward_api_volume_file.go new file mode 100644 index 0000000..b92af62 --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_downward_api_volume_file.go @@ -0,0 +1,165 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1DownwardAPIVolumeFile DownwardAPIVolumeFile represents information to create the file containing the pod field +// +// swagger:model v1DownwardAPIVolumeFile +type V1DownwardAPIVolumeFile struct { + + // Required: Selects a field of the pod: only annotations, labels, name and namespace are supported. + // +optional + FieldRef *V1ObjectFieldSelector `json:"fieldRef,omitempty"` + + // Optional: mode bits used to set permissions on this file, must be an octal value + // between 0000 and 0777 or a decimal value between 0 and 511. + // YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. + // If not specified, the volume defaultMode will be used. + // This might be in conflict with other options that affect the file + // mode, like fsGroup, and the result can be other mode bits set. + // +optional + Mode int32 `json:"mode,omitempty"` + + // Required: Path is the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..' + Path string `json:"path,omitempty"` + + // Selects a resource of the container: only resources limits and requests + // (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. + // +optional + ResourceFieldRef *V1ResourceFieldSelector `json:"resourceFieldRef,omitempty"` +} + +// Validate validates this v1 downward API volume file +func (m *V1DownwardAPIVolumeFile) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateFieldRef(formats); err != nil { + res = append(res, err) + } + + if err := m.validateResourceFieldRef(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1DownwardAPIVolumeFile) validateFieldRef(formats strfmt.Registry) error { + if swag.IsZero(m.FieldRef) { // not required + return nil + } + + if m.FieldRef != nil { + if err := m.FieldRef.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("fieldRef") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("fieldRef") + } + return err + } + } + + return nil +} + +func (m *V1DownwardAPIVolumeFile) validateResourceFieldRef(formats strfmt.Registry) error { + if swag.IsZero(m.ResourceFieldRef) { // not required + return nil + } + + if m.ResourceFieldRef != nil { + if err := m.ResourceFieldRef.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resourceFieldRef") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resourceFieldRef") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v1 downward API volume file based on the context it is used +func (m *V1DownwardAPIVolumeFile) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateFieldRef(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateResourceFieldRef(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1DownwardAPIVolumeFile) contextValidateFieldRef(ctx context.Context, formats strfmt.Registry) error { + + if m.FieldRef != nil { + if err := m.FieldRef.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("fieldRef") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("fieldRef") + } + return err + } + } + + return nil +} + +func (m *V1DownwardAPIVolumeFile) contextValidateResourceFieldRef(ctx context.Context, formats strfmt.Registry) error { + + if m.ResourceFieldRef != nil { + if err := m.ResourceFieldRef.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resourceFieldRef") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resourceFieldRef") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1DownwardAPIVolumeFile) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1DownwardAPIVolumeFile) UnmarshalBinary(b []byte) error { + var res V1DownwardAPIVolumeFile + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_downward_api_volume_source.go b/components/common/api/def/clients/config/models/v1_downward_api_volume_source.go new file mode 100644 index 0000000..4261376 --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_downward_api_volume_source.go @@ -0,0 +1,129 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1DownwardAPIVolumeSource DownwardAPIVolumeSource represents a volume containing downward API info. +// Downward API volumes support ownership management and SELinux relabeling. +// +// swagger:model v1DownwardAPIVolumeSource +type V1DownwardAPIVolumeSource struct { + + // Optional: mode bits to use on created files by default. Must be a + // Optional: mode bits used to set permissions on created files by default. + // Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. + // YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. + // Defaults to 0644. + // Directories within the path are not affected by this setting. + // This might be in conflict with other options that affect the file + // mode, like fsGroup, and the result can be other mode bits set. + // +optional + DefaultMode int32 `json:"defaultMode,omitempty"` + + // Items is a list of downward API volume file + // +optional + Items []*V1DownwardAPIVolumeFile `json:"items"` +} + +// Validate validates this v1 downward API volume source +func (m *V1DownwardAPIVolumeSource) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1DownwardAPIVolumeSource) validateItems(formats strfmt.Registry) error { + if swag.IsZero(m.Items) { // not required + return nil + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this v1 downward API volume source based on the context it is used +func (m *V1DownwardAPIVolumeSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateItems(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1DownwardAPIVolumeSource) contextValidateItems(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Items); i++ { + + if m.Items[i] != nil { + if err := m.Items[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1DownwardAPIVolumeSource) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1DownwardAPIVolumeSource) UnmarshalBinary(b []byte) error { + var res V1DownwardAPIVolumeSource + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_empty_dir_volume_source.go b/components/common/api/def/clients/config/models/v1_empty_dir_volume_source.go new file mode 100644 index 0000000..4402497 --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_empty_dir_volume_source.go @@ -0,0 +1,118 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1EmptyDirVolumeSource Represents an empty directory for a pod. +// Empty directory volumes support ownership management and SELinux relabeling. +// +// swagger:model v1EmptyDirVolumeSource +type V1EmptyDirVolumeSource struct { + + // What type of storage medium should back this directory. + // The default is "" which means to use the node's default medium. + // Must be an empty string (default) or Memory. + // More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir + // +optional + Medium string `json:"medium,omitempty"` + + // Total amount of local storage required for this EmptyDir volume. + // The size limit is also applicable for memory medium. + // The maximum usage on memory medium EmptyDir would be the minimum value between + // the SizeLimit specified here and the sum of memory limits of all containers in a pod. + // The default is nil which means that the limit is undefined. + // More info: http://kubernetes.io/docs/user-guide/volumes#emptydir + // +optional + SizeLimit *ResourceQuantity `json:"sizeLimit,omitempty"` +} + +// Validate validates this v1 empty dir volume source +func (m *V1EmptyDirVolumeSource) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateSizeLimit(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EmptyDirVolumeSource) validateSizeLimit(formats strfmt.Registry) error { + if swag.IsZero(m.SizeLimit) { // not required + return nil + } + + if m.SizeLimit != nil { + if err := m.SizeLimit.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("sizeLimit") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("sizeLimit") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v1 empty dir volume source based on the context it is used +func (m *V1EmptyDirVolumeSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateSizeLimit(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EmptyDirVolumeSource) contextValidateSizeLimit(ctx context.Context, formats strfmt.Registry) error { + + if m.SizeLimit != nil { + if err := m.SizeLimit.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("sizeLimit") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("sizeLimit") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1EmptyDirVolumeSource) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EmptyDirVolumeSource) UnmarshalBinary(b []byte) error { + var res V1EmptyDirVolumeSource + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_env_from_source.go b/components/common/api/def/clients/config/models/v1_env_from_source.go new file mode 100644 index 0000000..1ca1f70 --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_env_from_source.go @@ -0,0 +1,156 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1EnvFromSource EnvFromSource represents the source of a set of ConfigMaps +// +// swagger:model v1EnvFromSource +type V1EnvFromSource struct { + + // The ConfigMap to select from + // +optional + ConfigMapRef *V1ConfigMapEnvSource `json:"configMapRef,omitempty"` + + // An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. + // +optional + Prefix string `json:"prefix,omitempty"` + + // The Secret to select from + // +optional + SecretRef *V1SecretEnvSource `json:"secretRef,omitempty"` +} + +// Validate validates this v1 env from source +func (m *V1EnvFromSource) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateConfigMapRef(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSecretRef(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EnvFromSource) validateConfigMapRef(formats strfmt.Registry) error { + if swag.IsZero(m.ConfigMapRef) { // not required + return nil + } + + if m.ConfigMapRef != nil { + if err := m.ConfigMapRef.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("configMapRef") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("configMapRef") + } + return err + } + } + + return nil +} + +func (m *V1EnvFromSource) validateSecretRef(formats strfmt.Registry) error { + if swag.IsZero(m.SecretRef) { // not required + return nil + } + + if m.SecretRef != nil { + if err := m.SecretRef.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("secretRef") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("secretRef") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v1 env from source based on the context it is used +func (m *V1EnvFromSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateConfigMapRef(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateSecretRef(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EnvFromSource) contextValidateConfigMapRef(ctx context.Context, formats strfmt.Registry) error { + + if m.ConfigMapRef != nil { + if err := m.ConfigMapRef.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("configMapRef") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("configMapRef") + } + return err + } + } + + return nil +} + +func (m *V1EnvFromSource) contextValidateSecretRef(ctx context.Context, formats strfmt.Registry) error { + + if m.SecretRef != nil { + if err := m.SecretRef.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("secretRef") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("secretRef") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1EnvFromSource) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EnvFromSource) UnmarshalBinary(b []byte) error { + var res V1EnvFromSource + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_env_var.go b/components/common/api/def/clients/config/models/v1_env_var.go new file mode 100644 index 0000000..e96d55a --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_env_var.go @@ -0,0 +1,119 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1EnvVar EnvVar represents an environment variable present in a Container. +// +// swagger:model v1EnvVar +type V1EnvVar struct { + + // Name of the environment variable. Must be a C_IDENTIFIER. + Name string `json:"name,omitempty"` + + // Variable references $(VAR_NAME) are expanded + // using the previous defined environment variables in the container and + // any service environment variables. If a variable cannot be resolved, + // the reference in the input string will be unchanged. The $(VAR_NAME) + // syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped + // references will never be expanded, regardless of whether the variable + // exists or not. + // Defaults to "". + // +optional + Value string `json:"value,omitempty"` + + // Source for the environment variable's value. Cannot be used if value is not empty. + // +optional + ValueFrom *V1EnvVarSource `json:"valueFrom,omitempty"` +} + +// Validate validates this v1 env var +func (m *V1EnvVar) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateValueFrom(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EnvVar) validateValueFrom(formats strfmt.Registry) error { + if swag.IsZero(m.ValueFrom) { // not required + return nil + } + + if m.ValueFrom != nil { + if err := m.ValueFrom.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("valueFrom") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("valueFrom") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v1 env var based on the context it is used +func (m *V1EnvVar) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateValueFrom(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EnvVar) contextValidateValueFrom(ctx context.Context, formats strfmt.Registry) error { + + if m.ValueFrom != nil { + if err := m.ValueFrom.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("valueFrom") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("valueFrom") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1EnvVar) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EnvVar) UnmarshalBinary(b []byte) error { + var res V1EnvVar + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_env_var_source.go b/components/common/api/def/clients/config/models/v1_env_var_source.go new file mode 100644 index 0000000..3f00b1c --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_env_var_source.go @@ -0,0 +1,248 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1EnvVarSource EnvVarSource represents a source for the value of an EnvVar. +// +// swagger:model v1EnvVarSource +type V1EnvVarSource struct { + + // Selects a key of a ConfigMap. + // +optional + ConfigMapKeyRef *V1ConfigMapKeySelector `json:"configMapKeyRef,omitempty"` + + // Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, + // spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. + // +optional + FieldRef *V1ObjectFieldSelector `json:"fieldRef,omitempty"` + + // Selects a resource of the container: only resources limits and requests + // (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. + // +optional + ResourceFieldRef *V1ResourceFieldSelector `json:"resourceFieldRef,omitempty"` + + // Selects a key of a secret in the pod's namespace + // +optional + SecretKeyRef *V1SecretKeySelector `json:"secretKeyRef,omitempty"` +} + +// Validate validates this v1 env var source +func (m *V1EnvVarSource) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateConfigMapKeyRef(formats); err != nil { + res = append(res, err) + } + + if err := m.validateFieldRef(formats); err != nil { + res = append(res, err) + } + + if err := m.validateResourceFieldRef(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSecretKeyRef(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EnvVarSource) validateConfigMapKeyRef(formats strfmt.Registry) error { + if swag.IsZero(m.ConfigMapKeyRef) { // not required + return nil + } + + if m.ConfigMapKeyRef != nil { + if err := m.ConfigMapKeyRef.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("configMapKeyRef") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("configMapKeyRef") + } + return err + } + } + + return nil +} + +func (m *V1EnvVarSource) validateFieldRef(formats strfmt.Registry) error { + if swag.IsZero(m.FieldRef) { // not required + return nil + } + + if m.FieldRef != nil { + if err := m.FieldRef.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("fieldRef") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("fieldRef") + } + return err + } + } + + return nil +} + +func (m *V1EnvVarSource) validateResourceFieldRef(formats strfmt.Registry) error { + if swag.IsZero(m.ResourceFieldRef) { // not required + return nil + } + + if m.ResourceFieldRef != nil { + if err := m.ResourceFieldRef.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resourceFieldRef") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resourceFieldRef") + } + return err + } + } + + return nil +} + +func (m *V1EnvVarSource) validateSecretKeyRef(formats strfmt.Registry) error { + if swag.IsZero(m.SecretKeyRef) { // not required + return nil + } + + if m.SecretKeyRef != nil { + if err := m.SecretKeyRef.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("secretKeyRef") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("secretKeyRef") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v1 env var source based on the context it is used +func (m *V1EnvVarSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateConfigMapKeyRef(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateFieldRef(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateResourceFieldRef(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateSecretKeyRef(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EnvVarSource) contextValidateConfigMapKeyRef(ctx context.Context, formats strfmt.Registry) error { + + if m.ConfigMapKeyRef != nil { + if err := m.ConfigMapKeyRef.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("configMapKeyRef") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("configMapKeyRef") + } + return err + } + } + + return nil +} + +func (m *V1EnvVarSource) contextValidateFieldRef(ctx context.Context, formats strfmt.Registry) error { + + if m.FieldRef != nil { + if err := m.FieldRef.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("fieldRef") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("fieldRef") + } + return err + } + } + + return nil +} + +func (m *V1EnvVarSource) contextValidateResourceFieldRef(ctx context.Context, formats strfmt.Registry) error { + + if m.ResourceFieldRef != nil { + if err := m.ResourceFieldRef.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resourceFieldRef") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resourceFieldRef") + } + return err + } + } + + return nil +} + +func (m *V1EnvVarSource) contextValidateSecretKeyRef(ctx context.Context, formats strfmt.Registry) error { + + if m.SecretKeyRef != nil { + if err := m.SecretKeyRef.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("secretKeyRef") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("secretKeyRef") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1EnvVarSource) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EnvVarSource) UnmarshalBinary(b []byte) error { + var res V1EnvVarSource + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_ephemeral_container.go b/components/common/api/def/clients/config/models/v1_ephemeral_container.go new file mode 100644 index 0000000..cc6a322 --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_ephemeral_container.go @@ -0,0 +1,122 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1EphemeralContainer An EphemeralContainer is a container that may be added temporarily to an existing pod for +// user-initiated activities such as debugging. Ephemeral containers have no resource or +// scheduling guarantees, and they will not be restarted when they exit or when a pod is +// removed or restarted. If an ephemeral container causes a pod to exceed its resource +// allocation, the pod may be evicted. +// Ephemeral containers may not be added by directly updating the pod spec. They must be added +// via the pod's ephemeralcontainers subresource, and they will appear in the pod spec +// once added. +// This is an alpha feature enabled by the EphemeralContainers feature flag. +// +// swagger:model v1EphemeralContainer +type V1EphemeralContainer struct { + + // Ephemeral containers have all of the fields of Container, plus additional fields + // specific to ephemeral containers. Fields in common with Container are in the + // following inlined struct so than an EphemeralContainer may easily be converted + // to a Container. + EphemeralContainerCommon *V1EphemeralContainerCommon `json:"ephemeralContainerCommon,omitempty"` + + // If set, the name of the container from PodSpec that this ephemeral container targets. + // The ephemeral container will be run in the namespaces (IPC, PID, etc) of this container. + // If not set then the ephemeral container is run in whatever namespaces are shared + // for the pod. Note that the container runtime must support this feature. + // +optional + TargetContainerName string `json:"targetContainerName,omitempty"` +} + +// Validate validates this v1 ephemeral container +func (m *V1EphemeralContainer) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateEphemeralContainerCommon(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EphemeralContainer) validateEphemeralContainerCommon(formats strfmt.Registry) error { + if swag.IsZero(m.EphemeralContainerCommon) { // not required + return nil + } + + if m.EphemeralContainerCommon != nil { + if err := m.EphemeralContainerCommon.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("ephemeralContainerCommon") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("ephemeralContainerCommon") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v1 ephemeral container based on the context it is used +func (m *V1EphemeralContainer) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateEphemeralContainerCommon(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EphemeralContainer) contextValidateEphemeralContainerCommon(ctx context.Context, formats strfmt.Registry) error { + + if m.EphemeralContainerCommon != nil { + if err := m.EphemeralContainerCommon.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("ephemeralContainerCommon") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("ephemeralContainerCommon") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1EphemeralContainer) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EphemeralContainer) UnmarshalBinary(b []byte) error { + var res V1EphemeralContainer + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_ephemeral_container_common.go b/components/common/api/def/clients/config/models/v1_ephemeral_container_common.go new file mode 100644 index 0000000..9b4e281 --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_ephemeral_container_common.go @@ -0,0 +1,733 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1EphemeralContainerCommon EphemeralContainerCommon is a copy of all fields in Container to be inlined in +// EphemeralContainer. This separate type allows easy conversion from EphemeralContainer +// to Container and allows separate documentation for the fields of EphemeralContainer. +// When a new field is added to Container it must be added here as well. +// +// swagger:model v1EphemeralContainerCommon +type V1EphemeralContainerCommon struct { + + // Arguments to the entrypoint. + // The docker image's CMD is used if this is not provided. + // Variable references $(VAR_NAME) are expanded using the container's environment. If a variable + // cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax + // can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, + // regardless of whether the variable exists or not. + // Cannot be updated. + // More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell + // +optional + Args []string `json:"args"` + + // Entrypoint array. Not executed within a shell. + // The docker image's ENTRYPOINT is used if this is not provided. + // Variable references $(VAR_NAME) are expanded using the container's environment. If a variable + // cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax + // can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, + // regardless of whether the variable exists or not. + // Cannot be updated. + // More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell + // +optional + Command []string `json:"command"` + + // List of environment variables to set in the container. + // Cannot be updated. + // +optional + // +patchMergeKey=name + // +patchStrategy=merge + Env []*V1EnvVar `json:"env"` + + // List of sources to populate environment variables in the container. + // The keys defined within a source must be a C_IDENTIFIER. All invalid keys + // will be reported as an event when the container is starting. When a key exists in multiple + // sources, the value associated with the last source will take precedence. + // Values defined by an Env with a duplicate key will take precedence. + // Cannot be updated. + // +optional + EnvFrom []*V1EnvFromSource `json:"envFrom"` + + // Docker image name. + // More info: https://kubernetes.io/docs/concepts/containers/images + Image string `json:"image,omitempty"` + + // Image pull policy. + // One of Always, Never, IfNotPresent. + // Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. + // Cannot be updated. + // More info: https://kubernetes.io/docs/concepts/containers/images#updating-images + // +optional + ImagePullPolicy string `json:"imagePullPolicy,omitempty"` + + // Lifecycle is not allowed for ephemeral containers. + // +optional + Lifecycle *V1Lifecycle `json:"lifecycle,omitempty"` + + // Probes are not allowed for ephemeral containers. + // +optional + LivenessProbe *V1Probe `json:"livenessProbe,omitempty"` + + // Name of the ephemeral container specified as a DNS_LABEL. + // This name must be unique among all containers, init containers and ephemeral containers. + Name string `json:"name,omitempty"` + + // Ports are not allowed for ephemeral containers. + Ports []*V1ContainerPort `json:"ports"` + + // Probes are not allowed for ephemeral containers. + // +optional + ReadinessProbe *V1Probe `json:"readinessProbe,omitempty"` + + // Resources are not allowed for ephemeral containers. Ephemeral containers use spare resources + // already allocated to the pod. + // +optional + Resources *Corev1ResourceRequirements `json:"resources,omitempty"` + + // SecurityContext is not allowed for ephemeral containers. + // +optional + SecurityContext *V1SecurityContext `json:"securityContext,omitempty"` + + // Probes are not allowed for ephemeral containers. + // +optional + StartupProbe *V1Probe `json:"startupProbe,omitempty"` + + // Whether this container should allocate a buffer for stdin in the container runtime. If this + // is not set, reads from stdin in the container will always result in EOF. + // Default is false. + // +optional + Stdin bool `json:"stdin,omitempty"` + + // Whether the container runtime should close the stdin channel after it has been opened by + // a single attach. When stdin is true the stdin stream will remain open across multiple attach + // sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the + // first client attaches to stdin, and then remains open and accepts data until the client disconnects, + // at which time stdin is closed and remains closed until the container is restarted. If this + // flag is false, a container processes that reads from stdin will never receive an EOF. + // Default is false + // +optional + StdinOnce bool `json:"stdinOnce,omitempty"` + + // Optional: Path at which the file to which the container's termination message + // will be written is mounted into the container's filesystem. + // Message written is intended to be brief final status, such as an assertion failure message. + // Will be truncated by the node if greater than 4096 bytes. The total message length across + // all containers will be limited to 12kb. + // Defaults to /dev/termination-log. + // Cannot be updated. + // +optional + TerminationMessagePath string `json:"terminationMessagePath,omitempty"` + + // Indicate how the termination message should be populated. File will use the contents of + // terminationMessagePath to populate the container status message on both success and failure. + // FallbackToLogsOnError will use the last chunk of container log output if the termination + // message file is empty and the container exited with an error. + // The log output is limited to 2048 bytes or 80 lines, whichever is smaller. + // Defaults to File. + // Cannot be updated. + // +optional + TerminationMessagePolicy string `json:"terminationMessagePolicy,omitempty"` + + // Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. + // Default is false. + // +optional + Tty bool `json:"tty,omitempty"` + + // volumeDevices is the list of block devices to be used by the container. + // +patchMergeKey=devicePath + // +patchStrategy=merge + // +optional + VolumeDevices []*V1VolumeDevice `json:"volumeDevices"` + + // Pod volumes to mount into the container's filesystem. + // Cannot be updated. + // +optional + // +patchMergeKey=mountPath + // +patchStrategy=merge + VolumeMounts []*Corev1VolumeMount `json:"volumeMounts"` + + // Container's working directory. + // If not specified, the container runtime's default will be used, which + // might be configured in the container image. + // Cannot be updated. + // +optional + WorkingDir string `json:"workingDir,omitempty"` +} + +// Validate validates this v1 ephemeral container common +func (m *V1EphemeralContainerCommon) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateEnv(formats); err != nil { + res = append(res, err) + } + + if err := m.validateEnvFrom(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLifecycle(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLivenessProbe(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePorts(formats); err != nil { + res = append(res, err) + } + + if err := m.validateReadinessProbe(formats); err != nil { + res = append(res, err) + } + + if err := m.validateResources(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSecurityContext(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStartupProbe(formats); err != nil { + res = append(res, err) + } + + if err := m.validateVolumeDevices(formats); err != nil { + res = append(res, err) + } + + if err := m.validateVolumeMounts(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EphemeralContainerCommon) validateEnv(formats strfmt.Registry) error { + if swag.IsZero(m.Env) { // not required + return nil + } + + for i := 0; i < len(m.Env); i++ { + if swag.IsZero(m.Env[i]) { // not required + continue + } + + if m.Env[i] != nil { + if err := m.Env[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("env" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("env" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1EphemeralContainerCommon) validateEnvFrom(formats strfmt.Registry) error { + if swag.IsZero(m.EnvFrom) { // not required + return nil + } + + for i := 0; i < len(m.EnvFrom); i++ { + if swag.IsZero(m.EnvFrom[i]) { // not required + continue + } + + if m.EnvFrom[i] != nil { + if err := m.EnvFrom[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("envFrom" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("envFrom" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1EphemeralContainerCommon) validateLifecycle(formats strfmt.Registry) error { + if swag.IsZero(m.Lifecycle) { // not required + return nil + } + + if m.Lifecycle != nil { + if err := m.Lifecycle.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("lifecycle") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("lifecycle") + } + return err + } + } + + return nil +} + +func (m *V1EphemeralContainerCommon) validateLivenessProbe(formats strfmt.Registry) error { + if swag.IsZero(m.LivenessProbe) { // not required + return nil + } + + if m.LivenessProbe != nil { + if err := m.LivenessProbe.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("livenessProbe") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("livenessProbe") + } + return err + } + } + + return nil +} + +func (m *V1EphemeralContainerCommon) validatePorts(formats strfmt.Registry) error { + if swag.IsZero(m.Ports) { // not required + return nil + } + + for i := 0; i < len(m.Ports); i++ { + if swag.IsZero(m.Ports[i]) { // not required + continue + } + + if m.Ports[i] != nil { + if err := m.Ports[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("ports" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("ports" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1EphemeralContainerCommon) validateReadinessProbe(formats strfmt.Registry) error { + if swag.IsZero(m.ReadinessProbe) { // not required + return nil + } + + if m.ReadinessProbe != nil { + if err := m.ReadinessProbe.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("readinessProbe") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("readinessProbe") + } + return err + } + } + + return nil +} + +func (m *V1EphemeralContainerCommon) validateResources(formats strfmt.Registry) error { + if swag.IsZero(m.Resources) { // not required + return nil + } + + if m.Resources != nil { + if err := m.Resources.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resources") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resources") + } + return err + } + } + + return nil +} + +func (m *V1EphemeralContainerCommon) validateSecurityContext(formats strfmt.Registry) error { + if swag.IsZero(m.SecurityContext) { // not required + return nil + } + + if m.SecurityContext != nil { + if err := m.SecurityContext.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("securityContext") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("securityContext") + } + return err + } + } + + return nil +} + +func (m *V1EphemeralContainerCommon) validateStartupProbe(formats strfmt.Registry) error { + if swag.IsZero(m.StartupProbe) { // not required + return nil + } + + if m.StartupProbe != nil { + if err := m.StartupProbe.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("startupProbe") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("startupProbe") + } + return err + } + } + + return nil +} + +func (m *V1EphemeralContainerCommon) validateVolumeDevices(formats strfmt.Registry) error { + if swag.IsZero(m.VolumeDevices) { // not required + return nil + } + + for i := 0; i < len(m.VolumeDevices); i++ { + if swag.IsZero(m.VolumeDevices[i]) { // not required + continue + } + + if m.VolumeDevices[i] != nil { + if err := m.VolumeDevices[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("volumeDevices" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("volumeDevices" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1EphemeralContainerCommon) validateVolumeMounts(formats strfmt.Registry) error { + if swag.IsZero(m.VolumeMounts) { // not required + return nil + } + + for i := 0; i < len(m.VolumeMounts); i++ { + if swag.IsZero(m.VolumeMounts[i]) { // not required + continue + } + + if m.VolumeMounts[i] != nil { + if err := m.VolumeMounts[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("volumeMounts" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("volumeMounts" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this v1 ephemeral container common based on the context it is used +func (m *V1EphemeralContainerCommon) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateEnv(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateEnvFrom(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLifecycle(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLivenessProbe(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidatePorts(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateReadinessProbe(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateResources(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateSecurityContext(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateStartupProbe(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateVolumeDevices(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateVolumeMounts(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EphemeralContainerCommon) contextValidateEnv(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Env); i++ { + + if m.Env[i] != nil { + if err := m.Env[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("env" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("env" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1EphemeralContainerCommon) contextValidateEnvFrom(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.EnvFrom); i++ { + + if m.EnvFrom[i] != nil { + if err := m.EnvFrom[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("envFrom" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("envFrom" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1EphemeralContainerCommon) contextValidateLifecycle(ctx context.Context, formats strfmt.Registry) error { + + if m.Lifecycle != nil { + if err := m.Lifecycle.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("lifecycle") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("lifecycle") + } + return err + } + } + + return nil +} + +func (m *V1EphemeralContainerCommon) contextValidateLivenessProbe(ctx context.Context, formats strfmt.Registry) error { + + if m.LivenessProbe != nil { + if err := m.LivenessProbe.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("livenessProbe") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("livenessProbe") + } + return err + } + } + + return nil +} + +func (m *V1EphemeralContainerCommon) contextValidatePorts(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Ports); i++ { + + if m.Ports[i] != nil { + if err := m.Ports[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("ports" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("ports" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1EphemeralContainerCommon) contextValidateReadinessProbe(ctx context.Context, formats strfmt.Registry) error { + + if m.ReadinessProbe != nil { + if err := m.ReadinessProbe.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("readinessProbe") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("readinessProbe") + } + return err + } + } + + return nil +} + +func (m *V1EphemeralContainerCommon) contextValidateResources(ctx context.Context, formats strfmt.Registry) error { + + if m.Resources != nil { + if err := m.Resources.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resources") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resources") + } + return err + } + } + + return nil +} + +func (m *V1EphemeralContainerCommon) contextValidateSecurityContext(ctx context.Context, formats strfmt.Registry) error { + + if m.SecurityContext != nil { + if err := m.SecurityContext.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("securityContext") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("securityContext") + } + return err + } + } + + return nil +} + +func (m *V1EphemeralContainerCommon) contextValidateStartupProbe(ctx context.Context, formats strfmt.Registry) error { + + if m.StartupProbe != nil { + if err := m.StartupProbe.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("startupProbe") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("startupProbe") + } + return err + } + } + + return nil +} + +func (m *V1EphemeralContainerCommon) contextValidateVolumeDevices(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.VolumeDevices); i++ { + + if m.VolumeDevices[i] != nil { + if err := m.VolumeDevices[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("volumeDevices" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("volumeDevices" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1EphemeralContainerCommon) contextValidateVolumeMounts(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.VolumeMounts); i++ { + + if m.VolumeMounts[i] != nil { + if err := m.VolumeMounts[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("volumeMounts" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("volumeMounts" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1EphemeralContainerCommon) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EphemeralContainerCommon) UnmarshalBinary(b []byte) error { + var res V1EphemeralContainerCommon + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_ephemeral_volume_source.go b/components/common/api/def/clients/config/models/v1_ephemeral_volume_source.go new file mode 100644 index 0000000..5bdddfa --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_ephemeral_volume_source.go @@ -0,0 +1,129 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1EphemeralVolumeSource Represents an ephemeral volume that is handled by a normal storage driver. +// +// swagger:model v1EphemeralVolumeSource +type V1EphemeralVolumeSource struct { + + // Specifies a read-only configuration for the volume. + // Defaults to false (read/write). + // +optional + ReadOnly bool `json:"readOnly,omitempty"` + + // Will be used to create a stand-alone PVC to provision the volume. + // The pod in which this EphemeralVolumeSource is embedded will be the + // owner of the PVC, i.e. the PVC will be deleted together with the + // pod. The name of the PVC will be `-` where + // `` is the name from the `PodSpec.Volumes` array + // entry. Pod validation will reject the pod if the concatenated name + // is not valid for a PVC (for example, too long). + // + // An existing PVC with that name that is not owned by the pod + // will *not* be used for the pod to avoid using an unrelated + // volume by mistake. Starting the pod is then blocked until + // the unrelated PVC is removed. If such a pre-created PVC is + // meant to be used by the pod, the PVC has to updated with an + // owner reference to the pod once the pod exists. Normally + // this should not be necessary, but it may be useful when + // manually reconstructing a broken cluster. + // + // This field is read-only and no changes will be made by Kubernetes + // to the PVC after it has been created. + // + // Required, must not be nil. + VolumeClaimTemplate *V1PersistentVolumeClaimTemplate `json:"volumeClaimTemplate,omitempty"` +} + +// Validate validates this v1 ephemeral volume source +func (m *V1EphemeralVolumeSource) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateVolumeClaimTemplate(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EphemeralVolumeSource) validateVolumeClaimTemplate(formats strfmt.Registry) error { + if swag.IsZero(m.VolumeClaimTemplate) { // not required + return nil + } + + if m.VolumeClaimTemplate != nil { + if err := m.VolumeClaimTemplate.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("volumeClaimTemplate") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("volumeClaimTemplate") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v1 ephemeral volume source based on the context it is used +func (m *V1EphemeralVolumeSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateVolumeClaimTemplate(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EphemeralVolumeSource) contextValidateVolumeClaimTemplate(ctx context.Context, formats strfmt.Registry) error { + + if m.VolumeClaimTemplate != nil { + if err := m.VolumeClaimTemplate.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("volumeClaimTemplate") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("volumeClaimTemplate") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1EphemeralVolumeSource) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EphemeralVolumeSource) UnmarshalBinary(b []byte) error { + var res V1EphemeralVolumeSource + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_exec_action.go b/components/common/api/def/clients/config/models/v1_exec_action.go new file mode 100644 index 0000000..8499b0e --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_exec_action.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ExecAction ExecAction describes a "run in container" action. +// +// swagger:model v1ExecAction +type V1ExecAction struct { + + // Command is the command line to execute inside the container, the working directory for the + // command is root ('/') in the container's filesystem. The command is simply exec'd, it is + // not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + // a shell, you need to explicitly call out to that shell. + // Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + // +optional + Command []string `json:"command"` +} + +// Validate validates this v1 exec action +func (m *V1ExecAction) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v1 exec action based on context it is used +func (m *V1ExecAction) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ExecAction) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ExecAction) UnmarshalBinary(b []byte) error { + var res V1ExecAction + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_f_c_volume_source.go b/components/common/api/def/clients/config/models/v1_f_c_volume_source.go new file mode 100644 index 0000000..c45386e --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_f_c_volume_source.go @@ -0,0 +1,74 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1FCVolumeSource Represents a Fibre Channel volume. +// Fibre Channel volumes can only be mounted as read/write once. +// Fibre Channel volumes support ownership management and SELinux relabeling. +// +// swagger:model v1FCVolumeSource +type V1FCVolumeSource struct { + + // Filesystem type to mount. + // Must be a filesystem type supported by the host operating system. + // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + // TODO: how do we prevent errors in the filesystem from compromising the machine + // +optional + FsType string `json:"fsType,omitempty"` + + // Optional: FC target lun number + // +optional + Lun int32 `json:"lun,omitempty"` + + // Optional: Defaults to false (read/write). ReadOnly here will force + // the ReadOnly setting in VolumeMounts. + // +optional + ReadOnly bool `json:"readOnly,omitempty"` + + // Optional: FC target worldwide names (WWNs) + // +optional + TargetWWNs []string `json:"targetWWNs"` + + // Optional: FC volume world wide identifiers (wwids) + // Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously. + // +optional + Wwids []string `json:"wwids"` +} + +// Validate validates this v1 f c volume source +func (m *V1FCVolumeSource) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v1 f c volume source based on context it is used +func (m *V1FCVolumeSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1FCVolumeSource) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1FCVolumeSource) UnmarshalBinary(b []byte) error { + var res V1FCVolumeSource + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_fields_v1.go b/components/common/api/def/clients/config/models/v1_fields_v1.go new file mode 100644 index 0000000..5ea94c7 --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_fields_v1.go @@ -0,0 +1,62 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1FieldsV1 FieldsV1 stores a set of fields in a data structure like a Trie, in JSON format. +// +// Each key is either a '.' representing the field itself, and will always map to an empty set, +// or a string representing a sub-field or item. The string will follow one of these four formats: +// 'f:', where is the name of a field in a struct, or key in a map +// 'v:', where is the exact json formatted value of a list item +// 'i:', where is position of a item in a list +// 'k:', where is a map of a list item's key fields to their unique values +// If a key maps to an empty Fields value, the field that key represents is part of the set. +// +// The exact format is defined in sigs.k8s.io/structured-merge-diff +// +protobuf.options.(gogoproto.goproto_stringer)=false +// +// swagger:model v1FieldsV1 +type V1FieldsV1 struct { + + // Raw is the underlying serialization of this object. + // Format: byte + Raw strfmt.Base64 `json:"Raw,omitempty"` +} + +// Validate validates this v1 fields v1 +func (m *V1FieldsV1) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v1 fields v1 based on context it is used +func (m *V1FieldsV1) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1FieldsV1) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1FieldsV1) UnmarshalBinary(b []byte) error { + var res V1FieldsV1 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_flex_volume_source.go b/components/common/api/def/clients/config/models/v1_flex_volume_source.go new file mode 100644 index 0000000..3c76cf4 --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_flex_volume_source.go @@ -0,0 +1,128 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1FlexVolumeSource FlexVolume represents a generic volume resource that is +// provisioned/attached using an exec based plugin. +// +// swagger:model v1FlexVolumeSource +type V1FlexVolumeSource struct { + + // Driver is the name of the driver to use for this volume. + Driver string `json:"driver,omitempty"` + + // Filesystem type to mount. + // Must be a filesystem type supported by the host operating system. + // Ex. "ext4", "xfs", "ntfs". The default filesystem depends on FlexVolume script. + // +optional + FsType string `json:"fsType,omitempty"` + + // Optional: Extra command options if any. + // +optional + Options map[string]string `json:"options,omitempty"` + + // Optional: Defaults to false (read/write). ReadOnly here will force + // the ReadOnly setting in VolumeMounts. + // +optional + ReadOnly bool `json:"readOnly,omitempty"` + + // Optional: SecretRef is reference to the secret object containing + // sensitive information to pass to the plugin scripts. This may be + // empty if no secret object is specified. If the secret object + // contains more than one secret, all secrets are passed to the plugin + // scripts. + // +optional + SecretRef *V1LocalObjectReference `json:"secretRef,omitempty"` +} + +// Validate validates this v1 flex volume source +func (m *V1FlexVolumeSource) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateSecretRef(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1FlexVolumeSource) validateSecretRef(formats strfmt.Registry) error { + if swag.IsZero(m.SecretRef) { // not required + return nil + } + + if m.SecretRef != nil { + if err := m.SecretRef.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("secretRef") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("secretRef") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v1 flex volume source based on the context it is used +func (m *V1FlexVolumeSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateSecretRef(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1FlexVolumeSource) contextValidateSecretRef(ctx context.Context, formats strfmt.Registry) error { + + if m.SecretRef != nil { + if err := m.SecretRef.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("secretRef") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("secretRef") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1FlexVolumeSource) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1FlexVolumeSource) UnmarshalBinary(b []byte) error { + var res V1FlexVolumeSource + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_flocker_volume_source.go b/components/common/api/def/clients/config/models/v1_flocker_volume_source.go new file mode 100644 index 0000000..91cd3f0 --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_flocker_volume_source.go @@ -0,0 +1,58 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1FlockerVolumeSource Represents a Flocker volume mounted by the Flocker agent. +// One and only one of datasetName and datasetUUID should be set. +// Flocker volumes do not support ownership management or SELinux relabeling. +// +// swagger:model v1FlockerVolumeSource +type V1FlockerVolumeSource struct { + + // Name of the dataset stored as metadata -> name on the dataset for Flocker + // should be considered as deprecated + // +optional + DatasetName string `json:"datasetName,omitempty"` + + // UUID of the dataset. This is unique identifier of a Flocker dataset + // +optional + DatasetUUID string `json:"datasetUUID,omitempty"` +} + +// Validate validates this v1 flocker volume source +func (m *V1FlockerVolumeSource) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v1 flocker volume source based on context it is used +func (m *V1FlockerVolumeSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1FlockerVolumeSource) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1FlockerVolumeSource) UnmarshalBinary(b []byte) error { + var res V1FlockerVolumeSource + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_g_c_e_persistent_disk_volume_source.go b/components/common/api/def/clients/config/models/v1_g_c_e_persistent_disk_volume_source.go new file mode 100644 index 0000000..592a7d7 --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_g_c_e_persistent_disk_volume_source.go @@ -0,0 +1,78 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1GCEPersistentDiskVolumeSource Represents a Persistent Disk resource in Google Compute Engine. +// +// A GCE PD must exist before mounting to a container. The disk must +// also be in the same GCE project and zone as the kubelet. A GCE PD +// can only be mounted as read/write once or read-only many times. GCE +// PDs support ownership management and SELinux relabeling. +// +// swagger:model v1GCEPersistentDiskVolumeSource +type V1GCEPersistentDiskVolumeSource struct { + + // Filesystem type of the volume that you want to mount. + // Tip: Ensure that the filesystem type is supported by the host operating system. + // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + // More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + // TODO: how do we prevent errors in the filesystem from compromising the machine + // +optional + FsType string `json:"fsType,omitempty"` + + // The partition in the volume that you want to mount. + // If omitted, the default is to mount by volume name. + // Examples: For volume /dev/sda1, you specify the partition as "1". + // Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty). + // More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + // +optional + Partition int32 `json:"partition,omitempty"` + + // Unique name of the PD resource in GCE. Used to identify the disk in GCE. + // More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + PdName string `json:"pdName,omitempty"` + + // ReadOnly here will force the ReadOnly setting in VolumeMounts. + // Defaults to false. + // More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + // +optional + ReadOnly bool `json:"readOnly,omitempty"` +} + +// Validate validates this v1 g c e persistent disk volume source +func (m *V1GCEPersistentDiskVolumeSource) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v1 g c e persistent disk volume source based on context it is used +func (m *V1GCEPersistentDiskVolumeSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1GCEPersistentDiskVolumeSource) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1GCEPersistentDiskVolumeSource) UnmarshalBinary(b []byte) error { + var res V1GCEPersistentDiskVolumeSource + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_git_repo_volume_source.go b/components/common/api/def/clients/config/models/v1_git_repo_volume_source.go new file mode 100644 index 0000000..1b417d1 --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_git_repo_volume_source.go @@ -0,0 +1,67 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1GitRepoVolumeSource Represents a volume that is populated with the contents of a git repository. +// Git repo volumes do not support ownership management. +// Git repo volumes support SELinux relabeling. +// +// DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an +// EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir +// into the Pod's container. +// +// swagger:model v1GitRepoVolumeSource +type V1GitRepoVolumeSource struct { + + // Target directory name. + // Must not contain or start with '..'. If '.' is supplied, the volume directory will be the + // git repository. Otherwise, if specified, the volume will contain the git repository in + // the subdirectory with the given name. + // +optional + Directory string `json:"directory,omitempty"` + + // Repository URL + Repository string `json:"repository,omitempty"` + + // Commit hash for the specified revision. + // +optional + Revision string `json:"revision,omitempty"` +} + +// Validate validates this v1 git repo volume source +func (m *V1GitRepoVolumeSource) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v1 git repo volume source based on context it is used +func (m *V1GitRepoVolumeSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1GitRepoVolumeSource) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1GitRepoVolumeSource) UnmarshalBinary(b []byte) error { + var res V1GitRepoVolumeSource + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_glusterfs_volume_source.go b/components/common/api/def/clients/config/models/v1_glusterfs_volume_source.go new file mode 100644 index 0000000..ec92f9d --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_glusterfs_volume_source.go @@ -0,0 +1,62 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1GlusterfsVolumeSource Represents a Glusterfs mount that lasts the lifetime of a pod. +// Glusterfs volumes do not support ownership management or SELinux relabeling. +// +// swagger:model v1GlusterfsVolumeSource +type V1GlusterfsVolumeSource struct { + + // EndpointsName is the endpoint name that details Glusterfs topology. + // More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod + Endpoints string `json:"endpoints,omitempty"` + + // Path is the Glusterfs volume path. + // More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod + Path string `json:"path,omitempty"` + + // ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. + // Defaults to false. + // More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod + // +optional + ReadOnly bool `json:"readOnly,omitempty"` +} + +// Validate validates this v1 glusterfs volume source +func (m *V1GlusterfsVolumeSource) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v1 glusterfs volume source based on context it is used +func (m *V1GlusterfsVolumeSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1GlusterfsVolumeSource) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1GlusterfsVolumeSource) UnmarshalBinary(b []byte) error { + var res V1GlusterfsVolumeSource + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_handler.go b/components/common/api/def/clients/config/models/v1_handler.go new file mode 100644 index 0000000..84ef4a7 --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_handler.go @@ -0,0 +1,203 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1Handler Handler defines a specific action that should be taken +// TODO: pass structured data to these actions, and document that data here. +// +// swagger:model v1Handler +type V1Handler struct { + + // One and only one of the following should be specified. + // Exec specifies the action to take. + // +optional + Exec *V1ExecAction `json:"exec,omitempty"` + + // HTTPGet specifies the http request to perform. + // +optional + HTTPGet *V1HTTPGetAction `json:"httpGet,omitempty"` + + // TCPSocket specifies an action involving a TCP port. + // TCP hooks not yet supported + // TODO: implement a realistic TCP lifecycle hook + // +optional + TCPSocket *V1TCPSocketAction `json:"tcpSocket,omitempty"` +} + +// Validate validates this v1 handler +func (m *V1Handler) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateExec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateHTTPGet(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTCPSocket(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1Handler) validateExec(formats strfmt.Registry) error { + if swag.IsZero(m.Exec) { // not required + return nil + } + + if m.Exec != nil { + if err := m.Exec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("exec") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("exec") + } + return err + } + } + + return nil +} + +func (m *V1Handler) validateHTTPGet(formats strfmt.Registry) error { + if swag.IsZero(m.HTTPGet) { // not required + return nil + } + + if m.HTTPGet != nil { + if err := m.HTTPGet.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("httpGet") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("httpGet") + } + return err + } + } + + return nil +} + +func (m *V1Handler) validateTCPSocket(formats strfmt.Registry) error { + if swag.IsZero(m.TCPSocket) { // not required + return nil + } + + if m.TCPSocket != nil { + if err := m.TCPSocket.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tcpSocket") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tcpSocket") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v1 handler based on the context it is used +func (m *V1Handler) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateExec(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateHTTPGet(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateTCPSocket(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1Handler) contextValidateExec(ctx context.Context, formats strfmt.Registry) error { + + if m.Exec != nil { + if err := m.Exec.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("exec") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("exec") + } + return err + } + } + + return nil +} + +func (m *V1Handler) contextValidateHTTPGet(ctx context.Context, formats strfmt.Registry) error { + + if m.HTTPGet != nil { + if err := m.HTTPGet.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("httpGet") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("httpGet") + } + return err + } + } + + return nil +} + +func (m *V1Handler) contextValidateTCPSocket(ctx context.Context, formats strfmt.Registry) error { + + if m.TCPSocket != nil { + if err := m.TCPSocket.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tcpSocket") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tcpSocket") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1Handler) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1Handler) UnmarshalBinary(b []byte) error { + var res V1Handler + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_host_alias.go b/components/common/api/def/clients/config/models/v1_host_alias.go new file mode 100644 index 0000000..66d6413 --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_host_alias.go @@ -0,0 +1,54 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1HostAlias HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the +// pod's hosts file. +// +// swagger:model v1HostAlias +type V1HostAlias struct { + + // Hostnames for the above IP address. + Hostnames []string `json:"hostnames"` + + // IP address of the host file entry. + IP string `json:"ip,omitempty"` +} + +// Validate validates this v1 host alias +func (m *V1HostAlias) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v1 host alias based on context it is used +func (m *V1HostAlias) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1HostAlias) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1HostAlias) UnmarshalBinary(b []byte) error { + var res V1HostAlias + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_host_path_volume_source.go b/components/common/api/def/clients/config/models/v1_host_path_volume_source.go new file mode 100644 index 0000000..019b8ef --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_host_path_volume_source.go @@ -0,0 +1,59 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1HostPathVolumeSource Represents a host path mapped into a pod. +// Host path volumes do not support ownership management or SELinux relabeling. +// +// swagger:model v1HostPathVolumeSource +type V1HostPathVolumeSource struct { + + // Path of the directory on the host. + // If the path is a symlink, it will follow the link to the real path. + // More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath + Path string `json:"path,omitempty"` + + // Type for HostPath Volume + // Defaults to "" + // More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath + // +optional + Type string `json:"type,omitempty"` +} + +// Validate validates this v1 host path volume source +func (m *V1HostPathVolumeSource) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v1 host path volume source based on context it is used +func (m *V1HostPathVolumeSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1HostPathVolumeSource) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1HostPathVolumeSource) UnmarshalBinary(b []byte) error { + var res V1HostPathVolumeSource + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_http_get_action.go b/components/common/api/def/clients/config/models/v1_http_get_action.go new file mode 100644 index 0000000..e784c4a --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_http_get_action.go @@ -0,0 +1,179 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1HTTPGetAction HTTPGetAction describes an action based on HTTP Get requests. +// +// swagger:model v1HTTPGetAction +type V1HTTPGetAction struct { + + // Host name to connect to, defaults to the pod IP. You probably want to set + // "Host" in httpHeaders instead. + // +optional + Host string `json:"host,omitempty"` + + // Custom headers to set in the request. HTTP allows repeated headers. + // +optional + HTTPHeaders []*V1HTTPHeader `json:"httpHeaders"` + + // Path to access on the HTTP server. + // +optional + Path string `json:"path,omitempty"` + + // Name or number of the port to access on the container. + // Number must be in the range 1 to 65535. + // Name must be an IANA_SVC_NAME. + Port *IntstrIntOrString `json:"port,omitempty"` + + // Scheme to use for connecting to the host. + // Defaults to HTTP. + // +optional + Scheme string `json:"scheme,omitempty"` +} + +// Validate validates this v1 HTTP get action +func (m *V1HTTPGetAction) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateHTTPHeaders(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePort(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1HTTPGetAction) validateHTTPHeaders(formats strfmt.Registry) error { + if swag.IsZero(m.HTTPHeaders) { // not required + return nil + } + + for i := 0; i < len(m.HTTPHeaders); i++ { + if swag.IsZero(m.HTTPHeaders[i]) { // not required + continue + } + + if m.HTTPHeaders[i] != nil { + if err := m.HTTPHeaders[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("httpHeaders" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("httpHeaders" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1HTTPGetAction) validatePort(formats strfmt.Registry) error { + if swag.IsZero(m.Port) { // not required + return nil + } + + if m.Port != nil { + if err := m.Port.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("port") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("port") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v1 HTTP get action based on the context it is used +func (m *V1HTTPGetAction) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateHTTPHeaders(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidatePort(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1HTTPGetAction) contextValidateHTTPHeaders(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.HTTPHeaders); i++ { + + if m.HTTPHeaders[i] != nil { + if err := m.HTTPHeaders[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("httpHeaders" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("httpHeaders" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1HTTPGetAction) contextValidatePort(ctx context.Context, formats strfmt.Registry) error { + + if m.Port != nil { + if err := m.Port.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("port") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("port") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1HTTPGetAction) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1HTTPGetAction) UnmarshalBinary(b []byte) error { + var res V1HTTPGetAction + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_http_header.go b/components/common/api/def/clients/config/models/v1_http_header.go new file mode 100644 index 0000000..27999af --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_http_header.go @@ -0,0 +1,53 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1HTTPHeader HTTPHeader describes a custom header to be used in HTTP probes +// +// swagger:model v1HTTPHeader +type V1HTTPHeader struct { + + // The header field name + Name string `json:"name,omitempty"` + + // The header field value + Value string `json:"value,omitempty"` +} + +// Validate validates this v1 HTTP header +func (m *V1HTTPHeader) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v1 HTTP header based on context it is used +func (m *V1HTTPHeader) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1HTTPHeader) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1HTTPHeader) UnmarshalBinary(b []byte) error { + var res V1HTTPHeader + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_i_s_c_s_i_volume_source.go b/components/common/api/def/clients/config/models/v1_i_s_c_s_i_volume_source.go new file mode 100644 index 0000000..f628854 --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_i_s_c_s_i_volume_source.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ISCSIVolumeSource Represents an ISCSI disk. +// ISCSI volumes can only be mounted as read/write once. +// ISCSI volumes support ownership management and SELinux relabeling. +// +// swagger:model v1ISCSIVolumeSource +type V1ISCSIVolumeSource struct { + + // whether support iSCSI Discovery CHAP authentication + // +optional + ChapAuthDiscovery bool `json:"chapAuthDiscovery,omitempty"` + + // whether support iSCSI Session CHAP authentication + // +optional + ChapAuthSession bool `json:"chapAuthSession,omitempty"` + + // Filesystem type of the volume that you want to mount. + // Tip: Ensure that the filesystem type is supported by the host operating system. + // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + // More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi + // TODO: how do we prevent errors in the filesystem from compromising the machine + // +optional + FsType string `json:"fsType,omitempty"` + + // Custom iSCSI Initiator Name. + // If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface + // : will be created for the connection. + // +optional + InitiatorName string `json:"initiatorName,omitempty"` + + // Target iSCSI Qualified Name. + Iqn string `json:"iqn,omitempty"` + + // iSCSI Interface Name that uses an iSCSI transport. + // Defaults to 'default' (tcp). + // +optional + IscsiInterface string `json:"iscsiInterface,omitempty"` + + // iSCSI Target Lun number. + Lun int32 `json:"lun,omitempty"` + + // iSCSI Target Portal List. The portal is either an IP or ip_addr:port if the port + // is other than default (typically TCP ports 860 and 3260). + // +optional + Portals []string `json:"portals"` + + // ReadOnly here will force the ReadOnly setting in VolumeMounts. + // Defaults to false. + // +optional + ReadOnly bool `json:"readOnly,omitempty"` + + // CHAP Secret for iSCSI target and initiator authentication + // +optional + SecretRef *V1LocalObjectReference `json:"secretRef,omitempty"` + + // iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port + // is other than default (typically TCP ports 860 and 3260). + TargetPortal string `json:"targetPortal,omitempty"` +} + +// Validate validates this v1 i s c s i volume source +func (m *V1ISCSIVolumeSource) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateSecretRef(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ISCSIVolumeSource) validateSecretRef(formats strfmt.Registry) error { + if swag.IsZero(m.SecretRef) { // not required + return nil + } + + if m.SecretRef != nil { + if err := m.SecretRef.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("secretRef") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("secretRef") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v1 i s c s i volume source based on the context it is used +func (m *V1ISCSIVolumeSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateSecretRef(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ISCSIVolumeSource) contextValidateSecretRef(ctx context.Context, formats strfmt.Registry) error { + + if m.SecretRef != nil { + if err := m.SecretRef.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("secretRef") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("secretRef") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ISCSIVolumeSource) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ISCSIVolumeSource) UnmarshalBinary(b []byte) error { + var res V1ISCSIVolumeSource + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_job_spec.go b/components/common/api/def/clients/config/models/v1_job_spec.go new file mode 100644 index 0000000..9a425b1 --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_job_spec.go @@ -0,0 +1,206 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1JobSpec JobSpec describes how the job execution will look like. +// +// swagger:model v1JobSpec +type V1JobSpec struct { + + // Specifies the duration in seconds relative to the startTime that the job may be active + // before the system tries to terminate it; value must be positive integer + // +optional + ActiveDeadlineSeconds string `json:"activeDeadlineSeconds,omitempty"` + + // Specifies the number of retries before marking this job failed. + // Defaults to 6 + // +optional + BackoffLimit int32 `json:"backoffLimit,omitempty"` + + // Specifies the desired number of successfully finished pods the + // job should be run with. Setting to nil means that the success of any + // pod signals the success of all pods, and allows parallelism to have any positive + // value. Setting to 1 means that parallelism is limited to 1 and the success of that + // pod signals the success of the job. + // More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ + // +optional + Completions int32 `json:"completions,omitempty"` + + // manualSelector controls generation of pod labels and pod selectors. + // Leave `manualSelector` unset unless you are certain what you are doing. + // When false or unset, the system pick labels unique to this job + // and appends those labels to the pod template. When true, + // the user is responsible for picking unique labels and specifying + // the selector. Failure to pick a unique label may cause this + // and other jobs to not function correctly. However, You may see + // `manualSelector=true` in jobs that were created with the old `extensions/v1beta1` + // API. + // More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/#specifying-your-own-pod-selector + // +optional + ManualSelector bool `json:"manualSelector,omitempty"` + + // Specifies the maximum desired number of pods the job should + // run at any given time. The actual number of pods running in steady state will + // be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism), + // i.e. when the work left to do is less than max parallelism. + // More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ + // +optional + Parallelism int32 `json:"parallelism,omitempty"` + + // A label query over pods that should match the pod count. + // Normally, the system sets this field for you. + // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors + // +optional + Selector *V1LabelSelector `json:"selector,omitempty"` + + // Describes the pod that will be created when executing a job. + // More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ + Template *V1PodTemplateSpec `json:"template,omitempty"` + + // ttlSecondsAfterFinished limits the lifetime of a Job that has finished + // execution (either Complete or Failed). If this field is set, + // ttlSecondsAfterFinished after the Job finishes, it is eligible to be + // automatically deleted. When the Job is being deleted, its lifecycle + // guarantees (e.g. finalizers) will be honored. If this field is unset, + // the Job won't be automatically deleted. If this field is set to zero, + // the Job becomes eligible to be deleted immediately after it finishes. + // This field is alpha-level and is only honored by servers that enable the + // TTLAfterFinished feature. + // +optional + TTLSecondsAfterFinished int32 `json:"ttlSecondsAfterFinished,omitempty"` +} + +// Validate validates this v1 job spec +func (m *V1JobSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateSelector(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTemplate(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1JobSpec) validateSelector(formats strfmt.Registry) error { + if swag.IsZero(m.Selector) { // not required + return nil + } + + if m.Selector != nil { + if err := m.Selector.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("selector") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("selector") + } + return err + } + } + + return nil +} + +func (m *V1JobSpec) validateTemplate(formats strfmt.Registry) error { + if swag.IsZero(m.Template) { // not required + return nil + } + + if m.Template != nil { + if err := m.Template.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("template") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("template") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v1 job spec based on the context it is used +func (m *V1JobSpec) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateSelector(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateTemplate(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1JobSpec) contextValidateSelector(ctx context.Context, formats strfmt.Registry) error { + + if m.Selector != nil { + if err := m.Selector.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("selector") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("selector") + } + return err + } + } + + return nil +} + +func (m *V1JobSpec) contextValidateTemplate(ctx context.Context, formats strfmt.Registry) error { + + if m.Template != nil { + if err := m.Template.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("template") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("template") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1JobSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1JobSpec) UnmarshalBinary(b []byte) error { + var res V1JobSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_key_to_path.go b/components/common/api/def/clients/config/models/v1_key_to_path.go new file mode 100644 index 0000000..afd4c1c --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_key_to_path.go @@ -0,0 +1,65 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1KeyToPath Maps a string key to a path within a volume. +// +// swagger:model v1KeyToPath +type V1KeyToPath struct { + + // The key to project. + Key string `json:"key,omitempty"` + + // Optional: mode bits used to set permissions on this file. + // Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. + // YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. + // If not specified, the volume defaultMode will be used. + // This might be in conflict with other options that affect the file + // mode, like fsGroup, and the result can be other mode bits set. + // +optional + Mode int32 `json:"mode,omitempty"` + + // The relative path of the file to map the key to. + // May not be an absolute path. + // May not contain the path element '..'. + // May not start with the string '..'. + Path string `json:"path,omitempty"` +} + +// Validate validates this v1 key to path +func (m *V1KeyToPath) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v1 key to path based on context it is used +func (m *V1KeyToPath) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1KeyToPath) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1KeyToPath) UnmarshalBinary(b []byte) error { + var res V1KeyToPath + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_label_selector.go b/components/common/api/def/clients/config/models/v1_label_selector.go new file mode 100644 index 0000000..8f0eb16 --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_label_selector.go @@ -0,0 +1,125 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1LabelSelector A label selector is a label query over a set of resources. The result of matchLabels and +// matchExpressions are ANDed. An empty label selector matches all objects. A null +// label selector matches no objects. +// +// swagger:model v1LabelSelector +type V1LabelSelector struct { + + // matchExpressions is a list of label selector requirements. The requirements are ANDed. + // +optional + MatchExpressions []*V1LabelSelectorRequirement `json:"matchExpressions"` + + // matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + // map is equivalent to an element of matchExpressions, whose key field is "key", the + // operator is "In", and the values array contains only "value". The requirements are ANDed. + // +optional + MatchLabels map[string]string `json:"matchLabels,omitempty"` +} + +// Validate validates this v1 label selector +func (m *V1LabelSelector) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMatchExpressions(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1LabelSelector) validateMatchExpressions(formats strfmt.Registry) error { + if swag.IsZero(m.MatchExpressions) { // not required + return nil + } + + for i := 0; i < len(m.MatchExpressions); i++ { + if swag.IsZero(m.MatchExpressions[i]) { // not required + continue + } + + if m.MatchExpressions[i] != nil { + if err := m.MatchExpressions[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("matchExpressions" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("matchExpressions" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this v1 label selector based on the context it is used +func (m *V1LabelSelector) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateMatchExpressions(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1LabelSelector) contextValidateMatchExpressions(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.MatchExpressions); i++ { + + if m.MatchExpressions[i] != nil { + if err := m.MatchExpressions[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("matchExpressions" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("matchExpressions" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1LabelSelector) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1LabelSelector) UnmarshalBinary(b []byte) error { + var res V1LabelSelector + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_label_selector_requirement.go b/components/common/api/def/clients/config/models/v1_label_selector_requirement.go new file mode 100644 index 0000000..5a450d3 --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_label_selector_requirement.go @@ -0,0 +1,64 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1LabelSelectorRequirement A label selector requirement is a selector that contains values, a key, and an operator that +// relates the key and values. +// +// swagger:model v1LabelSelectorRequirement +type V1LabelSelectorRequirement struct { + + // key is the label key that the selector applies to. + // +patchMergeKey=key + // +patchStrategy=merge + Key string `json:"key,omitempty"` + + // operator represents a key's relationship to a set of values. + // Valid operators are In, NotIn, Exists and DoesNotExist. + Operator string `json:"operator,omitempty"` + + // values is an array of string values. If the operator is In or NotIn, + // the values array must be non-empty. If the operator is Exists or DoesNotExist, + // the values array must be empty. This array is replaced during a strategic + // merge patch. + // +optional + Values []string `json:"values"` +} + +// Validate validates this v1 label selector requirement +func (m *V1LabelSelectorRequirement) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v1 label selector requirement based on context it is used +func (m *V1LabelSelectorRequirement) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1LabelSelectorRequirement) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1LabelSelectorRequirement) UnmarshalBinary(b []byte) error { + var res V1LabelSelectorRequirement + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_lifecycle.go b/components/common/api/def/clients/config/models/v1_lifecycle.go new file mode 100644 index 0000000..1d9b7e4 --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_lifecycle.go @@ -0,0 +1,166 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1Lifecycle Lifecycle describes actions that the management system should take in response to container lifecycle +// events. For the PostStart and PreStop lifecycle handlers, management of the container blocks +// until the action is complete, unless the container process fails, in which case the handler is aborted. +// +// swagger:model v1Lifecycle +type V1Lifecycle struct { + + // PostStart is called immediately after a container is created. If the handler fails, + // the container is terminated and restarted according to its restart policy. + // Other management of the container blocks until the hook completes. + // More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks + // +optional + PostStart *V1Handler `json:"postStart,omitempty"` + + // PreStop is called immediately before a container is terminated due to an + // API request or management event such as liveness/startup probe failure, + // preemption, resource contention, etc. The handler is not called if the + // container crashes or exits. The reason for termination is passed to the + // handler. The Pod's termination grace period countdown begins before the + // PreStop hooked is executed. Regardless of the outcome of the handler, the + // container will eventually terminate within the Pod's termination grace + // period. Other management of the container blocks until the hook completes + // or until the termination grace period is reached. + // More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks + // +optional + PreStop *V1Handler `json:"preStop,omitempty"` +} + +// Validate validates this v1 lifecycle +func (m *V1Lifecycle) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validatePostStart(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePreStop(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1Lifecycle) validatePostStart(formats strfmt.Registry) error { + if swag.IsZero(m.PostStart) { // not required + return nil + } + + if m.PostStart != nil { + if err := m.PostStart.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("postStart") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("postStart") + } + return err + } + } + + return nil +} + +func (m *V1Lifecycle) validatePreStop(formats strfmt.Registry) error { + if swag.IsZero(m.PreStop) { // not required + return nil + } + + if m.PreStop != nil { + if err := m.PreStop.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("preStop") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("preStop") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v1 lifecycle based on the context it is used +func (m *V1Lifecycle) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidatePostStart(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidatePreStop(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1Lifecycle) contextValidatePostStart(ctx context.Context, formats strfmt.Registry) error { + + if m.PostStart != nil { + if err := m.PostStart.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("postStart") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("postStart") + } + return err + } + } + + return nil +} + +func (m *V1Lifecycle) contextValidatePreStop(ctx context.Context, formats strfmt.Registry) error { + + if m.PreStop != nil { + if err := m.PreStop.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("preStop") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("preStop") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1Lifecycle) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1Lifecycle) UnmarshalBinary(b []byte) error { + var res V1Lifecycle + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_local_object_reference.go b/components/common/api/def/clients/config/models/v1_local_object_reference.go new file mode 100644 index 0000000..bb2dc1f --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_local_object_reference.go @@ -0,0 +1,54 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1LocalObjectReference LocalObjectReference contains enough information to let you locate the +// referenced object inside the same namespace. +// +// swagger:model v1LocalObjectReference +type V1LocalObjectReference struct { + + // Name of the referent. + // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + // TODO: Add other useful fields. apiVersion, kind, uid? + // +optional + Name string `json:"name,omitempty"` +} + +// Validate validates this v1 local object reference +func (m *V1LocalObjectReference) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v1 local object reference based on context it is used +func (m *V1LocalObjectReference) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1LocalObjectReference) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1LocalObjectReference) UnmarshalBinary(b []byte) error { + var res V1LocalObjectReference + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_managed_fields_entry.go b/components/common/api/def/clients/config/models/v1_managed_fields_entry.go new file mode 100644 index 0000000..58af06e --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_managed_fields_entry.go @@ -0,0 +1,170 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ManagedFieldsEntry ManagedFieldsEntry is a workflow-id, a FieldSet and the group version of the resource +// that the fieldset applies to. +// +// swagger:model v1ManagedFieldsEntry +type V1ManagedFieldsEntry struct { + + // APIVersion defines the version of this resource that this field set + // applies to. The format is "group/version" just like the top-level + // APIVersion field. It is necessary to track the version of a field + // set because it cannot be automatically converted. + APIVersion string `json:"apiVersion,omitempty"` + + // FieldsType is the discriminator for the different fields format and version. + // There is currently only one possible value: "FieldsV1" + FieldsType string `json:"fieldsType,omitempty"` + + // FieldsV1 holds the first JSON version format as described in the "FieldsV1" type. + // +optional + FieldsV1 *V1FieldsV1 `json:"fieldsV1,omitempty"` + + // Manager is an identifier of the workflow managing these fields. + Manager string `json:"manager,omitempty"` + + // Operation is the type of operation which lead to this ManagedFieldsEntry being created. + // The only valid values for this field are 'Apply' and 'Update'. + Operation string `json:"operation,omitempty"` + + // Time is timestamp of when these fields were set. It should always be empty if Operation is 'Apply' + // +optional + Time *V1Time `json:"time,omitempty"` +} + +// Validate validates this v1 managed fields entry +func (m *V1ManagedFieldsEntry) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateFieldsV1(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTime(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ManagedFieldsEntry) validateFieldsV1(formats strfmt.Registry) error { + if swag.IsZero(m.FieldsV1) { // not required + return nil + } + + if m.FieldsV1 != nil { + if err := m.FieldsV1.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("fieldsV1") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("fieldsV1") + } + return err + } + } + + return nil +} + +func (m *V1ManagedFieldsEntry) validateTime(formats strfmt.Registry) error { + if swag.IsZero(m.Time) { // not required + return nil + } + + if m.Time != nil { + if err := m.Time.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("time") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("time") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v1 managed fields entry based on the context it is used +func (m *V1ManagedFieldsEntry) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateFieldsV1(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateTime(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ManagedFieldsEntry) contextValidateFieldsV1(ctx context.Context, formats strfmt.Registry) error { + + if m.FieldsV1 != nil { + if err := m.FieldsV1.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("fieldsV1") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("fieldsV1") + } + return err + } + } + + return nil +} + +func (m *V1ManagedFieldsEntry) contextValidateTime(ctx context.Context, formats strfmt.Registry) error { + + if m.Time != nil { + if err := m.Time.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("time") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("time") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ManagedFieldsEntry) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ManagedFieldsEntry) UnmarshalBinary(b []byte) error { + var res V1ManagedFieldsEntry + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_n_f_s_volume_source.go b/components/common/api/def/clients/config/models/v1_n_f_s_volume_source.go new file mode 100644 index 0000000..b955d5d --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_n_f_s_volume_source.go @@ -0,0 +1,63 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1NFSVolumeSource Represents an NFS mount that lasts the lifetime of a pod. +// NFS volumes do not support ownership management or SELinux relabeling. +// +// swagger:model v1NFSVolumeSource +type V1NFSVolumeSource struct { + + // Path that is exported by the NFS server. + // More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs + Path string `json:"path,omitempty"` + + // ReadOnly here will force + // the NFS export to be mounted with read-only permissions. + // Defaults to false. + // More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs + // +optional + ReadOnly bool `json:"readOnly,omitempty"` + + // Server is the hostname or IP address of the NFS server. + // More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs + Server string `json:"server,omitempty"` +} + +// Validate validates this v1 n f s volume source +func (m *V1NFSVolumeSource) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v1 n f s volume source based on context it is used +func (m *V1NFSVolumeSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1NFSVolumeSource) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1NFSVolumeSource) UnmarshalBinary(b []byte) error { + var res V1NFSVolumeSource + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_node_affinity.go b/components/common/api/def/clients/config/models/v1_node_affinity.go new file mode 100644 index 0000000..784c83c --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_node_affinity.go @@ -0,0 +1,176 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1NodeAffinity Node affinity is a group of node affinity scheduling rules. +// +// swagger:model v1NodeAffinity +type V1NodeAffinity struct { + + // The scheduler will prefer to schedule pods to nodes that satisfy + // the affinity expressions specified by this field, but it may choose + // a node that violates one or more of the expressions. The node that is + // most preferred is the one with the greatest sum of weights, i.e. + // for each node that meets all of the scheduling requirements (resource + // request, requiredDuringScheduling affinity expressions, etc.), + // compute a sum by iterating through the elements of this field and adding + // "weight" to the sum if the node matches the corresponding matchExpressions; the + // node(s) with the highest sum are the most preferred. + // +optional + PreferredDuringSchedulingIgnoredDuringExecution []*V1PreferredSchedulingTerm `json:"preferredDuringSchedulingIgnoredDuringExecution"` + + // If the affinity requirements specified by this field are not met at + // scheduling time, the pod will not be scheduled onto the node. + // If the affinity requirements specified by this field cease to be met + // at some point during pod execution (e.g. due to an update), the system + // may or may not try to eventually evict the pod from its node. + // +optional + RequiredDuringSchedulingIgnoredDuringExecution *V1NodeSelector `json:"requiredDuringSchedulingIgnoredDuringExecution,omitempty"` +} + +// Validate validates this v1 node affinity +func (m *V1NodeAffinity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validatePreferredDuringSchedulingIgnoredDuringExecution(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRequiredDuringSchedulingIgnoredDuringExecution(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1NodeAffinity) validatePreferredDuringSchedulingIgnoredDuringExecution(formats strfmt.Registry) error { + if swag.IsZero(m.PreferredDuringSchedulingIgnoredDuringExecution) { // not required + return nil + } + + for i := 0; i < len(m.PreferredDuringSchedulingIgnoredDuringExecution); i++ { + if swag.IsZero(m.PreferredDuringSchedulingIgnoredDuringExecution[i]) { // not required + continue + } + + if m.PreferredDuringSchedulingIgnoredDuringExecution[i] != nil { + if err := m.PreferredDuringSchedulingIgnoredDuringExecution[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("preferredDuringSchedulingIgnoredDuringExecution" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("preferredDuringSchedulingIgnoredDuringExecution" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1NodeAffinity) validateRequiredDuringSchedulingIgnoredDuringExecution(formats strfmt.Registry) error { + if swag.IsZero(m.RequiredDuringSchedulingIgnoredDuringExecution) { // not required + return nil + } + + if m.RequiredDuringSchedulingIgnoredDuringExecution != nil { + if err := m.RequiredDuringSchedulingIgnoredDuringExecution.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("requiredDuringSchedulingIgnoredDuringExecution") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("requiredDuringSchedulingIgnoredDuringExecution") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v1 node affinity based on the context it is used +func (m *V1NodeAffinity) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidatePreferredDuringSchedulingIgnoredDuringExecution(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateRequiredDuringSchedulingIgnoredDuringExecution(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1NodeAffinity) contextValidatePreferredDuringSchedulingIgnoredDuringExecution(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.PreferredDuringSchedulingIgnoredDuringExecution); i++ { + + if m.PreferredDuringSchedulingIgnoredDuringExecution[i] != nil { + if err := m.PreferredDuringSchedulingIgnoredDuringExecution[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("preferredDuringSchedulingIgnoredDuringExecution" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("preferredDuringSchedulingIgnoredDuringExecution" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1NodeAffinity) contextValidateRequiredDuringSchedulingIgnoredDuringExecution(ctx context.Context, formats strfmt.Registry) error { + + if m.RequiredDuringSchedulingIgnoredDuringExecution != nil { + if err := m.RequiredDuringSchedulingIgnoredDuringExecution.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("requiredDuringSchedulingIgnoredDuringExecution") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("requiredDuringSchedulingIgnoredDuringExecution") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1NodeAffinity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1NodeAffinity) UnmarshalBinary(b []byte) error { + var res V1NodeAffinity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_node_selector.go b/components/common/api/def/clients/config/models/v1_node_selector.go new file mode 100644 index 0000000..22e786c --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_node_selector.go @@ -0,0 +1,118 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1NodeSelector A node selector represents the union of the results of one or more label queries +// over a set of nodes; that is, it represents the OR of the selectors represented +// by the node selector terms. +// +// swagger:model v1NodeSelector +type V1NodeSelector struct { + + // Required. A list of node selector terms. The terms are ORed. + NodeSelectorTerms []*V1NodeSelectorTerm `json:"nodeSelectorTerms"` +} + +// Validate validates this v1 node selector +func (m *V1NodeSelector) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateNodeSelectorTerms(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1NodeSelector) validateNodeSelectorTerms(formats strfmt.Registry) error { + if swag.IsZero(m.NodeSelectorTerms) { // not required + return nil + } + + for i := 0; i < len(m.NodeSelectorTerms); i++ { + if swag.IsZero(m.NodeSelectorTerms[i]) { // not required + continue + } + + if m.NodeSelectorTerms[i] != nil { + if err := m.NodeSelectorTerms[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("nodeSelectorTerms" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("nodeSelectorTerms" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this v1 node selector based on the context it is used +func (m *V1NodeSelector) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateNodeSelectorTerms(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1NodeSelector) contextValidateNodeSelectorTerms(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.NodeSelectorTerms); i++ { + + if m.NodeSelectorTerms[i] != nil { + if err := m.NodeSelectorTerms[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("nodeSelectorTerms" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("nodeSelectorTerms" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1NodeSelector) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1NodeSelector) UnmarshalBinary(b []byte) error { + var res V1NodeSelector + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_node_selector_requirement.go b/components/common/api/def/clients/config/models/v1_node_selector_requirement.go new file mode 100644 index 0000000..eff875f --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_node_selector_requirement.go @@ -0,0 +1,63 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1NodeSelectorRequirement A node selector requirement is a selector that contains values, a key, and an operator +// that relates the key and values. +// +// swagger:model v1NodeSelectorRequirement +type V1NodeSelectorRequirement struct { + + // The label key that the selector applies to. + Key string `json:"key,omitempty"` + + // Represents a key's relationship to a set of values. + // Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. + Operator string `json:"operator,omitempty"` + + // An array of string values. If the operator is In or NotIn, + // the values array must be non-empty. If the operator is Exists or DoesNotExist, + // the values array must be empty. If the operator is Gt or Lt, the values + // array must have a single element, which will be interpreted as an integer. + // This array is replaced during a strategic merge patch. + // +optional + Values []string `json:"values"` +} + +// Validate validates this v1 node selector requirement +func (m *V1NodeSelectorRequirement) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v1 node selector requirement based on context it is used +func (m *V1NodeSelectorRequirement) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1NodeSelectorRequirement) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1NodeSelectorRequirement) UnmarshalBinary(b []byte) error { + var res V1NodeSelectorRequirement + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_node_selector_term.go b/components/common/api/def/clients/config/models/v1_node_selector_term.go new file mode 100644 index 0000000..6d4932a --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_node_selector_term.go @@ -0,0 +1,177 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1NodeSelectorTerm A null or empty node selector term matches no objects. The requirements of +// them are ANDed. +// The TopologySelectorTerm type implements a subset of the NodeSelectorTerm. +// +// swagger:model v1NodeSelectorTerm +type V1NodeSelectorTerm struct { + + // A list of node selector requirements by node's labels. + // +optional + MatchExpressions []*V1NodeSelectorRequirement `json:"matchExpressions"` + + // A list of node selector requirements by node's fields. + // +optional + MatchFields []*V1NodeSelectorRequirement `json:"matchFields"` +} + +// Validate validates this v1 node selector term +func (m *V1NodeSelectorTerm) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMatchExpressions(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMatchFields(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1NodeSelectorTerm) validateMatchExpressions(formats strfmt.Registry) error { + if swag.IsZero(m.MatchExpressions) { // not required + return nil + } + + for i := 0; i < len(m.MatchExpressions); i++ { + if swag.IsZero(m.MatchExpressions[i]) { // not required + continue + } + + if m.MatchExpressions[i] != nil { + if err := m.MatchExpressions[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("matchExpressions" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("matchExpressions" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1NodeSelectorTerm) validateMatchFields(formats strfmt.Registry) error { + if swag.IsZero(m.MatchFields) { // not required + return nil + } + + for i := 0; i < len(m.MatchFields); i++ { + if swag.IsZero(m.MatchFields[i]) { // not required + continue + } + + if m.MatchFields[i] != nil { + if err := m.MatchFields[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("matchFields" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("matchFields" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this v1 node selector term based on the context it is used +func (m *V1NodeSelectorTerm) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateMatchExpressions(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateMatchFields(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1NodeSelectorTerm) contextValidateMatchExpressions(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.MatchExpressions); i++ { + + if m.MatchExpressions[i] != nil { + if err := m.MatchExpressions[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("matchExpressions" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("matchExpressions" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1NodeSelectorTerm) contextValidateMatchFields(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.MatchFields); i++ { + + if m.MatchFields[i] != nil { + if err := m.MatchFields[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("matchFields" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("matchFields" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1NodeSelectorTerm) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1NodeSelectorTerm) UnmarshalBinary(b []byte) error { + var res V1NodeSelectorTerm + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_object_field_selector.go b/components/common/api/def/clients/config/models/v1_object_field_selector.go new file mode 100644 index 0000000..76d7a5b --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_object_field_selector.go @@ -0,0 +1,54 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ObjectFieldSelector ObjectFieldSelector selects an APIVersioned field of an object. +// +// swagger:model v1ObjectFieldSelector +type V1ObjectFieldSelector struct { + + // Version of the schema the FieldPath is written in terms of, defaults to "v1". + // +optional + APIVersion string `json:"apiVersion,omitempty"` + + // Path of the field to select in the specified API version. + FieldPath string `json:"fieldPath,omitempty"` +} + +// Validate validates this v1 object field selector +func (m *V1ObjectFieldSelector) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v1 object field selector based on context it is used +func (m *V1ObjectFieldSelector) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ObjectFieldSelector) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ObjectFieldSelector) UnmarshalBinary(b []byte) error { + var res V1ObjectFieldSelector + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_object_meta.go b/components/common/api/def/clients/config/models/v1_object_meta.go new file mode 100644 index 0000000..f89639e --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_object_meta.go @@ -0,0 +1,426 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ObjectMeta ObjectMeta is metadata that all persisted resources must have, which includes all objects +// users must create. +// +// swagger:model v1ObjectMeta +type V1ObjectMeta struct { + + // Annotations is an unstructured key value map stored with a resource that may be + // set by external tools to store and retrieve arbitrary metadata. They are not + // queryable and should be preserved when modifying objects. + // More info: http://kubernetes.io/docs/user-guide/annotations + // +optional + Annotations map[string]string `json:"annotations,omitempty"` + + // The name of the cluster which the object belongs to. + // This is used to distinguish resources with same name and namespace in different clusters. + // This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. + // +optional + ClusterName string `json:"clusterName,omitempty"` + + // CreationTimestamp is a timestamp representing the server time when this object was + // created. It is not guaranteed to be set in happens-before order across separate operations. + // Clients may not set this value. It is represented in RFC3339 form and is in UTC. + // + // Populated by the system. + // Read-only. + // Null for lists. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // +optional + CreationTimestamp *V1Time `json:"creationTimestamp,omitempty"` + + // Number of seconds allowed for this object to gracefully terminate before + // it will be removed from the system. Only set when deletionTimestamp is also set. + // May only be shortened. + // Read-only. + // +optional + DeletionGracePeriodSeconds string `json:"deletionGracePeriodSeconds,omitempty"` + + // DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This + // field is set by the server when a graceful deletion is requested by the user, and is not + // directly settable by a client. The resource is expected to be deleted (no longer visible + // from resource lists, and not reachable by name) after the time in this field, once the + // finalizers list is empty. As long as the finalizers list contains items, deletion is blocked. + // Once the deletionTimestamp is set, this value may not be unset or be set further into the + // future, although it may be shortened or the resource may be deleted prior to this time. + // For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react + // by sending a graceful termination signal to the containers in the pod. After that 30 seconds, + // the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, + // remove the pod from the API. In the presence of network partitions, this object may still + // exist after this timestamp, until an administrator or automated process can determine the + // resource is fully terminated. + // If not set, graceful deletion of the object has not been requested. + // + // Populated by the system when a graceful deletion is requested. + // Read-only. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // +optional + DeletionTimestamp *V1Time `json:"deletionTimestamp,omitempty"` + + // Must be empty before the object is deleted from the registry. Each entry + // is an identifier for the responsible component that will remove the entry + // from the list. If the deletionTimestamp of the object is non-nil, entries + // in this list can only be removed. + // Finalizers may be processed and removed in any order. Order is NOT enforced + // because it introduces significant risk of stuck finalizers. + // finalizers is a shared field, any actor with permission can reorder it. + // If the finalizer list is processed in order, then this can lead to a situation + // in which the component responsible for the first finalizer in the list is + // waiting for a signal (field value, external system, or other) produced by a + // component responsible for a finalizer later in the list, resulting in a deadlock. + // Without enforced ordering finalizers are free to order amongst themselves and + // are not vulnerable to ordering changes in the list. + // +optional + // +patchStrategy=merge + Finalizers []string `json:"finalizers"` + + // GenerateName is an optional prefix, used by the server, to generate a unique + // name ONLY IF the Name field has not been provided. + // If this field is used, the name returned to the client will be different + // than the name passed. This value will also be combined with a unique suffix. + // The provided value has the same validation rules as the Name field, + // and may be truncated by the length of the suffix required to make the value + // unique on the server. + // + // If this field is specified and the generated name exists, the server will + // NOT return a 409 - instead, it will either return 201 Created or 500 with Reason + // ServerTimeout indicating a unique name could not be found in the time allotted, and the client + // should retry (optionally after the time indicated in the Retry-After header). + // + // Applied only if Name is not specified. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency + // +optional + GenerateName string `json:"generateName,omitempty"` + + // A sequence number representing a specific generation of the desired state. + // Populated by the system. Read-only. + // +optional + Generation string `json:"generation,omitempty"` + + // Map of string keys and values that can be used to organize and categorize + // (scope and select) objects. May match selectors of replication controllers + // and services. + // More info: http://kubernetes.io/docs/user-guide/labels + // +optional + Labels map[string]string `json:"labels,omitempty"` + + // ManagedFields maps workflow-id and version to the set of fields + // that are managed by that workflow. This is mostly for internal + // housekeeping, and users typically shouldn't need to set or + // understand this field. A workflow can be the user's name, a + // controller's name, or the name of a specific apply path like + // "ci-cd". The set of fields is always in the version that the + // workflow used when modifying the object. + // + // +optional + ManagedFields []*V1ManagedFieldsEntry `json:"managedFields"` + + // Name must be unique within a namespace. Is required when creating resources, although + // some resources may allow a client to request the generation of an appropriate name + // automatically. Name is primarily intended for creation idempotence and configuration + // definition. + // Cannot be updated. + // More info: http://kubernetes.io/docs/user-guide/identifiers#names + // +optional + Name string `json:"name,omitempty"` + + // Namespace defines the space within which each name must be unique. An empty namespace is + // equivalent to the "default" namespace, but "default" is the canonical representation. + // Not all objects are required to be scoped to a namespace - the value of this field for + // those objects will be empty. + // + // Must be a DNS_LABEL. + // Cannot be updated. + // More info: http://kubernetes.io/docs/user-guide/namespaces + // +optional + Namespace string `json:"namespace,omitempty"` + + // List of objects depended by this object. If ALL objects in the list have + // been deleted, this object will be garbage collected. If this object is managed by a controller, + // then an entry in this list will point to this controller, with the controller field set to true. + // There cannot be more than one managing controller. + // +optional + // +patchMergeKey=uid + // +patchStrategy=merge + OwnerReferences []*V1OwnerReference `json:"ownerReferences"` + + // An opaque value that represents the internal version of this object that can + // be used by clients to determine when objects have changed. May be used for optimistic + // concurrency, change detection, and the watch operation on a resource or set of resources. + // Clients must treat these values as opaque and passed unmodified back to the server. + // They may only be valid for a particular resource or set of resources. + // + // Populated by the system. + // Read-only. + // Value must be treated as opaque by clients and . + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency + // +optional + ResourceVersion string `json:"resourceVersion,omitempty"` + + // SelfLink is a URL representing this object. + // Populated by the system. + // Read-only. + // + // DEPRECATED + // Kubernetes will stop propagating this field in 1.20 release and the field is planned + // to be removed in 1.21 release. + // +optional + SelfLink string `json:"selfLink,omitempty"` + + // UID is the unique in time and space value for this object. It is typically generated by + // the server on successful creation of a resource and is not allowed to change on PUT + // operations. + // + // Populated by the system. + // Read-only. + // More info: http://kubernetes.io/docs/user-guide/identifiers#uids + // +optional + UID string `json:"uid,omitempty"` +} + +// Validate validates this v1 object meta +func (m *V1ObjectMeta) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCreationTimestamp(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDeletionTimestamp(formats); err != nil { + res = append(res, err) + } + + if err := m.validateManagedFields(formats); err != nil { + res = append(res, err) + } + + if err := m.validateOwnerReferences(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ObjectMeta) validateCreationTimestamp(formats strfmt.Registry) error { + if swag.IsZero(m.CreationTimestamp) { // not required + return nil + } + + if m.CreationTimestamp != nil { + if err := m.CreationTimestamp.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("creationTimestamp") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("creationTimestamp") + } + return err + } + } + + return nil +} + +func (m *V1ObjectMeta) validateDeletionTimestamp(formats strfmt.Registry) error { + if swag.IsZero(m.DeletionTimestamp) { // not required + return nil + } + + if m.DeletionTimestamp != nil { + if err := m.DeletionTimestamp.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("deletionTimestamp") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("deletionTimestamp") + } + return err + } + } + + return nil +} + +func (m *V1ObjectMeta) validateManagedFields(formats strfmt.Registry) error { + if swag.IsZero(m.ManagedFields) { // not required + return nil + } + + for i := 0; i < len(m.ManagedFields); i++ { + if swag.IsZero(m.ManagedFields[i]) { // not required + continue + } + + if m.ManagedFields[i] != nil { + if err := m.ManagedFields[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("managedFields" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("managedFields" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1ObjectMeta) validateOwnerReferences(formats strfmt.Registry) error { + if swag.IsZero(m.OwnerReferences) { // not required + return nil + } + + for i := 0; i < len(m.OwnerReferences); i++ { + if swag.IsZero(m.OwnerReferences[i]) { // not required + continue + } + + if m.OwnerReferences[i] != nil { + if err := m.OwnerReferences[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("ownerReferences" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("ownerReferences" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this v1 object meta based on the context it is used +func (m *V1ObjectMeta) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateCreationTimestamp(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateDeletionTimestamp(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateManagedFields(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateOwnerReferences(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ObjectMeta) contextValidateCreationTimestamp(ctx context.Context, formats strfmt.Registry) error { + + if m.CreationTimestamp != nil { + if err := m.CreationTimestamp.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("creationTimestamp") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("creationTimestamp") + } + return err + } + } + + return nil +} + +func (m *V1ObjectMeta) contextValidateDeletionTimestamp(ctx context.Context, formats strfmt.Registry) error { + + if m.DeletionTimestamp != nil { + if err := m.DeletionTimestamp.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("deletionTimestamp") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("deletionTimestamp") + } + return err + } + } + + return nil +} + +func (m *V1ObjectMeta) contextValidateManagedFields(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.ManagedFields); i++ { + + if m.ManagedFields[i] != nil { + if err := m.ManagedFields[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("managedFields" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("managedFields" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1ObjectMeta) contextValidateOwnerReferences(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.OwnerReferences); i++ { + + if m.OwnerReferences[i] != nil { + if err := m.OwnerReferences[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("ownerReferences" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("ownerReferences" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ObjectMeta) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ObjectMeta) UnmarshalBinary(b []byte) error { + var res V1ObjectMeta + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_owner_reference.go b/components/common/api/def/clients/config/models/v1_owner_reference.go new file mode 100644 index 0000000..dfc6d7e --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_owner_reference.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1OwnerReference OwnerReference contains enough information to let you identify an owning +// object. An owning object must be in the same namespace as the dependent, or +// be cluster-scoped, so there is no namespace field. +// +// swagger:model v1OwnerReference +type V1OwnerReference struct { + + // API version of the referent. + APIVersion string `json:"apiVersion,omitempty"` + + // If true, AND if the owner has the "foregroundDeletion" finalizer, then + // the owner cannot be deleted from the key-value store until this + // reference is removed. + // Defaults to false. + // To set this field, a user needs "delete" permission of the owner, + // otherwise 422 (Unprocessable Entity) will be returned. + // +optional + BlockOwnerDeletion bool `json:"blockOwnerDeletion,omitempty"` + + // If true, this reference points to the managing controller. + // +optional + Controller bool `json:"controller,omitempty"` + + // Kind of the referent. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind string `json:"kind,omitempty"` + + // Name of the referent. + // More info: http://kubernetes.io/docs/user-guide/identifiers#names + Name string `json:"name,omitempty"` + + // UID of the referent. + // More info: http://kubernetes.io/docs/user-guide/identifiers#uids + UID string `json:"uid,omitempty"` +} + +// Validate validates this v1 owner reference +func (m *V1OwnerReference) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v1 owner reference based on context it is used +func (m *V1OwnerReference) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1OwnerReference) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1OwnerReference) UnmarshalBinary(b []byte) error { + var res V1OwnerReference + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_persistent_volume_claim_spec.go b/components/common/api/def/clients/config/models/v1_persistent_volume_claim_spec.go new file mode 100644 index 0000000..88fd66a --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_persistent_volume_claim_spec.go @@ -0,0 +1,227 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1PersistentVolumeClaimSpec PersistentVolumeClaimSpec describes the common attributes of storage devices +// and allows a Source for provider-specific attributes +// +// swagger:model v1PersistentVolumeClaimSpec +type V1PersistentVolumeClaimSpec struct { + + // AccessModes contains the desired access modes the volume should have. + // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 + // +optional + AccessModes []string `json:"accessModes"` + + // This field can be used to specify either: + // * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) + // * An existing PVC (PersistentVolumeClaim) + // * An existing custom resource that implements data population (Alpha) + // In order to use custom resource types that implement data population, + // the AnyVolumeDataSource feature gate must be enabled. + // If the provisioner or an external controller can support the specified data source, + // it will create a new volume based on the contents of the specified data source. + // +optional + DataSource *V1TypedLocalObjectReference `json:"dataSource,omitempty"` + + // Resources represents the minimum resources the volume should have. + // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources + // +optional + Resources *Corev1ResourceRequirements `json:"resources,omitempty"` + + // A label query over volumes to consider for binding. + // +optional + Selector *V1LabelSelector `json:"selector,omitempty"` + + // Name of the StorageClass required by the claim. + // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1 + // +optional + StorageClassName string `json:"storageClassName,omitempty"` + + // volumeMode defines what type of volume is required by the claim. + // Value of Filesystem is implied when not included in claim spec. + // +optional + VolumeMode string `json:"volumeMode,omitempty"` + + // VolumeName is the binding reference to the PersistentVolume backing this claim. + // +optional + VolumeName string `json:"volumeName,omitempty"` +} + +// Validate validates this v1 persistent volume claim spec +func (m *V1PersistentVolumeClaimSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDataSource(formats); err != nil { + res = append(res, err) + } + + if err := m.validateResources(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSelector(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1PersistentVolumeClaimSpec) validateDataSource(formats strfmt.Registry) error { + if swag.IsZero(m.DataSource) { // not required + return nil + } + + if m.DataSource != nil { + if err := m.DataSource.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("dataSource") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dataSource") + } + return err + } + } + + return nil +} + +func (m *V1PersistentVolumeClaimSpec) validateResources(formats strfmt.Registry) error { + if swag.IsZero(m.Resources) { // not required + return nil + } + + if m.Resources != nil { + if err := m.Resources.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resources") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resources") + } + return err + } + } + + return nil +} + +func (m *V1PersistentVolumeClaimSpec) validateSelector(formats strfmt.Registry) error { + if swag.IsZero(m.Selector) { // not required + return nil + } + + if m.Selector != nil { + if err := m.Selector.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("selector") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("selector") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v1 persistent volume claim spec based on the context it is used +func (m *V1PersistentVolumeClaimSpec) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateDataSource(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateResources(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateSelector(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1PersistentVolumeClaimSpec) contextValidateDataSource(ctx context.Context, formats strfmt.Registry) error { + + if m.DataSource != nil { + if err := m.DataSource.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("dataSource") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dataSource") + } + return err + } + } + + return nil +} + +func (m *V1PersistentVolumeClaimSpec) contextValidateResources(ctx context.Context, formats strfmt.Registry) error { + + if m.Resources != nil { + if err := m.Resources.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resources") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("resources") + } + return err + } + } + + return nil +} + +func (m *V1PersistentVolumeClaimSpec) contextValidateSelector(ctx context.Context, formats strfmt.Registry) error { + + if m.Selector != nil { + if err := m.Selector.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("selector") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("selector") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1PersistentVolumeClaimSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1PersistentVolumeClaimSpec) UnmarshalBinary(b []byte) error { + var res V1PersistentVolumeClaimSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_persistent_volume_claim_template.go b/components/common/api/def/clients/config/models/v1_persistent_volume_claim_template.go new file mode 100644 index 0000000..1010d62 --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_persistent_volume_claim_template.go @@ -0,0 +1,158 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1PersistentVolumeClaimTemplate PersistentVolumeClaimTemplate is used to produce +// PersistentVolumeClaim objects as part of an EphemeralVolumeSource. +// +// swagger:model v1PersistentVolumeClaimTemplate +type V1PersistentVolumeClaimTemplate struct { + + // May contain labels and annotations that will be copied into the PVC + // when creating it. No other fields are allowed and will be rejected during + // validation. + // + // +optional + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // The specification for the PersistentVolumeClaim. The entire content is + // copied unchanged into the PVC that gets created from this + // template. The same fields as in a PersistentVolumeClaim + // are also valid here. + Spec *V1PersistentVolumeClaimSpec `json:"spec,omitempty"` +} + +// Validate validates this v1 persistent volume claim template +func (m *V1PersistentVolumeClaimTemplate) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1PersistentVolumeClaimTemplate) validateMetadata(formats strfmt.Registry) error { + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1PersistentVolumeClaimTemplate) validateSpec(formats strfmt.Registry) error { + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("spec") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v1 persistent volume claim template based on the context it is used +func (m *V1PersistentVolumeClaimTemplate) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateMetadata(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateSpec(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1PersistentVolumeClaimTemplate) contextValidateMetadata(ctx context.Context, formats strfmt.Registry) error { + + if m.Metadata != nil { + if err := m.Metadata.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1PersistentVolumeClaimTemplate) contextValidateSpec(ctx context.Context, formats strfmt.Registry) error { + + if m.Spec != nil { + if err := m.Spec.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1PersistentVolumeClaimTemplate) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1PersistentVolumeClaimTemplate) UnmarshalBinary(b []byte) error { + var res V1PersistentVolumeClaimTemplate + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_persistent_volume_claim_volume_source.go b/components/common/api/def/clients/config/models/v1_persistent_volume_claim_volume_source.go new file mode 100644 index 0000000..97ab3bc --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_persistent_volume_claim_volume_source.go @@ -0,0 +1,59 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1PersistentVolumeClaimVolumeSource PersistentVolumeClaimVolumeSource references the user's PVC in the same namespace. +// This volume finds the bound PV and mounts that volume for the pod. A +// PersistentVolumeClaimVolumeSource is, essentially, a wrapper around another +// type of volume that is owned by someone else (the system). +// +// swagger:model v1PersistentVolumeClaimVolumeSource +type V1PersistentVolumeClaimVolumeSource struct { + + // ClaimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. + // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims + ClaimName string `json:"claimName,omitempty"` + + // Will force the ReadOnly setting in VolumeMounts. + // Default false. + // +optional + ReadOnly bool `json:"readOnly,omitempty"` +} + +// Validate validates this v1 persistent volume claim volume source +func (m *V1PersistentVolumeClaimVolumeSource) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v1 persistent volume claim volume source based on context it is used +func (m *V1PersistentVolumeClaimVolumeSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1PersistentVolumeClaimVolumeSource) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1PersistentVolumeClaimVolumeSource) UnmarshalBinary(b []byte) error { + var res V1PersistentVolumeClaimVolumeSource + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_photon_persistent_disk_volume_source.go b/components/common/api/def/clients/config/models/v1_photon_persistent_disk_volume_source.go new file mode 100644 index 0000000..f8c8099 --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_photon_persistent_disk_volume_source.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1PhotonPersistentDiskVolumeSource Represents a Photon Controller persistent disk resource. +// +// swagger:model v1PhotonPersistentDiskVolumeSource +type V1PhotonPersistentDiskVolumeSource struct { + + // Filesystem type to mount. + // Must be a filesystem type supported by the host operating system. + // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + FsType string `json:"fsType,omitempty"` + + // ID that identifies Photon Controller persistent disk + PdID string `json:"pdID,omitempty"` +} + +// Validate validates this v1 photon persistent disk volume source +func (m *V1PhotonPersistentDiskVolumeSource) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v1 photon persistent disk volume source based on context it is used +func (m *V1PhotonPersistentDiskVolumeSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1PhotonPersistentDiskVolumeSource) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1PhotonPersistentDiskVolumeSource) UnmarshalBinary(b []byte) error { + var res V1PhotonPersistentDiskVolumeSource + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_pod_affinity.go b/components/common/api/def/clients/config/models/v1_pod_affinity.go new file mode 100644 index 0000000..ee20821 --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_pod_affinity.go @@ -0,0 +1,189 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1PodAffinity Pod affinity is a group of inter pod affinity scheduling rules. +// +// swagger:model v1PodAffinity +type V1PodAffinity struct { + + // The scheduler will prefer to schedule pods to nodes that satisfy + // the affinity expressions specified by this field, but it may choose + // a node that violates one or more of the expressions. The node that is + // most preferred is the one with the greatest sum of weights, i.e. + // for each node that meets all of the scheduling requirements (resource + // request, requiredDuringScheduling affinity expressions, etc.), + // compute a sum by iterating through the elements of this field and adding + // "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the + // node(s) with the highest sum are the most preferred. + // +optional + PreferredDuringSchedulingIgnoredDuringExecution []*V1WeightedPodAffinityTerm `json:"preferredDuringSchedulingIgnoredDuringExecution"` + + // If the affinity requirements specified by this field are not met at + // scheduling time, the pod will not be scheduled onto the node. + // If the affinity requirements specified by this field cease to be met + // at some point during pod execution (e.g. due to a pod label update), the + // system may or may not try to eventually evict the pod from its node. + // When there are multiple elements, the lists of nodes corresponding to each + // podAffinityTerm are intersected, i.e. all terms must be satisfied. + // +optional + RequiredDuringSchedulingIgnoredDuringExecution []*V1PodAffinityTerm `json:"requiredDuringSchedulingIgnoredDuringExecution"` +} + +// Validate validates this v1 pod affinity +func (m *V1PodAffinity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validatePreferredDuringSchedulingIgnoredDuringExecution(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRequiredDuringSchedulingIgnoredDuringExecution(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1PodAffinity) validatePreferredDuringSchedulingIgnoredDuringExecution(formats strfmt.Registry) error { + if swag.IsZero(m.PreferredDuringSchedulingIgnoredDuringExecution) { // not required + return nil + } + + for i := 0; i < len(m.PreferredDuringSchedulingIgnoredDuringExecution); i++ { + if swag.IsZero(m.PreferredDuringSchedulingIgnoredDuringExecution[i]) { // not required + continue + } + + if m.PreferredDuringSchedulingIgnoredDuringExecution[i] != nil { + if err := m.PreferredDuringSchedulingIgnoredDuringExecution[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("preferredDuringSchedulingIgnoredDuringExecution" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("preferredDuringSchedulingIgnoredDuringExecution" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1PodAffinity) validateRequiredDuringSchedulingIgnoredDuringExecution(formats strfmt.Registry) error { + if swag.IsZero(m.RequiredDuringSchedulingIgnoredDuringExecution) { // not required + return nil + } + + for i := 0; i < len(m.RequiredDuringSchedulingIgnoredDuringExecution); i++ { + if swag.IsZero(m.RequiredDuringSchedulingIgnoredDuringExecution[i]) { // not required + continue + } + + if m.RequiredDuringSchedulingIgnoredDuringExecution[i] != nil { + if err := m.RequiredDuringSchedulingIgnoredDuringExecution[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("requiredDuringSchedulingIgnoredDuringExecution" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("requiredDuringSchedulingIgnoredDuringExecution" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this v1 pod affinity based on the context it is used +func (m *V1PodAffinity) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidatePreferredDuringSchedulingIgnoredDuringExecution(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateRequiredDuringSchedulingIgnoredDuringExecution(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1PodAffinity) contextValidatePreferredDuringSchedulingIgnoredDuringExecution(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.PreferredDuringSchedulingIgnoredDuringExecution); i++ { + + if m.PreferredDuringSchedulingIgnoredDuringExecution[i] != nil { + if err := m.PreferredDuringSchedulingIgnoredDuringExecution[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("preferredDuringSchedulingIgnoredDuringExecution" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("preferredDuringSchedulingIgnoredDuringExecution" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1PodAffinity) contextValidateRequiredDuringSchedulingIgnoredDuringExecution(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.RequiredDuringSchedulingIgnoredDuringExecution); i++ { + + if m.RequiredDuringSchedulingIgnoredDuringExecution[i] != nil { + if err := m.RequiredDuringSchedulingIgnoredDuringExecution[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("requiredDuringSchedulingIgnoredDuringExecution" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("requiredDuringSchedulingIgnoredDuringExecution" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1PodAffinity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1PodAffinity) UnmarshalBinary(b []byte) error { + var res V1PodAffinity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_pod_affinity_term.go b/components/common/api/def/clients/config/models/v1_pod_affinity_term.go new file mode 100644 index 0000000..4cc20fb --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_pod_affinity_term.go @@ -0,0 +1,122 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1PodAffinityTerm Defines a set of pods (namely those matching the labelSelector +// relative to the given namespace(s)) that this pod should be +// co-located (affinity) or not co-located (anti-affinity) with, +// where co-located is defined as running on a node whose value of +// the label with key matches that of any node on which +// a pod of the set of pods is running +// +// swagger:model v1PodAffinityTerm +type V1PodAffinityTerm struct { + + // A label query over a set of resources, in this case pods. + // +optional + LabelSelector *V1LabelSelector `json:"labelSelector,omitempty"` + + // namespaces specifies which namespaces the labelSelector applies to (matches against); + // null or empty list means "this pod's namespace" + // +optional + Namespaces []string `json:"namespaces"` + + // This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching + // the labelSelector in the specified namespaces, where co-located is defined as running on a node + // whose value of the label with key topologyKey matches that of any node on which any of the + // selected pods is running. + // Empty topologyKey is not allowed. + TopologyKey string `json:"topologyKey,omitempty"` +} + +// Validate validates this v1 pod affinity term +func (m *V1PodAffinityTerm) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLabelSelector(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1PodAffinityTerm) validateLabelSelector(formats strfmt.Registry) error { + if swag.IsZero(m.LabelSelector) { // not required + return nil + } + + if m.LabelSelector != nil { + if err := m.LabelSelector.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("labelSelector") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("labelSelector") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v1 pod affinity term based on the context it is used +func (m *V1PodAffinityTerm) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateLabelSelector(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1PodAffinityTerm) contextValidateLabelSelector(ctx context.Context, formats strfmt.Registry) error { + + if m.LabelSelector != nil { + if err := m.LabelSelector.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("labelSelector") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("labelSelector") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1PodAffinityTerm) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1PodAffinityTerm) UnmarshalBinary(b []byte) error { + var res V1PodAffinityTerm + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_pod_anti_affinity.go b/components/common/api/def/clients/config/models/v1_pod_anti_affinity.go new file mode 100644 index 0000000..48acfbf --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_pod_anti_affinity.go @@ -0,0 +1,189 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1PodAntiAffinity Pod anti affinity is a group of inter pod anti affinity scheduling rules. +// +// swagger:model v1PodAntiAffinity +type V1PodAntiAffinity struct { + + // The scheduler will prefer to schedule pods to nodes that satisfy + // the anti-affinity expressions specified by this field, but it may choose + // a node that violates one or more of the expressions. The node that is + // most preferred is the one with the greatest sum of weights, i.e. + // for each node that meets all of the scheduling requirements (resource + // request, requiredDuringScheduling anti-affinity expressions, etc.), + // compute a sum by iterating through the elements of this field and adding + // "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the + // node(s) with the highest sum are the most preferred. + // +optional + PreferredDuringSchedulingIgnoredDuringExecution []*V1WeightedPodAffinityTerm `json:"preferredDuringSchedulingIgnoredDuringExecution"` + + // If the anti-affinity requirements specified by this field are not met at + // scheduling time, the pod will not be scheduled onto the node. + // If the anti-affinity requirements specified by this field cease to be met + // at some point during pod execution (e.g. due to a pod label update), the + // system may or may not try to eventually evict the pod from its node. + // When there are multiple elements, the lists of nodes corresponding to each + // podAffinityTerm are intersected, i.e. all terms must be satisfied. + // +optional + RequiredDuringSchedulingIgnoredDuringExecution []*V1PodAffinityTerm `json:"requiredDuringSchedulingIgnoredDuringExecution"` +} + +// Validate validates this v1 pod anti affinity +func (m *V1PodAntiAffinity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validatePreferredDuringSchedulingIgnoredDuringExecution(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRequiredDuringSchedulingIgnoredDuringExecution(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1PodAntiAffinity) validatePreferredDuringSchedulingIgnoredDuringExecution(formats strfmt.Registry) error { + if swag.IsZero(m.PreferredDuringSchedulingIgnoredDuringExecution) { // not required + return nil + } + + for i := 0; i < len(m.PreferredDuringSchedulingIgnoredDuringExecution); i++ { + if swag.IsZero(m.PreferredDuringSchedulingIgnoredDuringExecution[i]) { // not required + continue + } + + if m.PreferredDuringSchedulingIgnoredDuringExecution[i] != nil { + if err := m.PreferredDuringSchedulingIgnoredDuringExecution[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("preferredDuringSchedulingIgnoredDuringExecution" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("preferredDuringSchedulingIgnoredDuringExecution" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1PodAntiAffinity) validateRequiredDuringSchedulingIgnoredDuringExecution(formats strfmt.Registry) error { + if swag.IsZero(m.RequiredDuringSchedulingIgnoredDuringExecution) { // not required + return nil + } + + for i := 0; i < len(m.RequiredDuringSchedulingIgnoredDuringExecution); i++ { + if swag.IsZero(m.RequiredDuringSchedulingIgnoredDuringExecution[i]) { // not required + continue + } + + if m.RequiredDuringSchedulingIgnoredDuringExecution[i] != nil { + if err := m.RequiredDuringSchedulingIgnoredDuringExecution[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("requiredDuringSchedulingIgnoredDuringExecution" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("requiredDuringSchedulingIgnoredDuringExecution" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this v1 pod anti affinity based on the context it is used +func (m *V1PodAntiAffinity) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidatePreferredDuringSchedulingIgnoredDuringExecution(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateRequiredDuringSchedulingIgnoredDuringExecution(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1PodAntiAffinity) contextValidatePreferredDuringSchedulingIgnoredDuringExecution(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.PreferredDuringSchedulingIgnoredDuringExecution); i++ { + + if m.PreferredDuringSchedulingIgnoredDuringExecution[i] != nil { + if err := m.PreferredDuringSchedulingIgnoredDuringExecution[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("preferredDuringSchedulingIgnoredDuringExecution" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("preferredDuringSchedulingIgnoredDuringExecution" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1PodAntiAffinity) contextValidateRequiredDuringSchedulingIgnoredDuringExecution(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.RequiredDuringSchedulingIgnoredDuringExecution); i++ { + + if m.RequiredDuringSchedulingIgnoredDuringExecution[i] != nil { + if err := m.RequiredDuringSchedulingIgnoredDuringExecution[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("requiredDuringSchedulingIgnoredDuringExecution" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("requiredDuringSchedulingIgnoredDuringExecution" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1PodAntiAffinity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1PodAntiAffinity) UnmarshalBinary(b []byte) error { + var res V1PodAntiAffinity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_pod_dns_config.go b/components/common/api/def/clients/config/models/v1_pod_dns_config.go new file mode 100644 index 0000000..e4419a8 --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_pod_dns_config.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1PodDNSConfig PodDNSConfig defines the DNS parameters of a pod in addition to +// those generated from DNSPolicy. +// +// swagger:model v1PodDNSConfig +type V1PodDNSConfig struct { + + // A list of DNS name server IP addresses. + // This will be appended to the base nameservers generated from DNSPolicy. + // Duplicated nameservers will be removed. + // +optional + Nameservers []string `json:"nameservers"` + + // A list of DNS resolver options. + // This will be merged with the base options generated from DNSPolicy. + // Duplicated entries will be removed. Resolution options given in Options + // will override those that appear in the base DNSPolicy. + // +optional + Options []*V1PodDNSConfigOption `json:"options"` + + // A list of DNS search domains for host-name lookup. + // This will be appended to the base search paths generated from DNSPolicy. + // Duplicated search paths will be removed. + // +optional + Searches []string `json:"searches"` +} + +// Validate validates this v1 pod DNS config +func (m *V1PodDNSConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateOptions(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1PodDNSConfig) validateOptions(formats strfmt.Registry) error { + if swag.IsZero(m.Options) { // not required + return nil + } + + for i := 0; i < len(m.Options); i++ { + if swag.IsZero(m.Options[i]) { // not required + continue + } + + if m.Options[i] != nil { + if err := m.Options[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("options" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("options" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this v1 pod DNS config based on the context it is used +func (m *V1PodDNSConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateOptions(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1PodDNSConfig) contextValidateOptions(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Options); i++ { + + if m.Options[i] != nil { + if err := m.Options[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("options" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("options" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1PodDNSConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1PodDNSConfig) UnmarshalBinary(b []byte) error { + var res V1PodDNSConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_pod_dns_config_option.go b/components/common/api/def/clients/config/models/v1_pod_dns_config_option.go new file mode 100644 index 0000000..88abfcd --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_pod_dns_config_option.go @@ -0,0 +1,53 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1PodDNSConfigOption PodDNSConfigOption defines DNS resolver options of a pod. +// +// swagger:model v1PodDNSConfigOption +type V1PodDNSConfigOption struct { + + // Required. + Name string `json:"name,omitempty"` + + // +optional + Value string `json:"value,omitempty"` +} + +// Validate validates this v1 pod DNS config option +func (m *V1PodDNSConfigOption) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v1 pod DNS config option based on context it is used +func (m *V1PodDNSConfigOption) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1PodDNSConfigOption) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1PodDNSConfigOption) UnmarshalBinary(b []byte) error { + var res V1PodDNSConfigOption + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_pod_readiness_gate.go b/components/common/api/def/clients/config/models/v1_pod_readiness_gate.go new file mode 100644 index 0000000..b9a10a7 --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_pod_readiness_gate.go @@ -0,0 +1,50 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1PodReadinessGate PodReadinessGate contains the reference to a pod condition +// +// swagger:model v1PodReadinessGate +type V1PodReadinessGate struct { + + // ConditionType refers to a condition in the pod's condition list with matching type. + ConditionType string `json:"conditionType,omitempty"` +} + +// Validate validates this v1 pod readiness gate +func (m *V1PodReadinessGate) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v1 pod readiness gate based on context it is used +func (m *V1PodReadinessGate) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1PodReadinessGate) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1PodReadinessGate) UnmarshalBinary(b []byte) error { + var res V1PodReadinessGate + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_pod_security_context.go b/components/common/api/def/clients/config/models/v1_pod_security_context.go new file mode 100644 index 0000000..4806761 --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_pod_security_context.go @@ -0,0 +1,319 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1PodSecurityContext PodSecurityContext holds pod-level security attributes and common container settings. +// Some fields are also present in container.securityContext. Field values of +// container.securityContext take precedence over field values of PodSecurityContext. +// +// swagger:model v1PodSecurityContext +type V1PodSecurityContext struct { + + // A special supplemental group that applies to all containers in a pod. + // Some volume types allow the Kubelet to change the ownership of that volume + // to be owned by the pod: + // + // 1. The owning GID will be the FSGroup + // 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) + // 3. The permission bits are OR'd with rw-rw---- + // + // If unset, the Kubelet will not modify the ownership and permissions of any volume. + // +optional + FsGroup string `json:"fsGroup,omitempty"` + + // fsGroupChangePolicy defines behavior of changing ownership and permission of the volume + // before being exposed inside Pod. This field will only apply to + // volume types which support fsGroup based ownership(and permissions). + // It will have no effect on ephemeral volume types such as: secret, configmaps + // and emptydir. + // Valid values are "OnRootMismatch" and "Always". If not specified, "Always" is used. + // +optional + FsGroupChangePolicy string `json:"fsGroupChangePolicy,omitempty"` + + // The GID to run the entrypoint of the container process. + // Uses runtime default if unset. + // May also be set in SecurityContext. If set in both SecurityContext and + // PodSecurityContext, the value specified in SecurityContext takes precedence + // for that container. + // +optional + RunAsGroup string `json:"runAsGroup,omitempty"` + + // Indicates that the container must run as a non-root user. + // If true, the Kubelet will validate the image at runtime to ensure that it + // does not run as UID 0 (root) and fail to start the container if it does. + // If unset or false, no such validation will be performed. + // May also be set in SecurityContext. If set in both SecurityContext and + // PodSecurityContext, the value specified in SecurityContext takes precedence. + // +optional + RunAsNonRoot bool `json:"runAsNonRoot,omitempty"` + + // The UID to run the entrypoint of the container process. + // Defaults to user specified in image metadata if unspecified. + // May also be set in SecurityContext. If set in both SecurityContext and + // PodSecurityContext, the value specified in SecurityContext takes precedence + // for that container. + // +optional + RunAsUser string `json:"runAsUser,omitempty"` + + // The SELinux context to be applied to all containers. + // If unspecified, the container runtime will allocate a random SELinux context for each + // container. May also be set in SecurityContext. If set in + // both SecurityContext and PodSecurityContext, the value specified in SecurityContext + // takes precedence for that container. + // +optional + SeLinuxOptions *V1SELinuxOptions `json:"seLinuxOptions,omitempty"` + + // The seccomp options to use by the containers in this pod. + // +optional + SeccompProfile *V1SeccompProfile `json:"seccompProfile,omitempty"` + + // A list of groups applied to the first process run in each container, in addition + // to the container's primary GID. If unspecified, no groups will be added to + // any container. + // +optional + SupplementalGroups []string `json:"supplementalGroups"` + + // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported + // sysctls (by the container runtime) might fail to launch. + // +optional + Sysctls []*V1Sysctl `json:"sysctls"` + + // The Windows specific settings applied to all containers. + // If unspecified, the options within a container's SecurityContext will be used. + // If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. + // +optional + WindowsOptions *V1WindowsSecurityContextOptions `json:"windowsOptions,omitempty"` +} + +// Validate validates this v1 pod security context +func (m *V1PodSecurityContext) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateSeLinuxOptions(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSeccompProfile(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSysctls(formats); err != nil { + res = append(res, err) + } + + if err := m.validateWindowsOptions(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1PodSecurityContext) validateSeLinuxOptions(formats strfmt.Registry) error { + if swag.IsZero(m.SeLinuxOptions) { // not required + return nil + } + + if m.SeLinuxOptions != nil { + if err := m.SeLinuxOptions.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("seLinuxOptions") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("seLinuxOptions") + } + return err + } + } + + return nil +} + +func (m *V1PodSecurityContext) validateSeccompProfile(formats strfmt.Registry) error { + if swag.IsZero(m.SeccompProfile) { // not required + return nil + } + + if m.SeccompProfile != nil { + if err := m.SeccompProfile.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("seccompProfile") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("seccompProfile") + } + return err + } + } + + return nil +} + +func (m *V1PodSecurityContext) validateSysctls(formats strfmt.Registry) error { + if swag.IsZero(m.Sysctls) { // not required + return nil + } + + for i := 0; i < len(m.Sysctls); i++ { + if swag.IsZero(m.Sysctls[i]) { // not required + continue + } + + if m.Sysctls[i] != nil { + if err := m.Sysctls[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("sysctls" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("sysctls" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1PodSecurityContext) validateWindowsOptions(formats strfmt.Registry) error { + if swag.IsZero(m.WindowsOptions) { // not required + return nil + } + + if m.WindowsOptions != nil { + if err := m.WindowsOptions.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("windowsOptions") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("windowsOptions") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v1 pod security context based on the context it is used +func (m *V1PodSecurityContext) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateSeLinuxOptions(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateSeccompProfile(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateSysctls(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateWindowsOptions(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1PodSecurityContext) contextValidateSeLinuxOptions(ctx context.Context, formats strfmt.Registry) error { + + if m.SeLinuxOptions != nil { + if err := m.SeLinuxOptions.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("seLinuxOptions") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("seLinuxOptions") + } + return err + } + } + + return nil +} + +func (m *V1PodSecurityContext) contextValidateSeccompProfile(ctx context.Context, formats strfmt.Registry) error { + + if m.SeccompProfile != nil { + if err := m.SeccompProfile.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("seccompProfile") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("seccompProfile") + } + return err + } + } + + return nil +} + +func (m *V1PodSecurityContext) contextValidateSysctls(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Sysctls); i++ { + + if m.Sysctls[i] != nil { + if err := m.Sysctls[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("sysctls" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("sysctls" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1PodSecurityContext) contextValidateWindowsOptions(ctx context.Context, formats strfmt.Registry) error { + + if m.WindowsOptions != nil { + if err := m.WindowsOptions.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("windowsOptions") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("windowsOptions") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1PodSecurityContext) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1PodSecurityContext) UnmarshalBinary(b []byte) error { + var res V1PodSecurityContext + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_pod_spec.go b/components/common/api/def/clients/config/models/v1_pod_spec.go new file mode 100644 index 0000000..411278c --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_pod_spec.go @@ -0,0 +1,979 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1PodSpec PodSpec is a description of a pod. +// +// swagger:model v1PodSpec +type V1PodSpec struct { + + // Optional duration in seconds the pod may be active on the node relative to + // StartTime before the system will actively try to mark it failed and kill associated containers. + // Value must be a positive integer. + // +optional + ActiveDeadlineSeconds string `json:"activeDeadlineSeconds,omitempty"` + + // If specified, the pod's scheduling constraints + // +optional + Affinity *V1Affinity `json:"affinity,omitempty"` + + // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. + // +optional + AutomountServiceAccountToken bool `json:"automountServiceAccountToken,omitempty"` + + // List of containers belonging to the pod. + // Containers cannot currently be added or removed. + // There must be at least one container in a Pod. + // Cannot be updated. + // +patchMergeKey=name + // +patchStrategy=merge + Containers []*V1Container `json:"containers"` + + // Specifies the DNS parameters of a pod. + // Parameters specified here will be merged to the generated DNS + // configuration based on DNSPolicy. + // +optional + DNSConfig *V1PodDNSConfig `json:"dnsConfig,omitempty"` + + // Set DNS policy for the pod. + // Defaults to "ClusterFirst". + // Valid values are 'ClusterFirstWithHostNet', 'ClusterFirst', 'Default' or 'None'. + // DNS parameters given in DNSConfig will be merged with the policy selected with DNSPolicy. + // To have DNS options set along with hostNetwork, you have to specify DNS policy + // explicitly to 'ClusterFirstWithHostNet'. + // +optional + DNSPolicy string `json:"dnsPolicy,omitempty"` + + // EnableServiceLinks indicates whether information about services should be injected into pod's + // environment variables, matching the syntax of Docker links. + // Optional: Defaults to true. + // +optional + EnableServiceLinks bool `json:"enableServiceLinks,omitempty"` + + // List of ephemeral containers run in this pod. Ephemeral containers may be run in an existing + // pod to perform user-initiated actions such as debugging. This list cannot be specified when + // creating a pod, and it cannot be modified by updating the pod spec. In order to add an + // ephemeral container to an existing pod, use the pod's ephemeralcontainers subresource. + // This field is alpha-level and is only honored by servers that enable the EphemeralContainers feature. + // +optional + // +patchMergeKey=name + // +patchStrategy=merge + EphemeralContainers []*V1EphemeralContainer `json:"ephemeralContainers"` + + // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts + // file if specified. This is only valid for non-hostNetwork pods. + // +optional + // +patchMergeKey=ip + // +patchStrategy=merge + HostAliases []*V1HostAlias `json:"hostAliases"` + + // Use the host's ipc namespace. + // Optional: Default to false. + // +k8s:conversion-gen=false + // +optional + HostIPC bool `json:"hostIPC,omitempty"` + + // Host networking requested for this pod. Use the host's network namespace. + // If this option is set, the ports that will be used must be specified. + // Default to false. + // +k8s:conversion-gen=false + // +optional + HostNetwork bool `json:"hostNetwork,omitempty"` + + // Use the host's pid namespace. + // Optional: Default to false. + // +k8s:conversion-gen=false + // +optional + HostPID bool `json:"hostPID,omitempty"` + + // Specifies the hostname of the Pod + // If not specified, the pod's hostname will be set to a system-defined value. + // +optional + Hostname string `json:"hostname,omitempty"` + + // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. + // If specified, these secrets will be passed to individual puller implementations for them to use. For example, + // in the case of docker, only DockerConfig type secrets are honored. + // More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod + // +optional + // +patchMergeKey=name + // +patchStrategy=merge + ImagePullSecrets []*V1LocalObjectReference `json:"imagePullSecrets"` + + // List of initialization containers belonging to the pod. + // Init containers are executed in order prior to containers being started. If any + // init container fails, the pod is considered to have failed and is handled according + // to its restartPolicy. The name for an init container or normal container must be + // unique among all containers. + // Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. + // The resourceRequirements of an init container are taken into account during scheduling + // by finding the highest request/limit for each resource type, and then using the max of + // of that value or the sum of the normal containers. Limits are applied to init containers + // in a similar fashion. + // Init containers cannot currently be added or removed. + // Cannot be updated. + // More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ + // +patchMergeKey=name + // +patchStrategy=merge + InitContainers []*V1Container `json:"initContainers"` + + // NodeName is a request to schedule this pod onto a specific node. If it is non-empty, + // the scheduler simply schedules this pod onto that node, assuming that it fits resource + // requirements. + // +optional + NodeName string `json:"nodeName,omitempty"` + + // NodeSelector is a selector which must be true for the pod to fit on a node. + // Selector which must match a node's labels for the pod to be scheduled on that node. + // More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ + // +optional + NodeSelector map[string]string `json:"nodeSelector,omitempty"` + + // Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. + // This field will be autopopulated at admission time by the RuntimeClass admission controller. If + // the RuntimeClass admission controller is enabled, overhead must not be set in Pod create requests. + // The RuntimeClass admission controller will reject Pod create requests which have the overhead already + // set. If RuntimeClass is configured and selected in the PodSpec, Overhead will be set to the value + // defined in the corresponding RuntimeClass, otherwise it will remain unset and treated as zero. + // More info: https://git.k8s.io/enhancements/keps/sig-node/20190226-pod-overhead.md + // This field is alpha-level as of Kubernetes v1.16, and is only honored by servers that enable the PodOverhead feature. + // +optional + Overhead map[string]ResourceQuantity `json:"overhead,omitempty"` + + // PreemptionPolicy is the Policy for preempting pods with lower priority. + // One of Never, PreemptLowerPriority. + // Defaults to PreemptLowerPriority if unset. + // This field is beta-level, gated by the NonPreemptingPriority feature-gate. + // +optional + PreemptionPolicy string `json:"preemptionPolicy,omitempty"` + + // The priority value. Various system components use this field to find the + // priority of the pod. When Priority Admission Controller is enabled, it + // prevents users from setting this field. The admission controller populates + // this field from PriorityClassName. + // The higher the value, the higher the priority. + // +optional + Priority int32 `json:"priority,omitempty"` + + // If specified, indicates the pod's priority. "system-node-critical" and + // "system-cluster-critical" are two special keywords which indicate the + // highest priorities with the former being the highest priority. Any other + // name must be defined by creating a PriorityClass object with that name. + // If not specified, the pod priority will be default or zero if there is no + // default. + // +optional + PriorityClassName string `json:"priorityClassName,omitempty"` + + // If specified, all readiness gates will be evaluated for pod readiness. + // A pod is ready when all its containers are ready AND + // all conditions specified in the readiness gates have status equal to "True" + // More info: https://git.k8s.io/enhancements/keps/sig-network/0007-pod-ready%2B%2B.md + // +optional + ReadinessGates []*V1PodReadinessGate `json:"readinessGates"` + + // Restart policy for all containers within the pod. + // One of Always, OnFailure, Never. + // Default to Always. + // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy + // +optional + RestartPolicy string `json:"restartPolicy,omitempty"` + + // RuntimeClassName refers to a RuntimeClass object in the node.k8s.io group, which should be used + // to run this pod. If no RuntimeClass resource matches the named class, the pod will not be run. + // If unset or empty, the "legacy" RuntimeClass will be used, which is an implicit class with an + // empty definition that uses the default runtime handler. + // More info: https://git.k8s.io/enhancements/keps/sig-node/runtime-class.md + // This is a beta feature as of Kubernetes v1.14. + // +optional + RuntimeClassName string `json:"runtimeClassName,omitempty"` + + // If specified, the pod will be dispatched by specified scheduler. + // If not specified, the pod will be dispatched by default scheduler. + // +optional + SchedulerName string `json:"schedulerName,omitempty"` + + // SecurityContext holds pod-level security attributes and common container settings. + // Optional: Defaults to empty. See type description for default values of each field. + // +optional + SecurityContext *V1PodSecurityContext `json:"securityContext,omitempty"` + + // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. + // Deprecated: Use serviceAccountName instead. + // +k8s:conversion-gen=false + // +optional + ServiceAccount string `json:"serviceAccount,omitempty"` + + // ServiceAccountName is the name of the ServiceAccount to use to run this pod. + // More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ + // +optional + ServiceAccountName string `json:"serviceAccountName,omitempty"` + + // If true the pod's hostname will be configured as the pod's FQDN, rather than the leaf name (the default). + // In Linux containers, this means setting the FQDN in the hostname field of the kernel (the nodename field of struct utsname). + // In Windows containers, this means setting the registry value of hostname for the registry key HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters to FQDN. + // If a pod does not have FQDN, this has no effect. + // Default to false. + // +optional + SetHostnameAsFQDN bool `json:"setHostnameAsFQDN,omitempty"` + + // Share a single process namespace between all of the containers in a pod. + // When this is set containers will be able to view and signal processes from other containers + // in the same pod, and the first process in each container will not be assigned PID 1. + // HostPID and ShareProcessNamespace cannot both be set. + // Optional: Default to false. + // +k8s:conversion-gen=false + // +optional + ShareProcessNamespace bool `json:"shareProcessNamespace,omitempty"` + + // If specified, the fully qualified Pod hostname will be "...svc.". + // If not specified, the pod will not have a domainname at all. + // +optional + Subdomain string `json:"subdomain,omitempty"` + + // Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. + // Value must be non-negative integer. The value zero indicates delete immediately. + // If this value is nil, the default grace period will be used instead. + // The grace period is the duration in seconds after the processes running in the pod are sent + // a termination signal and the time when the processes are forcibly halted with a kill signal. + // Set this value longer than the expected cleanup time for your process. + // Defaults to 30 seconds. + // +optional + TerminationGracePeriodSeconds string `json:"terminationGracePeriodSeconds,omitempty"` + + // If specified, the pod's tolerations. + // +optional + Tolerations []*V1Toleration `json:"tolerations"` + + // TopologySpreadConstraints describes how a group of pods ought to spread across topology + // domains. Scheduler will schedule pods in a way which abides by the constraints. + // All topologySpreadConstraints are ANDed. + // +optional + // +patchMergeKey=topologyKey + // +patchStrategy=merge + // +listType=map + // +listMapKey=topologyKey + // +listMapKey=whenUnsatisfiable + TopologySpreadConstraints []*V1TopologySpreadConstraint `json:"topologySpreadConstraints"` + + // List of volumes that can be mounted by containers belonging to the pod. + // More info: https://kubernetes.io/docs/concepts/storage/volumes + // +optional + // +patchMergeKey=name + // +patchStrategy=merge,retainKeys + Volumes []*V1Volume `json:"volumes"` +} + +// Validate validates this v1 pod spec +func (m *V1PodSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAffinity(formats); err != nil { + res = append(res, err) + } + + if err := m.validateContainers(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDNSConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateEphemeralContainers(formats); err != nil { + res = append(res, err) + } + + if err := m.validateHostAliases(formats); err != nil { + res = append(res, err) + } + + if err := m.validateImagePullSecrets(formats); err != nil { + res = append(res, err) + } + + if err := m.validateInitContainers(formats); err != nil { + res = append(res, err) + } + + if err := m.validateOverhead(formats); err != nil { + res = append(res, err) + } + + if err := m.validateReadinessGates(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSecurityContext(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTolerations(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTopologySpreadConstraints(formats); err != nil { + res = append(res, err) + } + + if err := m.validateVolumes(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1PodSpec) validateAffinity(formats strfmt.Registry) error { + if swag.IsZero(m.Affinity) { // not required + return nil + } + + if m.Affinity != nil { + if err := m.Affinity.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("affinity") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("affinity") + } + return err + } + } + + return nil +} + +func (m *V1PodSpec) validateContainers(formats strfmt.Registry) error { + if swag.IsZero(m.Containers) { // not required + return nil + } + + for i := 0; i < len(m.Containers); i++ { + if swag.IsZero(m.Containers[i]) { // not required + continue + } + + if m.Containers[i] != nil { + if err := m.Containers[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("containers" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("containers" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1PodSpec) validateDNSConfig(formats strfmt.Registry) error { + if swag.IsZero(m.DNSConfig) { // not required + return nil + } + + if m.DNSConfig != nil { + if err := m.DNSConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("dnsConfig") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dnsConfig") + } + return err + } + } + + return nil +} + +func (m *V1PodSpec) validateEphemeralContainers(formats strfmt.Registry) error { + if swag.IsZero(m.EphemeralContainers) { // not required + return nil + } + + for i := 0; i < len(m.EphemeralContainers); i++ { + if swag.IsZero(m.EphemeralContainers[i]) { // not required + continue + } + + if m.EphemeralContainers[i] != nil { + if err := m.EphemeralContainers[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("ephemeralContainers" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("ephemeralContainers" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1PodSpec) validateHostAliases(formats strfmt.Registry) error { + if swag.IsZero(m.HostAliases) { // not required + return nil + } + + for i := 0; i < len(m.HostAliases); i++ { + if swag.IsZero(m.HostAliases[i]) { // not required + continue + } + + if m.HostAliases[i] != nil { + if err := m.HostAliases[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("hostAliases" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("hostAliases" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1PodSpec) validateImagePullSecrets(formats strfmt.Registry) error { + if swag.IsZero(m.ImagePullSecrets) { // not required + return nil + } + + for i := 0; i < len(m.ImagePullSecrets); i++ { + if swag.IsZero(m.ImagePullSecrets[i]) { // not required + continue + } + + if m.ImagePullSecrets[i] != nil { + if err := m.ImagePullSecrets[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("imagePullSecrets" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("imagePullSecrets" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1PodSpec) validateInitContainers(formats strfmt.Registry) error { + if swag.IsZero(m.InitContainers) { // not required + return nil + } + + for i := 0; i < len(m.InitContainers); i++ { + if swag.IsZero(m.InitContainers[i]) { // not required + continue + } + + if m.InitContainers[i] != nil { + if err := m.InitContainers[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("initContainers" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("initContainers" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1PodSpec) validateOverhead(formats strfmt.Registry) error { + if swag.IsZero(m.Overhead) { // not required + return nil + } + + for k := range m.Overhead { + + if err := validate.Required("overhead"+"."+k, "body", m.Overhead[k]); err != nil { + return err + } + if val, ok := m.Overhead[k]; ok { + if err := val.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("overhead" + "." + k) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("overhead" + "." + k) + } + return err + } + } + + } + + return nil +} + +func (m *V1PodSpec) validateReadinessGates(formats strfmt.Registry) error { + if swag.IsZero(m.ReadinessGates) { // not required + return nil + } + + for i := 0; i < len(m.ReadinessGates); i++ { + if swag.IsZero(m.ReadinessGates[i]) { // not required + continue + } + + if m.ReadinessGates[i] != nil { + if err := m.ReadinessGates[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("readinessGates" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("readinessGates" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1PodSpec) validateSecurityContext(formats strfmt.Registry) error { + if swag.IsZero(m.SecurityContext) { // not required + return nil + } + + if m.SecurityContext != nil { + if err := m.SecurityContext.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("securityContext") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("securityContext") + } + return err + } + } + + return nil +} + +func (m *V1PodSpec) validateTolerations(formats strfmt.Registry) error { + if swag.IsZero(m.Tolerations) { // not required + return nil + } + + for i := 0; i < len(m.Tolerations); i++ { + if swag.IsZero(m.Tolerations[i]) { // not required + continue + } + + if m.Tolerations[i] != nil { + if err := m.Tolerations[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tolerations" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tolerations" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1PodSpec) validateTopologySpreadConstraints(formats strfmt.Registry) error { + if swag.IsZero(m.TopologySpreadConstraints) { // not required + return nil + } + + for i := 0; i < len(m.TopologySpreadConstraints); i++ { + if swag.IsZero(m.TopologySpreadConstraints[i]) { // not required + continue + } + + if m.TopologySpreadConstraints[i] != nil { + if err := m.TopologySpreadConstraints[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("topologySpreadConstraints" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("topologySpreadConstraints" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1PodSpec) validateVolumes(formats strfmt.Registry) error { + if swag.IsZero(m.Volumes) { // not required + return nil + } + + for i := 0; i < len(m.Volumes); i++ { + if swag.IsZero(m.Volumes[i]) { // not required + continue + } + + if m.Volumes[i] != nil { + if err := m.Volumes[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("volumes" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("volumes" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this v1 pod spec based on the context it is used +func (m *V1PodSpec) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateAffinity(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateContainers(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateDNSConfig(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateEphemeralContainers(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateHostAliases(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateImagePullSecrets(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateInitContainers(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateOverhead(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateReadinessGates(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateSecurityContext(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateTolerations(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateTopologySpreadConstraints(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateVolumes(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1PodSpec) contextValidateAffinity(ctx context.Context, formats strfmt.Registry) error { + + if m.Affinity != nil { + if err := m.Affinity.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("affinity") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("affinity") + } + return err + } + } + + return nil +} + +func (m *V1PodSpec) contextValidateContainers(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Containers); i++ { + + if m.Containers[i] != nil { + if err := m.Containers[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("containers" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("containers" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1PodSpec) contextValidateDNSConfig(ctx context.Context, formats strfmt.Registry) error { + + if m.DNSConfig != nil { + if err := m.DNSConfig.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("dnsConfig") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("dnsConfig") + } + return err + } + } + + return nil +} + +func (m *V1PodSpec) contextValidateEphemeralContainers(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.EphemeralContainers); i++ { + + if m.EphemeralContainers[i] != nil { + if err := m.EphemeralContainers[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("ephemeralContainers" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("ephemeralContainers" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1PodSpec) contextValidateHostAliases(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.HostAliases); i++ { + + if m.HostAliases[i] != nil { + if err := m.HostAliases[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("hostAliases" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("hostAliases" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1PodSpec) contextValidateImagePullSecrets(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.ImagePullSecrets); i++ { + + if m.ImagePullSecrets[i] != nil { + if err := m.ImagePullSecrets[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("imagePullSecrets" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("imagePullSecrets" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1PodSpec) contextValidateInitContainers(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.InitContainers); i++ { + + if m.InitContainers[i] != nil { + if err := m.InitContainers[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("initContainers" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("initContainers" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1PodSpec) contextValidateOverhead(ctx context.Context, formats strfmt.Registry) error { + + for k := range m.Overhead { + + if val, ok := m.Overhead[k]; ok { + if err := val.ContextValidate(ctx, formats); err != nil { + return err + } + } + + } + + return nil +} + +func (m *V1PodSpec) contextValidateReadinessGates(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.ReadinessGates); i++ { + + if m.ReadinessGates[i] != nil { + if err := m.ReadinessGates[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("readinessGates" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("readinessGates" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1PodSpec) contextValidateSecurityContext(ctx context.Context, formats strfmt.Registry) error { + + if m.SecurityContext != nil { + if err := m.SecurityContext.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("securityContext") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("securityContext") + } + return err + } + } + + return nil +} + +func (m *V1PodSpec) contextValidateTolerations(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Tolerations); i++ { + + if m.Tolerations[i] != nil { + if err := m.Tolerations[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tolerations" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tolerations" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1PodSpec) contextValidateTopologySpreadConstraints(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.TopologySpreadConstraints); i++ { + + if m.TopologySpreadConstraints[i] != nil { + if err := m.TopologySpreadConstraints[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("topologySpreadConstraints" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("topologySpreadConstraints" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1PodSpec) contextValidateVolumes(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Volumes); i++ { + + if m.Volumes[i] != nil { + if err := m.Volumes[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("volumes" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("volumes" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1PodSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1PodSpec) UnmarshalBinary(b []byte) error { + var res V1PodSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_pod_template_spec.go b/components/common/api/def/clients/config/models/v1_pod_template_spec.go new file mode 100644 index 0000000..c6208c9 --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_pod_template_spec.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1PodTemplateSpec PodTemplateSpec describes the data a pod should have when created from a template +// +// swagger:model v1PodTemplateSpec +type V1PodTemplateSpec struct { + + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // +optional + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // Specification of the desired behavior of the pod. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + // +optional + Spec *V1PodSpec `json:"spec,omitempty"` +} + +// Validate validates this v1 pod template spec +func (m *V1PodTemplateSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1PodTemplateSpec) validateMetadata(formats strfmt.Registry) error { + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1PodTemplateSpec) validateSpec(formats strfmt.Registry) error { + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("spec") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v1 pod template spec based on the context it is used +func (m *V1PodTemplateSpec) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateMetadata(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateSpec(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1PodTemplateSpec) contextValidateMetadata(ctx context.Context, formats strfmt.Registry) error { + + if m.Metadata != nil { + if err := m.Metadata.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1PodTemplateSpec) contextValidateSpec(ctx context.Context, formats strfmt.Registry) error { + + if m.Spec != nil { + if err := m.Spec.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1PodTemplateSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1PodTemplateSpec) UnmarshalBinary(b []byte) error { + var res V1PodTemplateSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_portworx_volume_source.go b/components/common/api/def/clients/config/models/v1_portworx_volume_source.go new file mode 100644 index 0000000..cacbb32 --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_portworx_volume_source.go @@ -0,0 +1,60 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1PortworxVolumeSource PortworxVolumeSource represents a Portworx volume resource. +// +// swagger:model v1PortworxVolumeSource +type V1PortworxVolumeSource struct { + + // FSType represents the filesystem type to mount + // Must be a filesystem type supported by the host operating system. + // Ex. "ext4", "xfs". Implicitly inferred to be "ext4" if unspecified. + FsType string `json:"fsType,omitempty"` + + // Defaults to false (read/write). ReadOnly here will force + // the ReadOnly setting in VolumeMounts. + // +optional + ReadOnly bool `json:"readOnly,omitempty"` + + // VolumeID uniquely identifies a Portworx volume + VolumeID string `json:"volumeID,omitempty"` +} + +// Validate validates this v1 portworx volume source +func (m *V1PortworxVolumeSource) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v1 portworx volume source based on context it is used +func (m *V1PortworxVolumeSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1PortworxVolumeSource) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1PortworxVolumeSource) UnmarshalBinary(b []byte) error { + var res V1PortworxVolumeSource + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_preferred_scheduling_term.go b/components/common/api/def/clients/config/models/v1_preferred_scheduling_term.go new file mode 100644 index 0000000..3503f4e --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_preferred_scheduling_term.go @@ -0,0 +1,108 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1PreferredSchedulingTerm An empty preferred scheduling term matches all objects with implicit weight 0 +// (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op). +// +// swagger:model v1PreferredSchedulingTerm +type V1PreferredSchedulingTerm struct { + + // A node selector term, associated with the corresponding weight. + Preference *V1NodeSelectorTerm `json:"preference,omitempty"` + + // Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100. + Weight int32 `json:"weight,omitempty"` +} + +// Validate validates this v1 preferred scheduling term +func (m *V1PreferredSchedulingTerm) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validatePreference(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1PreferredSchedulingTerm) validatePreference(formats strfmt.Registry) error { + if swag.IsZero(m.Preference) { // not required + return nil + } + + if m.Preference != nil { + if err := m.Preference.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("preference") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("preference") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v1 preferred scheduling term based on the context it is used +func (m *V1PreferredSchedulingTerm) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidatePreference(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1PreferredSchedulingTerm) contextValidatePreference(ctx context.Context, formats strfmt.Registry) error { + + if m.Preference != nil { + if err := m.Preference.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("preference") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("preference") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1PreferredSchedulingTerm) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1PreferredSchedulingTerm) UnmarshalBinary(b []byte) error { + var res V1PreferredSchedulingTerm + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_probe.go b/components/common/api/def/clients/config/models/v1_probe.go new file mode 100644 index 0000000..2368eb7 --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_probe.go @@ -0,0 +1,131 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1Probe Probe describes a health check to be performed against a container to determine whether it is +// alive or ready to receive traffic. +// +// swagger:model v1Probe +type V1Probe struct { + + // Minimum consecutive failures for the probe to be considered failed after having succeeded. + // Defaults to 3. Minimum value is 1. + // +optional + FailureThreshold int32 `json:"failureThreshold,omitempty"` + + // The action taken to determine the health of a container + Handler *V1Handler `json:"handler,omitempty"` + + // Number of seconds after the container has started before liveness probes are initiated. + // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + // +optional + InitialDelaySeconds int32 `json:"initialDelaySeconds,omitempty"` + + // How often (in seconds) to perform the probe. + // Default to 10 seconds. Minimum value is 1. + // +optional + PeriodSeconds int32 `json:"periodSeconds,omitempty"` + + // Minimum consecutive successes for the probe to be considered successful after having failed. + // Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + // +optional + SuccessThreshold int32 `json:"successThreshold,omitempty"` + + // Number of seconds after which the probe times out. + // Defaults to 1 second. Minimum value is 1. + // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + // +optional + TimeoutSeconds int32 `json:"timeoutSeconds,omitempty"` +} + +// Validate validates this v1 probe +func (m *V1Probe) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateHandler(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1Probe) validateHandler(formats strfmt.Registry) error { + if swag.IsZero(m.Handler) { // not required + return nil + } + + if m.Handler != nil { + if err := m.Handler.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("handler") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("handler") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v1 probe based on the context it is used +func (m *V1Probe) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateHandler(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1Probe) contextValidateHandler(ctx context.Context, formats strfmt.Registry) error { + + if m.Handler != nil { + if err := m.Handler.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("handler") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("handler") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1Probe) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1Probe) UnmarshalBinary(b []byte) error { + var res V1Probe + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_projected_volume_source.go b/components/common/api/def/clients/config/models/v1_projected_volume_source.go new file mode 100644 index 0000000..7e8cb12 --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_projected_volume_source.go @@ -0,0 +1,126 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ProjectedVolumeSource Represents a projected volume source +// +// swagger:model v1ProjectedVolumeSource +type V1ProjectedVolumeSource struct { + + // Mode bits used to set permissions on created files by default. + // Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. + // YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. + // Directories within the path are not affected by this setting. + // This might be in conflict with other options that affect the file + // mode, like fsGroup, and the result can be other mode bits set. + // +optional + DefaultMode int32 `json:"defaultMode,omitempty"` + + // list of volume projections + // +optional + Sources []*V1VolumeProjection `json:"sources"` +} + +// Validate validates this v1 projected volume source +func (m *V1ProjectedVolumeSource) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateSources(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ProjectedVolumeSource) validateSources(formats strfmt.Registry) error { + if swag.IsZero(m.Sources) { // not required + return nil + } + + for i := 0; i < len(m.Sources); i++ { + if swag.IsZero(m.Sources[i]) { // not required + continue + } + + if m.Sources[i] != nil { + if err := m.Sources[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("sources" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("sources" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this v1 projected volume source based on the context it is used +func (m *V1ProjectedVolumeSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateSources(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ProjectedVolumeSource) contextValidateSources(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Sources); i++ { + + if m.Sources[i] != nil { + if err := m.Sources[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("sources" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("sources" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ProjectedVolumeSource) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ProjectedVolumeSource) UnmarshalBinary(b []byte) error { + var res V1ProjectedVolumeSource + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_quobyte_volume_source.go b/components/common/api/def/clients/config/models/v1_quobyte_volume_source.go new file mode 100644 index 0000000..c515e2a --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_quobyte_volume_source.go @@ -0,0 +1,76 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1QuobyteVolumeSource Represents a Quobyte mount that lasts the lifetime of a pod. +// Quobyte volumes do not support ownership management or SELinux relabeling. +// +// swagger:model v1QuobyteVolumeSource +type V1QuobyteVolumeSource struct { + + // Group to map volume access to + // Default is no group + // +optional + Group string `json:"group,omitempty"` + + // ReadOnly here will force the Quobyte volume to be mounted with read-only permissions. + // Defaults to false. + // +optional + ReadOnly bool `json:"readOnly,omitempty"` + + // Registry represents a single or multiple Quobyte Registry services + // specified as a string as host:port pair (multiple entries are separated with commas) + // which acts as the central registry for volumes + Registry string `json:"registry,omitempty"` + + // Tenant owning the given Quobyte volume in the Backend + // Used with dynamically provisioned Quobyte volumes, value is set by the plugin + // +optional + Tenant string `json:"tenant,omitempty"` + + // User to map volume access to + // Defaults to serivceaccount user + // +optional + User string `json:"user,omitempty"` + + // Volume is a string that references an already created Quobyte volume by name. + Volume string `json:"volume,omitempty"` +} + +// Validate validates this v1 quobyte volume source +func (m *V1QuobyteVolumeSource) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v1 quobyte volume source based on context it is used +func (m *V1QuobyteVolumeSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1QuobyteVolumeSource) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1QuobyteVolumeSource) UnmarshalBinary(b []byte) error { + var res V1QuobyteVolumeSource + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_r_b_d_volume_source.go b/components/common/api/def/clients/config/models/v1_r_b_d_volume_source.go new file mode 100644 index 0000000..b63549b --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_r_b_d_volume_source.go @@ -0,0 +1,149 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1RBDVolumeSource Represents a Rados Block Device mount that lasts the lifetime of a pod. +// RBD volumes support ownership management and SELinux relabeling. +// +// swagger:model v1RBDVolumeSource +type V1RBDVolumeSource struct { + + // Filesystem type of the volume that you want to mount. + // Tip: Ensure that the filesystem type is supported by the host operating system. + // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + // More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd + // TODO: how do we prevent errors in the filesystem from compromising the machine + // +optional + FsType string `json:"fsType,omitempty"` + + // The rados image name. + // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + Image string `json:"image,omitempty"` + + // Keyring is the path to key ring for RBDUser. + // Default is /etc/ceph/keyring. + // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + // +optional + Keyring string `json:"keyring,omitempty"` + + // A collection of Ceph monitors. + // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + Monitors []string `json:"monitors"` + + // The rados pool name. + // Default is rbd. + // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + // +optional + Pool string `json:"pool,omitempty"` + + // ReadOnly here will force the ReadOnly setting in VolumeMounts. + // Defaults to false. + // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + // +optional + ReadOnly bool `json:"readOnly,omitempty"` + + // SecretRef is name of the authentication secret for RBDUser. If provided + // overrides keyring. + // Default is nil. + // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + // +optional + SecretRef *V1LocalObjectReference `json:"secretRef,omitempty"` + + // The rados user name. + // Default is admin. + // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + // +optional + User string `json:"user,omitempty"` +} + +// Validate validates this v1 r b d volume source +func (m *V1RBDVolumeSource) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateSecretRef(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1RBDVolumeSource) validateSecretRef(formats strfmt.Registry) error { + if swag.IsZero(m.SecretRef) { // not required + return nil + } + + if m.SecretRef != nil { + if err := m.SecretRef.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("secretRef") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("secretRef") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v1 r b d volume source based on the context it is used +func (m *V1RBDVolumeSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateSecretRef(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1RBDVolumeSource) contextValidateSecretRef(ctx context.Context, formats strfmt.Registry) error { + + if m.SecretRef != nil { + if err := m.SecretRef.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("secretRef") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("secretRef") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1RBDVolumeSource) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1RBDVolumeSource) UnmarshalBinary(b []byte) error { + var res V1RBDVolumeSource + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_resource_field_selector.go b/components/common/api/def/clients/config/models/v1_resource_field_selector.go new file mode 100644 index 0000000..6dcd227 --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_resource_field_selector.go @@ -0,0 +1,112 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ResourceFieldSelector ResourceFieldSelector represents container resources (cpu, memory) and their output format +// +// swagger:model v1ResourceFieldSelector +type V1ResourceFieldSelector struct { + + // Container name: required for volumes, optional for env vars + // +optional + ContainerName string `json:"containerName,omitempty"` + + // Specifies the output format of the exposed resources, defaults to "1" + // +optional + Divisor *ResourceQuantity `json:"divisor,omitempty"` + + // Required: resource to select + Resource string `json:"resource,omitempty"` +} + +// Validate validates this v1 resource field selector +func (m *V1ResourceFieldSelector) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDivisor(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ResourceFieldSelector) validateDivisor(formats strfmt.Registry) error { + if swag.IsZero(m.Divisor) { // not required + return nil + } + + if m.Divisor != nil { + if err := m.Divisor.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("divisor") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("divisor") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v1 resource field selector based on the context it is used +func (m *V1ResourceFieldSelector) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateDivisor(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ResourceFieldSelector) contextValidateDivisor(ctx context.Context, formats strfmt.Registry) error { + + if m.Divisor != nil { + if err := m.Divisor.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("divisor") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("divisor") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ResourceFieldSelector) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ResourceFieldSelector) UnmarshalBinary(b []byte) error { + var res V1ResourceFieldSelector + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_s_e_linux_options.go b/components/common/api/def/clients/config/models/v1_s_e_linux_options.go new file mode 100644 index 0000000..932910b --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_s_e_linux_options.go @@ -0,0 +1,63 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SELinuxOptions SELinuxOptions are the labels to be applied to the container +// +// swagger:model v1SELinuxOptions +type V1SELinuxOptions struct { + + // Level is SELinux level label that applies to the container. + // +optional + Level string `json:"level,omitempty"` + + // Role is a SELinux role label that applies to the container. + // +optional + Role string `json:"role,omitempty"` + + // Type is a SELinux type label that applies to the container. + // +optional + Type string `json:"type,omitempty"` + + // User is a SELinux user label that applies to the container. + // +optional + User string `json:"user,omitempty"` +} + +// Validate validates this v1 s e linux options +func (m *V1SELinuxOptions) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v1 s e linux options based on context it is used +func (m *V1SELinuxOptions) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1SELinuxOptions) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SELinuxOptions) UnmarshalBinary(b []byte) error { + var res V1SELinuxOptions + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_scale_i_o_volume_source.go b/components/common/api/def/clients/config/models/v1_scale_i_o_volume_source.go new file mode 100644 index 0000000..c7e6264 --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_scale_i_o_volume_source.go @@ -0,0 +1,144 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ScaleIOVolumeSource ScaleIOVolumeSource represents a persistent ScaleIO volume +// +// swagger:model v1ScaleIOVolumeSource +type V1ScaleIOVolumeSource struct { + + // Filesystem type to mount. + // Must be a filesystem type supported by the host operating system. + // Ex. "ext4", "xfs", "ntfs". + // Default is "xfs". + // +optional + FsType string `json:"fsType,omitempty"` + + // The host address of the ScaleIO API Gateway. + Gateway string `json:"gateway,omitempty"` + + // The name of the ScaleIO Protection Domain for the configured storage. + // +optional + ProtectionDomain string `json:"protectionDomain,omitempty"` + + // Defaults to false (read/write). ReadOnly here will force + // the ReadOnly setting in VolumeMounts. + // +optional + ReadOnly bool `json:"readOnly,omitempty"` + + // SecretRef references to the secret for ScaleIO user and other + // sensitive information. If this is not provided, Login operation will fail. + SecretRef *V1LocalObjectReference `json:"secretRef,omitempty"` + + // Flag to enable/disable SSL communication with Gateway, default false + // +optional + SslEnabled bool `json:"sslEnabled,omitempty"` + + // Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. + // Default is ThinProvisioned. + // +optional + StorageMode string `json:"storageMode,omitempty"` + + // The ScaleIO Storage Pool associated with the protection domain. + // +optional + StoragePool string `json:"storagePool,omitempty"` + + // The name of the storage system as configured in ScaleIO. + System string `json:"system,omitempty"` + + // The name of a volume already created in the ScaleIO system + // that is associated with this volume source. + VolumeName string `json:"volumeName,omitempty"` +} + +// Validate validates this v1 scale i o volume source +func (m *V1ScaleIOVolumeSource) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateSecretRef(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ScaleIOVolumeSource) validateSecretRef(formats strfmt.Registry) error { + if swag.IsZero(m.SecretRef) { // not required + return nil + } + + if m.SecretRef != nil { + if err := m.SecretRef.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("secretRef") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("secretRef") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v1 scale i o volume source based on the context it is used +func (m *V1ScaleIOVolumeSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateSecretRef(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ScaleIOVolumeSource) contextValidateSecretRef(ctx context.Context, formats strfmt.Registry) error { + + if m.SecretRef != nil { + if err := m.SecretRef.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("secretRef") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("secretRef") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ScaleIOVolumeSource) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ScaleIOVolumeSource) UnmarshalBinary(b []byte) error { + var res V1ScaleIOVolumeSource + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_seccomp_profile.go b/components/common/api/def/clients/config/models/v1_seccomp_profile.go new file mode 100644 index 0000000..c81d1e8 --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_seccomp_profile.go @@ -0,0 +1,65 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SeccompProfile SeccompProfile defines a pod/container's seccomp profile settings. +// Only one profile source may be set. +// +union +// +// swagger:model v1SeccompProfile +type V1SeccompProfile struct { + + // localhostProfile indicates a profile defined in a file on the node should be used. + // The profile must be preconfigured on the node to work. + // Must be a descending path, relative to the kubelet's configured seccomp profile location. + // Must only be set if type is "Localhost". + // +optional + LocalhostProfile string `json:"localhostProfile,omitempty"` + + // type indicates which kind of seccomp profile will be applied. + // Valid options are: + // + // Localhost - a profile defined in a file on the node should be used. + // RuntimeDefault - the container runtime default profile should be used. + // Unconfined - no profile should be applied. + // +unionDiscriminator + Type string `json:"type,omitempty"` +} + +// Validate validates this v1 seccomp profile +func (m *V1SeccompProfile) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v1 seccomp profile based on context it is used +func (m *V1SeccompProfile) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1SeccompProfile) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SeccompProfile) UnmarshalBinary(b []byte) error { + var res V1SeccompProfile + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_secret_env_source.go b/components/common/api/def/clients/config/models/v1_secret_env_source.go new file mode 100644 index 0000000..f9d4923 --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_secret_env_source.go @@ -0,0 +1,112 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SecretEnvSource SecretEnvSource selects a Secret to populate the environment +// variables with. +// +// The contents of the target Secret's Data field will represent the +// key-value pairs as environment variables. +// +// swagger:model v1SecretEnvSource +type V1SecretEnvSource struct { + + // The Secret to select from. + LocalObjectReference *V1LocalObjectReference `json:"localObjectReference,omitempty"` + + // Specify whether the Secret must be defined + // +optional + Optional bool `json:"optional,omitempty"` +} + +// Validate validates this v1 secret env source +func (m *V1SecretEnvSource) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLocalObjectReference(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SecretEnvSource) validateLocalObjectReference(formats strfmt.Registry) error { + if swag.IsZero(m.LocalObjectReference) { // not required + return nil + } + + if m.LocalObjectReference != nil { + if err := m.LocalObjectReference.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("localObjectReference") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("localObjectReference") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v1 secret env source based on the context it is used +func (m *V1SecretEnvSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateLocalObjectReference(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SecretEnvSource) contextValidateLocalObjectReference(ctx context.Context, formats strfmt.Registry) error { + + if m.LocalObjectReference != nil { + if err := m.LocalObjectReference.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("localObjectReference") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("localObjectReference") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SecretEnvSource) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SecretEnvSource) UnmarshalBinary(b []byte) error { + var res V1SecretEnvSource + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_secret_key_selector.go b/components/common/api/def/clients/config/models/v1_secret_key_selector.go new file mode 100644 index 0000000..914a5c2 --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_secret_key_selector.go @@ -0,0 +1,111 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SecretKeySelector SecretKeySelector selects a key of a Secret. +// +// swagger:model v1SecretKeySelector +type V1SecretKeySelector struct { + + // The key of the secret to select from. Must be a valid secret key. + Key string `json:"key,omitempty"` + + // The name of the secret in the pod's namespace to select from. + LocalObjectReference *V1LocalObjectReference `json:"localObjectReference,omitempty"` + + // Specify whether the Secret or its key must be defined + // +optional + Optional bool `json:"optional,omitempty"` +} + +// Validate validates this v1 secret key selector +func (m *V1SecretKeySelector) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLocalObjectReference(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SecretKeySelector) validateLocalObjectReference(formats strfmt.Registry) error { + if swag.IsZero(m.LocalObjectReference) { // not required + return nil + } + + if m.LocalObjectReference != nil { + if err := m.LocalObjectReference.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("localObjectReference") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("localObjectReference") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v1 secret key selector based on the context it is used +func (m *V1SecretKeySelector) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateLocalObjectReference(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SecretKeySelector) contextValidateLocalObjectReference(ctx context.Context, formats strfmt.Registry) error { + + if m.LocalObjectReference != nil { + if err := m.LocalObjectReference.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("localObjectReference") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("localObjectReference") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SecretKeySelector) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SecretKeySelector) UnmarshalBinary(b []byte) error { + var res V1SecretKeySelector + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_secret_projection.go b/components/common/api/def/clients/config/models/v1_secret_projection.go new file mode 100644 index 0000000..0a5d912 --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_secret_projection.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SecretProjection Adapts a secret into a projected volume. +// +// The contents of the target Secret's Data field will be presented in a +// projected volume as files using the keys in the Data field as the file names. +// Note that this is identical to a secret volume source without the default +// mode. +// +// swagger:model v1SecretProjection +type V1SecretProjection struct { + + // If unspecified, each key-value pair in the Data field of the referenced + // Secret will be projected into the volume as a file whose name is the + // key and content is the value. If specified, the listed keys will be + // projected into the specified paths, and unlisted keys will not be + // present. If a key is specified which is not present in the Secret, + // the volume setup will error unless it is marked optional. Paths must be + // relative and may not contain the '..' path or start with '..'. + // +optional + Items []*V1KeyToPath `json:"items"` + + // local object reference + LocalObjectReference *V1LocalObjectReference `json:"localObjectReference,omitempty"` + + // Specify whether the Secret or its key must be defined + // +optional + Optional bool `json:"optional,omitempty"` +} + +// Validate validates this v1 secret projection +func (m *V1SecretProjection) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLocalObjectReference(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SecretProjection) validateItems(formats strfmt.Registry) error { + if swag.IsZero(m.Items) { // not required + return nil + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1SecretProjection) validateLocalObjectReference(formats strfmt.Registry) error { + if swag.IsZero(m.LocalObjectReference) { // not required + return nil + } + + if m.LocalObjectReference != nil { + if err := m.LocalObjectReference.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("localObjectReference") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("localObjectReference") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v1 secret projection based on the context it is used +func (m *V1SecretProjection) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateItems(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLocalObjectReference(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SecretProjection) contextValidateItems(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Items); i++ { + + if m.Items[i] != nil { + if err := m.Items[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1SecretProjection) contextValidateLocalObjectReference(ctx context.Context, formats strfmt.Registry) error { + + if m.LocalObjectReference != nil { + if err := m.LocalObjectReference.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("localObjectReference") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("localObjectReference") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SecretProjection) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SecretProjection) UnmarshalBinary(b []byte) error { + var res V1SecretProjection + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_secret_volume_source.go b/components/common/api/def/clients/config/models/v1_secret_volume_source.go new file mode 100644 index 0000000..17ab0a9 --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_secret_volume_source.go @@ -0,0 +1,146 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SecretVolumeSource Adapts a Secret into a volume. +// +// The contents of the target Secret's Data field will be presented in a volume +// as files using the keys in the Data field as the file names. +// Secret volumes support ownership management and SELinux relabeling. +// +// swagger:model v1SecretVolumeSource +type V1SecretVolumeSource struct { + + // Optional: mode bits used to set permissions on created files by default. + // Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. + // YAML accepts both octal and decimal values, JSON requires decimal values + // for mode bits. Defaults to 0644. + // Directories within the path are not affected by this setting. + // This might be in conflict with other options that affect the file + // mode, like fsGroup, and the result can be other mode bits set. + // +optional + DefaultMode int32 `json:"defaultMode,omitempty"` + + // If unspecified, each key-value pair in the Data field of the referenced + // Secret will be projected into the volume as a file whose name is the + // key and content is the value. If specified, the listed keys will be + // projected into the specified paths, and unlisted keys will not be + // present. If a key is specified which is not present in the Secret, + // the volume setup will error unless it is marked optional. Paths must be + // relative and may not contain the '..' path or start with '..'. + // +optional + Items []*V1KeyToPath `json:"items"` + + // Specify whether the Secret or its keys must be defined + // +optional + Optional bool `json:"optional,omitempty"` + + // Name of the secret in the pod's namespace to use. + // More info: https://kubernetes.io/docs/concepts/storage/volumes#secret + // +optional + SecretName string `json:"secretName,omitempty"` +} + +// Validate validates this v1 secret volume source +func (m *V1SecretVolumeSource) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SecretVolumeSource) validateItems(formats strfmt.Registry) error { + if swag.IsZero(m.Items) { // not required + return nil + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this v1 secret volume source based on the context it is used +func (m *V1SecretVolumeSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateItems(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SecretVolumeSource) contextValidateItems(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Items); i++ { + + if m.Items[i] != nil { + if err := m.Items[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SecretVolumeSource) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SecretVolumeSource) UnmarshalBinary(b []byte) error { + var res V1SecretVolumeSource + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_security_context.go b/components/common/api/def/clients/config/models/v1_security_context.go new file mode 100644 index 0000000..ee2bd45 --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_security_context.go @@ -0,0 +1,306 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SecurityContext SecurityContext holds security configuration that will be applied to a container. +// Some fields are present in both SecurityContext and PodSecurityContext. When both +// are set, the values in SecurityContext take precedence. +// +// swagger:model v1SecurityContext +type V1SecurityContext struct { + + // AllowPrivilegeEscalation controls whether a process can gain more + // privileges than its parent process. This bool directly controls if + // the no_new_privs flag will be set on the container process. + // AllowPrivilegeEscalation is true always when the container is: + // 1) run as Privileged + // 2) has CAP_SYS_ADMIN + // +optional + AllowPrivilegeEscalation bool `json:"allowPrivilegeEscalation,omitempty"` + + // The capabilities to add/drop when running containers. + // Defaults to the default set of capabilities granted by the container runtime. + // +optional + Capabilities *V1Capabilities `json:"capabilities,omitempty"` + + // Run container in privileged mode. + // Processes in privileged containers are essentially equivalent to root on the host. + // Defaults to false. + // +optional + Privileged bool `json:"privileged,omitempty"` + + // procMount denotes the type of proc mount to use for the containers. + // The default is DefaultProcMount which uses the container runtime defaults for + // readonly paths and masked paths. + // This requires the ProcMountType feature flag to be enabled. + // +optional + ProcMount string `json:"procMount,omitempty"` + + // Whether this container has a read-only root filesystem. + // Default is false. + // +optional + ReadOnlyRootFilesystem bool `json:"readOnlyRootFilesystem,omitempty"` + + // The GID to run the entrypoint of the container process. + // Uses runtime default if unset. + // May also be set in PodSecurityContext. If set in both SecurityContext and + // PodSecurityContext, the value specified in SecurityContext takes precedence. + // +optional + RunAsGroup string `json:"runAsGroup,omitempty"` + + // Indicates that the container must run as a non-root user. + // If true, the Kubelet will validate the image at runtime to ensure that it + // does not run as UID 0 (root) and fail to start the container if it does. + // If unset or false, no such validation will be performed. + // May also be set in PodSecurityContext. If set in both SecurityContext and + // PodSecurityContext, the value specified in SecurityContext takes precedence. + // +optional + RunAsNonRoot bool `json:"runAsNonRoot,omitempty"` + + // The UID to run the entrypoint of the container process. + // Defaults to user specified in image metadata if unspecified. + // May also be set in PodSecurityContext. If set in both SecurityContext and + // PodSecurityContext, the value specified in SecurityContext takes precedence. + // +optional + RunAsUser string `json:"runAsUser,omitempty"` + + // The SELinux context to be applied to the container. + // If unspecified, the container runtime will allocate a random SELinux context for each + // container. May also be set in PodSecurityContext. If set in both SecurityContext and + // PodSecurityContext, the value specified in SecurityContext takes precedence. + // +optional + SeLinuxOptions *V1SELinuxOptions `json:"seLinuxOptions,omitempty"` + + // The seccomp options to use by this container. If seccomp options are + // provided at both the pod & container level, the container options + // override the pod options. + // +optional + SeccompProfile *V1SeccompProfile `json:"seccompProfile,omitempty"` + + // The Windows specific settings applied to all containers. + // If unspecified, the options from the PodSecurityContext will be used. + // If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. + // +optional + WindowsOptions *V1WindowsSecurityContextOptions `json:"windowsOptions,omitempty"` +} + +// Validate validates this v1 security context +func (m *V1SecurityContext) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCapabilities(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSeLinuxOptions(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSeccompProfile(formats); err != nil { + res = append(res, err) + } + + if err := m.validateWindowsOptions(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SecurityContext) validateCapabilities(formats strfmt.Registry) error { + if swag.IsZero(m.Capabilities) { // not required + return nil + } + + if m.Capabilities != nil { + if err := m.Capabilities.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("capabilities") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("capabilities") + } + return err + } + } + + return nil +} + +func (m *V1SecurityContext) validateSeLinuxOptions(formats strfmt.Registry) error { + if swag.IsZero(m.SeLinuxOptions) { // not required + return nil + } + + if m.SeLinuxOptions != nil { + if err := m.SeLinuxOptions.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("seLinuxOptions") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("seLinuxOptions") + } + return err + } + } + + return nil +} + +func (m *V1SecurityContext) validateSeccompProfile(formats strfmt.Registry) error { + if swag.IsZero(m.SeccompProfile) { // not required + return nil + } + + if m.SeccompProfile != nil { + if err := m.SeccompProfile.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("seccompProfile") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("seccompProfile") + } + return err + } + } + + return nil +} + +func (m *V1SecurityContext) validateWindowsOptions(formats strfmt.Registry) error { + if swag.IsZero(m.WindowsOptions) { // not required + return nil + } + + if m.WindowsOptions != nil { + if err := m.WindowsOptions.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("windowsOptions") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("windowsOptions") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v1 security context based on the context it is used +func (m *V1SecurityContext) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateCapabilities(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateSeLinuxOptions(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateSeccompProfile(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateWindowsOptions(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SecurityContext) contextValidateCapabilities(ctx context.Context, formats strfmt.Registry) error { + + if m.Capabilities != nil { + if err := m.Capabilities.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("capabilities") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("capabilities") + } + return err + } + } + + return nil +} + +func (m *V1SecurityContext) contextValidateSeLinuxOptions(ctx context.Context, formats strfmt.Registry) error { + + if m.SeLinuxOptions != nil { + if err := m.SeLinuxOptions.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("seLinuxOptions") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("seLinuxOptions") + } + return err + } + } + + return nil +} + +func (m *V1SecurityContext) contextValidateSeccompProfile(ctx context.Context, formats strfmt.Registry) error { + + if m.SeccompProfile != nil { + if err := m.SeccompProfile.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("seccompProfile") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("seccompProfile") + } + return err + } + } + + return nil +} + +func (m *V1SecurityContext) contextValidateWindowsOptions(ctx context.Context, formats strfmt.Registry) error { + + if m.WindowsOptions != nil { + if err := m.WindowsOptions.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("windowsOptions") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("windowsOptions") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SecurityContext) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SecurityContext) UnmarshalBinary(b []byte) error { + var res V1SecurityContext + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_service_account_token_projection.go b/components/common/api/def/clients/config/models/v1_service_account_token_projection.go new file mode 100644 index 0000000..b1c34e6 --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_service_account_token_projection.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ServiceAccountTokenProjection ServiceAccountTokenProjection represents a projected service account token +// volume. This projection can be used to insert a service account token into +// the pods runtime filesystem for use against APIs (Kubernetes API Server or +// otherwise). +// +// swagger:model v1ServiceAccountTokenProjection +type V1ServiceAccountTokenProjection struct { + + // Audience is the intended audience of the token. A recipient of a token + // must identify itself with an identifier specified in the audience of the + // token, and otherwise should reject the token. The audience defaults to the + // identifier of the apiserver. + // +optional + Audience string `json:"audience,omitempty"` + + // ExpirationSeconds is the requested duration of validity of the service + // account token. As the token approaches expiration, the kubelet volume + // plugin will proactively rotate the service account token. The kubelet will + // start trying to rotate the token if the token is older than 80 percent of + // its time to live or if the token is older than 24 hours.Defaults to 1 hour + // and must be at least 10 minutes. + // +optional + ExpirationSeconds string `json:"expirationSeconds,omitempty"` + + // Path is the path relative to the mount point of the file to project the + // token into. + Path string `json:"path,omitempty"` +} + +// Validate validates this v1 service account token projection +func (m *V1ServiceAccountTokenProjection) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v1 service account token projection based on context it is used +func (m *V1ServiceAccountTokenProjection) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ServiceAccountTokenProjection) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ServiceAccountTokenProjection) UnmarshalBinary(b []byte) error { + var res V1ServiceAccountTokenProjection + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_storage_o_s_volume_source.go b/components/common/api/def/clients/config/models/v1_storage_o_s_volume_source.go new file mode 100644 index 0000000..089330d --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_storage_o_s_volume_source.go @@ -0,0 +1,130 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1StorageOSVolumeSource Represents a StorageOS persistent volume resource. +// +// swagger:model v1StorageOSVolumeSource +type V1StorageOSVolumeSource struct { + + // Filesystem type to mount. + // Must be a filesystem type supported by the host operating system. + // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + // +optional + FsType string `json:"fsType,omitempty"` + + // Defaults to false (read/write). ReadOnly here will force + // the ReadOnly setting in VolumeMounts. + // +optional + ReadOnly bool `json:"readOnly,omitempty"` + + // SecretRef specifies the secret to use for obtaining the StorageOS API + // credentials. If not specified, default values will be attempted. + // +optional + SecretRef *V1LocalObjectReference `json:"secretRef,omitempty"` + + // VolumeName is the human-readable name of the StorageOS volume. Volume + // names are only unique within a namespace. + VolumeName string `json:"volumeName,omitempty"` + + // VolumeNamespace specifies the scope of the volume within StorageOS. If no + // namespace is specified then the Pod's namespace will be used. This allows the + // Kubernetes name scoping to be mirrored within StorageOS for tighter integration. + // Set VolumeName to any name to override the default behaviour. + // Set to "default" if you are not using namespaces within StorageOS. + // Namespaces that do not pre-exist within StorageOS will be created. + // +optional + VolumeNamespace string `json:"volumeNamespace,omitempty"` +} + +// Validate validates this v1 storage o s volume source +func (m *V1StorageOSVolumeSource) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateSecretRef(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1StorageOSVolumeSource) validateSecretRef(formats strfmt.Registry) error { + if swag.IsZero(m.SecretRef) { // not required + return nil + } + + if m.SecretRef != nil { + if err := m.SecretRef.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("secretRef") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("secretRef") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v1 storage o s volume source based on the context it is used +func (m *V1StorageOSVolumeSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateSecretRef(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1StorageOSVolumeSource) contextValidateSecretRef(ctx context.Context, formats strfmt.Registry) error { + + if m.SecretRef != nil { + if err := m.SecretRef.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("secretRef") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("secretRef") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1StorageOSVolumeSource) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1StorageOSVolumeSource) UnmarshalBinary(b []byte) error { + var res V1StorageOSVolumeSource + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_sysctl.go b/components/common/api/def/clients/config/models/v1_sysctl.go new file mode 100644 index 0000000..e8c446f --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_sysctl.go @@ -0,0 +1,53 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1Sysctl Sysctl defines a kernel parameter to be set +// +// swagger:model v1Sysctl +type V1Sysctl struct { + + // Name of a property to set + Name string `json:"name,omitempty"` + + // Value of a property to set + Value string `json:"value,omitempty"` +} + +// Validate validates this v1 sysctl +func (m *V1Sysctl) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v1 sysctl based on context it is used +func (m *V1Sysctl) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1Sysctl) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1Sysctl) UnmarshalBinary(b []byte) error { + var res V1Sysctl + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_tcp_socket_action.go b/components/common/api/def/clients/config/models/v1_tcp_socket_action.go new file mode 100644 index 0000000..38cc8c1 --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_tcp_socket_action.go @@ -0,0 +1,110 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1TCPSocketAction TCPSocketAction describes an action based on opening a socket +// +// swagger:model v1TCPSocketAction +type V1TCPSocketAction struct { + + // Optional: Host name to connect to, defaults to the pod IP. + // +optional + Host string `json:"host,omitempty"` + + // Number or name of the port to access on the container. + // Number must be in the range 1 to 65535. + // Name must be an IANA_SVC_NAME. + Port *IntstrIntOrString `json:"port,omitempty"` +} + +// Validate validates this v1 TCP socket action +func (m *V1TCPSocketAction) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validatePort(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1TCPSocketAction) validatePort(formats strfmt.Registry) error { + if swag.IsZero(m.Port) { // not required + return nil + } + + if m.Port != nil { + if err := m.Port.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("port") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("port") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v1 TCP socket action based on the context it is used +func (m *V1TCPSocketAction) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidatePort(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1TCPSocketAction) contextValidatePort(ctx context.Context, formats strfmt.Registry) error { + + if m.Port != nil { + if err := m.Port.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("port") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("port") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1TCPSocketAction) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1TCPSocketAction) UnmarshalBinary(b []byte) error { + var res V1TCPSocketAction + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_time.go b/components/common/api/def/clients/config/models/v1_time.go new file mode 100644 index 0000000..1e143c1 --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_time.go @@ -0,0 +1,64 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1Time Time is a wrapper around time.Time which supports correct +// marshaling to YAML and JSON. Wrappers are provided for many +// of the factory methods that the time package offers. +// +// +protobuf.options.marshal=false +// +protobuf.as=Timestamp +// +protobuf.options.(gogoproto.goproto_stringer)=false +// +// swagger:model v1Time +type V1Time struct { + + // Non-negative fractions of a second at nanosecond resolution. Negative + // second values with fractions must still have non-negative nanos values + // that count forward in time. Must be from 0 to 999,999,999 + // inclusive. This field may be limited in precision depending on context. + Nanos int32 `json:"nanos,omitempty"` + + // Represents seconds of UTC time since Unix epoch + // 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + // 9999-12-31T23:59:59Z inclusive. + Seconds string `json:"seconds,omitempty"` +} + +// Validate validates this v1 time +func (m *V1Time) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v1 time based on context it is used +func (m *V1Time) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1Time) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1Time) UnmarshalBinary(b []byte) error { + var res V1Time + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_toleration.go b/components/common/api/def/clients/config/models/v1_toleration.go new file mode 100644 index 0000000..8c45809 --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_toleration.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1Toleration The pod this Toleration is attached to tolerates any taint that matches +// the triple using the matching operator . +// +// swagger:model v1Toleration +type V1Toleration struct { + + // Effect indicates the taint effect to match. Empty means match all taint effects. + // When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. + // +optional + Effect string `json:"effect,omitempty"` + + // Key is the taint key that the toleration applies to. Empty means match all taint keys. + // If the key is empty, operator must be Exists; this combination means to match all values and all keys. + // +optional + Key string `json:"key,omitempty"` + + // Operator represents a key's relationship to the value. + // Valid operators are Exists and Equal. Defaults to Equal. + // Exists is equivalent to wildcard for value, so that a pod can + // tolerate all taints of a particular category. + // +optional + Operator string `json:"operator,omitempty"` + + // TolerationSeconds represents the period of time the toleration (which must be + // of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, + // it is not set, which means tolerate the taint forever (do not evict). Zero and + // negative values will be treated as 0 (evict immediately) by the system. + // +optional + TolerationSeconds string `json:"tolerationSeconds,omitempty"` + + // Value is the taint value the toleration matches to. + // If the operator is Exists, the value should be empty, otherwise just a regular string. + // +optional + Value string `json:"value,omitempty"` +} + +// Validate validates this v1 toleration +func (m *V1Toleration) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v1 toleration based on context it is used +func (m *V1Toleration) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1Toleration) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1Toleration) UnmarshalBinary(b []byte) error { + var res V1Toleration + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_topology_spread_constraint.go b/components/common/api/def/clients/config/models/v1_topology_spread_constraint.go new file mode 100644 index 0000000..78f05fb --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_topology_spread_constraint.go @@ -0,0 +1,156 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1TopologySpreadConstraint TopologySpreadConstraint specifies how to spread matching pods among the given topology. +// +// swagger:model v1TopologySpreadConstraint +type V1TopologySpreadConstraint struct { + + // LabelSelector is used to find matching pods. + // Pods that match this label selector are counted to determine the number of pods + // in their corresponding topology domain. + // +optional + LabelSelector *V1LabelSelector `json:"labelSelector,omitempty"` + + // MaxSkew describes the degree to which pods may be unevenly distributed. + // When `whenUnsatisfiable=DoNotSchedule`, it is the maximum permitted difference + // between the number of matching pods in the target topology and the global minimum. + // For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same + // labelSelector spread as 1/1/0: + // +-------+-------+-------+ + // | zone1 | zone2 | zone3 | + // +-------+-------+-------+ + // | P | P | | + // +-------+-------+-------+ + // - if MaxSkew is 1, incoming pod can only be scheduled to zone3 to become 1/1/1; + // scheduling it onto zone1(zone2) would make the ActualSkew(2-0) on zone1(zone2) + // violate MaxSkew(1). + // - if MaxSkew is 2, incoming pod can be scheduled onto any zone. + // When `whenUnsatisfiable=ScheduleAnyway`, it is used to give higher precedence + // to topologies that satisfy it. + // It's a required field. Default value is 1 and 0 is not allowed. + MaxSkew int32 `json:"maxSkew,omitempty"` + + // TopologyKey is the key of node labels. Nodes that have a label with this key + // and identical values are considered to be in the same topology. + // We consider each as a "bucket", and try to put balanced number + // of pods into each bucket. + // It's a required field. + TopologyKey string `json:"topologyKey,omitempty"` + + // WhenUnsatisfiable indicates how to deal with a pod if it doesn't satisfy + // the spread constraint. + // - DoNotSchedule (default) tells the scheduler not to schedule it. + // - ScheduleAnyway tells the scheduler to schedule the pod in any location, + // but giving higher precedence to topologies that would help reduce the + // skew. + // A constraint is considered "Unsatisfiable" for an incoming pod + // if and only if every possible node assigment for that pod would violate + // "MaxSkew" on some topology. + // For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same + // labelSelector spread as 3/1/1: + // +-------+-------+-------+ + // | zone1 | zone2 | zone3 | + // +-------+-------+-------+ + // | P P P | P | P | + // +-------+-------+-------+ + // If WhenUnsatisfiable is set to DoNotSchedule, incoming pod can only be scheduled + // to zone2(zone3) to become 3/2/1(3/1/2) as ActualSkew(2-1) on zone2(zone3) satisfies + // MaxSkew(1). In other words, the cluster can still be imbalanced, but scheduler + // won't make it *more* imbalanced. + // It's a required field. + WhenUnsatisfiable string `json:"whenUnsatisfiable,omitempty"` +} + +// Validate validates this v1 topology spread constraint +func (m *V1TopologySpreadConstraint) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLabelSelector(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1TopologySpreadConstraint) validateLabelSelector(formats strfmt.Registry) error { + if swag.IsZero(m.LabelSelector) { // not required + return nil + } + + if m.LabelSelector != nil { + if err := m.LabelSelector.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("labelSelector") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("labelSelector") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v1 topology spread constraint based on the context it is used +func (m *V1TopologySpreadConstraint) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateLabelSelector(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1TopologySpreadConstraint) contextValidateLabelSelector(ctx context.Context, formats strfmt.Registry) error { + + if m.LabelSelector != nil { + if err := m.LabelSelector.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("labelSelector") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("labelSelector") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1TopologySpreadConstraint) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1TopologySpreadConstraint) UnmarshalBinary(b []byte) error { + var res V1TopologySpreadConstraint + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_typed_local_object_reference.go b/components/common/api/def/clients/config/models/v1_typed_local_object_reference.go new file mode 100644 index 0000000..c672dec --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_typed_local_object_reference.go @@ -0,0 +1,60 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1TypedLocalObjectReference TypedLocalObjectReference contains enough information to let you locate the +// typed referenced object inside the same namespace. +// +// swagger:model v1TypedLocalObjectReference +type V1TypedLocalObjectReference struct { + + // APIGroup is the group for the resource being referenced. + // If APIGroup is not specified, the specified Kind must be in the core API group. + // For any other third-party types, APIGroup is required. + // +optional + APIGroup string `json:"apiGroup,omitempty"` + + // Kind is the type of resource being referenced + Kind string `json:"kind,omitempty"` + + // Name is the name of resource being referenced + Name string `json:"name,omitempty"` +} + +// Validate validates this v1 typed local object reference +func (m *V1TypedLocalObjectReference) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v1 typed local object reference based on context it is used +func (m *V1TypedLocalObjectReference) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1TypedLocalObjectReference) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1TypedLocalObjectReference) UnmarshalBinary(b []byte) error { + var res V1TypedLocalObjectReference + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_volume.go b/components/common/api/def/clients/config/models/v1_volume.go new file mode 100644 index 0000000..15c9947 --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_volume.go @@ -0,0 +1,111 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1Volume Volume represents a named volume in a pod that may be accessed by any container in the pod. +// +// swagger:model v1Volume +type V1Volume struct { + + // Volume's name. + // Must be a DNS_LABEL and unique within the pod. + // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + Name string `json:"name,omitempty"` + + // VolumeSource represents the location and type of the mounted volume. + // If not specified, the Volume is implied to be an EmptyDir. + // This implied behavior is deprecated and will be removed in a future version. + VolumeSource *V1VolumeSource `json:"volumeSource,omitempty"` +} + +// Validate validates this v1 volume +func (m *V1Volume) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateVolumeSource(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1Volume) validateVolumeSource(formats strfmt.Registry) error { + if swag.IsZero(m.VolumeSource) { // not required + return nil + } + + if m.VolumeSource != nil { + if err := m.VolumeSource.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("volumeSource") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("volumeSource") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v1 volume based on the context it is used +func (m *V1Volume) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateVolumeSource(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1Volume) contextValidateVolumeSource(ctx context.Context, formats strfmt.Registry) error { + + if m.VolumeSource != nil { + if err := m.VolumeSource.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("volumeSource") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("volumeSource") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1Volume) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1Volume) UnmarshalBinary(b []byte) error { + var res V1Volume + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_volume_device.go b/components/common/api/def/clients/config/models/v1_volume_device.go new file mode 100644 index 0000000..0321967 --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_volume_device.go @@ -0,0 +1,53 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VolumeDevice volumeDevice describes a mapping of a raw block device within a container. +// +// swagger:model v1VolumeDevice +type V1VolumeDevice struct { + + // devicePath is the path inside of the container that the device will be mapped to. + DevicePath string `json:"devicePath,omitempty"` + + // name must match the name of a persistentVolumeClaim in the pod + Name string `json:"name,omitempty"` +} + +// Validate validates this v1 volume device +func (m *V1VolumeDevice) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v1 volume device based on context it is used +func (m *V1VolumeDevice) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1VolumeDevice) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VolumeDevice) UnmarshalBinary(b []byte) error { + var res V1VolumeDevice + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_volume_projection.go b/components/common/api/def/clients/config/models/v1_volume_projection.go new file mode 100644 index 0000000..927b4c6 --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_volume_projection.go @@ -0,0 +1,246 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VolumeProjection Projection that may be projected along with other supported volume types +// +// swagger:model v1VolumeProjection +type V1VolumeProjection struct { + + // information about the configMap data to project + // +optional + ConfigMap *V1ConfigMapProjection `json:"configMap,omitempty"` + + // information about the downwardAPI data to project + // +optional + DownwardAPI *V1DownwardAPIProjection `json:"downwardAPI,omitempty"` + + // information about the secret data to project + // +optional + Secret *V1SecretProjection `json:"secret,omitempty"` + + // information about the serviceAccountToken data to project + // +optional + ServiceAccountToken *V1ServiceAccountTokenProjection `json:"serviceAccountToken,omitempty"` +} + +// Validate validates this v1 volume projection +func (m *V1VolumeProjection) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateConfigMap(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDownwardAPI(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSecret(formats); err != nil { + res = append(res, err) + } + + if err := m.validateServiceAccountToken(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VolumeProjection) validateConfigMap(formats strfmt.Registry) error { + if swag.IsZero(m.ConfigMap) { // not required + return nil + } + + if m.ConfigMap != nil { + if err := m.ConfigMap.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("configMap") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("configMap") + } + return err + } + } + + return nil +} + +func (m *V1VolumeProjection) validateDownwardAPI(formats strfmt.Registry) error { + if swag.IsZero(m.DownwardAPI) { // not required + return nil + } + + if m.DownwardAPI != nil { + if err := m.DownwardAPI.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("downwardAPI") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("downwardAPI") + } + return err + } + } + + return nil +} + +func (m *V1VolumeProjection) validateSecret(formats strfmt.Registry) error { + if swag.IsZero(m.Secret) { // not required + return nil + } + + if m.Secret != nil { + if err := m.Secret.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("secret") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("secret") + } + return err + } + } + + return nil +} + +func (m *V1VolumeProjection) validateServiceAccountToken(formats strfmt.Registry) error { + if swag.IsZero(m.ServiceAccountToken) { // not required + return nil + } + + if m.ServiceAccountToken != nil { + if err := m.ServiceAccountToken.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("serviceAccountToken") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("serviceAccountToken") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v1 volume projection based on the context it is used +func (m *V1VolumeProjection) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateConfigMap(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateDownwardAPI(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateSecret(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateServiceAccountToken(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VolumeProjection) contextValidateConfigMap(ctx context.Context, formats strfmt.Registry) error { + + if m.ConfigMap != nil { + if err := m.ConfigMap.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("configMap") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("configMap") + } + return err + } + } + + return nil +} + +func (m *V1VolumeProjection) contextValidateDownwardAPI(ctx context.Context, formats strfmt.Registry) error { + + if m.DownwardAPI != nil { + if err := m.DownwardAPI.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("downwardAPI") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("downwardAPI") + } + return err + } + } + + return nil +} + +func (m *V1VolumeProjection) contextValidateSecret(ctx context.Context, formats strfmt.Registry) error { + + if m.Secret != nil { + if err := m.Secret.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("secret") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("secret") + } + return err + } + } + + return nil +} + +func (m *V1VolumeProjection) contextValidateServiceAccountToken(ctx context.Context, formats strfmt.Registry) error { + + if m.ServiceAccountToken != nil { + if err := m.ServiceAccountToken.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("serviceAccountToken") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("serviceAccountToken") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VolumeProjection) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VolumeProjection) UnmarshalBinary(b []byte) error { + var res V1VolumeProjection + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_volume_source.go b/components/common/api/def/clients/config/models/v1_volume_source.go new file mode 100644 index 0000000..3363e4f --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_volume_source.go @@ -0,0 +1,1469 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VolumeSource Represents the source of a volume to mount. +// Only one of its members may be specified. +// +// swagger:model v1VolumeSource +type V1VolumeSource struct { + + // AWSElasticBlockStore represents an AWS Disk resource that is attached to a + // kubelet's host machine and then exposed to the pod. + // More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + // +optional + AwsElasticBlockStore *V1AWSElasticBlockStoreVolumeSource `json:"awsElasticBlockStore,omitempty"` + + // AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. + // +optional + AzureDisk *V1AzureDiskVolumeSource `json:"azureDisk,omitempty"` + + // AzureFile represents an Azure File Service mount on the host and bind mount to the pod. + // +optional + AzureFile *V1AzureFileVolumeSource `json:"azureFile,omitempty"` + + // CephFS represents a Ceph FS mount on the host that shares a pod's lifetime + // +optional + Cephfs *V1CephFSVolumeSource `json:"cephfs,omitempty"` + + // Cinder represents a cinder volume attached and mounted on kubelets host machine. + // More info: https://examples.k8s.io/mysql-cinder-pd/README.md + // +optional + Cinder *V1CinderVolumeSource `json:"cinder,omitempty"` + + // ConfigMap represents a configMap that should populate this volume + // +optional + ConfigMap *V1ConfigMapVolumeSource `json:"configMap,omitempty"` + + // CSI (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature). + // +optional + Csi *V1CSIVolumeSource `json:"csi,omitempty"` + + // DownwardAPI represents downward API about the pod that should populate this volume + // +optional + DownwardAPI *V1DownwardAPIVolumeSource `json:"downwardAPI,omitempty"` + + // EmptyDir represents a temporary directory that shares a pod's lifetime. + // More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir + // +optional + EmptyDir *V1EmptyDirVolumeSource `json:"emptyDir,omitempty"` + + // Ephemeral represents a volume that is handled by a cluster storage driver (Alpha feature). + // The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, + // and deleted when the pod is removed. + // + // Use this if: + // a) the volume is only needed while the pod runs, + // b) features of normal volumes like restoring from snapshot or capacity + // tracking are needed, + // c) the storage driver is specified through a storage class, and + // d) the storage driver supports dynamic volume provisioning through + // a PersistentVolumeClaim (see EphemeralVolumeSource for more + // information on the connection between this volume type + // and PersistentVolumeClaim). + // + // Use PersistentVolumeClaim or one of the vendor-specific + // APIs for volumes that persist for longer than the lifecycle + // of an individual pod. + // + // Use CSI for light-weight local ephemeral volumes if the CSI driver is meant to + // be used that way - see the documentation of the driver for + // more information. + // + // A pod can use both types of ephemeral volumes and + // persistent volumes at the same time. + // + // +optional + Ephemeral *V1EphemeralVolumeSource `json:"ephemeral,omitempty"` + + // FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. + // +optional + Fc *V1FCVolumeSource `json:"fc,omitempty"` + + // FlexVolume represents a generic volume resource that is + // provisioned/attached using an exec based plugin. + // +optional + FlexVolume *V1FlexVolumeSource `json:"flexVolume,omitempty"` + + // Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running + // +optional + Flocker *V1FlockerVolumeSource `json:"flocker,omitempty"` + + // GCEPersistentDisk represents a GCE Disk resource that is attached to a + // kubelet's host machine and then exposed to the pod. + // More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + // +optional + GcePersistentDisk *V1GCEPersistentDiskVolumeSource `json:"gcePersistentDisk,omitempty"` + + // GitRepo represents a git repository at a particular revision. + // DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an + // EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir + // into the Pod's container. + // +optional + GitRepo *V1GitRepoVolumeSource `json:"gitRepo,omitempty"` + + // Glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. + // More info: https://examples.k8s.io/volumes/glusterfs/README.md + // +optional + Glusterfs *V1GlusterfsVolumeSource `json:"glusterfs,omitempty"` + + // HostPath represents a pre-existing file or directory on the host + // machine that is directly exposed to the container. This is generally + // used for system agents or other privileged things that are allowed + // to see the host machine. Most containers will NOT need this. + // More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath + // --- + // TODO(jonesdl) We need to restrict who can use host directory mounts and who can/can not + // mount host directories as read/write. + // +optional + HostPath *V1HostPathVolumeSource `json:"hostPath,omitempty"` + + // ISCSI represents an ISCSI Disk resource that is attached to a + // kubelet's host machine and then exposed to the pod. + // More info: https://examples.k8s.io/volumes/iscsi/README.md + // +optional + Iscsi *V1ISCSIVolumeSource `json:"iscsi,omitempty"` + + // NFS represents an NFS mount on the host that shares a pod's lifetime + // More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs + // +optional + Nfs *V1NFSVolumeSource `json:"nfs,omitempty"` + + // PersistentVolumeClaimVolumeSource represents a reference to a + // PersistentVolumeClaim in the same namespace. + // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims + // +optional + PersistentVolumeClaim *V1PersistentVolumeClaimVolumeSource `json:"persistentVolumeClaim,omitempty"` + + // PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine + PhotonPersistentDisk *V1PhotonPersistentDiskVolumeSource `json:"photonPersistentDisk,omitempty"` + + // PortworxVolume represents a portworx volume attached and mounted on kubelets host machine + // +optional + PortworxVolume *V1PortworxVolumeSource `json:"portworxVolume,omitempty"` + + // Items for all in one resources secrets, configmaps, and downward API + Projected *V1ProjectedVolumeSource `json:"projected,omitempty"` + + // Quobyte represents a Quobyte mount on the host that shares a pod's lifetime + // +optional + Quobyte *V1QuobyteVolumeSource `json:"quobyte,omitempty"` + + // RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. + // More info: https://examples.k8s.io/volumes/rbd/README.md + // +optional + Rbd *V1RBDVolumeSource `json:"rbd,omitempty"` + + // ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. + // +optional + ScaleIO *V1ScaleIOVolumeSource `json:"scaleIO,omitempty"` + + // Secret represents a secret that should populate this volume. + // More info: https://kubernetes.io/docs/concepts/storage/volumes#secret + // +optional + Secret *V1SecretVolumeSource `json:"secret,omitempty"` + + // StorageOS represents a StorageOS volume attached and mounted on Kubernetes nodes. + // +optional + Storageos *V1StorageOSVolumeSource `json:"storageos,omitempty"` + + // VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine + // +optional + VsphereVolume *V1VsphereVirtualDiskVolumeSource `json:"vsphereVolume,omitempty"` +} + +// Validate validates this v1 volume source +func (m *V1VolumeSource) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAwsElasticBlockStore(formats); err != nil { + res = append(res, err) + } + + if err := m.validateAzureDisk(formats); err != nil { + res = append(res, err) + } + + if err := m.validateAzureFile(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCephfs(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCinder(formats); err != nil { + res = append(res, err) + } + + if err := m.validateConfigMap(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCsi(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDownwardAPI(formats); err != nil { + res = append(res, err) + } + + if err := m.validateEmptyDir(formats); err != nil { + res = append(res, err) + } + + if err := m.validateEphemeral(formats); err != nil { + res = append(res, err) + } + + if err := m.validateFc(formats); err != nil { + res = append(res, err) + } + + if err := m.validateFlexVolume(formats); err != nil { + res = append(res, err) + } + + if err := m.validateFlocker(formats); err != nil { + res = append(res, err) + } + + if err := m.validateGcePersistentDisk(formats); err != nil { + res = append(res, err) + } + + if err := m.validateGitRepo(formats); err != nil { + res = append(res, err) + } + + if err := m.validateGlusterfs(formats); err != nil { + res = append(res, err) + } + + if err := m.validateHostPath(formats); err != nil { + res = append(res, err) + } + + if err := m.validateIscsi(formats); err != nil { + res = append(res, err) + } + + if err := m.validateNfs(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePersistentVolumeClaim(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePhotonPersistentDisk(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePortworxVolume(formats); err != nil { + res = append(res, err) + } + + if err := m.validateProjected(formats); err != nil { + res = append(res, err) + } + + if err := m.validateQuobyte(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRbd(formats); err != nil { + res = append(res, err) + } + + if err := m.validateScaleIO(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSecret(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStorageos(formats); err != nil { + res = append(res, err) + } + + if err := m.validateVsphereVolume(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VolumeSource) validateAwsElasticBlockStore(formats strfmt.Registry) error { + if swag.IsZero(m.AwsElasticBlockStore) { // not required + return nil + } + + if m.AwsElasticBlockStore != nil { + if err := m.AwsElasticBlockStore.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("awsElasticBlockStore") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("awsElasticBlockStore") + } + return err + } + } + + return nil +} + +func (m *V1VolumeSource) validateAzureDisk(formats strfmt.Registry) error { + if swag.IsZero(m.AzureDisk) { // not required + return nil + } + + if m.AzureDisk != nil { + if err := m.AzureDisk.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("azureDisk") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("azureDisk") + } + return err + } + } + + return nil +} + +func (m *V1VolumeSource) validateAzureFile(formats strfmt.Registry) error { + if swag.IsZero(m.AzureFile) { // not required + return nil + } + + if m.AzureFile != nil { + if err := m.AzureFile.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("azureFile") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("azureFile") + } + return err + } + } + + return nil +} + +func (m *V1VolumeSource) validateCephfs(formats strfmt.Registry) error { + if swag.IsZero(m.Cephfs) { // not required + return nil + } + + if m.Cephfs != nil { + if err := m.Cephfs.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cephfs") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("cephfs") + } + return err + } + } + + return nil +} + +func (m *V1VolumeSource) validateCinder(formats strfmt.Registry) error { + if swag.IsZero(m.Cinder) { // not required + return nil + } + + if m.Cinder != nil { + if err := m.Cinder.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cinder") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("cinder") + } + return err + } + } + + return nil +} + +func (m *V1VolumeSource) validateConfigMap(formats strfmt.Registry) error { + if swag.IsZero(m.ConfigMap) { // not required + return nil + } + + if m.ConfigMap != nil { + if err := m.ConfigMap.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("configMap") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("configMap") + } + return err + } + } + + return nil +} + +func (m *V1VolumeSource) validateCsi(formats strfmt.Registry) error { + if swag.IsZero(m.Csi) { // not required + return nil + } + + if m.Csi != nil { + if err := m.Csi.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("csi") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("csi") + } + return err + } + } + + return nil +} + +func (m *V1VolumeSource) validateDownwardAPI(formats strfmt.Registry) error { + if swag.IsZero(m.DownwardAPI) { // not required + return nil + } + + if m.DownwardAPI != nil { + if err := m.DownwardAPI.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("downwardAPI") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("downwardAPI") + } + return err + } + } + + return nil +} + +func (m *V1VolumeSource) validateEmptyDir(formats strfmt.Registry) error { + if swag.IsZero(m.EmptyDir) { // not required + return nil + } + + if m.EmptyDir != nil { + if err := m.EmptyDir.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("emptyDir") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("emptyDir") + } + return err + } + } + + return nil +} + +func (m *V1VolumeSource) validateEphemeral(formats strfmt.Registry) error { + if swag.IsZero(m.Ephemeral) { // not required + return nil + } + + if m.Ephemeral != nil { + if err := m.Ephemeral.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("ephemeral") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("ephemeral") + } + return err + } + } + + return nil +} + +func (m *V1VolumeSource) validateFc(formats strfmt.Registry) error { + if swag.IsZero(m.Fc) { // not required + return nil + } + + if m.Fc != nil { + if err := m.Fc.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("fc") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("fc") + } + return err + } + } + + return nil +} + +func (m *V1VolumeSource) validateFlexVolume(formats strfmt.Registry) error { + if swag.IsZero(m.FlexVolume) { // not required + return nil + } + + if m.FlexVolume != nil { + if err := m.FlexVolume.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("flexVolume") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("flexVolume") + } + return err + } + } + + return nil +} + +func (m *V1VolumeSource) validateFlocker(formats strfmt.Registry) error { + if swag.IsZero(m.Flocker) { // not required + return nil + } + + if m.Flocker != nil { + if err := m.Flocker.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("flocker") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("flocker") + } + return err + } + } + + return nil +} + +func (m *V1VolumeSource) validateGcePersistentDisk(formats strfmt.Registry) error { + if swag.IsZero(m.GcePersistentDisk) { // not required + return nil + } + + if m.GcePersistentDisk != nil { + if err := m.GcePersistentDisk.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("gcePersistentDisk") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("gcePersistentDisk") + } + return err + } + } + + return nil +} + +func (m *V1VolumeSource) validateGitRepo(formats strfmt.Registry) error { + if swag.IsZero(m.GitRepo) { // not required + return nil + } + + if m.GitRepo != nil { + if err := m.GitRepo.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("gitRepo") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("gitRepo") + } + return err + } + } + + return nil +} + +func (m *V1VolumeSource) validateGlusterfs(formats strfmt.Registry) error { + if swag.IsZero(m.Glusterfs) { // not required + return nil + } + + if m.Glusterfs != nil { + if err := m.Glusterfs.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("glusterfs") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("glusterfs") + } + return err + } + } + + return nil +} + +func (m *V1VolumeSource) validateHostPath(formats strfmt.Registry) error { + if swag.IsZero(m.HostPath) { // not required + return nil + } + + if m.HostPath != nil { + if err := m.HostPath.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("hostPath") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("hostPath") + } + return err + } + } + + return nil +} + +func (m *V1VolumeSource) validateIscsi(formats strfmt.Registry) error { + if swag.IsZero(m.Iscsi) { // not required + return nil + } + + if m.Iscsi != nil { + if err := m.Iscsi.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("iscsi") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("iscsi") + } + return err + } + } + + return nil +} + +func (m *V1VolumeSource) validateNfs(formats strfmt.Registry) error { + if swag.IsZero(m.Nfs) { // not required + return nil + } + + if m.Nfs != nil { + if err := m.Nfs.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("nfs") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("nfs") + } + return err + } + } + + return nil +} + +func (m *V1VolumeSource) validatePersistentVolumeClaim(formats strfmt.Registry) error { + if swag.IsZero(m.PersistentVolumeClaim) { // not required + return nil + } + + if m.PersistentVolumeClaim != nil { + if err := m.PersistentVolumeClaim.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("persistentVolumeClaim") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("persistentVolumeClaim") + } + return err + } + } + + return nil +} + +func (m *V1VolumeSource) validatePhotonPersistentDisk(formats strfmt.Registry) error { + if swag.IsZero(m.PhotonPersistentDisk) { // not required + return nil + } + + if m.PhotonPersistentDisk != nil { + if err := m.PhotonPersistentDisk.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("photonPersistentDisk") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("photonPersistentDisk") + } + return err + } + } + + return nil +} + +func (m *V1VolumeSource) validatePortworxVolume(formats strfmt.Registry) error { + if swag.IsZero(m.PortworxVolume) { // not required + return nil + } + + if m.PortworxVolume != nil { + if err := m.PortworxVolume.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("portworxVolume") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("portworxVolume") + } + return err + } + } + + return nil +} + +func (m *V1VolumeSource) validateProjected(formats strfmt.Registry) error { + if swag.IsZero(m.Projected) { // not required + return nil + } + + if m.Projected != nil { + if err := m.Projected.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("projected") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("projected") + } + return err + } + } + + return nil +} + +func (m *V1VolumeSource) validateQuobyte(formats strfmt.Registry) error { + if swag.IsZero(m.Quobyte) { // not required + return nil + } + + if m.Quobyte != nil { + if err := m.Quobyte.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("quobyte") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("quobyte") + } + return err + } + } + + return nil +} + +func (m *V1VolumeSource) validateRbd(formats strfmt.Registry) error { + if swag.IsZero(m.Rbd) { // not required + return nil + } + + if m.Rbd != nil { + if err := m.Rbd.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("rbd") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("rbd") + } + return err + } + } + + return nil +} + +func (m *V1VolumeSource) validateScaleIO(formats strfmt.Registry) error { + if swag.IsZero(m.ScaleIO) { // not required + return nil + } + + if m.ScaleIO != nil { + if err := m.ScaleIO.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("scaleIO") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("scaleIO") + } + return err + } + } + + return nil +} + +func (m *V1VolumeSource) validateSecret(formats strfmt.Registry) error { + if swag.IsZero(m.Secret) { // not required + return nil + } + + if m.Secret != nil { + if err := m.Secret.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("secret") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("secret") + } + return err + } + } + + return nil +} + +func (m *V1VolumeSource) validateStorageos(formats strfmt.Registry) error { + if swag.IsZero(m.Storageos) { // not required + return nil + } + + if m.Storageos != nil { + if err := m.Storageos.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("storageos") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("storageos") + } + return err + } + } + + return nil +} + +func (m *V1VolumeSource) validateVsphereVolume(formats strfmt.Registry) error { + if swag.IsZero(m.VsphereVolume) { // not required + return nil + } + + if m.VsphereVolume != nil { + if err := m.VsphereVolume.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("vsphereVolume") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("vsphereVolume") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v1 volume source based on the context it is used +func (m *V1VolumeSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateAwsElasticBlockStore(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateAzureDisk(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateAzureFile(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateCephfs(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateCinder(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateConfigMap(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateCsi(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateDownwardAPI(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateEmptyDir(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateEphemeral(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateFc(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateFlexVolume(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateFlocker(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateGcePersistentDisk(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateGitRepo(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateGlusterfs(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateHostPath(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateIscsi(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateNfs(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidatePersistentVolumeClaim(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidatePhotonPersistentDisk(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidatePortworxVolume(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateProjected(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateQuobyte(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateRbd(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateScaleIO(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateSecret(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateStorageos(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateVsphereVolume(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VolumeSource) contextValidateAwsElasticBlockStore(ctx context.Context, formats strfmt.Registry) error { + + if m.AwsElasticBlockStore != nil { + if err := m.AwsElasticBlockStore.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("awsElasticBlockStore") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("awsElasticBlockStore") + } + return err + } + } + + return nil +} + +func (m *V1VolumeSource) contextValidateAzureDisk(ctx context.Context, formats strfmt.Registry) error { + + if m.AzureDisk != nil { + if err := m.AzureDisk.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("azureDisk") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("azureDisk") + } + return err + } + } + + return nil +} + +func (m *V1VolumeSource) contextValidateAzureFile(ctx context.Context, formats strfmt.Registry) error { + + if m.AzureFile != nil { + if err := m.AzureFile.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("azureFile") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("azureFile") + } + return err + } + } + + return nil +} + +func (m *V1VolumeSource) contextValidateCephfs(ctx context.Context, formats strfmt.Registry) error { + + if m.Cephfs != nil { + if err := m.Cephfs.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cephfs") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("cephfs") + } + return err + } + } + + return nil +} + +func (m *V1VolumeSource) contextValidateCinder(ctx context.Context, formats strfmt.Registry) error { + + if m.Cinder != nil { + if err := m.Cinder.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cinder") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("cinder") + } + return err + } + } + + return nil +} + +func (m *V1VolumeSource) contextValidateConfigMap(ctx context.Context, formats strfmt.Registry) error { + + if m.ConfigMap != nil { + if err := m.ConfigMap.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("configMap") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("configMap") + } + return err + } + } + + return nil +} + +func (m *V1VolumeSource) contextValidateCsi(ctx context.Context, formats strfmt.Registry) error { + + if m.Csi != nil { + if err := m.Csi.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("csi") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("csi") + } + return err + } + } + + return nil +} + +func (m *V1VolumeSource) contextValidateDownwardAPI(ctx context.Context, formats strfmt.Registry) error { + + if m.DownwardAPI != nil { + if err := m.DownwardAPI.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("downwardAPI") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("downwardAPI") + } + return err + } + } + + return nil +} + +func (m *V1VolumeSource) contextValidateEmptyDir(ctx context.Context, formats strfmt.Registry) error { + + if m.EmptyDir != nil { + if err := m.EmptyDir.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("emptyDir") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("emptyDir") + } + return err + } + } + + return nil +} + +func (m *V1VolumeSource) contextValidateEphemeral(ctx context.Context, formats strfmt.Registry) error { + + if m.Ephemeral != nil { + if err := m.Ephemeral.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("ephemeral") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("ephemeral") + } + return err + } + } + + return nil +} + +func (m *V1VolumeSource) contextValidateFc(ctx context.Context, formats strfmt.Registry) error { + + if m.Fc != nil { + if err := m.Fc.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("fc") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("fc") + } + return err + } + } + + return nil +} + +func (m *V1VolumeSource) contextValidateFlexVolume(ctx context.Context, formats strfmt.Registry) error { + + if m.FlexVolume != nil { + if err := m.FlexVolume.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("flexVolume") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("flexVolume") + } + return err + } + } + + return nil +} + +func (m *V1VolumeSource) contextValidateFlocker(ctx context.Context, formats strfmt.Registry) error { + + if m.Flocker != nil { + if err := m.Flocker.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("flocker") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("flocker") + } + return err + } + } + + return nil +} + +func (m *V1VolumeSource) contextValidateGcePersistentDisk(ctx context.Context, formats strfmt.Registry) error { + + if m.GcePersistentDisk != nil { + if err := m.GcePersistentDisk.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("gcePersistentDisk") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("gcePersistentDisk") + } + return err + } + } + + return nil +} + +func (m *V1VolumeSource) contextValidateGitRepo(ctx context.Context, formats strfmt.Registry) error { + + if m.GitRepo != nil { + if err := m.GitRepo.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("gitRepo") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("gitRepo") + } + return err + } + } + + return nil +} + +func (m *V1VolumeSource) contextValidateGlusterfs(ctx context.Context, formats strfmt.Registry) error { + + if m.Glusterfs != nil { + if err := m.Glusterfs.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("glusterfs") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("glusterfs") + } + return err + } + } + + return nil +} + +func (m *V1VolumeSource) contextValidateHostPath(ctx context.Context, formats strfmt.Registry) error { + + if m.HostPath != nil { + if err := m.HostPath.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("hostPath") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("hostPath") + } + return err + } + } + + return nil +} + +func (m *V1VolumeSource) contextValidateIscsi(ctx context.Context, formats strfmt.Registry) error { + + if m.Iscsi != nil { + if err := m.Iscsi.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("iscsi") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("iscsi") + } + return err + } + } + + return nil +} + +func (m *V1VolumeSource) contextValidateNfs(ctx context.Context, formats strfmt.Registry) error { + + if m.Nfs != nil { + if err := m.Nfs.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("nfs") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("nfs") + } + return err + } + } + + return nil +} + +func (m *V1VolumeSource) contextValidatePersistentVolumeClaim(ctx context.Context, formats strfmt.Registry) error { + + if m.PersistentVolumeClaim != nil { + if err := m.PersistentVolumeClaim.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("persistentVolumeClaim") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("persistentVolumeClaim") + } + return err + } + } + + return nil +} + +func (m *V1VolumeSource) contextValidatePhotonPersistentDisk(ctx context.Context, formats strfmt.Registry) error { + + if m.PhotonPersistentDisk != nil { + if err := m.PhotonPersistentDisk.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("photonPersistentDisk") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("photonPersistentDisk") + } + return err + } + } + + return nil +} + +func (m *V1VolumeSource) contextValidatePortworxVolume(ctx context.Context, formats strfmt.Registry) error { + + if m.PortworxVolume != nil { + if err := m.PortworxVolume.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("portworxVolume") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("portworxVolume") + } + return err + } + } + + return nil +} + +func (m *V1VolumeSource) contextValidateProjected(ctx context.Context, formats strfmt.Registry) error { + + if m.Projected != nil { + if err := m.Projected.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("projected") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("projected") + } + return err + } + } + + return nil +} + +func (m *V1VolumeSource) contextValidateQuobyte(ctx context.Context, formats strfmt.Registry) error { + + if m.Quobyte != nil { + if err := m.Quobyte.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("quobyte") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("quobyte") + } + return err + } + } + + return nil +} + +func (m *V1VolumeSource) contextValidateRbd(ctx context.Context, formats strfmt.Registry) error { + + if m.Rbd != nil { + if err := m.Rbd.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("rbd") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("rbd") + } + return err + } + } + + return nil +} + +func (m *V1VolumeSource) contextValidateScaleIO(ctx context.Context, formats strfmt.Registry) error { + + if m.ScaleIO != nil { + if err := m.ScaleIO.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("scaleIO") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("scaleIO") + } + return err + } + } + + return nil +} + +func (m *V1VolumeSource) contextValidateSecret(ctx context.Context, formats strfmt.Registry) error { + + if m.Secret != nil { + if err := m.Secret.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("secret") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("secret") + } + return err + } + } + + return nil +} + +func (m *V1VolumeSource) contextValidateStorageos(ctx context.Context, formats strfmt.Registry) error { + + if m.Storageos != nil { + if err := m.Storageos.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("storageos") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("storageos") + } + return err + } + } + + return nil +} + +func (m *V1VolumeSource) contextValidateVsphereVolume(ctx context.Context, formats strfmt.Registry) error { + + if m.VsphereVolume != nil { + if err := m.VsphereVolume.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("vsphereVolume") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("vsphereVolume") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VolumeSource) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VolumeSource) UnmarshalBinary(b []byte) error { + var res V1VolumeSource + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_vsphere_virtual_disk_volume_source.go b/components/common/api/def/clients/config/models/v1_vsphere_virtual_disk_volume_source.go new file mode 100644 index 0000000..609f3ab --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_vsphere_virtual_disk_volume_source.go @@ -0,0 +1,64 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VsphereVirtualDiskVolumeSource Represents a vSphere volume resource. +// +// swagger:model v1VsphereVirtualDiskVolumeSource +type V1VsphereVirtualDiskVolumeSource struct { + + // Filesystem type to mount. + // Must be a filesystem type supported by the host operating system. + // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + // +optional + FsType string `json:"fsType,omitempty"` + + // Storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName. + // +optional + StoragePolicyID string `json:"storagePolicyID,omitempty"` + + // Storage Policy Based Management (SPBM) profile name. + // +optional + StoragePolicyName string `json:"storagePolicyName,omitempty"` + + // Path that identifies vSphere volume vmdk + VolumePath string `json:"volumePath,omitempty"` +} + +// Validate validates this v1 vsphere virtual disk volume source +func (m *V1VsphereVirtualDiskVolumeSource) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v1 vsphere virtual disk volume source based on context it is used +func (m *V1VsphereVirtualDiskVolumeSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1VsphereVirtualDiskVolumeSource) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VsphereVirtualDiskVolumeSource) UnmarshalBinary(b []byte) error { + var res V1VsphereVirtualDiskVolumeSource + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_weighted_pod_affinity_term.go b/components/common/api/def/clients/config/models/v1_weighted_pod_affinity_term.go new file mode 100644 index 0000000..fcc9a17 --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_weighted_pod_affinity_term.go @@ -0,0 +1,108 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1WeightedPodAffinityTerm The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s) +// +// swagger:model v1WeightedPodAffinityTerm +type V1WeightedPodAffinityTerm struct { + + // Required. A pod affinity term, associated with the corresponding weight. + PodAffinityTerm *V1PodAffinityTerm `json:"podAffinityTerm,omitempty"` + + // weight associated with matching the corresponding podAffinityTerm, + // in the range 1-100. + Weight int32 `json:"weight,omitempty"` +} + +// Validate validates this v1 weighted pod affinity term +func (m *V1WeightedPodAffinityTerm) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validatePodAffinityTerm(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1WeightedPodAffinityTerm) validatePodAffinityTerm(formats strfmt.Registry) error { + if swag.IsZero(m.PodAffinityTerm) { // not required + return nil + } + + if m.PodAffinityTerm != nil { + if err := m.PodAffinityTerm.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("podAffinityTerm") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("podAffinityTerm") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v1 weighted pod affinity term based on the context it is used +func (m *V1WeightedPodAffinityTerm) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidatePodAffinityTerm(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1WeightedPodAffinityTerm) contextValidatePodAffinityTerm(ctx context.Context, formats strfmt.Registry) error { + + if m.PodAffinityTerm != nil { + if err := m.PodAffinityTerm.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("podAffinityTerm") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("podAffinityTerm") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1WeightedPodAffinityTerm) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1WeightedPodAffinityTerm) UnmarshalBinary(b []byte) error { + var res V1WeightedPodAffinityTerm + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1_windows_security_context_options.go b/components/common/api/def/clients/config/models/v1_windows_security_context_options.go new file mode 100644 index 0000000..adb9b93 --- /dev/null +++ b/components/common/api/def/clients/config/models/v1_windows_security_context_options.go @@ -0,0 +1,64 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1WindowsSecurityContextOptions WindowsSecurityContextOptions contain Windows-specific options and credentials. +// +// swagger:model v1WindowsSecurityContextOptions +type V1WindowsSecurityContextOptions struct { + + // GMSACredentialSpec is where the GMSA admission webhook + // (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the + // GMSA credential spec named by the GMSACredentialSpecName field. + // +optional + GmsaCredentialSpec string `json:"gmsaCredentialSpec,omitempty"` + + // GMSACredentialSpecName is the name of the GMSA credential spec to use. + // +optional + GmsaCredentialSpecName string `json:"gmsaCredentialSpecName,omitempty"` + + // The UserName in Windows to run the entrypoint of the container process. + // Defaults to the user specified in image metadata if unspecified. + // May also be set in PodSecurityContext. If set in both SecurityContext and + // PodSecurityContext, the value specified in SecurityContext takes precedence. + // +optional + RunAsUserName string `json:"runAsUserName,omitempty"` +} + +// Validate validates this v1 windows security context options +func (m *V1WindowsSecurityContextOptions) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v1 windows security context options based on context it is used +func (m *V1WindowsSecurityContextOptions) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1WindowsSecurityContextOptions) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1WindowsSecurityContextOptions) UnmarshalBinary(b []byte) error { + var res V1WindowsSecurityContextOptions + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v1beta1_job_template_spec.go b/components/common/api/def/clients/config/models/v1beta1_job_template_spec.go new file mode 100644 index 0000000..96b2d8c --- /dev/null +++ b/components/common/api/def/clients/config/models/v1beta1_job_template_spec.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1beta1JobTemplateSpec JobTemplateSpec describes the data a Job should have when created from a template +// +// swagger:model v1beta1JobTemplateSpec +type V1beta1JobTemplateSpec struct { + + // Standard object's metadata of the jobs created from this template. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // +optional + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // Specification of the desired behavior of the job. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + // +optional + Spec *V1JobSpec `json:"spec,omitempty"` +} + +// Validate validates this v1beta1 job template spec +func (m *V1beta1JobTemplateSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1beta1JobTemplateSpec) validateMetadata(formats strfmt.Registry) error { + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1beta1JobTemplateSpec) validateSpec(formats strfmt.Registry) error { + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("spec") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v1beta1 job template spec based on the context it is used +func (m *V1beta1JobTemplateSpec) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateMetadata(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateSpec(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1beta1JobTemplateSpec) contextValidateMetadata(ctx context.Context, formats strfmt.Registry) error { + + if m.Metadata != nil { + if err := m.Metadata.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1beta1JobTemplateSpec) contextValidateSpec(ctx context.Context, formats strfmt.Registry) error { + + if m.Spec != nil { + if err := m.Spec.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1beta1JobTemplateSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1beta1JobTemplateSpec) UnmarshalBinary(b []byte) error { + var res V1beta1JobTemplateSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v3_condition_status.go b/components/common/api/def/clients/config/models/v3_condition_status.go new file mode 100644 index 0000000..ad93d27 --- /dev/null +++ b/components/common/api/def/clients/config/models/v3_condition_status.go @@ -0,0 +1,85 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" +) + +// V3ConditionStatus $title: ConditionStatus +// $description: status of a condition for a resource +// +// swagger:model v3ConditionStatus +type V3ConditionStatus string + +func NewV3ConditionStatus(value V3ConditionStatus) *V3ConditionStatus { + return &value +} + +// Pointer returns a pointer to a freshly-allocated V3ConditionStatus. +func (m V3ConditionStatus) Pointer() *V3ConditionStatus { + return &m +} + +const ( + + // V3ConditionStatusStatusNotSet captures enum value "StatusNotSet" + V3ConditionStatusStatusNotSet V3ConditionStatus = "StatusNotSet" + + // V3ConditionStatusStatusSubmitted captures enum value "StatusSubmitted" + V3ConditionStatusStatusSubmitted V3ConditionStatus = "StatusSubmitted" + + // V3ConditionStatusStatusOK captures enum value "StatusOK" + V3ConditionStatusStatusOK V3ConditionStatus = "StatusOK" + + // V3ConditionStatusStatusFailed captures enum value "StatusFailed" + V3ConditionStatusStatusFailed V3ConditionStatus = "StatusFailed" +) + +// for schema +var v3ConditionStatusEnum []interface{} + +func init() { + var res []V3ConditionStatus + if err := json.Unmarshal([]byte(`["StatusNotSet","StatusSubmitted","StatusOK","StatusFailed"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v3ConditionStatusEnum = append(v3ConditionStatusEnum, v) + } +} + +func (m V3ConditionStatus) validateV3ConditionStatusEnum(path, location string, value V3ConditionStatus) error { + if err := validate.EnumCase(path, location, value, v3ConditionStatusEnum, true); err != nil { + return err + } + return nil +} + +// Validate validates this v3 condition status +func (m V3ConditionStatus) Validate(formats strfmt.Registry) error { + var res []error + + // value enum + if err := m.validateV3ConditionStatusEnum("", "body", m); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// ContextValidate validates this v3 condition status based on context it is used +func (m V3ConditionStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} diff --git a/components/common/api/def/clients/config/models/v3_list_metadata.go b/components/common/api/def/clients/config/models/v3_list_metadata.go new file mode 100644 index 0000000..34b2308 --- /dev/null +++ b/components/common/api/def/clients/config/models/v3_list_metadata.go @@ -0,0 +1,58 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V3ListMetadata $title: ListMetadata +// $description: metadata for a list of resources +// $required: enabled +// +// swagger:model v3ListMetadata +type V3ListMetadata struct { + + // count + Count string `json:"count,omitempty"` + + // limit + Limit string `json:"limit,omitempty"` + + // offset + Offset string `json:"offset,omitempty"` +} + +// Validate validates this v3 list metadata +func (m *V3ListMetadata) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v3 list metadata based on context it is used +func (m *V3ListMetadata) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V3ListMetadata) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V3ListMetadata) UnmarshalBinary(b []byte) error { + var res V3ListMetadata + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/config/models/v3_metadata.go b/components/common/api/def/clients/config/models/v3_metadata.go new file mode 100644 index 0000000..2ba69ea --- /dev/null +++ b/components/common/api/def/clients/config/models/v3_metadata.go @@ -0,0 +1,176 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V3Metadata Metadata +// +// metadata of the resource +// Example: {"name":"some-name","project":"defaultproject"} +// +// swagger:model v3Metadata +type V3Metadata struct { + + // Annotations + // + // annotations of the resource + Annotations map[string]string `json:"annotations,omitempty"` + + // Description + // + // description of the resource + Description string `json:"description,omitempty"` + + // id + // Read Only: true + ID string `json:"id,omitempty"` + + // Lables + // + // labels of the resource + Labels map[string]string `json:"labels,omitempty"` + + // modified at + // Read Only: true + // Format: date-time + ModifiedAt strfmt.DateTime `json:"modifiedAt,omitempty"` + + // Name + // + // name of the resource + // Required: true + Name *string `json:"name"` + + // Organization + // + // Organization to which the resource belongs + Organization string `json:"organization,omitempty"` + + // Partner + // + // Partner to which the resource belongs + Partner string `json:"partner,omitempty"` + + // Project + // + // Project of the resource + // Required: true + Project *string `json:"project"` +} + +// Validate validates this v3 metadata +func (m *V3Metadata) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateModifiedAt(formats); err != nil { + res = append(res, err) + } + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateProject(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V3Metadata) validateModifiedAt(formats strfmt.Registry) error { + if swag.IsZero(m.ModifiedAt) { // not required + return nil + } + + if err := validate.FormatOf("modifiedAt", "body", "date-time", m.ModifiedAt.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *V3Metadata) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + return nil +} + +func (m *V3Metadata) validateProject(formats strfmt.Registry) error { + + if err := validate.Required("project", "body", m.Project); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this v3 metadata based on the context it is used +func (m *V3Metadata) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateID(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateModifiedAt(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V3Metadata) contextValidateID(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "id", "body", string(m.ID)); err != nil { + return err + } + + return nil +} + +func (m *V3Metadata) contextValidateModifiedAt(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "modifiedAt", "body", strfmt.DateTime(m.ModifiedAt)); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V3Metadata) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V3Metadata) UnmarshalBinary(b []byte) error { + var res V3Metadata + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/scheduler/client/cluster/cluster_client.go b/components/common/api/def/clients/scheduler/client/cluster/cluster_client.go new file mode 100644 index 0000000..7da85e9 --- /dev/null +++ b/components/common/api/def/clients/scheduler/client/cluster/cluster_client.go @@ -0,0 +1,321 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package cluster + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new cluster API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for cluster API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientOption is the option for Client methods +type ClientOption func(*runtime.ClientOperation) + +// ClientService is the interface for Client methods +type ClientService interface { + ClusterCreateCluster(params *ClusterCreateClusterParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ClusterCreateClusterOK, *ClusterCreateClusterCreated, error) + + ClusterDeleteCluster(params *ClusterDeleteClusterParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ClusterDeleteClusterOK, *ClusterDeleteClusterNoContent, error) + + ClusterDownloadCluster(params *ClusterDownloadClusterParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ClusterDownloadClusterOK, error) + + ClusterGetCluster(params *ClusterGetClusterParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ClusterGetClusterOK, error) + + ClusterGetClusters(params *ClusterGetClustersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ClusterGetClustersOK, error) + + ClusterRegisterCluster(params *ClusterRegisterClusterParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ClusterRegisterClusterOK, error) + + ClusterUpdateCluster(params *ClusterUpdateClusterParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ClusterUpdateClusterOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* + ClusterCreateCluster cluster create cluster API +*/ +func (a *Client) ClusterCreateCluster(params *ClusterCreateClusterParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ClusterCreateClusterOK, *ClusterCreateClusterCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewClusterCreateClusterParams() + } + op := &runtime.ClientOperation{ + ID: "Cluster_CreateCluster", + Method: "POST", + PathPattern: "/infra/v3/project/{metadata.project}/cluster", + ProducesMediaTypes: []string{"application/json", "application/yaml"}, + ConsumesMediaTypes: []string{"application/json", "application/yaml"}, + Schemes: []string{"https"}, + Params: params, + Reader: &ClusterCreateClusterReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, nil, err + } + switch value := result.(type) { + case *ClusterCreateClusterOK: + return value, nil, nil + case *ClusterCreateClusterCreated: + return nil, value, nil + } + // unexpected success response + unexpectedSuccess := result.(*ClusterCreateClusterDefault) + return nil, nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* + ClusterDeleteCluster cluster delete cluster API +*/ +func (a *Client) ClusterDeleteCluster(params *ClusterDeleteClusterParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ClusterDeleteClusterOK, *ClusterDeleteClusterNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewClusterDeleteClusterParams() + } + op := &runtime.ClientOperation{ + ID: "Cluster_DeleteCluster", + Method: "DELETE", + PathPattern: "/infra/v3/project/{metadata.project}/cluster/{metadata.name}", + ProducesMediaTypes: []string{"application/json", "application/yaml"}, + ConsumesMediaTypes: []string{"application/json", "application/yaml"}, + Schemes: []string{"https"}, + Params: params, + Reader: &ClusterDeleteClusterReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, nil, err + } + switch value := result.(type) { + case *ClusterDeleteClusterOK: + return value, nil, nil + case *ClusterDeleteClusterNoContent: + return nil, value, nil + } + // unexpected success response + unexpectedSuccess := result.(*ClusterDeleteClusterDefault) + return nil, nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* + ClusterDownloadCluster cluster download cluster API +*/ +func (a *Client) ClusterDownloadCluster(params *ClusterDownloadClusterParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ClusterDownloadClusterOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewClusterDownloadClusterParams() + } + op := &runtime.ClientOperation{ + ID: "Cluster_DownloadCluster", + Method: "GET", + PathPattern: "/infra/v3/project/{metadata.project}/cluster/{metadata.name}/download", + ProducesMediaTypes: []string{"application/json", "application/yaml"}, + ConsumesMediaTypes: []string{"application/json", "application/yaml"}, + Schemes: []string{"https"}, + Params: params, + Reader: &ClusterDownloadClusterReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*ClusterDownloadClusterOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ClusterDownloadClusterDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* + ClusterGetCluster cluster get cluster API +*/ +func (a *Client) ClusterGetCluster(params *ClusterGetClusterParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ClusterGetClusterOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewClusterGetClusterParams() + } + op := &runtime.ClientOperation{ + ID: "Cluster_GetCluster", + Method: "GET", + PathPattern: "/infra/v3/project/{metadata.project}/cluster/{metadata.name}", + ProducesMediaTypes: []string{"application/json", "application/yaml"}, + ConsumesMediaTypes: []string{"application/json", "application/yaml"}, + Schemes: []string{"https"}, + Params: params, + Reader: &ClusterGetClusterReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*ClusterGetClusterOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ClusterGetClusterDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* + ClusterGetClusters cluster get clusters API +*/ +func (a *Client) ClusterGetClusters(params *ClusterGetClustersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ClusterGetClustersOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewClusterGetClustersParams() + } + op := &runtime.ClientOperation{ + ID: "Cluster_GetClusters", + Method: "GET", + PathPattern: "/infra/v3/project/{projectID}/cluster", + ProducesMediaTypes: []string{"application/json", "application/yaml"}, + ConsumesMediaTypes: []string{"application/json", "application/yaml"}, + Schemes: []string{"https"}, + Params: params, + Reader: &ClusterGetClustersReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*ClusterGetClustersOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ClusterGetClustersDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* + ClusterRegisterCluster cluster register cluster API +*/ +func (a *Client) ClusterRegisterCluster(params *ClusterRegisterClusterParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ClusterRegisterClusterOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewClusterRegisterClusterParams() + } + op := &runtime.ClientOperation{ + ID: "Cluster_RegisterCluster", + Method: "POST", + PathPattern: "/infra/v3/scheduler/cluster/register", + ProducesMediaTypes: []string{"application/json", "application/yaml"}, + ConsumesMediaTypes: []string{"application/json", "application/yaml"}, + Schemes: []string{"https"}, + Params: params, + Reader: &ClusterRegisterClusterReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*ClusterRegisterClusterOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ClusterRegisterClusterDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* + ClusterUpdateCluster cluster update cluster API +*/ +func (a *Client) ClusterUpdateCluster(params *ClusterUpdateClusterParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ClusterUpdateClusterOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewClusterUpdateClusterParams() + } + op := &runtime.ClientOperation{ + ID: "Cluster_UpdateCluster", + Method: "PUT", + PathPattern: "/infra/v3/project/{metadata.project}/cluster/{metadata.name}", + ProducesMediaTypes: []string{"application/json", "application/yaml"}, + ConsumesMediaTypes: []string{"application/json", "application/yaml"}, + Schemes: []string{"https"}, + Params: params, + Reader: &ClusterUpdateClusterReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*ClusterUpdateClusterOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ClusterUpdateClusterDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/components/common/api/def/clients/scheduler/client/cluster/cluster_create_cluster_parameters.go b/components/common/api/def/clients/scheduler/client/cluster/cluster_create_cluster_parameters.go new file mode 100644 index 0000000..cae97fa --- /dev/null +++ b/components/common/api/def/clients/scheduler/client/cluster/cluster_create_cluster_parameters.go @@ -0,0 +1,170 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package cluster + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/RafaySystems/rcloud-base/components/common/api/def/clients/scheduler/models" +) + +// NewClusterCreateClusterParams creates a new ClusterCreateClusterParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewClusterCreateClusterParams() *ClusterCreateClusterParams { + return &ClusterCreateClusterParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewClusterCreateClusterParamsWithTimeout creates a new ClusterCreateClusterParams object +// with the ability to set a timeout on a request. +func NewClusterCreateClusterParamsWithTimeout(timeout time.Duration) *ClusterCreateClusterParams { + return &ClusterCreateClusterParams{ + timeout: timeout, + } +} + +// NewClusterCreateClusterParamsWithContext creates a new ClusterCreateClusterParams object +// with the ability to set a context for a request. +func NewClusterCreateClusterParamsWithContext(ctx context.Context) *ClusterCreateClusterParams { + return &ClusterCreateClusterParams{ + Context: ctx, + } +} + +// NewClusterCreateClusterParamsWithHTTPClient creates a new ClusterCreateClusterParams object +// with the ability to set a custom HTTPClient for a request. +func NewClusterCreateClusterParamsWithHTTPClient(client *http.Client) *ClusterCreateClusterParams { + return &ClusterCreateClusterParams{ + HTTPClient: client, + } +} + +/* ClusterCreateClusterParams contains all the parameters to send to the API endpoint + for the cluster create cluster operation. + + Typically these are written to a http.Request. +*/ +type ClusterCreateClusterParams struct { + + // Body. + Body *models.V3Cluster + + /* MetadataProject. + + Project of the resource + */ + MetadataProject string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the cluster create cluster params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ClusterCreateClusterParams) WithDefaults() *ClusterCreateClusterParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the cluster create cluster params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ClusterCreateClusterParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the cluster create cluster params +func (o *ClusterCreateClusterParams) WithTimeout(timeout time.Duration) *ClusterCreateClusterParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the cluster create cluster params +func (o *ClusterCreateClusterParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the cluster create cluster params +func (o *ClusterCreateClusterParams) WithContext(ctx context.Context) *ClusterCreateClusterParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the cluster create cluster params +func (o *ClusterCreateClusterParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the cluster create cluster params +func (o *ClusterCreateClusterParams) WithHTTPClient(client *http.Client) *ClusterCreateClusterParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the cluster create cluster params +func (o *ClusterCreateClusterParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the cluster create cluster params +func (o *ClusterCreateClusterParams) WithBody(body *models.V3Cluster) *ClusterCreateClusterParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the cluster create cluster params +func (o *ClusterCreateClusterParams) SetBody(body *models.V3Cluster) { + o.Body = body +} + +// WithMetadataProject adds the metadataProject to the cluster create cluster params +func (o *ClusterCreateClusterParams) WithMetadataProject(metadataProject string) *ClusterCreateClusterParams { + o.SetMetadataProject(metadataProject) + return o +} + +// SetMetadataProject adds the metadataProject to the cluster create cluster params +func (o *ClusterCreateClusterParams) SetMetadataProject(metadataProject string) { + o.MetadataProject = metadataProject +} + +// WriteToRequest writes these params to a swagger request +func (o *ClusterCreateClusterParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param metadata.project + if err := r.SetPathParam("metadata.project", o.MetadataProject); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/components/common/api/def/clients/scheduler/client/cluster/cluster_create_cluster_responses.go b/components/common/api/def/clients/scheduler/client/cluster/cluster_create_cluster_responses.go new file mode 100644 index 0000000..07e0402 --- /dev/null +++ b/components/common/api/def/clients/scheduler/client/cluster/cluster_create_cluster_responses.go @@ -0,0 +1,223 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package cluster + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/RafaySystems/rcloud-base/components/common/api/def/clients/scheduler/models" +) + +// ClusterCreateClusterReader is a Reader for the ClusterCreateCluster structure. +type ClusterCreateClusterReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ClusterCreateClusterReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewClusterCreateClusterOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 201: + result := NewClusterCreateClusterCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 403: + result := NewClusterCreateClusterForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewClusterCreateClusterNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + result := NewClusterCreateClusterDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewClusterCreateClusterOK creates a ClusterCreateClusterOK with default headers values +func NewClusterCreateClusterOK() *ClusterCreateClusterOK { + return &ClusterCreateClusterOK{} +} + +/* ClusterCreateClusterOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type ClusterCreateClusterOK struct { + Payload *models.V3Cluster +} + +func (o *ClusterCreateClusterOK) Error() string { + return fmt.Sprintf("[POST /infra/v3/project/{metadata.project}/cluster][%d] clusterCreateClusterOK %+v", 200, o.Payload) +} +func (o *ClusterCreateClusterOK) GetPayload() *models.V3Cluster { + return o.Payload +} + +func (o *ClusterCreateClusterOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V3Cluster) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewClusterCreateClusterCreated creates a ClusterCreateClusterCreated with default headers values +func NewClusterCreateClusterCreated() *ClusterCreateClusterCreated { + return &ClusterCreateClusterCreated{} +} + +/* ClusterCreateClusterCreated describes a response with status code 201, with default header values. + +Returned when edge is created successfully. +*/ +type ClusterCreateClusterCreated struct { + Payload interface{} +} + +func (o *ClusterCreateClusterCreated) Error() string { + return fmt.Sprintf("[POST /infra/v3/project/{metadata.project}/cluster][%d] clusterCreateClusterCreated %+v", 201, o.Payload) +} +func (o *ClusterCreateClusterCreated) GetPayload() interface{} { + return o.Payload +} + +func (o *ClusterCreateClusterCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewClusterCreateClusterForbidden creates a ClusterCreateClusterForbidden with default headers values +func NewClusterCreateClusterForbidden() *ClusterCreateClusterForbidden { + return &ClusterCreateClusterForbidden{} +} + +/* ClusterCreateClusterForbidden describes a response with status code 403, with default header values. + +Returned when the user does not have permission to access the resource. +*/ +type ClusterCreateClusterForbidden struct { + Payload interface{} +} + +func (o *ClusterCreateClusterForbidden) Error() string { + return fmt.Sprintf("[POST /infra/v3/project/{metadata.project}/cluster][%d] clusterCreateClusterForbidden %+v", 403, o.Payload) +} +func (o *ClusterCreateClusterForbidden) GetPayload() interface{} { + return o.Payload +} + +func (o *ClusterCreateClusterForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewClusterCreateClusterNotFound creates a ClusterCreateClusterNotFound with default headers values +func NewClusterCreateClusterNotFound() *ClusterCreateClusterNotFound { + return &ClusterCreateClusterNotFound{} +} + +/* ClusterCreateClusterNotFound describes a response with status code 404, with default header values. + +Returned when the resource does not exist. +*/ +type ClusterCreateClusterNotFound struct { + Payload string +} + +func (o *ClusterCreateClusterNotFound) Error() string { + return fmt.Sprintf("[POST /infra/v3/project/{metadata.project}/cluster][%d] clusterCreateClusterNotFound %+v", 404, o.Payload) +} +func (o *ClusterCreateClusterNotFound) GetPayload() string { + return o.Payload +} + +func (o *ClusterCreateClusterNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewClusterCreateClusterDefault creates a ClusterCreateClusterDefault with default headers values +func NewClusterCreateClusterDefault(code int) *ClusterCreateClusterDefault { + return &ClusterCreateClusterDefault{ + _statusCode: code, + } +} + +/* ClusterCreateClusterDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type ClusterCreateClusterDefault struct { + _statusCode int + + Payload *models.GooglerpcStatus +} + +// Code gets the status code for the cluster create cluster default response +func (o *ClusterCreateClusterDefault) Code() int { + return o._statusCode +} + +func (o *ClusterCreateClusterDefault) Error() string { + return fmt.Sprintf("[POST /infra/v3/project/{metadata.project}/cluster][%d] Cluster_CreateCluster default %+v", o._statusCode, o.Payload) +} +func (o *ClusterCreateClusterDefault) GetPayload() *models.GooglerpcStatus { + return o.Payload +} + +func (o *ClusterCreateClusterDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.GooglerpcStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/components/common/api/def/clients/scheduler/client/cluster/cluster_delete_cluster_parameters.go b/components/common/api/def/clients/scheduler/client/cluster/cluster_delete_cluster_parameters.go new file mode 100644 index 0000000..b0b60b0 --- /dev/null +++ b/components/common/api/def/clients/scheduler/client/cluster/cluster_delete_cluster_parameters.go @@ -0,0 +1,1914 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package cluster + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewClusterDeleteClusterParams creates a new ClusterDeleteClusterParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewClusterDeleteClusterParams() *ClusterDeleteClusterParams { + return &ClusterDeleteClusterParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewClusterDeleteClusterParamsWithTimeout creates a new ClusterDeleteClusterParams object +// with the ability to set a timeout on a request. +func NewClusterDeleteClusterParamsWithTimeout(timeout time.Duration) *ClusterDeleteClusterParams { + return &ClusterDeleteClusterParams{ + timeout: timeout, + } +} + +// NewClusterDeleteClusterParamsWithContext creates a new ClusterDeleteClusterParams object +// with the ability to set a context for a request. +func NewClusterDeleteClusterParamsWithContext(ctx context.Context) *ClusterDeleteClusterParams { + return &ClusterDeleteClusterParams{ + Context: ctx, + } +} + +// NewClusterDeleteClusterParamsWithHTTPClient creates a new ClusterDeleteClusterParams object +// with the ability to set a custom HTTPClient for a request. +func NewClusterDeleteClusterParamsWithHTTPClient(client *http.Client) *ClusterDeleteClusterParams { + return &ClusterDeleteClusterParams{ + HTTPClient: client, + } +} + +/* ClusterDeleteClusterParams contains all the parameters to send to the API endpoint + for the cluster delete cluster operation. + + Typically these are written to a http.Request. +*/ +type ClusterDeleteClusterParams struct { + + /* APIVersion. + + API Version. API Version of the resource + + Default: "infra.k8smgmt.io/v3" + */ + APIVersion *string + + /* Kind. + + Kind. Kind of the resource + + Default: "Cluster" + */ + Kind *string + + /* MetadataDescription. + + Description. description of the resource + */ + MetadataDescription *string + + // MetadataID. + MetadataID *string + + // MetadataModifiedAt. + // + // Format: date-time + MetadataModifiedAt *strfmt.DateTime + + /* MetadataName. + + name of the resource + */ + MetadataName string + + /* MetadataOrganization. + + Organization. Organization to which the resource belongs + */ + MetadataOrganization *string + + /* MetadataPartner. + + Partner. Partner to which the resource belongs + */ + MetadataPartner *string + + /* MetadataProject. + + Project of the resource + */ + MetadataProject string + + /* SpecClusterDataArecord. + + DNS A Record. Entry for DNS A Record + */ + SpecClusterDataArecord *string + + /* SpecClusterDataClusterBlueprint. + + ClusterBlueprint. Cluster Blueprint + */ + SpecClusterDataClusterBlueprint *string + + /* SpecClusterDataClusterStatusAuxiliaryTaskCount. + + Cluster Information. Override selector of the cluster + + Format: int64 + */ + SpecClusterDataClusterStatusAuxiliaryTaskCount *string + + /* SpecClusterDataClusterStatusCustomTaskCount. + + Cluster Information. Override selector of the cluster + + Format: int64 + */ + SpecClusterDataClusterStatusCustomTaskCount *string + + /* SpecClusterDataClusterStatusPublishedBlueprint. + + Cluster Information. Override selector of the cluster + */ + SpecClusterDataClusterStatusPublishedBlueprint *string + + /* SpecClusterDataClusterStatusSystemTaskCount. + + Cluster Information. Override selector of the cluster + + Format: int64 + */ + SpecClusterDataClusterStatusSystemTaskCount *string + + /* SpecClusterDataClusterStatusToken. + + Cluster Information. Override selector of the cluster + */ + SpecClusterDataClusterStatusToken *string + + /* SpecClusterDataCname. + + CNAME. cname of the cluster + */ + SpecClusterDataCname *string + + /* SpecClusterDataDisplayName. + + Display Name. Display Name + */ + SpecClusterDataDisplayName *string + + /* SpecClusterDataHealth. + + Health. Health + + Default: "EDGE_IGNORE" + */ + SpecClusterDataHealth *string + + /* SpecClusterDataManufacturer. + + Manufacturer. Manufacturer + */ + SpecClusterDataManufacturer *string + + /* SpecClusterDataPassphrase. + + Passphrase. passphrase of the cluster + */ + SpecClusterDataPassphrase *string + + /* SpecClusterDataProvider. + + Provider. Provider + */ + SpecClusterDataProvider *string + + /* SpecClusterType. + + Cluster Type. Type of the cluster being created + + Default: "Imported" + */ + SpecClusterType *string + + /* SpecMetroCity. + + City. City of the location + */ + SpecMetroCity *string + + /* SpecMetroCountry. + + Country. country of the location + */ + SpecMetroCountry *string + + /* SpecMetroCountryCode. + + CountryCode. CountryCode of the location + */ + SpecMetroCountryCode *string + + /* SpecMetroID. + + ID of Location. ID Location of the cluster + */ + SpecMetroID *string + + /* SpecMetroLatitude. + + Latitude. Latitude of the location + */ + SpecMetroLatitude *string + + /* SpecMetroLocale. + + Locale. locale of the location + */ + SpecMetroLocale *string + + /* SpecMetroLongitude. + + Longitude. Longitude of the location + */ + SpecMetroLongitude *string + + /* SpecMetroName. + + Location. Location of the cluster + */ + SpecMetroName *string + + /* SpecMetroState. + + State. State of the location + */ + SpecMetroState *string + + /* SpecMetroStateCode. + + StateCode. StateCode of the location + */ + SpecMetroStateCode *string + + /* SpecOverrideSelector. + + Override Selector. Override selector of the cluster + */ + SpecOverrideSelector *string + + /* SpecParamsEnvironmentProvider. + + EnvironmentProvider. environment provider of the cluster + */ + SpecParamsEnvironmentProvider *string + + /* SpecParamsKubernetesProvider. + + KubernetesProvider. kubernetes provider + */ + SpecParamsKubernetesProvider *string + + /* SpecParamsProvisionEnvironment. + + ProvisionEnvironment. provision environment + */ + SpecParamsProvisionEnvironment *string + + /* SpecParamsProvisionPackageType. + + ProvisionPackageType. provision package type + */ + SpecParamsProvisionPackageType *string + + /* SpecParamsProvisionType. + + ProvisionType. provision type + */ + SpecParamsProvisionType *string + + /* SpecParamsState. + + State. state + */ + SpecParamsState *string + + /* SpecProxyConfigAllowInsecureBootstrap. + + AllowInsecureBootstrap. Allow insecure bootstrap + */ + SpecProxyConfigAllowInsecureBootstrap *bool + + /* SpecProxyConfigBootstrapCA. + + BootstrapCA. Certificate Authority of bootstrap server + */ + SpecProxyConfigBootstrapCA *string + + /* SpecProxyConfigEnabled. + + Enabled. enabled + */ + SpecProxyConfigEnabled *bool + + /* SpecProxyConfigHTTPProxy. + + HttpProxy. http proxy + */ + SpecProxyConfigHTTPProxy *string + + /* SpecProxyConfigHTTPSProxy. + + HttpsProxy. https proxy + */ + SpecProxyConfigHTTPSProxy *string + + /* SpecProxyConfigNoProxy. + + noproxy. noproxy + */ + SpecProxyConfigNoProxy *string + + /* SpecProxyConfigProxyAuth. + + ProxyAuth. proxy auth + */ + SpecProxyConfigProxyAuth *string + + /* SpecShareMode. + + Override Selector. Override selector of the cluster + + Default: "ClusterShareModeNotSet" + */ + SpecShareMode *string + + /* StatusConditionStatus. + + Condition Status. status of the condition + + Default: "StatusNotSet" + */ + StatusConditionStatus *string + + /* StatusConditionType. + + Condition Type. type of the status condition + */ + StatusConditionType *string + + /* StatusLastUpdated. + + Last Updated. when the condition status is last updated + + Format: date-time + */ + StatusLastUpdated *strfmt.DateTime + + /* StatusReason. + + Reason. reason of the last condition status + */ + StatusReason *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the cluster delete cluster params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ClusterDeleteClusterParams) WithDefaults() *ClusterDeleteClusterParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the cluster delete cluster params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ClusterDeleteClusterParams) SetDefaults() { + var ( + aPIVersionDefault = string("infra.k8smgmt.io/v3") + + kindDefault = string("Cluster") + + specClusterDataHealthDefault = string("EDGE_IGNORE") + + specClusterTypeDefault = string("Imported") + + specShareModeDefault = string("ClusterShareModeNotSet") + + statusConditionStatusDefault = string("StatusNotSet") + ) + + val := ClusterDeleteClusterParams{ + APIVersion: &aPIVersionDefault, + Kind: &kindDefault, + SpecClusterDataHealth: &specClusterDataHealthDefault, + SpecClusterType: &specClusterTypeDefault, + SpecShareMode: &specShareModeDefault, + StatusConditionStatus: &statusConditionStatusDefault, + } + + val.timeout = o.timeout + val.Context = o.Context + val.HTTPClient = o.HTTPClient + *o = val +} + +// WithTimeout adds the timeout to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) WithTimeout(timeout time.Duration) *ClusterDeleteClusterParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) WithContext(ctx context.Context) *ClusterDeleteClusterParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) WithHTTPClient(client *http.Client) *ClusterDeleteClusterParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAPIVersion adds the aPIVersion to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) WithAPIVersion(aPIVersion *string) *ClusterDeleteClusterParams { + o.SetAPIVersion(aPIVersion) + return o +} + +// SetAPIVersion adds the apiVersion to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) SetAPIVersion(aPIVersion *string) { + o.APIVersion = aPIVersion +} + +// WithKind adds the kind to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) WithKind(kind *string) *ClusterDeleteClusterParams { + o.SetKind(kind) + return o +} + +// SetKind adds the kind to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) SetKind(kind *string) { + o.Kind = kind +} + +// WithMetadataDescription adds the metadataDescription to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) WithMetadataDescription(metadataDescription *string) *ClusterDeleteClusterParams { + o.SetMetadataDescription(metadataDescription) + return o +} + +// SetMetadataDescription adds the metadataDescription to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) SetMetadataDescription(metadataDescription *string) { + o.MetadataDescription = metadataDescription +} + +// WithMetadataID adds the metadataID to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) WithMetadataID(metadataID *string) *ClusterDeleteClusterParams { + o.SetMetadataID(metadataID) + return o +} + +// SetMetadataID adds the metadataId to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) SetMetadataID(metadataID *string) { + o.MetadataID = metadataID +} + +// WithMetadataModifiedAt adds the metadataModifiedAt to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) WithMetadataModifiedAt(metadataModifiedAt *strfmt.DateTime) *ClusterDeleteClusterParams { + o.SetMetadataModifiedAt(metadataModifiedAt) + return o +} + +// SetMetadataModifiedAt adds the metadataModifiedAt to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) SetMetadataModifiedAt(metadataModifiedAt *strfmt.DateTime) { + o.MetadataModifiedAt = metadataModifiedAt +} + +// WithMetadataName adds the metadataName to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) WithMetadataName(metadataName string) *ClusterDeleteClusterParams { + o.SetMetadataName(metadataName) + return o +} + +// SetMetadataName adds the metadataName to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) SetMetadataName(metadataName string) { + o.MetadataName = metadataName +} + +// WithMetadataOrganization adds the metadataOrganization to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) WithMetadataOrganization(metadataOrganization *string) *ClusterDeleteClusterParams { + o.SetMetadataOrganization(metadataOrganization) + return o +} + +// SetMetadataOrganization adds the metadataOrganization to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) SetMetadataOrganization(metadataOrganization *string) { + o.MetadataOrganization = metadataOrganization +} + +// WithMetadataPartner adds the metadataPartner to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) WithMetadataPartner(metadataPartner *string) *ClusterDeleteClusterParams { + o.SetMetadataPartner(metadataPartner) + return o +} + +// SetMetadataPartner adds the metadataPartner to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) SetMetadataPartner(metadataPartner *string) { + o.MetadataPartner = metadataPartner +} + +// WithMetadataProject adds the metadataProject to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) WithMetadataProject(metadataProject string) *ClusterDeleteClusterParams { + o.SetMetadataProject(metadataProject) + return o +} + +// SetMetadataProject adds the metadataProject to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) SetMetadataProject(metadataProject string) { + o.MetadataProject = metadataProject +} + +// WithSpecClusterDataArecord adds the specClusterDataArecord to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) WithSpecClusterDataArecord(specClusterDataArecord *string) *ClusterDeleteClusterParams { + o.SetSpecClusterDataArecord(specClusterDataArecord) + return o +} + +// SetSpecClusterDataArecord adds the specClusterDataArecord to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) SetSpecClusterDataArecord(specClusterDataArecord *string) { + o.SpecClusterDataArecord = specClusterDataArecord +} + +// WithSpecClusterDataClusterBlueprint adds the specClusterDataClusterBlueprint to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) WithSpecClusterDataClusterBlueprint(specClusterDataClusterBlueprint *string) *ClusterDeleteClusterParams { + o.SetSpecClusterDataClusterBlueprint(specClusterDataClusterBlueprint) + return o +} + +// SetSpecClusterDataClusterBlueprint adds the specClusterDataClusterBlueprint to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) SetSpecClusterDataClusterBlueprint(specClusterDataClusterBlueprint *string) { + o.SpecClusterDataClusterBlueprint = specClusterDataClusterBlueprint +} + +// WithSpecClusterDataClusterStatusAuxiliaryTaskCount adds the specClusterDataClusterStatusAuxiliaryTaskCount to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) WithSpecClusterDataClusterStatusAuxiliaryTaskCount(specClusterDataClusterStatusAuxiliaryTaskCount *string) *ClusterDeleteClusterParams { + o.SetSpecClusterDataClusterStatusAuxiliaryTaskCount(specClusterDataClusterStatusAuxiliaryTaskCount) + return o +} + +// SetSpecClusterDataClusterStatusAuxiliaryTaskCount adds the specClusterDataClusterStatusAuxiliaryTaskCount to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) SetSpecClusterDataClusterStatusAuxiliaryTaskCount(specClusterDataClusterStatusAuxiliaryTaskCount *string) { + o.SpecClusterDataClusterStatusAuxiliaryTaskCount = specClusterDataClusterStatusAuxiliaryTaskCount +} + +// WithSpecClusterDataClusterStatusCustomTaskCount adds the specClusterDataClusterStatusCustomTaskCount to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) WithSpecClusterDataClusterStatusCustomTaskCount(specClusterDataClusterStatusCustomTaskCount *string) *ClusterDeleteClusterParams { + o.SetSpecClusterDataClusterStatusCustomTaskCount(specClusterDataClusterStatusCustomTaskCount) + return o +} + +// SetSpecClusterDataClusterStatusCustomTaskCount adds the specClusterDataClusterStatusCustomTaskCount to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) SetSpecClusterDataClusterStatusCustomTaskCount(specClusterDataClusterStatusCustomTaskCount *string) { + o.SpecClusterDataClusterStatusCustomTaskCount = specClusterDataClusterStatusCustomTaskCount +} + +// WithSpecClusterDataClusterStatusPublishedBlueprint adds the specClusterDataClusterStatusPublishedBlueprint to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) WithSpecClusterDataClusterStatusPublishedBlueprint(specClusterDataClusterStatusPublishedBlueprint *string) *ClusterDeleteClusterParams { + o.SetSpecClusterDataClusterStatusPublishedBlueprint(specClusterDataClusterStatusPublishedBlueprint) + return o +} + +// SetSpecClusterDataClusterStatusPublishedBlueprint adds the specClusterDataClusterStatusPublishedBlueprint to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) SetSpecClusterDataClusterStatusPublishedBlueprint(specClusterDataClusterStatusPublishedBlueprint *string) { + o.SpecClusterDataClusterStatusPublishedBlueprint = specClusterDataClusterStatusPublishedBlueprint +} + +// WithSpecClusterDataClusterStatusSystemTaskCount adds the specClusterDataClusterStatusSystemTaskCount to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) WithSpecClusterDataClusterStatusSystemTaskCount(specClusterDataClusterStatusSystemTaskCount *string) *ClusterDeleteClusterParams { + o.SetSpecClusterDataClusterStatusSystemTaskCount(specClusterDataClusterStatusSystemTaskCount) + return o +} + +// SetSpecClusterDataClusterStatusSystemTaskCount adds the specClusterDataClusterStatusSystemTaskCount to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) SetSpecClusterDataClusterStatusSystemTaskCount(specClusterDataClusterStatusSystemTaskCount *string) { + o.SpecClusterDataClusterStatusSystemTaskCount = specClusterDataClusterStatusSystemTaskCount +} + +// WithSpecClusterDataClusterStatusToken adds the specClusterDataClusterStatusToken to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) WithSpecClusterDataClusterStatusToken(specClusterDataClusterStatusToken *string) *ClusterDeleteClusterParams { + o.SetSpecClusterDataClusterStatusToken(specClusterDataClusterStatusToken) + return o +} + +// SetSpecClusterDataClusterStatusToken adds the specClusterDataClusterStatusToken to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) SetSpecClusterDataClusterStatusToken(specClusterDataClusterStatusToken *string) { + o.SpecClusterDataClusterStatusToken = specClusterDataClusterStatusToken +} + +// WithSpecClusterDataCname adds the specClusterDataCname to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) WithSpecClusterDataCname(specClusterDataCname *string) *ClusterDeleteClusterParams { + o.SetSpecClusterDataCname(specClusterDataCname) + return o +} + +// SetSpecClusterDataCname adds the specClusterDataCname to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) SetSpecClusterDataCname(specClusterDataCname *string) { + o.SpecClusterDataCname = specClusterDataCname +} + +// WithSpecClusterDataDisplayName adds the specClusterDataDisplayName to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) WithSpecClusterDataDisplayName(specClusterDataDisplayName *string) *ClusterDeleteClusterParams { + o.SetSpecClusterDataDisplayName(specClusterDataDisplayName) + return o +} + +// SetSpecClusterDataDisplayName adds the specClusterDataDisplayName to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) SetSpecClusterDataDisplayName(specClusterDataDisplayName *string) { + o.SpecClusterDataDisplayName = specClusterDataDisplayName +} + +// WithSpecClusterDataHealth adds the specClusterDataHealth to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) WithSpecClusterDataHealth(specClusterDataHealth *string) *ClusterDeleteClusterParams { + o.SetSpecClusterDataHealth(specClusterDataHealth) + return o +} + +// SetSpecClusterDataHealth adds the specClusterDataHealth to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) SetSpecClusterDataHealth(specClusterDataHealth *string) { + o.SpecClusterDataHealth = specClusterDataHealth +} + +// WithSpecClusterDataManufacturer adds the specClusterDataManufacturer to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) WithSpecClusterDataManufacturer(specClusterDataManufacturer *string) *ClusterDeleteClusterParams { + o.SetSpecClusterDataManufacturer(specClusterDataManufacturer) + return o +} + +// SetSpecClusterDataManufacturer adds the specClusterDataManufacturer to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) SetSpecClusterDataManufacturer(specClusterDataManufacturer *string) { + o.SpecClusterDataManufacturer = specClusterDataManufacturer +} + +// WithSpecClusterDataPassphrase adds the specClusterDataPassphrase to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) WithSpecClusterDataPassphrase(specClusterDataPassphrase *string) *ClusterDeleteClusterParams { + o.SetSpecClusterDataPassphrase(specClusterDataPassphrase) + return o +} + +// SetSpecClusterDataPassphrase adds the specClusterDataPassphrase to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) SetSpecClusterDataPassphrase(specClusterDataPassphrase *string) { + o.SpecClusterDataPassphrase = specClusterDataPassphrase +} + +// WithSpecClusterDataProvider adds the specClusterDataProvider to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) WithSpecClusterDataProvider(specClusterDataProvider *string) *ClusterDeleteClusterParams { + o.SetSpecClusterDataProvider(specClusterDataProvider) + return o +} + +// SetSpecClusterDataProvider adds the specClusterDataProvider to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) SetSpecClusterDataProvider(specClusterDataProvider *string) { + o.SpecClusterDataProvider = specClusterDataProvider +} + +// WithSpecClusterType adds the specClusterType to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) WithSpecClusterType(specClusterType *string) *ClusterDeleteClusterParams { + o.SetSpecClusterType(specClusterType) + return o +} + +// SetSpecClusterType adds the specClusterType to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) SetSpecClusterType(specClusterType *string) { + o.SpecClusterType = specClusterType +} + +// WithSpecMetroCity adds the specMetroCity to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) WithSpecMetroCity(specMetroCity *string) *ClusterDeleteClusterParams { + o.SetSpecMetroCity(specMetroCity) + return o +} + +// SetSpecMetroCity adds the specMetroCity to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) SetSpecMetroCity(specMetroCity *string) { + o.SpecMetroCity = specMetroCity +} + +// WithSpecMetroCountry adds the specMetroCountry to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) WithSpecMetroCountry(specMetroCountry *string) *ClusterDeleteClusterParams { + o.SetSpecMetroCountry(specMetroCountry) + return o +} + +// SetSpecMetroCountry adds the specMetroCountry to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) SetSpecMetroCountry(specMetroCountry *string) { + o.SpecMetroCountry = specMetroCountry +} + +// WithSpecMetroCountryCode adds the specMetroCountryCode to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) WithSpecMetroCountryCode(specMetroCountryCode *string) *ClusterDeleteClusterParams { + o.SetSpecMetroCountryCode(specMetroCountryCode) + return o +} + +// SetSpecMetroCountryCode adds the specMetroCountryCode to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) SetSpecMetroCountryCode(specMetroCountryCode *string) { + o.SpecMetroCountryCode = specMetroCountryCode +} + +// WithSpecMetroID adds the specMetroID to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) WithSpecMetroID(specMetroID *string) *ClusterDeleteClusterParams { + o.SetSpecMetroID(specMetroID) + return o +} + +// SetSpecMetroID adds the specMetroId to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) SetSpecMetroID(specMetroID *string) { + o.SpecMetroID = specMetroID +} + +// WithSpecMetroLatitude adds the specMetroLatitude to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) WithSpecMetroLatitude(specMetroLatitude *string) *ClusterDeleteClusterParams { + o.SetSpecMetroLatitude(specMetroLatitude) + return o +} + +// SetSpecMetroLatitude adds the specMetroLatitude to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) SetSpecMetroLatitude(specMetroLatitude *string) { + o.SpecMetroLatitude = specMetroLatitude +} + +// WithSpecMetroLocale adds the specMetroLocale to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) WithSpecMetroLocale(specMetroLocale *string) *ClusterDeleteClusterParams { + o.SetSpecMetroLocale(specMetroLocale) + return o +} + +// SetSpecMetroLocale adds the specMetroLocale to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) SetSpecMetroLocale(specMetroLocale *string) { + o.SpecMetroLocale = specMetroLocale +} + +// WithSpecMetroLongitude adds the specMetroLongitude to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) WithSpecMetroLongitude(specMetroLongitude *string) *ClusterDeleteClusterParams { + o.SetSpecMetroLongitude(specMetroLongitude) + return o +} + +// SetSpecMetroLongitude adds the specMetroLongitude to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) SetSpecMetroLongitude(specMetroLongitude *string) { + o.SpecMetroLongitude = specMetroLongitude +} + +// WithSpecMetroName adds the specMetroName to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) WithSpecMetroName(specMetroName *string) *ClusterDeleteClusterParams { + o.SetSpecMetroName(specMetroName) + return o +} + +// SetSpecMetroName adds the specMetroName to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) SetSpecMetroName(specMetroName *string) { + o.SpecMetroName = specMetroName +} + +// WithSpecMetroState adds the specMetroState to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) WithSpecMetroState(specMetroState *string) *ClusterDeleteClusterParams { + o.SetSpecMetroState(specMetroState) + return o +} + +// SetSpecMetroState adds the specMetroState to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) SetSpecMetroState(specMetroState *string) { + o.SpecMetroState = specMetroState +} + +// WithSpecMetroStateCode adds the specMetroStateCode to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) WithSpecMetroStateCode(specMetroStateCode *string) *ClusterDeleteClusterParams { + o.SetSpecMetroStateCode(specMetroStateCode) + return o +} + +// SetSpecMetroStateCode adds the specMetroStateCode to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) SetSpecMetroStateCode(specMetroStateCode *string) { + o.SpecMetroStateCode = specMetroStateCode +} + +// WithSpecOverrideSelector adds the specOverrideSelector to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) WithSpecOverrideSelector(specOverrideSelector *string) *ClusterDeleteClusterParams { + o.SetSpecOverrideSelector(specOverrideSelector) + return o +} + +// SetSpecOverrideSelector adds the specOverrideSelector to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) SetSpecOverrideSelector(specOverrideSelector *string) { + o.SpecOverrideSelector = specOverrideSelector +} + +// WithSpecParamsEnvironmentProvider adds the specParamsEnvironmentProvider to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) WithSpecParamsEnvironmentProvider(specParamsEnvironmentProvider *string) *ClusterDeleteClusterParams { + o.SetSpecParamsEnvironmentProvider(specParamsEnvironmentProvider) + return o +} + +// SetSpecParamsEnvironmentProvider adds the specParamsEnvironmentProvider to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) SetSpecParamsEnvironmentProvider(specParamsEnvironmentProvider *string) { + o.SpecParamsEnvironmentProvider = specParamsEnvironmentProvider +} + +// WithSpecParamsKubernetesProvider adds the specParamsKubernetesProvider to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) WithSpecParamsKubernetesProvider(specParamsKubernetesProvider *string) *ClusterDeleteClusterParams { + o.SetSpecParamsKubernetesProvider(specParamsKubernetesProvider) + return o +} + +// SetSpecParamsKubernetesProvider adds the specParamsKubernetesProvider to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) SetSpecParamsKubernetesProvider(specParamsKubernetesProvider *string) { + o.SpecParamsKubernetesProvider = specParamsKubernetesProvider +} + +// WithSpecParamsProvisionEnvironment adds the specParamsProvisionEnvironment to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) WithSpecParamsProvisionEnvironment(specParamsProvisionEnvironment *string) *ClusterDeleteClusterParams { + o.SetSpecParamsProvisionEnvironment(specParamsProvisionEnvironment) + return o +} + +// SetSpecParamsProvisionEnvironment adds the specParamsProvisionEnvironment to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) SetSpecParamsProvisionEnvironment(specParamsProvisionEnvironment *string) { + o.SpecParamsProvisionEnvironment = specParamsProvisionEnvironment +} + +// WithSpecParamsProvisionPackageType adds the specParamsProvisionPackageType to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) WithSpecParamsProvisionPackageType(specParamsProvisionPackageType *string) *ClusterDeleteClusterParams { + o.SetSpecParamsProvisionPackageType(specParamsProvisionPackageType) + return o +} + +// SetSpecParamsProvisionPackageType adds the specParamsProvisionPackageType to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) SetSpecParamsProvisionPackageType(specParamsProvisionPackageType *string) { + o.SpecParamsProvisionPackageType = specParamsProvisionPackageType +} + +// WithSpecParamsProvisionType adds the specParamsProvisionType to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) WithSpecParamsProvisionType(specParamsProvisionType *string) *ClusterDeleteClusterParams { + o.SetSpecParamsProvisionType(specParamsProvisionType) + return o +} + +// SetSpecParamsProvisionType adds the specParamsProvisionType to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) SetSpecParamsProvisionType(specParamsProvisionType *string) { + o.SpecParamsProvisionType = specParamsProvisionType +} + +// WithSpecParamsState adds the specParamsState to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) WithSpecParamsState(specParamsState *string) *ClusterDeleteClusterParams { + o.SetSpecParamsState(specParamsState) + return o +} + +// SetSpecParamsState adds the specParamsState to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) SetSpecParamsState(specParamsState *string) { + o.SpecParamsState = specParamsState +} + +// WithSpecProxyConfigAllowInsecureBootstrap adds the specProxyConfigAllowInsecureBootstrap to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) WithSpecProxyConfigAllowInsecureBootstrap(specProxyConfigAllowInsecureBootstrap *bool) *ClusterDeleteClusterParams { + o.SetSpecProxyConfigAllowInsecureBootstrap(specProxyConfigAllowInsecureBootstrap) + return o +} + +// SetSpecProxyConfigAllowInsecureBootstrap adds the specProxyConfigAllowInsecureBootstrap to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) SetSpecProxyConfigAllowInsecureBootstrap(specProxyConfigAllowInsecureBootstrap *bool) { + o.SpecProxyConfigAllowInsecureBootstrap = specProxyConfigAllowInsecureBootstrap +} + +// WithSpecProxyConfigBootstrapCA adds the specProxyConfigBootstrapCA to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) WithSpecProxyConfigBootstrapCA(specProxyConfigBootstrapCA *string) *ClusterDeleteClusterParams { + o.SetSpecProxyConfigBootstrapCA(specProxyConfigBootstrapCA) + return o +} + +// SetSpecProxyConfigBootstrapCA adds the specProxyConfigBootstrapCA to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) SetSpecProxyConfigBootstrapCA(specProxyConfigBootstrapCA *string) { + o.SpecProxyConfigBootstrapCA = specProxyConfigBootstrapCA +} + +// WithSpecProxyConfigEnabled adds the specProxyConfigEnabled to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) WithSpecProxyConfigEnabled(specProxyConfigEnabled *bool) *ClusterDeleteClusterParams { + o.SetSpecProxyConfigEnabled(specProxyConfigEnabled) + return o +} + +// SetSpecProxyConfigEnabled adds the specProxyConfigEnabled to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) SetSpecProxyConfigEnabled(specProxyConfigEnabled *bool) { + o.SpecProxyConfigEnabled = specProxyConfigEnabled +} + +// WithSpecProxyConfigHTTPProxy adds the specProxyConfigHTTPProxy to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) WithSpecProxyConfigHTTPProxy(specProxyConfigHTTPProxy *string) *ClusterDeleteClusterParams { + o.SetSpecProxyConfigHTTPProxy(specProxyConfigHTTPProxy) + return o +} + +// SetSpecProxyConfigHTTPProxy adds the specProxyConfigHttpProxy to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) SetSpecProxyConfigHTTPProxy(specProxyConfigHTTPProxy *string) { + o.SpecProxyConfigHTTPProxy = specProxyConfigHTTPProxy +} + +// WithSpecProxyConfigHTTPSProxy adds the specProxyConfigHTTPSProxy to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) WithSpecProxyConfigHTTPSProxy(specProxyConfigHTTPSProxy *string) *ClusterDeleteClusterParams { + o.SetSpecProxyConfigHTTPSProxy(specProxyConfigHTTPSProxy) + return o +} + +// SetSpecProxyConfigHTTPSProxy adds the specProxyConfigHttpsProxy to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) SetSpecProxyConfigHTTPSProxy(specProxyConfigHTTPSProxy *string) { + o.SpecProxyConfigHTTPSProxy = specProxyConfigHTTPSProxy +} + +// WithSpecProxyConfigNoProxy adds the specProxyConfigNoProxy to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) WithSpecProxyConfigNoProxy(specProxyConfigNoProxy *string) *ClusterDeleteClusterParams { + o.SetSpecProxyConfigNoProxy(specProxyConfigNoProxy) + return o +} + +// SetSpecProxyConfigNoProxy adds the specProxyConfigNoProxy to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) SetSpecProxyConfigNoProxy(specProxyConfigNoProxy *string) { + o.SpecProxyConfigNoProxy = specProxyConfigNoProxy +} + +// WithSpecProxyConfigProxyAuth adds the specProxyConfigProxyAuth to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) WithSpecProxyConfigProxyAuth(specProxyConfigProxyAuth *string) *ClusterDeleteClusterParams { + o.SetSpecProxyConfigProxyAuth(specProxyConfigProxyAuth) + return o +} + +// SetSpecProxyConfigProxyAuth adds the specProxyConfigProxyAuth to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) SetSpecProxyConfigProxyAuth(specProxyConfigProxyAuth *string) { + o.SpecProxyConfigProxyAuth = specProxyConfigProxyAuth +} + +// WithSpecShareMode adds the specShareMode to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) WithSpecShareMode(specShareMode *string) *ClusterDeleteClusterParams { + o.SetSpecShareMode(specShareMode) + return o +} + +// SetSpecShareMode adds the specShareMode to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) SetSpecShareMode(specShareMode *string) { + o.SpecShareMode = specShareMode +} + +// WithStatusConditionStatus adds the statusConditionStatus to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) WithStatusConditionStatus(statusConditionStatus *string) *ClusterDeleteClusterParams { + o.SetStatusConditionStatus(statusConditionStatus) + return o +} + +// SetStatusConditionStatus adds the statusConditionStatus to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) SetStatusConditionStatus(statusConditionStatus *string) { + o.StatusConditionStatus = statusConditionStatus +} + +// WithStatusConditionType adds the statusConditionType to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) WithStatusConditionType(statusConditionType *string) *ClusterDeleteClusterParams { + o.SetStatusConditionType(statusConditionType) + return o +} + +// SetStatusConditionType adds the statusConditionType to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) SetStatusConditionType(statusConditionType *string) { + o.StatusConditionType = statusConditionType +} + +// WithStatusLastUpdated adds the statusLastUpdated to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) WithStatusLastUpdated(statusLastUpdated *strfmt.DateTime) *ClusterDeleteClusterParams { + o.SetStatusLastUpdated(statusLastUpdated) + return o +} + +// SetStatusLastUpdated adds the statusLastUpdated to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) SetStatusLastUpdated(statusLastUpdated *strfmt.DateTime) { + o.StatusLastUpdated = statusLastUpdated +} + +// WithStatusReason adds the statusReason to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) WithStatusReason(statusReason *string) *ClusterDeleteClusterParams { + o.SetStatusReason(statusReason) + return o +} + +// SetStatusReason adds the statusReason to the cluster delete cluster params +func (o *ClusterDeleteClusterParams) SetStatusReason(statusReason *string) { + o.StatusReason = statusReason +} + +// WriteToRequest writes these params to a swagger request +func (o *ClusterDeleteClusterParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.APIVersion != nil { + + // query param apiVersion + var qrAPIVersion string + + if o.APIVersion != nil { + qrAPIVersion = *o.APIVersion + } + qAPIVersion := qrAPIVersion + if qAPIVersion != "" { + + if err := r.SetQueryParam("apiVersion", qAPIVersion); err != nil { + return err + } + } + } + + if o.Kind != nil { + + // query param kind + var qrKind string + + if o.Kind != nil { + qrKind = *o.Kind + } + qKind := qrKind + if qKind != "" { + + if err := r.SetQueryParam("kind", qKind); err != nil { + return err + } + } + } + + if o.MetadataDescription != nil { + + // query param metadata.description + var qrMetadataDescription string + + if o.MetadataDescription != nil { + qrMetadataDescription = *o.MetadataDescription + } + qMetadataDescription := qrMetadataDescription + if qMetadataDescription != "" { + + if err := r.SetQueryParam("metadata.description", qMetadataDescription); err != nil { + return err + } + } + } + + if o.MetadataID != nil { + + // query param metadata.id + var qrMetadataID string + + if o.MetadataID != nil { + qrMetadataID = *o.MetadataID + } + qMetadataID := qrMetadataID + if qMetadataID != "" { + + if err := r.SetQueryParam("metadata.id", qMetadataID); err != nil { + return err + } + } + } + + if o.MetadataModifiedAt != nil { + + // query param metadata.modifiedAt + var qrMetadataModifiedAt strfmt.DateTime + + if o.MetadataModifiedAt != nil { + qrMetadataModifiedAt = *o.MetadataModifiedAt + } + qMetadataModifiedAt := qrMetadataModifiedAt.String() + if qMetadataModifiedAt != "" { + + if err := r.SetQueryParam("metadata.modifiedAt", qMetadataModifiedAt); err != nil { + return err + } + } + } + + // path param metadata.name + if err := r.SetPathParam("metadata.name", o.MetadataName); err != nil { + return err + } + + if o.MetadataOrganization != nil { + + // query param metadata.organization + var qrMetadataOrganization string + + if o.MetadataOrganization != nil { + qrMetadataOrganization = *o.MetadataOrganization + } + qMetadataOrganization := qrMetadataOrganization + if qMetadataOrganization != "" { + + if err := r.SetQueryParam("metadata.organization", qMetadataOrganization); err != nil { + return err + } + } + } + + if o.MetadataPartner != nil { + + // query param metadata.partner + var qrMetadataPartner string + + if o.MetadataPartner != nil { + qrMetadataPartner = *o.MetadataPartner + } + qMetadataPartner := qrMetadataPartner + if qMetadataPartner != "" { + + if err := r.SetQueryParam("metadata.partner", qMetadataPartner); err != nil { + return err + } + } + } + + // path param metadata.project + if err := r.SetPathParam("metadata.project", o.MetadataProject); err != nil { + return err + } + + if o.SpecClusterDataArecord != nil { + + // query param spec.clusterData.arecord + var qrSpecClusterDataArecord string + + if o.SpecClusterDataArecord != nil { + qrSpecClusterDataArecord = *o.SpecClusterDataArecord + } + qSpecClusterDataArecord := qrSpecClusterDataArecord + if qSpecClusterDataArecord != "" { + + if err := r.SetQueryParam("spec.clusterData.arecord", qSpecClusterDataArecord); err != nil { + return err + } + } + } + + if o.SpecClusterDataClusterBlueprint != nil { + + // query param spec.clusterData.clusterBlueprint + var qrSpecClusterDataClusterBlueprint string + + if o.SpecClusterDataClusterBlueprint != nil { + qrSpecClusterDataClusterBlueprint = *o.SpecClusterDataClusterBlueprint + } + qSpecClusterDataClusterBlueprint := qrSpecClusterDataClusterBlueprint + if qSpecClusterDataClusterBlueprint != "" { + + if err := r.SetQueryParam("spec.clusterData.clusterBlueprint", qSpecClusterDataClusterBlueprint); err != nil { + return err + } + } + } + + if o.SpecClusterDataClusterStatusAuxiliaryTaskCount != nil { + + // query param spec.clusterData.clusterStatus.auxiliaryTaskCount + var qrSpecClusterDataClusterStatusAuxiliaryTaskCount string + + if o.SpecClusterDataClusterStatusAuxiliaryTaskCount != nil { + qrSpecClusterDataClusterStatusAuxiliaryTaskCount = *o.SpecClusterDataClusterStatusAuxiliaryTaskCount + } + qSpecClusterDataClusterStatusAuxiliaryTaskCount := qrSpecClusterDataClusterStatusAuxiliaryTaskCount + if qSpecClusterDataClusterStatusAuxiliaryTaskCount != "" { + + if err := r.SetQueryParam("spec.clusterData.clusterStatus.auxiliaryTaskCount", qSpecClusterDataClusterStatusAuxiliaryTaskCount); err != nil { + return err + } + } + } + + if o.SpecClusterDataClusterStatusCustomTaskCount != nil { + + // query param spec.clusterData.clusterStatus.customTaskCount + var qrSpecClusterDataClusterStatusCustomTaskCount string + + if o.SpecClusterDataClusterStatusCustomTaskCount != nil { + qrSpecClusterDataClusterStatusCustomTaskCount = *o.SpecClusterDataClusterStatusCustomTaskCount + } + qSpecClusterDataClusterStatusCustomTaskCount := qrSpecClusterDataClusterStatusCustomTaskCount + if qSpecClusterDataClusterStatusCustomTaskCount != "" { + + if err := r.SetQueryParam("spec.clusterData.clusterStatus.customTaskCount", qSpecClusterDataClusterStatusCustomTaskCount); err != nil { + return err + } + } + } + + if o.SpecClusterDataClusterStatusPublishedBlueprint != nil { + + // query param spec.clusterData.clusterStatus.publishedBlueprint + var qrSpecClusterDataClusterStatusPublishedBlueprint string + + if o.SpecClusterDataClusterStatusPublishedBlueprint != nil { + qrSpecClusterDataClusterStatusPublishedBlueprint = *o.SpecClusterDataClusterStatusPublishedBlueprint + } + qSpecClusterDataClusterStatusPublishedBlueprint := qrSpecClusterDataClusterStatusPublishedBlueprint + if qSpecClusterDataClusterStatusPublishedBlueprint != "" { + + if err := r.SetQueryParam("spec.clusterData.clusterStatus.publishedBlueprint", qSpecClusterDataClusterStatusPublishedBlueprint); err != nil { + return err + } + } + } + + if o.SpecClusterDataClusterStatusSystemTaskCount != nil { + + // query param spec.clusterData.clusterStatus.systemTaskCount + var qrSpecClusterDataClusterStatusSystemTaskCount string + + if o.SpecClusterDataClusterStatusSystemTaskCount != nil { + qrSpecClusterDataClusterStatusSystemTaskCount = *o.SpecClusterDataClusterStatusSystemTaskCount + } + qSpecClusterDataClusterStatusSystemTaskCount := qrSpecClusterDataClusterStatusSystemTaskCount + if qSpecClusterDataClusterStatusSystemTaskCount != "" { + + if err := r.SetQueryParam("spec.clusterData.clusterStatus.systemTaskCount", qSpecClusterDataClusterStatusSystemTaskCount); err != nil { + return err + } + } + } + + if o.SpecClusterDataClusterStatusToken != nil { + + // query param spec.clusterData.clusterStatus.token + var qrSpecClusterDataClusterStatusToken string + + if o.SpecClusterDataClusterStatusToken != nil { + qrSpecClusterDataClusterStatusToken = *o.SpecClusterDataClusterStatusToken + } + qSpecClusterDataClusterStatusToken := qrSpecClusterDataClusterStatusToken + if qSpecClusterDataClusterStatusToken != "" { + + if err := r.SetQueryParam("spec.clusterData.clusterStatus.token", qSpecClusterDataClusterStatusToken); err != nil { + return err + } + } + } + + if o.SpecClusterDataCname != nil { + + // query param spec.clusterData.cname + var qrSpecClusterDataCname string + + if o.SpecClusterDataCname != nil { + qrSpecClusterDataCname = *o.SpecClusterDataCname + } + qSpecClusterDataCname := qrSpecClusterDataCname + if qSpecClusterDataCname != "" { + + if err := r.SetQueryParam("spec.clusterData.cname", qSpecClusterDataCname); err != nil { + return err + } + } + } + + if o.SpecClusterDataDisplayName != nil { + + // query param spec.clusterData.displayName + var qrSpecClusterDataDisplayName string + + if o.SpecClusterDataDisplayName != nil { + qrSpecClusterDataDisplayName = *o.SpecClusterDataDisplayName + } + qSpecClusterDataDisplayName := qrSpecClusterDataDisplayName + if qSpecClusterDataDisplayName != "" { + + if err := r.SetQueryParam("spec.clusterData.displayName", qSpecClusterDataDisplayName); err != nil { + return err + } + } + } + + if o.SpecClusterDataHealth != nil { + + // query param spec.clusterData.health + var qrSpecClusterDataHealth string + + if o.SpecClusterDataHealth != nil { + qrSpecClusterDataHealth = *o.SpecClusterDataHealth + } + qSpecClusterDataHealth := qrSpecClusterDataHealth + if qSpecClusterDataHealth != "" { + + if err := r.SetQueryParam("spec.clusterData.health", qSpecClusterDataHealth); err != nil { + return err + } + } + } + + if o.SpecClusterDataManufacturer != nil { + + // query param spec.clusterData.manufacturer + var qrSpecClusterDataManufacturer string + + if o.SpecClusterDataManufacturer != nil { + qrSpecClusterDataManufacturer = *o.SpecClusterDataManufacturer + } + qSpecClusterDataManufacturer := qrSpecClusterDataManufacturer + if qSpecClusterDataManufacturer != "" { + + if err := r.SetQueryParam("spec.clusterData.manufacturer", qSpecClusterDataManufacturer); err != nil { + return err + } + } + } + + if o.SpecClusterDataPassphrase != nil { + + // query param spec.clusterData.passphrase + var qrSpecClusterDataPassphrase string + + if o.SpecClusterDataPassphrase != nil { + qrSpecClusterDataPassphrase = *o.SpecClusterDataPassphrase + } + qSpecClusterDataPassphrase := qrSpecClusterDataPassphrase + if qSpecClusterDataPassphrase != "" { + + if err := r.SetQueryParam("spec.clusterData.passphrase", qSpecClusterDataPassphrase); err != nil { + return err + } + } + } + + if o.SpecClusterDataProvider != nil { + + // query param spec.clusterData.provider + var qrSpecClusterDataProvider string + + if o.SpecClusterDataProvider != nil { + qrSpecClusterDataProvider = *o.SpecClusterDataProvider + } + qSpecClusterDataProvider := qrSpecClusterDataProvider + if qSpecClusterDataProvider != "" { + + if err := r.SetQueryParam("spec.clusterData.provider", qSpecClusterDataProvider); err != nil { + return err + } + } + } + + if o.SpecClusterType != nil { + + // query param spec.clusterType + var qrSpecClusterType string + + if o.SpecClusterType != nil { + qrSpecClusterType = *o.SpecClusterType + } + qSpecClusterType := qrSpecClusterType + if qSpecClusterType != "" { + + if err := r.SetQueryParam("spec.clusterType", qSpecClusterType); err != nil { + return err + } + } + } + + if o.SpecMetroCity != nil { + + // query param spec.metro.city + var qrSpecMetroCity string + + if o.SpecMetroCity != nil { + qrSpecMetroCity = *o.SpecMetroCity + } + qSpecMetroCity := qrSpecMetroCity + if qSpecMetroCity != "" { + + if err := r.SetQueryParam("spec.metro.city", qSpecMetroCity); err != nil { + return err + } + } + } + + if o.SpecMetroCountry != nil { + + // query param spec.metro.country + var qrSpecMetroCountry string + + if o.SpecMetroCountry != nil { + qrSpecMetroCountry = *o.SpecMetroCountry + } + qSpecMetroCountry := qrSpecMetroCountry + if qSpecMetroCountry != "" { + + if err := r.SetQueryParam("spec.metro.country", qSpecMetroCountry); err != nil { + return err + } + } + } + + if o.SpecMetroCountryCode != nil { + + // query param spec.metro.countryCode + var qrSpecMetroCountryCode string + + if o.SpecMetroCountryCode != nil { + qrSpecMetroCountryCode = *o.SpecMetroCountryCode + } + qSpecMetroCountryCode := qrSpecMetroCountryCode + if qSpecMetroCountryCode != "" { + + if err := r.SetQueryParam("spec.metro.countryCode", qSpecMetroCountryCode); err != nil { + return err + } + } + } + + if o.SpecMetroID != nil { + + // query param spec.metro.id + var qrSpecMetroID string + + if o.SpecMetroID != nil { + qrSpecMetroID = *o.SpecMetroID + } + qSpecMetroID := qrSpecMetroID + if qSpecMetroID != "" { + + if err := r.SetQueryParam("spec.metro.id", qSpecMetroID); err != nil { + return err + } + } + } + + if o.SpecMetroLatitude != nil { + + // query param spec.metro.latitude + var qrSpecMetroLatitude string + + if o.SpecMetroLatitude != nil { + qrSpecMetroLatitude = *o.SpecMetroLatitude + } + qSpecMetroLatitude := qrSpecMetroLatitude + if qSpecMetroLatitude != "" { + + if err := r.SetQueryParam("spec.metro.latitude", qSpecMetroLatitude); err != nil { + return err + } + } + } + + if o.SpecMetroLocale != nil { + + // query param spec.metro.locale + var qrSpecMetroLocale string + + if o.SpecMetroLocale != nil { + qrSpecMetroLocale = *o.SpecMetroLocale + } + qSpecMetroLocale := qrSpecMetroLocale + if qSpecMetroLocale != "" { + + if err := r.SetQueryParam("spec.metro.locale", qSpecMetroLocale); err != nil { + return err + } + } + } + + if o.SpecMetroLongitude != nil { + + // query param spec.metro.longitude + var qrSpecMetroLongitude string + + if o.SpecMetroLongitude != nil { + qrSpecMetroLongitude = *o.SpecMetroLongitude + } + qSpecMetroLongitude := qrSpecMetroLongitude + if qSpecMetroLongitude != "" { + + if err := r.SetQueryParam("spec.metro.longitude", qSpecMetroLongitude); err != nil { + return err + } + } + } + + if o.SpecMetroName != nil { + + // query param spec.metro.name + var qrSpecMetroName string + + if o.SpecMetroName != nil { + qrSpecMetroName = *o.SpecMetroName + } + qSpecMetroName := qrSpecMetroName + if qSpecMetroName != "" { + + if err := r.SetQueryParam("spec.metro.name", qSpecMetroName); err != nil { + return err + } + } + } + + if o.SpecMetroState != nil { + + // query param spec.metro.state + var qrSpecMetroState string + + if o.SpecMetroState != nil { + qrSpecMetroState = *o.SpecMetroState + } + qSpecMetroState := qrSpecMetroState + if qSpecMetroState != "" { + + if err := r.SetQueryParam("spec.metro.state", qSpecMetroState); err != nil { + return err + } + } + } + + if o.SpecMetroStateCode != nil { + + // query param spec.metro.stateCode + var qrSpecMetroStateCode string + + if o.SpecMetroStateCode != nil { + qrSpecMetroStateCode = *o.SpecMetroStateCode + } + qSpecMetroStateCode := qrSpecMetroStateCode + if qSpecMetroStateCode != "" { + + if err := r.SetQueryParam("spec.metro.stateCode", qSpecMetroStateCode); err != nil { + return err + } + } + } + + if o.SpecOverrideSelector != nil { + + // query param spec.overrideSelector + var qrSpecOverrideSelector string + + if o.SpecOverrideSelector != nil { + qrSpecOverrideSelector = *o.SpecOverrideSelector + } + qSpecOverrideSelector := qrSpecOverrideSelector + if qSpecOverrideSelector != "" { + + if err := r.SetQueryParam("spec.overrideSelector", qSpecOverrideSelector); err != nil { + return err + } + } + } + + if o.SpecParamsEnvironmentProvider != nil { + + // query param spec.params.environmentProvider + var qrSpecParamsEnvironmentProvider string + + if o.SpecParamsEnvironmentProvider != nil { + qrSpecParamsEnvironmentProvider = *o.SpecParamsEnvironmentProvider + } + qSpecParamsEnvironmentProvider := qrSpecParamsEnvironmentProvider + if qSpecParamsEnvironmentProvider != "" { + + if err := r.SetQueryParam("spec.params.environmentProvider", qSpecParamsEnvironmentProvider); err != nil { + return err + } + } + } + + if o.SpecParamsKubernetesProvider != nil { + + // query param spec.params.kubernetesProvider + var qrSpecParamsKubernetesProvider string + + if o.SpecParamsKubernetesProvider != nil { + qrSpecParamsKubernetesProvider = *o.SpecParamsKubernetesProvider + } + qSpecParamsKubernetesProvider := qrSpecParamsKubernetesProvider + if qSpecParamsKubernetesProvider != "" { + + if err := r.SetQueryParam("spec.params.kubernetesProvider", qSpecParamsKubernetesProvider); err != nil { + return err + } + } + } + + if o.SpecParamsProvisionEnvironment != nil { + + // query param spec.params.provisionEnvironment + var qrSpecParamsProvisionEnvironment string + + if o.SpecParamsProvisionEnvironment != nil { + qrSpecParamsProvisionEnvironment = *o.SpecParamsProvisionEnvironment + } + qSpecParamsProvisionEnvironment := qrSpecParamsProvisionEnvironment + if qSpecParamsProvisionEnvironment != "" { + + if err := r.SetQueryParam("spec.params.provisionEnvironment", qSpecParamsProvisionEnvironment); err != nil { + return err + } + } + } + + if o.SpecParamsProvisionPackageType != nil { + + // query param spec.params.provisionPackageType + var qrSpecParamsProvisionPackageType string + + if o.SpecParamsProvisionPackageType != nil { + qrSpecParamsProvisionPackageType = *o.SpecParamsProvisionPackageType + } + qSpecParamsProvisionPackageType := qrSpecParamsProvisionPackageType + if qSpecParamsProvisionPackageType != "" { + + if err := r.SetQueryParam("spec.params.provisionPackageType", qSpecParamsProvisionPackageType); err != nil { + return err + } + } + } + + if o.SpecParamsProvisionType != nil { + + // query param spec.params.provisionType + var qrSpecParamsProvisionType string + + if o.SpecParamsProvisionType != nil { + qrSpecParamsProvisionType = *o.SpecParamsProvisionType + } + qSpecParamsProvisionType := qrSpecParamsProvisionType + if qSpecParamsProvisionType != "" { + + if err := r.SetQueryParam("spec.params.provisionType", qSpecParamsProvisionType); err != nil { + return err + } + } + } + + if o.SpecParamsState != nil { + + // query param spec.params.state + var qrSpecParamsState string + + if o.SpecParamsState != nil { + qrSpecParamsState = *o.SpecParamsState + } + qSpecParamsState := qrSpecParamsState + if qSpecParamsState != "" { + + if err := r.SetQueryParam("spec.params.state", qSpecParamsState); err != nil { + return err + } + } + } + + if o.SpecProxyConfigAllowInsecureBootstrap != nil { + + // query param spec.proxyConfig.allowInsecureBootstrap + var qrSpecProxyConfigAllowInsecureBootstrap bool + + if o.SpecProxyConfigAllowInsecureBootstrap != nil { + qrSpecProxyConfigAllowInsecureBootstrap = *o.SpecProxyConfigAllowInsecureBootstrap + } + qSpecProxyConfigAllowInsecureBootstrap := swag.FormatBool(qrSpecProxyConfigAllowInsecureBootstrap) + if qSpecProxyConfigAllowInsecureBootstrap != "" { + + if err := r.SetQueryParam("spec.proxyConfig.allowInsecureBootstrap", qSpecProxyConfigAllowInsecureBootstrap); err != nil { + return err + } + } + } + + if o.SpecProxyConfigBootstrapCA != nil { + + // query param spec.proxyConfig.bootstrapCA + var qrSpecProxyConfigBootstrapCA string + + if o.SpecProxyConfigBootstrapCA != nil { + qrSpecProxyConfigBootstrapCA = *o.SpecProxyConfigBootstrapCA + } + qSpecProxyConfigBootstrapCA := qrSpecProxyConfigBootstrapCA + if qSpecProxyConfigBootstrapCA != "" { + + if err := r.SetQueryParam("spec.proxyConfig.bootstrapCA", qSpecProxyConfigBootstrapCA); err != nil { + return err + } + } + } + + if o.SpecProxyConfigEnabled != nil { + + // query param spec.proxyConfig.enabled + var qrSpecProxyConfigEnabled bool + + if o.SpecProxyConfigEnabled != nil { + qrSpecProxyConfigEnabled = *o.SpecProxyConfigEnabled + } + qSpecProxyConfigEnabled := swag.FormatBool(qrSpecProxyConfigEnabled) + if qSpecProxyConfigEnabled != "" { + + if err := r.SetQueryParam("spec.proxyConfig.enabled", qSpecProxyConfigEnabled); err != nil { + return err + } + } + } + + if o.SpecProxyConfigHTTPProxy != nil { + + // query param spec.proxyConfig.httpProxy + var qrSpecProxyConfigHTTPProxy string + + if o.SpecProxyConfigHTTPProxy != nil { + qrSpecProxyConfigHTTPProxy = *o.SpecProxyConfigHTTPProxy + } + qSpecProxyConfigHTTPProxy := qrSpecProxyConfigHTTPProxy + if qSpecProxyConfigHTTPProxy != "" { + + if err := r.SetQueryParam("spec.proxyConfig.httpProxy", qSpecProxyConfigHTTPProxy); err != nil { + return err + } + } + } + + if o.SpecProxyConfigHTTPSProxy != nil { + + // query param spec.proxyConfig.httpsProxy + var qrSpecProxyConfigHTTPSProxy string + + if o.SpecProxyConfigHTTPSProxy != nil { + qrSpecProxyConfigHTTPSProxy = *o.SpecProxyConfigHTTPSProxy + } + qSpecProxyConfigHTTPSProxy := qrSpecProxyConfigHTTPSProxy + if qSpecProxyConfigHTTPSProxy != "" { + + if err := r.SetQueryParam("spec.proxyConfig.httpsProxy", qSpecProxyConfigHTTPSProxy); err != nil { + return err + } + } + } + + if o.SpecProxyConfigNoProxy != nil { + + // query param spec.proxyConfig.noProxy + var qrSpecProxyConfigNoProxy string + + if o.SpecProxyConfigNoProxy != nil { + qrSpecProxyConfigNoProxy = *o.SpecProxyConfigNoProxy + } + qSpecProxyConfigNoProxy := qrSpecProxyConfigNoProxy + if qSpecProxyConfigNoProxy != "" { + + if err := r.SetQueryParam("spec.proxyConfig.noProxy", qSpecProxyConfigNoProxy); err != nil { + return err + } + } + } + + if o.SpecProxyConfigProxyAuth != nil { + + // query param spec.proxyConfig.proxyAuth + var qrSpecProxyConfigProxyAuth string + + if o.SpecProxyConfigProxyAuth != nil { + qrSpecProxyConfigProxyAuth = *o.SpecProxyConfigProxyAuth + } + qSpecProxyConfigProxyAuth := qrSpecProxyConfigProxyAuth + if qSpecProxyConfigProxyAuth != "" { + + if err := r.SetQueryParam("spec.proxyConfig.proxyAuth", qSpecProxyConfigProxyAuth); err != nil { + return err + } + } + } + + if o.SpecShareMode != nil { + + // query param spec.shareMode + var qrSpecShareMode string + + if o.SpecShareMode != nil { + qrSpecShareMode = *o.SpecShareMode + } + qSpecShareMode := qrSpecShareMode + if qSpecShareMode != "" { + + if err := r.SetQueryParam("spec.shareMode", qSpecShareMode); err != nil { + return err + } + } + } + + if o.StatusConditionStatus != nil { + + // query param status.conditionStatus + var qrStatusConditionStatus string + + if o.StatusConditionStatus != nil { + qrStatusConditionStatus = *o.StatusConditionStatus + } + qStatusConditionStatus := qrStatusConditionStatus + if qStatusConditionStatus != "" { + + if err := r.SetQueryParam("status.conditionStatus", qStatusConditionStatus); err != nil { + return err + } + } + } + + if o.StatusConditionType != nil { + + // query param status.conditionType + var qrStatusConditionType string + + if o.StatusConditionType != nil { + qrStatusConditionType = *o.StatusConditionType + } + qStatusConditionType := qrStatusConditionType + if qStatusConditionType != "" { + + if err := r.SetQueryParam("status.conditionType", qStatusConditionType); err != nil { + return err + } + } + } + + if o.StatusLastUpdated != nil { + + // query param status.lastUpdated + var qrStatusLastUpdated strfmt.DateTime + + if o.StatusLastUpdated != nil { + qrStatusLastUpdated = *o.StatusLastUpdated + } + qStatusLastUpdated := qrStatusLastUpdated.String() + if qStatusLastUpdated != "" { + + if err := r.SetQueryParam("status.lastUpdated", qStatusLastUpdated); err != nil { + return err + } + } + } + + if o.StatusReason != nil { + + // query param status.reason + var qrStatusReason string + + if o.StatusReason != nil { + qrStatusReason = *o.StatusReason + } + qStatusReason := qrStatusReason + if qStatusReason != "" { + + if err := r.SetQueryParam("status.reason", qStatusReason); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/components/common/api/def/clients/scheduler/client/cluster/cluster_delete_cluster_responses.go b/components/common/api/def/clients/scheduler/client/cluster/cluster_delete_cluster_responses.go new file mode 100644 index 0000000..6a99d8b --- /dev/null +++ b/components/common/api/def/clients/scheduler/client/cluster/cluster_delete_cluster_responses.go @@ -0,0 +1,221 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package cluster + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/RafaySystems/rcloud-base/components/common/api/def/clients/scheduler/models" +) + +// ClusterDeleteClusterReader is a Reader for the ClusterDeleteCluster structure. +type ClusterDeleteClusterReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ClusterDeleteClusterReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewClusterDeleteClusterOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 204: + result := NewClusterDeleteClusterNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 403: + result := NewClusterDeleteClusterForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewClusterDeleteClusterNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + result := NewClusterDeleteClusterDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewClusterDeleteClusterOK creates a ClusterDeleteClusterOK with default headers values +func NewClusterDeleteClusterOK() *ClusterDeleteClusterOK { + return &ClusterDeleteClusterOK{} +} + +/* ClusterDeleteClusterOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type ClusterDeleteClusterOK struct { + Payload models.RPCDeleteClusterResponse +} + +func (o *ClusterDeleteClusterOK) Error() string { + return fmt.Sprintf("[DELETE /infra/v3/project/{metadata.project}/cluster/{metadata.name}][%d] clusterDeleteClusterOK %+v", 200, o.Payload) +} +func (o *ClusterDeleteClusterOK) GetPayload() models.RPCDeleteClusterResponse { + return o.Payload +} + +func (o *ClusterDeleteClusterOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewClusterDeleteClusterNoContent creates a ClusterDeleteClusterNoContent with default headers values +func NewClusterDeleteClusterNoContent() *ClusterDeleteClusterNoContent { + return &ClusterDeleteClusterNoContent{} +} + +/* ClusterDeleteClusterNoContent describes a response with status code 204, with default header values. + +Returned when project is deleted successfully. +*/ +type ClusterDeleteClusterNoContent struct { + Payload interface{} +} + +func (o *ClusterDeleteClusterNoContent) Error() string { + return fmt.Sprintf("[DELETE /infra/v3/project/{metadata.project}/cluster/{metadata.name}][%d] clusterDeleteClusterNoContent %+v", 204, o.Payload) +} +func (o *ClusterDeleteClusterNoContent) GetPayload() interface{} { + return o.Payload +} + +func (o *ClusterDeleteClusterNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewClusterDeleteClusterForbidden creates a ClusterDeleteClusterForbidden with default headers values +func NewClusterDeleteClusterForbidden() *ClusterDeleteClusterForbidden { + return &ClusterDeleteClusterForbidden{} +} + +/* ClusterDeleteClusterForbidden describes a response with status code 403, with default header values. + +Returned when the user does not have permission to access the resource. +*/ +type ClusterDeleteClusterForbidden struct { + Payload interface{} +} + +func (o *ClusterDeleteClusterForbidden) Error() string { + return fmt.Sprintf("[DELETE /infra/v3/project/{metadata.project}/cluster/{metadata.name}][%d] clusterDeleteClusterForbidden %+v", 403, o.Payload) +} +func (o *ClusterDeleteClusterForbidden) GetPayload() interface{} { + return o.Payload +} + +func (o *ClusterDeleteClusterForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewClusterDeleteClusterNotFound creates a ClusterDeleteClusterNotFound with default headers values +func NewClusterDeleteClusterNotFound() *ClusterDeleteClusterNotFound { + return &ClusterDeleteClusterNotFound{} +} + +/* ClusterDeleteClusterNotFound describes a response with status code 404, with default header values. + +Returned when the resource does not exist. +*/ +type ClusterDeleteClusterNotFound struct { + Payload string +} + +func (o *ClusterDeleteClusterNotFound) Error() string { + return fmt.Sprintf("[DELETE /infra/v3/project/{metadata.project}/cluster/{metadata.name}][%d] clusterDeleteClusterNotFound %+v", 404, o.Payload) +} +func (o *ClusterDeleteClusterNotFound) GetPayload() string { + return o.Payload +} + +func (o *ClusterDeleteClusterNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewClusterDeleteClusterDefault creates a ClusterDeleteClusterDefault with default headers values +func NewClusterDeleteClusterDefault(code int) *ClusterDeleteClusterDefault { + return &ClusterDeleteClusterDefault{ + _statusCode: code, + } +} + +/* ClusterDeleteClusterDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type ClusterDeleteClusterDefault struct { + _statusCode int + + Payload *models.GooglerpcStatus +} + +// Code gets the status code for the cluster delete cluster default response +func (o *ClusterDeleteClusterDefault) Code() int { + return o._statusCode +} + +func (o *ClusterDeleteClusterDefault) Error() string { + return fmt.Sprintf("[DELETE /infra/v3/project/{metadata.project}/cluster/{metadata.name}][%d] Cluster_DeleteCluster default %+v", o._statusCode, o.Payload) +} +func (o *ClusterDeleteClusterDefault) GetPayload() *models.GooglerpcStatus { + return o.Payload +} + +func (o *ClusterDeleteClusterDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.GooglerpcStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/components/common/api/def/clients/scheduler/client/cluster/cluster_download_cluster_parameters.go b/components/common/api/def/clients/scheduler/client/cluster/cluster_download_cluster_parameters.go new file mode 100644 index 0000000..d5b30b6 --- /dev/null +++ b/components/common/api/def/clients/scheduler/client/cluster/cluster_download_cluster_parameters.go @@ -0,0 +1,1914 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package cluster + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewClusterDownloadClusterParams creates a new ClusterDownloadClusterParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewClusterDownloadClusterParams() *ClusterDownloadClusterParams { + return &ClusterDownloadClusterParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewClusterDownloadClusterParamsWithTimeout creates a new ClusterDownloadClusterParams object +// with the ability to set a timeout on a request. +func NewClusterDownloadClusterParamsWithTimeout(timeout time.Duration) *ClusterDownloadClusterParams { + return &ClusterDownloadClusterParams{ + timeout: timeout, + } +} + +// NewClusterDownloadClusterParamsWithContext creates a new ClusterDownloadClusterParams object +// with the ability to set a context for a request. +func NewClusterDownloadClusterParamsWithContext(ctx context.Context) *ClusterDownloadClusterParams { + return &ClusterDownloadClusterParams{ + Context: ctx, + } +} + +// NewClusterDownloadClusterParamsWithHTTPClient creates a new ClusterDownloadClusterParams object +// with the ability to set a custom HTTPClient for a request. +func NewClusterDownloadClusterParamsWithHTTPClient(client *http.Client) *ClusterDownloadClusterParams { + return &ClusterDownloadClusterParams{ + HTTPClient: client, + } +} + +/* ClusterDownloadClusterParams contains all the parameters to send to the API endpoint + for the cluster download cluster operation. + + Typically these are written to a http.Request. +*/ +type ClusterDownloadClusterParams struct { + + /* APIVersion. + + API Version. API Version of the resource + + Default: "infra.k8smgmt.io/v3" + */ + APIVersion *string + + /* Kind. + + Kind. Kind of the resource + + Default: "Cluster" + */ + Kind *string + + /* MetadataDescription. + + Description. description of the resource + */ + MetadataDescription *string + + // MetadataID. + MetadataID *string + + // MetadataModifiedAt. + // + // Format: date-time + MetadataModifiedAt *strfmt.DateTime + + /* MetadataName. + + name of the resource + */ + MetadataName string + + /* MetadataOrganization. + + Organization. Organization to which the resource belongs + */ + MetadataOrganization *string + + /* MetadataPartner. + + Partner. Partner to which the resource belongs + */ + MetadataPartner *string + + /* MetadataProject. + + Project of the resource + */ + MetadataProject string + + /* SpecClusterDataArecord. + + DNS A Record. Entry for DNS A Record + */ + SpecClusterDataArecord *string + + /* SpecClusterDataClusterBlueprint. + + ClusterBlueprint. Cluster Blueprint + */ + SpecClusterDataClusterBlueprint *string + + /* SpecClusterDataClusterStatusAuxiliaryTaskCount. + + Cluster Information. Override selector of the cluster + + Format: int64 + */ + SpecClusterDataClusterStatusAuxiliaryTaskCount *string + + /* SpecClusterDataClusterStatusCustomTaskCount. + + Cluster Information. Override selector of the cluster + + Format: int64 + */ + SpecClusterDataClusterStatusCustomTaskCount *string + + /* SpecClusterDataClusterStatusPublishedBlueprint. + + Cluster Information. Override selector of the cluster + */ + SpecClusterDataClusterStatusPublishedBlueprint *string + + /* SpecClusterDataClusterStatusSystemTaskCount. + + Cluster Information. Override selector of the cluster + + Format: int64 + */ + SpecClusterDataClusterStatusSystemTaskCount *string + + /* SpecClusterDataClusterStatusToken. + + Cluster Information. Override selector of the cluster + */ + SpecClusterDataClusterStatusToken *string + + /* SpecClusterDataCname. + + CNAME. cname of the cluster + */ + SpecClusterDataCname *string + + /* SpecClusterDataDisplayName. + + Display Name. Display Name + */ + SpecClusterDataDisplayName *string + + /* SpecClusterDataHealth. + + Health. Health + + Default: "EDGE_IGNORE" + */ + SpecClusterDataHealth *string + + /* SpecClusterDataManufacturer. + + Manufacturer. Manufacturer + */ + SpecClusterDataManufacturer *string + + /* SpecClusterDataPassphrase. + + Passphrase. passphrase of the cluster + */ + SpecClusterDataPassphrase *string + + /* SpecClusterDataProvider. + + Provider. Provider + */ + SpecClusterDataProvider *string + + /* SpecClusterType. + + Cluster Type. Type of the cluster being created + + Default: "Imported" + */ + SpecClusterType *string + + /* SpecMetroCity. + + City. City of the location + */ + SpecMetroCity *string + + /* SpecMetroCountry. + + Country. country of the location + */ + SpecMetroCountry *string + + /* SpecMetroCountryCode. + + CountryCode. CountryCode of the location + */ + SpecMetroCountryCode *string + + /* SpecMetroID. + + ID of Location. ID Location of the cluster + */ + SpecMetroID *string + + /* SpecMetroLatitude. + + Latitude. Latitude of the location + */ + SpecMetroLatitude *string + + /* SpecMetroLocale. + + Locale. locale of the location + */ + SpecMetroLocale *string + + /* SpecMetroLongitude. + + Longitude. Longitude of the location + */ + SpecMetroLongitude *string + + /* SpecMetroName. + + Location. Location of the cluster + */ + SpecMetroName *string + + /* SpecMetroState. + + State. State of the location + */ + SpecMetroState *string + + /* SpecMetroStateCode. + + StateCode. StateCode of the location + */ + SpecMetroStateCode *string + + /* SpecOverrideSelector. + + Override Selector. Override selector of the cluster + */ + SpecOverrideSelector *string + + /* SpecParamsEnvironmentProvider. + + EnvironmentProvider. environment provider of the cluster + */ + SpecParamsEnvironmentProvider *string + + /* SpecParamsKubernetesProvider. + + KubernetesProvider. kubernetes provider + */ + SpecParamsKubernetesProvider *string + + /* SpecParamsProvisionEnvironment. + + ProvisionEnvironment. provision environment + */ + SpecParamsProvisionEnvironment *string + + /* SpecParamsProvisionPackageType. + + ProvisionPackageType. provision package type + */ + SpecParamsProvisionPackageType *string + + /* SpecParamsProvisionType. + + ProvisionType. provision type + */ + SpecParamsProvisionType *string + + /* SpecParamsState. + + State. state + */ + SpecParamsState *string + + /* SpecProxyConfigAllowInsecureBootstrap. + + AllowInsecureBootstrap. Allow insecure bootstrap + */ + SpecProxyConfigAllowInsecureBootstrap *bool + + /* SpecProxyConfigBootstrapCA. + + BootstrapCA. Certificate Authority of bootstrap server + */ + SpecProxyConfigBootstrapCA *string + + /* SpecProxyConfigEnabled. + + Enabled. enabled + */ + SpecProxyConfigEnabled *bool + + /* SpecProxyConfigHTTPProxy. + + HttpProxy. http proxy + */ + SpecProxyConfigHTTPProxy *string + + /* SpecProxyConfigHTTPSProxy. + + HttpsProxy. https proxy + */ + SpecProxyConfigHTTPSProxy *string + + /* SpecProxyConfigNoProxy. + + noproxy. noproxy + */ + SpecProxyConfigNoProxy *string + + /* SpecProxyConfigProxyAuth. + + ProxyAuth. proxy auth + */ + SpecProxyConfigProxyAuth *string + + /* SpecShareMode. + + Override Selector. Override selector of the cluster + + Default: "ClusterShareModeNotSet" + */ + SpecShareMode *string + + /* StatusConditionStatus. + + Condition Status. status of the condition + + Default: "StatusNotSet" + */ + StatusConditionStatus *string + + /* StatusConditionType. + + Condition Type. type of the status condition + */ + StatusConditionType *string + + /* StatusLastUpdated. + + Last Updated. when the condition status is last updated + + Format: date-time + */ + StatusLastUpdated *strfmt.DateTime + + /* StatusReason. + + Reason. reason of the last condition status + */ + StatusReason *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the cluster download cluster params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ClusterDownloadClusterParams) WithDefaults() *ClusterDownloadClusterParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the cluster download cluster params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ClusterDownloadClusterParams) SetDefaults() { + var ( + aPIVersionDefault = string("infra.k8smgmt.io/v3") + + kindDefault = string("Cluster") + + specClusterDataHealthDefault = string("EDGE_IGNORE") + + specClusterTypeDefault = string("Imported") + + specShareModeDefault = string("ClusterShareModeNotSet") + + statusConditionStatusDefault = string("StatusNotSet") + ) + + val := ClusterDownloadClusterParams{ + APIVersion: &aPIVersionDefault, + Kind: &kindDefault, + SpecClusterDataHealth: &specClusterDataHealthDefault, + SpecClusterType: &specClusterTypeDefault, + SpecShareMode: &specShareModeDefault, + StatusConditionStatus: &statusConditionStatusDefault, + } + + val.timeout = o.timeout + val.Context = o.Context + val.HTTPClient = o.HTTPClient + *o = val +} + +// WithTimeout adds the timeout to the cluster download cluster params +func (o *ClusterDownloadClusterParams) WithTimeout(timeout time.Duration) *ClusterDownloadClusterParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the cluster download cluster params +func (o *ClusterDownloadClusterParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the cluster download cluster params +func (o *ClusterDownloadClusterParams) WithContext(ctx context.Context) *ClusterDownloadClusterParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the cluster download cluster params +func (o *ClusterDownloadClusterParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the cluster download cluster params +func (o *ClusterDownloadClusterParams) WithHTTPClient(client *http.Client) *ClusterDownloadClusterParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the cluster download cluster params +func (o *ClusterDownloadClusterParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAPIVersion adds the aPIVersion to the cluster download cluster params +func (o *ClusterDownloadClusterParams) WithAPIVersion(aPIVersion *string) *ClusterDownloadClusterParams { + o.SetAPIVersion(aPIVersion) + return o +} + +// SetAPIVersion adds the apiVersion to the cluster download cluster params +func (o *ClusterDownloadClusterParams) SetAPIVersion(aPIVersion *string) { + o.APIVersion = aPIVersion +} + +// WithKind adds the kind to the cluster download cluster params +func (o *ClusterDownloadClusterParams) WithKind(kind *string) *ClusterDownloadClusterParams { + o.SetKind(kind) + return o +} + +// SetKind adds the kind to the cluster download cluster params +func (o *ClusterDownloadClusterParams) SetKind(kind *string) { + o.Kind = kind +} + +// WithMetadataDescription adds the metadataDescription to the cluster download cluster params +func (o *ClusterDownloadClusterParams) WithMetadataDescription(metadataDescription *string) *ClusterDownloadClusterParams { + o.SetMetadataDescription(metadataDescription) + return o +} + +// SetMetadataDescription adds the metadataDescription to the cluster download cluster params +func (o *ClusterDownloadClusterParams) SetMetadataDescription(metadataDescription *string) { + o.MetadataDescription = metadataDescription +} + +// WithMetadataID adds the metadataID to the cluster download cluster params +func (o *ClusterDownloadClusterParams) WithMetadataID(metadataID *string) *ClusterDownloadClusterParams { + o.SetMetadataID(metadataID) + return o +} + +// SetMetadataID adds the metadataId to the cluster download cluster params +func (o *ClusterDownloadClusterParams) SetMetadataID(metadataID *string) { + o.MetadataID = metadataID +} + +// WithMetadataModifiedAt adds the metadataModifiedAt to the cluster download cluster params +func (o *ClusterDownloadClusterParams) WithMetadataModifiedAt(metadataModifiedAt *strfmt.DateTime) *ClusterDownloadClusterParams { + o.SetMetadataModifiedAt(metadataModifiedAt) + return o +} + +// SetMetadataModifiedAt adds the metadataModifiedAt to the cluster download cluster params +func (o *ClusterDownloadClusterParams) SetMetadataModifiedAt(metadataModifiedAt *strfmt.DateTime) { + o.MetadataModifiedAt = metadataModifiedAt +} + +// WithMetadataName adds the metadataName to the cluster download cluster params +func (o *ClusterDownloadClusterParams) WithMetadataName(metadataName string) *ClusterDownloadClusterParams { + o.SetMetadataName(metadataName) + return o +} + +// SetMetadataName adds the metadataName to the cluster download cluster params +func (o *ClusterDownloadClusterParams) SetMetadataName(metadataName string) { + o.MetadataName = metadataName +} + +// WithMetadataOrganization adds the metadataOrganization to the cluster download cluster params +func (o *ClusterDownloadClusterParams) WithMetadataOrganization(metadataOrganization *string) *ClusterDownloadClusterParams { + o.SetMetadataOrganization(metadataOrganization) + return o +} + +// SetMetadataOrganization adds the metadataOrganization to the cluster download cluster params +func (o *ClusterDownloadClusterParams) SetMetadataOrganization(metadataOrganization *string) { + o.MetadataOrganization = metadataOrganization +} + +// WithMetadataPartner adds the metadataPartner to the cluster download cluster params +func (o *ClusterDownloadClusterParams) WithMetadataPartner(metadataPartner *string) *ClusterDownloadClusterParams { + o.SetMetadataPartner(metadataPartner) + return o +} + +// SetMetadataPartner adds the metadataPartner to the cluster download cluster params +func (o *ClusterDownloadClusterParams) SetMetadataPartner(metadataPartner *string) { + o.MetadataPartner = metadataPartner +} + +// WithMetadataProject adds the metadataProject to the cluster download cluster params +func (o *ClusterDownloadClusterParams) WithMetadataProject(metadataProject string) *ClusterDownloadClusterParams { + o.SetMetadataProject(metadataProject) + return o +} + +// SetMetadataProject adds the metadataProject to the cluster download cluster params +func (o *ClusterDownloadClusterParams) SetMetadataProject(metadataProject string) { + o.MetadataProject = metadataProject +} + +// WithSpecClusterDataArecord adds the specClusterDataArecord to the cluster download cluster params +func (o *ClusterDownloadClusterParams) WithSpecClusterDataArecord(specClusterDataArecord *string) *ClusterDownloadClusterParams { + o.SetSpecClusterDataArecord(specClusterDataArecord) + return o +} + +// SetSpecClusterDataArecord adds the specClusterDataArecord to the cluster download cluster params +func (o *ClusterDownloadClusterParams) SetSpecClusterDataArecord(specClusterDataArecord *string) { + o.SpecClusterDataArecord = specClusterDataArecord +} + +// WithSpecClusterDataClusterBlueprint adds the specClusterDataClusterBlueprint to the cluster download cluster params +func (o *ClusterDownloadClusterParams) WithSpecClusterDataClusterBlueprint(specClusterDataClusterBlueprint *string) *ClusterDownloadClusterParams { + o.SetSpecClusterDataClusterBlueprint(specClusterDataClusterBlueprint) + return o +} + +// SetSpecClusterDataClusterBlueprint adds the specClusterDataClusterBlueprint to the cluster download cluster params +func (o *ClusterDownloadClusterParams) SetSpecClusterDataClusterBlueprint(specClusterDataClusterBlueprint *string) { + o.SpecClusterDataClusterBlueprint = specClusterDataClusterBlueprint +} + +// WithSpecClusterDataClusterStatusAuxiliaryTaskCount adds the specClusterDataClusterStatusAuxiliaryTaskCount to the cluster download cluster params +func (o *ClusterDownloadClusterParams) WithSpecClusterDataClusterStatusAuxiliaryTaskCount(specClusterDataClusterStatusAuxiliaryTaskCount *string) *ClusterDownloadClusterParams { + o.SetSpecClusterDataClusterStatusAuxiliaryTaskCount(specClusterDataClusterStatusAuxiliaryTaskCount) + return o +} + +// SetSpecClusterDataClusterStatusAuxiliaryTaskCount adds the specClusterDataClusterStatusAuxiliaryTaskCount to the cluster download cluster params +func (o *ClusterDownloadClusterParams) SetSpecClusterDataClusterStatusAuxiliaryTaskCount(specClusterDataClusterStatusAuxiliaryTaskCount *string) { + o.SpecClusterDataClusterStatusAuxiliaryTaskCount = specClusterDataClusterStatusAuxiliaryTaskCount +} + +// WithSpecClusterDataClusterStatusCustomTaskCount adds the specClusterDataClusterStatusCustomTaskCount to the cluster download cluster params +func (o *ClusterDownloadClusterParams) WithSpecClusterDataClusterStatusCustomTaskCount(specClusterDataClusterStatusCustomTaskCount *string) *ClusterDownloadClusterParams { + o.SetSpecClusterDataClusterStatusCustomTaskCount(specClusterDataClusterStatusCustomTaskCount) + return o +} + +// SetSpecClusterDataClusterStatusCustomTaskCount adds the specClusterDataClusterStatusCustomTaskCount to the cluster download cluster params +func (o *ClusterDownloadClusterParams) SetSpecClusterDataClusterStatusCustomTaskCount(specClusterDataClusterStatusCustomTaskCount *string) { + o.SpecClusterDataClusterStatusCustomTaskCount = specClusterDataClusterStatusCustomTaskCount +} + +// WithSpecClusterDataClusterStatusPublishedBlueprint adds the specClusterDataClusterStatusPublishedBlueprint to the cluster download cluster params +func (o *ClusterDownloadClusterParams) WithSpecClusterDataClusterStatusPublishedBlueprint(specClusterDataClusterStatusPublishedBlueprint *string) *ClusterDownloadClusterParams { + o.SetSpecClusterDataClusterStatusPublishedBlueprint(specClusterDataClusterStatusPublishedBlueprint) + return o +} + +// SetSpecClusterDataClusterStatusPublishedBlueprint adds the specClusterDataClusterStatusPublishedBlueprint to the cluster download cluster params +func (o *ClusterDownloadClusterParams) SetSpecClusterDataClusterStatusPublishedBlueprint(specClusterDataClusterStatusPublishedBlueprint *string) { + o.SpecClusterDataClusterStatusPublishedBlueprint = specClusterDataClusterStatusPublishedBlueprint +} + +// WithSpecClusterDataClusterStatusSystemTaskCount adds the specClusterDataClusterStatusSystemTaskCount to the cluster download cluster params +func (o *ClusterDownloadClusterParams) WithSpecClusterDataClusterStatusSystemTaskCount(specClusterDataClusterStatusSystemTaskCount *string) *ClusterDownloadClusterParams { + o.SetSpecClusterDataClusterStatusSystemTaskCount(specClusterDataClusterStatusSystemTaskCount) + return o +} + +// SetSpecClusterDataClusterStatusSystemTaskCount adds the specClusterDataClusterStatusSystemTaskCount to the cluster download cluster params +func (o *ClusterDownloadClusterParams) SetSpecClusterDataClusterStatusSystemTaskCount(specClusterDataClusterStatusSystemTaskCount *string) { + o.SpecClusterDataClusterStatusSystemTaskCount = specClusterDataClusterStatusSystemTaskCount +} + +// WithSpecClusterDataClusterStatusToken adds the specClusterDataClusterStatusToken to the cluster download cluster params +func (o *ClusterDownloadClusterParams) WithSpecClusterDataClusterStatusToken(specClusterDataClusterStatusToken *string) *ClusterDownloadClusterParams { + o.SetSpecClusterDataClusterStatusToken(specClusterDataClusterStatusToken) + return o +} + +// SetSpecClusterDataClusterStatusToken adds the specClusterDataClusterStatusToken to the cluster download cluster params +func (o *ClusterDownloadClusterParams) SetSpecClusterDataClusterStatusToken(specClusterDataClusterStatusToken *string) { + o.SpecClusterDataClusterStatusToken = specClusterDataClusterStatusToken +} + +// WithSpecClusterDataCname adds the specClusterDataCname to the cluster download cluster params +func (o *ClusterDownloadClusterParams) WithSpecClusterDataCname(specClusterDataCname *string) *ClusterDownloadClusterParams { + o.SetSpecClusterDataCname(specClusterDataCname) + return o +} + +// SetSpecClusterDataCname adds the specClusterDataCname to the cluster download cluster params +func (o *ClusterDownloadClusterParams) SetSpecClusterDataCname(specClusterDataCname *string) { + o.SpecClusterDataCname = specClusterDataCname +} + +// WithSpecClusterDataDisplayName adds the specClusterDataDisplayName to the cluster download cluster params +func (o *ClusterDownloadClusterParams) WithSpecClusterDataDisplayName(specClusterDataDisplayName *string) *ClusterDownloadClusterParams { + o.SetSpecClusterDataDisplayName(specClusterDataDisplayName) + return o +} + +// SetSpecClusterDataDisplayName adds the specClusterDataDisplayName to the cluster download cluster params +func (o *ClusterDownloadClusterParams) SetSpecClusterDataDisplayName(specClusterDataDisplayName *string) { + o.SpecClusterDataDisplayName = specClusterDataDisplayName +} + +// WithSpecClusterDataHealth adds the specClusterDataHealth to the cluster download cluster params +func (o *ClusterDownloadClusterParams) WithSpecClusterDataHealth(specClusterDataHealth *string) *ClusterDownloadClusterParams { + o.SetSpecClusterDataHealth(specClusterDataHealth) + return o +} + +// SetSpecClusterDataHealth adds the specClusterDataHealth to the cluster download cluster params +func (o *ClusterDownloadClusterParams) SetSpecClusterDataHealth(specClusterDataHealth *string) { + o.SpecClusterDataHealth = specClusterDataHealth +} + +// WithSpecClusterDataManufacturer adds the specClusterDataManufacturer to the cluster download cluster params +func (o *ClusterDownloadClusterParams) WithSpecClusterDataManufacturer(specClusterDataManufacturer *string) *ClusterDownloadClusterParams { + o.SetSpecClusterDataManufacturer(specClusterDataManufacturer) + return o +} + +// SetSpecClusterDataManufacturer adds the specClusterDataManufacturer to the cluster download cluster params +func (o *ClusterDownloadClusterParams) SetSpecClusterDataManufacturer(specClusterDataManufacturer *string) { + o.SpecClusterDataManufacturer = specClusterDataManufacturer +} + +// WithSpecClusterDataPassphrase adds the specClusterDataPassphrase to the cluster download cluster params +func (o *ClusterDownloadClusterParams) WithSpecClusterDataPassphrase(specClusterDataPassphrase *string) *ClusterDownloadClusterParams { + o.SetSpecClusterDataPassphrase(specClusterDataPassphrase) + return o +} + +// SetSpecClusterDataPassphrase adds the specClusterDataPassphrase to the cluster download cluster params +func (o *ClusterDownloadClusterParams) SetSpecClusterDataPassphrase(specClusterDataPassphrase *string) { + o.SpecClusterDataPassphrase = specClusterDataPassphrase +} + +// WithSpecClusterDataProvider adds the specClusterDataProvider to the cluster download cluster params +func (o *ClusterDownloadClusterParams) WithSpecClusterDataProvider(specClusterDataProvider *string) *ClusterDownloadClusterParams { + o.SetSpecClusterDataProvider(specClusterDataProvider) + return o +} + +// SetSpecClusterDataProvider adds the specClusterDataProvider to the cluster download cluster params +func (o *ClusterDownloadClusterParams) SetSpecClusterDataProvider(specClusterDataProvider *string) { + o.SpecClusterDataProvider = specClusterDataProvider +} + +// WithSpecClusterType adds the specClusterType to the cluster download cluster params +func (o *ClusterDownloadClusterParams) WithSpecClusterType(specClusterType *string) *ClusterDownloadClusterParams { + o.SetSpecClusterType(specClusterType) + return o +} + +// SetSpecClusterType adds the specClusterType to the cluster download cluster params +func (o *ClusterDownloadClusterParams) SetSpecClusterType(specClusterType *string) { + o.SpecClusterType = specClusterType +} + +// WithSpecMetroCity adds the specMetroCity to the cluster download cluster params +func (o *ClusterDownloadClusterParams) WithSpecMetroCity(specMetroCity *string) *ClusterDownloadClusterParams { + o.SetSpecMetroCity(specMetroCity) + return o +} + +// SetSpecMetroCity adds the specMetroCity to the cluster download cluster params +func (o *ClusterDownloadClusterParams) SetSpecMetroCity(specMetroCity *string) { + o.SpecMetroCity = specMetroCity +} + +// WithSpecMetroCountry adds the specMetroCountry to the cluster download cluster params +func (o *ClusterDownloadClusterParams) WithSpecMetroCountry(specMetroCountry *string) *ClusterDownloadClusterParams { + o.SetSpecMetroCountry(specMetroCountry) + return o +} + +// SetSpecMetroCountry adds the specMetroCountry to the cluster download cluster params +func (o *ClusterDownloadClusterParams) SetSpecMetroCountry(specMetroCountry *string) { + o.SpecMetroCountry = specMetroCountry +} + +// WithSpecMetroCountryCode adds the specMetroCountryCode to the cluster download cluster params +func (o *ClusterDownloadClusterParams) WithSpecMetroCountryCode(specMetroCountryCode *string) *ClusterDownloadClusterParams { + o.SetSpecMetroCountryCode(specMetroCountryCode) + return o +} + +// SetSpecMetroCountryCode adds the specMetroCountryCode to the cluster download cluster params +func (o *ClusterDownloadClusterParams) SetSpecMetroCountryCode(specMetroCountryCode *string) { + o.SpecMetroCountryCode = specMetroCountryCode +} + +// WithSpecMetroID adds the specMetroID to the cluster download cluster params +func (o *ClusterDownloadClusterParams) WithSpecMetroID(specMetroID *string) *ClusterDownloadClusterParams { + o.SetSpecMetroID(specMetroID) + return o +} + +// SetSpecMetroID adds the specMetroId to the cluster download cluster params +func (o *ClusterDownloadClusterParams) SetSpecMetroID(specMetroID *string) { + o.SpecMetroID = specMetroID +} + +// WithSpecMetroLatitude adds the specMetroLatitude to the cluster download cluster params +func (o *ClusterDownloadClusterParams) WithSpecMetroLatitude(specMetroLatitude *string) *ClusterDownloadClusterParams { + o.SetSpecMetroLatitude(specMetroLatitude) + return o +} + +// SetSpecMetroLatitude adds the specMetroLatitude to the cluster download cluster params +func (o *ClusterDownloadClusterParams) SetSpecMetroLatitude(specMetroLatitude *string) { + o.SpecMetroLatitude = specMetroLatitude +} + +// WithSpecMetroLocale adds the specMetroLocale to the cluster download cluster params +func (o *ClusterDownloadClusterParams) WithSpecMetroLocale(specMetroLocale *string) *ClusterDownloadClusterParams { + o.SetSpecMetroLocale(specMetroLocale) + return o +} + +// SetSpecMetroLocale adds the specMetroLocale to the cluster download cluster params +func (o *ClusterDownloadClusterParams) SetSpecMetroLocale(specMetroLocale *string) { + o.SpecMetroLocale = specMetroLocale +} + +// WithSpecMetroLongitude adds the specMetroLongitude to the cluster download cluster params +func (o *ClusterDownloadClusterParams) WithSpecMetroLongitude(specMetroLongitude *string) *ClusterDownloadClusterParams { + o.SetSpecMetroLongitude(specMetroLongitude) + return o +} + +// SetSpecMetroLongitude adds the specMetroLongitude to the cluster download cluster params +func (o *ClusterDownloadClusterParams) SetSpecMetroLongitude(specMetroLongitude *string) { + o.SpecMetroLongitude = specMetroLongitude +} + +// WithSpecMetroName adds the specMetroName to the cluster download cluster params +func (o *ClusterDownloadClusterParams) WithSpecMetroName(specMetroName *string) *ClusterDownloadClusterParams { + o.SetSpecMetroName(specMetroName) + return o +} + +// SetSpecMetroName adds the specMetroName to the cluster download cluster params +func (o *ClusterDownloadClusterParams) SetSpecMetroName(specMetroName *string) { + o.SpecMetroName = specMetroName +} + +// WithSpecMetroState adds the specMetroState to the cluster download cluster params +func (o *ClusterDownloadClusterParams) WithSpecMetroState(specMetroState *string) *ClusterDownloadClusterParams { + o.SetSpecMetroState(specMetroState) + return o +} + +// SetSpecMetroState adds the specMetroState to the cluster download cluster params +func (o *ClusterDownloadClusterParams) SetSpecMetroState(specMetroState *string) { + o.SpecMetroState = specMetroState +} + +// WithSpecMetroStateCode adds the specMetroStateCode to the cluster download cluster params +func (o *ClusterDownloadClusterParams) WithSpecMetroStateCode(specMetroStateCode *string) *ClusterDownloadClusterParams { + o.SetSpecMetroStateCode(specMetroStateCode) + return o +} + +// SetSpecMetroStateCode adds the specMetroStateCode to the cluster download cluster params +func (o *ClusterDownloadClusterParams) SetSpecMetroStateCode(specMetroStateCode *string) { + o.SpecMetroStateCode = specMetroStateCode +} + +// WithSpecOverrideSelector adds the specOverrideSelector to the cluster download cluster params +func (o *ClusterDownloadClusterParams) WithSpecOverrideSelector(specOverrideSelector *string) *ClusterDownloadClusterParams { + o.SetSpecOverrideSelector(specOverrideSelector) + return o +} + +// SetSpecOverrideSelector adds the specOverrideSelector to the cluster download cluster params +func (o *ClusterDownloadClusterParams) SetSpecOverrideSelector(specOverrideSelector *string) { + o.SpecOverrideSelector = specOverrideSelector +} + +// WithSpecParamsEnvironmentProvider adds the specParamsEnvironmentProvider to the cluster download cluster params +func (o *ClusterDownloadClusterParams) WithSpecParamsEnvironmentProvider(specParamsEnvironmentProvider *string) *ClusterDownloadClusterParams { + o.SetSpecParamsEnvironmentProvider(specParamsEnvironmentProvider) + return o +} + +// SetSpecParamsEnvironmentProvider adds the specParamsEnvironmentProvider to the cluster download cluster params +func (o *ClusterDownloadClusterParams) SetSpecParamsEnvironmentProvider(specParamsEnvironmentProvider *string) { + o.SpecParamsEnvironmentProvider = specParamsEnvironmentProvider +} + +// WithSpecParamsKubernetesProvider adds the specParamsKubernetesProvider to the cluster download cluster params +func (o *ClusterDownloadClusterParams) WithSpecParamsKubernetesProvider(specParamsKubernetesProvider *string) *ClusterDownloadClusterParams { + o.SetSpecParamsKubernetesProvider(specParamsKubernetesProvider) + return o +} + +// SetSpecParamsKubernetesProvider adds the specParamsKubernetesProvider to the cluster download cluster params +func (o *ClusterDownloadClusterParams) SetSpecParamsKubernetesProvider(specParamsKubernetesProvider *string) { + o.SpecParamsKubernetesProvider = specParamsKubernetesProvider +} + +// WithSpecParamsProvisionEnvironment adds the specParamsProvisionEnvironment to the cluster download cluster params +func (o *ClusterDownloadClusterParams) WithSpecParamsProvisionEnvironment(specParamsProvisionEnvironment *string) *ClusterDownloadClusterParams { + o.SetSpecParamsProvisionEnvironment(specParamsProvisionEnvironment) + return o +} + +// SetSpecParamsProvisionEnvironment adds the specParamsProvisionEnvironment to the cluster download cluster params +func (o *ClusterDownloadClusterParams) SetSpecParamsProvisionEnvironment(specParamsProvisionEnvironment *string) { + o.SpecParamsProvisionEnvironment = specParamsProvisionEnvironment +} + +// WithSpecParamsProvisionPackageType adds the specParamsProvisionPackageType to the cluster download cluster params +func (o *ClusterDownloadClusterParams) WithSpecParamsProvisionPackageType(specParamsProvisionPackageType *string) *ClusterDownloadClusterParams { + o.SetSpecParamsProvisionPackageType(specParamsProvisionPackageType) + return o +} + +// SetSpecParamsProvisionPackageType adds the specParamsProvisionPackageType to the cluster download cluster params +func (o *ClusterDownloadClusterParams) SetSpecParamsProvisionPackageType(specParamsProvisionPackageType *string) { + o.SpecParamsProvisionPackageType = specParamsProvisionPackageType +} + +// WithSpecParamsProvisionType adds the specParamsProvisionType to the cluster download cluster params +func (o *ClusterDownloadClusterParams) WithSpecParamsProvisionType(specParamsProvisionType *string) *ClusterDownloadClusterParams { + o.SetSpecParamsProvisionType(specParamsProvisionType) + return o +} + +// SetSpecParamsProvisionType adds the specParamsProvisionType to the cluster download cluster params +func (o *ClusterDownloadClusterParams) SetSpecParamsProvisionType(specParamsProvisionType *string) { + o.SpecParamsProvisionType = specParamsProvisionType +} + +// WithSpecParamsState adds the specParamsState to the cluster download cluster params +func (o *ClusterDownloadClusterParams) WithSpecParamsState(specParamsState *string) *ClusterDownloadClusterParams { + o.SetSpecParamsState(specParamsState) + return o +} + +// SetSpecParamsState adds the specParamsState to the cluster download cluster params +func (o *ClusterDownloadClusterParams) SetSpecParamsState(specParamsState *string) { + o.SpecParamsState = specParamsState +} + +// WithSpecProxyConfigAllowInsecureBootstrap adds the specProxyConfigAllowInsecureBootstrap to the cluster download cluster params +func (o *ClusterDownloadClusterParams) WithSpecProxyConfigAllowInsecureBootstrap(specProxyConfigAllowInsecureBootstrap *bool) *ClusterDownloadClusterParams { + o.SetSpecProxyConfigAllowInsecureBootstrap(specProxyConfigAllowInsecureBootstrap) + return o +} + +// SetSpecProxyConfigAllowInsecureBootstrap adds the specProxyConfigAllowInsecureBootstrap to the cluster download cluster params +func (o *ClusterDownloadClusterParams) SetSpecProxyConfigAllowInsecureBootstrap(specProxyConfigAllowInsecureBootstrap *bool) { + o.SpecProxyConfigAllowInsecureBootstrap = specProxyConfigAllowInsecureBootstrap +} + +// WithSpecProxyConfigBootstrapCA adds the specProxyConfigBootstrapCA to the cluster download cluster params +func (o *ClusterDownloadClusterParams) WithSpecProxyConfigBootstrapCA(specProxyConfigBootstrapCA *string) *ClusterDownloadClusterParams { + o.SetSpecProxyConfigBootstrapCA(specProxyConfigBootstrapCA) + return o +} + +// SetSpecProxyConfigBootstrapCA adds the specProxyConfigBootstrapCA to the cluster download cluster params +func (o *ClusterDownloadClusterParams) SetSpecProxyConfigBootstrapCA(specProxyConfigBootstrapCA *string) { + o.SpecProxyConfigBootstrapCA = specProxyConfigBootstrapCA +} + +// WithSpecProxyConfigEnabled adds the specProxyConfigEnabled to the cluster download cluster params +func (o *ClusterDownloadClusterParams) WithSpecProxyConfigEnabled(specProxyConfigEnabled *bool) *ClusterDownloadClusterParams { + o.SetSpecProxyConfigEnabled(specProxyConfigEnabled) + return o +} + +// SetSpecProxyConfigEnabled adds the specProxyConfigEnabled to the cluster download cluster params +func (o *ClusterDownloadClusterParams) SetSpecProxyConfigEnabled(specProxyConfigEnabled *bool) { + o.SpecProxyConfigEnabled = specProxyConfigEnabled +} + +// WithSpecProxyConfigHTTPProxy adds the specProxyConfigHTTPProxy to the cluster download cluster params +func (o *ClusterDownloadClusterParams) WithSpecProxyConfigHTTPProxy(specProxyConfigHTTPProxy *string) *ClusterDownloadClusterParams { + o.SetSpecProxyConfigHTTPProxy(specProxyConfigHTTPProxy) + return o +} + +// SetSpecProxyConfigHTTPProxy adds the specProxyConfigHttpProxy to the cluster download cluster params +func (o *ClusterDownloadClusterParams) SetSpecProxyConfigHTTPProxy(specProxyConfigHTTPProxy *string) { + o.SpecProxyConfigHTTPProxy = specProxyConfigHTTPProxy +} + +// WithSpecProxyConfigHTTPSProxy adds the specProxyConfigHTTPSProxy to the cluster download cluster params +func (o *ClusterDownloadClusterParams) WithSpecProxyConfigHTTPSProxy(specProxyConfigHTTPSProxy *string) *ClusterDownloadClusterParams { + o.SetSpecProxyConfigHTTPSProxy(specProxyConfigHTTPSProxy) + return o +} + +// SetSpecProxyConfigHTTPSProxy adds the specProxyConfigHttpsProxy to the cluster download cluster params +func (o *ClusterDownloadClusterParams) SetSpecProxyConfigHTTPSProxy(specProxyConfigHTTPSProxy *string) { + o.SpecProxyConfigHTTPSProxy = specProxyConfigHTTPSProxy +} + +// WithSpecProxyConfigNoProxy adds the specProxyConfigNoProxy to the cluster download cluster params +func (o *ClusterDownloadClusterParams) WithSpecProxyConfigNoProxy(specProxyConfigNoProxy *string) *ClusterDownloadClusterParams { + o.SetSpecProxyConfigNoProxy(specProxyConfigNoProxy) + return o +} + +// SetSpecProxyConfigNoProxy adds the specProxyConfigNoProxy to the cluster download cluster params +func (o *ClusterDownloadClusterParams) SetSpecProxyConfigNoProxy(specProxyConfigNoProxy *string) { + o.SpecProxyConfigNoProxy = specProxyConfigNoProxy +} + +// WithSpecProxyConfigProxyAuth adds the specProxyConfigProxyAuth to the cluster download cluster params +func (o *ClusterDownloadClusterParams) WithSpecProxyConfigProxyAuth(specProxyConfigProxyAuth *string) *ClusterDownloadClusterParams { + o.SetSpecProxyConfigProxyAuth(specProxyConfigProxyAuth) + return o +} + +// SetSpecProxyConfigProxyAuth adds the specProxyConfigProxyAuth to the cluster download cluster params +func (o *ClusterDownloadClusterParams) SetSpecProxyConfigProxyAuth(specProxyConfigProxyAuth *string) { + o.SpecProxyConfigProxyAuth = specProxyConfigProxyAuth +} + +// WithSpecShareMode adds the specShareMode to the cluster download cluster params +func (o *ClusterDownloadClusterParams) WithSpecShareMode(specShareMode *string) *ClusterDownloadClusterParams { + o.SetSpecShareMode(specShareMode) + return o +} + +// SetSpecShareMode adds the specShareMode to the cluster download cluster params +func (o *ClusterDownloadClusterParams) SetSpecShareMode(specShareMode *string) { + o.SpecShareMode = specShareMode +} + +// WithStatusConditionStatus adds the statusConditionStatus to the cluster download cluster params +func (o *ClusterDownloadClusterParams) WithStatusConditionStatus(statusConditionStatus *string) *ClusterDownloadClusterParams { + o.SetStatusConditionStatus(statusConditionStatus) + return o +} + +// SetStatusConditionStatus adds the statusConditionStatus to the cluster download cluster params +func (o *ClusterDownloadClusterParams) SetStatusConditionStatus(statusConditionStatus *string) { + o.StatusConditionStatus = statusConditionStatus +} + +// WithStatusConditionType adds the statusConditionType to the cluster download cluster params +func (o *ClusterDownloadClusterParams) WithStatusConditionType(statusConditionType *string) *ClusterDownloadClusterParams { + o.SetStatusConditionType(statusConditionType) + return o +} + +// SetStatusConditionType adds the statusConditionType to the cluster download cluster params +func (o *ClusterDownloadClusterParams) SetStatusConditionType(statusConditionType *string) { + o.StatusConditionType = statusConditionType +} + +// WithStatusLastUpdated adds the statusLastUpdated to the cluster download cluster params +func (o *ClusterDownloadClusterParams) WithStatusLastUpdated(statusLastUpdated *strfmt.DateTime) *ClusterDownloadClusterParams { + o.SetStatusLastUpdated(statusLastUpdated) + return o +} + +// SetStatusLastUpdated adds the statusLastUpdated to the cluster download cluster params +func (o *ClusterDownloadClusterParams) SetStatusLastUpdated(statusLastUpdated *strfmt.DateTime) { + o.StatusLastUpdated = statusLastUpdated +} + +// WithStatusReason adds the statusReason to the cluster download cluster params +func (o *ClusterDownloadClusterParams) WithStatusReason(statusReason *string) *ClusterDownloadClusterParams { + o.SetStatusReason(statusReason) + return o +} + +// SetStatusReason adds the statusReason to the cluster download cluster params +func (o *ClusterDownloadClusterParams) SetStatusReason(statusReason *string) { + o.StatusReason = statusReason +} + +// WriteToRequest writes these params to a swagger request +func (o *ClusterDownloadClusterParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.APIVersion != nil { + + // query param apiVersion + var qrAPIVersion string + + if o.APIVersion != nil { + qrAPIVersion = *o.APIVersion + } + qAPIVersion := qrAPIVersion + if qAPIVersion != "" { + + if err := r.SetQueryParam("apiVersion", qAPIVersion); err != nil { + return err + } + } + } + + if o.Kind != nil { + + // query param kind + var qrKind string + + if o.Kind != nil { + qrKind = *o.Kind + } + qKind := qrKind + if qKind != "" { + + if err := r.SetQueryParam("kind", qKind); err != nil { + return err + } + } + } + + if o.MetadataDescription != nil { + + // query param metadata.description + var qrMetadataDescription string + + if o.MetadataDescription != nil { + qrMetadataDescription = *o.MetadataDescription + } + qMetadataDescription := qrMetadataDescription + if qMetadataDescription != "" { + + if err := r.SetQueryParam("metadata.description", qMetadataDescription); err != nil { + return err + } + } + } + + if o.MetadataID != nil { + + // query param metadata.id + var qrMetadataID string + + if o.MetadataID != nil { + qrMetadataID = *o.MetadataID + } + qMetadataID := qrMetadataID + if qMetadataID != "" { + + if err := r.SetQueryParam("metadata.id", qMetadataID); err != nil { + return err + } + } + } + + if o.MetadataModifiedAt != nil { + + // query param metadata.modifiedAt + var qrMetadataModifiedAt strfmt.DateTime + + if o.MetadataModifiedAt != nil { + qrMetadataModifiedAt = *o.MetadataModifiedAt + } + qMetadataModifiedAt := qrMetadataModifiedAt.String() + if qMetadataModifiedAt != "" { + + if err := r.SetQueryParam("metadata.modifiedAt", qMetadataModifiedAt); err != nil { + return err + } + } + } + + // path param metadata.name + if err := r.SetPathParam("metadata.name", o.MetadataName); err != nil { + return err + } + + if o.MetadataOrganization != nil { + + // query param metadata.organization + var qrMetadataOrganization string + + if o.MetadataOrganization != nil { + qrMetadataOrganization = *o.MetadataOrganization + } + qMetadataOrganization := qrMetadataOrganization + if qMetadataOrganization != "" { + + if err := r.SetQueryParam("metadata.organization", qMetadataOrganization); err != nil { + return err + } + } + } + + if o.MetadataPartner != nil { + + // query param metadata.partner + var qrMetadataPartner string + + if o.MetadataPartner != nil { + qrMetadataPartner = *o.MetadataPartner + } + qMetadataPartner := qrMetadataPartner + if qMetadataPartner != "" { + + if err := r.SetQueryParam("metadata.partner", qMetadataPartner); err != nil { + return err + } + } + } + + // path param metadata.project + if err := r.SetPathParam("metadata.project", o.MetadataProject); err != nil { + return err + } + + if o.SpecClusterDataArecord != nil { + + // query param spec.clusterData.arecord + var qrSpecClusterDataArecord string + + if o.SpecClusterDataArecord != nil { + qrSpecClusterDataArecord = *o.SpecClusterDataArecord + } + qSpecClusterDataArecord := qrSpecClusterDataArecord + if qSpecClusterDataArecord != "" { + + if err := r.SetQueryParam("spec.clusterData.arecord", qSpecClusterDataArecord); err != nil { + return err + } + } + } + + if o.SpecClusterDataClusterBlueprint != nil { + + // query param spec.clusterData.clusterBlueprint + var qrSpecClusterDataClusterBlueprint string + + if o.SpecClusterDataClusterBlueprint != nil { + qrSpecClusterDataClusterBlueprint = *o.SpecClusterDataClusterBlueprint + } + qSpecClusterDataClusterBlueprint := qrSpecClusterDataClusterBlueprint + if qSpecClusterDataClusterBlueprint != "" { + + if err := r.SetQueryParam("spec.clusterData.clusterBlueprint", qSpecClusterDataClusterBlueprint); err != nil { + return err + } + } + } + + if o.SpecClusterDataClusterStatusAuxiliaryTaskCount != nil { + + // query param spec.clusterData.clusterStatus.auxiliaryTaskCount + var qrSpecClusterDataClusterStatusAuxiliaryTaskCount string + + if o.SpecClusterDataClusterStatusAuxiliaryTaskCount != nil { + qrSpecClusterDataClusterStatusAuxiliaryTaskCount = *o.SpecClusterDataClusterStatusAuxiliaryTaskCount + } + qSpecClusterDataClusterStatusAuxiliaryTaskCount := qrSpecClusterDataClusterStatusAuxiliaryTaskCount + if qSpecClusterDataClusterStatusAuxiliaryTaskCount != "" { + + if err := r.SetQueryParam("spec.clusterData.clusterStatus.auxiliaryTaskCount", qSpecClusterDataClusterStatusAuxiliaryTaskCount); err != nil { + return err + } + } + } + + if o.SpecClusterDataClusterStatusCustomTaskCount != nil { + + // query param spec.clusterData.clusterStatus.customTaskCount + var qrSpecClusterDataClusterStatusCustomTaskCount string + + if o.SpecClusterDataClusterStatusCustomTaskCount != nil { + qrSpecClusterDataClusterStatusCustomTaskCount = *o.SpecClusterDataClusterStatusCustomTaskCount + } + qSpecClusterDataClusterStatusCustomTaskCount := qrSpecClusterDataClusterStatusCustomTaskCount + if qSpecClusterDataClusterStatusCustomTaskCount != "" { + + if err := r.SetQueryParam("spec.clusterData.clusterStatus.customTaskCount", qSpecClusterDataClusterStatusCustomTaskCount); err != nil { + return err + } + } + } + + if o.SpecClusterDataClusterStatusPublishedBlueprint != nil { + + // query param spec.clusterData.clusterStatus.publishedBlueprint + var qrSpecClusterDataClusterStatusPublishedBlueprint string + + if o.SpecClusterDataClusterStatusPublishedBlueprint != nil { + qrSpecClusterDataClusterStatusPublishedBlueprint = *o.SpecClusterDataClusterStatusPublishedBlueprint + } + qSpecClusterDataClusterStatusPublishedBlueprint := qrSpecClusterDataClusterStatusPublishedBlueprint + if qSpecClusterDataClusterStatusPublishedBlueprint != "" { + + if err := r.SetQueryParam("spec.clusterData.clusterStatus.publishedBlueprint", qSpecClusterDataClusterStatusPublishedBlueprint); err != nil { + return err + } + } + } + + if o.SpecClusterDataClusterStatusSystemTaskCount != nil { + + // query param spec.clusterData.clusterStatus.systemTaskCount + var qrSpecClusterDataClusterStatusSystemTaskCount string + + if o.SpecClusterDataClusterStatusSystemTaskCount != nil { + qrSpecClusterDataClusterStatusSystemTaskCount = *o.SpecClusterDataClusterStatusSystemTaskCount + } + qSpecClusterDataClusterStatusSystemTaskCount := qrSpecClusterDataClusterStatusSystemTaskCount + if qSpecClusterDataClusterStatusSystemTaskCount != "" { + + if err := r.SetQueryParam("spec.clusterData.clusterStatus.systemTaskCount", qSpecClusterDataClusterStatusSystemTaskCount); err != nil { + return err + } + } + } + + if o.SpecClusterDataClusterStatusToken != nil { + + // query param spec.clusterData.clusterStatus.token + var qrSpecClusterDataClusterStatusToken string + + if o.SpecClusterDataClusterStatusToken != nil { + qrSpecClusterDataClusterStatusToken = *o.SpecClusterDataClusterStatusToken + } + qSpecClusterDataClusterStatusToken := qrSpecClusterDataClusterStatusToken + if qSpecClusterDataClusterStatusToken != "" { + + if err := r.SetQueryParam("spec.clusterData.clusterStatus.token", qSpecClusterDataClusterStatusToken); err != nil { + return err + } + } + } + + if o.SpecClusterDataCname != nil { + + // query param spec.clusterData.cname + var qrSpecClusterDataCname string + + if o.SpecClusterDataCname != nil { + qrSpecClusterDataCname = *o.SpecClusterDataCname + } + qSpecClusterDataCname := qrSpecClusterDataCname + if qSpecClusterDataCname != "" { + + if err := r.SetQueryParam("spec.clusterData.cname", qSpecClusterDataCname); err != nil { + return err + } + } + } + + if o.SpecClusterDataDisplayName != nil { + + // query param spec.clusterData.displayName + var qrSpecClusterDataDisplayName string + + if o.SpecClusterDataDisplayName != nil { + qrSpecClusterDataDisplayName = *o.SpecClusterDataDisplayName + } + qSpecClusterDataDisplayName := qrSpecClusterDataDisplayName + if qSpecClusterDataDisplayName != "" { + + if err := r.SetQueryParam("spec.clusterData.displayName", qSpecClusterDataDisplayName); err != nil { + return err + } + } + } + + if o.SpecClusterDataHealth != nil { + + // query param spec.clusterData.health + var qrSpecClusterDataHealth string + + if o.SpecClusterDataHealth != nil { + qrSpecClusterDataHealth = *o.SpecClusterDataHealth + } + qSpecClusterDataHealth := qrSpecClusterDataHealth + if qSpecClusterDataHealth != "" { + + if err := r.SetQueryParam("spec.clusterData.health", qSpecClusterDataHealth); err != nil { + return err + } + } + } + + if o.SpecClusterDataManufacturer != nil { + + // query param spec.clusterData.manufacturer + var qrSpecClusterDataManufacturer string + + if o.SpecClusterDataManufacturer != nil { + qrSpecClusterDataManufacturer = *o.SpecClusterDataManufacturer + } + qSpecClusterDataManufacturer := qrSpecClusterDataManufacturer + if qSpecClusterDataManufacturer != "" { + + if err := r.SetQueryParam("spec.clusterData.manufacturer", qSpecClusterDataManufacturer); err != nil { + return err + } + } + } + + if o.SpecClusterDataPassphrase != nil { + + // query param spec.clusterData.passphrase + var qrSpecClusterDataPassphrase string + + if o.SpecClusterDataPassphrase != nil { + qrSpecClusterDataPassphrase = *o.SpecClusterDataPassphrase + } + qSpecClusterDataPassphrase := qrSpecClusterDataPassphrase + if qSpecClusterDataPassphrase != "" { + + if err := r.SetQueryParam("spec.clusterData.passphrase", qSpecClusterDataPassphrase); err != nil { + return err + } + } + } + + if o.SpecClusterDataProvider != nil { + + // query param spec.clusterData.provider + var qrSpecClusterDataProvider string + + if o.SpecClusterDataProvider != nil { + qrSpecClusterDataProvider = *o.SpecClusterDataProvider + } + qSpecClusterDataProvider := qrSpecClusterDataProvider + if qSpecClusterDataProvider != "" { + + if err := r.SetQueryParam("spec.clusterData.provider", qSpecClusterDataProvider); err != nil { + return err + } + } + } + + if o.SpecClusterType != nil { + + // query param spec.clusterType + var qrSpecClusterType string + + if o.SpecClusterType != nil { + qrSpecClusterType = *o.SpecClusterType + } + qSpecClusterType := qrSpecClusterType + if qSpecClusterType != "" { + + if err := r.SetQueryParam("spec.clusterType", qSpecClusterType); err != nil { + return err + } + } + } + + if o.SpecMetroCity != nil { + + // query param spec.metro.city + var qrSpecMetroCity string + + if o.SpecMetroCity != nil { + qrSpecMetroCity = *o.SpecMetroCity + } + qSpecMetroCity := qrSpecMetroCity + if qSpecMetroCity != "" { + + if err := r.SetQueryParam("spec.metro.city", qSpecMetroCity); err != nil { + return err + } + } + } + + if o.SpecMetroCountry != nil { + + // query param spec.metro.country + var qrSpecMetroCountry string + + if o.SpecMetroCountry != nil { + qrSpecMetroCountry = *o.SpecMetroCountry + } + qSpecMetroCountry := qrSpecMetroCountry + if qSpecMetroCountry != "" { + + if err := r.SetQueryParam("spec.metro.country", qSpecMetroCountry); err != nil { + return err + } + } + } + + if o.SpecMetroCountryCode != nil { + + // query param spec.metro.countryCode + var qrSpecMetroCountryCode string + + if o.SpecMetroCountryCode != nil { + qrSpecMetroCountryCode = *o.SpecMetroCountryCode + } + qSpecMetroCountryCode := qrSpecMetroCountryCode + if qSpecMetroCountryCode != "" { + + if err := r.SetQueryParam("spec.metro.countryCode", qSpecMetroCountryCode); err != nil { + return err + } + } + } + + if o.SpecMetroID != nil { + + // query param spec.metro.id + var qrSpecMetroID string + + if o.SpecMetroID != nil { + qrSpecMetroID = *o.SpecMetroID + } + qSpecMetroID := qrSpecMetroID + if qSpecMetroID != "" { + + if err := r.SetQueryParam("spec.metro.id", qSpecMetroID); err != nil { + return err + } + } + } + + if o.SpecMetroLatitude != nil { + + // query param spec.metro.latitude + var qrSpecMetroLatitude string + + if o.SpecMetroLatitude != nil { + qrSpecMetroLatitude = *o.SpecMetroLatitude + } + qSpecMetroLatitude := qrSpecMetroLatitude + if qSpecMetroLatitude != "" { + + if err := r.SetQueryParam("spec.metro.latitude", qSpecMetroLatitude); err != nil { + return err + } + } + } + + if o.SpecMetroLocale != nil { + + // query param spec.metro.locale + var qrSpecMetroLocale string + + if o.SpecMetroLocale != nil { + qrSpecMetroLocale = *o.SpecMetroLocale + } + qSpecMetroLocale := qrSpecMetroLocale + if qSpecMetroLocale != "" { + + if err := r.SetQueryParam("spec.metro.locale", qSpecMetroLocale); err != nil { + return err + } + } + } + + if o.SpecMetroLongitude != nil { + + // query param spec.metro.longitude + var qrSpecMetroLongitude string + + if o.SpecMetroLongitude != nil { + qrSpecMetroLongitude = *o.SpecMetroLongitude + } + qSpecMetroLongitude := qrSpecMetroLongitude + if qSpecMetroLongitude != "" { + + if err := r.SetQueryParam("spec.metro.longitude", qSpecMetroLongitude); err != nil { + return err + } + } + } + + if o.SpecMetroName != nil { + + // query param spec.metro.name + var qrSpecMetroName string + + if o.SpecMetroName != nil { + qrSpecMetroName = *o.SpecMetroName + } + qSpecMetroName := qrSpecMetroName + if qSpecMetroName != "" { + + if err := r.SetQueryParam("spec.metro.name", qSpecMetroName); err != nil { + return err + } + } + } + + if o.SpecMetroState != nil { + + // query param spec.metro.state + var qrSpecMetroState string + + if o.SpecMetroState != nil { + qrSpecMetroState = *o.SpecMetroState + } + qSpecMetroState := qrSpecMetroState + if qSpecMetroState != "" { + + if err := r.SetQueryParam("spec.metro.state", qSpecMetroState); err != nil { + return err + } + } + } + + if o.SpecMetroStateCode != nil { + + // query param spec.metro.stateCode + var qrSpecMetroStateCode string + + if o.SpecMetroStateCode != nil { + qrSpecMetroStateCode = *o.SpecMetroStateCode + } + qSpecMetroStateCode := qrSpecMetroStateCode + if qSpecMetroStateCode != "" { + + if err := r.SetQueryParam("spec.metro.stateCode", qSpecMetroStateCode); err != nil { + return err + } + } + } + + if o.SpecOverrideSelector != nil { + + // query param spec.overrideSelector + var qrSpecOverrideSelector string + + if o.SpecOverrideSelector != nil { + qrSpecOverrideSelector = *o.SpecOverrideSelector + } + qSpecOverrideSelector := qrSpecOverrideSelector + if qSpecOverrideSelector != "" { + + if err := r.SetQueryParam("spec.overrideSelector", qSpecOverrideSelector); err != nil { + return err + } + } + } + + if o.SpecParamsEnvironmentProvider != nil { + + // query param spec.params.environmentProvider + var qrSpecParamsEnvironmentProvider string + + if o.SpecParamsEnvironmentProvider != nil { + qrSpecParamsEnvironmentProvider = *o.SpecParamsEnvironmentProvider + } + qSpecParamsEnvironmentProvider := qrSpecParamsEnvironmentProvider + if qSpecParamsEnvironmentProvider != "" { + + if err := r.SetQueryParam("spec.params.environmentProvider", qSpecParamsEnvironmentProvider); err != nil { + return err + } + } + } + + if o.SpecParamsKubernetesProvider != nil { + + // query param spec.params.kubernetesProvider + var qrSpecParamsKubernetesProvider string + + if o.SpecParamsKubernetesProvider != nil { + qrSpecParamsKubernetesProvider = *o.SpecParamsKubernetesProvider + } + qSpecParamsKubernetesProvider := qrSpecParamsKubernetesProvider + if qSpecParamsKubernetesProvider != "" { + + if err := r.SetQueryParam("spec.params.kubernetesProvider", qSpecParamsKubernetesProvider); err != nil { + return err + } + } + } + + if o.SpecParamsProvisionEnvironment != nil { + + // query param spec.params.provisionEnvironment + var qrSpecParamsProvisionEnvironment string + + if o.SpecParamsProvisionEnvironment != nil { + qrSpecParamsProvisionEnvironment = *o.SpecParamsProvisionEnvironment + } + qSpecParamsProvisionEnvironment := qrSpecParamsProvisionEnvironment + if qSpecParamsProvisionEnvironment != "" { + + if err := r.SetQueryParam("spec.params.provisionEnvironment", qSpecParamsProvisionEnvironment); err != nil { + return err + } + } + } + + if o.SpecParamsProvisionPackageType != nil { + + // query param spec.params.provisionPackageType + var qrSpecParamsProvisionPackageType string + + if o.SpecParamsProvisionPackageType != nil { + qrSpecParamsProvisionPackageType = *o.SpecParamsProvisionPackageType + } + qSpecParamsProvisionPackageType := qrSpecParamsProvisionPackageType + if qSpecParamsProvisionPackageType != "" { + + if err := r.SetQueryParam("spec.params.provisionPackageType", qSpecParamsProvisionPackageType); err != nil { + return err + } + } + } + + if o.SpecParamsProvisionType != nil { + + // query param spec.params.provisionType + var qrSpecParamsProvisionType string + + if o.SpecParamsProvisionType != nil { + qrSpecParamsProvisionType = *o.SpecParamsProvisionType + } + qSpecParamsProvisionType := qrSpecParamsProvisionType + if qSpecParamsProvisionType != "" { + + if err := r.SetQueryParam("spec.params.provisionType", qSpecParamsProvisionType); err != nil { + return err + } + } + } + + if o.SpecParamsState != nil { + + // query param spec.params.state + var qrSpecParamsState string + + if o.SpecParamsState != nil { + qrSpecParamsState = *o.SpecParamsState + } + qSpecParamsState := qrSpecParamsState + if qSpecParamsState != "" { + + if err := r.SetQueryParam("spec.params.state", qSpecParamsState); err != nil { + return err + } + } + } + + if o.SpecProxyConfigAllowInsecureBootstrap != nil { + + // query param spec.proxyConfig.allowInsecureBootstrap + var qrSpecProxyConfigAllowInsecureBootstrap bool + + if o.SpecProxyConfigAllowInsecureBootstrap != nil { + qrSpecProxyConfigAllowInsecureBootstrap = *o.SpecProxyConfigAllowInsecureBootstrap + } + qSpecProxyConfigAllowInsecureBootstrap := swag.FormatBool(qrSpecProxyConfigAllowInsecureBootstrap) + if qSpecProxyConfigAllowInsecureBootstrap != "" { + + if err := r.SetQueryParam("spec.proxyConfig.allowInsecureBootstrap", qSpecProxyConfigAllowInsecureBootstrap); err != nil { + return err + } + } + } + + if o.SpecProxyConfigBootstrapCA != nil { + + // query param spec.proxyConfig.bootstrapCA + var qrSpecProxyConfigBootstrapCA string + + if o.SpecProxyConfigBootstrapCA != nil { + qrSpecProxyConfigBootstrapCA = *o.SpecProxyConfigBootstrapCA + } + qSpecProxyConfigBootstrapCA := qrSpecProxyConfigBootstrapCA + if qSpecProxyConfigBootstrapCA != "" { + + if err := r.SetQueryParam("spec.proxyConfig.bootstrapCA", qSpecProxyConfigBootstrapCA); err != nil { + return err + } + } + } + + if o.SpecProxyConfigEnabled != nil { + + // query param spec.proxyConfig.enabled + var qrSpecProxyConfigEnabled bool + + if o.SpecProxyConfigEnabled != nil { + qrSpecProxyConfigEnabled = *o.SpecProxyConfigEnabled + } + qSpecProxyConfigEnabled := swag.FormatBool(qrSpecProxyConfigEnabled) + if qSpecProxyConfigEnabled != "" { + + if err := r.SetQueryParam("spec.proxyConfig.enabled", qSpecProxyConfigEnabled); err != nil { + return err + } + } + } + + if o.SpecProxyConfigHTTPProxy != nil { + + // query param spec.proxyConfig.httpProxy + var qrSpecProxyConfigHTTPProxy string + + if o.SpecProxyConfigHTTPProxy != nil { + qrSpecProxyConfigHTTPProxy = *o.SpecProxyConfigHTTPProxy + } + qSpecProxyConfigHTTPProxy := qrSpecProxyConfigHTTPProxy + if qSpecProxyConfigHTTPProxy != "" { + + if err := r.SetQueryParam("spec.proxyConfig.httpProxy", qSpecProxyConfigHTTPProxy); err != nil { + return err + } + } + } + + if o.SpecProxyConfigHTTPSProxy != nil { + + // query param spec.proxyConfig.httpsProxy + var qrSpecProxyConfigHTTPSProxy string + + if o.SpecProxyConfigHTTPSProxy != nil { + qrSpecProxyConfigHTTPSProxy = *o.SpecProxyConfigHTTPSProxy + } + qSpecProxyConfigHTTPSProxy := qrSpecProxyConfigHTTPSProxy + if qSpecProxyConfigHTTPSProxy != "" { + + if err := r.SetQueryParam("spec.proxyConfig.httpsProxy", qSpecProxyConfigHTTPSProxy); err != nil { + return err + } + } + } + + if o.SpecProxyConfigNoProxy != nil { + + // query param spec.proxyConfig.noProxy + var qrSpecProxyConfigNoProxy string + + if o.SpecProxyConfigNoProxy != nil { + qrSpecProxyConfigNoProxy = *o.SpecProxyConfigNoProxy + } + qSpecProxyConfigNoProxy := qrSpecProxyConfigNoProxy + if qSpecProxyConfigNoProxy != "" { + + if err := r.SetQueryParam("spec.proxyConfig.noProxy", qSpecProxyConfigNoProxy); err != nil { + return err + } + } + } + + if o.SpecProxyConfigProxyAuth != nil { + + // query param spec.proxyConfig.proxyAuth + var qrSpecProxyConfigProxyAuth string + + if o.SpecProxyConfigProxyAuth != nil { + qrSpecProxyConfigProxyAuth = *o.SpecProxyConfigProxyAuth + } + qSpecProxyConfigProxyAuth := qrSpecProxyConfigProxyAuth + if qSpecProxyConfigProxyAuth != "" { + + if err := r.SetQueryParam("spec.proxyConfig.proxyAuth", qSpecProxyConfigProxyAuth); err != nil { + return err + } + } + } + + if o.SpecShareMode != nil { + + // query param spec.shareMode + var qrSpecShareMode string + + if o.SpecShareMode != nil { + qrSpecShareMode = *o.SpecShareMode + } + qSpecShareMode := qrSpecShareMode + if qSpecShareMode != "" { + + if err := r.SetQueryParam("spec.shareMode", qSpecShareMode); err != nil { + return err + } + } + } + + if o.StatusConditionStatus != nil { + + // query param status.conditionStatus + var qrStatusConditionStatus string + + if o.StatusConditionStatus != nil { + qrStatusConditionStatus = *o.StatusConditionStatus + } + qStatusConditionStatus := qrStatusConditionStatus + if qStatusConditionStatus != "" { + + if err := r.SetQueryParam("status.conditionStatus", qStatusConditionStatus); err != nil { + return err + } + } + } + + if o.StatusConditionType != nil { + + // query param status.conditionType + var qrStatusConditionType string + + if o.StatusConditionType != nil { + qrStatusConditionType = *o.StatusConditionType + } + qStatusConditionType := qrStatusConditionType + if qStatusConditionType != "" { + + if err := r.SetQueryParam("status.conditionType", qStatusConditionType); err != nil { + return err + } + } + } + + if o.StatusLastUpdated != nil { + + // query param status.lastUpdated + var qrStatusLastUpdated strfmt.DateTime + + if o.StatusLastUpdated != nil { + qrStatusLastUpdated = *o.StatusLastUpdated + } + qStatusLastUpdated := qrStatusLastUpdated.String() + if qStatusLastUpdated != "" { + + if err := r.SetQueryParam("status.lastUpdated", qStatusLastUpdated); err != nil { + return err + } + } + } + + if o.StatusReason != nil { + + // query param status.reason + var qrStatusReason string + + if o.StatusReason != nil { + qrStatusReason = *o.StatusReason + } + qStatusReason := qrStatusReason + if qStatusReason != "" { + + if err := r.SetQueryParam("status.reason", qStatusReason); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/components/common/api/def/clients/scheduler/client/cluster/cluster_download_cluster_responses.go b/components/common/api/def/clients/scheduler/client/cluster/cluster_download_cluster_responses.go new file mode 100644 index 0000000..367a7c2 --- /dev/null +++ b/components/common/api/def/clients/scheduler/client/cluster/cluster_download_cluster_responses.go @@ -0,0 +1,187 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package cluster + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/RafaySystems/rcloud-base/components/common/api/def/clients/scheduler/models" +) + +// ClusterDownloadClusterReader is a Reader for the ClusterDownloadCluster structure. +type ClusterDownloadClusterReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ClusterDownloadClusterReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewClusterDownloadClusterOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 403: + result := NewClusterDownloadClusterForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewClusterDownloadClusterNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + result := NewClusterDownloadClusterDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewClusterDownloadClusterOK creates a ClusterDownloadClusterOK with default headers values +func NewClusterDownloadClusterOK() *ClusterDownloadClusterOK { + return &ClusterDownloadClusterOK{} +} + +/* ClusterDownloadClusterOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type ClusterDownloadClusterOK struct { + Payload *models.V3HTTPBody +} + +func (o *ClusterDownloadClusterOK) Error() string { + return fmt.Sprintf("[GET /infra/v3/project/{metadata.project}/cluster/{metadata.name}/download][%d] clusterDownloadClusterOK %+v", 200, o.Payload) +} +func (o *ClusterDownloadClusterOK) GetPayload() *models.V3HTTPBody { + return o.Payload +} + +func (o *ClusterDownloadClusterOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V3HTTPBody) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewClusterDownloadClusterForbidden creates a ClusterDownloadClusterForbidden with default headers values +func NewClusterDownloadClusterForbidden() *ClusterDownloadClusterForbidden { + return &ClusterDownloadClusterForbidden{} +} + +/* ClusterDownloadClusterForbidden describes a response with status code 403, with default header values. + +Returned when the user does not have permission to access the resource. +*/ +type ClusterDownloadClusterForbidden struct { + Payload interface{} +} + +func (o *ClusterDownloadClusterForbidden) Error() string { + return fmt.Sprintf("[GET /infra/v3/project/{metadata.project}/cluster/{metadata.name}/download][%d] clusterDownloadClusterForbidden %+v", 403, o.Payload) +} +func (o *ClusterDownloadClusterForbidden) GetPayload() interface{} { + return o.Payload +} + +func (o *ClusterDownloadClusterForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewClusterDownloadClusterNotFound creates a ClusterDownloadClusterNotFound with default headers values +func NewClusterDownloadClusterNotFound() *ClusterDownloadClusterNotFound { + return &ClusterDownloadClusterNotFound{} +} + +/* ClusterDownloadClusterNotFound describes a response with status code 404, with default header values. + +Returned when the resource does not exist. +*/ +type ClusterDownloadClusterNotFound struct { + Payload string +} + +func (o *ClusterDownloadClusterNotFound) Error() string { + return fmt.Sprintf("[GET /infra/v3/project/{metadata.project}/cluster/{metadata.name}/download][%d] clusterDownloadClusterNotFound %+v", 404, o.Payload) +} +func (o *ClusterDownloadClusterNotFound) GetPayload() string { + return o.Payload +} + +func (o *ClusterDownloadClusterNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewClusterDownloadClusterDefault creates a ClusterDownloadClusterDefault with default headers values +func NewClusterDownloadClusterDefault(code int) *ClusterDownloadClusterDefault { + return &ClusterDownloadClusterDefault{ + _statusCode: code, + } +} + +/* ClusterDownloadClusterDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type ClusterDownloadClusterDefault struct { + _statusCode int + + Payload *models.GooglerpcStatus +} + +// Code gets the status code for the cluster download cluster default response +func (o *ClusterDownloadClusterDefault) Code() int { + return o._statusCode +} + +func (o *ClusterDownloadClusterDefault) Error() string { + return fmt.Sprintf("[GET /infra/v3/project/{metadata.project}/cluster/{metadata.name}/download][%d] Cluster_DownloadCluster default %+v", o._statusCode, o.Payload) +} +func (o *ClusterDownloadClusterDefault) GetPayload() *models.GooglerpcStatus { + return o.Payload +} + +func (o *ClusterDownloadClusterDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.GooglerpcStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/components/common/api/def/clients/scheduler/client/cluster/cluster_get_cluster_parameters.go b/components/common/api/def/clients/scheduler/client/cluster/cluster_get_cluster_parameters.go new file mode 100644 index 0000000..0991ee1 --- /dev/null +++ b/components/common/api/def/clients/scheduler/client/cluster/cluster_get_cluster_parameters.go @@ -0,0 +1,1914 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package cluster + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewClusterGetClusterParams creates a new ClusterGetClusterParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewClusterGetClusterParams() *ClusterGetClusterParams { + return &ClusterGetClusterParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewClusterGetClusterParamsWithTimeout creates a new ClusterGetClusterParams object +// with the ability to set a timeout on a request. +func NewClusterGetClusterParamsWithTimeout(timeout time.Duration) *ClusterGetClusterParams { + return &ClusterGetClusterParams{ + timeout: timeout, + } +} + +// NewClusterGetClusterParamsWithContext creates a new ClusterGetClusterParams object +// with the ability to set a context for a request. +func NewClusterGetClusterParamsWithContext(ctx context.Context) *ClusterGetClusterParams { + return &ClusterGetClusterParams{ + Context: ctx, + } +} + +// NewClusterGetClusterParamsWithHTTPClient creates a new ClusterGetClusterParams object +// with the ability to set a custom HTTPClient for a request. +func NewClusterGetClusterParamsWithHTTPClient(client *http.Client) *ClusterGetClusterParams { + return &ClusterGetClusterParams{ + HTTPClient: client, + } +} + +/* ClusterGetClusterParams contains all the parameters to send to the API endpoint + for the cluster get cluster operation. + + Typically these are written to a http.Request. +*/ +type ClusterGetClusterParams struct { + + /* APIVersion. + + API Version. API Version of the resource + + Default: "infra.k8smgmt.io/v3" + */ + APIVersion *string + + /* Kind. + + Kind. Kind of the resource + + Default: "Cluster" + */ + Kind *string + + /* MetadataDescription. + + Description. description of the resource + */ + MetadataDescription *string + + // MetadataID. + MetadataID *string + + // MetadataModifiedAt. + // + // Format: date-time + MetadataModifiedAt *strfmt.DateTime + + /* MetadataName. + + name of the resource + */ + MetadataName string + + /* MetadataOrganization. + + Organization. Organization to which the resource belongs + */ + MetadataOrganization *string + + /* MetadataPartner. + + Partner. Partner to which the resource belongs + */ + MetadataPartner *string + + /* MetadataProject. + + Project of the resource + */ + MetadataProject string + + /* SpecClusterDataArecord. + + DNS A Record. Entry for DNS A Record + */ + SpecClusterDataArecord *string + + /* SpecClusterDataClusterBlueprint. + + ClusterBlueprint. Cluster Blueprint + */ + SpecClusterDataClusterBlueprint *string + + /* SpecClusterDataClusterStatusAuxiliaryTaskCount. + + Cluster Information. Override selector of the cluster + + Format: int64 + */ + SpecClusterDataClusterStatusAuxiliaryTaskCount *string + + /* SpecClusterDataClusterStatusCustomTaskCount. + + Cluster Information. Override selector of the cluster + + Format: int64 + */ + SpecClusterDataClusterStatusCustomTaskCount *string + + /* SpecClusterDataClusterStatusPublishedBlueprint. + + Cluster Information. Override selector of the cluster + */ + SpecClusterDataClusterStatusPublishedBlueprint *string + + /* SpecClusterDataClusterStatusSystemTaskCount. + + Cluster Information. Override selector of the cluster + + Format: int64 + */ + SpecClusterDataClusterStatusSystemTaskCount *string + + /* SpecClusterDataClusterStatusToken. + + Cluster Information. Override selector of the cluster + */ + SpecClusterDataClusterStatusToken *string + + /* SpecClusterDataCname. + + CNAME. cname of the cluster + */ + SpecClusterDataCname *string + + /* SpecClusterDataDisplayName. + + Display Name. Display Name + */ + SpecClusterDataDisplayName *string + + /* SpecClusterDataHealth. + + Health. Health + + Default: "EDGE_IGNORE" + */ + SpecClusterDataHealth *string + + /* SpecClusterDataManufacturer. + + Manufacturer. Manufacturer + */ + SpecClusterDataManufacturer *string + + /* SpecClusterDataPassphrase. + + Passphrase. passphrase of the cluster + */ + SpecClusterDataPassphrase *string + + /* SpecClusterDataProvider. + + Provider. Provider + */ + SpecClusterDataProvider *string + + /* SpecClusterType. + + Cluster Type. Type of the cluster being created + + Default: "Imported" + */ + SpecClusterType *string + + /* SpecMetroCity. + + City. City of the location + */ + SpecMetroCity *string + + /* SpecMetroCountry. + + Country. country of the location + */ + SpecMetroCountry *string + + /* SpecMetroCountryCode. + + CountryCode. CountryCode of the location + */ + SpecMetroCountryCode *string + + /* SpecMetroID. + + ID of Location. ID Location of the cluster + */ + SpecMetroID *string + + /* SpecMetroLatitude. + + Latitude. Latitude of the location + */ + SpecMetroLatitude *string + + /* SpecMetroLocale. + + Locale. locale of the location + */ + SpecMetroLocale *string + + /* SpecMetroLongitude. + + Longitude. Longitude of the location + */ + SpecMetroLongitude *string + + /* SpecMetroName. + + Location. Location of the cluster + */ + SpecMetroName *string + + /* SpecMetroState. + + State. State of the location + */ + SpecMetroState *string + + /* SpecMetroStateCode. + + StateCode. StateCode of the location + */ + SpecMetroStateCode *string + + /* SpecOverrideSelector. + + Override Selector. Override selector of the cluster + */ + SpecOverrideSelector *string + + /* SpecParamsEnvironmentProvider. + + EnvironmentProvider. environment provider of the cluster + */ + SpecParamsEnvironmentProvider *string + + /* SpecParamsKubernetesProvider. + + KubernetesProvider. kubernetes provider + */ + SpecParamsKubernetesProvider *string + + /* SpecParamsProvisionEnvironment. + + ProvisionEnvironment. provision environment + */ + SpecParamsProvisionEnvironment *string + + /* SpecParamsProvisionPackageType. + + ProvisionPackageType. provision package type + */ + SpecParamsProvisionPackageType *string + + /* SpecParamsProvisionType. + + ProvisionType. provision type + */ + SpecParamsProvisionType *string + + /* SpecParamsState. + + State. state + */ + SpecParamsState *string + + /* SpecProxyConfigAllowInsecureBootstrap. + + AllowInsecureBootstrap. Allow insecure bootstrap + */ + SpecProxyConfigAllowInsecureBootstrap *bool + + /* SpecProxyConfigBootstrapCA. + + BootstrapCA. Certificate Authority of bootstrap server + */ + SpecProxyConfigBootstrapCA *string + + /* SpecProxyConfigEnabled. + + Enabled. enabled + */ + SpecProxyConfigEnabled *bool + + /* SpecProxyConfigHTTPProxy. + + HttpProxy. http proxy + */ + SpecProxyConfigHTTPProxy *string + + /* SpecProxyConfigHTTPSProxy. + + HttpsProxy. https proxy + */ + SpecProxyConfigHTTPSProxy *string + + /* SpecProxyConfigNoProxy. + + noproxy. noproxy + */ + SpecProxyConfigNoProxy *string + + /* SpecProxyConfigProxyAuth. + + ProxyAuth. proxy auth + */ + SpecProxyConfigProxyAuth *string + + /* SpecShareMode. + + Override Selector. Override selector of the cluster + + Default: "ClusterShareModeNotSet" + */ + SpecShareMode *string + + /* StatusConditionStatus. + + Condition Status. status of the condition + + Default: "StatusNotSet" + */ + StatusConditionStatus *string + + /* StatusConditionType. + + Condition Type. type of the status condition + */ + StatusConditionType *string + + /* StatusLastUpdated. + + Last Updated. when the condition status is last updated + + Format: date-time + */ + StatusLastUpdated *strfmt.DateTime + + /* StatusReason. + + Reason. reason of the last condition status + */ + StatusReason *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the cluster get cluster params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ClusterGetClusterParams) WithDefaults() *ClusterGetClusterParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the cluster get cluster params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ClusterGetClusterParams) SetDefaults() { + var ( + aPIVersionDefault = string("infra.k8smgmt.io/v3") + + kindDefault = string("Cluster") + + specClusterDataHealthDefault = string("EDGE_IGNORE") + + specClusterTypeDefault = string("Imported") + + specShareModeDefault = string("ClusterShareModeNotSet") + + statusConditionStatusDefault = string("StatusNotSet") + ) + + val := ClusterGetClusterParams{ + APIVersion: &aPIVersionDefault, + Kind: &kindDefault, + SpecClusterDataHealth: &specClusterDataHealthDefault, + SpecClusterType: &specClusterTypeDefault, + SpecShareMode: &specShareModeDefault, + StatusConditionStatus: &statusConditionStatusDefault, + } + + val.timeout = o.timeout + val.Context = o.Context + val.HTTPClient = o.HTTPClient + *o = val +} + +// WithTimeout adds the timeout to the cluster get cluster params +func (o *ClusterGetClusterParams) WithTimeout(timeout time.Duration) *ClusterGetClusterParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the cluster get cluster params +func (o *ClusterGetClusterParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the cluster get cluster params +func (o *ClusterGetClusterParams) WithContext(ctx context.Context) *ClusterGetClusterParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the cluster get cluster params +func (o *ClusterGetClusterParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the cluster get cluster params +func (o *ClusterGetClusterParams) WithHTTPClient(client *http.Client) *ClusterGetClusterParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the cluster get cluster params +func (o *ClusterGetClusterParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAPIVersion adds the aPIVersion to the cluster get cluster params +func (o *ClusterGetClusterParams) WithAPIVersion(aPIVersion *string) *ClusterGetClusterParams { + o.SetAPIVersion(aPIVersion) + return o +} + +// SetAPIVersion adds the apiVersion to the cluster get cluster params +func (o *ClusterGetClusterParams) SetAPIVersion(aPIVersion *string) { + o.APIVersion = aPIVersion +} + +// WithKind adds the kind to the cluster get cluster params +func (o *ClusterGetClusterParams) WithKind(kind *string) *ClusterGetClusterParams { + o.SetKind(kind) + return o +} + +// SetKind adds the kind to the cluster get cluster params +func (o *ClusterGetClusterParams) SetKind(kind *string) { + o.Kind = kind +} + +// WithMetadataDescription adds the metadataDescription to the cluster get cluster params +func (o *ClusterGetClusterParams) WithMetadataDescription(metadataDescription *string) *ClusterGetClusterParams { + o.SetMetadataDescription(metadataDescription) + return o +} + +// SetMetadataDescription adds the metadataDescription to the cluster get cluster params +func (o *ClusterGetClusterParams) SetMetadataDescription(metadataDescription *string) { + o.MetadataDescription = metadataDescription +} + +// WithMetadataID adds the metadataID to the cluster get cluster params +func (o *ClusterGetClusterParams) WithMetadataID(metadataID *string) *ClusterGetClusterParams { + o.SetMetadataID(metadataID) + return o +} + +// SetMetadataID adds the metadataId to the cluster get cluster params +func (o *ClusterGetClusterParams) SetMetadataID(metadataID *string) { + o.MetadataID = metadataID +} + +// WithMetadataModifiedAt adds the metadataModifiedAt to the cluster get cluster params +func (o *ClusterGetClusterParams) WithMetadataModifiedAt(metadataModifiedAt *strfmt.DateTime) *ClusterGetClusterParams { + o.SetMetadataModifiedAt(metadataModifiedAt) + return o +} + +// SetMetadataModifiedAt adds the metadataModifiedAt to the cluster get cluster params +func (o *ClusterGetClusterParams) SetMetadataModifiedAt(metadataModifiedAt *strfmt.DateTime) { + o.MetadataModifiedAt = metadataModifiedAt +} + +// WithMetadataName adds the metadataName to the cluster get cluster params +func (o *ClusterGetClusterParams) WithMetadataName(metadataName string) *ClusterGetClusterParams { + o.SetMetadataName(metadataName) + return o +} + +// SetMetadataName adds the metadataName to the cluster get cluster params +func (o *ClusterGetClusterParams) SetMetadataName(metadataName string) { + o.MetadataName = metadataName +} + +// WithMetadataOrganization adds the metadataOrganization to the cluster get cluster params +func (o *ClusterGetClusterParams) WithMetadataOrganization(metadataOrganization *string) *ClusterGetClusterParams { + o.SetMetadataOrganization(metadataOrganization) + return o +} + +// SetMetadataOrganization adds the metadataOrganization to the cluster get cluster params +func (o *ClusterGetClusterParams) SetMetadataOrganization(metadataOrganization *string) { + o.MetadataOrganization = metadataOrganization +} + +// WithMetadataPartner adds the metadataPartner to the cluster get cluster params +func (o *ClusterGetClusterParams) WithMetadataPartner(metadataPartner *string) *ClusterGetClusterParams { + o.SetMetadataPartner(metadataPartner) + return o +} + +// SetMetadataPartner adds the metadataPartner to the cluster get cluster params +func (o *ClusterGetClusterParams) SetMetadataPartner(metadataPartner *string) { + o.MetadataPartner = metadataPartner +} + +// WithMetadataProject adds the metadataProject to the cluster get cluster params +func (o *ClusterGetClusterParams) WithMetadataProject(metadataProject string) *ClusterGetClusterParams { + o.SetMetadataProject(metadataProject) + return o +} + +// SetMetadataProject adds the metadataProject to the cluster get cluster params +func (o *ClusterGetClusterParams) SetMetadataProject(metadataProject string) { + o.MetadataProject = metadataProject +} + +// WithSpecClusterDataArecord adds the specClusterDataArecord to the cluster get cluster params +func (o *ClusterGetClusterParams) WithSpecClusterDataArecord(specClusterDataArecord *string) *ClusterGetClusterParams { + o.SetSpecClusterDataArecord(specClusterDataArecord) + return o +} + +// SetSpecClusterDataArecord adds the specClusterDataArecord to the cluster get cluster params +func (o *ClusterGetClusterParams) SetSpecClusterDataArecord(specClusterDataArecord *string) { + o.SpecClusterDataArecord = specClusterDataArecord +} + +// WithSpecClusterDataClusterBlueprint adds the specClusterDataClusterBlueprint to the cluster get cluster params +func (o *ClusterGetClusterParams) WithSpecClusterDataClusterBlueprint(specClusterDataClusterBlueprint *string) *ClusterGetClusterParams { + o.SetSpecClusterDataClusterBlueprint(specClusterDataClusterBlueprint) + return o +} + +// SetSpecClusterDataClusterBlueprint adds the specClusterDataClusterBlueprint to the cluster get cluster params +func (o *ClusterGetClusterParams) SetSpecClusterDataClusterBlueprint(specClusterDataClusterBlueprint *string) { + o.SpecClusterDataClusterBlueprint = specClusterDataClusterBlueprint +} + +// WithSpecClusterDataClusterStatusAuxiliaryTaskCount adds the specClusterDataClusterStatusAuxiliaryTaskCount to the cluster get cluster params +func (o *ClusterGetClusterParams) WithSpecClusterDataClusterStatusAuxiliaryTaskCount(specClusterDataClusterStatusAuxiliaryTaskCount *string) *ClusterGetClusterParams { + o.SetSpecClusterDataClusterStatusAuxiliaryTaskCount(specClusterDataClusterStatusAuxiliaryTaskCount) + return o +} + +// SetSpecClusterDataClusterStatusAuxiliaryTaskCount adds the specClusterDataClusterStatusAuxiliaryTaskCount to the cluster get cluster params +func (o *ClusterGetClusterParams) SetSpecClusterDataClusterStatusAuxiliaryTaskCount(specClusterDataClusterStatusAuxiliaryTaskCount *string) { + o.SpecClusterDataClusterStatusAuxiliaryTaskCount = specClusterDataClusterStatusAuxiliaryTaskCount +} + +// WithSpecClusterDataClusterStatusCustomTaskCount adds the specClusterDataClusterStatusCustomTaskCount to the cluster get cluster params +func (o *ClusterGetClusterParams) WithSpecClusterDataClusterStatusCustomTaskCount(specClusterDataClusterStatusCustomTaskCount *string) *ClusterGetClusterParams { + o.SetSpecClusterDataClusterStatusCustomTaskCount(specClusterDataClusterStatusCustomTaskCount) + return o +} + +// SetSpecClusterDataClusterStatusCustomTaskCount adds the specClusterDataClusterStatusCustomTaskCount to the cluster get cluster params +func (o *ClusterGetClusterParams) SetSpecClusterDataClusterStatusCustomTaskCount(specClusterDataClusterStatusCustomTaskCount *string) { + o.SpecClusterDataClusterStatusCustomTaskCount = specClusterDataClusterStatusCustomTaskCount +} + +// WithSpecClusterDataClusterStatusPublishedBlueprint adds the specClusterDataClusterStatusPublishedBlueprint to the cluster get cluster params +func (o *ClusterGetClusterParams) WithSpecClusterDataClusterStatusPublishedBlueprint(specClusterDataClusterStatusPublishedBlueprint *string) *ClusterGetClusterParams { + o.SetSpecClusterDataClusterStatusPublishedBlueprint(specClusterDataClusterStatusPublishedBlueprint) + return o +} + +// SetSpecClusterDataClusterStatusPublishedBlueprint adds the specClusterDataClusterStatusPublishedBlueprint to the cluster get cluster params +func (o *ClusterGetClusterParams) SetSpecClusterDataClusterStatusPublishedBlueprint(specClusterDataClusterStatusPublishedBlueprint *string) { + o.SpecClusterDataClusterStatusPublishedBlueprint = specClusterDataClusterStatusPublishedBlueprint +} + +// WithSpecClusterDataClusterStatusSystemTaskCount adds the specClusterDataClusterStatusSystemTaskCount to the cluster get cluster params +func (o *ClusterGetClusterParams) WithSpecClusterDataClusterStatusSystemTaskCount(specClusterDataClusterStatusSystemTaskCount *string) *ClusterGetClusterParams { + o.SetSpecClusterDataClusterStatusSystemTaskCount(specClusterDataClusterStatusSystemTaskCount) + return o +} + +// SetSpecClusterDataClusterStatusSystemTaskCount adds the specClusterDataClusterStatusSystemTaskCount to the cluster get cluster params +func (o *ClusterGetClusterParams) SetSpecClusterDataClusterStatusSystemTaskCount(specClusterDataClusterStatusSystemTaskCount *string) { + o.SpecClusterDataClusterStatusSystemTaskCount = specClusterDataClusterStatusSystemTaskCount +} + +// WithSpecClusterDataClusterStatusToken adds the specClusterDataClusterStatusToken to the cluster get cluster params +func (o *ClusterGetClusterParams) WithSpecClusterDataClusterStatusToken(specClusterDataClusterStatusToken *string) *ClusterGetClusterParams { + o.SetSpecClusterDataClusterStatusToken(specClusterDataClusterStatusToken) + return o +} + +// SetSpecClusterDataClusterStatusToken adds the specClusterDataClusterStatusToken to the cluster get cluster params +func (o *ClusterGetClusterParams) SetSpecClusterDataClusterStatusToken(specClusterDataClusterStatusToken *string) { + o.SpecClusterDataClusterStatusToken = specClusterDataClusterStatusToken +} + +// WithSpecClusterDataCname adds the specClusterDataCname to the cluster get cluster params +func (o *ClusterGetClusterParams) WithSpecClusterDataCname(specClusterDataCname *string) *ClusterGetClusterParams { + o.SetSpecClusterDataCname(specClusterDataCname) + return o +} + +// SetSpecClusterDataCname adds the specClusterDataCname to the cluster get cluster params +func (o *ClusterGetClusterParams) SetSpecClusterDataCname(specClusterDataCname *string) { + o.SpecClusterDataCname = specClusterDataCname +} + +// WithSpecClusterDataDisplayName adds the specClusterDataDisplayName to the cluster get cluster params +func (o *ClusterGetClusterParams) WithSpecClusterDataDisplayName(specClusterDataDisplayName *string) *ClusterGetClusterParams { + o.SetSpecClusterDataDisplayName(specClusterDataDisplayName) + return o +} + +// SetSpecClusterDataDisplayName adds the specClusterDataDisplayName to the cluster get cluster params +func (o *ClusterGetClusterParams) SetSpecClusterDataDisplayName(specClusterDataDisplayName *string) { + o.SpecClusterDataDisplayName = specClusterDataDisplayName +} + +// WithSpecClusterDataHealth adds the specClusterDataHealth to the cluster get cluster params +func (o *ClusterGetClusterParams) WithSpecClusterDataHealth(specClusterDataHealth *string) *ClusterGetClusterParams { + o.SetSpecClusterDataHealth(specClusterDataHealth) + return o +} + +// SetSpecClusterDataHealth adds the specClusterDataHealth to the cluster get cluster params +func (o *ClusterGetClusterParams) SetSpecClusterDataHealth(specClusterDataHealth *string) { + o.SpecClusterDataHealth = specClusterDataHealth +} + +// WithSpecClusterDataManufacturer adds the specClusterDataManufacturer to the cluster get cluster params +func (o *ClusterGetClusterParams) WithSpecClusterDataManufacturer(specClusterDataManufacturer *string) *ClusterGetClusterParams { + o.SetSpecClusterDataManufacturer(specClusterDataManufacturer) + return o +} + +// SetSpecClusterDataManufacturer adds the specClusterDataManufacturer to the cluster get cluster params +func (o *ClusterGetClusterParams) SetSpecClusterDataManufacturer(specClusterDataManufacturer *string) { + o.SpecClusterDataManufacturer = specClusterDataManufacturer +} + +// WithSpecClusterDataPassphrase adds the specClusterDataPassphrase to the cluster get cluster params +func (o *ClusterGetClusterParams) WithSpecClusterDataPassphrase(specClusterDataPassphrase *string) *ClusterGetClusterParams { + o.SetSpecClusterDataPassphrase(specClusterDataPassphrase) + return o +} + +// SetSpecClusterDataPassphrase adds the specClusterDataPassphrase to the cluster get cluster params +func (o *ClusterGetClusterParams) SetSpecClusterDataPassphrase(specClusterDataPassphrase *string) { + o.SpecClusterDataPassphrase = specClusterDataPassphrase +} + +// WithSpecClusterDataProvider adds the specClusterDataProvider to the cluster get cluster params +func (o *ClusterGetClusterParams) WithSpecClusterDataProvider(specClusterDataProvider *string) *ClusterGetClusterParams { + o.SetSpecClusterDataProvider(specClusterDataProvider) + return o +} + +// SetSpecClusterDataProvider adds the specClusterDataProvider to the cluster get cluster params +func (o *ClusterGetClusterParams) SetSpecClusterDataProvider(specClusterDataProvider *string) { + o.SpecClusterDataProvider = specClusterDataProvider +} + +// WithSpecClusterType adds the specClusterType to the cluster get cluster params +func (o *ClusterGetClusterParams) WithSpecClusterType(specClusterType *string) *ClusterGetClusterParams { + o.SetSpecClusterType(specClusterType) + return o +} + +// SetSpecClusterType adds the specClusterType to the cluster get cluster params +func (o *ClusterGetClusterParams) SetSpecClusterType(specClusterType *string) { + o.SpecClusterType = specClusterType +} + +// WithSpecMetroCity adds the specMetroCity to the cluster get cluster params +func (o *ClusterGetClusterParams) WithSpecMetroCity(specMetroCity *string) *ClusterGetClusterParams { + o.SetSpecMetroCity(specMetroCity) + return o +} + +// SetSpecMetroCity adds the specMetroCity to the cluster get cluster params +func (o *ClusterGetClusterParams) SetSpecMetroCity(specMetroCity *string) { + o.SpecMetroCity = specMetroCity +} + +// WithSpecMetroCountry adds the specMetroCountry to the cluster get cluster params +func (o *ClusterGetClusterParams) WithSpecMetroCountry(specMetroCountry *string) *ClusterGetClusterParams { + o.SetSpecMetroCountry(specMetroCountry) + return o +} + +// SetSpecMetroCountry adds the specMetroCountry to the cluster get cluster params +func (o *ClusterGetClusterParams) SetSpecMetroCountry(specMetroCountry *string) { + o.SpecMetroCountry = specMetroCountry +} + +// WithSpecMetroCountryCode adds the specMetroCountryCode to the cluster get cluster params +func (o *ClusterGetClusterParams) WithSpecMetroCountryCode(specMetroCountryCode *string) *ClusterGetClusterParams { + o.SetSpecMetroCountryCode(specMetroCountryCode) + return o +} + +// SetSpecMetroCountryCode adds the specMetroCountryCode to the cluster get cluster params +func (o *ClusterGetClusterParams) SetSpecMetroCountryCode(specMetroCountryCode *string) { + o.SpecMetroCountryCode = specMetroCountryCode +} + +// WithSpecMetroID adds the specMetroID to the cluster get cluster params +func (o *ClusterGetClusterParams) WithSpecMetroID(specMetroID *string) *ClusterGetClusterParams { + o.SetSpecMetroID(specMetroID) + return o +} + +// SetSpecMetroID adds the specMetroId to the cluster get cluster params +func (o *ClusterGetClusterParams) SetSpecMetroID(specMetroID *string) { + o.SpecMetroID = specMetroID +} + +// WithSpecMetroLatitude adds the specMetroLatitude to the cluster get cluster params +func (o *ClusterGetClusterParams) WithSpecMetroLatitude(specMetroLatitude *string) *ClusterGetClusterParams { + o.SetSpecMetroLatitude(specMetroLatitude) + return o +} + +// SetSpecMetroLatitude adds the specMetroLatitude to the cluster get cluster params +func (o *ClusterGetClusterParams) SetSpecMetroLatitude(specMetroLatitude *string) { + o.SpecMetroLatitude = specMetroLatitude +} + +// WithSpecMetroLocale adds the specMetroLocale to the cluster get cluster params +func (o *ClusterGetClusterParams) WithSpecMetroLocale(specMetroLocale *string) *ClusterGetClusterParams { + o.SetSpecMetroLocale(specMetroLocale) + return o +} + +// SetSpecMetroLocale adds the specMetroLocale to the cluster get cluster params +func (o *ClusterGetClusterParams) SetSpecMetroLocale(specMetroLocale *string) { + o.SpecMetroLocale = specMetroLocale +} + +// WithSpecMetroLongitude adds the specMetroLongitude to the cluster get cluster params +func (o *ClusterGetClusterParams) WithSpecMetroLongitude(specMetroLongitude *string) *ClusterGetClusterParams { + o.SetSpecMetroLongitude(specMetroLongitude) + return o +} + +// SetSpecMetroLongitude adds the specMetroLongitude to the cluster get cluster params +func (o *ClusterGetClusterParams) SetSpecMetroLongitude(specMetroLongitude *string) { + o.SpecMetroLongitude = specMetroLongitude +} + +// WithSpecMetroName adds the specMetroName to the cluster get cluster params +func (o *ClusterGetClusterParams) WithSpecMetroName(specMetroName *string) *ClusterGetClusterParams { + o.SetSpecMetroName(specMetroName) + return o +} + +// SetSpecMetroName adds the specMetroName to the cluster get cluster params +func (o *ClusterGetClusterParams) SetSpecMetroName(specMetroName *string) { + o.SpecMetroName = specMetroName +} + +// WithSpecMetroState adds the specMetroState to the cluster get cluster params +func (o *ClusterGetClusterParams) WithSpecMetroState(specMetroState *string) *ClusterGetClusterParams { + o.SetSpecMetroState(specMetroState) + return o +} + +// SetSpecMetroState adds the specMetroState to the cluster get cluster params +func (o *ClusterGetClusterParams) SetSpecMetroState(specMetroState *string) { + o.SpecMetroState = specMetroState +} + +// WithSpecMetroStateCode adds the specMetroStateCode to the cluster get cluster params +func (o *ClusterGetClusterParams) WithSpecMetroStateCode(specMetroStateCode *string) *ClusterGetClusterParams { + o.SetSpecMetroStateCode(specMetroStateCode) + return o +} + +// SetSpecMetroStateCode adds the specMetroStateCode to the cluster get cluster params +func (o *ClusterGetClusterParams) SetSpecMetroStateCode(specMetroStateCode *string) { + o.SpecMetroStateCode = specMetroStateCode +} + +// WithSpecOverrideSelector adds the specOverrideSelector to the cluster get cluster params +func (o *ClusterGetClusterParams) WithSpecOverrideSelector(specOverrideSelector *string) *ClusterGetClusterParams { + o.SetSpecOverrideSelector(specOverrideSelector) + return o +} + +// SetSpecOverrideSelector adds the specOverrideSelector to the cluster get cluster params +func (o *ClusterGetClusterParams) SetSpecOverrideSelector(specOverrideSelector *string) { + o.SpecOverrideSelector = specOverrideSelector +} + +// WithSpecParamsEnvironmentProvider adds the specParamsEnvironmentProvider to the cluster get cluster params +func (o *ClusterGetClusterParams) WithSpecParamsEnvironmentProvider(specParamsEnvironmentProvider *string) *ClusterGetClusterParams { + o.SetSpecParamsEnvironmentProvider(specParamsEnvironmentProvider) + return o +} + +// SetSpecParamsEnvironmentProvider adds the specParamsEnvironmentProvider to the cluster get cluster params +func (o *ClusterGetClusterParams) SetSpecParamsEnvironmentProvider(specParamsEnvironmentProvider *string) { + o.SpecParamsEnvironmentProvider = specParamsEnvironmentProvider +} + +// WithSpecParamsKubernetesProvider adds the specParamsKubernetesProvider to the cluster get cluster params +func (o *ClusterGetClusterParams) WithSpecParamsKubernetesProvider(specParamsKubernetesProvider *string) *ClusterGetClusterParams { + o.SetSpecParamsKubernetesProvider(specParamsKubernetesProvider) + return o +} + +// SetSpecParamsKubernetesProvider adds the specParamsKubernetesProvider to the cluster get cluster params +func (o *ClusterGetClusterParams) SetSpecParamsKubernetesProvider(specParamsKubernetesProvider *string) { + o.SpecParamsKubernetesProvider = specParamsKubernetesProvider +} + +// WithSpecParamsProvisionEnvironment adds the specParamsProvisionEnvironment to the cluster get cluster params +func (o *ClusterGetClusterParams) WithSpecParamsProvisionEnvironment(specParamsProvisionEnvironment *string) *ClusterGetClusterParams { + o.SetSpecParamsProvisionEnvironment(specParamsProvisionEnvironment) + return o +} + +// SetSpecParamsProvisionEnvironment adds the specParamsProvisionEnvironment to the cluster get cluster params +func (o *ClusterGetClusterParams) SetSpecParamsProvisionEnvironment(specParamsProvisionEnvironment *string) { + o.SpecParamsProvisionEnvironment = specParamsProvisionEnvironment +} + +// WithSpecParamsProvisionPackageType adds the specParamsProvisionPackageType to the cluster get cluster params +func (o *ClusterGetClusterParams) WithSpecParamsProvisionPackageType(specParamsProvisionPackageType *string) *ClusterGetClusterParams { + o.SetSpecParamsProvisionPackageType(specParamsProvisionPackageType) + return o +} + +// SetSpecParamsProvisionPackageType adds the specParamsProvisionPackageType to the cluster get cluster params +func (o *ClusterGetClusterParams) SetSpecParamsProvisionPackageType(specParamsProvisionPackageType *string) { + o.SpecParamsProvisionPackageType = specParamsProvisionPackageType +} + +// WithSpecParamsProvisionType adds the specParamsProvisionType to the cluster get cluster params +func (o *ClusterGetClusterParams) WithSpecParamsProvisionType(specParamsProvisionType *string) *ClusterGetClusterParams { + o.SetSpecParamsProvisionType(specParamsProvisionType) + return o +} + +// SetSpecParamsProvisionType adds the specParamsProvisionType to the cluster get cluster params +func (o *ClusterGetClusterParams) SetSpecParamsProvisionType(specParamsProvisionType *string) { + o.SpecParamsProvisionType = specParamsProvisionType +} + +// WithSpecParamsState adds the specParamsState to the cluster get cluster params +func (o *ClusterGetClusterParams) WithSpecParamsState(specParamsState *string) *ClusterGetClusterParams { + o.SetSpecParamsState(specParamsState) + return o +} + +// SetSpecParamsState adds the specParamsState to the cluster get cluster params +func (o *ClusterGetClusterParams) SetSpecParamsState(specParamsState *string) { + o.SpecParamsState = specParamsState +} + +// WithSpecProxyConfigAllowInsecureBootstrap adds the specProxyConfigAllowInsecureBootstrap to the cluster get cluster params +func (o *ClusterGetClusterParams) WithSpecProxyConfigAllowInsecureBootstrap(specProxyConfigAllowInsecureBootstrap *bool) *ClusterGetClusterParams { + o.SetSpecProxyConfigAllowInsecureBootstrap(specProxyConfigAllowInsecureBootstrap) + return o +} + +// SetSpecProxyConfigAllowInsecureBootstrap adds the specProxyConfigAllowInsecureBootstrap to the cluster get cluster params +func (o *ClusterGetClusterParams) SetSpecProxyConfigAllowInsecureBootstrap(specProxyConfigAllowInsecureBootstrap *bool) { + o.SpecProxyConfigAllowInsecureBootstrap = specProxyConfigAllowInsecureBootstrap +} + +// WithSpecProxyConfigBootstrapCA adds the specProxyConfigBootstrapCA to the cluster get cluster params +func (o *ClusterGetClusterParams) WithSpecProxyConfigBootstrapCA(specProxyConfigBootstrapCA *string) *ClusterGetClusterParams { + o.SetSpecProxyConfigBootstrapCA(specProxyConfigBootstrapCA) + return o +} + +// SetSpecProxyConfigBootstrapCA adds the specProxyConfigBootstrapCA to the cluster get cluster params +func (o *ClusterGetClusterParams) SetSpecProxyConfigBootstrapCA(specProxyConfigBootstrapCA *string) { + o.SpecProxyConfigBootstrapCA = specProxyConfigBootstrapCA +} + +// WithSpecProxyConfigEnabled adds the specProxyConfigEnabled to the cluster get cluster params +func (o *ClusterGetClusterParams) WithSpecProxyConfigEnabled(specProxyConfigEnabled *bool) *ClusterGetClusterParams { + o.SetSpecProxyConfigEnabled(specProxyConfigEnabled) + return o +} + +// SetSpecProxyConfigEnabled adds the specProxyConfigEnabled to the cluster get cluster params +func (o *ClusterGetClusterParams) SetSpecProxyConfigEnabled(specProxyConfigEnabled *bool) { + o.SpecProxyConfigEnabled = specProxyConfigEnabled +} + +// WithSpecProxyConfigHTTPProxy adds the specProxyConfigHTTPProxy to the cluster get cluster params +func (o *ClusterGetClusterParams) WithSpecProxyConfigHTTPProxy(specProxyConfigHTTPProxy *string) *ClusterGetClusterParams { + o.SetSpecProxyConfigHTTPProxy(specProxyConfigHTTPProxy) + return o +} + +// SetSpecProxyConfigHTTPProxy adds the specProxyConfigHttpProxy to the cluster get cluster params +func (o *ClusterGetClusterParams) SetSpecProxyConfigHTTPProxy(specProxyConfigHTTPProxy *string) { + o.SpecProxyConfigHTTPProxy = specProxyConfigHTTPProxy +} + +// WithSpecProxyConfigHTTPSProxy adds the specProxyConfigHTTPSProxy to the cluster get cluster params +func (o *ClusterGetClusterParams) WithSpecProxyConfigHTTPSProxy(specProxyConfigHTTPSProxy *string) *ClusterGetClusterParams { + o.SetSpecProxyConfigHTTPSProxy(specProxyConfigHTTPSProxy) + return o +} + +// SetSpecProxyConfigHTTPSProxy adds the specProxyConfigHttpsProxy to the cluster get cluster params +func (o *ClusterGetClusterParams) SetSpecProxyConfigHTTPSProxy(specProxyConfigHTTPSProxy *string) { + o.SpecProxyConfigHTTPSProxy = specProxyConfigHTTPSProxy +} + +// WithSpecProxyConfigNoProxy adds the specProxyConfigNoProxy to the cluster get cluster params +func (o *ClusterGetClusterParams) WithSpecProxyConfigNoProxy(specProxyConfigNoProxy *string) *ClusterGetClusterParams { + o.SetSpecProxyConfigNoProxy(specProxyConfigNoProxy) + return o +} + +// SetSpecProxyConfigNoProxy adds the specProxyConfigNoProxy to the cluster get cluster params +func (o *ClusterGetClusterParams) SetSpecProxyConfigNoProxy(specProxyConfigNoProxy *string) { + o.SpecProxyConfigNoProxy = specProxyConfigNoProxy +} + +// WithSpecProxyConfigProxyAuth adds the specProxyConfigProxyAuth to the cluster get cluster params +func (o *ClusterGetClusterParams) WithSpecProxyConfigProxyAuth(specProxyConfigProxyAuth *string) *ClusterGetClusterParams { + o.SetSpecProxyConfigProxyAuth(specProxyConfigProxyAuth) + return o +} + +// SetSpecProxyConfigProxyAuth adds the specProxyConfigProxyAuth to the cluster get cluster params +func (o *ClusterGetClusterParams) SetSpecProxyConfigProxyAuth(specProxyConfigProxyAuth *string) { + o.SpecProxyConfigProxyAuth = specProxyConfigProxyAuth +} + +// WithSpecShareMode adds the specShareMode to the cluster get cluster params +func (o *ClusterGetClusterParams) WithSpecShareMode(specShareMode *string) *ClusterGetClusterParams { + o.SetSpecShareMode(specShareMode) + return o +} + +// SetSpecShareMode adds the specShareMode to the cluster get cluster params +func (o *ClusterGetClusterParams) SetSpecShareMode(specShareMode *string) { + o.SpecShareMode = specShareMode +} + +// WithStatusConditionStatus adds the statusConditionStatus to the cluster get cluster params +func (o *ClusterGetClusterParams) WithStatusConditionStatus(statusConditionStatus *string) *ClusterGetClusterParams { + o.SetStatusConditionStatus(statusConditionStatus) + return o +} + +// SetStatusConditionStatus adds the statusConditionStatus to the cluster get cluster params +func (o *ClusterGetClusterParams) SetStatusConditionStatus(statusConditionStatus *string) { + o.StatusConditionStatus = statusConditionStatus +} + +// WithStatusConditionType adds the statusConditionType to the cluster get cluster params +func (o *ClusterGetClusterParams) WithStatusConditionType(statusConditionType *string) *ClusterGetClusterParams { + o.SetStatusConditionType(statusConditionType) + return o +} + +// SetStatusConditionType adds the statusConditionType to the cluster get cluster params +func (o *ClusterGetClusterParams) SetStatusConditionType(statusConditionType *string) { + o.StatusConditionType = statusConditionType +} + +// WithStatusLastUpdated adds the statusLastUpdated to the cluster get cluster params +func (o *ClusterGetClusterParams) WithStatusLastUpdated(statusLastUpdated *strfmt.DateTime) *ClusterGetClusterParams { + o.SetStatusLastUpdated(statusLastUpdated) + return o +} + +// SetStatusLastUpdated adds the statusLastUpdated to the cluster get cluster params +func (o *ClusterGetClusterParams) SetStatusLastUpdated(statusLastUpdated *strfmt.DateTime) { + o.StatusLastUpdated = statusLastUpdated +} + +// WithStatusReason adds the statusReason to the cluster get cluster params +func (o *ClusterGetClusterParams) WithStatusReason(statusReason *string) *ClusterGetClusterParams { + o.SetStatusReason(statusReason) + return o +} + +// SetStatusReason adds the statusReason to the cluster get cluster params +func (o *ClusterGetClusterParams) SetStatusReason(statusReason *string) { + o.StatusReason = statusReason +} + +// WriteToRequest writes these params to a swagger request +func (o *ClusterGetClusterParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.APIVersion != nil { + + // query param apiVersion + var qrAPIVersion string + + if o.APIVersion != nil { + qrAPIVersion = *o.APIVersion + } + qAPIVersion := qrAPIVersion + if qAPIVersion != "" { + + if err := r.SetQueryParam("apiVersion", qAPIVersion); err != nil { + return err + } + } + } + + if o.Kind != nil { + + // query param kind + var qrKind string + + if o.Kind != nil { + qrKind = *o.Kind + } + qKind := qrKind + if qKind != "" { + + if err := r.SetQueryParam("kind", qKind); err != nil { + return err + } + } + } + + if o.MetadataDescription != nil { + + // query param metadata.description + var qrMetadataDescription string + + if o.MetadataDescription != nil { + qrMetadataDescription = *o.MetadataDescription + } + qMetadataDescription := qrMetadataDescription + if qMetadataDescription != "" { + + if err := r.SetQueryParam("metadata.description", qMetadataDescription); err != nil { + return err + } + } + } + + if o.MetadataID != nil { + + // query param metadata.id + var qrMetadataID string + + if o.MetadataID != nil { + qrMetadataID = *o.MetadataID + } + qMetadataID := qrMetadataID + if qMetadataID != "" { + + if err := r.SetQueryParam("metadata.id", qMetadataID); err != nil { + return err + } + } + } + + if o.MetadataModifiedAt != nil { + + // query param metadata.modifiedAt + var qrMetadataModifiedAt strfmt.DateTime + + if o.MetadataModifiedAt != nil { + qrMetadataModifiedAt = *o.MetadataModifiedAt + } + qMetadataModifiedAt := qrMetadataModifiedAt.String() + if qMetadataModifiedAt != "" { + + if err := r.SetQueryParam("metadata.modifiedAt", qMetadataModifiedAt); err != nil { + return err + } + } + } + + // path param metadata.name + if err := r.SetPathParam("metadata.name", o.MetadataName); err != nil { + return err + } + + if o.MetadataOrganization != nil { + + // query param metadata.organization + var qrMetadataOrganization string + + if o.MetadataOrganization != nil { + qrMetadataOrganization = *o.MetadataOrganization + } + qMetadataOrganization := qrMetadataOrganization + if qMetadataOrganization != "" { + + if err := r.SetQueryParam("metadata.organization", qMetadataOrganization); err != nil { + return err + } + } + } + + if o.MetadataPartner != nil { + + // query param metadata.partner + var qrMetadataPartner string + + if o.MetadataPartner != nil { + qrMetadataPartner = *o.MetadataPartner + } + qMetadataPartner := qrMetadataPartner + if qMetadataPartner != "" { + + if err := r.SetQueryParam("metadata.partner", qMetadataPartner); err != nil { + return err + } + } + } + + // path param metadata.project + if err := r.SetPathParam("metadata.project", o.MetadataProject); err != nil { + return err + } + + if o.SpecClusterDataArecord != nil { + + // query param spec.clusterData.arecord + var qrSpecClusterDataArecord string + + if o.SpecClusterDataArecord != nil { + qrSpecClusterDataArecord = *o.SpecClusterDataArecord + } + qSpecClusterDataArecord := qrSpecClusterDataArecord + if qSpecClusterDataArecord != "" { + + if err := r.SetQueryParam("spec.clusterData.arecord", qSpecClusterDataArecord); err != nil { + return err + } + } + } + + if o.SpecClusterDataClusterBlueprint != nil { + + // query param spec.clusterData.clusterBlueprint + var qrSpecClusterDataClusterBlueprint string + + if o.SpecClusterDataClusterBlueprint != nil { + qrSpecClusterDataClusterBlueprint = *o.SpecClusterDataClusterBlueprint + } + qSpecClusterDataClusterBlueprint := qrSpecClusterDataClusterBlueprint + if qSpecClusterDataClusterBlueprint != "" { + + if err := r.SetQueryParam("spec.clusterData.clusterBlueprint", qSpecClusterDataClusterBlueprint); err != nil { + return err + } + } + } + + if o.SpecClusterDataClusterStatusAuxiliaryTaskCount != nil { + + // query param spec.clusterData.clusterStatus.auxiliaryTaskCount + var qrSpecClusterDataClusterStatusAuxiliaryTaskCount string + + if o.SpecClusterDataClusterStatusAuxiliaryTaskCount != nil { + qrSpecClusterDataClusterStatusAuxiliaryTaskCount = *o.SpecClusterDataClusterStatusAuxiliaryTaskCount + } + qSpecClusterDataClusterStatusAuxiliaryTaskCount := qrSpecClusterDataClusterStatusAuxiliaryTaskCount + if qSpecClusterDataClusterStatusAuxiliaryTaskCount != "" { + + if err := r.SetQueryParam("spec.clusterData.clusterStatus.auxiliaryTaskCount", qSpecClusterDataClusterStatusAuxiliaryTaskCount); err != nil { + return err + } + } + } + + if o.SpecClusterDataClusterStatusCustomTaskCount != nil { + + // query param spec.clusterData.clusterStatus.customTaskCount + var qrSpecClusterDataClusterStatusCustomTaskCount string + + if o.SpecClusterDataClusterStatusCustomTaskCount != nil { + qrSpecClusterDataClusterStatusCustomTaskCount = *o.SpecClusterDataClusterStatusCustomTaskCount + } + qSpecClusterDataClusterStatusCustomTaskCount := qrSpecClusterDataClusterStatusCustomTaskCount + if qSpecClusterDataClusterStatusCustomTaskCount != "" { + + if err := r.SetQueryParam("spec.clusterData.clusterStatus.customTaskCount", qSpecClusterDataClusterStatusCustomTaskCount); err != nil { + return err + } + } + } + + if o.SpecClusterDataClusterStatusPublishedBlueprint != nil { + + // query param spec.clusterData.clusterStatus.publishedBlueprint + var qrSpecClusterDataClusterStatusPublishedBlueprint string + + if o.SpecClusterDataClusterStatusPublishedBlueprint != nil { + qrSpecClusterDataClusterStatusPublishedBlueprint = *o.SpecClusterDataClusterStatusPublishedBlueprint + } + qSpecClusterDataClusterStatusPublishedBlueprint := qrSpecClusterDataClusterStatusPublishedBlueprint + if qSpecClusterDataClusterStatusPublishedBlueprint != "" { + + if err := r.SetQueryParam("spec.clusterData.clusterStatus.publishedBlueprint", qSpecClusterDataClusterStatusPublishedBlueprint); err != nil { + return err + } + } + } + + if o.SpecClusterDataClusterStatusSystemTaskCount != nil { + + // query param spec.clusterData.clusterStatus.systemTaskCount + var qrSpecClusterDataClusterStatusSystemTaskCount string + + if o.SpecClusterDataClusterStatusSystemTaskCount != nil { + qrSpecClusterDataClusterStatusSystemTaskCount = *o.SpecClusterDataClusterStatusSystemTaskCount + } + qSpecClusterDataClusterStatusSystemTaskCount := qrSpecClusterDataClusterStatusSystemTaskCount + if qSpecClusterDataClusterStatusSystemTaskCount != "" { + + if err := r.SetQueryParam("spec.clusterData.clusterStatus.systemTaskCount", qSpecClusterDataClusterStatusSystemTaskCount); err != nil { + return err + } + } + } + + if o.SpecClusterDataClusterStatusToken != nil { + + // query param spec.clusterData.clusterStatus.token + var qrSpecClusterDataClusterStatusToken string + + if o.SpecClusterDataClusterStatusToken != nil { + qrSpecClusterDataClusterStatusToken = *o.SpecClusterDataClusterStatusToken + } + qSpecClusterDataClusterStatusToken := qrSpecClusterDataClusterStatusToken + if qSpecClusterDataClusterStatusToken != "" { + + if err := r.SetQueryParam("spec.clusterData.clusterStatus.token", qSpecClusterDataClusterStatusToken); err != nil { + return err + } + } + } + + if o.SpecClusterDataCname != nil { + + // query param spec.clusterData.cname + var qrSpecClusterDataCname string + + if o.SpecClusterDataCname != nil { + qrSpecClusterDataCname = *o.SpecClusterDataCname + } + qSpecClusterDataCname := qrSpecClusterDataCname + if qSpecClusterDataCname != "" { + + if err := r.SetQueryParam("spec.clusterData.cname", qSpecClusterDataCname); err != nil { + return err + } + } + } + + if o.SpecClusterDataDisplayName != nil { + + // query param spec.clusterData.displayName + var qrSpecClusterDataDisplayName string + + if o.SpecClusterDataDisplayName != nil { + qrSpecClusterDataDisplayName = *o.SpecClusterDataDisplayName + } + qSpecClusterDataDisplayName := qrSpecClusterDataDisplayName + if qSpecClusterDataDisplayName != "" { + + if err := r.SetQueryParam("spec.clusterData.displayName", qSpecClusterDataDisplayName); err != nil { + return err + } + } + } + + if o.SpecClusterDataHealth != nil { + + // query param spec.clusterData.health + var qrSpecClusterDataHealth string + + if o.SpecClusterDataHealth != nil { + qrSpecClusterDataHealth = *o.SpecClusterDataHealth + } + qSpecClusterDataHealth := qrSpecClusterDataHealth + if qSpecClusterDataHealth != "" { + + if err := r.SetQueryParam("spec.clusterData.health", qSpecClusterDataHealth); err != nil { + return err + } + } + } + + if o.SpecClusterDataManufacturer != nil { + + // query param spec.clusterData.manufacturer + var qrSpecClusterDataManufacturer string + + if o.SpecClusterDataManufacturer != nil { + qrSpecClusterDataManufacturer = *o.SpecClusterDataManufacturer + } + qSpecClusterDataManufacturer := qrSpecClusterDataManufacturer + if qSpecClusterDataManufacturer != "" { + + if err := r.SetQueryParam("spec.clusterData.manufacturer", qSpecClusterDataManufacturer); err != nil { + return err + } + } + } + + if o.SpecClusterDataPassphrase != nil { + + // query param spec.clusterData.passphrase + var qrSpecClusterDataPassphrase string + + if o.SpecClusterDataPassphrase != nil { + qrSpecClusterDataPassphrase = *o.SpecClusterDataPassphrase + } + qSpecClusterDataPassphrase := qrSpecClusterDataPassphrase + if qSpecClusterDataPassphrase != "" { + + if err := r.SetQueryParam("spec.clusterData.passphrase", qSpecClusterDataPassphrase); err != nil { + return err + } + } + } + + if o.SpecClusterDataProvider != nil { + + // query param spec.clusterData.provider + var qrSpecClusterDataProvider string + + if o.SpecClusterDataProvider != nil { + qrSpecClusterDataProvider = *o.SpecClusterDataProvider + } + qSpecClusterDataProvider := qrSpecClusterDataProvider + if qSpecClusterDataProvider != "" { + + if err := r.SetQueryParam("spec.clusterData.provider", qSpecClusterDataProvider); err != nil { + return err + } + } + } + + if o.SpecClusterType != nil { + + // query param spec.clusterType + var qrSpecClusterType string + + if o.SpecClusterType != nil { + qrSpecClusterType = *o.SpecClusterType + } + qSpecClusterType := qrSpecClusterType + if qSpecClusterType != "" { + + if err := r.SetQueryParam("spec.clusterType", qSpecClusterType); err != nil { + return err + } + } + } + + if o.SpecMetroCity != nil { + + // query param spec.metro.city + var qrSpecMetroCity string + + if o.SpecMetroCity != nil { + qrSpecMetroCity = *o.SpecMetroCity + } + qSpecMetroCity := qrSpecMetroCity + if qSpecMetroCity != "" { + + if err := r.SetQueryParam("spec.metro.city", qSpecMetroCity); err != nil { + return err + } + } + } + + if o.SpecMetroCountry != nil { + + // query param spec.metro.country + var qrSpecMetroCountry string + + if o.SpecMetroCountry != nil { + qrSpecMetroCountry = *o.SpecMetroCountry + } + qSpecMetroCountry := qrSpecMetroCountry + if qSpecMetroCountry != "" { + + if err := r.SetQueryParam("spec.metro.country", qSpecMetroCountry); err != nil { + return err + } + } + } + + if o.SpecMetroCountryCode != nil { + + // query param spec.metro.countryCode + var qrSpecMetroCountryCode string + + if o.SpecMetroCountryCode != nil { + qrSpecMetroCountryCode = *o.SpecMetroCountryCode + } + qSpecMetroCountryCode := qrSpecMetroCountryCode + if qSpecMetroCountryCode != "" { + + if err := r.SetQueryParam("spec.metro.countryCode", qSpecMetroCountryCode); err != nil { + return err + } + } + } + + if o.SpecMetroID != nil { + + // query param spec.metro.id + var qrSpecMetroID string + + if o.SpecMetroID != nil { + qrSpecMetroID = *o.SpecMetroID + } + qSpecMetroID := qrSpecMetroID + if qSpecMetroID != "" { + + if err := r.SetQueryParam("spec.metro.id", qSpecMetroID); err != nil { + return err + } + } + } + + if o.SpecMetroLatitude != nil { + + // query param spec.metro.latitude + var qrSpecMetroLatitude string + + if o.SpecMetroLatitude != nil { + qrSpecMetroLatitude = *o.SpecMetroLatitude + } + qSpecMetroLatitude := qrSpecMetroLatitude + if qSpecMetroLatitude != "" { + + if err := r.SetQueryParam("spec.metro.latitude", qSpecMetroLatitude); err != nil { + return err + } + } + } + + if o.SpecMetroLocale != nil { + + // query param spec.metro.locale + var qrSpecMetroLocale string + + if o.SpecMetroLocale != nil { + qrSpecMetroLocale = *o.SpecMetroLocale + } + qSpecMetroLocale := qrSpecMetroLocale + if qSpecMetroLocale != "" { + + if err := r.SetQueryParam("spec.metro.locale", qSpecMetroLocale); err != nil { + return err + } + } + } + + if o.SpecMetroLongitude != nil { + + // query param spec.metro.longitude + var qrSpecMetroLongitude string + + if o.SpecMetroLongitude != nil { + qrSpecMetroLongitude = *o.SpecMetroLongitude + } + qSpecMetroLongitude := qrSpecMetroLongitude + if qSpecMetroLongitude != "" { + + if err := r.SetQueryParam("spec.metro.longitude", qSpecMetroLongitude); err != nil { + return err + } + } + } + + if o.SpecMetroName != nil { + + // query param spec.metro.name + var qrSpecMetroName string + + if o.SpecMetroName != nil { + qrSpecMetroName = *o.SpecMetroName + } + qSpecMetroName := qrSpecMetroName + if qSpecMetroName != "" { + + if err := r.SetQueryParam("spec.metro.name", qSpecMetroName); err != nil { + return err + } + } + } + + if o.SpecMetroState != nil { + + // query param spec.metro.state + var qrSpecMetroState string + + if o.SpecMetroState != nil { + qrSpecMetroState = *o.SpecMetroState + } + qSpecMetroState := qrSpecMetroState + if qSpecMetroState != "" { + + if err := r.SetQueryParam("spec.metro.state", qSpecMetroState); err != nil { + return err + } + } + } + + if o.SpecMetroStateCode != nil { + + // query param spec.metro.stateCode + var qrSpecMetroStateCode string + + if o.SpecMetroStateCode != nil { + qrSpecMetroStateCode = *o.SpecMetroStateCode + } + qSpecMetroStateCode := qrSpecMetroStateCode + if qSpecMetroStateCode != "" { + + if err := r.SetQueryParam("spec.metro.stateCode", qSpecMetroStateCode); err != nil { + return err + } + } + } + + if o.SpecOverrideSelector != nil { + + // query param spec.overrideSelector + var qrSpecOverrideSelector string + + if o.SpecOverrideSelector != nil { + qrSpecOverrideSelector = *o.SpecOverrideSelector + } + qSpecOverrideSelector := qrSpecOverrideSelector + if qSpecOverrideSelector != "" { + + if err := r.SetQueryParam("spec.overrideSelector", qSpecOverrideSelector); err != nil { + return err + } + } + } + + if o.SpecParamsEnvironmentProvider != nil { + + // query param spec.params.environmentProvider + var qrSpecParamsEnvironmentProvider string + + if o.SpecParamsEnvironmentProvider != nil { + qrSpecParamsEnvironmentProvider = *o.SpecParamsEnvironmentProvider + } + qSpecParamsEnvironmentProvider := qrSpecParamsEnvironmentProvider + if qSpecParamsEnvironmentProvider != "" { + + if err := r.SetQueryParam("spec.params.environmentProvider", qSpecParamsEnvironmentProvider); err != nil { + return err + } + } + } + + if o.SpecParamsKubernetesProvider != nil { + + // query param spec.params.kubernetesProvider + var qrSpecParamsKubernetesProvider string + + if o.SpecParamsKubernetesProvider != nil { + qrSpecParamsKubernetesProvider = *o.SpecParamsKubernetesProvider + } + qSpecParamsKubernetesProvider := qrSpecParamsKubernetesProvider + if qSpecParamsKubernetesProvider != "" { + + if err := r.SetQueryParam("spec.params.kubernetesProvider", qSpecParamsKubernetesProvider); err != nil { + return err + } + } + } + + if o.SpecParamsProvisionEnvironment != nil { + + // query param spec.params.provisionEnvironment + var qrSpecParamsProvisionEnvironment string + + if o.SpecParamsProvisionEnvironment != nil { + qrSpecParamsProvisionEnvironment = *o.SpecParamsProvisionEnvironment + } + qSpecParamsProvisionEnvironment := qrSpecParamsProvisionEnvironment + if qSpecParamsProvisionEnvironment != "" { + + if err := r.SetQueryParam("spec.params.provisionEnvironment", qSpecParamsProvisionEnvironment); err != nil { + return err + } + } + } + + if o.SpecParamsProvisionPackageType != nil { + + // query param spec.params.provisionPackageType + var qrSpecParamsProvisionPackageType string + + if o.SpecParamsProvisionPackageType != nil { + qrSpecParamsProvisionPackageType = *o.SpecParamsProvisionPackageType + } + qSpecParamsProvisionPackageType := qrSpecParamsProvisionPackageType + if qSpecParamsProvisionPackageType != "" { + + if err := r.SetQueryParam("spec.params.provisionPackageType", qSpecParamsProvisionPackageType); err != nil { + return err + } + } + } + + if o.SpecParamsProvisionType != nil { + + // query param spec.params.provisionType + var qrSpecParamsProvisionType string + + if o.SpecParamsProvisionType != nil { + qrSpecParamsProvisionType = *o.SpecParamsProvisionType + } + qSpecParamsProvisionType := qrSpecParamsProvisionType + if qSpecParamsProvisionType != "" { + + if err := r.SetQueryParam("spec.params.provisionType", qSpecParamsProvisionType); err != nil { + return err + } + } + } + + if o.SpecParamsState != nil { + + // query param spec.params.state + var qrSpecParamsState string + + if o.SpecParamsState != nil { + qrSpecParamsState = *o.SpecParamsState + } + qSpecParamsState := qrSpecParamsState + if qSpecParamsState != "" { + + if err := r.SetQueryParam("spec.params.state", qSpecParamsState); err != nil { + return err + } + } + } + + if o.SpecProxyConfigAllowInsecureBootstrap != nil { + + // query param spec.proxyConfig.allowInsecureBootstrap + var qrSpecProxyConfigAllowInsecureBootstrap bool + + if o.SpecProxyConfigAllowInsecureBootstrap != nil { + qrSpecProxyConfigAllowInsecureBootstrap = *o.SpecProxyConfigAllowInsecureBootstrap + } + qSpecProxyConfigAllowInsecureBootstrap := swag.FormatBool(qrSpecProxyConfigAllowInsecureBootstrap) + if qSpecProxyConfigAllowInsecureBootstrap != "" { + + if err := r.SetQueryParam("spec.proxyConfig.allowInsecureBootstrap", qSpecProxyConfigAllowInsecureBootstrap); err != nil { + return err + } + } + } + + if o.SpecProxyConfigBootstrapCA != nil { + + // query param spec.proxyConfig.bootstrapCA + var qrSpecProxyConfigBootstrapCA string + + if o.SpecProxyConfigBootstrapCA != nil { + qrSpecProxyConfigBootstrapCA = *o.SpecProxyConfigBootstrapCA + } + qSpecProxyConfigBootstrapCA := qrSpecProxyConfigBootstrapCA + if qSpecProxyConfigBootstrapCA != "" { + + if err := r.SetQueryParam("spec.proxyConfig.bootstrapCA", qSpecProxyConfigBootstrapCA); err != nil { + return err + } + } + } + + if o.SpecProxyConfigEnabled != nil { + + // query param spec.proxyConfig.enabled + var qrSpecProxyConfigEnabled bool + + if o.SpecProxyConfigEnabled != nil { + qrSpecProxyConfigEnabled = *o.SpecProxyConfigEnabled + } + qSpecProxyConfigEnabled := swag.FormatBool(qrSpecProxyConfigEnabled) + if qSpecProxyConfigEnabled != "" { + + if err := r.SetQueryParam("spec.proxyConfig.enabled", qSpecProxyConfigEnabled); err != nil { + return err + } + } + } + + if o.SpecProxyConfigHTTPProxy != nil { + + // query param spec.proxyConfig.httpProxy + var qrSpecProxyConfigHTTPProxy string + + if o.SpecProxyConfigHTTPProxy != nil { + qrSpecProxyConfigHTTPProxy = *o.SpecProxyConfigHTTPProxy + } + qSpecProxyConfigHTTPProxy := qrSpecProxyConfigHTTPProxy + if qSpecProxyConfigHTTPProxy != "" { + + if err := r.SetQueryParam("spec.proxyConfig.httpProxy", qSpecProxyConfigHTTPProxy); err != nil { + return err + } + } + } + + if o.SpecProxyConfigHTTPSProxy != nil { + + // query param spec.proxyConfig.httpsProxy + var qrSpecProxyConfigHTTPSProxy string + + if o.SpecProxyConfigHTTPSProxy != nil { + qrSpecProxyConfigHTTPSProxy = *o.SpecProxyConfigHTTPSProxy + } + qSpecProxyConfigHTTPSProxy := qrSpecProxyConfigHTTPSProxy + if qSpecProxyConfigHTTPSProxy != "" { + + if err := r.SetQueryParam("spec.proxyConfig.httpsProxy", qSpecProxyConfigHTTPSProxy); err != nil { + return err + } + } + } + + if o.SpecProxyConfigNoProxy != nil { + + // query param spec.proxyConfig.noProxy + var qrSpecProxyConfigNoProxy string + + if o.SpecProxyConfigNoProxy != nil { + qrSpecProxyConfigNoProxy = *o.SpecProxyConfigNoProxy + } + qSpecProxyConfigNoProxy := qrSpecProxyConfigNoProxy + if qSpecProxyConfigNoProxy != "" { + + if err := r.SetQueryParam("spec.proxyConfig.noProxy", qSpecProxyConfigNoProxy); err != nil { + return err + } + } + } + + if o.SpecProxyConfigProxyAuth != nil { + + // query param spec.proxyConfig.proxyAuth + var qrSpecProxyConfigProxyAuth string + + if o.SpecProxyConfigProxyAuth != nil { + qrSpecProxyConfigProxyAuth = *o.SpecProxyConfigProxyAuth + } + qSpecProxyConfigProxyAuth := qrSpecProxyConfigProxyAuth + if qSpecProxyConfigProxyAuth != "" { + + if err := r.SetQueryParam("spec.proxyConfig.proxyAuth", qSpecProxyConfigProxyAuth); err != nil { + return err + } + } + } + + if o.SpecShareMode != nil { + + // query param spec.shareMode + var qrSpecShareMode string + + if o.SpecShareMode != nil { + qrSpecShareMode = *o.SpecShareMode + } + qSpecShareMode := qrSpecShareMode + if qSpecShareMode != "" { + + if err := r.SetQueryParam("spec.shareMode", qSpecShareMode); err != nil { + return err + } + } + } + + if o.StatusConditionStatus != nil { + + // query param status.conditionStatus + var qrStatusConditionStatus string + + if o.StatusConditionStatus != nil { + qrStatusConditionStatus = *o.StatusConditionStatus + } + qStatusConditionStatus := qrStatusConditionStatus + if qStatusConditionStatus != "" { + + if err := r.SetQueryParam("status.conditionStatus", qStatusConditionStatus); err != nil { + return err + } + } + } + + if o.StatusConditionType != nil { + + // query param status.conditionType + var qrStatusConditionType string + + if o.StatusConditionType != nil { + qrStatusConditionType = *o.StatusConditionType + } + qStatusConditionType := qrStatusConditionType + if qStatusConditionType != "" { + + if err := r.SetQueryParam("status.conditionType", qStatusConditionType); err != nil { + return err + } + } + } + + if o.StatusLastUpdated != nil { + + // query param status.lastUpdated + var qrStatusLastUpdated strfmt.DateTime + + if o.StatusLastUpdated != nil { + qrStatusLastUpdated = *o.StatusLastUpdated + } + qStatusLastUpdated := qrStatusLastUpdated.String() + if qStatusLastUpdated != "" { + + if err := r.SetQueryParam("status.lastUpdated", qStatusLastUpdated); err != nil { + return err + } + } + } + + if o.StatusReason != nil { + + // query param status.reason + var qrStatusReason string + + if o.StatusReason != nil { + qrStatusReason = *o.StatusReason + } + qStatusReason := qrStatusReason + if qStatusReason != "" { + + if err := r.SetQueryParam("status.reason", qStatusReason); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/components/common/api/def/clients/scheduler/client/cluster/cluster_get_cluster_responses.go b/components/common/api/def/clients/scheduler/client/cluster/cluster_get_cluster_responses.go new file mode 100644 index 0000000..2e06de1 --- /dev/null +++ b/components/common/api/def/clients/scheduler/client/cluster/cluster_get_cluster_responses.go @@ -0,0 +1,187 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package cluster + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/RafaySystems/rcloud-base/components/common/api/def/clients/scheduler/models" +) + +// ClusterGetClusterReader is a Reader for the ClusterGetCluster structure. +type ClusterGetClusterReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ClusterGetClusterReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewClusterGetClusterOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 403: + result := NewClusterGetClusterForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewClusterGetClusterNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + result := NewClusterGetClusterDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewClusterGetClusterOK creates a ClusterGetClusterOK with default headers values +func NewClusterGetClusterOK() *ClusterGetClusterOK { + return &ClusterGetClusterOK{} +} + +/* ClusterGetClusterOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type ClusterGetClusterOK struct { + Payload *models.V3Cluster +} + +func (o *ClusterGetClusterOK) Error() string { + return fmt.Sprintf("[GET /infra/v3/project/{metadata.project}/cluster/{metadata.name}][%d] clusterGetClusterOK %+v", 200, o.Payload) +} +func (o *ClusterGetClusterOK) GetPayload() *models.V3Cluster { + return o.Payload +} + +func (o *ClusterGetClusterOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V3Cluster) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewClusterGetClusterForbidden creates a ClusterGetClusterForbidden with default headers values +func NewClusterGetClusterForbidden() *ClusterGetClusterForbidden { + return &ClusterGetClusterForbidden{} +} + +/* ClusterGetClusterForbidden describes a response with status code 403, with default header values. + +Returned when the user does not have permission to access the resource. +*/ +type ClusterGetClusterForbidden struct { + Payload interface{} +} + +func (o *ClusterGetClusterForbidden) Error() string { + return fmt.Sprintf("[GET /infra/v3/project/{metadata.project}/cluster/{metadata.name}][%d] clusterGetClusterForbidden %+v", 403, o.Payload) +} +func (o *ClusterGetClusterForbidden) GetPayload() interface{} { + return o.Payload +} + +func (o *ClusterGetClusterForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewClusterGetClusterNotFound creates a ClusterGetClusterNotFound with default headers values +func NewClusterGetClusterNotFound() *ClusterGetClusterNotFound { + return &ClusterGetClusterNotFound{} +} + +/* ClusterGetClusterNotFound describes a response with status code 404, with default header values. + +Returned when the resource does not exist. +*/ +type ClusterGetClusterNotFound struct { + Payload string +} + +func (o *ClusterGetClusterNotFound) Error() string { + return fmt.Sprintf("[GET /infra/v3/project/{metadata.project}/cluster/{metadata.name}][%d] clusterGetClusterNotFound %+v", 404, o.Payload) +} +func (o *ClusterGetClusterNotFound) GetPayload() string { + return o.Payload +} + +func (o *ClusterGetClusterNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewClusterGetClusterDefault creates a ClusterGetClusterDefault with default headers values +func NewClusterGetClusterDefault(code int) *ClusterGetClusterDefault { + return &ClusterGetClusterDefault{ + _statusCode: code, + } +} + +/* ClusterGetClusterDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type ClusterGetClusterDefault struct { + _statusCode int + + Payload *models.GooglerpcStatus +} + +// Code gets the status code for the cluster get cluster default response +func (o *ClusterGetClusterDefault) Code() int { + return o._statusCode +} + +func (o *ClusterGetClusterDefault) Error() string { + return fmt.Sprintf("[GET /infra/v3/project/{metadata.project}/cluster/{metadata.name}][%d] Cluster_GetCluster default %+v", o._statusCode, o.Payload) +} +func (o *ClusterGetClusterDefault) GetPayload() *models.GooglerpcStatus { + return o.Payload +} + +func (o *ClusterGetClusterDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.GooglerpcStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/components/common/api/def/clients/scheduler/client/cluster/cluster_get_clusters_parameters.go b/components/common/api/def/clients/scheduler/client/cluster/cluster_get_clusters_parameters.go new file mode 100644 index 0000000..2cf7984 --- /dev/null +++ b/components/common/api/def/clients/scheduler/client/cluster/cluster_get_clusters_parameters.go @@ -0,0 +1,866 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package cluster + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewClusterGetClustersParams creates a new ClusterGetClustersParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewClusterGetClustersParams() *ClusterGetClustersParams { + return &ClusterGetClustersParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewClusterGetClustersParamsWithTimeout creates a new ClusterGetClustersParams object +// with the ability to set a timeout on a request. +func NewClusterGetClustersParamsWithTimeout(timeout time.Duration) *ClusterGetClustersParams { + return &ClusterGetClustersParams{ + timeout: timeout, + } +} + +// NewClusterGetClustersParamsWithContext creates a new ClusterGetClustersParams object +// with the ability to set a context for a request. +func NewClusterGetClustersParamsWithContext(ctx context.Context) *ClusterGetClustersParams { + return &ClusterGetClustersParams{ + Context: ctx, + } +} + +// NewClusterGetClustersParamsWithHTTPClient creates a new ClusterGetClustersParams object +// with the ability to set a custom HTTPClient for a request. +func NewClusterGetClustersParamsWithHTTPClient(client *http.Client) *ClusterGetClustersParams { + return &ClusterGetClustersParams{ + HTTPClient: client, + } +} + +/* ClusterGetClustersParams contains all the parameters to send to the API endpoint + for the cluster get clusters operation. + + Typically these are written to a http.Request. +*/ +type ClusterGetClustersParams struct { + + // ID. + ID *string + + // BlueprintRef. + BlueprintRef *string + + // ClusterID. + ClusterID *string + + // Count. + // + // Format: int64 + Count *string + + // Deleted. + Deleted *bool + + /* DisplayName. + + displayName only used for update queries to set displayName (READONLY). + */ + DisplayName *string + + // Extended. + Extended *bool + + /* GlobalScope. + + globalScope sets partnerID,organizationID,projectID = 0. + */ + GlobalScope *bool + + // Groups. + Groups []string + + /* IgnoreScopeDefault. + + ignoreScopeDefault ignores default values for partnerID, organizationID and + projectID. + */ + IgnoreScopeDefault *bool + + // IsSSOUser. + IsSSOUser *bool + + // Limit. + // + // Format: int64 + Limit *string + + /* Name. + + name is unique ID of a resource along with (partnerID, organizationID, + projectID). + */ + Name *string + + // Offset. + // + // Format: int64 + Offset *string + + // Order. + Order *string + + // OrderBy. + OrderBy *string + + // OrganizationID. + OrganizationID *string + + // PartnerID. + PartnerID *string + + // ProjectID. + ProjectID string + + // PublishedVersion. + PublishedVersion *string + + /* Selector. + + selector is used to filter the labels of a resource. + */ + Selector *string + + /* URLScope. + + urlScope is supposed to be passed in the URL as kind/HashID(value). + */ + URLScope *string + + // Username. + Username *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the cluster get clusters params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ClusterGetClustersParams) WithDefaults() *ClusterGetClustersParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the cluster get clusters params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ClusterGetClustersParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the cluster get clusters params +func (o *ClusterGetClustersParams) WithTimeout(timeout time.Duration) *ClusterGetClustersParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the cluster get clusters params +func (o *ClusterGetClustersParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the cluster get clusters params +func (o *ClusterGetClustersParams) WithContext(ctx context.Context) *ClusterGetClustersParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the cluster get clusters params +func (o *ClusterGetClustersParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the cluster get clusters params +func (o *ClusterGetClustersParams) WithHTTPClient(client *http.Client) *ClusterGetClustersParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the cluster get clusters params +func (o *ClusterGetClustersParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the cluster get clusters params +func (o *ClusterGetClustersParams) WithID(id *string) *ClusterGetClustersParams { + o.SetID(id) + return o +} + +// SetID adds the id to the cluster get clusters params +func (o *ClusterGetClustersParams) SetID(id *string) { + o.ID = id +} + +// WithBlueprintRef adds the blueprintRef to the cluster get clusters params +func (o *ClusterGetClustersParams) WithBlueprintRef(blueprintRef *string) *ClusterGetClustersParams { + o.SetBlueprintRef(blueprintRef) + return o +} + +// SetBlueprintRef adds the blueprintRef to the cluster get clusters params +func (o *ClusterGetClustersParams) SetBlueprintRef(blueprintRef *string) { + o.BlueprintRef = blueprintRef +} + +// WithClusterID adds the clusterID to the cluster get clusters params +func (o *ClusterGetClustersParams) WithClusterID(clusterID *string) *ClusterGetClustersParams { + o.SetClusterID(clusterID) + return o +} + +// SetClusterID adds the clusterId to the cluster get clusters params +func (o *ClusterGetClustersParams) SetClusterID(clusterID *string) { + o.ClusterID = clusterID +} + +// WithCount adds the count to the cluster get clusters params +func (o *ClusterGetClustersParams) WithCount(count *string) *ClusterGetClustersParams { + o.SetCount(count) + return o +} + +// SetCount adds the count to the cluster get clusters params +func (o *ClusterGetClustersParams) SetCount(count *string) { + o.Count = count +} + +// WithDeleted adds the deleted to the cluster get clusters params +func (o *ClusterGetClustersParams) WithDeleted(deleted *bool) *ClusterGetClustersParams { + o.SetDeleted(deleted) + return o +} + +// SetDeleted adds the deleted to the cluster get clusters params +func (o *ClusterGetClustersParams) SetDeleted(deleted *bool) { + o.Deleted = deleted +} + +// WithDisplayName adds the displayName to the cluster get clusters params +func (o *ClusterGetClustersParams) WithDisplayName(displayName *string) *ClusterGetClustersParams { + o.SetDisplayName(displayName) + return o +} + +// SetDisplayName adds the displayName to the cluster get clusters params +func (o *ClusterGetClustersParams) SetDisplayName(displayName *string) { + o.DisplayName = displayName +} + +// WithExtended adds the extended to the cluster get clusters params +func (o *ClusterGetClustersParams) WithExtended(extended *bool) *ClusterGetClustersParams { + o.SetExtended(extended) + return o +} + +// SetExtended adds the extended to the cluster get clusters params +func (o *ClusterGetClustersParams) SetExtended(extended *bool) { + o.Extended = extended +} + +// WithGlobalScope adds the globalScope to the cluster get clusters params +func (o *ClusterGetClustersParams) WithGlobalScope(globalScope *bool) *ClusterGetClustersParams { + o.SetGlobalScope(globalScope) + return o +} + +// SetGlobalScope adds the globalScope to the cluster get clusters params +func (o *ClusterGetClustersParams) SetGlobalScope(globalScope *bool) { + o.GlobalScope = globalScope +} + +// WithGroups adds the groups to the cluster get clusters params +func (o *ClusterGetClustersParams) WithGroups(groups []string) *ClusterGetClustersParams { + o.SetGroups(groups) + return o +} + +// SetGroups adds the groups to the cluster get clusters params +func (o *ClusterGetClustersParams) SetGroups(groups []string) { + o.Groups = groups +} + +// WithIgnoreScopeDefault adds the ignoreScopeDefault to the cluster get clusters params +func (o *ClusterGetClustersParams) WithIgnoreScopeDefault(ignoreScopeDefault *bool) *ClusterGetClustersParams { + o.SetIgnoreScopeDefault(ignoreScopeDefault) + return o +} + +// SetIgnoreScopeDefault adds the ignoreScopeDefault to the cluster get clusters params +func (o *ClusterGetClustersParams) SetIgnoreScopeDefault(ignoreScopeDefault *bool) { + o.IgnoreScopeDefault = ignoreScopeDefault +} + +// WithIsSSOUser adds the isSSOUser to the cluster get clusters params +func (o *ClusterGetClustersParams) WithIsSSOUser(isSSOUser *bool) *ClusterGetClustersParams { + o.SetIsSSOUser(isSSOUser) + return o +} + +// SetIsSSOUser adds the isSSOUser to the cluster get clusters params +func (o *ClusterGetClustersParams) SetIsSSOUser(isSSOUser *bool) { + o.IsSSOUser = isSSOUser +} + +// WithLimit adds the limit to the cluster get clusters params +func (o *ClusterGetClustersParams) WithLimit(limit *string) *ClusterGetClustersParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the cluster get clusters params +func (o *ClusterGetClustersParams) SetLimit(limit *string) { + o.Limit = limit +} + +// WithName adds the name to the cluster get clusters params +func (o *ClusterGetClustersParams) WithName(name *string) *ClusterGetClustersParams { + o.SetName(name) + return o +} + +// SetName adds the name to the cluster get clusters params +func (o *ClusterGetClustersParams) SetName(name *string) { + o.Name = name +} + +// WithOffset adds the offset to the cluster get clusters params +func (o *ClusterGetClustersParams) WithOffset(offset *string) *ClusterGetClustersParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the cluster get clusters params +func (o *ClusterGetClustersParams) SetOffset(offset *string) { + o.Offset = offset +} + +// WithOrder adds the order to the cluster get clusters params +func (o *ClusterGetClustersParams) WithOrder(order *string) *ClusterGetClustersParams { + o.SetOrder(order) + return o +} + +// SetOrder adds the order to the cluster get clusters params +func (o *ClusterGetClustersParams) SetOrder(order *string) { + o.Order = order +} + +// WithOrderBy adds the orderBy to the cluster get clusters params +func (o *ClusterGetClustersParams) WithOrderBy(orderBy *string) *ClusterGetClustersParams { + o.SetOrderBy(orderBy) + return o +} + +// SetOrderBy adds the orderBy to the cluster get clusters params +func (o *ClusterGetClustersParams) SetOrderBy(orderBy *string) { + o.OrderBy = orderBy +} + +// WithOrganizationID adds the organizationID to the cluster get clusters params +func (o *ClusterGetClustersParams) WithOrganizationID(organizationID *string) *ClusterGetClustersParams { + o.SetOrganizationID(organizationID) + return o +} + +// SetOrganizationID adds the organizationId to the cluster get clusters params +func (o *ClusterGetClustersParams) SetOrganizationID(organizationID *string) { + o.OrganizationID = organizationID +} + +// WithPartnerID adds the partnerID to the cluster get clusters params +func (o *ClusterGetClustersParams) WithPartnerID(partnerID *string) *ClusterGetClustersParams { + o.SetPartnerID(partnerID) + return o +} + +// SetPartnerID adds the partnerId to the cluster get clusters params +func (o *ClusterGetClustersParams) SetPartnerID(partnerID *string) { + o.PartnerID = partnerID +} + +// WithProjectID adds the projectID to the cluster get clusters params +func (o *ClusterGetClustersParams) WithProjectID(projectID string) *ClusterGetClustersParams { + o.SetProjectID(projectID) + return o +} + +// SetProjectID adds the projectId to the cluster get clusters params +func (o *ClusterGetClustersParams) SetProjectID(projectID string) { + o.ProjectID = projectID +} + +// WithPublishedVersion adds the publishedVersion to the cluster get clusters params +func (o *ClusterGetClustersParams) WithPublishedVersion(publishedVersion *string) *ClusterGetClustersParams { + o.SetPublishedVersion(publishedVersion) + return o +} + +// SetPublishedVersion adds the publishedVersion to the cluster get clusters params +func (o *ClusterGetClustersParams) SetPublishedVersion(publishedVersion *string) { + o.PublishedVersion = publishedVersion +} + +// WithSelector adds the selector to the cluster get clusters params +func (o *ClusterGetClustersParams) WithSelector(selector *string) *ClusterGetClustersParams { + o.SetSelector(selector) + return o +} + +// SetSelector adds the selector to the cluster get clusters params +func (o *ClusterGetClustersParams) SetSelector(selector *string) { + o.Selector = selector +} + +// WithURLScope adds the uRLScope to the cluster get clusters params +func (o *ClusterGetClustersParams) WithURLScope(uRLScope *string) *ClusterGetClustersParams { + o.SetURLScope(uRLScope) + return o +} + +// SetURLScope adds the urlScope to the cluster get clusters params +func (o *ClusterGetClustersParams) SetURLScope(uRLScope *string) { + o.URLScope = uRLScope +} + +// WithUsername adds the username to the cluster get clusters params +func (o *ClusterGetClustersParams) WithUsername(username *string) *ClusterGetClustersParams { + o.SetUsername(username) + return o +} + +// SetUsername adds the username to the cluster get clusters params +func (o *ClusterGetClustersParams) SetUsername(username *string) { + o.Username = username +} + +// WriteToRequest writes these params to a swagger request +func (o *ClusterGetClustersParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.ID != nil { + + // query param ID + var qrID string + + if o.ID != nil { + qrID = *o.ID + } + qID := qrID + if qID != "" { + + if err := r.SetQueryParam("ID", qID); err != nil { + return err + } + } + } + + if o.BlueprintRef != nil { + + // query param blueprintRef + var qrBlueprintRef string + + if o.BlueprintRef != nil { + qrBlueprintRef = *o.BlueprintRef + } + qBlueprintRef := qrBlueprintRef + if qBlueprintRef != "" { + + if err := r.SetQueryParam("blueprintRef", qBlueprintRef); err != nil { + return err + } + } + } + + if o.ClusterID != nil { + + // query param clusterID + var qrClusterID string + + if o.ClusterID != nil { + qrClusterID = *o.ClusterID + } + qClusterID := qrClusterID + if qClusterID != "" { + + if err := r.SetQueryParam("clusterID", qClusterID); err != nil { + return err + } + } + } + + if o.Count != nil { + + // query param count + var qrCount string + + if o.Count != nil { + qrCount = *o.Count + } + qCount := qrCount + if qCount != "" { + + if err := r.SetQueryParam("count", qCount); err != nil { + return err + } + } + } + + if o.Deleted != nil { + + // query param deleted + var qrDeleted bool + + if o.Deleted != nil { + qrDeleted = *o.Deleted + } + qDeleted := swag.FormatBool(qrDeleted) + if qDeleted != "" { + + if err := r.SetQueryParam("deleted", qDeleted); err != nil { + return err + } + } + } + + if o.DisplayName != nil { + + // query param displayName + var qrDisplayName string + + if o.DisplayName != nil { + qrDisplayName = *o.DisplayName + } + qDisplayName := qrDisplayName + if qDisplayName != "" { + + if err := r.SetQueryParam("displayName", qDisplayName); err != nil { + return err + } + } + } + + if o.Extended != nil { + + // query param extended + var qrExtended bool + + if o.Extended != nil { + qrExtended = *o.Extended + } + qExtended := swag.FormatBool(qrExtended) + if qExtended != "" { + + if err := r.SetQueryParam("extended", qExtended); err != nil { + return err + } + } + } + + if o.GlobalScope != nil { + + // query param globalScope + var qrGlobalScope bool + + if o.GlobalScope != nil { + qrGlobalScope = *o.GlobalScope + } + qGlobalScope := swag.FormatBool(qrGlobalScope) + if qGlobalScope != "" { + + if err := r.SetQueryParam("globalScope", qGlobalScope); err != nil { + return err + } + } + } + + if o.Groups != nil { + + // binding items for groups + joinedGroups := o.bindParamGroups(reg) + + // query array param groups + if err := r.SetQueryParam("groups", joinedGroups...); err != nil { + return err + } + } + + if o.IgnoreScopeDefault != nil { + + // query param ignoreScopeDefault + var qrIgnoreScopeDefault bool + + if o.IgnoreScopeDefault != nil { + qrIgnoreScopeDefault = *o.IgnoreScopeDefault + } + qIgnoreScopeDefault := swag.FormatBool(qrIgnoreScopeDefault) + if qIgnoreScopeDefault != "" { + + if err := r.SetQueryParam("ignoreScopeDefault", qIgnoreScopeDefault); err != nil { + return err + } + } + } + + if o.IsSSOUser != nil { + + // query param isSSOUser + var qrIsSSOUser bool + + if o.IsSSOUser != nil { + qrIsSSOUser = *o.IsSSOUser + } + qIsSSOUser := swag.FormatBool(qrIsSSOUser) + if qIsSSOUser != "" { + + if err := r.SetQueryParam("isSSOUser", qIsSSOUser); err != nil { + return err + } + } + } + + if o.Limit != nil { + + // query param limit + var qrLimit string + + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := qrLimit + if qLimit != "" { + + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + } + + if o.Name != nil { + + // query param name + var qrName string + + if o.Name != nil { + qrName = *o.Name + } + qName := qrName + if qName != "" { + + if err := r.SetQueryParam("name", qName); err != nil { + return err + } + } + } + + if o.Offset != nil { + + // query param offset + var qrOffset string + + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := qrOffset + if qOffset != "" { + + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + } + + if o.Order != nil { + + // query param order + var qrOrder string + + if o.Order != nil { + qrOrder = *o.Order + } + qOrder := qrOrder + if qOrder != "" { + + if err := r.SetQueryParam("order", qOrder); err != nil { + return err + } + } + } + + if o.OrderBy != nil { + + // query param orderBy + var qrOrderBy string + + if o.OrderBy != nil { + qrOrderBy = *o.OrderBy + } + qOrderBy := qrOrderBy + if qOrderBy != "" { + + if err := r.SetQueryParam("orderBy", qOrderBy); err != nil { + return err + } + } + } + + if o.OrganizationID != nil { + + // query param organizationID + var qrOrganizationID string + + if o.OrganizationID != nil { + qrOrganizationID = *o.OrganizationID + } + qOrganizationID := qrOrganizationID + if qOrganizationID != "" { + + if err := r.SetQueryParam("organizationID", qOrganizationID); err != nil { + return err + } + } + } + + if o.PartnerID != nil { + + // query param partnerID + var qrPartnerID string + + if o.PartnerID != nil { + qrPartnerID = *o.PartnerID + } + qPartnerID := qrPartnerID + if qPartnerID != "" { + + if err := r.SetQueryParam("partnerID", qPartnerID); err != nil { + return err + } + } + } + + // path param projectID + if err := r.SetPathParam("projectID", o.ProjectID); err != nil { + return err + } + + if o.PublishedVersion != nil { + + // query param publishedVersion + var qrPublishedVersion string + + if o.PublishedVersion != nil { + qrPublishedVersion = *o.PublishedVersion + } + qPublishedVersion := qrPublishedVersion + if qPublishedVersion != "" { + + if err := r.SetQueryParam("publishedVersion", qPublishedVersion); err != nil { + return err + } + } + } + + if o.Selector != nil { + + // query param selector + var qrSelector string + + if o.Selector != nil { + qrSelector = *o.Selector + } + qSelector := qrSelector + if qSelector != "" { + + if err := r.SetQueryParam("selector", qSelector); err != nil { + return err + } + } + } + + if o.URLScope != nil { + + // query param urlScope + var qrURLScope string + + if o.URLScope != nil { + qrURLScope = *o.URLScope + } + qURLScope := qrURLScope + if qURLScope != "" { + + if err := r.SetQueryParam("urlScope", qURLScope); err != nil { + return err + } + } + } + + if o.Username != nil { + + // query param username + var qrUsername string + + if o.Username != nil { + qrUsername = *o.Username + } + qUsername := qrUsername + if qUsername != "" { + + if err := r.SetQueryParam("username", qUsername); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// bindParamClusterGetClusters binds the parameter groups +func (o *ClusterGetClustersParams) bindParamGroups(formats strfmt.Registry) []string { + groupsIR := o.Groups + + var groupsIC []string + for _, groupsIIR := range groupsIR { // explode []string + + groupsIIV := groupsIIR // string as string + groupsIC = append(groupsIC, groupsIIV) + } + + // items.CollectionFormat: "multi" + groupsIS := swag.JoinByFormat(groupsIC, "multi") + + return groupsIS +} diff --git a/components/common/api/def/clients/scheduler/client/cluster/cluster_get_clusters_responses.go b/components/common/api/def/clients/scheduler/client/cluster/cluster_get_clusters_responses.go new file mode 100644 index 0000000..4890970 --- /dev/null +++ b/components/common/api/def/clients/scheduler/client/cluster/cluster_get_clusters_responses.go @@ -0,0 +1,187 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package cluster + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/RafaySystems/rcloud-base/components/common/api/def/clients/scheduler/models" +) + +// ClusterGetClustersReader is a Reader for the ClusterGetClusters structure. +type ClusterGetClustersReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ClusterGetClustersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewClusterGetClustersOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 403: + result := NewClusterGetClustersForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewClusterGetClustersNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + result := NewClusterGetClustersDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewClusterGetClustersOK creates a ClusterGetClustersOK with default headers values +func NewClusterGetClustersOK() *ClusterGetClustersOK { + return &ClusterGetClustersOK{} +} + +/* ClusterGetClustersOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type ClusterGetClustersOK struct { + Payload *models.V3ClusterList +} + +func (o *ClusterGetClustersOK) Error() string { + return fmt.Sprintf("[GET /infra/v3/project/{projectID}/cluster][%d] clusterGetClustersOK %+v", 200, o.Payload) +} +func (o *ClusterGetClustersOK) GetPayload() *models.V3ClusterList { + return o.Payload +} + +func (o *ClusterGetClustersOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V3ClusterList) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewClusterGetClustersForbidden creates a ClusterGetClustersForbidden with default headers values +func NewClusterGetClustersForbidden() *ClusterGetClustersForbidden { + return &ClusterGetClustersForbidden{} +} + +/* ClusterGetClustersForbidden describes a response with status code 403, with default header values. + +Returned when the user does not have permission to access the resource. +*/ +type ClusterGetClustersForbidden struct { + Payload interface{} +} + +func (o *ClusterGetClustersForbidden) Error() string { + return fmt.Sprintf("[GET /infra/v3/project/{projectID}/cluster][%d] clusterGetClustersForbidden %+v", 403, o.Payload) +} +func (o *ClusterGetClustersForbidden) GetPayload() interface{} { + return o.Payload +} + +func (o *ClusterGetClustersForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewClusterGetClustersNotFound creates a ClusterGetClustersNotFound with default headers values +func NewClusterGetClustersNotFound() *ClusterGetClustersNotFound { + return &ClusterGetClustersNotFound{} +} + +/* ClusterGetClustersNotFound describes a response with status code 404, with default header values. + +Returned when the resource does not exist. +*/ +type ClusterGetClustersNotFound struct { + Payload string +} + +func (o *ClusterGetClustersNotFound) Error() string { + return fmt.Sprintf("[GET /infra/v3/project/{projectID}/cluster][%d] clusterGetClustersNotFound %+v", 404, o.Payload) +} +func (o *ClusterGetClustersNotFound) GetPayload() string { + return o.Payload +} + +func (o *ClusterGetClustersNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewClusterGetClustersDefault creates a ClusterGetClustersDefault with default headers values +func NewClusterGetClustersDefault(code int) *ClusterGetClustersDefault { + return &ClusterGetClustersDefault{ + _statusCode: code, + } +} + +/* ClusterGetClustersDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type ClusterGetClustersDefault struct { + _statusCode int + + Payload *models.GooglerpcStatus +} + +// Code gets the status code for the cluster get clusters default response +func (o *ClusterGetClustersDefault) Code() int { + return o._statusCode +} + +func (o *ClusterGetClustersDefault) Error() string { + return fmt.Sprintf("[GET /infra/v3/project/{projectID}/cluster][%d] Cluster_GetClusters default %+v", o._statusCode, o.Payload) +} +func (o *ClusterGetClustersDefault) GetPayload() *models.GooglerpcStatus { + return o.Payload +} + +func (o *ClusterGetClustersDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.GooglerpcStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/components/common/api/def/clients/scheduler/client/cluster/cluster_register_cluster_parameters.go b/components/common/api/def/clients/scheduler/client/cluster/cluster_register_cluster_parameters.go new file mode 100644 index 0000000..6dee813 --- /dev/null +++ b/components/common/api/def/clients/scheduler/client/cluster/cluster_register_cluster_parameters.go @@ -0,0 +1,148 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package cluster + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/RafaySystems/rcloud-base/components/common/api/def/clients/scheduler/models" +) + +// NewClusterRegisterClusterParams creates a new ClusterRegisterClusterParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewClusterRegisterClusterParams() *ClusterRegisterClusterParams { + return &ClusterRegisterClusterParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewClusterRegisterClusterParamsWithTimeout creates a new ClusterRegisterClusterParams object +// with the ability to set a timeout on a request. +func NewClusterRegisterClusterParamsWithTimeout(timeout time.Duration) *ClusterRegisterClusterParams { + return &ClusterRegisterClusterParams{ + timeout: timeout, + } +} + +// NewClusterRegisterClusterParamsWithContext creates a new ClusterRegisterClusterParams object +// with the ability to set a context for a request. +func NewClusterRegisterClusterParamsWithContext(ctx context.Context) *ClusterRegisterClusterParams { + return &ClusterRegisterClusterParams{ + Context: ctx, + } +} + +// NewClusterRegisterClusterParamsWithHTTPClient creates a new ClusterRegisterClusterParams object +// with the ability to set a custom HTTPClient for a request. +func NewClusterRegisterClusterParamsWithHTTPClient(client *http.Client) *ClusterRegisterClusterParams { + return &ClusterRegisterClusterParams{ + HTTPClient: client, + } +} + +/* ClusterRegisterClusterParams contains all the parameters to send to the API endpoint + for the cluster register cluster operation. + + Typically these are written to a http.Request. +*/ +type ClusterRegisterClusterParams struct { + + // Body. + Body *models.RPCRegisterClusterRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the cluster register cluster params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ClusterRegisterClusterParams) WithDefaults() *ClusterRegisterClusterParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the cluster register cluster params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ClusterRegisterClusterParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the cluster register cluster params +func (o *ClusterRegisterClusterParams) WithTimeout(timeout time.Duration) *ClusterRegisterClusterParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the cluster register cluster params +func (o *ClusterRegisterClusterParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the cluster register cluster params +func (o *ClusterRegisterClusterParams) WithContext(ctx context.Context) *ClusterRegisterClusterParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the cluster register cluster params +func (o *ClusterRegisterClusterParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the cluster register cluster params +func (o *ClusterRegisterClusterParams) WithHTTPClient(client *http.Client) *ClusterRegisterClusterParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the cluster register cluster params +func (o *ClusterRegisterClusterParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the cluster register cluster params +func (o *ClusterRegisterClusterParams) WithBody(body *models.RPCRegisterClusterRequest) *ClusterRegisterClusterParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the cluster register cluster params +func (o *ClusterRegisterClusterParams) SetBody(body *models.RPCRegisterClusterRequest) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *ClusterRegisterClusterParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/components/common/api/def/clients/scheduler/client/cluster/cluster_register_cluster_responses.go b/components/common/api/def/clients/scheduler/client/cluster/cluster_register_cluster_responses.go new file mode 100644 index 0000000..23ab57a --- /dev/null +++ b/components/common/api/def/clients/scheduler/client/cluster/cluster_register_cluster_responses.go @@ -0,0 +1,187 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package cluster + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/RafaySystems/rcloud-base/components/common/api/def/clients/scheduler/models" +) + +// ClusterRegisterClusterReader is a Reader for the ClusterRegisterCluster structure. +type ClusterRegisterClusterReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ClusterRegisterClusterReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewClusterRegisterClusterOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 403: + result := NewClusterRegisterClusterForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewClusterRegisterClusterNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + result := NewClusterRegisterClusterDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewClusterRegisterClusterOK creates a ClusterRegisterClusterOK with default headers values +func NewClusterRegisterClusterOK() *ClusterRegisterClusterOK { + return &ClusterRegisterClusterOK{} +} + +/* ClusterRegisterClusterOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type ClusterRegisterClusterOK struct { + Payload *models.RPCRegisterClusterResponse +} + +func (o *ClusterRegisterClusterOK) Error() string { + return fmt.Sprintf("[POST /infra/v3/scheduler/cluster/register][%d] clusterRegisterClusterOK %+v", 200, o.Payload) +} +func (o *ClusterRegisterClusterOK) GetPayload() *models.RPCRegisterClusterResponse { + return o.Payload +} + +func (o *ClusterRegisterClusterOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.RPCRegisterClusterResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewClusterRegisterClusterForbidden creates a ClusterRegisterClusterForbidden with default headers values +func NewClusterRegisterClusterForbidden() *ClusterRegisterClusterForbidden { + return &ClusterRegisterClusterForbidden{} +} + +/* ClusterRegisterClusterForbidden describes a response with status code 403, with default header values. + +Returned when the user does not have permission to access the resource. +*/ +type ClusterRegisterClusterForbidden struct { + Payload interface{} +} + +func (o *ClusterRegisterClusterForbidden) Error() string { + return fmt.Sprintf("[POST /infra/v3/scheduler/cluster/register][%d] clusterRegisterClusterForbidden %+v", 403, o.Payload) +} +func (o *ClusterRegisterClusterForbidden) GetPayload() interface{} { + return o.Payload +} + +func (o *ClusterRegisterClusterForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewClusterRegisterClusterNotFound creates a ClusterRegisterClusterNotFound with default headers values +func NewClusterRegisterClusterNotFound() *ClusterRegisterClusterNotFound { + return &ClusterRegisterClusterNotFound{} +} + +/* ClusterRegisterClusterNotFound describes a response with status code 404, with default header values. + +Returned when the resource does not exist. +*/ +type ClusterRegisterClusterNotFound struct { + Payload string +} + +func (o *ClusterRegisterClusterNotFound) Error() string { + return fmt.Sprintf("[POST /infra/v3/scheduler/cluster/register][%d] clusterRegisterClusterNotFound %+v", 404, o.Payload) +} +func (o *ClusterRegisterClusterNotFound) GetPayload() string { + return o.Payload +} + +func (o *ClusterRegisterClusterNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewClusterRegisterClusterDefault creates a ClusterRegisterClusterDefault with default headers values +func NewClusterRegisterClusterDefault(code int) *ClusterRegisterClusterDefault { + return &ClusterRegisterClusterDefault{ + _statusCode: code, + } +} + +/* ClusterRegisterClusterDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type ClusterRegisterClusterDefault struct { + _statusCode int + + Payload *models.GooglerpcStatus +} + +// Code gets the status code for the cluster register cluster default response +func (o *ClusterRegisterClusterDefault) Code() int { + return o._statusCode +} + +func (o *ClusterRegisterClusterDefault) Error() string { + return fmt.Sprintf("[POST /infra/v3/scheduler/cluster/register][%d] Cluster_RegisterCluster default %+v", o._statusCode, o.Payload) +} +func (o *ClusterRegisterClusterDefault) GetPayload() *models.GooglerpcStatus { + return o.Payload +} + +func (o *ClusterRegisterClusterDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.GooglerpcStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/components/common/api/def/clients/scheduler/client/cluster/cluster_update_cluster_parameters.go b/components/common/api/def/clients/scheduler/client/cluster/cluster_update_cluster_parameters.go new file mode 100644 index 0000000..a62dd1c --- /dev/null +++ b/components/common/api/def/clients/scheduler/client/cluster/cluster_update_cluster_parameters.go @@ -0,0 +1,192 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package cluster + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/RafaySystems/rcloud-base/components/common/api/def/clients/scheduler/models" +) + +// NewClusterUpdateClusterParams creates a new ClusterUpdateClusterParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewClusterUpdateClusterParams() *ClusterUpdateClusterParams { + return &ClusterUpdateClusterParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewClusterUpdateClusterParamsWithTimeout creates a new ClusterUpdateClusterParams object +// with the ability to set a timeout on a request. +func NewClusterUpdateClusterParamsWithTimeout(timeout time.Duration) *ClusterUpdateClusterParams { + return &ClusterUpdateClusterParams{ + timeout: timeout, + } +} + +// NewClusterUpdateClusterParamsWithContext creates a new ClusterUpdateClusterParams object +// with the ability to set a context for a request. +func NewClusterUpdateClusterParamsWithContext(ctx context.Context) *ClusterUpdateClusterParams { + return &ClusterUpdateClusterParams{ + Context: ctx, + } +} + +// NewClusterUpdateClusterParamsWithHTTPClient creates a new ClusterUpdateClusterParams object +// with the ability to set a custom HTTPClient for a request. +func NewClusterUpdateClusterParamsWithHTTPClient(client *http.Client) *ClusterUpdateClusterParams { + return &ClusterUpdateClusterParams{ + HTTPClient: client, + } +} + +/* ClusterUpdateClusterParams contains all the parameters to send to the API endpoint + for the cluster update cluster operation. + + Typically these are written to a http.Request. +*/ +type ClusterUpdateClusterParams struct { + + // Body. + Body *models.V3Cluster + + /* MetadataName. + + name of the resource + */ + MetadataName string + + /* MetadataProject. + + Project of the resource + */ + MetadataProject string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the cluster update cluster params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ClusterUpdateClusterParams) WithDefaults() *ClusterUpdateClusterParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the cluster update cluster params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ClusterUpdateClusterParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the cluster update cluster params +func (o *ClusterUpdateClusterParams) WithTimeout(timeout time.Duration) *ClusterUpdateClusterParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the cluster update cluster params +func (o *ClusterUpdateClusterParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the cluster update cluster params +func (o *ClusterUpdateClusterParams) WithContext(ctx context.Context) *ClusterUpdateClusterParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the cluster update cluster params +func (o *ClusterUpdateClusterParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the cluster update cluster params +func (o *ClusterUpdateClusterParams) WithHTTPClient(client *http.Client) *ClusterUpdateClusterParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the cluster update cluster params +func (o *ClusterUpdateClusterParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the cluster update cluster params +func (o *ClusterUpdateClusterParams) WithBody(body *models.V3Cluster) *ClusterUpdateClusterParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the cluster update cluster params +func (o *ClusterUpdateClusterParams) SetBody(body *models.V3Cluster) { + o.Body = body +} + +// WithMetadataName adds the metadataName to the cluster update cluster params +func (o *ClusterUpdateClusterParams) WithMetadataName(metadataName string) *ClusterUpdateClusterParams { + o.SetMetadataName(metadataName) + return o +} + +// SetMetadataName adds the metadataName to the cluster update cluster params +func (o *ClusterUpdateClusterParams) SetMetadataName(metadataName string) { + o.MetadataName = metadataName +} + +// WithMetadataProject adds the metadataProject to the cluster update cluster params +func (o *ClusterUpdateClusterParams) WithMetadataProject(metadataProject string) *ClusterUpdateClusterParams { + o.SetMetadataProject(metadataProject) + return o +} + +// SetMetadataProject adds the metadataProject to the cluster update cluster params +func (o *ClusterUpdateClusterParams) SetMetadataProject(metadataProject string) { + o.MetadataProject = metadataProject +} + +// WriteToRequest writes these params to a swagger request +func (o *ClusterUpdateClusterParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param metadata.name + if err := r.SetPathParam("metadata.name", o.MetadataName); err != nil { + return err + } + + // path param metadata.project + if err := r.SetPathParam("metadata.project", o.MetadataProject); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/components/common/api/def/clients/scheduler/client/cluster/cluster_update_cluster_responses.go b/components/common/api/def/clients/scheduler/client/cluster/cluster_update_cluster_responses.go new file mode 100644 index 0000000..6af1caf --- /dev/null +++ b/components/common/api/def/clients/scheduler/client/cluster/cluster_update_cluster_responses.go @@ -0,0 +1,187 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package cluster + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/RafaySystems/rcloud-base/components/common/api/def/clients/scheduler/models" +) + +// ClusterUpdateClusterReader is a Reader for the ClusterUpdateCluster structure. +type ClusterUpdateClusterReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ClusterUpdateClusterReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewClusterUpdateClusterOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 403: + result := NewClusterUpdateClusterForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewClusterUpdateClusterNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + result := NewClusterUpdateClusterDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewClusterUpdateClusterOK creates a ClusterUpdateClusterOK with default headers values +func NewClusterUpdateClusterOK() *ClusterUpdateClusterOK { + return &ClusterUpdateClusterOK{} +} + +/* ClusterUpdateClusterOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type ClusterUpdateClusterOK struct { + Payload *models.V3Cluster +} + +func (o *ClusterUpdateClusterOK) Error() string { + return fmt.Sprintf("[PUT /infra/v3/project/{metadata.project}/cluster/{metadata.name}][%d] clusterUpdateClusterOK %+v", 200, o.Payload) +} +func (o *ClusterUpdateClusterOK) GetPayload() *models.V3Cluster { + return o.Payload +} + +func (o *ClusterUpdateClusterOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V3Cluster) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewClusterUpdateClusterForbidden creates a ClusterUpdateClusterForbidden with default headers values +func NewClusterUpdateClusterForbidden() *ClusterUpdateClusterForbidden { + return &ClusterUpdateClusterForbidden{} +} + +/* ClusterUpdateClusterForbidden describes a response with status code 403, with default header values. + +Returned when the user does not have permission to access the resource. +*/ +type ClusterUpdateClusterForbidden struct { + Payload interface{} +} + +func (o *ClusterUpdateClusterForbidden) Error() string { + return fmt.Sprintf("[PUT /infra/v3/project/{metadata.project}/cluster/{metadata.name}][%d] clusterUpdateClusterForbidden %+v", 403, o.Payload) +} +func (o *ClusterUpdateClusterForbidden) GetPayload() interface{} { + return o.Payload +} + +func (o *ClusterUpdateClusterForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewClusterUpdateClusterNotFound creates a ClusterUpdateClusterNotFound with default headers values +func NewClusterUpdateClusterNotFound() *ClusterUpdateClusterNotFound { + return &ClusterUpdateClusterNotFound{} +} + +/* ClusterUpdateClusterNotFound describes a response with status code 404, with default header values. + +Returned when the resource does not exist. +*/ +type ClusterUpdateClusterNotFound struct { + Payload string +} + +func (o *ClusterUpdateClusterNotFound) Error() string { + return fmt.Sprintf("[PUT /infra/v3/project/{metadata.project}/cluster/{metadata.name}][%d] clusterUpdateClusterNotFound %+v", 404, o.Payload) +} +func (o *ClusterUpdateClusterNotFound) GetPayload() string { + return o.Payload +} + +func (o *ClusterUpdateClusterNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewClusterUpdateClusterDefault creates a ClusterUpdateClusterDefault with default headers values +func NewClusterUpdateClusterDefault(code int) *ClusterUpdateClusterDefault { + return &ClusterUpdateClusterDefault{ + _statusCode: code, + } +} + +/* ClusterUpdateClusterDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type ClusterUpdateClusterDefault struct { + _statusCode int + + Payload *models.GooglerpcStatus +} + +// Code gets the status code for the cluster update cluster default response +func (o *ClusterUpdateClusterDefault) Code() int { + return o._statusCode +} + +func (o *ClusterUpdateClusterDefault) Error() string { + return fmt.Sprintf("[PUT /infra/v3/project/{metadata.project}/cluster/{metadata.name}][%d] Cluster_UpdateCluster default %+v", o._statusCode, o.Payload) +} +func (o *ClusterUpdateClusterDefault) GetPayload() *models.GooglerpcStatus { + return o.Payload +} + +func (o *ClusterUpdateClusterDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.GooglerpcStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/components/common/api/def/clients/scheduler/client/cluster_service_client.go b/components/common/api/def/clients/scheduler/client/cluster_service_client.go new file mode 100644 index 0000000..ae3a514 --- /dev/null +++ b/components/common/api/def/clients/scheduler/client/cluster_service_client.go @@ -0,0 +1,112 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package client + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/RafaySystems/rcloud-base/components/common/api/def/clients/scheduler/client/cluster" +) + +// Default cluster service HTTP client. +var Default = NewHTTPClient(nil) + +const ( + // DefaultHost is the default Host + // found in Meta (info) section of spec file + DefaultHost string = "localhost" + // DefaultBasePath is the default BasePath + // found in Meta (info) section of spec file + DefaultBasePath string = "/" +) + +// DefaultSchemes are the default schemes found in Meta (info) section of spec file +var DefaultSchemes = []string{"https"} + +// NewHTTPClient creates a new cluster service HTTP client. +func NewHTTPClient(formats strfmt.Registry) *ClusterService { + return NewHTTPClientWithConfig(formats, nil) +} + +// NewHTTPClientWithConfig creates a new cluster service HTTP client, +// using a customizable transport config. +func NewHTTPClientWithConfig(formats strfmt.Registry, cfg *TransportConfig) *ClusterService { + // ensure nullable parameters have default + if cfg == nil { + cfg = DefaultTransportConfig() + } + + // create transport and client + transport := httptransport.New(cfg.Host, cfg.BasePath, cfg.Schemes) + return New(transport, formats) +} + +// New creates a new cluster service client +func New(transport runtime.ClientTransport, formats strfmt.Registry) *ClusterService { + // ensure nullable parameters have default + if formats == nil { + formats = strfmt.Default + } + + cli := new(ClusterService) + cli.Transport = transport + cli.Cluster = cluster.New(transport, formats) + return cli +} + +// DefaultTransportConfig creates a TransportConfig with the +// default settings taken from the meta section of the spec file. +func DefaultTransportConfig() *TransportConfig { + return &TransportConfig{ + Host: DefaultHost, + BasePath: DefaultBasePath, + Schemes: DefaultSchemes, + } +} + +// TransportConfig contains the transport related info, +// found in the meta section of the spec file. +type TransportConfig struct { + Host string + BasePath string + Schemes []string +} + +// WithHost overrides the default host, +// provided by the meta section of the spec file. +func (cfg *TransportConfig) WithHost(host string) *TransportConfig { + cfg.Host = host + return cfg +} + +// WithBasePath overrides the default basePath, +// provided by the meta section of the spec file. +func (cfg *TransportConfig) WithBasePath(basePath string) *TransportConfig { + cfg.BasePath = basePath + return cfg +} + +// WithSchemes overrides the default schemes, +// provided by the meta section of the spec file. +func (cfg *TransportConfig) WithSchemes(schemes []string) *TransportConfig { + cfg.Schemes = schemes + return cfg +} + +// ClusterService is a client for cluster service +type ClusterService struct { + Cluster cluster.ClientService + + Transport runtime.ClientTransport +} + +// SetTransport changes the transport on the client and all its subresources +func (c *ClusterService) SetTransport(transport runtime.ClientTransport) { + c.Transport = transport + c.Cluster.SetTransport(transport) +} diff --git a/components/common/api/def/clients/scheduler/models/commonv3_node_condition.go b/components/common/api/def/clients/scheduler/models/commonv3_node_condition.go new file mode 100644 index 0000000..4aeb6b1 --- /dev/null +++ b/components/common/api/def/clients/scheduler/models/commonv3_node_condition.go @@ -0,0 +1,166 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// Commonv3NodeCondition NodeCondition +// +// Node Condition +// +// swagger:model commonv3NodeCondition +type Commonv3NodeCondition struct { + + // Last time we got an update on a given condition. + LastHeartbeatTime *Commonv3Time `json:"lastHeartbeatTime,omitempty"` + + // Last time the condition transit from one status to another. + LastTransitionTime *Commonv3Time `json:"lastTransitionTime,omitempty"` + + // Human readable message indicating details about last transition. + Message string `json:"message,omitempty"` + + // (brief) reason for the condition's last transition. + Reason string `json:"reason,omitempty"` + + // Status of the condition, one of True, False, Unknown. + Status string `json:"status,omitempty"` + + // Type + // + // Type of node condition + Type string `json:"type,omitempty"` +} + +// Validate validates this commonv3 node condition +func (m *Commonv3NodeCondition) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLastHeartbeatTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLastTransitionTime(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *Commonv3NodeCondition) validateLastHeartbeatTime(formats strfmt.Registry) error { + if swag.IsZero(m.LastHeartbeatTime) { // not required + return nil + } + + if m.LastHeartbeatTime != nil { + if err := m.LastHeartbeatTime.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("lastHeartbeatTime") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("lastHeartbeatTime") + } + return err + } + } + + return nil +} + +func (m *Commonv3NodeCondition) validateLastTransitionTime(formats strfmt.Registry) error { + if swag.IsZero(m.LastTransitionTime) { // not required + return nil + } + + if m.LastTransitionTime != nil { + if err := m.LastTransitionTime.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("lastTransitionTime") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("lastTransitionTime") + } + return err + } + } + + return nil +} + +// ContextValidate validate this commonv3 node condition based on the context it is used +func (m *Commonv3NodeCondition) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateLastHeartbeatTime(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLastTransitionTime(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *Commonv3NodeCondition) contextValidateLastHeartbeatTime(ctx context.Context, formats strfmt.Registry) error { + + if m.LastHeartbeatTime != nil { + if err := m.LastHeartbeatTime.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("lastHeartbeatTime") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("lastHeartbeatTime") + } + return err + } + } + + return nil +} + +func (m *Commonv3NodeCondition) contextValidateLastTransitionTime(ctx context.Context, formats strfmt.Registry) error { + + if m.LastTransitionTime != nil { + if err := m.LastTransitionTime.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("lastTransitionTime") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("lastTransitionTime") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *Commonv3NodeCondition) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Commonv3NodeCondition) UnmarshalBinary(b []byte) error { + var res Commonv3NodeCondition + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/scheduler/models/commonv3_node_system_info.go b/components/common/api/def/clients/scheduler/models/commonv3_node_system_info.go new file mode 100644 index 0000000..0ea0a16 --- /dev/null +++ b/components/common/api/def/clients/scheduler/models/commonv3_node_system_info.go @@ -0,0 +1,83 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// Commonv3NodeSystemInfo NodeSystemInfo +// +// Node System Info +// +// swagger:model commonv3NodeSystemInfo +type Commonv3NodeSystemInfo struct { + + // The Architecture reported by the node + Architecture string `json:"architecture,omitempty"` + + // Boot ID reported by the node. + BootID string `json:"bootID,omitempty"` + + // ContainerRuntime Version reported by the node through runtime remote API (e.g. docker://1.5.0). + ContainerRuntimeVersion string `json:"containerRuntimeVersion,omitempty"` + + // Kernel Version reported by the node from 'uname -r' (e.g. 3.16.0-0.bpo.4-amd64). + KernelVersion string `json:"kernelVersion,omitempty"` + + // KubeProxy Version reported by the node. + KubeProxyVersion string `json:"kubeProxyVersion,omitempty"` + + // Kubelet Version reported by the node. + KubeletVersion string `json:"kubeletVersion,omitempty"` + + // MachineID reported by the node. For unique machine identification + // in the cluster this field is preferred. Learn more from man(5) + // machine-id: http://man7.org/linux/man-pages/man5/machine-id.5.html + MachineID string `json:"machineID,omitempty"` + + // The Operating System reported by the node + OperatingSystem string `json:"operatingSystem,omitempty"` + + // OS Image reported by the node from /etc/os-release (e.g. Debian GNU/Linux 7 (wheezy)). + OsImage string `json:"osImage,omitempty"` + + // SystemUUID reported by the node. For unique machine identification + // MachineID is preferred. This field is specific to Red Hat hosts + // https://access.redhat.com/documentation/en-us/red_hat_subscription_management/1/html/rhsm/uuid + SystemUUID string `json:"systemUUID,omitempty"` +} + +// Validate validates this commonv3 node system info +func (m *Commonv3NodeSystemInfo) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this commonv3 node system info based on context it is used +func (m *Commonv3NodeSystemInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *Commonv3NodeSystemInfo) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Commonv3NodeSystemInfo) UnmarshalBinary(b []byte) error { + var res Commonv3NodeSystemInfo + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/scheduler/models/commonv3_status.go b/components/common/api/def/clients/scheduler/models/commonv3_status.go new file mode 100644 index 0000000..f5e5828 --- /dev/null +++ b/components/common/api/def/clients/scheduler/models/commonv3_status.go @@ -0,0 +1,221 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// Commonv3Status Status +// +// status of a resource +// +// swagger:model commonv3Status +type Commonv3Status struct { + + // Condition Status + // + // status of the condition + // Read Only: true + // Enum: [StatusNotSet StatusSubmitted StatusOK StatusFailed] + ConditionStatus *V3ConditionStatus `json:"conditionStatus,omitempty"` + + // Condition Type + // + // type of the status condition + // Read Only: true + ConditionType string `json:"conditionType,omitempty"` + + // Last Updated + // + // when the condition status is last updated + // Read Only: true + // Format: date-time + LastUpdated strfmt.DateTime `json:"lastUpdated,omitempty"` + + // Reason + // + // reason of the last condition status + // Read Only: true + Reason string `json:"reason,omitempty"` +} + +// Validate validates this commonv3 status +func (m *Commonv3Status) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateConditionStatus(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLastUpdated(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var commonv3StatusTypeConditionStatusPropEnum []interface{} + +func init() { + var res []V3ConditionStatus + if err := json.Unmarshal([]byte(`["StatusNotSet","StatusSubmitted","StatusOK","StatusFailed"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + commonv3StatusTypeConditionStatusPropEnum = append(commonv3StatusTypeConditionStatusPropEnum, v) + } +} + +const ( + + // Commonv3StatusConditionStatusStatusNotSet captures enum value "StatusNotSet" + Commonv3StatusConditionStatusStatusNotSet V3ConditionStatus = "StatusNotSet" + + // Commonv3StatusConditionStatusStatusSubmitted captures enum value "StatusSubmitted" + Commonv3StatusConditionStatusStatusSubmitted V3ConditionStatus = "StatusSubmitted" + + // Commonv3StatusConditionStatusStatusOK captures enum value "StatusOK" + Commonv3StatusConditionStatusStatusOK V3ConditionStatus = "StatusOK" + + // Commonv3StatusConditionStatusStatusFailed captures enum value "StatusFailed" + Commonv3StatusConditionStatusStatusFailed V3ConditionStatus = "StatusFailed" +) + +// prop value enum +func (m *Commonv3Status) validateConditionStatusEnum(path, location string, value V3ConditionStatus) error { + if err := validate.EnumCase(path, location, value, commonv3StatusTypeConditionStatusPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *Commonv3Status) validateConditionStatus(formats strfmt.Registry) error { + if swag.IsZero(m.ConditionStatus) { // not required + return nil + } + + if m.ConditionStatus != nil { + if err := m.ConditionStatus.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("conditionStatus") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("conditionStatus") + } + return err + } + } + + return nil +} + +func (m *Commonv3Status) validateLastUpdated(formats strfmt.Registry) error { + if swag.IsZero(m.LastUpdated) { // not required + return nil + } + + if err := validate.FormatOf("lastUpdated", "body", "date-time", m.LastUpdated.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this commonv3 status based on the context it is used +func (m *Commonv3Status) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateConditionStatus(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateConditionType(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLastUpdated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateReason(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *Commonv3Status) contextValidateConditionStatus(ctx context.Context, formats strfmt.Registry) error { + + if m.ConditionStatus != nil { + if err := m.ConditionStatus.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("conditionStatus") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("conditionStatus") + } + return err + } + } + + return nil +} + +func (m *Commonv3Status) contextValidateConditionType(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "conditionType", "body", string(m.ConditionType)); err != nil { + return err + } + + return nil +} + +func (m *Commonv3Status) contextValidateLastUpdated(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "lastUpdated", "body", strfmt.DateTime(m.LastUpdated)); err != nil { + return err + } + + return nil +} + +func (m *Commonv3Status) contextValidateReason(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "reason", "body", string(m.Reason)); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *Commonv3Status) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Commonv3Status) UnmarshalBinary(b []byte) error { + var res Commonv3Status + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/scheduler/models/commonv3_taint.go b/components/common/api/def/clients/scheduler/models/commonv3_taint.go new file mode 100644 index 0000000..45cb5df --- /dev/null +++ b/components/common/api/def/clients/scheduler/models/commonv3_taint.go @@ -0,0 +1,118 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// Commonv3Taint Taint +// +// Taint of the cluster +// +// swagger:model commonv3Taint +type Commonv3Taint struct { + + // Required. The effect of the taint on pods + // that do not tolerate the taint. + // Valid effects are NoSchedule, PreferNoSchedule and NoExecute. + Effect string `json:"effect,omitempty"` + + // Required. The taint key to be applied to a node. + Key string `json:"key,omitempty"` + + // TimeAdded represents the time at which the taint was added. + // It is only written for NoExecute taints. + TimeAdded *Commonv3Time `json:"timeAdded,omitempty"` + + // The taint value corresponding to the taint key. + Value string `json:"value,omitempty"` +} + +// Validate validates this commonv3 taint +func (m *Commonv3Taint) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateTimeAdded(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *Commonv3Taint) validateTimeAdded(formats strfmt.Registry) error { + if swag.IsZero(m.TimeAdded) { // not required + return nil + } + + if m.TimeAdded != nil { + if err := m.TimeAdded.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("timeAdded") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("timeAdded") + } + return err + } + } + + return nil +} + +// ContextValidate validate this commonv3 taint based on the context it is used +func (m *Commonv3Taint) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateTimeAdded(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *Commonv3Taint) contextValidateTimeAdded(ctx context.Context, formats strfmt.Registry) error { + + if m.TimeAdded != nil { + if err := m.TimeAdded.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("timeAdded") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("timeAdded") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *Commonv3Taint) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Commonv3Taint) UnmarshalBinary(b []byte) error { + var res Commonv3Taint + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/scheduler/models/commonv3_time.go b/components/common/api/def/clients/scheduler/models/commonv3_time.go new file mode 100644 index 0000000..166843c --- /dev/null +++ b/components/common/api/def/clients/scheduler/models/commonv3_time.go @@ -0,0 +1,60 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// Commonv3Time Time +// +// Time +// +// swagger:model commonv3Time +type Commonv3Time struct { + + // Non-negative fractions of a second at nanosecond resolution. Negative + // second values with fractions must still have non-negative nanos values + // that count forward in time. Must be from 0 to 999,999,999 + // inclusive. This field may be limited in precision depending on context. + Nanos int32 `json:"nanos,omitempty"` + + // Represents seconds of UTC time since Unix epoch + // 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + // 9999-12-31T23:59:59Z inclusive. + Seconds string `json:"seconds,omitempty"` +} + +// Validate validates this commonv3 time +func (m *Commonv3Time) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this commonv3 time based on context it is used +func (m *Commonv3Time) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *Commonv3Time) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Commonv3Time) UnmarshalBinary(b []byte) error { + var res Commonv3Time + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/scheduler/models/googlerpc_status.go b/components/common/api/def/clients/scheduler/models/googlerpc_status.go new file mode 100644 index 0000000..dc0414a --- /dev/null +++ b/components/common/api/def/clients/scheduler/models/googlerpc_status.go @@ -0,0 +1,122 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// GooglerpcStatus googlerpc status +// +// swagger:model googlerpcStatus +type GooglerpcStatus struct { + + // code + Code int32 `json:"code,omitempty"` + + // details + Details []*ProtobufAny `json:"details"` + + // message + Message string `json:"message,omitempty"` +} + +// Validate validates this googlerpc status +func (m *GooglerpcStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDetails(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *GooglerpcStatus) validateDetails(formats strfmt.Registry) error { + if swag.IsZero(m.Details) { // not required + return nil + } + + for i := 0; i < len(m.Details); i++ { + if swag.IsZero(m.Details[i]) { // not required + continue + } + + if m.Details[i] != nil { + if err := m.Details[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("details" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("details" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this googlerpc status based on the context it is used +func (m *GooglerpcStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateDetails(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *GooglerpcStatus) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Details); i++ { + + if m.Details[i] != nil { + if err := m.Details[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("details" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("details" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *GooglerpcStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *GooglerpcStatus) UnmarshalBinary(b []byte) error { + var res GooglerpcStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/scheduler/models/protobuf_any.go b/components/common/api/def/clients/scheduler/models/protobuf_any.go new file mode 100644 index 0000000..cbc9799 --- /dev/null +++ b/components/common/api/def/clients/scheduler/models/protobuf_any.go @@ -0,0 +1,50 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// ProtobufAny protobuf any +// +// swagger:model protobufAny +type ProtobufAny struct { + + // at type + AtType string `json:"@type,omitempty"` +} + +// Validate validates this protobuf any +func (m *ProtobufAny) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this protobuf any based on context it is used +func (m *ProtobufAny) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *ProtobufAny) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ProtobufAny) UnmarshalBinary(b []byte) error { + var res ProtobufAny + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/scheduler/models/rpc_delete_cluster_response.go b/components/common/api/def/clients/scheduler/models/rpc_delete_cluster_response.go new file mode 100644 index 0000000..f7c1fff --- /dev/null +++ b/components/common/api/def/clients/scheduler/models/rpc_delete_cluster_response.go @@ -0,0 +1,11 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +// RPCDeleteClusterResponse rpc delete cluster response +// +// swagger:model rpcDeleteClusterResponse +type RPCDeleteClusterResponse interface{} diff --git a/components/common/api/def/clients/scheduler/models/rpc_register_cluster_request.go b/components/common/api/def/clients/scheduler/models/rpc_register_cluster_request.go new file mode 100644 index 0000000..0be4986 --- /dev/null +++ b/components/common/api/def/clients/scheduler/models/rpc_register_cluster_request.go @@ -0,0 +1,54 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// RPCRegisterClusterRequest rpc register cluster request +// +// swagger:model rpcRegisterClusterRequest +type RPCRegisterClusterRequest struct { + + // signing request + // Format: byte + SigningRequest strfmt.Base64 `json:"signingRequest,omitempty"` + + // token + Token string `json:"token,omitempty"` +} + +// Validate validates this rpc register cluster request +func (m *RPCRegisterClusterRequest) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this rpc register cluster request based on context it is used +func (m *RPCRegisterClusterRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *RPCRegisterClusterRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *RPCRegisterClusterRequest) UnmarshalBinary(b []byte) error { + var res RPCRegisterClusterRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/scheduler/models/rpc_register_cluster_response.go b/components/common/api/def/clients/scheduler/models/rpc_register_cluster_response.go new file mode 100644 index 0000000..bf924ba --- /dev/null +++ b/components/common/api/def/clients/scheduler/models/rpc_register_cluster_response.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// RPCRegisterClusterResponse rpc register cluster response +// +// swagger:model rpcRegisterClusterResponse +type RPCRegisterClusterResponse struct { + + // ca certificate + // Format: byte + CaCertificate strfmt.Base64 `json:"caCertificate,omitempty"` + + // certificate + // Format: byte + Certificate strfmt.Base64 `json:"certificate,omitempty"` +} + +// Validate validates this rpc register cluster response +func (m *RPCRegisterClusterResponse) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this rpc register cluster response based on context it is used +func (m *RPCRegisterClusterResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *RPCRegisterClusterResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *RPCRegisterClusterResponse) UnmarshalBinary(b []byte) error { + var res RPCRegisterClusterResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/scheduler/models/v1_node_condition.go b/components/common/api/def/clients/scheduler/models/v1_node_condition.go new file mode 100644 index 0000000..589b80e --- /dev/null +++ b/components/common/api/def/clients/scheduler/models/v1_node_condition.go @@ -0,0 +1,166 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1NodeCondition NodeCondition contains condition information for a node. +// +// swagger:model v1NodeCondition +type V1NodeCondition struct { + + // Last time we got an update on a given condition. + // +optional + LastHeartbeatTime *V1Time `json:"lastHeartbeatTime,omitempty"` + + // Last time the condition transit from one status to another. + // +optional + LastTransitionTime *V1Time `json:"lastTransitionTime,omitempty"` + + // Human readable message indicating details about last transition. + // +optional + Message string `json:"message,omitempty"` + + // (brief) reason for the condition's last transition. + // +optional + Reason string `json:"reason,omitempty"` + + // Status of the condition, one of True, False, Unknown. + Status string `json:"status,omitempty"` + + // Type of node condition. + Type string `json:"type,omitempty"` +} + +// Validate validates this v1 node condition +func (m *V1NodeCondition) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLastHeartbeatTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLastTransitionTime(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1NodeCondition) validateLastHeartbeatTime(formats strfmt.Registry) error { + if swag.IsZero(m.LastHeartbeatTime) { // not required + return nil + } + + if m.LastHeartbeatTime != nil { + if err := m.LastHeartbeatTime.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("lastHeartbeatTime") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("lastHeartbeatTime") + } + return err + } + } + + return nil +} + +func (m *V1NodeCondition) validateLastTransitionTime(formats strfmt.Registry) error { + if swag.IsZero(m.LastTransitionTime) { // not required + return nil + } + + if m.LastTransitionTime != nil { + if err := m.LastTransitionTime.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("lastTransitionTime") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("lastTransitionTime") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v1 node condition based on the context it is used +func (m *V1NodeCondition) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateLastHeartbeatTime(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLastTransitionTime(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1NodeCondition) contextValidateLastHeartbeatTime(ctx context.Context, formats strfmt.Registry) error { + + if m.LastHeartbeatTime != nil { + if err := m.LastHeartbeatTime.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("lastHeartbeatTime") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("lastHeartbeatTime") + } + return err + } + } + + return nil +} + +func (m *V1NodeCondition) contextValidateLastTransitionTime(ctx context.Context, formats strfmt.Registry) error { + + if m.LastTransitionTime != nil { + if err := m.LastTransitionTime.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("lastTransitionTime") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("lastTransitionTime") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1NodeCondition) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1NodeCondition) UnmarshalBinary(b []byte) error { + var res V1NodeCondition + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/scheduler/models/v1_node_system_info.go b/components/common/api/def/clients/scheduler/models/v1_node_system_info.go new file mode 100644 index 0000000..c1870b7 --- /dev/null +++ b/components/common/api/def/clients/scheduler/models/v1_node_system_info.go @@ -0,0 +1,81 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1NodeSystemInfo NodeSystemInfo is a set of ids/uuids to uniquely identify the node. +// +// swagger:model v1NodeSystemInfo +type V1NodeSystemInfo struct { + + // The Architecture reported by the node + Architecture string `json:"architecture,omitempty"` + + // Boot ID reported by the node. + BootID string `json:"bootID,omitempty"` + + // ContainerRuntime Version reported by the node through runtime remote API (e.g. docker://1.5.0). + ContainerRuntimeVersion string `json:"containerRuntimeVersion,omitempty"` + + // Kernel Version reported by the node from 'uname -r' (e.g. 3.16.0-0.bpo.4-amd64). + KernelVersion string `json:"kernelVersion,omitempty"` + + // KubeProxy Version reported by the node. + KubeProxyVersion string `json:"kubeProxyVersion,omitempty"` + + // Kubelet Version reported by the node. + KubeletVersion string `json:"kubeletVersion,omitempty"` + + // MachineID reported by the node. For unique machine identification + // in the cluster this field is preferred. Learn more from man(5) + // machine-id: http://man7.org/linux/man-pages/man5/machine-id.5.html + MachineID string `json:"machineID,omitempty"` + + // The Operating System reported by the node + OperatingSystem string `json:"operatingSystem,omitempty"` + + // OS Image reported by the node from /etc/os-release (e.g. Debian GNU/Linux 7 (wheezy)). + OsImage string `json:"osImage,omitempty"` + + // SystemUUID reported by the node. For unique machine identification + // MachineID is preferred. This field is specific to Red Hat hosts + // https://access.redhat.com/documentation/en-us/red_hat_subscription_management/1/html/rhsm/uuid + SystemUUID string `json:"systemUUID,omitempty"` +} + +// Validate validates this v1 node system info +func (m *V1NodeSystemInfo) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v1 node system info based on context it is used +func (m *V1NodeSystemInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1NodeSystemInfo) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1NodeSystemInfo) UnmarshalBinary(b []byte) error { + var res V1NodeSystemInfo + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/scheduler/models/v1_taint.go b/components/common/api/def/clients/scheduler/models/v1_taint.go new file mode 100644 index 0000000..dc01be1 --- /dev/null +++ b/components/common/api/def/clients/scheduler/models/v1_taint.go @@ -0,0 +1,119 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1Taint The node this Taint is attached to has the "effect" on +// any pod that does not tolerate the Taint. +// +// swagger:model v1Taint +type V1Taint struct { + + // Required. The effect of the taint on pods + // that do not tolerate the taint. + // Valid effects are NoSchedule, PreferNoSchedule and NoExecute. + Effect string `json:"effect,omitempty"` + + // Required. The taint key to be applied to a node. + Key string `json:"key,omitempty"` + + // TimeAdded represents the time at which the taint was added. + // It is only written for NoExecute taints. + // +optional + TimeAdded *V1Time `json:"timeAdded,omitempty"` + + // The taint value corresponding to the taint key. + // +optional + Value string `json:"value,omitempty"` +} + +// Validate validates this v1 taint +func (m *V1Taint) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateTimeAdded(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1Taint) validateTimeAdded(formats strfmt.Registry) error { + if swag.IsZero(m.TimeAdded) { // not required + return nil + } + + if m.TimeAdded != nil { + if err := m.TimeAdded.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("timeAdded") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("timeAdded") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v1 taint based on the context it is used +func (m *V1Taint) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateTimeAdded(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1Taint) contextValidateTimeAdded(ctx context.Context, formats strfmt.Registry) error { + + if m.TimeAdded != nil { + if err := m.TimeAdded.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("timeAdded") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("timeAdded") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1Taint) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1Taint) UnmarshalBinary(b []byte) error { + var res V1Taint + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/scheduler/models/v1_time.go b/components/common/api/def/clients/scheduler/models/v1_time.go new file mode 100644 index 0000000..1e143c1 --- /dev/null +++ b/components/common/api/def/clients/scheduler/models/v1_time.go @@ -0,0 +1,64 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1Time Time is a wrapper around time.Time which supports correct +// marshaling to YAML and JSON. Wrappers are provided for many +// of the factory methods that the time package offers. +// +// +protobuf.options.marshal=false +// +protobuf.as=Timestamp +// +protobuf.options.(gogoproto.goproto_stringer)=false +// +// swagger:model v1Time +type V1Time struct { + + // Non-negative fractions of a second at nanosecond resolution. Negative + // second values with fractions must still have non-negative nanos values + // that count forward in time. Must be from 0 to 999,999,999 + // inclusive. This field may be limited in precision depending on context. + Nanos int32 `json:"nanos,omitempty"` + + // Represents seconds of UTC time since Unix epoch + // 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + // 9999-12-31T23:59:59Z inclusive. + Seconds string `json:"seconds,omitempty"` +} + +// Validate validates this v1 time +func (m *V1Time) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v1 time based on context it is used +func (m *V1Time) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1Time) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1Time) UnmarshalBinary(b []byte) error { + var res V1Time + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/scheduler/models/v3_cluster.go b/components/common/api/def/clients/scheduler/models/v3_cluster.go new file mode 100644 index 0000000..7273945 --- /dev/null +++ b/components/common/api/def/clients/scheduler/models/v3_cluster.go @@ -0,0 +1,276 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V3Cluster Cluster +// +// Cluster +// +// swagger:model v3Cluster +type V3Cluster struct { + + // API Version + // + // API Version of the resource + // Required: true + // Read Only: true + APIVersion string `json:"apiVersion"` + + // Kind + // + // Kind of the resource + // Required: true + // Read Only: true + Kind string `json:"kind"` + + // Metadata + // + // Metadata of the resource + // Required: true + Metadata *V3Metadata `json:"metadata"` + + // Spec + // + // Spec of the resource + // Required: true + Spec *V3ClusterSpec `json:"spec"` + + // Status + // + // Status of the resource + // Read Only: true + Status *Commonv3Status `json:"status,omitempty"` +} + +// Validate validates this v3 cluster +func (m *V3Cluster) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAPIVersion(formats); err != nil { + res = append(res, err) + } + + if err := m.validateKind(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V3Cluster) validateAPIVersion(formats strfmt.Registry) error { + + if err := validate.RequiredString("apiVersion", "body", m.APIVersion); err != nil { + return err + } + + return nil +} + +func (m *V3Cluster) validateKind(formats strfmt.Registry) error { + + if err := validate.RequiredString("kind", "body", m.Kind); err != nil { + return err + } + + return nil +} + +func (m *V3Cluster) validateMetadata(formats strfmt.Registry) error { + + if err := validate.Required("metadata", "body", m.Metadata); err != nil { + return err + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V3Cluster) validateSpec(formats strfmt.Registry) error { + + if err := validate.Required("spec", "body", m.Spec); err != nil { + return err + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V3Cluster) validateStatus(formats strfmt.Registry) error { + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("status") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v3 cluster based on the context it is used +func (m *V3Cluster) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateAPIVersion(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateKind(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateMetadata(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateSpec(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateStatus(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V3Cluster) contextValidateAPIVersion(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "apiVersion", "body", string(m.APIVersion)); err != nil { + return err + } + + return nil +} + +func (m *V3Cluster) contextValidateKind(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "kind", "body", string(m.Kind)); err != nil { + return err + } + + return nil +} + +func (m *V3Cluster) contextValidateMetadata(ctx context.Context, formats strfmt.Registry) error { + + if m.Metadata != nil { + if err := m.Metadata.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V3Cluster) contextValidateSpec(ctx context.Context, formats strfmt.Registry) error { + + if m.Spec != nil { + if err := m.Spec.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V3Cluster) contextValidateStatus(ctx context.Context, formats strfmt.Registry) error { + + if m.Status != nil { + if err := m.Status.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V3Cluster) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V3Cluster) UnmarshalBinary(b []byte) error { + var res V3Cluster + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/scheduler/models/v3_cluster_condition.go b/components/common/api/def/clients/scheduler/models/v3_cluster_condition.go new file mode 100644 index 0000000..d6f469a --- /dev/null +++ b/components/common/api/def/clients/scheduler/models/v3_cluster_condition.go @@ -0,0 +1,182 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V3ClusterCondition v3 cluster condition +// +// swagger:model v3ClusterCondition +type V3ClusterCondition struct { + + // Cluster condition last updated + // + // Cluster condition last updated + // Format: date-time + LastUpdated strfmt.DateTime `json:"lastUpdated,omitempty"` + + // Reason of cluster condition + // + // Reason of cluster condition + Reason string `json:"reason,omitempty"` + + // Cluster Condition Status + // + // Current status of the cluster + Status *V3RafayConditionStatus `json:"status,omitempty"` + + // Cluster Information + // + // Override selector of the cluster + Type *V3ClusterConditionType `json:"type,omitempty"` +} + +// Validate validates this v3 cluster condition +func (m *V3ClusterCondition) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLastUpdated(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if err := m.validateType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V3ClusterCondition) validateLastUpdated(formats strfmt.Registry) error { + if swag.IsZero(m.LastUpdated) { // not required + return nil + } + + if err := validate.FormatOf("lastUpdated", "body", "date-time", m.LastUpdated.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *V3ClusterCondition) validateStatus(formats strfmt.Registry) error { + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("status") + } + return err + } + } + + return nil +} + +func (m *V3ClusterCondition) validateType(formats strfmt.Registry) error { + if swag.IsZero(m.Type) { // not required + return nil + } + + if m.Type != nil { + if err := m.Type.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("type") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v3 cluster condition based on the context it is used +func (m *V3ClusterCondition) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateStatus(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateType(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V3ClusterCondition) contextValidateStatus(ctx context.Context, formats strfmt.Registry) error { + + if m.Status != nil { + if err := m.Status.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("status") + } + return err + } + } + + return nil +} + +func (m *V3ClusterCondition) contextValidateType(ctx context.Context, formats strfmt.Registry) error { + + if m.Type != nil { + if err := m.Type.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("type") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V3ClusterCondition) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V3ClusterCondition) UnmarshalBinary(b []byte) error { + var res V3ClusterCondition + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/scheduler/models/v3_cluster_condition_type.go b/components/common/api/def/clients/scheduler/models/v3_cluster_condition_type.go new file mode 100644 index 0000000..203fed0 --- /dev/null +++ b/components/common/api/def/clients/scheduler/models/v3_cluster_condition_type.go @@ -0,0 +1,102 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" +) + +// V3ClusterConditionType v3 cluster condition type +// +// swagger:model v3ClusterConditionType +type V3ClusterConditionType string + +func NewV3ClusterConditionType(value V3ClusterConditionType) *V3ClusterConditionType { + return &value +} + +// Pointer returns a pointer to a freshly-allocated V3ClusterConditionType. +func (m V3ClusterConditionType) Pointer() *V3ClusterConditionType { + return &m +} + +const ( + + // V3ClusterConditionTypeClusterRegister captures enum value "ClusterRegister" + V3ClusterConditionTypeClusterRegister V3ClusterConditionType = "ClusterRegister" + + // V3ClusterConditionTypeClusterApprove captures enum value "ClusterApprove" + V3ClusterConditionTypeClusterApprove V3ClusterConditionType = "ClusterApprove" + + // V3ClusterConditionTypeClusterCheckIn captures enum value "ClusterCheckIn" + V3ClusterConditionTypeClusterCheckIn V3ClusterConditionType = "ClusterCheckIn" + + // V3ClusterConditionTypeClusterNodeSync captures enum value "ClusterNodeSync" + V3ClusterConditionTypeClusterNodeSync V3ClusterConditionType = "ClusterNodeSync" + + // V3ClusterConditionTypeClusterBlueprintSync captures enum value "ClusterBlueprintSync" + V3ClusterConditionTypeClusterBlueprintSync V3ClusterConditionType = "ClusterBlueprintSync" + + // V3ClusterConditionTypeClusterNamespaceSync captures enum value "ClusterNamespaceSync" + V3ClusterConditionTypeClusterNamespaceSync V3ClusterConditionType = "ClusterNamespaceSync" + + // V3ClusterConditionTypeClusterReady captures enum value "ClusterReady" + V3ClusterConditionTypeClusterReady V3ClusterConditionType = "ClusterReady" + + // V3ClusterConditionTypeClusterAuxiliaryTaskSync captures enum value "ClusterAuxiliaryTaskSync" + V3ClusterConditionTypeClusterAuxiliaryTaskSync V3ClusterConditionType = "ClusterAuxiliaryTaskSync" + + // V3ClusterConditionTypeClusterBootstrapAgent captures enum value "ClusterBootstrapAgent" + V3ClusterConditionTypeClusterBootstrapAgent V3ClusterConditionType = "ClusterBootstrapAgent" + + // V3ClusterConditionTypeClusterDelete captures enum value "ClusterDelete" + V3ClusterConditionTypeClusterDelete V3ClusterConditionType = "ClusterDelete" +) + +// for schema +var v3ClusterConditionTypeEnum []interface{} + +func init() { + var res []V3ClusterConditionType + if err := json.Unmarshal([]byte(`["ClusterRegister","ClusterApprove","ClusterCheckIn","ClusterNodeSync","ClusterBlueprintSync","ClusterNamespaceSync","ClusterReady","ClusterAuxiliaryTaskSync","ClusterBootstrapAgent","ClusterDelete"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v3ClusterConditionTypeEnum = append(v3ClusterConditionTypeEnum, v) + } +} + +func (m V3ClusterConditionType) validateV3ClusterConditionTypeEnum(path, location string, value V3ClusterConditionType) error { + if err := validate.EnumCase(path, location, value, v3ClusterConditionTypeEnum, true); err != nil { + return err + } + return nil +} + +// Validate validates this v3 cluster condition type +func (m V3ClusterConditionType) Validate(formats strfmt.Registry) error { + var res []error + + // value enum + if err := m.validateV3ClusterConditionTypeEnum("", "body", m); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// ContextValidate validates this v3 cluster condition type based on context it is used +func (m V3ClusterConditionType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} diff --git a/components/common/api/def/clients/scheduler/models/v3_cluster_data.go b/components/common/api/def/clients/scheduler/models/v3_cluster_data.go new file mode 100644 index 0000000..98d1c71 --- /dev/null +++ b/components/common/api/def/clients/scheduler/models/v3_cluster_data.go @@ -0,0 +1,409 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V3ClusterData v3 cluster data +// +// swagger:model v3ClusterData +type V3ClusterData struct { + + // DNS A Record + // + // Entry for DNS A Record + // Read Only: true + Arecord string `json:"arecord,omitempty"` + + // ClusterBlueprint + // + // Cluster Blueprint + // Read Only: true + ClusterBlueprint string `json:"clusterBlueprint,omitempty"` + + // ClusterStatus + // + // Cluster Status + // Read Only: true + ClusterStatus *V3ClusterStatus `json:"clusterStatus,omitempty"` + + // CNAME + // + // cname of the cluster + // Read Only: true + Cname string `json:"cname,omitempty"` + + // Display Name + // + // Display Name + // Read Only: true + DisplayName string `json:"displayName,omitempty"` + + // Health + // + // Health + // Read Only: true + Health *V3Health `json:"health,omitempty"` + + // Manufacturer + // + // Manufacturer + // Read Only: true + Manufacturer string `json:"manufacturer,omitempty"` + + // Cluster Information + // + // Override selector of the cluster + Nodes []*V3ClusterNode `json:"nodes"` + + // Passphrase + // + // passphrase of the cluster + // Read Only: true + Passphrase string `json:"passphrase,omitempty"` + + // Cluster Information + // + // Override selector of the cluster + Projects []*V3ProjectCluster `json:"projects"` + + // Provider + // + // Provider + // Read Only: true + Provider string `json:"provider,omitempty"` +} + +// Validate validates this v3 cluster data +func (m *V3ClusterData) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusterStatus(formats); err != nil { + res = append(res, err) + } + + if err := m.validateHealth(formats); err != nil { + res = append(res, err) + } + + if err := m.validateNodes(formats); err != nil { + res = append(res, err) + } + + if err := m.validateProjects(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V3ClusterData) validateClusterStatus(formats strfmt.Registry) error { + if swag.IsZero(m.ClusterStatus) { // not required + return nil + } + + if m.ClusterStatus != nil { + if err := m.ClusterStatus.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterStatus") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("clusterStatus") + } + return err + } + } + + return nil +} + +func (m *V3ClusterData) validateHealth(formats strfmt.Registry) error { + if swag.IsZero(m.Health) { // not required + return nil + } + + if m.Health != nil { + if err := m.Health.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("health") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("health") + } + return err + } + } + + return nil +} + +func (m *V3ClusterData) validateNodes(formats strfmt.Registry) error { + if swag.IsZero(m.Nodes) { // not required + return nil + } + + for i := 0; i < len(m.Nodes); i++ { + if swag.IsZero(m.Nodes[i]) { // not required + continue + } + + if m.Nodes[i] != nil { + if err := m.Nodes[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("nodes" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("nodes" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V3ClusterData) validateProjects(formats strfmt.Registry) error { + if swag.IsZero(m.Projects) { // not required + return nil + } + + for i := 0; i < len(m.Projects); i++ { + if swag.IsZero(m.Projects[i]) { // not required + continue + } + + if m.Projects[i] != nil { + if err := m.Projects[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("projects" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("projects" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this v3 cluster data based on the context it is used +func (m *V3ClusterData) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateArecord(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateClusterBlueprint(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateClusterStatus(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateCname(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateDisplayName(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateHealth(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateManufacturer(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateNodes(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidatePassphrase(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateProjects(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateProvider(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V3ClusterData) contextValidateArecord(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "arecord", "body", string(m.Arecord)); err != nil { + return err + } + + return nil +} + +func (m *V3ClusterData) contextValidateClusterBlueprint(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "clusterBlueprint", "body", string(m.ClusterBlueprint)); err != nil { + return err + } + + return nil +} + +func (m *V3ClusterData) contextValidateClusterStatus(ctx context.Context, formats strfmt.Registry) error { + + if m.ClusterStatus != nil { + if err := m.ClusterStatus.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterStatus") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("clusterStatus") + } + return err + } + } + + return nil +} + +func (m *V3ClusterData) contextValidateCname(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "cname", "body", string(m.Cname)); err != nil { + return err + } + + return nil +} + +func (m *V3ClusterData) contextValidateDisplayName(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "displayName", "body", string(m.DisplayName)); err != nil { + return err + } + + return nil +} + +func (m *V3ClusterData) contextValidateHealth(ctx context.Context, formats strfmt.Registry) error { + + if m.Health != nil { + if err := m.Health.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("health") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("health") + } + return err + } + } + + return nil +} + +func (m *V3ClusterData) contextValidateManufacturer(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "manufacturer", "body", string(m.Manufacturer)); err != nil { + return err + } + + return nil +} + +func (m *V3ClusterData) contextValidateNodes(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Nodes); i++ { + + if m.Nodes[i] != nil { + if err := m.Nodes[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("nodes" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("nodes" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V3ClusterData) contextValidatePassphrase(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "passphrase", "body", string(m.Passphrase)); err != nil { + return err + } + + return nil +} + +func (m *V3ClusterData) contextValidateProjects(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Projects); i++ { + + if m.Projects[i] != nil { + if err := m.Projects[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("projects" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("projects" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V3ClusterData) contextValidateProvider(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "provider", "body", string(m.Provider)); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V3ClusterData) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V3ClusterData) UnmarshalBinary(b []byte) error { + var res V3ClusterData + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/scheduler/models/v3_cluster_list.go b/components/common/api/def/clients/scheduler/models/v3_cluster_list.go new file mode 100644 index 0000000..0266634 --- /dev/null +++ b/components/common/api/def/clients/scheduler/models/v3_cluster_list.go @@ -0,0 +1,211 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V3ClusterList v3 cluster list +// +// swagger:model v3ClusterList +type V3ClusterList struct { + + // API Version + // + // API Version of the list resource + // Read Only: true + APIVersion string `json:"apiVersion,omitempty"` + + // Items + // + // List of the resources + // Read Only: true + Items []*V3Cluster `json:"items"` + + // Kind + // + // Kind of the list resource + // Read Only: true + Kind string `json:"kind,omitempty"` + + // ListMetadata + // + // Metadata of the list resource + // Read Only: true + Metadata *V3ListMetadata `json:"metadata,omitempty"` +} + +// Validate validates this v3 cluster list +func (m *V3ClusterList) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V3ClusterList) validateItems(formats strfmt.Registry) error { + if swag.IsZero(m.Items) { // not required + return nil + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V3ClusterList) validateMetadata(formats strfmt.Registry) error { + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("metadata") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v3 cluster list based on the context it is used +func (m *V3ClusterList) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateAPIVersion(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateItems(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateKind(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateMetadata(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V3ClusterList) contextValidateAPIVersion(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "apiVersion", "body", string(m.APIVersion)); err != nil { + return err + } + + return nil +} + +func (m *V3ClusterList) contextValidateItems(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "items", "body", []*V3Cluster(m.Items)); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + + if m.Items[i] != nil { + if err := m.Items[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V3ClusterList) contextValidateKind(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "kind", "body", string(m.Kind)); err != nil { + return err + } + + return nil +} + +func (m *V3ClusterList) contextValidateMetadata(ctx context.Context, formats strfmt.Registry) error { + + if m.Metadata != nil { + if err := m.Metadata.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("metadata") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V3ClusterList) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V3ClusterList) UnmarshalBinary(b []byte) error { + var res V3ClusterList + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/scheduler/models/v3_cluster_node.go b/components/common/api/def/clients/scheduler/models/v3_cluster_node.go new file mode 100644 index 0000000..08db4ba --- /dev/null +++ b/components/common/api/def/clients/scheduler/models/v3_cluster_node.go @@ -0,0 +1,196 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V3ClusterNode v3 cluster node +// +// swagger:model v3ClusterNode +type V3ClusterNode struct { + + // metadata + Metadata *V3Metadata `json:"metadata,omitempty"` + + // spec + Spec *V3ClusterNodeSpec `json:"spec,omitempty"` + + // status + Status *V3ClusterNodeStatus `json:"status,omitempty"` +} + +// Validate validates this v3 cluster node +func (m *V3ClusterNode) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V3ClusterNode) validateMetadata(formats strfmt.Registry) error { + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V3ClusterNode) validateSpec(formats strfmt.Registry) error { + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V3ClusterNode) validateStatus(formats strfmt.Registry) error { + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("status") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v3 cluster node based on the context it is used +func (m *V3ClusterNode) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateMetadata(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateSpec(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateStatus(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V3ClusterNode) contextValidateMetadata(ctx context.Context, formats strfmt.Registry) error { + + if m.Metadata != nil { + if err := m.Metadata.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V3ClusterNode) contextValidateSpec(ctx context.Context, formats strfmt.Registry) error { + + if m.Spec != nil { + if err := m.Spec.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V3ClusterNode) contextValidateStatus(ctx context.Context, formats strfmt.Registry) error { + + if m.Status != nil { + if err := m.Status.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V3ClusterNode) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V3ClusterNode) UnmarshalBinary(b []byte) error { + var res V3ClusterNode + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/scheduler/models/v3_cluster_node_ip.go b/components/common/api/def/clients/scheduler/models/v3_cluster_node_ip.go new file mode 100644 index 0000000..3e79b03 --- /dev/null +++ b/components/common/api/def/clients/scheduler/models/v3_cluster_node_ip.go @@ -0,0 +1,53 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V3ClusterNodeIP v3 cluster node IP +// +// swagger:model v3ClusterNodeIP +type V3ClusterNodeIP struct { + + // private IP + PrivateIP string `json:"privateIP,omitempty"` + + // public IP + PublicIP string `json:"publicIP,omitempty"` +} + +// Validate validates this v3 cluster node IP +func (m *V3ClusterNodeIP) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v3 cluster node IP based on context it is used +func (m *V3ClusterNodeIP) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V3ClusterNodeIP) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V3ClusterNodeIP) UnmarshalBinary(b []byte) error { + var res V3ClusterNodeIP + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/scheduler/models/v3_cluster_node_spec.go b/components/common/api/def/clients/scheduler/models/v3_cluster_node_spec.go new file mode 100644 index 0000000..e0772d6 --- /dev/null +++ b/components/common/api/def/clients/scheduler/models/v3_cluster_node_spec.go @@ -0,0 +1,119 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V3ClusterNodeSpec v3 cluster node spec +// +// swagger:model v3ClusterNodeSpec +type V3ClusterNodeSpec struct { + + // taints + Taints []*V1Taint `json:"taints"` + + // unschedulable + Unschedulable bool `json:"unschedulable,omitempty"` +} + +// Validate validates this v3 cluster node spec +func (m *V3ClusterNodeSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateTaints(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V3ClusterNodeSpec) validateTaints(formats strfmt.Registry) error { + if swag.IsZero(m.Taints) { // not required + return nil + } + + for i := 0; i < len(m.Taints); i++ { + if swag.IsZero(m.Taints[i]) { // not required + continue + } + + if m.Taints[i] != nil { + if err := m.Taints[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("taints" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("taints" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this v3 cluster node spec based on the context it is used +func (m *V3ClusterNodeSpec) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateTaints(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V3ClusterNodeSpec) contextValidateTaints(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Taints); i++ { + + if m.Taints[i] != nil { + if err := m.Taints[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("taints" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("taints" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V3ClusterNodeSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V3ClusterNodeSpec) UnmarshalBinary(b []byte) error { + var res V3ClusterNodeSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/scheduler/models/v3_cluster_node_state.go b/components/common/api/def/clients/scheduler/models/v3_cluster_node_state.go new file mode 100644 index 0000000..6894a13 --- /dev/null +++ b/components/common/api/def/clients/scheduler/models/v3_cluster_node_state.go @@ -0,0 +1,81 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" +) + +// V3ClusterNodeState v3 cluster node state +// +// swagger:model v3ClusterNodeState +type V3ClusterNodeState string + +func NewV3ClusterNodeState(value V3ClusterNodeState) *V3ClusterNodeState { + return &value +} + +// Pointer returns a pointer to a freshly-allocated V3ClusterNodeState. +func (m V3ClusterNodeState) Pointer() *V3ClusterNodeState { + return &m +} + +const ( + + // V3ClusterNodeStateClusterNodeCreated captures enum value "ClusterNodeCreated" + V3ClusterNodeStateClusterNodeCreated V3ClusterNodeState = "ClusterNodeCreated" + + // V3ClusterNodeStateClusterNodeNotReady captures enum value "ClusterNodeNotReady" + V3ClusterNodeStateClusterNodeNotReady V3ClusterNodeState = "ClusterNodeNotReady" + + // V3ClusterNodeStateClusterNodeReady captures enum value "ClusterNodeReady" + V3ClusterNodeStateClusterNodeReady V3ClusterNodeState = "ClusterNodeReady" +) + +// for schema +var v3ClusterNodeStateEnum []interface{} + +func init() { + var res []V3ClusterNodeState + if err := json.Unmarshal([]byte(`["ClusterNodeCreated","ClusterNodeNotReady","ClusterNodeReady"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v3ClusterNodeStateEnum = append(v3ClusterNodeStateEnum, v) + } +} + +func (m V3ClusterNodeState) validateV3ClusterNodeStateEnum(path, location string, value V3ClusterNodeState) error { + if err := validate.EnumCase(path, location, value, v3ClusterNodeStateEnum, true); err != nil { + return err + } + return nil +} + +// Validate validates this v3 cluster node state +func (m V3ClusterNodeState) Validate(formats strfmt.Registry) error { + var res []error + + // value enum + if err := m.validateV3ClusterNodeStateEnum("", "body", m); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// ContextValidate validates this v3 cluster node state based on context it is used +func (m V3ClusterNodeState) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} diff --git a/components/common/api/def/clients/scheduler/models/v3_cluster_node_status.go b/components/common/api/def/clients/scheduler/models/v3_cluster_node_status.go new file mode 100644 index 0000000..75aaf57 --- /dev/null +++ b/components/common/api/def/clients/scheduler/models/v3_cluster_node_status.go @@ -0,0 +1,403 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V3ClusterNodeStatus v3 cluster node status +// +// swagger:model v3ClusterNodeStatus +type V3ClusterNodeStatus struct { + + // allocatable + Allocatable *V3Resources `json:"allocatable,omitempty"` + + // allocated + Allocated *V3Resources `json:"allocated,omitempty"` + + // capacity + Capacity *V3Resources `json:"capacity,omitempty"` + + // conditions + Conditions []*V1NodeCondition `json:"conditions"` + + // ips + Ips []*V3ClusterNodeIP `json:"ips"` + + // node info + NodeInfo *V1NodeSystemInfo `json:"nodeInfo,omitempty"` + + // state + State *V3ClusterNodeState `json:"state,omitempty"` +} + +// Validate validates this v3 cluster node status +func (m *V3ClusterNodeStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAllocatable(formats); err != nil { + res = append(res, err) + } + + if err := m.validateAllocated(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCapacity(formats); err != nil { + res = append(res, err) + } + + if err := m.validateConditions(formats); err != nil { + res = append(res, err) + } + + if err := m.validateIps(formats); err != nil { + res = append(res, err) + } + + if err := m.validateNodeInfo(formats); err != nil { + res = append(res, err) + } + + if err := m.validateState(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V3ClusterNodeStatus) validateAllocatable(formats strfmt.Registry) error { + if swag.IsZero(m.Allocatable) { // not required + return nil + } + + if m.Allocatable != nil { + if err := m.Allocatable.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("allocatable") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("allocatable") + } + return err + } + } + + return nil +} + +func (m *V3ClusterNodeStatus) validateAllocated(formats strfmt.Registry) error { + if swag.IsZero(m.Allocated) { // not required + return nil + } + + if m.Allocated != nil { + if err := m.Allocated.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("allocated") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("allocated") + } + return err + } + } + + return nil +} + +func (m *V3ClusterNodeStatus) validateCapacity(formats strfmt.Registry) error { + if swag.IsZero(m.Capacity) { // not required + return nil + } + + if m.Capacity != nil { + if err := m.Capacity.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("capacity") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("capacity") + } + return err + } + } + + return nil +} + +func (m *V3ClusterNodeStatus) validateConditions(formats strfmt.Registry) error { + if swag.IsZero(m.Conditions) { // not required + return nil + } + + for i := 0; i < len(m.Conditions); i++ { + if swag.IsZero(m.Conditions[i]) { // not required + continue + } + + if m.Conditions[i] != nil { + if err := m.Conditions[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("conditions" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("conditions" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V3ClusterNodeStatus) validateIps(formats strfmt.Registry) error { + if swag.IsZero(m.Ips) { // not required + return nil + } + + for i := 0; i < len(m.Ips); i++ { + if swag.IsZero(m.Ips[i]) { // not required + continue + } + + if m.Ips[i] != nil { + if err := m.Ips[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("ips" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("ips" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V3ClusterNodeStatus) validateNodeInfo(formats strfmt.Registry) error { + if swag.IsZero(m.NodeInfo) { // not required + return nil + } + + if m.NodeInfo != nil { + if err := m.NodeInfo.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("nodeInfo") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("nodeInfo") + } + return err + } + } + + return nil +} + +func (m *V3ClusterNodeStatus) validateState(formats strfmt.Registry) error { + if swag.IsZero(m.State) { // not required + return nil + } + + if m.State != nil { + if err := m.State.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("state") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("state") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v3 cluster node status based on the context it is used +func (m *V3ClusterNodeStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateAllocatable(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateAllocated(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateCapacity(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateConditions(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateIps(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateNodeInfo(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateState(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V3ClusterNodeStatus) contextValidateAllocatable(ctx context.Context, formats strfmt.Registry) error { + + if m.Allocatable != nil { + if err := m.Allocatable.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("allocatable") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("allocatable") + } + return err + } + } + + return nil +} + +func (m *V3ClusterNodeStatus) contextValidateAllocated(ctx context.Context, formats strfmt.Registry) error { + + if m.Allocated != nil { + if err := m.Allocated.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("allocated") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("allocated") + } + return err + } + } + + return nil +} + +func (m *V3ClusterNodeStatus) contextValidateCapacity(ctx context.Context, formats strfmt.Registry) error { + + if m.Capacity != nil { + if err := m.Capacity.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("capacity") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("capacity") + } + return err + } + } + + return nil +} + +func (m *V3ClusterNodeStatus) contextValidateConditions(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Conditions); i++ { + + if m.Conditions[i] != nil { + if err := m.Conditions[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("conditions" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("conditions" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V3ClusterNodeStatus) contextValidateIps(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Ips); i++ { + + if m.Ips[i] != nil { + if err := m.Ips[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("ips" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("ips" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V3ClusterNodeStatus) contextValidateNodeInfo(ctx context.Context, formats strfmt.Registry) error { + + if m.NodeInfo != nil { + if err := m.NodeInfo.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("nodeInfo") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("nodeInfo") + } + return err + } + } + + return nil +} + +func (m *V3ClusterNodeStatus) contextValidateState(ctx context.Context, formats strfmt.Registry) error { + + if m.State != nil { + if err := m.State.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("state") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("state") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V3ClusterNodeStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V3ClusterNodeStatus) UnmarshalBinary(b []byte) error { + var res V3ClusterNodeStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/scheduler/models/v3_cluster_share_mode.go b/components/common/api/def/clients/scheduler/models/v3_cluster_share_mode.go new file mode 100644 index 0000000..2a909b2 --- /dev/null +++ b/components/common/api/def/clients/scheduler/models/v3_cluster_share_mode.go @@ -0,0 +1,81 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" +) + +// V3ClusterShareMode v3 cluster share mode +// +// swagger:model v3ClusterShareMode +type V3ClusterShareMode string + +func NewV3ClusterShareMode(value V3ClusterShareMode) *V3ClusterShareMode { + return &value +} + +// Pointer returns a pointer to a freshly-allocated V3ClusterShareMode. +func (m V3ClusterShareMode) Pointer() *V3ClusterShareMode { + return &m +} + +const ( + + // V3ClusterShareModeClusterShareModeNotSet captures enum value "ClusterShareModeNotSet" + V3ClusterShareModeClusterShareModeNotSet V3ClusterShareMode = "ClusterShareModeNotSet" + + // V3ClusterShareModeALL captures enum value "ALL" + V3ClusterShareModeALL V3ClusterShareMode = "ALL" + + // V3ClusterShareModeCUSTOM captures enum value "CUSTOM" + V3ClusterShareModeCUSTOM V3ClusterShareMode = "CUSTOM" +) + +// for schema +var v3ClusterShareModeEnum []interface{} + +func init() { + var res []V3ClusterShareMode + if err := json.Unmarshal([]byte(`["ClusterShareModeNotSet","ALL","CUSTOM"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v3ClusterShareModeEnum = append(v3ClusterShareModeEnum, v) + } +} + +func (m V3ClusterShareMode) validateV3ClusterShareModeEnum(path, location string, value V3ClusterShareMode) error { + if err := validate.EnumCase(path, location, value, v3ClusterShareModeEnum, true); err != nil { + return err + } + return nil +} + +// Validate validates this v3 cluster share mode +func (m V3ClusterShareMode) Validate(formats strfmt.Registry) error { + var res []error + + // value enum + if err := m.validateV3ClusterShareModeEnum("", "body", m); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// ContextValidate validates this v3 cluster share mode based on context it is used +func (m V3ClusterShareMode) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} diff --git a/components/common/api/def/clients/scheduler/models/v3_cluster_spec.go b/components/common/api/def/clients/scheduler/models/v3_cluster_spec.go new file mode 100644 index 0000000..fefcd89 --- /dev/null +++ b/components/common/api/def/clients/scheduler/models/v3_cluster_spec.go @@ -0,0 +1,309 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V3ClusterSpec v3 cluster spec +// +// swagger:model v3ClusterSpec +type V3ClusterSpec struct { + + // Cluster Information + // + // Override selector of the cluster + // Read Only: true + ClusterData *V3ClusterData `json:"clusterData,omitempty"` + + // Cluster Type + // + // Type of the cluster being created + ClusterType *string `json:"clusterType,omitempty"` + + // Location + // + // Location of the cluster + Metro *V3Metro `json:"metro,omitempty"` + + // Override Selector + // + // Override selector of the cluster + OverrideSelector string `json:"overrideSelector,omitempty"` + + // Provision Params + // + // Cluster provisioning params + Params *V3ProvisionParams `json:"params,omitempty"` + + // ProxyConfig + // + // Override selector of the cluster + ProxyConfig *V3ProxyConfig `json:"proxyConfig,omitempty"` + + // Override Selector + // + // Override selector of the cluster + ShareMode *V3ClusterShareMode `json:"shareMode,omitempty"` +} + +// Validate validates this v3 cluster spec +func (m *V3ClusterSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusterData(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMetro(formats); err != nil { + res = append(res, err) + } + + if err := m.validateParams(formats); err != nil { + res = append(res, err) + } + + if err := m.validateProxyConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateShareMode(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V3ClusterSpec) validateClusterData(formats strfmt.Registry) error { + if swag.IsZero(m.ClusterData) { // not required + return nil + } + + if m.ClusterData != nil { + if err := m.ClusterData.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterData") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("clusterData") + } + return err + } + } + + return nil +} + +func (m *V3ClusterSpec) validateMetro(formats strfmt.Registry) error { + if swag.IsZero(m.Metro) { // not required + return nil + } + + if m.Metro != nil { + if err := m.Metro.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metro") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("metro") + } + return err + } + } + + return nil +} + +func (m *V3ClusterSpec) validateParams(formats strfmt.Registry) error { + if swag.IsZero(m.Params) { // not required + return nil + } + + if m.Params != nil { + if err := m.Params.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("params") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("params") + } + return err + } + } + + return nil +} + +func (m *V3ClusterSpec) validateProxyConfig(formats strfmt.Registry) error { + if swag.IsZero(m.ProxyConfig) { // not required + return nil + } + + if m.ProxyConfig != nil { + if err := m.ProxyConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("proxyConfig") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("proxyConfig") + } + return err + } + } + + return nil +} + +func (m *V3ClusterSpec) validateShareMode(formats strfmt.Registry) error { + if swag.IsZero(m.ShareMode) { // not required + return nil + } + + if m.ShareMode != nil { + if err := m.ShareMode.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("shareMode") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("shareMode") + } + return err + } + } + + return nil +} + +// ContextValidate validate this v3 cluster spec based on the context it is used +func (m *V3ClusterSpec) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateClusterData(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateMetro(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateParams(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateProxyConfig(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateShareMode(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V3ClusterSpec) contextValidateClusterData(ctx context.Context, formats strfmt.Registry) error { + + if m.ClusterData != nil { + if err := m.ClusterData.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterData") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("clusterData") + } + return err + } + } + + return nil +} + +func (m *V3ClusterSpec) contextValidateMetro(ctx context.Context, formats strfmt.Registry) error { + + if m.Metro != nil { + if err := m.Metro.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metro") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("metro") + } + return err + } + } + + return nil +} + +func (m *V3ClusterSpec) contextValidateParams(ctx context.Context, formats strfmt.Registry) error { + + if m.Params != nil { + if err := m.Params.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("params") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("params") + } + return err + } + } + + return nil +} + +func (m *V3ClusterSpec) contextValidateProxyConfig(ctx context.Context, formats strfmt.Registry) error { + + if m.ProxyConfig != nil { + if err := m.ProxyConfig.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("proxyConfig") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("proxyConfig") + } + return err + } + } + + return nil +} + +func (m *V3ClusterSpec) contextValidateShareMode(ctx context.Context, formats strfmt.Registry) error { + + if m.ShareMode != nil { + if err := m.ShareMode.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("shareMode") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("shareMode") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V3ClusterSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V3ClusterSpec) UnmarshalBinary(b []byte) error { + var res V3ClusterSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/scheduler/models/v3_cluster_status.go b/components/common/api/def/clients/scheduler/models/v3_cluster_status.go new file mode 100644 index 0000000..b1e5bae --- /dev/null +++ b/components/common/api/def/clients/scheduler/models/v3_cluster_status.go @@ -0,0 +1,143 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V3ClusterStatus v3 cluster status +// +// swagger:model v3ClusterStatus +type V3ClusterStatus struct { + + // Cluster Information + // + // Override selector of the cluster + AuxiliaryTaskCount string `json:"auxiliaryTaskCount,omitempty"` + + // Cluster Information + // + // Override selector of the cluster + Conditions []*V3ClusterCondition `json:"conditions"` + + // Cluster Information + // + // Override selector of the cluster + CustomTaskCount string `json:"customTaskCount,omitempty"` + + // Cluster Information + // + // Override selector of the cluster + PublishedBlueprint string `json:"publishedBlueprint,omitempty"` + + // Cluster Information + // + // Override selector of the cluster + SystemTaskCount string `json:"systemTaskCount,omitempty"` + + // Cluster Information + // + // Override selector of the cluster + Token string `json:"token,omitempty"` +} + +// Validate validates this v3 cluster status +func (m *V3ClusterStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateConditions(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V3ClusterStatus) validateConditions(formats strfmt.Registry) error { + if swag.IsZero(m.Conditions) { // not required + return nil + } + + for i := 0; i < len(m.Conditions); i++ { + if swag.IsZero(m.Conditions[i]) { // not required + continue + } + + if m.Conditions[i] != nil { + if err := m.Conditions[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("conditions" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("conditions" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this v3 cluster status based on the context it is used +func (m *V3ClusterStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateConditions(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V3ClusterStatus) contextValidateConditions(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Conditions); i++ { + + if m.Conditions[i] != nil { + if err := m.Conditions[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("conditions" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("conditions" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V3ClusterStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V3ClusterStatus) UnmarshalBinary(b []byte) error { + var res V3ClusterStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/scheduler/models/v3_condition_status.go b/components/common/api/def/clients/scheduler/models/v3_condition_status.go new file mode 100644 index 0000000..ad93d27 --- /dev/null +++ b/components/common/api/def/clients/scheduler/models/v3_condition_status.go @@ -0,0 +1,85 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" +) + +// V3ConditionStatus $title: ConditionStatus +// $description: status of a condition for a resource +// +// swagger:model v3ConditionStatus +type V3ConditionStatus string + +func NewV3ConditionStatus(value V3ConditionStatus) *V3ConditionStatus { + return &value +} + +// Pointer returns a pointer to a freshly-allocated V3ConditionStatus. +func (m V3ConditionStatus) Pointer() *V3ConditionStatus { + return &m +} + +const ( + + // V3ConditionStatusStatusNotSet captures enum value "StatusNotSet" + V3ConditionStatusStatusNotSet V3ConditionStatus = "StatusNotSet" + + // V3ConditionStatusStatusSubmitted captures enum value "StatusSubmitted" + V3ConditionStatusStatusSubmitted V3ConditionStatus = "StatusSubmitted" + + // V3ConditionStatusStatusOK captures enum value "StatusOK" + V3ConditionStatusStatusOK V3ConditionStatus = "StatusOK" + + // V3ConditionStatusStatusFailed captures enum value "StatusFailed" + V3ConditionStatusStatusFailed V3ConditionStatus = "StatusFailed" +) + +// for schema +var v3ConditionStatusEnum []interface{} + +func init() { + var res []V3ConditionStatus + if err := json.Unmarshal([]byte(`["StatusNotSet","StatusSubmitted","StatusOK","StatusFailed"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v3ConditionStatusEnum = append(v3ConditionStatusEnum, v) + } +} + +func (m V3ConditionStatus) validateV3ConditionStatusEnum(path, location string, value V3ConditionStatus) error { + if err := validate.EnumCase(path, location, value, v3ConditionStatusEnum, true); err != nil { + return err + } + return nil +} + +// Validate validates this v3 condition status +func (m V3ConditionStatus) Validate(formats strfmt.Registry) error { + var res []error + + // value enum + if err := m.validateV3ConditionStatusEnum("", "body", m); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// ContextValidate validates this v3 condition status based on context it is used +func (m V3ConditionStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} diff --git a/components/common/api/def/clients/scheduler/models/v3_health.go b/components/common/api/def/clients/scheduler/models/v3_health.go new file mode 100644 index 0000000..c0b21fb --- /dev/null +++ b/components/common/api/def/clients/scheduler/models/v3_health.go @@ -0,0 +1,84 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" +) + +// V3Health v3 health +// +// swagger:model v3Health +type V3Health string + +func NewV3Health(value V3Health) *V3Health { + return &value +} + +// Pointer returns a pointer to a freshly-allocated V3Health. +func (m V3Health) Pointer() *V3Health { + return &m +} + +const ( + + // V3HealthEDGEIGNORE captures enum value "EDGE_IGNORE" + V3HealthEDGEIGNORE V3Health = "EDGE_IGNORE" + + // V3HealthEDGEHEALTHY captures enum value "EDGE_HEALTHY" + V3HealthEDGEHEALTHY V3Health = "EDGE_HEALTHY" + + // V3HealthEDGEUNHEALTHY captures enum value "EDGE_UNHEALTHY" + V3HealthEDGEUNHEALTHY V3Health = "EDGE_UNHEALTHY" + + // V3HealthEDGEDISCONNECTED captures enum value "EDGE_DISCONNECTED" + V3HealthEDGEDISCONNECTED V3Health = "EDGE_DISCONNECTED" +) + +// for schema +var v3HealthEnum []interface{} + +func init() { + var res []V3Health + if err := json.Unmarshal([]byte(`["EDGE_IGNORE","EDGE_HEALTHY","EDGE_UNHEALTHY","EDGE_DISCONNECTED"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v3HealthEnum = append(v3HealthEnum, v) + } +} + +func (m V3Health) validateV3HealthEnum(path, location string, value V3Health) error { + if err := validate.EnumCase(path, location, value, v3HealthEnum, true); err != nil { + return err + } + return nil +} + +// Validate validates this v3 health +func (m V3Health) Validate(formats strfmt.Registry) error { + var res []error + + // value enum + if err := m.validateV3HealthEnum("", "body", m); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// ContextValidate validates this v3 health based on context it is used +func (m V3Health) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} diff --git a/components/common/api/def/clients/scheduler/models/v3_http_body.go b/components/common/api/def/clients/scheduler/models/v3_http_body.go new file mode 100644 index 0000000..91659b0 --- /dev/null +++ b/components/common/api/def/clients/scheduler/models/v3_http_body.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V3HTTPBody HttpBody represents arbitrary HTTP Body. It should only be used for +// payload formats that can't be represented as JSON +// +// swagger:model v3HttpBody +type V3HTTPBody struct { + + // The HTTP Content-Type header value specifying the content type of the body. + ContentType string `json:"contentType,omitempty"` + + // The HTTP request/response body as raw binary. + // Format: byte + Data strfmt.Base64 `json:"data,omitempty"` +} + +// Validate validates this v3 Http body +func (m *V3HTTPBody) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v3 Http body based on context it is used +func (m *V3HTTPBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V3HTTPBody) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V3HTTPBody) UnmarshalBinary(b []byte) error { + var res V3HTTPBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/scheduler/models/v3_list_metadata.go b/components/common/api/def/clients/scheduler/models/v3_list_metadata.go new file mode 100644 index 0000000..34b2308 --- /dev/null +++ b/components/common/api/def/clients/scheduler/models/v3_list_metadata.go @@ -0,0 +1,58 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V3ListMetadata $title: ListMetadata +// $description: metadata for a list of resources +// $required: enabled +// +// swagger:model v3ListMetadata +type V3ListMetadata struct { + + // count + Count string `json:"count,omitempty"` + + // limit + Limit string `json:"limit,omitempty"` + + // offset + Offset string `json:"offset,omitempty"` +} + +// Validate validates this v3 list metadata +func (m *V3ListMetadata) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v3 list metadata based on context it is used +func (m *V3ListMetadata) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V3ListMetadata) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V3ListMetadata) UnmarshalBinary(b []byte) error { + var res V3ListMetadata + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/scheduler/models/v3_metadata.go b/components/common/api/def/clients/scheduler/models/v3_metadata.go new file mode 100644 index 0000000..2ba69ea --- /dev/null +++ b/components/common/api/def/clients/scheduler/models/v3_metadata.go @@ -0,0 +1,176 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V3Metadata Metadata +// +// metadata of the resource +// Example: {"name":"some-name","project":"defaultproject"} +// +// swagger:model v3Metadata +type V3Metadata struct { + + // Annotations + // + // annotations of the resource + Annotations map[string]string `json:"annotations,omitempty"` + + // Description + // + // description of the resource + Description string `json:"description,omitempty"` + + // id + // Read Only: true + ID string `json:"id,omitempty"` + + // Lables + // + // labels of the resource + Labels map[string]string `json:"labels,omitempty"` + + // modified at + // Read Only: true + // Format: date-time + ModifiedAt strfmt.DateTime `json:"modifiedAt,omitempty"` + + // Name + // + // name of the resource + // Required: true + Name *string `json:"name"` + + // Organization + // + // Organization to which the resource belongs + Organization string `json:"organization,omitempty"` + + // Partner + // + // Partner to which the resource belongs + Partner string `json:"partner,omitempty"` + + // Project + // + // Project of the resource + // Required: true + Project *string `json:"project"` +} + +// Validate validates this v3 metadata +func (m *V3Metadata) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateModifiedAt(formats); err != nil { + res = append(res, err) + } + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateProject(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V3Metadata) validateModifiedAt(formats strfmt.Registry) error { + if swag.IsZero(m.ModifiedAt) { // not required + return nil + } + + if err := validate.FormatOf("modifiedAt", "body", "date-time", m.ModifiedAt.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *V3Metadata) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + return nil +} + +func (m *V3Metadata) validateProject(formats strfmt.Registry) error { + + if err := validate.Required("project", "body", m.Project); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this v3 metadata based on the context it is used +func (m *V3Metadata) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateID(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateModifiedAt(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V3Metadata) contextValidateID(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "id", "body", string(m.ID)); err != nil { + return err + } + + return nil +} + +func (m *V3Metadata) contextValidateModifiedAt(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "modifiedAt", "body", strfmt.DateTime(m.ModifiedAt)); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V3Metadata) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V3Metadata) UnmarshalBinary(b []byte) error { + var res V3Metadata + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/scheduler/models/v3_metro.go b/components/common/api/def/clients/scheduler/models/v3_metro.go new file mode 100644 index 0000000..9e9cc79 --- /dev/null +++ b/components/common/api/def/clients/scheduler/models/v3_metro.go @@ -0,0 +1,216 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V3Metro v3 metro +// +// swagger:model v3Metro +type V3Metro struct { + + // City + // + // City of the location + // Read Only: true + City string `json:"city,omitempty"` + + // Country + // + // country of the location + // Read Only: true + Country string `json:"country,omitempty"` + + // CountryCode + // + // CountryCode of the location + // Read Only: true + CountryCode string `json:"countryCode,omitempty"` + + // ID of Location + // + // ID Location of the cluster + ID string `json:"id,omitempty"` + + // Latitude + // + // Latitude of the location + // Read Only: true + Latitude string `json:"latitude,omitempty"` + + // Locale + // + // locale of the location + // Read Only: true + Locale string `json:"locale,omitempty"` + + // Longitude + // + // Longitude of the location + // Read Only: true + Longitude string `json:"longitude,omitempty"` + + // Location + // + // Location of the cluster + Name string `json:"name,omitempty"` + + // State + // + // State of the location + // Read Only: true + State string `json:"state,omitempty"` + + // StateCode + // + // StateCode of the location + // Read Only: true + StateCode string `json:"stateCode,omitempty"` +} + +// Validate validates this v3 metro +func (m *V3Metro) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validate this v3 metro based on the context it is used +func (m *V3Metro) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateCity(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateCountry(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateCountryCode(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLatitude(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLocale(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLongitude(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateState(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateStateCode(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V3Metro) contextValidateCity(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "city", "body", string(m.City)); err != nil { + return err + } + + return nil +} + +func (m *V3Metro) contextValidateCountry(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "country", "body", string(m.Country)); err != nil { + return err + } + + return nil +} + +func (m *V3Metro) contextValidateCountryCode(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "countryCode", "body", string(m.CountryCode)); err != nil { + return err + } + + return nil +} + +func (m *V3Metro) contextValidateLatitude(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "latitude", "body", string(m.Latitude)); err != nil { + return err + } + + return nil +} + +func (m *V3Metro) contextValidateLocale(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "locale", "body", string(m.Locale)); err != nil { + return err + } + + return nil +} + +func (m *V3Metro) contextValidateLongitude(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "longitude", "body", string(m.Longitude)); err != nil { + return err + } + + return nil +} + +func (m *V3Metro) contextValidateState(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "state", "body", string(m.State)); err != nil { + return err + } + + return nil +} + +func (m *V3Metro) contextValidateStateCode(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "stateCode", "body", string(m.StateCode)); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V3Metro) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V3Metro) UnmarshalBinary(b []byte) error { + var res V3Metro + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/scheduler/models/v3_project_cluster.go b/components/common/api/def/clients/scheduler/models/v3_project_cluster.go new file mode 100644 index 0000000..8e6e244 --- /dev/null +++ b/components/common/api/def/clients/scheduler/models/v3_project_cluster.go @@ -0,0 +1,57 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V3ProjectCluster v3 project cluster +// +// swagger:model v3ProjectCluster +type V3ProjectCluster struct { + + // Cluster ID + // + // Cluster ID associated with the project + ClusterID string `json:"clusterID,omitempty"` + + // Project ID + // + // Project ID associated with the cluster + ProjectID string `json:"projectID,omitempty"` +} + +// Validate validates this v3 project cluster +func (m *V3ProjectCluster) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v3 project cluster based on context it is used +func (m *V3ProjectCluster) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V3ProjectCluster) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V3ProjectCluster) UnmarshalBinary(b []byte) error { + var res V3ProjectCluster + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/scheduler/models/v3_provision_params.go b/components/common/api/def/clients/scheduler/models/v3_provision_params.go new file mode 100644 index 0000000..0dd49c4 --- /dev/null +++ b/components/common/api/def/clients/scheduler/models/v3_provision_params.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V3ProvisionParams v3 provision params +// +// swagger:model v3ProvisionParams +type V3ProvisionParams struct { + + // EnvironmentProvider + // + // environment provider of the cluster + EnvironmentProvider string `json:"environmentProvider,omitempty"` + + // KubernetesProvider + // + // kubernetes provider + KubernetesProvider string `json:"kubernetesProvider,omitempty"` + + // ProvisionEnvironment + // + // provision environment + ProvisionEnvironment string `json:"provisionEnvironment,omitempty"` + + // ProvisionPackageType + // + // provision package type + ProvisionPackageType string `json:"provisionPackageType,omitempty"` + + // ProvisionType + // + // provision type + ProvisionType string `json:"provisionType,omitempty"` + + // State + // + // state + State string `json:"state,omitempty"` +} + +// Validate validates this v3 provision params +func (m *V3ProvisionParams) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v3 provision params based on context it is used +func (m *V3ProvisionParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V3ProvisionParams) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V3ProvisionParams) UnmarshalBinary(b []byte) error { + var res V3ProvisionParams + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/scheduler/models/v3_proxy_config.go b/components/common/api/def/clients/scheduler/models/v3_proxy_config.go new file mode 100644 index 0000000..4e3102e --- /dev/null +++ b/components/common/api/def/clients/scheduler/models/v3_proxy_config.go @@ -0,0 +1,82 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V3ProxyConfig v3 proxy config +// +// swagger:model v3ProxyConfig +type V3ProxyConfig struct { + + // AllowInsecureBootstrap + // + // Allow insecure bootstrap + AllowInsecureBootstrap bool `json:"allowInsecureBootstrap,omitempty"` + + // BootstrapCA + // + // Certificate Authority of bootstrap server + BootstrapCA string `json:"bootstrapCA,omitempty"` + + // Enabled + // + // enabled + Enabled bool `json:"enabled,omitempty"` + + // HttpProxy + // + // http proxy + HTTPProxy string `json:"httpProxy,omitempty"` + + // HttpsProxy + // + // https proxy + HTTPSProxy string `json:"httpsProxy,omitempty"` + + // noproxy + // + // noproxy + NoProxy string `json:"noProxy,omitempty"` + + // ProxyAuth + // + // proxy auth + ProxyAuth string `json:"proxyAuth,omitempty"` +} + +// Validate validates this v3 proxy config +func (m *V3ProxyConfig) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v3 proxy config based on context it is used +func (m *V3ProxyConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V3ProxyConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V3ProxyConfig) UnmarshalBinary(b []byte) error { + var res V3ProxyConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/scheduler/models/v3_rafay_condition_status.go b/components/common/api/def/clients/scheduler/models/v3_rafay_condition_status.go new file mode 100644 index 0000000..52dd32c --- /dev/null +++ b/components/common/api/def/clients/scheduler/models/v3_rafay_condition_status.go @@ -0,0 +1,105 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" +) + +// V3RafayConditionStatus RafayConditionStatus is the status of the status condition +// +// swagger:model v3RafayConditionStatus +type V3RafayConditionStatus string + +func NewV3RafayConditionStatus(value V3RafayConditionStatus) *V3RafayConditionStatus { + return &value +} + +// Pointer returns a pointer to a freshly-allocated V3RafayConditionStatus. +func (m V3RafayConditionStatus) Pointer() *V3RafayConditionStatus { + return &m +} + +const ( + + // V3RafayConditionStatusNotSet captures enum value "NotSet" + V3RafayConditionStatusNotSet V3RafayConditionStatus = "NotSet" + + // V3RafayConditionStatusPending captures enum value "Pending" + V3RafayConditionStatusPending V3RafayConditionStatus = "Pending" + + // V3RafayConditionStatusInProgress captures enum value "InProgress" + V3RafayConditionStatusInProgress V3RafayConditionStatus = "InProgress" + + // V3RafayConditionStatusSuccess captures enum value "Success" + V3RafayConditionStatusSuccess V3RafayConditionStatus = "Success" + + // V3RafayConditionStatusFailed captures enum value "Failed" + V3RafayConditionStatusFailed V3RafayConditionStatus = "Failed" + + // V3RafayConditionStatusRetry captures enum value "Retry" + V3RafayConditionStatusRetry V3RafayConditionStatus = "Retry" + + // V3RafayConditionStatusSkipped captures enum value "Skipped" + V3RafayConditionStatusSkipped V3RafayConditionStatus = "Skipped" + + // V3RafayConditionStatusStopped captures enum value "Stopped" + V3RafayConditionStatusStopped V3RafayConditionStatus = "Stopped" + + // V3RafayConditionStatusExpired captures enum value "Expired" + V3RafayConditionStatusExpired V3RafayConditionStatus = "Expired" + + // V3RafayConditionStatusStopping captures enum value "Stopping" + V3RafayConditionStatusStopping V3RafayConditionStatus = "Stopping" + + // V3RafayConditionStatusSubmitted captures enum value "Submitted" + V3RafayConditionStatusSubmitted V3RafayConditionStatus = "Submitted" +) + +// for schema +var v3RafayConditionStatusEnum []interface{} + +func init() { + var res []V3RafayConditionStatus + if err := json.Unmarshal([]byte(`["NotSet","Pending","InProgress","Success","Failed","Retry","Skipped","Stopped","Expired","Stopping","Submitted"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v3RafayConditionStatusEnum = append(v3RafayConditionStatusEnum, v) + } +} + +func (m V3RafayConditionStatus) validateV3RafayConditionStatusEnum(path, location string, value V3RafayConditionStatus) error { + if err := validate.EnumCase(path, location, value, v3RafayConditionStatusEnum, true); err != nil { + return err + } + return nil +} + +// Validate validates this v3 rafay condition status +func (m V3RafayConditionStatus) Validate(formats strfmt.Registry) error { + var res []error + + // value enum + if err := m.validateV3RafayConditionStatusEnum("", "body", m); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// ContextValidate validates this v3 rafay condition status based on context it is used +func (m V3RafayConditionStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} diff --git a/components/common/api/def/clients/scheduler/models/v3_resources.go b/components/common/api/def/clients/scheduler/models/v3_resources.go new file mode 100644 index 0000000..65069af --- /dev/null +++ b/components/common/api/def/clients/scheduler/models/v3_resources.go @@ -0,0 +1,62 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V3Resources v3 resources +// +// swagger:model v3Resources +type V3Resources struct { + + // cpu count + CPUCount string `json:"cpuCount,omitempty"` + + // ephemeral storage k b + EphemeralStorageKB string `json:"ephemeralStorageKB,omitempty"` + + // gpu count + GpuCount string `json:"gpuCount,omitempty"` + + // memory k b + MemoryKB string `json:"memoryKB,omitempty"` + + // pods count + PodsCount string `json:"podsCount,omitempty"` +} + +// Validate validates this v3 resources +func (m *V3Resources) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v3 resources based on context it is used +func (m *V3Resources) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V3Resources) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V3Resources) UnmarshalBinary(b []byte) error { + var res V3Resources + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_client.go b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_client.go new file mode 100644 index 0000000..e8169ca --- /dev/null +++ b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_client.go @@ -0,0 +1,797 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package bootstrap + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new bootstrap API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for bootstrap API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientOption is the option for Client methods +type ClientOption func(*runtime.ClientOperation) + +// ClientService is the interface for Client methods +type ClientService interface { + BootstrapCreateBootstrapAgent(params *BootstrapCreateBootstrapAgentParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BootstrapCreateBootstrapAgentOK, error) + + BootstrapCreateRelayNetwork(params *BootstrapCreateRelayNetworkParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BootstrapCreateRelayNetworkOK, error) + + BootstrapDeleteBootstrapAgent(params *BootstrapDeleteBootstrapAgentParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BootstrapDeleteBootstrapAgentOK, error) + + BootstrapDeleteRelayNetwork(params *BootstrapDeleteRelayNetworkParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BootstrapDeleteRelayNetworkOK, error) + + BootstrapDownloadRelayNetwork(params *BootstrapDownloadRelayNetworkParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BootstrapDownloadRelayNetworkOK, error) + + BootstrapDownloadRelayNetworkAgent(params *BootstrapDownloadRelayNetworkAgentParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BootstrapDownloadRelayNetworkAgentOK, error) + + BootstrapGetBootstrapAgent(params *BootstrapGetBootstrapAgentParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BootstrapGetBootstrapAgentOK, error) + + BootstrapGetBootstrapAgentConfig(params *BootstrapGetBootstrapAgentConfigParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BootstrapGetBootstrapAgentConfigOK, error) + + BootstrapGetBootstrapAgentTemplate(params *BootstrapGetBootstrapAgentTemplateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BootstrapGetBootstrapAgentTemplateOK, error) + + BootstrapGetBootstrapAgentTemplates(params *BootstrapGetBootstrapAgentTemplatesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BootstrapGetBootstrapAgentTemplatesOK, error) + + BootstrapGetBootstrapAgents(params *BootstrapGetBootstrapAgentsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BootstrapGetBootstrapAgentsOK, error) + + BootstrapGetBootstrapInfra(params *BootstrapGetBootstrapInfraParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BootstrapGetBootstrapInfraOK, error) + + BootstrapGetRelayNetwork(params *BootstrapGetRelayNetworkParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BootstrapGetRelayNetworkOK, error) + + BootstrapGetRelayNetworks(params *BootstrapGetRelayNetworksParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BootstrapGetRelayNetworksOK, error) + + BootstrapPatchBootstrapAgentTemplate(params *BootstrapPatchBootstrapAgentTemplateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BootstrapPatchBootstrapAgentTemplateOK, error) + + BootstrapPatchBootstrapInfra(params *BootstrapPatchBootstrapInfraParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BootstrapPatchBootstrapInfraOK, error) + + BootstrapPatchRelayNetwork(params *BootstrapPatchRelayNetworkParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BootstrapPatchRelayNetworkOK, error) + + BootstrapRegisterBootstrapAgent(params *BootstrapRegisterBootstrapAgentParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BootstrapRegisterBootstrapAgentOK, error) + + BootstrapUpdateBootstrapAgent(params *BootstrapUpdateBootstrapAgentParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BootstrapUpdateBootstrapAgentOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* + BootstrapCreateBootstrapAgent bootstrap create bootstrap agent API +*/ +func (a *Client) BootstrapCreateBootstrapAgent(params *BootstrapCreateBootstrapAgentParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BootstrapCreateBootstrapAgentOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewBootstrapCreateBootstrapAgentParams() + } + op := &runtime.ClientOperation{ + ID: "Bootstrap_CreateBootstrapAgent", + Method: "POST", + PathPattern: "/v2/sentry/bootstrap/{spec.templateRef}/agent", + ProducesMediaTypes: []string{"application/json", "application/yaml"}, + ConsumesMediaTypes: []string{"application/json", "application/yaml"}, + Schemes: []string{"https"}, + Params: params, + Reader: &BootstrapCreateBootstrapAgentReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*BootstrapCreateBootstrapAgentOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*BootstrapCreateBootstrapAgentDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* + BootstrapCreateRelayNetwork bootstrap create relay network API +*/ +func (a *Client) BootstrapCreateRelayNetwork(params *BootstrapCreateRelayNetworkParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BootstrapCreateRelayNetworkOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewBootstrapCreateRelayNetworkParams() + } + op := &runtime.ClientOperation{ + ID: "Bootstrap_CreateRelayNetwork", + Method: "POST", + PathPattern: "/v2/sentry/relaynetwork", + ProducesMediaTypes: []string{"application/json", "application/yaml"}, + ConsumesMediaTypes: []string{"application/json", "application/yaml"}, + Schemes: []string{"https"}, + Params: params, + Reader: &BootstrapCreateRelayNetworkReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*BootstrapCreateRelayNetworkOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*BootstrapCreateRelayNetworkDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* + BootstrapDeleteBootstrapAgent bootstrap delete bootstrap agent API +*/ +func (a *Client) BootstrapDeleteBootstrapAgent(params *BootstrapDeleteBootstrapAgentParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BootstrapDeleteBootstrapAgentOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewBootstrapDeleteBootstrapAgentParams() + } + op := &runtime.ClientOperation{ + ID: "Bootstrap_DeleteBootstrapAgent", + Method: "DELETE", + PathPattern: "/v2/sentry/bootstrap/{spec.templateRef}/agent/{metadata.name}", + ProducesMediaTypes: []string{"application/json", "application/yaml"}, + ConsumesMediaTypes: []string{"application/json", "application/yaml"}, + Schemes: []string{"https"}, + Params: params, + Reader: &BootstrapDeleteBootstrapAgentReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*BootstrapDeleteBootstrapAgentOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*BootstrapDeleteBootstrapAgentDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* + BootstrapDeleteRelayNetwork bootstrap delete relay network API +*/ +func (a *Client) BootstrapDeleteRelayNetwork(params *BootstrapDeleteRelayNetworkParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BootstrapDeleteRelayNetworkOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewBootstrapDeleteRelayNetworkParams() + } + op := &runtime.ClientOperation{ + ID: "Bootstrap_DeleteRelayNetwork", + Method: "DELETE", + PathPattern: "/v2/sentry/relaynetwork/{metadata.name}", + ProducesMediaTypes: []string{"application/json", "application/yaml"}, + ConsumesMediaTypes: []string{"application/json", "application/yaml"}, + Schemes: []string{"https"}, + Params: params, + Reader: &BootstrapDeleteRelayNetworkReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*BootstrapDeleteRelayNetworkOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*BootstrapDeleteRelayNetworkDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* + BootstrapDownloadRelayNetwork bootstrap download relay network API +*/ +func (a *Client) BootstrapDownloadRelayNetwork(params *BootstrapDownloadRelayNetworkParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BootstrapDownloadRelayNetworkOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewBootstrapDownloadRelayNetworkParams() + } + op := &runtime.ClientOperation{ + ID: "Bootstrap_DownloadRelayNetwork", + Method: "GET", + PathPattern: "/v2/sentry/relaynetwork/{metadata.name}/download", + ProducesMediaTypes: []string{"application/json", "application/yaml"}, + ConsumesMediaTypes: []string{"application/json", "application/yaml"}, + Schemes: []string{"https"}, + Params: params, + Reader: &BootstrapDownloadRelayNetworkReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*BootstrapDownloadRelayNetworkOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*BootstrapDownloadRelayNetworkDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* + BootstrapDownloadRelayNetworkAgent bootstrap download relay network agent API +*/ +func (a *Client) BootstrapDownloadRelayNetworkAgent(params *BootstrapDownloadRelayNetworkAgentParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BootstrapDownloadRelayNetworkAgentOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewBootstrapDownloadRelayNetworkAgentParams() + } + op := &runtime.ClientOperation{ + ID: "Bootstrap_DownloadRelayNetworkAgent", + Method: "GET", + PathPattern: "/v2/sentry/relaynetwork/{metadata.name}/{clusterScope}/agentdownload", + ProducesMediaTypes: []string{"application/json", "application/yaml"}, + ConsumesMediaTypes: []string{"application/json", "application/yaml"}, + Schemes: []string{"https"}, + Params: params, + Reader: &BootstrapDownloadRelayNetworkAgentReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*BootstrapDownloadRelayNetworkAgentOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*BootstrapDownloadRelayNetworkAgentDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* + BootstrapGetBootstrapAgent bootstrap get bootstrap agent API +*/ +func (a *Client) BootstrapGetBootstrapAgent(params *BootstrapGetBootstrapAgentParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BootstrapGetBootstrapAgentOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewBootstrapGetBootstrapAgentParams() + } + op := &runtime.ClientOperation{ + ID: "Bootstrap_GetBootstrapAgent", + Method: "GET", + PathPattern: "/v2/sentry/bootstrap/{spec.templateRef}/agent/{metadata.name}", + ProducesMediaTypes: []string{"application/json", "application/yaml"}, + ConsumesMediaTypes: []string{"application/json", "application/yaml"}, + Schemes: []string{"https"}, + Params: params, + Reader: &BootstrapGetBootstrapAgentReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*BootstrapGetBootstrapAgentOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*BootstrapGetBootstrapAgentDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* + BootstrapGetBootstrapAgentConfig bootstrap get bootstrap agent config API +*/ +func (a *Client) BootstrapGetBootstrapAgentConfig(params *BootstrapGetBootstrapAgentConfigParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BootstrapGetBootstrapAgentConfigOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewBootstrapGetBootstrapAgentConfigParams() + } + op := &runtime.ClientOperation{ + ID: "Bootstrap_GetBootstrapAgentConfig", + Method: "GET", + PathPattern: "/v2/sentry/bootstrap/{spec.templateRef}/agent/{metadata.name}/config", + ProducesMediaTypes: []string{"application/json", "application/yaml"}, + ConsumesMediaTypes: []string{"application/json", "application/yaml"}, + Schemes: []string{"https"}, + Params: params, + Reader: &BootstrapGetBootstrapAgentConfigReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*BootstrapGetBootstrapAgentConfigOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*BootstrapGetBootstrapAgentConfigDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* + BootstrapGetBootstrapAgentTemplate bootstrap get bootstrap agent template API +*/ +func (a *Client) BootstrapGetBootstrapAgentTemplate(params *BootstrapGetBootstrapAgentTemplateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BootstrapGetBootstrapAgentTemplateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewBootstrapGetBootstrapAgentTemplateParams() + } + op := &runtime.ClientOperation{ + ID: "Bootstrap_GetBootstrapAgentTemplate", + Method: "GET", + PathPattern: "/v2/sentry/bootstrap/template/{metadata.name}", + ProducesMediaTypes: []string{"application/json", "application/yaml"}, + ConsumesMediaTypes: []string{"application/json", "application/yaml"}, + Schemes: []string{"https"}, + Params: params, + Reader: &BootstrapGetBootstrapAgentTemplateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*BootstrapGetBootstrapAgentTemplateOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*BootstrapGetBootstrapAgentTemplateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* + BootstrapGetBootstrapAgentTemplates bootstrap get bootstrap agent templates API +*/ +func (a *Client) BootstrapGetBootstrapAgentTemplates(params *BootstrapGetBootstrapAgentTemplatesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BootstrapGetBootstrapAgentTemplatesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewBootstrapGetBootstrapAgentTemplatesParams() + } + op := &runtime.ClientOperation{ + ID: "Bootstrap_GetBootstrapAgentTemplates", + Method: "GET", + PathPattern: "/v2/sentry/bootstrap/template", + ProducesMediaTypes: []string{"application/json", "application/yaml"}, + ConsumesMediaTypes: []string{"application/json", "application/yaml"}, + Schemes: []string{"https"}, + Params: params, + Reader: &BootstrapGetBootstrapAgentTemplatesReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*BootstrapGetBootstrapAgentTemplatesOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*BootstrapGetBootstrapAgentTemplatesDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* + BootstrapGetBootstrapAgents bootstrap get bootstrap agents API +*/ +func (a *Client) BootstrapGetBootstrapAgents(params *BootstrapGetBootstrapAgentsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BootstrapGetBootstrapAgentsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewBootstrapGetBootstrapAgentsParams() + } + op := &runtime.ClientOperation{ + ID: "Bootstrap_GetBootstrapAgents", + Method: "GET", + PathPattern: "/v2/sentry/bootstrap/{templateScope}/agent", + ProducesMediaTypes: []string{"application/json", "application/yaml"}, + ConsumesMediaTypes: []string{"application/json", "application/yaml"}, + Schemes: []string{"https"}, + Params: params, + Reader: &BootstrapGetBootstrapAgentsReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*BootstrapGetBootstrapAgentsOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*BootstrapGetBootstrapAgentsDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* + BootstrapGetBootstrapInfra bootstrap get bootstrap infra API +*/ +func (a *Client) BootstrapGetBootstrapInfra(params *BootstrapGetBootstrapInfraParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BootstrapGetBootstrapInfraOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewBootstrapGetBootstrapInfraParams() + } + op := &runtime.ClientOperation{ + ID: "Bootstrap_GetBootstrapInfra", + Method: "GET", + PathPattern: "/v2/sentry/bootstrap/infra/{metadata.name}", + ProducesMediaTypes: []string{"application/json", "application/yaml"}, + ConsumesMediaTypes: []string{"application/json", "application/yaml"}, + Schemes: []string{"https"}, + Params: params, + Reader: &BootstrapGetBootstrapInfraReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*BootstrapGetBootstrapInfraOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*BootstrapGetBootstrapInfraDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* + BootstrapGetRelayNetwork bootstrap get relay network API +*/ +func (a *Client) BootstrapGetRelayNetwork(params *BootstrapGetRelayNetworkParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BootstrapGetRelayNetworkOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewBootstrapGetRelayNetworkParams() + } + op := &runtime.ClientOperation{ + ID: "Bootstrap_GetRelayNetwork", + Method: "GET", + PathPattern: "/v2/sentry/relaynetwork/{metadata.name}", + ProducesMediaTypes: []string{"application/json", "application/yaml"}, + ConsumesMediaTypes: []string{"application/json", "application/yaml"}, + Schemes: []string{"https"}, + Params: params, + Reader: &BootstrapGetRelayNetworkReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*BootstrapGetRelayNetworkOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*BootstrapGetRelayNetworkDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* + BootstrapGetRelayNetworks bootstrap get relay networks API +*/ +func (a *Client) BootstrapGetRelayNetworks(params *BootstrapGetRelayNetworksParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BootstrapGetRelayNetworksOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewBootstrapGetRelayNetworksParams() + } + op := &runtime.ClientOperation{ + ID: "Bootstrap_GetRelayNetworks", + Method: "GET", + PathPattern: "/v2/sentry/relaynetwork", + ProducesMediaTypes: []string{"application/json", "application/yaml"}, + ConsumesMediaTypes: []string{"application/json", "application/yaml"}, + Schemes: []string{"https"}, + Params: params, + Reader: &BootstrapGetRelayNetworksReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*BootstrapGetRelayNetworksOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*BootstrapGetRelayNetworksDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* + BootstrapPatchBootstrapAgentTemplate bootstrap patch bootstrap agent template API +*/ +func (a *Client) BootstrapPatchBootstrapAgentTemplate(params *BootstrapPatchBootstrapAgentTemplateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BootstrapPatchBootstrapAgentTemplateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewBootstrapPatchBootstrapAgentTemplateParams() + } + op := &runtime.ClientOperation{ + ID: "Bootstrap_PatchBootstrapAgentTemplate", + Method: "PUT", + PathPattern: "/v2/sentry/bootstrap/template/{metadata.name}", + ProducesMediaTypes: []string{"application/json", "application/yaml"}, + ConsumesMediaTypes: []string{"application/json", "application/yaml"}, + Schemes: []string{"https"}, + Params: params, + Reader: &BootstrapPatchBootstrapAgentTemplateReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*BootstrapPatchBootstrapAgentTemplateOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*BootstrapPatchBootstrapAgentTemplateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* + BootstrapPatchBootstrapInfra bootstrap patch bootstrap infra API +*/ +func (a *Client) BootstrapPatchBootstrapInfra(params *BootstrapPatchBootstrapInfraParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BootstrapPatchBootstrapInfraOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewBootstrapPatchBootstrapInfraParams() + } + op := &runtime.ClientOperation{ + ID: "Bootstrap_PatchBootstrapInfra", + Method: "PUT", + PathPattern: "/v2/sentry/bootstrap/infra/{metadata.name}", + ProducesMediaTypes: []string{"application/json", "application/yaml"}, + ConsumesMediaTypes: []string{"application/json", "application/yaml"}, + Schemes: []string{"https"}, + Params: params, + Reader: &BootstrapPatchBootstrapInfraReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*BootstrapPatchBootstrapInfraOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*BootstrapPatchBootstrapInfraDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* + BootstrapPatchRelayNetwork bootstrap patch relay network API +*/ +func (a *Client) BootstrapPatchRelayNetwork(params *BootstrapPatchRelayNetworkParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BootstrapPatchRelayNetworkOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewBootstrapPatchRelayNetworkParams() + } + op := &runtime.ClientOperation{ + ID: "Bootstrap_PatchRelayNetwork", + Method: "PUT", + PathPattern: "/v2/sentry/relaynetwork/{metadata.name}", + ProducesMediaTypes: []string{"application/json", "application/yaml"}, + ConsumesMediaTypes: []string{"application/json", "application/yaml"}, + Schemes: []string{"https"}, + Params: params, + Reader: &BootstrapPatchRelayNetworkReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*BootstrapPatchRelayNetworkOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*BootstrapPatchRelayNetworkDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* + BootstrapRegisterBootstrapAgent bootstrap register bootstrap agent API +*/ +func (a *Client) BootstrapRegisterBootstrapAgent(params *BootstrapRegisterBootstrapAgentParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BootstrapRegisterBootstrapAgentOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewBootstrapRegisterBootstrapAgentParams() + } + op := &runtime.ClientOperation{ + ID: "Bootstrap_RegisterBootstrapAgent", + Method: "POST", + PathPattern: "/v2/sentry/bootstrap/{templateToken}/register", + ProducesMediaTypes: []string{"application/json", "application/yaml"}, + ConsumesMediaTypes: []string{"application/json", "application/yaml"}, + Schemes: []string{"https"}, + Params: params, + Reader: &BootstrapRegisterBootstrapAgentReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*BootstrapRegisterBootstrapAgentOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*BootstrapRegisterBootstrapAgentDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* + BootstrapUpdateBootstrapAgent bootstrap update bootstrap agent API +*/ +func (a *Client) BootstrapUpdateBootstrapAgent(params *BootstrapUpdateBootstrapAgentParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*BootstrapUpdateBootstrapAgentOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewBootstrapUpdateBootstrapAgentParams() + } + op := &runtime.ClientOperation{ + ID: "Bootstrap_UpdateBootstrapAgent", + Method: "PUT", + PathPattern: "/v2/sentry/bootstrap/{spec.templateRef}/agent/{metadata.name}", + ProducesMediaTypes: []string{"application/json", "application/yaml"}, + ConsumesMediaTypes: []string{"application/json", "application/yaml"}, + Schemes: []string{"https"}, + Params: params, + Reader: &BootstrapUpdateBootstrapAgentReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*BootstrapUpdateBootstrapAgentOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*BootstrapUpdateBootstrapAgentDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_create_bootstrap_agent_parameters.go b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_create_bootstrap_agent_parameters.go new file mode 100644 index 0000000..62f3b58 --- /dev/null +++ b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_create_bootstrap_agent_parameters.go @@ -0,0 +1,167 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package bootstrap + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/RafaySystems/rcloud-base/components/common/api/def/clients/sentry/models" +) + +// NewBootstrapCreateBootstrapAgentParams creates a new BootstrapCreateBootstrapAgentParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewBootstrapCreateBootstrapAgentParams() *BootstrapCreateBootstrapAgentParams { + return &BootstrapCreateBootstrapAgentParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewBootstrapCreateBootstrapAgentParamsWithTimeout creates a new BootstrapCreateBootstrapAgentParams object +// with the ability to set a timeout on a request. +func NewBootstrapCreateBootstrapAgentParamsWithTimeout(timeout time.Duration) *BootstrapCreateBootstrapAgentParams { + return &BootstrapCreateBootstrapAgentParams{ + timeout: timeout, + } +} + +// NewBootstrapCreateBootstrapAgentParamsWithContext creates a new BootstrapCreateBootstrapAgentParams object +// with the ability to set a context for a request. +func NewBootstrapCreateBootstrapAgentParamsWithContext(ctx context.Context) *BootstrapCreateBootstrapAgentParams { + return &BootstrapCreateBootstrapAgentParams{ + Context: ctx, + } +} + +// NewBootstrapCreateBootstrapAgentParamsWithHTTPClient creates a new BootstrapCreateBootstrapAgentParams object +// with the ability to set a custom HTTPClient for a request. +func NewBootstrapCreateBootstrapAgentParamsWithHTTPClient(client *http.Client) *BootstrapCreateBootstrapAgentParams { + return &BootstrapCreateBootstrapAgentParams{ + HTTPClient: client, + } +} + +/* BootstrapCreateBootstrapAgentParams contains all the parameters to send to the API endpoint + for the bootstrap create bootstrap agent operation. + + Typically these are written to a http.Request. +*/ +type BootstrapCreateBootstrapAgentParams struct { + + // Body. + Body *models.SentryBootstrapAgent + + // SpecTemplateRef. + SpecTemplateRef string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the bootstrap create bootstrap agent params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BootstrapCreateBootstrapAgentParams) WithDefaults() *BootstrapCreateBootstrapAgentParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the bootstrap create bootstrap agent params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BootstrapCreateBootstrapAgentParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the bootstrap create bootstrap agent params +func (o *BootstrapCreateBootstrapAgentParams) WithTimeout(timeout time.Duration) *BootstrapCreateBootstrapAgentParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the bootstrap create bootstrap agent params +func (o *BootstrapCreateBootstrapAgentParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the bootstrap create bootstrap agent params +func (o *BootstrapCreateBootstrapAgentParams) WithContext(ctx context.Context) *BootstrapCreateBootstrapAgentParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the bootstrap create bootstrap agent params +func (o *BootstrapCreateBootstrapAgentParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the bootstrap create bootstrap agent params +func (o *BootstrapCreateBootstrapAgentParams) WithHTTPClient(client *http.Client) *BootstrapCreateBootstrapAgentParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the bootstrap create bootstrap agent params +func (o *BootstrapCreateBootstrapAgentParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the bootstrap create bootstrap agent params +func (o *BootstrapCreateBootstrapAgentParams) WithBody(body *models.SentryBootstrapAgent) *BootstrapCreateBootstrapAgentParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the bootstrap create bootstrap agent params +func (o *BootstrapCreateBootstrapAgentParams) SetBody(body *models.SentryBootstrapAgent) { + o.Body = body +} + +// WithSpecTemplateRef adds the specTemplateRef to the bootstrap create bootstrap agent params +func (o *BootstrapCreateBootstrapAgentParams) WithSpecTemplateRef(specTemplateRef string) *BootstrapCreateBootstrapAgentParams { + o.SetSpecTemplateRef(specTemplateRef) + return o +} + +// SetSpecTemplateRef adds the specTemplateRef to the bootstrap create bootstrap agent params +func (o *BootstrapCreateBootstrapAgentParams) SetSpecTemplateRef(specTemplateRef string) { + o.SpecTemplateRef = specTemplateRef +} + +// WriteToRequest writes these params to a swagger request +func (o *BootstrapCreateBootstrapAgentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param spec.templateRef + if err := r.SetPathParam("spec.templateRef", o.SpecTemplateRef); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_create_bootstrap_agent_responses.go b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_create_bootstrap_agent_responses.go new file mode 100644 index 0000000..421db5c --- /dev/null +++ b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_create_bootstrap_agent_responses.go @@ -0,0 +1,223 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package bootstrap + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/RafaySystems/rcloud-base/components/common/api/def/clients/sentry/models" +) + +// BootstrapCreateBootstrapAgentReader is a Reader for the BootstrapCreateBootstrapAgent structure. +type BootstrapCreateBootstrapAgentReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *BootstrapCreateBootstrapAgentReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewBootstrapCreateBootstrapAgentOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 403: + result := NewBootstrapCreateBootstrapAgentForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewBootstrapCreateBootstrapAgentNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewBootstrapCreateBootstrapAgentInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + result := NewBootstrapCreateBootstrapAgentDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewBootstrapCreateBootstrapAgentOK creates a BootstrapCreateBootstrapAgentOK with default headers values +func NewBootstrapCreateBootstrapAgentOK() *BootstrapCreateBootstrapAgentOK { + return &BootstrapCreateBootstrapAgentOK{} +} + +/* BootstrapCreateBootstrapAgentOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type BootstrapCreateBootstrapAgentOK struct { + Payload *models.SentryBootstrapAgent +} + +func (o *BootstrapCreateBootstrapAgentOK) Error() string { + return fmt.Sprintf("[POST /v2/sentry/bootstrap/{spec.templateRef}/agent][%d] bootstrapCreateBootstrapAgentOK %+v", 200, o.Payload) +} +func (o *BootstrapCreateBootstrapAgentOK) GetPayload() *models.SentryBootstrapAgent { + return o.Payload +} + +func (o *BootstrapCreateBootstrapAgentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.SentryBootstrapAgent) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBootstrapCreateBootstrapAgentForbidden creates a BootstrapCreateBootstrapAgentForbidden with default headers values +func NewBootstrapCreateBootstrapAgentForbidden() *BootstrapCreateBootstrapAgentForbidden { + return &BootstrapCreateBootstrapAgentForbidden{} +} + +/* BootstrapCreateBootstrapAgentForbidden describes a response with status code 403, with default header values. + +Returned when the user does not have permission to access the resource. +*/ +type BootstrapCreateBootstrapAgentForbidden struct { + Payload interface{} +} + +func (o *BootstrapCreateBootstrapAgentForbidden) Error() string { + return fmt.Sprintf("[POST /v2/sentry/bootstrap/{spec.templateRef}/agent][%d] bootstrapCreateBootstrapAgentForbidden %+v", 403, o.Payload) +} +func (o *BootstrapCreateBootstrapAgentForbidden) GetPayload() interface{} { + return o.Payload +} + +func (o *BootstrapCreateBootstrapAgentForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBootstrapCreateBootstrapAgentNotFound creates a BootstrapCreateBootstrapAgentNotFound with default headers values +func NewBootstrapCreateBootstrapAgentNotFound() *BootstrapCreateBootstrapAgentNotFound { + return &BootstrapCreateBootstrapAgentNotFound{} +} + +/* BootstrapCreateBootstrapAgentNotFound describes a response with status code 404, with default header values. + +Returned when the resource does not exist. +*/ +type BootstrapCreateBootstrapAgentNotFound struct { + Payload interface{} +} + +func (o *BootstrapCreateBootstrapAgentNotFound) Error() string { + return fmt.Sprintf("[POST /v2/sentry/bootstrap/{spec.templateRef}/agent][%d] bootstrapCreateBootstrapAgentNotFound %+v", 404, o.Payload) +} +func (o *BootstrapCreateBootstrapAgentNotFound) GetPayload() interface{} { + return o.Payload +} + +func (o *BootstrapCreateBootstrapAgentNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBootstrapCreateBootstrapAgentInternalServerError creates a BootstrapCreateBootstrapAgentInternalServerError with default headers values +func NewBootstrapCreateBootstrapAgentInternalServerError() *BootstrapCreateBootstrapAgentInternalServerError { + return &BootstrapCreateBootstrapAgentInternalServerError{} +} + +/* BootstrapCreateBootstrapAgentInternalServerError describes a response with status code 500, with default header values. + +Returned for internal server error +*/ +type BootstrapCreateBootstrapAgentInternalServerError struct { + Payload interface{} +} + +func (o *BootstrapCreateBootstrapAgentInternalServerError) Error() string { + return fmt.Sprintf("[POST /v2/sentry/bootstrap/{spec.templateRef}/agent][%d] bootstrapCreateBootstrapAgentInternalServerError %+v", 500, o.Payload) +} +func (o *BootstrapCreateBootstrapAgentInternalServerError) GetPayload() interface{} { + return o.Payload +} + +func (o *BootstrapCreateBootstrapAgentInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBootstrapCreateBootstrapAgentDefault creates a BootstrapCreateBootstrapAgentDefault with default headers values +func NewBootstrapCreateBootstrapAgentDefault(code int) *BootstrapCreateBootstrapAgentDefault { + return &BootstrapCreateBootstrapAgentDefault{ + _statusCode: code, + } +} + +/* BootstrapCreateBootstrapAgentDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type BootstrapCreateBootstrapAgentDefault struct { + _statusCode int + + Payload *models.GooglerpcStatus +} + +// Code gets the status code for the bootstrap create bootstrap agent default response +func (o *BootstrapCreateBootstrapAgentDefault) Code() int { + return o._statusCode +} + +func (o *BootstrapCreateBootstrapAgentDefault) Error() string { + return fmt.Sprintf("[POST /v2/sentry/bootstrap/{spec.templateRef}/agent][%d] Bootstrap_CreateBootstrapAgent default %+v", o._statusCode, o.Payload) +} +func (o *BootstrapCreateBootstrapAgentDefault) GetPayload() *models.GooglerpcStatus { + return o.Payload +} + +func (o *BootstrapCreateBootstrapAgentDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.GooglerpcStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_create_relay_network_parameters.go b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_create_relay_network_parameters.go new file mode 100644 index 0000000..2a26339 --- /dev/null +++ b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_create_relay_network_parameters.go @@ -0,0 +1,148 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package bootstrap + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/RafaySystems/rcloud-base/components/common/api/def/clients/sentry/models" +) + +// NewBootstrapCreateRelayNetworkParams creates a new BootstrapCreateRelayNetworkParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewBootstrapCreateRelayNetworkParams() *BootstrapCreateRelayNetworkParams { + return &BootstrapCreateRelayNetworkParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewBootstrapCreateRelayNetworkParamsWithTimeout creates a new BootstrapCreateRelayNetworkParams object +// with the ability to set a timeout on a request. +func NewBootstrapCreateRelayNetworkParamsWithTimeout(timeout time.Duration) *BootstrapCreateRelayNetworkParams { + return &BootstrapCreateRelayNetworkParams{ + timeout: timeout, + } +} + +// NewBootstrapCreateRelayNetworkParamsWithContext creates a new BootstrapCreateRelayNetworkParams object +// with the ability to set a context for a request. +func NewBootstrapCreateRelayNetworkParamsWithContext(ctx context.Context) *BootstrapCreateRelayNetworkParams { + return &BootstrapCreateRelayNetworkParams{ + Context: ctx, + } +} + +// NewBootstrapCreateRelayNetworkParamsWithHTTPClient creates a new BootstrapCreateRelayNetworkParams object +// with the ability to set a custom HTTPClient for a request. +func NewBootstrapCreateRelayNetworkParamsWithHTTPClient(client *http.Client) *BootstrapCreateRelayNetworkParams { + return &BootstrapCreateRelayNetworkParams{ + HTTPClient: client, + } +} + +/* BootstrapCreateRelayNetworkParams contains all the parameters to send to the API endpoint + for the bootstrap create relay network operation. + + Typically these are written to a http.Request. +*/ +type BootstrapCreateRelayNetworkParams struct { + + // Body. + Body *models.SentryRelayNetwork + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the bootstrap create relay network params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BootstrapCreateRelayNetworkParams) WithDefaults() *BootstrapCreateRelayNetworkParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the bootstrap create relay network params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BootstrapCreateRelayNetworkParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the bootstrap create relay network params +func (o *BootstrapCreateRelayNetworkParams) WithTimeout(timeout time.Duration) *BootstrapCreateRelayNetworkParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the bootstrap create relay network params +func (o *BootstrapCreateRelayNetworkParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the bootstrap create relay network params +func (o *BootstrapCreateRelayNetworkParams) WithContext(ctx context.Context) *BootstrapCreateRelayNetworkParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the bootstrap create relay network params +func (o *BootstrapCreateRelayNetworkParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the bootstrap create relay network params +func (o *BootstrapCreateRelayNetworkParams) WithHTTPClient(client *http.Client) *BootstrapCreateRelayNetworkParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the bootstrap create relay network params +func (o *BootstrapCreateRelayNetworkParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the bootstrap create relay network params +func (o *BootstrapCreateRelayNetworkParams) WithBody(body *models.SentryRelayNetwork) *BootstrapCreateRelayNetworkParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the bootstrap create relay network params +func (o *BootstrapCreateRelayNetworkParams) SetBody(body *models.SentryRelayNetwork) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *BootstrapCreateRelayNetworkParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_create_relay_network_responses.go b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_create_relay_network_responses.go new file mode 100644 index 0000000..cb0cead --- /dev/null +++ b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_create_relay_network_responses.go @@ -0,0 +1,223 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package bootstrap + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/RafaySystems/rcloud-base/components/common/api/def/clients/sentry/models" +) + +// BootstrapCreateRelayNetworkReader is a Reader for the BootstrapCreateRelayNetwork structure. +type BootstrapCreateRelayNetworkReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *BootstrapCreateRelayNetworkReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewBootstrapCreateRelayNetworkOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 403: + result := NewBootstrapCreateRelayNetworkForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewBootstrapCreateRelayNetworkNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewBootstrapCreateRelayNetworkInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + result := NewBootstrapCreateRelayNetworkDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewBootstrapCreateRelayNetworkOK creates a BootstrapCreateRelayNetworkOK with default headers values +func NewBootstrapCreateRelayNetworkOK() *BootstrapCreateRelayNetworkOK { + return &BootstrapCreateRelayNetworkOK{} +} + +/* BootstrapCreateRelayNetworkOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type BootstrapCreateRelayNetworkOK struct { + Payload *models.SentryRelayNetwork +} + +func (o *BootstrapCreateRelayNetworkOK) Error() string { + return fmt.Sprintf("[POST /v2/sentry/relaynetwork][%d] bootstrapCreateRelayNetworkOK %+v", 200, o.Payload) +} +func (o *BootstrapCreateRelayNetworkOK) GetPayload() *models.SentryRelayNetwork { + return o.Payload +} + +func (o *BootstrapCreateRelayNetworkOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.SentryRelayNetwork) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBootstrapCreateRelayNetworkForbidden creates a BootstrapCreateRelayNetworkForbidden with default headers values +func NewBootstrapCreateRelayNetworkForbidden() *BootstrapCreateRelayNetworkForbidden { + return &BootstrapCreateRelayNetworkForbidden{} +} + +/* BootstrapCreateRelayNetworkForbidden describes a response with status code 403, with default header values. + +Returned when the user does not have permission to access the resource. +*/ +type BootstrapCreateRelayNetworkForbidden struct { + Payload interface{} +} + +func (o *BootstrapCreateRelayNetworkForbidden) Error() string { + return fmt.Sprintf("[POST /v2/sentry/relaynetwork][%d] bootstrapCreateRelayNetworkForbidden %+v", 403, o.Payload) +} +func (o *BootstrapCreateRelayNetworkForbidden) GetPayload() interface{} { + return o.Payload +} + +func (o *BootstrapCreateRelayNetworkForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBootstrapCreateRelayNetworkNotFound creates a BootstrapCreateRelayNetworkNotFound with default headers values +func NewBootstrapCreateRelayNetworkNotFound() *BootstrapCreateRelayNetworkNotFound { + return &BootstrapCreateRelayNetworkNotFound{} +} + +/* BootstrapCreateRelayNetworkNotFound describes a response with status code 404, with default header values. + +Returned when the resource does not exist. +*/ +type BootstrapCreateRelayNetworkNotFound struct { + Payload interface{} +} + +func (o *BootstrapCreateRelayNetworkNotFound) Error() string { + return fmt.Sprintf("[POST /v2/sentry/relaynetwork][%d] bootstrapCreateRelayNetworkNotFound %+v", 404, o.Payload) +} +func (o *BootstrapCreateRelayNetworkNotFound) GetPayload() interface{} { + return o.Payload +} + +func (o *BootstrapCreateRelayNetworkNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBootstrapCreateRelayNetworkInternalServerError creates a BootstrapCreateRelayNetworkInternalServerError with default headers values +func NewBootstrapCreateRelayNetworkInternalServerError() *BootstrapCreateRelayNetworkInternalServerError { + return &BootstrapCreateRelayNetworkInternalServerError{} +} + +/* BootstrapCreateRelayNetworkInternalServerError describes a response with status code 500, with default header values. + +Returned for internal server error +*/ +type BootstrapCreateRelayNetworkInternalServerError struct { + Payload interface{} +} + +func (o *BootstrapCreateRelayNetworkInternalServerError) Error() string { + return fmt.Sprintf("[POST /v2/sentry/relaynetwork][%d] bootstrapCreateRelayNetworkInternalServerError %+v", 500, o.Payload) +} +func (o *BootstrapCreateRelayNetworkInternalServerError) GetPayload() interface{} { + return o.Payload +} + +func (o *BootstrapCreateRelayNetworkInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBootstrapCreateRelayNetworkDefault creates a BootstrapCreateRelayNetworkDefault with default headers values +func NewBootstrapCreateRelayNetworkDefault(code int) *BootstrapCreateRelayNetworkDefault { + return &BootstrapCreateRelayNetworkDefault{ + _statusCode: code, + } +} + +/* BootstrapCreateRelayNetworkDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type BootstrapCreateRelayNetworkDefault struct { + _statusCode int + + Payload *models.GooglerpcStatus +} + +// Code gets the status code for the bootstrap create relay network default response +func (o *BootstrapCreateRelayNetworkDefault) Code() int { + return o._statusCode +} + +func (o *BootstrapCreateRelayNetworkDefault) Error() string { + return fmt.Sprintf("[POST /v2/sentry/relaynetwork][%d] Bootstrap_CreateRelayNetwork default %+v", o._statusCode, o.Payload) +} +func (o *BootstrapCreateRelayNetworkDefault) GetPayload() *models.GooglerpcStatus { + return o.Payload +} + +func (o *BootstrapCreateRelayNetworkDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.GooglerpcStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_delete_bootstrap_agent_parameters.go b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_delete_bootstrap_agent_parameters.go new file mode 100644 index 0000000..2fd83d3 --- /dev/null +++ b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_delete_bootstrap_agent_parameters.go @@ -0,0 +1,652 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package bootstrap + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewBootstrapDeleteBootstrapAgentParams creates a new BootstrapDeleteBootstrapAgentParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewBootstrapDeleteBootstrapAgentParams() *BootstrapDeleteBootstrapAgentParams { + return &BootstrapDeleteBootstrapAgentParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewBootstrapDeleteBootstrapAgentParamsWithTimeout creates a new BootstrapDeleteBootstrapAgentParams object +// with the ability to set a timeout on a request. +func NewBootstrapDeleteBootstrapAgentParamsWithTimeout(timeout time.Duration) *BootstrapDeleteBootstrapAgentParams { + return &BootstrapDeleteBootstrapAgentParams{ + timeout: timeout, + } +} + +// NewBootstrapDeleteBootstrapAgentParamsWithContext creates a new BootstrapDeleteBootstrapAgentParams object +// with the ability to set a context for a request. +func NewBootstrapDeleteBootstrapAgentParamsWithContext(ctx context.Context) *BootstrapDeleteBootstrapAgentParams { + return &BootstrapDeleteBootstrapAgentParams{ + Context: ctx, + } +} + +// NewBootstrapDeleteBootstrapAgentParamsWithHTTPClient creates a new BootstrapDeleteBootstrapAgentParams object +// with the ability to set a custom HTTPClient for a request. +func NewBootstrapDeleteBootstrapAgentParamsWithHTTPClient(client *http.Client) *BootstrapDeleteBootstrapAgentParams { + return &BootstrapDeleteBootstrapAgentParams{ + HTTPClient: client, + } +} + +/* BootstrapDeleteBootstrapAgentParams contains all the parameters to send to the API endpoint + for the bootstrap delete bootstrap agent operation. + + Typically these are written to a http.Request. +*/ +type BootstrapDeleteBootstrapAgentParams struct { + + /* APIVersion. + + API Version. API Version of the resource + + Default: "infra.k8smgmt.io/v3" + */ + APIVersion *string + + /* Kind. + + Kind. Kind of the resource + + Default: "BootstrapAgent" + */ + Kind *string + + /* MetadataDescription. + + Description. description of the resource + */ + MetadataDescription *string + + // MetadataID. + MetadataID *string + + // MetadataModifiedAt. + // + // Format: date-time + MetadataModifiedAt *strfmt.DateTime + + /* MetadataName. + + name of the resource + */ + MetadataName string + + /* MetadataOrganization. + + Organization. Organization to which the resource belongs + */ + MetadataOrganization *string + + /* MetadataPartner. + + Partner. Partner to which the resource belongs + */ + MetadataPartner *string + + /* MetadataProject. + + Project. Project of the resource + */ + MetadataProject *string + + // SpecAgentMode. + // + // Default: "InCluster" + SpecAgentMode *string + + // SpecTemplateRef. + SpecTemplateRef string + + // SpecToken. + SpecToken *string + + // StatusFingerprint. + StatusFingerprint *string + + // StatusIPAddress. + StatusIPAddress *string + + // StatusLastCheckedIn. + // + // Format: date-time + StatusLastCheckedIn *strfmt.DateTime + + // StatusTokenState. + // + // Default: "NotSet" + StatusTokenState *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the bootstrap delete bootstrap agent params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BootstrapDeleteBootstrapAgentParams) WithDefaults() *BootstrapDeleteBootstrapAgentParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the bootstrap delete bootstrap agent params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BootstrapDeleteBootstrapAgentParams) SetDefaults() { + var ( + aPIVersionDefault = string("infra.k8smgmt.io/v3") + + kindDefault = string("BootstrapAgent") + + specAgentModeDefault = string("InCluster") + + statusTokenStateDefault = string("NotSet") + ) + + val := BootstrapDeleteBootstrapAgentParams{ + APIVersion: &aPIVersionDefault, + Kind: &kindDefault, + SpecAgentMode: &specAgentModeDefault, + StatusTokenState: &statusTokenStateDefault, + } + + val.timeout = o.timeout + val.Context = o.Context + val.HTTPClient = o.HTTPClient + *o = val +} + +// WithTimeout adds the timeout to the bootstrap delete bootstrap agent params +func (o *BootstrapDeleteBootstrapAgentParams) WithTimeout(timeout time.Duration) *BootstrapDeleteBootstrapAgentParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the bootstrap delete bootstrap agent params +func (o *BootstrapDeleteBootstrapAgentParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the bootstrap delete bootstrap agent params +func (o *BootstrapDeleteBootstrapAgentParams) WithContext(ctx context.Context) *BootstrapDeleteBootstrapAgentParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the bootstrap delete bootstrap agent params +func (o *BootstrapDeleteBootstrapAgentParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the bootstrap delete bootstrap agent params +func (o *BootstrapDeleteBootstrapAgentParams) WithHTTPClient(client *http.Client) *BootstrapDeleteBootstrapAgentParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the bootstrap delete bootstrap agent params +func (o *BootstrapDeleteBootstrapAgentParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAPIVersion adds the aPIVersion to the bootstrap delete bootstrap agent params +func (o *BootstrapDeleteBootstrapAgentParams) WithAPIVersion(aPIVersion *string) *BootstrapDeleteBootstrapAgentParams { + o.SetAPIVersion(aPIVersion) + return o +} + +// SetAPIVersion adds the apiVersion to the bootstrap delete bootstrap agent params +func (o *BootstrapDeleteBootstrapAgentParams) SetAPIVersion(aPIVersion *string) { + o.APIVersion = aPIVersion +} + +// WithKind adds the kind to the bootstrap delete bootstrap agent params +func (o *BootstrapDeleteBootstrapAgentParams) WithKind(kind *string) *BootstrapDeleteBootstrapAgentParams { + o.SetKind(kind) + return o +} + +// SetKind adds the kind to the bootstrap delete bootstrap agent params +func (o *BootstrapDeleteBootstrapAgentParams) SetKind(kind *string) { + o.Kind = kind +} + +// WithMetadataDescription adds the metadataDescription to the bootstrap delete bootstrap agent params +func (o *BootstrapDeleteBootstrapAgentParams) WithMetadataDescription(metadataDescription *string) *BootstrapDeleteBootstrapAgentParams { + o.SetMetadataDescription(metadataDescription) + return o +} + +// SetMetadataDescription adds the metadataDescription to the bootstrap delete bootstrap agent params +func (o *BootstrapDeleteBootstrapAgentParams) SetMetadataDescription(metadataDescription *string) { + o.MetadataDescription = metadataDescription +} + +// WithMetadataID adds the metadataID to the bootstrap delete bootstrap agent params +func (o *BootstrapDeleteBootstrapAgentParams) WithMetadataID(metadataID *string) *BootstrapDeleteBootstrapAgentParams { + o.SetMetadataID(metadataID) + return o +} + +// SetMetadataID adds the metadataId to the bootstrap delete bootstrap agent params +func (o *BootstrapDeleteBootstrapAgentParams) SetMetadataID(metadataID *string) { + o.MetadataID = metadataID +} + +// WithMetadataModifiedAt adds the metadataModifiedAt to the bootstrap delete bootstrap agent params +func (o *BootstrapDeleteBootstrapAgentParams) WithMetadataModifiedAt(metadataModifiedAt *strfmt.DateTime) *BootstrapDeleteBootstrapAgentParams { + o.SetMetadataModifiedAt(metadataModifiedAt) + return o +} + +// SetMetadataModifiedAt adds the metadataModifiedAt to the bootstrap delete bootstrap agent params +func (o *BootstrapDeleteBootstrapAgentParams) SetMetadataModifiedAt(metadataModifiedAt *strfmt.DateTime) { + o.MetadataModifiedAt = metadataModifiedAt +} + +// WithMetadataName adds the metadataName to the bootstrap delete bootstrap agent params +func (o *BootstrapDeleteBootstrapAgentParams) WithMetadataName(metadataName string) *BootstrapDeleteBootstrapAgentParams { + o.SetMetadataName(metadataName) + return o +} + +// SetMetadataName adds the metadataName to the bootstrap delete bootstrap agent params +func (o *BootstrapDeleteBootstrapAgentParams) SetMetadataName(metadataName string) { + o.MetadataName = metadataName +} + +// WithMetadataOrganization adds the metadataOrganization to the bootstrap delete bootstrap agent params +func (o *BootstrapDeleteBootstrapAgentParams) WithMetadataOrganization(metadataOrganization *string) *BootstrapDeleteBootstrapAgentParams { + o.SetMetadataOrganization(metadataOrganization) + return o +} + +// SetMetadataOrganization adds the metadataOrganization to the bootstrap delete bootstrap agent params +func (o *BootstrapDeleteBootstrapAgentParams) SetMetadataOrganization(metadataOrganization *string) { + o.MetadataOrganization = metadataOrganization +} + +// WithMetadataPartner adds the metadataPartner to the bootstrap delete bootstrap agent params +func (o *BootstrapDeleteBootstrapAgentParams) WithMetadataPartner(metadataPartner *string) *BootstrapDeleteBootstrapAgentParams { + o.SetMetadataPartner(metadataPartner) + return o +} + +// SetMetadataPartner adds the metadataPartner to the bootstrap delete bootstrap agent params +func (o *BootstrapDeleteBootstrapAgentParams) SetMetadataPartner(metadataPartner *string) { + o.MetadataPartner = metadataPartner +} + +// WithMetadataProject adds the metadataProject to the bootstrap delete bootstrap agent params +func (o *BootstrapDeleteBootstrapAgentParams) WithMetadataProject(metadataProject *string) *BootstrapDeleteBootstrapAgentParams { + o.SetMetadataProject(metadataProject) + return o +} + +// SetMetadataProject adds the metadataProject to the bootstrap delete bootstrap agent params +func (o *BootstrapDeleteBootstrapAgentParams) SetMetadataProject(metadataProject *string) { + o.MetadataProject = metadataProject +} + +// WithSpecAgentMode adds the specAgentMode to the bootstrap delete bootstrap agent params +func (o *BootstrapDeleteBootstrapAgentParams) WithSpecAgentMode(specAgentMode *string) *BootstrapDeleteBootstrapAgentParams { + o.SetSpecAgentMode(specAgentMode) + return o +} + +// SetSpecAgentMode adds the specAgentMode to the bootstrap delete bootstrap agent params +func (o *BootstrapDeleteBootstrapAgentParams) SetSpecAgentMode(specAgentMode *string) { + o.SpecAgentMode = specAgentMode +} + +// WithSpecTemplateRef adds the specTemplateRef to the bootstrap delete bootstrap agent params +func (o *BootstrapDeleteBootstrapAgentParams) WithSpecTemplateRef(specTemplateRef string) *BootstrapDeleteBootstrapAgentParams { + o.SetSpecTemplateRef(specTemplateRef) + return o +} + +// SetSpecTemplateRef adds the specTemplateRef to the bootstrap delete bootstrap agent params +func (o *BootstrapDeleteBootstrapAgentParams) SetSpecTemplateRef(specTemplateRef string) { + o.SpecTemplateRef = specTemplateRef +} + +// WithSpecToken adds the specToken to the bootstrap delete bootstrap agent params +func (o *BootstrapDeleteBootstrapAgentParams) WithSpecToken(specToken *string) *BootstrapDeleteBootstrapAgentParams { + o.SetSpecToken(specToken) + return o +} + +// SetSpecToken adds the specToken to the bootstrap delete bootstrap agent params +func (o *BootstrapDeleteBootstrapAgentParams) SetSpecToken(specToken *string) { + o.SpecToken = specToken +} + +// WithStatusFingerprint adds the statusFingerprint to the bootstrap delete bootstrap agent params +func (o *BootstrapDeleteBootstrapAgentParams) WithStatusFingerprint(statusFingerprint *string) *BootstrapDeleteBootstrapAgentParams { + o.SetStatusFingerprint(statusFingerprint) + return o +} + +// SetStatusFingerprint adds the statusFingerprint to the bootstrap delete bootstrap agent params +func (o *BootstrapDeleteBootstrapAgentParams) SetStatusFingerprint(statusFingerprint *string) { + o.StatusFingerprint = statusFingerprint +} + +// WithStatusIPAddress adds the statusIPAddress to the bootstrap delete bootstrap agent params +func (o *BootstrapDeleteBootstrapAgentParams) WithStatusIPAddress(statusIPAddress *string) *BootstrapDeleteBootstrapAgentParams { + o.SetStatusIPAddress(statusIPAddress) + return o +} + +// SetStatusIPAddress adds the statusIpAddress to the bootstrap delete bootstrap agent params +func (o *BootstrapDeleteBootstrapAgentParams) SetStatusIPAddress(statusIPAddress *string) { + o.StatusIPAddress = statusIPAddress +} + +// WithStatusLastCheckedIn adds the statusLastCheckedIn to the bootstrap delete bootstrap agent params +func (o *BootstrapDeleteBootstrapAgentParams) WithStatusLastCheckedIn(statusLastCheckedIn *strfmt.DateTime) *BootstrapDeleteBootstrapAgentParams { + o.SetStatusLastCheckedIn(statusLastCheckedIn) + return o +} + +// SetStatusLastCheckedIn adds the statusLastCheckedIn to the bootstrap delete bootstrap agent params +func (o *BootstrapDeleteBootstrapAgentParams) SetStatusLastCheckedIn(statusLastCheckedIn *strfmt.DateTime) { + o.StatusLastCheckedIn = statusLastCheckedIn +} + +// WithStatusTokenState adds the statusTokenState to the bootstrap delete bootstrap agent params +func (o *BootstrapDeleteBootstrapAgentParams) WithStatusTokenState(statusTokenState *string) *BootstrapDeleteBootstrapAgentParams { + o.SetStatusTokenState(statusTokenState) + return o +} + +// SetStatusTokenState adds the statusTokenState to the bootstrap delete bootstrap agent params +func (o *BootstrapDeleteBootstrapAgentParams) SetStatusTokenState(statusTokenState *string) { + o.StatusTokenState = statusTokenState +} + +// WriteToRequest writes these params to a swagger request +func (o *BootstrapDeleteBootstrapAgentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.APIVersion != nil { + + // query param apiVersion + var qrAPIVersion string + + if o.APIVersion != nil { + qrAPIVersion = *o.APIVersion + } + qAPIVersion := qrAPIVersion + if qAPIVersion != "" { + + if err := r.SetQueryParam("apiVersion", qAPIVersion); err != nil { + return err + } + } + } + + if o.Kind != nil { + + // query param kind + var qrKind string + + if o.Kind != nil { + qrKind = *o.Kind + } + qKind := qrKind + if qKind != "" { + + if err := r.SetQueryParam("kind", qKind); err != nil { + return err + } + } + } + + if o.MetadataDescription != nil { + + // query param metadata.description + var qrMetadataDescription string + + if o.MetadataDescription != nil { + qrMetadataDescription = *o.MetadataDescription + } + qMetadataDescription := qrMetadataDescription + if qMetadataDescription != "" { + + if err := r.SetQueryParam("metadata.description", qMetadataDescription); err != nil { + return err + } + } + } + + if o.MetadataID != nil { + + // query param metadata.id + var qrMetadataID string + + if o.MetadataID != nil { + qrMetadataID = *o.MetadataID + } + qMetadataID := qrMetadataID + if qMetadataID != "" { + + if err := r.SetQueryParam("metadata.id", qMetadataID); err != nil { + return err + } + } + } + + if o.MetadataModifiedAt != nil { + + // query param metadata.modifiedAt + var qrMetadataModifiedAt strfmt.DateTime + + if o.MetadataModifiedAt != nil { + qrMetadataModifiedAt = *o.MetadataModifiedAt + } + qMetadataModifiedAt := qrMetadataModifiedAt.String() + if qMetadataModifiedAt != "" { + + if err := r.SetQueryParam("metadata.modifiedAt", qMetadataModifiedAt); err != nil { + return err + } + } + } + + // path param metadata.name + if err := r.SetPathParam("metadata.name", o.MetadataName); err != nil { + return err + } + + if o.MetadataOrganization != nil { + + // query param metadata.organization + var qrMetadataOrganization string + + if o.MetadataOrganization != nil { + qrMetadataOrganization = *o.MetadataOrganization + } + qMetadataOrganization := qrMetadataOrganization + if qMetadataOrganization != "" { + + if err := r.SetQueryParam("metadata.organization", qMetadataOrganization); err != nil { + return err + } + } + } + + if o.MetadataPartner != nil { + + // query param metadata.partner + var qrMetadataPartner string + + if o.MetadataPartner != nil { + qrMetadataPartner = *o.MetadataPartner + } + qMetadataPartner := qrMetadataPartner + if qMetadataPartner != "" { + + if err := r.SetQueryParam("metadata.partner", qMetadataPartner); err != nil { + return err + } + } + } + + if o.MetadataProject != nil { + + // query param metadata.project + var qrMetadataProject string + + if o.MetadataProject != nil { + qrMetadataProject = *o.MetadataProject + } + qMetadataProject := qrMetadataProject + if qMetadataProject != "" { + + if err := r.SetQueryParam("metadata.project", qMetadataProject); err != nil { + return err + } + } + } + + if o.SpecAgentMode != nil { + + // query param spec.agentMode + var qrSpecAgentMode string + + if o.SpecAgentMode != nil { + qrSpecAgentMode = *o.SpecAgentMode + } + qSpecAgentMode := qrSpecAgentMode + if qSpecAgentMode != "" { + + if err := r.SetQueryParam("spec.agentMode", qSpecAgentMode); err != nil { + return err + } + } + } + + // path param spec.templateRef + if err := r.SetPathParam("spec.templateRef", o.SpecTemplateRef); err != nil { + return err + } + + if o.SpecToken != nil { + + // query param spec.token + var qrSpecToken string + + if o.SpecToken != nil { + qrSpecToken = *o.SpecToken + } + qSpecToken := qrSpecToken + if qSpecToken != "" { + + if err := r.SetQueryParam("spec.token", qSpecToken); err != nil { + return err + } + } + } + + if o.StatusFingerprint != nil { + + // query param status.fingerprint + var qrStatusFingerprint string + + if o.StatusFingerprint != nil { + qrStatusFingerprint = *o.StatusFingerprint + } + qStatusFingerprint := qrStatusFingerprint + if qStatusFingerprint != "" { + + if err := r.SetQueryParam("status.fingerprint", qStatusFingerprint); err != nil { + return err + } + } + } + + if o.StatusIPAddress != nil { + + // query param status.ipAddress + var qrStatusIPAddress string + + if o.StatusIPAddress != nil { + qrStatusIPAddress = *o.StatusIPAddress + } + qStatusIPAddress := qrStatusIPAddress + if qStatusIPAddress != "" { + + if err := r.SetQueryParam("status.ipAddress", qStatusIPAddress); err != nil { + return err + } + } + } + + if o.StatusLastCheckedIn != nil { + + // query param status.lastCheckedIn + var qrStatusLastCheckedIn strfmt.DateTime + + if o.StatusLastCheckedIn != nil { + qrStatusLastCheckedIn = *o.StatusLastCheckedIn + } + qStatusLastCheckedIn := qrStatusLastCheckedIn.String() + if qStatusLastCheckedIn != "" { + + if err := r.SetQueryParam("status.lastCheckedIn", qStatusLastCheckedIn); err != nil { + return err + } + } + } + + if o.StatusTokenState != nil { + + // query param status.tokenState + var qrStatusTokenState string + + if o.StatusTokenState != nil { + qrStatusTokenState = *o.StatusTokenState + } + qStatusTokenState := qrStatusTokenState + if qStatusTokenState != "" { + + if err := r.SetQueryParam("status.tokenState", qStatusTokenState); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_delete_bootstrap_agent_responses.go b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_delete_bootstrap_agent_responses.go new file mode 100644 index 0000000..73420f4 --- /dev/null +++ b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_delete_bootstrap_agent_responses.go @@ -0,0 +1,221 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package bootstrap + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/RafaySystems/rcloud-base/components/common/api/def/clients/sentry/models" +) + +// BootstrapDeleteBootstrapAgentReader is a Reader for the BootstrapDeleteBootstrapAgent structure. +type BootstrapDeleteBootstrapAgentReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *BootstrapDeleteBootstrapAgentReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewBootstrapDeleteBootstrapAgentOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 403: + result := NewBootstrapDeleteBootstrapAgentForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewBootstrapDeleteBootstrapAgentNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewBootstrapDeleteBootstrapAgentInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + result := NewBootstrapDeleteBootstrapAgentDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewBootstrapDeleteBootstrapAgentOK creates a BootstrapDeleteBootstrapAgentOK with default headers values +func NewBootstrapDeleteBootstrapAgentOK() *BootstrapDeleteBootstrapAgentOK { + return &BootstrapDeleteBootstrapAgentOK{} +} + +/* BootstrapDeleteBootstrapAgentOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type BootstrapDeleteBootstrapAgentOK struct { + Payload models.RPCDeleteBootstrapAgentResponse +} + +func (o *BootstrapDeleteBootstrapAgentOK) Error() string { + return fmt.Sprintf("[DELETE /v2/sentry/bootstrap/{spec.templateRef}/agent/{metadata.name}][%d] bootstrapDeleteBootstrapAgentOK %+v", 200, o.Payload) +} +func (o *BootstrapDeleteBootstrapAgentOK) GetPayload() models.RPCDeleteBootstrapAgentResponse { + return o.Payload +} + +func (o *BootstrapDeleteBootstrapAgentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBootstrapDeleteBootstrapAgentForbidden creates a BootstrapDeleteBootstrapAgentForbidden with default headers values +func NewBootstrapDeleteBootstrapAgentForbidden() *BootstrapDeleteBootstrapAgentForbidden { + return &BootstrapDeleteBootstrapAgentForbidden{} +} + +/* BootstrapDeleteBootstrapAgentForbidden describes a response with status code 403, with default header values. + +Returned when the user does not have permission to access the resource. +*/ +type BootstrapDeleteBootstrapAgentForbidden struct { + Payload interface{} +} + +func (o *BootstrapDeleteBootstrapAgentForbidden) Error() string { + return fmt.Sprintf("[DELETE /v2/sentry/bootstrap/{spec.templateRef}/agent/{metadata.name}][%d] bootstrapDeleteBootstrapAgentForbidden %+v", 403, o.Payload) +} +func (o *BootstrapDeleteBootstrapAgentForbidden) GetPayload() interface{} { + return o.Payload +} + +func (o *BootstrapDeleteBootstrapAgentForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBootstrapDeleteBootstrapAgentNotFound creates a BootstrapDeleteBootstrapAgentNotFound with default headers values +func NewBootstrapDeleteBootstrapAgentNotFound() *BootstrapDeleteBootstrapAgentNotFound { + return &BootstrapDeleteBootstrapAgentNotFound{} +} + +/* BootstrapDeleteBootstrapAgentNotFound describes a response with status code 404, with default header values. + +Returned when the resource does not exist. +*/ +type BootstrapDeleteBootstrapAgentNotFound struct { + Payload interface{} +} + +func (o *BootstrapDeleteBootstrapAgentNotFound) Error() string { + return fmt.Sprintf("[DELETE /v2/sentry/bootstrap/{spec.templateRef}/agent/{metadata.name}][%d] bootstrapDeleteBootstrapAgentNotFound %+v", 404, o.Payload) +} +func (o *BootstrapDeleteBootstrapAgentNotFound) GetPayload() interface{} { + return o.Payload +} + +func (o *BootstrapDeleteBootstrapAgentNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBootstrapDeleteBootstrapAgentInternalServerError creates a BootstrapDeleteBootstrapAgentInternalServerError with default headers values +func NewBootstrapDeleteBootstrapAgentInternalServerError() *BootstrapDeleteBootstrapAgentInternalServerError { + return &BootstrapDeleteBootstrapAgentInternalServerError{} +} + +/* BootstrapDeleteBootstrapAgentInternalServerError describes a response with status code 500, with default header values. + +Returned for internal server error +*/ +type BootstrapDeleteBootstrapAgentInternalServerError struct { + Payload interface{} +} + +func (o *BootstrapDeleteBootstrapAgentInternalServerError) Error() string { + return fmt.Sprintf("[DELETE /v2/sentry/bootstrap/{spec.templateRef}/agent/{metadata.name}][%d] bootstrapDeleteBootstrapAgentInternalServerError %+v", 500, o.Payload) +} +func (o *BootstrapDeleteBootstrapAgentInternalServerError) GetPayload() interface{} { + return o.Payload +} + +func (o *BootstrapDeleteBootstrapAgentInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBootstrapDeleteBootstrapAgentDefault creates a BootstrapDeleteBootstrapAgentDefault with default headers values +func NewBootstrapDeleteBootstrapAgentDefault(code int) *BootstrapDeleteBootstrapAgentDefault { + return &BootstrapDeleteBootstrapAgentDefault{ + _statusCode: code, + } +} + +/* BootstrapDeleteBootstrapAgentDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type BootstrapDeleteBootstrapAgentDefault struct { + _statusCode int + + Payload *models.GooglerpcStatus +} + +// Code gets the status code for the bootstrap delete bootstrap agent default response +func (o *BootstrapDeleteBootstrapAgentDefault) Code() int { + return o._statusCode +} + +func (o *BootstrapDeleteBootstrapAgentDefault) Error() string { + return fmt.Sprintf("[DELETE /v2/sentry/bootstrap/{spec.templateRef}/agent/{metadata.name}][%d] Bootstrap_DeleteBootstrapAgent default %+v", o._statusCode, o.Payload) +} +func (o *BootstrapDeleteBootstrapAgentDefault) GetPayload() *models.GooglerpcStatus { + return o.Payload +} + +func (o *BootstrapDeleteBootstrapAgentDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.GooglerpcStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_delete_relay_network_parameters.go b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_delete_relay_network_parameters.go new file mode 100644 index 0000000..1c6dfc9 --- /dev/null +++ b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_delete_relay_network_parameters.go @@ -0,0 +1,956 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package bootstrap + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewBootstrapDeleteRelayNetworkParams creates a new BootstrapDeleteRelayNetworkParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewBootstrapDeleteRelayNetworkParams() *BootstrapDeleteRelayNetworkParams { + return &BootstrapDeleteRelayNetworkParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewBootstrapDeleteRelayNetworkParamsWithTimeout creates a new BootstrapDeleteRelayNetworkParams object +// with the ability to set a timeout on a request. +func NewBootstrapDeleteRelayNetworkParamsWithTimeout(timeout time.Duration) *BootstrapDeleteRelayNetworkParams { + return &BootstrapDeleteRelayNetworkParams{ + timeout: timeout, + } +} + +// NewBootstrapDeleteRelayNetworkParamsWithContext creates a new BootstrapDeleteRelayNetworkParams object +// with the ability to set a context for a request. +func NewBootstrapDeleteRelayNetworkParamsWithContext(ctx context.Context) *BootstrapDeleteRelayNetworkParams { + return &BootstrapDeleteRelayNetworkParams{ + Context: ctx, + } +} + +// NewBootstrapDeleteRelayNetworkParamsWithHTTPClient creates a new BootstrapDeleteRelayNetworkParams object +// with the ability to set a custom HTTPClient for a request. +func NewBootstrapDeleteRelayNetworkParamsWithHTTPClient(client *http.Client) *BootstrapDeleteRelayNetworkParams { + return &BootstrapDeleteRelayNetworkParams{ + HTTPClient: client, + } +} + +/* BootstrapDeleteRelayNetworkParams contains all the parameters to send to the API endpoint + for the bootstrap delete relay network operation. + + Typically these are written to a http.Request. +*/ +type BootstrapDeleteRelayNetworkParams struct { + + /* APIVersion. + + API Version. API Version of the resource + + Default: "infra.k8smgmt.io/v3" + */ + APIVersion *string + + /* Kind. + + Kind. Kind of the resource + + Default: "RelayNetwork" + */ + Kind *string + + /* MetadataDescription. + + Description. description of the resource + */ + MetadataDescription *string + + // MetadataID. + MetadataID *string + + // MetadataModifiedAt. + // + // Format: date-time + MetadataModifiedAt *strfmt.DateTime + + /* MetadataName. + + name of the resource + */ + MetadataName string + + /* MetadataOrganization. + + Organization. Organization to which the resource belongs + */ + MetadataOrganization *string + + /* MetadataPartner. + + Partner. Partner to which the resource belongs + */ + MetadataPartner *string + + /* MetadataProject. + + Project. Project of the resource + */ + MetadataProject *string + + // SpecClustercacert. + SpecClustercacert *string + + // SpecClustercert. + SpecClustercert *string + + // SpecClusterhost. + SpecClusterhost *string + + // SpecClusterkey. + SpecClusterkey *string + + // SpecClusterpassword. + SpecClusterpassword *string + + // SpecClusterselfsigned. + SpecClusterselfsigned *bool + + // SpecPlacementClusterSelector. + SpecPlacementClusterSelector *string + + // SpecPlacementDriftAction. + // + // Default: "DriftReconcillationActionNotSet" + SpecPlacementDriftAction *string + + // SpecPlacementNodeGroupingKeys. + SpecPlacementNodeGroupingKeys []string + + /* SpecPlacementPlacementType. + + placementType is the type of placement. + + Default: "ClusterSelector" + */ + SpecPlacementPlacementType *string + + // SpecUsercacert. + SpecUsercacert *string + + // SpecUsercert. + SpecUsercert *string + + // SpecUserhost. + SpecUserhost *string + + // SpecUserkey. + SpecUserkey *string + + // SpecUserpassword. + SpecUserpassword *string + + // SpecUserselfsigned. + SpecUserselfsigned *bool + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the bootstrap delete relay network params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BootstrapDeleteRelayNetworkParams) WithDefaults() *BootstrapDeleteRelayNetworkParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the bootstrap delete relay network params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BootstrapDeleteRelayNetworkParams) SetDefaults() { + var ( + aPIVersionDefault = string("infra.k8smgmt.io/v3") + + kindDefault = string("RelayNetwork") + + specPlacementDriftActionDefault = string("DriftReconcillationActionNotSet") + + specPlacementPlacementTypeDefault = string("ClusterSelector") + ) + + val := BootstrapDeleteRelayNetworkParams{ + APIVersion: &aPIVersionDefault, + Kind: &kindDefault, + SpecPlacementDriftAction: &specPlacementDriftActionDefault, + SpecPlacementPlacementType: &specPlacementPlacementTypeDefault, + } + + val.timeout = o.timeout + val.Context = o.Context + val.HTTPClient = o.HTTPClient + *o = val +} + +// WithTimeout adds the timeout to the bootstrap delete relay network params +func (o *BootstrapDeleteRelayNetworkParams) WithTimeout(timeout time.Duration) *BootstrapDeleteRelayNetworkParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the bootstrap delete relay network params +func (o *BootstrapDeleteRelayNetworkParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the bootstrap delete relay network params +func (o *BootstrapDeleteRelayNetworkParams) WithContext(ctx context.Context) *BootstrapDeleteRelayNetworkParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the bootstrap delete relay network params +func (o *BootstrapDeleteRelayNetworkParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the bootstrap delete relay network params +func (o *BootstrapDeleteRelayNetworkParams) WithHTTPClient(client *http.Client) *BootstrapDeleteRelayNetworkParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the bootstrap delete relay network params +func (o *BootstrapDeleteRelayNetworkParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAPIVersion adds the aPIVersion to the bootstrap delete relay network params +func (o *BootstrapDeleteRelayNetworkParams) WithAPIVersion(aPIVersion *string) *BootstrapDeleteRelayNetworkParams { + o.SetAPIVersion(aPIVersion) + return o +} + +// SetAPIVersion adds the apiVersion to the bootstrap delete relay network params +func (o *BootstrapDeleteRelayNetworkParams) SetAPIVersion(aPIVersion *string) { + o.APIVersion = aPIVersion +} + +// WithKind adds the kind to the bootstrap delete relay network params +func (o *BootstrapDeleteRelayNetworkParams) WithKind(kind *string) *BootstrapDeleteRelayNetworkParams { + o.SetKind(kind) + return o +} + +// SetKind adds the kind to the bootstrap delete relay network params +func (o *BootstrapDeleteRelayNetworkParams) SetKind(kind *string) { + o.Kind = kind +} + +// WithMetadataDescription adds the metadataDescription to the bootstrap delete relay network params +func (o *BootstrapDeleteRelayNetworkParams) WithMetadataDescription(metadataDescription *string) *BootstrapDeleteRelayNetworkParams { + o.SetMetadataDescription(metadataDescription) + return o +} + +// SetMetadataDescription adds the metadataDescription to the bootstrap delete relay network params +func (o *BootstrapDeleteRelayNetworkParams) SetMetadataDescription(metadataDescription *string) { + o.MetadataDescription = metadataDescription +} + +// WithMetadataID adds the metadataID to the bootstrap delete relay network params +func (o *BootstrapDeleteRelayNetworkParams) WithMetadataID(metadataID *string) *BootstrapDeleteRelayNetworkParams { + o.SetMetadataID(metadataID) + return o +} + +// SetMetadataID adds the metadataId to the bootstrap delete relay network params +func (o *BootstrapDeleteRelayNetworkParams) SetMetadataID(metadataID *string) { + o.MetadataID = metadataID +} + +// WithMetadataModifiedAt adds the metadataModifiedAt to the bootstrap delete relay network params +func (o *BootstrapDeleteRelayNetworkParams) WithMetadataModifiedAt(metadataModifiedAt *strfmt.DateTime) *BootstrapDeleteRelayNetworkParams { + o.SetMetadataModifiedAt(metadataModifiedAt) + return o +} + +// SetMetadataModifiedAt adds the metadataModifiedAt to the bootstrap delete relay network params +func (o *BootstrapDeleteRelayNetworkParams) SetMetadataModifiedAt(metadataModifiedAt *strfmt.DateTime) { + o.MetadataModifiedAt = metadataModifiedAt +} + +// WithMetadataName adds the metadataName to the bootstrap delete relay network params +func (o *BootstrapDeleteRelayNetworkParams) WithMetadataName(metadataName string) *BootstrapDeleteRelayNetworkParams { + o.SetMetadataName(metadataName) + return o +} + +// SetMetadataName adds the metadataName to the bootstrap delete relay network params +func (o *BootstrapDeleteRelayNetworkParams) SetMetadataName(metadataName string) { + o.MetadataName = metadataName +} + +// WithMetadataOrganization adds the metadataOrganization to the bootstrap delete relay network params +func (o *BootstrapDeleteRelayNetworkParams) WithMetadataOrganization(metadataOrganization *string) *BootstrapDeleteRelayNetworkParams { + o.SetMetadataOrganization(metadataOrganization) + return o +} + +// SetMetadataOrganization adds the metadataOrganization to the bootstrap delete relay network params +func (o *BootstrapDeleteRelayNetworkParams) SetMetadataOrganization(metadataOrganization *string) { + o.MetadataOrganization = metadataOrganization +} + +// WithMetadataPartner adds the metadataPartner to the bootstrap delete relay network params +func (o *BootstrapDeleteRelayNetworkParams) WithMetadataPartner(metadataPartner *string) *BootstrapDeleteRelayNetworkParams { + o.SetMetadataPartner(metadataPartner) + return o +} + +// SetMetadataPartner adds the metadataPartner to the bootstrap delete relay network params +func (o *BootstrapDeleteRelayNetworkParams) SetMetadataPartner(metadataPartner *string) { + o.MetadataPartner = metadataPartner +} + +// WithMetadataProject adds the metadataProject to the bootstrap delete relay network params +func (o *BootstrapDeleteRelayNetworkParams) WithMetadataProject(metadataProject *string) *BootstrapDeleteRelayNetworkParams { + o.SetMetadataProject(metadataProject) + return o +} + +// SetMetadataProject adds the metadataProject to the bootstrap delete relay network params +func (o *BootstrapDeleteRelayNetworkParams) SetMetadataProject(metadataProject *string) { + o.MetadataProject = metadataProject +} + +// WithSpecClustercacert adds the specClustercacert to the bootstrap delete relay network params +func (o *BootstrapDeleteRelayNetworkParams) WithSpecClustercacert(specClustercacert *string) *BootstrapDeleteRelayNetworkParams { + o.SetSpecClustercacert(specClustercacert) + return o +} + +// SetSpecClustercacert adds the specClustercacert to the bootstrap delete relay network params +func (o *BootstrapDeleteRelayNetworkParams) SetSpecClustercacert(specClustercacert *string) { + o.SpecClustercacert = specClustercacert +} + +// WithSpecClustercert adds the specClustercert to the bootstrap delete relay network params +func (o *BootstrapDeleteRelayNetworkParams) WithSpecClustercert(specClustercert *string) *BootstrapDeleteRelayNetworkParams { + o.SetSpecClustercert(specClustercert) + return o +} + +// SetSpecClustercert adds the specClustercert to the bootstrap delete relay network params +func (o *BootstrapDeleteRelayNetworkParams) SetSpecClustercert(specClustercert *string) { + o.SpecClustercert = specClustercert +} + +// WithSpecClusterhost adds the specClusterhost to the bootstrap delete relay network params +func (o *BootstrapDeleteRelayNetworkParams) WithSpecClusterhost(specClusterhost *string) *BootstrapDeleteRelayNetworkParams { + o.SetSpecClusterhost(specClusterhost) + return o +} + +// SetSpecClusterhost adds the specClusterhost to the bootstrap delete relay network params +func (o *BootstrapDeleteRelayNetworkParams) SetSpecClusterhost(specClusterhost *string) { + o.SpecClusterhost = specClusterhost +} + +// WithSpecClusterkey adds the specClusterkey to the bootstrap delete relay network params +func (o *BootstrapDeleteRelayNetworkParams) WithSpecClusterkey(specClusterkey *string) *BootstrapDeleteRelayNetworkParams { + o.SetSpecClusterkey(specClusterkey) + return o +} + +// SetSpecClusterkey adds the specClusterkey to the bootstrap delete relay network params +func (o *BootstrapDeleteRelayNetworkParams) SetSpecClusterkey(specClusterkey *string) { + o.SpecClusterkey = specClusterkey +} + +// WithSpecClusterpassword adds the specClusterpassword to the bootstrap delete relay network params +func (o *BootstrapDeleteRelayNetworkParams) WithSpecClusterpassword(specClusterpassword *string) *BootstrapDeleteRelayNetworkParams { + o.SetSpecClusterpassword(specClusterpassword) + return o +} + +// SetSpecClusterpassword adds the specClusterpassword to the bootstrap delete relay network params +func (o *BootstrapDeleteRelayNetworkParams) SetSpecClusterpassword(specClusterpassword *string) { + o.SpecClusterpassword = specClusterpassword +} + +// WithSpecClusterselfsigned adds the specClusterselfsigned to the bootstrap delete relay network params +func (o *BootstrapDeleteRelayNetworkParams) WithSpecClusterselfsigned(specClusterselfsigned *bool) *BootstrapDeleteRelayNetworkParams { + o.SetSpecClusterselfsigned(specClusterselfsigned) + return o +} + +// SetSpecClusterselfsigned adds the specClusterselfsigned to the bootstrap delete relay network params +func (o *BootstrapDeleteRelayNetworkParams) SetSpecClusterselfsigned(specClusterselfsigned *bool) { + o.SpecClusterselfsigned = specClusterselfsigned +} + +// WithSpecPlacementClusterSelector adds the specPlacementClusterSelector to the bootstrap delete relay network params +func (o *BootstrapDeleteRelayNetworkParams) WithSpecPlacementClusterSelector(specPlacementClusterSelector *string) *BootstrapDeleteRelayNetworkParams { + o.SetSpecPlacementClusterSelector(specPlacementClusterSelector) + return o +} + +// SetSpecPlacementClusterSelector adds the specPlacementClusterSelector to the bootstrap delete relay network params +func (o *BootstrapDeleteRelayNetworkParams) SetSpecPlacementClusterSelector(specPlacementClusterSelector *string) { + o.SpecPlacementClusterSelector = specPlacementClusterSelector +} + +// WithSpecPlacementDriftAction adds the specPlacementDriftAction to the bootstrap delete relay network params +func (o *BootstrapDeleteRelayNetworkParams) WithSpecPlacementDriftAction(specPlacementDriftAction *string) *BootstrapDeleteRelayNetworkParams { + o.SetSpecPlacementDriftAction(specPlacementDriftAction) + return o +} + +// SetSpecPlacementDriftAction adds the specPlacementDriftAction to the bootstrap delete relay network params +func (o *BootstrapDeleteRelayNetworkParams) SetSpecPlacementDriftAction(specPlacementDriftAction *string) { + o.SpecPlacementDriftAction = specPlacementDriftAction +} + +// WithSpecPlacementNodeGroupingKeys adds the specPlacementNodeGroupingKeys to the bootstrap delete relay network params +func (o *BootstrapDeleteRelayNetworkParams) WithSpecPlacementNodeGroupingKeys(specPlacementNodeGroupingKeys []string) *BootstrapDeleteRelayNetworkParams { + o.SetSpecPlacementNodeGroupingKeys(specPlacementNodeGroupingKeys) + return o +} + +// SetSpecPlacementNodeGroupingKeys adds the specPlacementNodeGroupingKeys to the bootstrap delete relay network params +func (o *BootstrapDeleteRelayNetworkParams) SetSpecPlacementNodeGroupingKeys(specPlacementNodeGroupingKeys []string) { + o.SpecPlacementNodeGroupingKeys = specPlacementNodeGroupingKeys +} + +// WithSpecPlacementPlacementType adds the specPlacementPlacementType to the bootstrap delete relay network params +func (o *BootstrapDeleteRelayNetworkParams) WithSpecPlacementPlacementType(specPlacementPlacementType *string) *BootstrapDeleteRelayNetworkParams { + o.SetSpecPlacementPlacementType(specPlacementPlacementType) + return o +} + +// SetSpecPlacementPlacementType adds the specPlacementPlacementType to the bootstrap delete relay network params +func (o *BootstrapDeleteRelayNetworkParams) SetSpecPlacementPlacementType(specPlacementPlacementType *string) { + o.SpecPlacementPlacementType = specPlacementPlacementType +} + +// WithSpecUsercacert adds the specUsercacert to the bootstrap delete relay network params +func (o *BootstrapDeleteRelayNetworkParams) WithSpecUsercacert(specUsercacert *string) *BootstrapDeleteRelayNetworkParams { + o.SetSpecUsercacert(specUsercacert) + return o +} + +// SetSpecUsercacert adds the specUsercacert to the bootstrap delete relay network params +func (o *BootstrapDeleteRelayNetworkParams) SetSpecUsercacert(specUsercacert *string) { + o.SpecUsercacert = specUsercacert +} + +// WithSpecUsercert adds the specUsercert to the bootstrap delete relay network params +func (o *BootstrapDeleteRelayNetworkParams) WithSpecUsercert(specUsercert *string) *BootstrapDeleteRelayNetworkParams { + o.SetSpecUsercert(specUsercert) + return o +} + +// SetSpecUsercert adds the specUsercert to the bootstrap delete relay network params +func (o *BootstrapDeleteRelayNetworkParams) SetSpecUsercert(specUsercert *string) { + o.SpecUsercert = specUsercert +} + +// WithSpecUserhost adds the specUserhost to the bootstrap delete relay network params +func (o *BootstrapDeleteRelayNetworkParams) WithSpecUserhost(specUserhost *string) *BootstrapDeleteRelayNetworkParams { + o.SetSpecUserhost(specUserhost) + return o +} + +// SetSpecUserhost adds the specUserhost to the bootstrap delete relay network params +func (o *BootstrapDeleteRelayNetworkParams) SetSpecUserhost(specUserhost *string) { + o.SpecUserhost = specUserhost +} + +// WithSpecUserkey adds the specUserkey to the bootstrap delete relay network params +func (o *BootstrapDeleteRelayNetworkParams) WithSpecUserkey(specUserkey *string) *BootstrapDeleteRelayNetworkParams { + o.SetSpecUserkey(specUserkey) + return o +} + +// SetSpecUserkey adds the specUserkey to the bootstrap delete relay network params +func (o *BootstrapDeleteRelayNetworkParams) SetSpecUserkey(specUserkey *string) { + o.SpecUserkey = specUserkey +} + +// WithSpecUserpassword adds the specUserpassword to the bootstrap delete relay network params +func (o *BootstrapDeleteRelayNetworkParams) WithSpecUserpassword(specUserpassword *string) *BootstrapDeleteRelayNetworkParams { + o.SetSpecUserpassword(specUserpassword) + return o +} + +// SetSpecUserpassword adds the specUserpassword to the bootstrap delete relay network params +func (o *BootstrapDeleteRelayNetworkParams) SetSpecUserpassword(specUserpassword *string) { + o.SpecUserpassword = specUserpassword +} + +// WithSpecUserselfsigned adds the specUserselfsigned to the bootstrap delete relay network params +func (o *BootstrapDeleteRelayNetworkParams) WithSpecUserselfsigned(specUserselfsigned *bool) *BootstrapDeleteRelayNetworkParams { + o.SetSpecUserselfsigned(specUserselfsigned) + return o +} + +// SetSpecUserselfsigned adds the specUserselfsigned to the bootstrap delete relay network params +func (o *BootstrapDeleteRelayNetworkParams) SetSpecUserselfsigned(specUserselfsigned *bool) { + o.SpecUserselfsigned = specUserselfsigned +} + +// WriteToRequest writes these params to a swagger request +func (o *BootstrapDeleteRelayNetworkParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.APIVersion != nil { + + // query param apiVersion + var qrAPIVersion string + + if o.APIVersion != nil { + qrAPIVersion = *o.APIVersion + } + qAPIVersion := qrAPIVersion + if qAPIVersion != "" { + + if err := r.SetQueryParam("apiVersion", qAPIVersion); err != nil { + return err + } + } + } + + if o.Kind != nil { + + // query param kind + var qrKind string + + if o.Kind != nil { + qrKind = *o.Kind + } + qKind := qrKind + if qKind != "" { + + if err := r.SetQueryParam("kind", qKind); err != nil { + return err + } + } + } + + if o.MetadataDescription != nil { + + // query param metadata.description + var qrMetadataDescription string + + if o.MetadataDescription != nil { + qrMetadataDescription = *o.MetadataDescription + } + qMetadataDescription := qrMetadataDescription + if qMetadataDescription != "" { + + if err := r.SetQueryParam("metadata.description", qMetadataDescription); err != nil { + return err + } + } + } + + if o.MetadataID != nil { + + // query param metadata.id + var qrMetadataID string + + if o.MetadataID != nil { + qrMetadataID = *o.MetadataID + } + qMetadataID := qrMetadataID + if qMetadataID != "" { + + if err := r.SetQueryParam("metadata.id", qMetadataID); err != nil { + return err + } + } + } + + if o.MetadataModifiedAt != nil { + + // query param metadata.modifiedAt + var qrMetadataModifiedAt strfmt.DateTime + + if o.MetadataModifiedAt != nil { + qrMetadataModifiedAt = *o.MetadataModifiedAt + } + qMetadataModifiedAt := qrMetadataModifiedAt.String() + if qMetadataModifiedAt != "" { + + if err := r.SetQueryParam("metadata.modifiedAt", qMetadataModifiedAt); err != nil { + return err + } + } + } + + // path param metadata.name + if err := r.SetPathParam("metadata.name", o.MetadataName); err != nil { + return err + } + + if o.MetadataOrganization != nil { + + // query param metadata.organization + var qrMetadataOrganization string + + if o.MetadataOrganization != nil { + qrMetadataOrganization = *o.MetadataOrganization + } + qMetadataOrganization := qrMetadataOrganization + if qMetadataOrganization != "" { + + if err := r.SetQueryParam("metadata.organization", qMetadataOrganization); err != nil { + return err + } + } + } + + if o.MetadataPartner != nil { + + // query param metadata.partner + var qrMetadataPartner string + + if o.MetadataPartner != nil { + qrMetadataPartner = *o.MetadataPartner + } + qMetadataPartner := qrMetadataPartner + if qMetadataPartner != "" { + + if err := r.SetQueryParam("metadata.partner", qMetadataPartner); err != nil { + return err + } + } + } + + if o.MetadataProject != nil { + + // query param metadata.project + var qrMetadataProject string + + if o.MetadataProject != nil { + qrMetadataProject = *o.MetadataProject + } + qMetadataProject := qrMetadataProject + if qMetadataProject != "" { + + if err := r.SetQueryParam("metadata.project", qMetadataProject); err != nil { + return err + } + } + } + + if o.SpecClustercacert != nil { + + // query param spec.clustercacert + var qrSpecClustercacert string + + if o.SpecClustercacert != nil { + qrSpecClustercacert = *o.SpecClustercacert + } + qSpecClustercacert := qrSpecClustercacert + if qSpecClustercacert != "" { + + if err := r.SetQueryParam("spec.clustercacert", qSpecClustercacert); err != nil { + return err + } + } + } + + if o.SpecClustercert != nil { + + // query param spec.clustercert + var qrSpecClustercert string + + if o.SpecClustercert != nil { + qrSpecClustercert = *o.SpecClustercert + } + qSpecClustercert := qrSpecClustercert + if qSpecClustercert != "" { + + if err := r.SetQueryParam("spec.clustercert", qSpecClustercert); err != nil { + return err + } + } + } + + if o.SpecClusterhost != nil { + + // query param spec.clusterhost + var qrSpecClusterhost string + + if o.SpecClusterhost != nil { + qrSpecClusterhost = *o.SpecClusterhost + } + qSpecClusterhost := qrSpecClusterhost + if qSpecClusterhost != "" { + + if err := r.SetQueryParam("spec.clusterhost", qSpecClusterhost); err != nil { + return err + } + } + } + + if o.SpecClusterkey != nil { + + // query param spec.clusterkey + var qrSpecClusterkey string + + if o.SpecClusterkey != nil { + qrSpecClusterkey = *o.SpecClusterkey + } + qSpecClusterkey := qrSpecClusterkey + if qSpecClusterkey != "" { + + if err := r.SetQueryParam("spec.clusterkey", qSpecClusterkey); err != nil { + return err + } + } + } + + if o.SpecClusterpassword != nil { + + // query param spec.clusterpassword + var qrSpecClusterpassword string + + if o.SpecClusterpassword != nil { + qrSpecClusterpassword = *o.SpecClusterpassword + } + qSpecClusterpassword := qrSpecClusterpassword + if qSpecClusterpassword != "" { + + if err := r.SetQueryParam("spec.clusterpassword", qSpecClusterpassword); err != nil { + return err + } + } + } + + if o.SpecClusterselfsigned != nil { + + // query param spec.clusterselfsigned + var qrSpecClusterselfsigned bool + + if o.SpecClusterselfsigned != nil { + qrSpecClusterselfsigned = *o.SpecClusterselfsigned + } + qSpecClusterselfsigned := swag.FormatBool(qrSpecClusterselfsigned) + if qSpecClusterselfsigned != "" { + + if err := r.SetQueryParam("spec.clusterselfsigned", qSpecClusterselfsigned); err != nil { + return err + } + } + } + + if o.SpecPlacementClusterSelector != nil { + + // query param spec.placement.clusterSelector + var qrSpecPlacementClusterSelector string + + if o.SpecPlacementClusterSelector != nil { + qrSpecPlacementClusterSelector = *o.SpecPlacementClusterSelector + } + qSpecPlacementClusterSelector := qrSpecPlacementClusterSelector + if qSpecPlacementClusterSelector != "" { + + if err := r.SetQueryParam("spec.placement.clusterSelector", qSpecPlacementClusterSelector); err != nil { + return err + } + } + } + + if o.SpecPlacementDriftAction != nil { + + // query param spec.placement.driftAction + var qrSpecPlacementDriftAction string + + if o.SpecPlacementDriftAction != nil { + qrSpecPlacementDriftAction = *o.SpecPlacementDriftAction + } + qSpecPlacementDriftAction := qrSpecPlacementDriftAction + if qSpecPlacementDriftAction != "" { + + if err := r.SetQueryParam("spec.placement.driftAction", qSpecPlacementDriftAction); err != nil { + return err + } + } + } + + if o.SpecPlacementNodeGroupingKeys != nil { + + // binding items for spec.placement.nodeGroupingKeys + joinedSpecPlacementNodeGroupingKeys := o.bindParamSpecPlacementNodeGroupingKeys(reg) + + // query array param spec.placement.nodeGroupingKeys + if err := r.SetQueryParam("spec.placement.nodeGroupingKeys", joinedSpecPlacementNodeGroupingKeys...); err != nil { + return err + } + } + + if o.SpecPlacementPlacementType != nil { + + // query param spec.placement.placementType + var qrSpecPlacementPlacementType string + + if o.SpecPlacementPlacementType != nil { + qrSpecPlacementPlacementType = *o.SpecPlacementPlacementType + } + qSpecPlacementPlacementType := qrSpecPlacementPlacementType + if qSpecPlacementPlacementType != "" { + + if err := r.SetQueryParam("spec.placement.placementType", qSpecPlacementPlacementType); err != nil { + return err + } + } + } + + if o.SpecUsercacert != nil { + + // query param spec.usercacert + var qrSpecUsercacert string + + if o.SpecUsercacert != nil { + qrSpecUsercacert = *o.SpecUsercacert + } + qSpecUsercacert := qrSpecUsercacert + if qSpecUsercacert != "" { + + if err := r.SetQueryParam("spec.usercacert", qSpecUsercacert); err != nil { + return err + } + } + } + + if o.SpecUsercert != nil { + + // query param spec.usercert + var qrSpecUsercert string + + if o.SpecUsercert != nil { + qrSpecUsercert = *o.SpecUsercert + } + qSpecUsercert := qrSpecUsercert + if qSpecUsercert != "" { + + if err := r.SetQueryParam("spec.usercert", qSpecUsercert); err != nil { + return err + } + } + } + + if o.SpecUserhost != nil { + + // query param spec.userhost + var qrSpecUserhost string + + if o.SpecUserhost != nil { + qrSpecUserhost = *o.SpecUserhost + } + qSpecUserhost := qrSpecUserhost + if qSpecUserhost != "" { + + if err := r.SetQueryParam("spec.userhost", qSpecUserhost); err != nil { + return err + } + } + } + + if o.SpecUserkey != nil { + + // query param spec.userkey + var qrSpecUserkey string + + if o.SpecUserkey != nil { + qrSpecUserkey = *o.SpecUserkey + } + qSpecUserkey := qrSpecUserkey + if qSpecUserkey != "" { + + if err := r.SetQueryParam("spec.userkey", qSpecUserkey); err != nil { + return err + } + } + } + + if o.SpecUserpassword != nil { + + // query param spec.userpassword + var qrSpecUserpassword string + + if o.SpecUserpassword != nil { + qrSpecUserpassword = *o.SpecUserpassword + } + qSpecUserpassword := qrSpecUserpassword + if qSpecUserpassword != "" { + + if err := r.SetQueryParam("spec.userpassword", qSpecUserpassword); err != nil { + return err + } + } + } + + if o.SpecUserselfsigned != nil { + + // query param spec.userselfsigned + var qrSpecUserselfsigned bool + + if o.SpecUserselfsigned != nil { + qrSpecUserselfsigned = *o.SpecUserselfsigned + } + qSpecUserselfsigned := swag.FormatBool(qrSpecUserselfsigned) + if qSpecUserselfsigned != "" { + + if err := r.SetQueryParam("spec.userselfsigned", qSpecUserselfsigned); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// bindParamBootstrapDeleteRelayNetwork binds the parameter spec.placement.nodeGroupingKeys +func (o *BootstrapDeleteRelayNetworkParams) bindParamSpecPlacementNodeGroupingKeys(formats strfmt.Registry) []string { + specPlacementNodeGroupingKeysIR := o.SpecPlacementNodeGroupingKeys + + var specPlacementNodeGroupingKeysIC []string + for _, specPlacementNodeGroupingKeysIIR := range specPlacementNodeGroupingKeysIR { // explode []string + + specPlacementNodeGroupingKeysIIV := specPlacementNodeGroupingKeysIIR // string as string + specPlacementNodeGroupingKeysIC = append(specPlacementNodeGroupingKeysIC, specPlacementNodeGroupingKeysIIV) + } + + // items.CollectionFormat: "multi" + specPlacementNodeGroupingKeysIS := swag.JoinByFormat(specPlacementNodeGroupingKeysIC, "multi") + + return specPlacementNodeGroupingKeysIS +} diff --git a/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_delete_relay_network_responses.go b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_delete_relay_network_responses.go new file mode 100644 index 0000000..5b4da11 --- /dev/null +++ b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_delete_relay_network_responses.go @@ -0,0 +1,221 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package bootstrap + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/RafaySystems/rcloud-base/components/common/api/def/clients/sentry/models" +) + +// BootstrapDeleteRelayNetworkReader is a Reader for the BootstrapDeleteRelayNetwork structure. +type BootstrapDeleteRelayNetworkReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *BootstrapDeleteRelayNetworkReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewBootstrapDeleteRelayNetworkOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 403: + result := NewBootstrapDeleteRelayNetworkForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewBootstrapDeleteRelayNetworkNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewBootstrapDeleteRelayNetworkInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + result := NewBootstrapDeleteRelayNetworkDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewBootstrapDeleteRelayNetworkOK creates a BootstrapDeleteRelayNetworkOK with default headers values +func NewBootstrapDeleteRelayNetworkOK() *BootstrapDeleteRelayNetworkOK { + return &BootstrapDeleteRelayNetworkOK{} +} + +/* BootstrapDeleteRelayNetworkOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type BootstrapDeleteRelayNetworkOK struct { + Payload models.RPCDeleteRelayNetworkResponse +} + +func (o *BootstrapDeleteRelayNetworkOK) Error() string { + return fmt.Sprintf("[DELETE /v2/sentry/relaynetwork/{metadata.name}][%d] bootstrapDeleteRelayNetworkOK %+v", 200, o.Payload) +} +func (o *BootstrapDeleteRelayNetworkOK) GetPayload() models.RPCDeleteRelayNetworkResponse { + return o.Payload +} + +func (o *BootstrapDeleteRelayNetworkOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBootstrapDeleteRelayNetworkForbidden creates a BootstrapDeleteRelayNetworkForbidden with default headers values +func NewBootstrapDeleteRelayNetworkForbidden() *BootstrapDeleteRelayNetworkForbidden { + return &BootstrapDeleteRelayNetworkForbidden{} +} + +/* BootstrapDeleteRelayNetworkForbidden describes a response with status code 403, with default header values. + +Returned when the user does not have permission to access the resource. +*/ +type BootstrapDeleteRelayNetworkForbidden struct { + Payload interface{} +} + +func (o *BootstrapDeleteRelayNetworkForbidden) Error() string { + return fmt.Sprintf("[DELETE /v2/sentry/relaynetwork/{metadata.name}][%d] bootstrapDeleteRelayNetworkForbidden %+v", 403, o.Payload) +} +func (o *BootstrapDeleteRelayNetworkForbidden) GetPayload() interface{} { + return o.Payload +} + +func (o *BootstrapDeleteRelayNetworkForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBootstrapDeleteRelayNetworkNotFound creates a BootstrapDeleteRelayNetworkNotFound with default headers values +func NewBootstrapDeleteRelayNetworkNotFound() *BootstrapDeleteRelayNetworkNotFound { + return &BootstrapDeleteRelayNetworkNotFound{} +} + +/* BootstrapDeleteRelayNetworkNotFound describes a response with status code 404, with default header values. + +Returned when the resource does not exist. +*/ +type BootstrapDeleteRelayNetworkNotFound struct { + Payload interface{} +} + +func (o *BootstrapDeleteRelayNetworkNotFound) Error() string { + return fmt.Sprintf("[DELETE /v2/sentry/relaynetwork/{metadata.name}][%d] bootstrapDeleteRelayNetworkNotFound %+v", 404, o.Payload) +} +func (o *BootstrapDeleteRelayNetworkNotFound) GetPayload() interface{} { + return o.Payload +} + +func (o *BootstrapDeleteRelayNetworkNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBootstrapDeleteRelayNetworkInternalServerError creates a BootstrapDeleteRelayNetworkInternalServerError with default headers values +func NewBootstrapDeleteRelayNetworkInternalServerError() *BootstrapDeleteRelayNetworkInternalServerError { + return &BootstrapDeleteRelayNetworkInternalServerError{} +} + +/* BootstrapDeleteRelayNetworkInternalServerError describes a response with status code 500, with default header values. + +Returned for internal server error +*/ +type BootstrapDeleteRelayNetworkInternalServerError struct { + Payload interface{} +} + +func (o *BootstrapDeleteRelayNetworkInternalServerError) Error() string { + return fmt.Sprintf("[DELETE /v2/sentry/relaynetwork/{metadata.name}][%d] bootstrapDeleteRelayNetworkInternalServerError %+v", 500, o.Payload) +} +func (o *BootstrapDeleteRelayNetworkInternalServerError) GetPayload() interface{} { + return o.Payload +} + +func (o *BootstrapDeleteRelayNetworkInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBootstrapDeleteRelayNetworkDefault creates a BootstrapDeleteRelayNetworkDefault with default headers values +func NewBootstrapDeleteRelayNetworkDefault(code int) *BootstrapDeleteRelayNetworkDefault { + return &BootstrapDeleteRelayNetworkDefault{ + _statusCode: code, + } +} + +/* BootstrapDeleteRelayNetworkDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type BootstrapDeleteRelayNetworkDefault struct { + _statusCode int + + Payload *models.GooglerpcStatus +} + +// Code gets the status code for the bootstrap delete relay network default response +func (o *BootstrapDeleteRelayNetworkDefault) Code() int { + return o._statusCode +} + +func (o *BootstrapDeleteRelayNetworkDefault) Error() string { + return fmt.Sprintf("[DELETE /v2/sentry/relaynetwork/{metadata.name}][%d] Bootstrap_DeleteRelayNetwork default %+v", o._statusCode, o.Payload) +} +func (o *BootstrapDeleteRelayNetworkDefault) GetPayload() *models.GooglerpcStatus { + return o.Payload +} + +func (o *BootstrapDeleteRelayNetworkDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.GooglerpcStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_download_relay_network_agent_parameters.go b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_download_relay_network_agent_parameters.go new file mode 100644 index 0000000..74918b4 --- /dev/null +++ b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_download_relay_network_agent_parameters.go @@ -0,0 +1,368 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package bootstrap + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewBootstrapDownloadRelayNetworkAgentParams creates a new BootstrapDownloadRelayNetworkAgentParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewBootstrapDownloadRelayNetworkAgentParams() *BootstrapDownloadRelayNetworkAgentParams { + return &BootstrapDownloadRelayNetworkAgentParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewBootstrapDownloadRelayNetworkAgentParamsWithTimeout creates a new BootstrapDownloadRelayNetworkAgentParams object +// with the ability to set a timeout on a request. +func NewBootstrapDownloadRelayNetworkAgentParamsWithTimeout(timeout time.Duration) *BootstrapDownloadRelayNetworkAgentParams { + return &BootstrapDownloadRelayNetworkAgentParams{ + timeout: timeout, + } +} + +// NewBootstrapDownloadRelayNetworkAgentParamsWithContext creates a new BootstrapDownloadRelayNetworkAgentParams object +// with the ability to set a context for a request. +func NewBootstrapDownloadRelayNetworkAgentParamsWithContext(ctx context.Context) *BootstrapDownloadRelayNetworkAgentParams { + return &BootstrapDownloadRelayNetworkAgentParams{ + Context: ctx, + } +} + +// NewBootstrapDownloadRelayNetworkAgentParamsWithHTTPClient creates a new BootstrapDownloadRelayNetworkAgentParams object +// with the ability to set a custom HTTPClient for a request. +func NewBootstrapDownloadRelayNetworkAgentParamsWithHTTPClient(client *http.Client) *BootstrapDownloadRelayNetworkAgentParams { + return &BootstrapDownloadRelayNetworkAgentParams{ + HTTPClient: client, + } +} + +/* BootstrapDownloadRelayNetworkAgentParams contains all the parameters to send to the API endpoint + for the bootstrap download relay network agent operation. + + Typically these are written to a http.Request. +*/ +type BootstrapDownloadRelayNetworkAgentParams struct { + + // ClusterScope. + ClusterScope string + + /* MetadataDescription. + + Description. description of the resource + */ + MetadataDescription *string + + // MetadataID. + MetadataID *string + + // MetadataModifiedAt. + // + // Format: date-time + MetadataModifiedAt *strfmt.DateTime + + /* MetadataName. + + name of the resource + */ + MetadataName string + + /* MetadataOrganization. + + Organization. Organization to which the resource belongs + */ + MetadataOrganization *string + + /* MetadataPartner. + + Partner. Partner to which the resource belongs + */ + MetadataPartner *string + + /* MetadataProject. + + Project. Project of the resource + */ + MetadataProject *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the bootstrap download relay network agent params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BootstrapDownloadRelayNetworkAgentParams) WithDefaults() *BootstrapDownloadRelayNetworkAgentParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the bootstrap download relay network agent params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BootstrapDownloadRelayNetworkAgentParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the bootstrap download relay network agent params +func (o *BootstrapDownloadRelayNetworkAgentParams) WithTimeout(timeout time.Duration) *BootstrapDownloadRelayNetworkAgentParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the bootstrap download relay network agent params +func (o *BootstrapDownloadRelayNetworkAgentParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the bootstrap download relay network agent params +func (o *BootstrapDownloadRelayNetworkAgentParams) WithContext(ctx context.Context) *BootstrapDownloadRelayNetworkAgentParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the bootstrap download relay network agent params +func (o *BootstrapDownloadRelayNetworkAgentParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the bootstrap download relay network agent params +func (o *BootstrapDownloadRelayNetworkAgentParams) WithHTTPClient(client *http.Client) *BootstrapDownloadRelayNetworkAgentParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the bootstrap download relay network agent params +func (o *BootstrapDownloadRelayNetworkAgentParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithClusterScope adds the clusterScope to the bootstrap download relay network agent params +func (o *BootstrapDownloadRelayNetworkAgentParams) WithClusterScope(clusterScope string) *BootstrapDownloadRelayNetworkAgentParams { + o.SetClusterScope(clusterScope) + return o +} + +// SetClusterScope adds the clusterScope to the bootstrap download relay network agent params +func (o *BootstrapDownloadRelayNetworkAgentParams) SetClusterScope(clusterScope string) { + o.ClusterScope = clusterScope +} + +// WithMetadataDescription adds the metadataDescription to the bootstrap download relay network agent params +func (o *BootstrapDownloadRelayNetworkAgentParams) WithMetadataDescription(metadataDescription *string) *BootstrapDownloadRelayNetworkAgentParams { + o.SetMetadataDescription(metadataDescription) + return o +} + +// SetMetadataDescription adds the metadataDescription to the bootstrap download relay network agent params +func (o *BootstrapDownloadRelayNetworkAgentParams) SetMetadataDescription(metadataDescription *string) { + o.MetadataDescription = metadataDescription +} + +// WithMetadataID adds the metadataID to the bootstrap download relay network agent params +func (o *BootstrapDownloadRelayNetworkAgentParams) WithMetadataID(metadataID *string) *BootstrapDownloadRelayNetworkAgentParams { + o.SetMetadataID(metadataID) + return o +} + +// SetMetadataID adds the metadataId to the bootstrap download relay network agent params +func (o *BootstrapDownloadRelayNetworkAgentParams) SetMetadataID(metadataID *string) { + o.MetadataID = metadataID +} + +// WithMetadataModifiedAt adds the metadataModifiedAt to the bootstrap download relay network agent params +func (o *BootstrapDownloadRelayNetworkAgentParams) WithMetadataModifiedAt(metadataModifiedAt *strfmt.DateTime) *BootstrapDownloadRelayNetworkAgentParams { + o.SetMetadataModifiedAt(metadataModifiedAt) + return o +} + +// SetMetadataModifiedAt adds the metadataModifiedAt to the bootstrap download relay network agent params +func (o *BootstrapDownloadRelayNetworkAgentParams) SetMetadataModifiedAt(metadataModifiedAt *strfmt.DateTime) { + o.MetadataModifiedAt = metadataModifiedAt +} + +// WithMetadataName adds the metadataName to the bootstrap download relay network agent params +func (o *BootstrapDownloadRelayNetworkAgentParams) WithMetadataName(metadataName string) *BootstrapDownloadRelayNetworkAgentParams { + o.SetMetadataName(metadataName) + return o +} + +// SetMetadataName adds the metadataName to the bootstrap download relay network agent params +func (o *BootstrapDownloadRelayNetworkAgentParams) SetMetadataName(metadataName string) { + o.MetadataName = metadataName +} + +// WithMetadataOrganization adds the metadataOrganization to the bootstrap download relay network agent params +func (o *BootstrapDownloadRelayNetworkAgentParams) WithMetadataOrganization(metadataOrganization *string) *BootstrapDownloadRelayNetworkAgentParams { + o.SetMetadataOrganization(metadataOrganization) + return o +} + +// SetMetadataOrganization adds the metadataOrganization to the bootstrap download relay network agent params +func (o *BootstrapDownloadRelayNetworkAgentParams) SetMetadataOrganization(metadataOrganization *string) { + o.MetadataOrganization = metadataOrganization +} + +// WithMetadataPartner adds the metadataPartner to the bootstrap download relay network agent params +func (o *BootstrapDownloadRelayNetworkAgentParams) WithMetadataPartner(metadataPartner *string) *BootstrapDownloadRelayNetworkAgentParams { + o.SetMetadataPartner(metadataPartner) + return o +} + +// SetMetadataPartner adds the metadataPartner to the bootstrap download relay network agent params +func (o *BootstrapDownloadRelayNetworkAgentParams) SetMetadataPartner(metadataPartner *string) { + o.MetadataPartner = metadataPartner +} + +// WithMetadataProject adds the metadataProject to the bootstrap download relay network agent params +func (o *BootstrapDownloadRelayNetworkAgentParams) WithMetadataProject(metadataProject *string) *BootstrapDownloadRelayNetworkAgentParams { + o.SetMetadataProject(metadataProject) + return o +} + +// SetMetadataProject adds the metadataProject to the bootstrap download relay network agent params +func (o *BootstrapDownloadRelayNetworkAgentParams) SetMetadataProject(metadataProject *string) { + o.MetadataProject = metadataProject +} + +// WriteToRequest writes these params to a swagger request +func (o *BootstrapDownloadRelayNetworkAgentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param clusterScope + if err := r.SetPathParam("clusterScope", o.ClusterScope); err != nil { + return err + } + + if o.MetadataDescription != nil { + + // query param metadata.description + var qrMetadataDescription string + + if o.MetadataDescription != nil { + qrMetadataDescription = *o.MetadataDescription + } + qMetadataDescription := qrMetadataDescription + if qMetadataDescription != "" { + + if err := r.SetQueryParam("metadata.description", qMetadataDescription); err != nil { + return err + } + } + } + + if o.MetadataID != nil { + + // query param metadata.id + var qrMetadataID string + + if o.MetadataID != nil { + qrMetadataID = *o.MetadataID + } + qMetadataID := qrMetadataID + if qMetadataID != "" { + + if err := r.SetQueryParam("metadata.id", qMetadataID); err != nil { + return err + } + } + } + + if o.MetadataModifiedAt != nil { + + // query param metadata.modifiedAt + var qrMetadataModifiedAt strfmt.DateTime + + if o.MetadataModifiedAt != nil { + qrMetadataModifiedAt = *o.MetadataModifiedAt + } + qMetadataModifiedAt := qrMetadataModifiedAt.String() + if qMetadataModifiedAt != "" { + + if err := r.SetQueryParam("metadata.modifiedAt", qMetadataModifiedAt); err != nil { + return err + } + } + } + + // path param metadata.name + if err := r.SetPathParam("metadata.name", o.MetadataName); err != nil { + return err + } + + if o.MetadataOrganization != nil { + + // query param metadata.organization + var qrMetadataOrganization string + + if o.MetadataOrganization != nil { + qrMetadataOrganization = *o.MetadataOrganization + } + qMetadataOrganization := qrMetadataOrganization + if qMetadataOrganization != "" { + + if err := r.SetQueryParam("metadata.organization", qMetadataOrganization); err != nil { + return err + } + } + } + + if o.MetadataPartner != nil { + + // query param metadata.partner + var qrMetadataPartner string + + if o.MetadataPartner != nil { + qrMetadataPartner = *o.MetadataPartner + } + qMetadataPartner := qrMetadataPartner + if qMetadataPartner != "" { + + if err := r.SetQueryParam("metadata.partner", qMetadataPartner); err != nil { + return err + } + } + } + + if o.MetadataProject != nil { + + // query param metadata.project + var qrMetadataProject string + + if o.MetadataProject != nil { + qrMetadataProject = *o.MetadataProject + } + qMetadataProject := qrMetadataProject + if qMetadataProject != "" { + + if err := r.SetQueryParam("metadata.project", qMetadataProject); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_download_relay_network_agent_responses.go b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_download_relay_network_agent_responses.go new file mode 100644 index 0000000..d616031 --- /dev/null +++ b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_download_relay_network_agent_responses.go @@ -0,0 +1,223 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package bootstrap + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/RafaySystems/rcloud-base/components/common/api/def/clients/sentry/models" +) + +// BootstrapDownloadRelayNetworkAgentReader is a Reader for the BootstrapDownloadRelayNetworkAgent structure. +type BootstrapDownloadRelayNetworkAgentReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *BootstrapDownloadRelayNetworkAgentReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewBootstrapDownloadRelayNetworkAgentOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 403: + result := NewBootstrapDownloadRelayNetworkAgentForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewBootstrapDownloadRelayNetworkAgentNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewBootstrapDownloadRelayNetworkAgentInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + result := NewBootstrapDownloadRelayNetworkAgentDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewBootstrapDownloadRelayNetworkAgentOK creates a BootstrapDownloadRelayNetworkAgentOK with default headers values +func NewBootstrapDownloadRelayNetworkAgentOK() *BootstrapDownloadRelayNetworkAgentOK { + return &BootstrapDownloadRelayNetworkAgentOK{} +} + +/* BootstrapDownloadRelayNetworkAgentOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type BootstrapDownloadRelayNetworkAgentOK struct { + Payload *models.V3HTTPBody +} + +func (o *BootstrapDownloadRelayNetworkAgentOK) Error() string { + return fmt.Sprintf("[GET /v2/sentry/relaynetwork/{metadata.name}/{clusterScope}/agentdownload][%d] bootstrapDownloadRelayNetworkAgentOK %+v", 200, o.Payload) +} +func (o *BootstrapDownloadRelayNetworkAgentOK) GetPayload() *models.V3HTTPBody { + return o.Payload +} + +func (o *BootstrapDownloadRelayNetworkAgentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V3HTTPBody) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBootstrapDownloadRelayNetworkAgentForbidden creates a BootstrapDownloadRelayNetworkAgentForbidden with default headers values +func NewBootstrapDownloadRelayNetworkAgentForbidden() *BootstrapDownloadRelayNetworkAgentForbidden { + return &BootstrapDownloadRelayNetworkAgentForbidden{} +} + +/* BootstrapDownloadRelayNetworkAgentForbidden describes a response with status code 403, with default header values. + +Returned when the user does not have permission to access the resource. +*/ +type BootstrapDownloadRelayNetworkAgentForbidden struct { + Payload interface{} +} + +func (o *BootstrapDownloadRelayNetworkAgentForbidden) Error() string { + return fmt.Sprintf("[GET /v2/sentry/relaynetwork/{metadata.name}/{clusterScope}/agentdownload][%d] bootstrapDownloadRelayNetworkAgentForbidden %+v", 403, o.Payload) +} +func (o *BootstrapDownloadRelayNetworkAgentForbidden) GetPayload() interface{} { + return o.Payload +} + +func (o *BootstrapDownloadRelayNetworkAgentForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBootstrapDownloadRelayNetworkAgentNotFound creates a BootstrapDownloadRelayNetworkAgentNotFound with default headers values +func NewBootstrapDownloadRelayNetworkAgentNotFound() *BootstrapDownloadRelayNetworkAgentNotFound { + return &BootstrapDownloadRelayNetworkAgentNotFound{} +} + +/* BootstrapDownloadRelayNetworkAgentNotFound describes a response with status code 404, with default header values. + +Returned when the resource does not exist. +*/ +type BootstrapDownloadRelayNetworkAgentNotFound struct { + Payload interface{} +} + +func (o *BootstrapDownloadRelayNetworkAgentNotFound) Error() string { + return fmt.Sprintf("[GET /v2/sentry/relaynetwork/{metadata.name}/{clusterScope}/agentdownload][%d] bootstrapDownloadRelayNetworkAgentNotFound %+v", 404, o.Payload) +} +func (o *BootstrapDownloadRelayNetworkAgentNotFound) GetPayload() interface{} { + return o.Payload +} + +func (o *BootstrapDownloadRelayNetworkAgentNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBootstrapDownloadRelayNetworkAgentInternalServerError creates a BootstrapDownloadRelayNetworkAgentInternalServerError with default headers values +func NewBootstrapDownloadRelayNetworkAgentInternalServerError() *BootstrapDownloadRelayNetworkAgentInternalServerError { + return &BootstrapDownloadRelayNetworkAgentInternalServerError{} +} + +/* BootstrapDownloadRelayNetworkAgentInternalServerError describes a response with status code 500, with default header values. + +Returned for internal server error +*/ +type BootstrapDownloadRelayNetworkAgentInternalServerError struct { + Payload interface{} +} + +func (o *BootstrapDownloadRelayNetworkAgentInternalServerError) Error() string { + return fmt.Sprintf("[GET /v2/sentry/relaynetwork/{metadata.name}/{clusterScope}/agentdownload][%d] bootstrapDownloadRelayNetworkAgentInternalServerError %+v", 500, o.Payload) +} +func (o *BootstrapDownloadRelayNetworkAgentInternalServerError) GetPayload() interface{} { + return o.Payload +} + +func (o *BootstrapDownloadRelayNetworkAgentInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBootstrapDownloadRelayNetworkAgentDefault creates a BootstrapDownloadRelayNetworkAgentDefault with default headers values +func NewBootstrapDownloadRelayNetworkAgentDefault(code int) *BootstrapDownloadRelayNetworkAgentDefault { + return &BootstrapDownloadRelayNetworkAgentDefault{ + _statusCode: code, + } +} + +/* BootstrapDownloadRelayNetworkAgentDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type BootstrapDownloadRelayNetworkAgentDefault struct { + _statusCode int + + Payload *models.GooglerpcStatus +} + +// Code gets the status code for the bootstrap download relay network agent default response +func (o *BootstrapDownloadRelayNetworkAgentDefault) Code() int { + return o._statusCode +} + +func (o *BootstrapDownloadRelayNetworkAgentDefault) Error() string { + return fmt.Sprintf("[GET /v2/sentry/relaynetwork/{metadata.name}/{clusterScope}/agentdownload][%d] Bootstrap_DownloadRelayNetworkAgent default %+v", o._statusCode, o.Payload) +} +func (o *BootstrapDownloadRelayNetworkAgentDefault) GetPayload() *models.GooglerpcStatus { + return o.Payload +} + +func (o *BootstrapDownloadRelayNetworkAgentDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.GooglerpcStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_download_relay_network_parameters.go b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_download_relay_network_parameters.go new file mode 100644 index 0000000..1854e74 --- /dev/null +++ b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_download_relay_network_parameters.go @@ -0,0 +1,956 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package bootstrap + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewBootstrapDownloadRelayNetworkParams creates a new BootstrapDownloadRelayNetworkParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewBootstrapDownloadRelayNetworkParams() *BootstrapDownloadRelayNetworkParams { + return &BootstrapDownloadRelayNetworkParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewBootstrapDownloadRelayNetworkParamsWithTimeout creates a new BootstrapDownloadRelayNetworkParams object +// with the ability to set a timeout on a request. +func NewBootstrapDownloadRelayNetworkParamsWithTimeout(timeout time.Duration) *BootstrapDownloadRelayNetworkParams { + return &BootstrapDownloadRelayNetworkParams{ + timeout: timeout, + } +} + +// NewBootstrapDownloadRelayNetworkParamsWithContext creates a new BootstrapDownloadRelayNetworkParams object +// with the ability to set a context for a request. +func NewBootstrapDownloadRelayNetworkParamsWithContext(ctx context.Context) *BootstrapDownloadRelayNetworkParams { + return &BootstrapDownloadRelayNetworkParams{ + Context: ctx, + } +} + +// NewBootstrapDownloadRelayNetworkParamsWithHTTPClient creates a new BootstrapDownloadRelayNetworkParams object +// with the ability to set a custom HTTPClient for a request. +func NewBootstrapDownloadRelayNetworkParamsWithHTTPClient(client *http.Client) *BootstrapDownloadRelayNetworkParams { + return &BootstrapDownloadRelayNetworkParams{ + HTTPClient: client, + } +} + +/* BootstrapDownloadRelayNetworkParams contains all the parameters to send to the API endpoint + for the bootstrap download relay network operation. + + Typically these are written to a http.Request. +*/ +type BootstrapDownloadRelayNetworkParams struct { + + /* APIVersion. + + API Version. API Version of the resource + + Default: "infra.k8smgmt.io/v3" + */ + APIVersion *string + + /* Kind. + + Kind. Kind of the resource + + Default: "RelayNetwork" + */ + Kind *string + + /* MetadataDescription. + + Description. description of the resource + */ + MetadataDescription *string + + // MetadataID. + MetadataID *string + + // MetadataModifiedAt. + // + // Format: date-time + MetadataModifiedAt *strfmt.DateTime + + /* MetadataName. + + name of the resource + */ + MetadataName string + + /* MetadataOrganization. + + Organization. Organization to which the resource belongs + */ + MetadataOrganization *string + + /* MetadataPartner. + + Partner. Partner to which the resource belongs + */ + MetadataPartner *string + + /* MetadataProject. + + Project. Project of the resource + */ + MetadataProject *string + + // SpecClustercacert. + SpecClustercacert *string + + // SpecClustercert. + SpecClustercert *string + + // SpecClusterhost. + SpecClusterhost *string + + // SpecClusterkey. + SpecClusterkey *string + + // SpecClusterpassword. + SpecClusterpassword *string + + // SpecClusterselfsigned. + SpecClusterselfsigned *bool + + // SpecPlacementClusterSelector. + SpecPlacementClusterSelector *string + + // SpecPlacementDriftAction. + // + // Default: "DriftReconcillationActionNotSet" + SpecPlacementDriftAction *string + + // SpecPlacementNodeGroupingKeys. + SpecPlacementNodeGroupingKeys []string + + /* SpecPlacementPlacementType. + + placementType is the type of placement. + + Default: "ClusterSelector" + */ + SpecPlacementPlacementType *string + + // SpecUsercacert. + SpecUsercacert *string + + // SpecUsercert. + SpecUsercert *string + + // SpecUserhost. + SpecUserhost *string + + // SpecUserkey. + SpecUserkey *string + + // SpecUserpassword. + SpecUserpassword *string + + // SpecUserselfsigned. + SpecUserselfsigned *bool + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the bootstrap download relay network params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BootstrapDownloadRelayNetworkParams) WithDefaults() *BootstrapDownloadRelayNetworkParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the bootstrap download relay network params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BootstrapDownloadRelayNetworkParams) SetDefaults() { + var ( + aPIVersionDefault = string("infra.k8smgmt.io/v3") + + kindDefault = string("RelayNetwork") + + specPlacementDriftActionDefault = string("DriftReconcillationActionNotSet") + + specPlacementPlacementTypeDefault = string("ClusterSelector") + ) + + val := BootstrapDownloadRelayNetworkParams{ + APIVersion: &aPIVersionDefault, + Kind: &kindDefault, + SpecPlacementDriftAction: &specPlacementDriftActionDefault, + SpecPlacementPlacementType: &specPlacementPlacementTypeDefault, + } + + val.timeout = o.timeout + val.Context = o.Context + val.HTTPClient = o.HTTPClient + *o = val +} + +// WithTimeout adds the timeout to the bootstrap download relay network params +func (o *BootstrapDownloadRelayNetworkParams) WithTimeout(timeout time.Duration) *BootstrapDownloadRelayNetworkParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the bootstrap download relay network params +func (o *BootstrapDownloadRelayNetworkParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the bootstrap download relay network params +func (o *BootstrapDownloadRelayNetworkParams) WithContext(ctx context.Context) *BootstrapDownloadRelayNetworkParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the bootstrap download relay network params +func (o *BootstrapDownloadRelayNetworkParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the bootstrap download relay network params +func (o *BootstrapDownloadRelayNetworkParams) WithHTTPClient(client *http.Client) *BootstrapDownloadRelayNetworkParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the bootstrap download relay network params +func (o *BootstrapDownloadRelayNetworkParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAPIVersion adds the aPIVersion to the bootstrap download relay network params +func (o *BootstrapDownloadRelayNetworkParams) WithAPIVersion(aPIVersion *string) *BootstrapDownloadRelayNetworkParams { + o.SetAPIVersion(aPIVersion) + return o +} + +// SetAPIVersion adds the apiVersion to the bootstrap download relay network params +func (o *BootstrapDownloadRelayNetworkParams) SetAPIVersion(aPIVersion *string) { + o.APIVersion = aPIVersion +} + +// WithKind adds the kind to the bootstrap download relay network params +func (o *BootstrapDownloadRelayNetworkParams) WithKind(kind *string) *BootstrapDownloadRelayNetworkParams { + o.SetKind(kind) + return o +} + +// SetKind adds the kind to the bootstrap download relay network params +func (o *BootstrapDownloadRelayNetworkParams) SetKind(kind *string) { + o.Kind = kind +} + +// WithMetadataDescription adds the metadataDescription to the bootstrap download relay network params +func (o *BootstrapDownloadRelayNetworkParams) WithMetadataDescription(metadataDescription *string) *BootstrapDownloadRelayNetworkParams { + o.SetMetadataDescription(metadataDescription) + return o +} + +// SetMetadataDescription adds the metadataDescription to the bootstrap download relay network params +func (o *BootstrapDownloadRelayNetworkParams) SetMetadataDescription(metadataDescription *string) { + o.MetadataDescription = metadataDescription +} + +// WithMetadataID adds the metadataID to the bootstrap download relay network params +func (o *BootstrapDownloadRelayNetworkParams) WithMetadataID(metadataID *string) *BootstrapDownloadRelayNetworkParams { + o.SetMetadataID(metadataID) + return o +} + +// SetMetadataID adds the metadataId to the bootstrap download relay network params +func (o *BootstrapDownloadRelayNetworkParams) SetMetadataID(metadataID *string) { + o.MetadataID = metadataID +} + +// WithMetadataModifiedAt adds the metadataModifiedAt to the bootstrap download relay network params +func (o *BootstrapDownloadRelayNetworkParams) WithMetadataModifiedAt(metadataModifiedAt *strfmt.DateTime) *BootstrapDownloadRelayNetworkParams { + o.SetMetadataModifiedAt(metadataModifiedAt) + return o +} + +// SetMetadataModifiedAt adds the metadataModifiedAt to the bootstrap download relay network params +func (o *BootstrapDownloadRelayNetworkParams) SetMetadataModifiedAt(metadataModifiedAt *strfmt.DateTime) { + o.MetadataModifiedAt = metadataModifiedAt +} + +// WithMetadataName adds the metadataName to the bootstrap download relay network params +func (o *BootstrapDownloadRelayNetworkParams) WithMetadataName(metadataName string) *BootstrapDownloadRelayNetworkParams { + o.SetMetadataName(metadataName) + return o +} + +// SetMetadataName adds the metadataName to the bootstrap download relay network params +func (o *BootstrapDownloadRelayNetworkParams) SetMetadataName(metadataName string) { + o.MetadataName = metadataName +} + +// WithMetadataOrganization adds the metadataOrganization to the bootstrap download relay network params +func (o *BootstrapDownloadRelayNetworkParams) WithMetadataOrganization(metadataOrganization *string) *BootstrapDownloadRelayNetworkParams { + o.SetMetadataOrganization(metadataOrganization) + return o +} + +// SetMetadataOrganization adds the metadataOrganization to the bootstrap download relay network params +func (o *BootstrapDownloadRelayNetworkParams) SetMetadataOrganization(metadataOrganization *string) { + o.MetadataOrganization = metadataOrganization +} + +// WithMetadataPartner adds the metadataPartner to the bootstrap download relay network params +func (o *BootstrapDownloadRelayNetworkParams) WithMetadataPartner(metadataPartner *string) *BootstrapDownloadRelayNetworkParams { + o.SetMetadataPartner(metadataPartner) + return o +} + +// SetMetadataPartner adds the metadataPartner to the bootstrap download relay network params +func (o *BootstrapDownloadRelayNetworkParams) SetMetadataPartner(metadataPartner *string) { + o.MetadataPartner = metadataPartner +} + +// WithMetadataProject adds the metadataProject to the bootstrap download relay network params +func (o *BootstrapDownloadRelayNetworkParams) WithMetadataProject(metadataProject *string) *BootstrapDownloadRelayNetworkParams { + o.SetMetadataProject(metadataProject) + return o +} + +// SetMetadataProject adds the metadataProject to the bootstrap download relay network params +func (o *BootstrapDownloadRelayNetworkParams) SetMetadataProject(metadataProject *string) { + o.MetadataProject = metadataProject +} + +// WithSpecClustercacert adds the specClustercacert to the bootstrap download relay network params +func (o *BootstrapDownloadRelayNetworkParams) WithSpecClustercacert(specClustercacert *string) *BootstrapDownloadRelayNetworkParams { + o.SetSpecClustercacert(specClustercacert) + return o +} + +// SetSpecClustercacert adds the specClustercacert to the bootstrap download relay network params +func (o *BootstrapDownloadRelayNetworkParams) SetSpecClustercacert(specClustercacert *string) { + o.SpecClustercacert = specClustercacert +} + +// WithSpecClustercert adds the specClustercert to the bootstrap download relay network params +func (o *BootstrapDownloadRelayNetworkParams) WithSpecClustercert(specClustercert *string) *BootstrapDownloadRelayNetworkParams { + o.SetSpecClustercert(specClustercert) + return o +} + +// SetSpecClustercert adds the specClustercert to the bootstrap download relay network params +func (o *BootstrapDownloadRelayNetworkParams) SetSpecClustercert(specClustercert *string) { + o.SpecClustercert = specClustercert +} + +// WithSpecClusterhost adds the specClusterhost to the bootstrap download relay network params +func (o *BootstrapDownloadRelayNetworkParams) WithSpecClusterhost(specClusterhost *string) *BootstrapDownloadRelayNetworkParams { + o.SetSpecClusterhost(specClusterhost) + return o +} + +// SetSpecClusterhost adds the specClusterhost to the bootstrap download relay network params +func (o *BootstrapDownloadRelayNetworkParams) SetSpecClusterhost(specClusterhost *string) { + o.SpecClusterhost = specClusterhost +} + +// WithSpecClusterkey adds the specClusterkey to the bootstrap download relay network params +func (o *BootstrapDownloadRelayNetworkParams) WithSpecClusterkey(specClusterkey *string) *BootstrapDownloadRelayNetworkParams { + o.SetSpecClusterkey(specClusterkey) + return o +} + +// SetSpecClusterkey adds the specClusterkey to the bootstrap download relay network params +func (o *BootstrapDownloadRelayNetworkParams) SetSpecClusterkey(specClusterkey *string) { + o.SpecClusterkey = specClusterkey +} + +// WithSpecClusterpassword adds the specClusterpassword to the bootstrap download relay network params +func (o *BootstrapDownloadRelayNetworkParams) WithSpecClusterpassword(specClusterpassword *string) *BootstrapDownloadRelayNetworkParams { + o.SetSpecClusterpassword(specClusterpassword) + return o +} + +// SetSpecClusterpassword adds the specClusterpassword to the bootstrap download relay network params +func (o *BootstrapDownloadRelayNetworkParams) SetSpecClusterpassword(specClusterpassword *string) { + o.SpecClusterpassword = specClusterpassword +} + +// WithSpecClusterselfsigned adds the specClusterselfsigned to the bootstrap download relay network params +func (o *BootstrapDownloadRelayNetworkParams) WithSpecClusterselfsigned(specClusterselfsigned *bool) *BootstrapDownloadRelayNetworkParams { + o.SetSpecClusterselfsigned(specClusterselfsigned) + return o +} + +// SetSpecClusterselfsigned adds the specClusterselfsigned to the bootstrap download relay network params +func (o *BootstrapDownloadRelayNetworkParams) SetSpecClusterselfsigned(specClusterselfsigned *bool) { + o.SpecClusterselfsigned = specClusterselfsigned +} + +// WithSpecPlacementClusterSelector adds the specPlacementClusterSelector to the bootstrap download relay network params +func (o *BootstrapDownloadRelayNetworkParams) WithSpecPlacementClusterSelector(specPlacementClusterSelector *string) *BootstrapDownloadRelayNetworkParams { + o.SetSpecPlacementClusterSelector(specPlacementClusterSelector) + return o +} + +// SetSpecPlacementClusterSelector adds the specPlacementClusterSelector to the bootstrap download relay network params +func (o *BootstrapDownloadRelayNetworkParams) SetSpecPlacementClusterSelector(specPlacementClusterSelector *string) { + o.SpecPlacementClusterSelector = specPlacementClusterSelector +} + +// WithSpecPlacementDriftAction adds the specPlacementDriftAction to the bootstrap download relay network params +func (o *BootstrapDownloadRelayNetworkParams) WithSpecPlacementDriftAction(specPlacementDriftAction *string) *BootstrapDownloadRelayNetworkParams { + o.SetSpecPlacementDriftAction(specPlacementDriftAction) + return o +} + +// SetSpecPlacementDriftAction adds the specPlacementDriftAction to the bootstrap download relay network params +func (o *BootstrapDownloadRelayNetworkParams) SetSpecPlacementDriftAction(specPlacementDriftAction *string) { + o.SpecPlacementDriftAction = specPlacementDriftAction +} + +// WithSpecPlacementNodeGroupingKeys adds the specPlacementNodeGroupingKeys to the bootstrap download relay network params +func (o *BootstrapDownloadRelayNetworkParams) WithSpecPlacementNodeGroupingKeys(specPlacementNodeGroupingKeys []string) *BootstrapDownloadRelayNetworkParams { + o.SetSpecPlacementNodeGroupingKeys(specPlacementNodeGroupingKeys) + return o +} + +// SetSpecPlacementNodeGroupingKeys adds the specPlacementNodeGroupingKeys to the bootstrap download relay network params +func (o *BootstrapDownloadRelayNetworkParams) SetSpecPlacementNodeGroupingKeys(specPlacementNodeGroupingKeys []string) { + o.SpecPlacementNodeGroupingKeys = specPlacementNodeGroupingKeys +} + +// WithSpecPlacementPlacementType adds the specPlacementPlacementType to the bootstrap download relay network params +func (o *BootstrapDownloadRelayNetworkParams) WithSpecPlacementPlacementType(specPlacementPlacementType *string) *BootstrapDownloadRelayNetworkParams { + o.SetSpecPlacementPlacementType(specPlacementPlacementType) + return o +} + +// SetSpecPlacementPlacementType adds the specPlacementPlacementType to the bootstrap download relay network params +func (o *BootstrapDownloadRelayNetworkParams) SetSpecPlacementPlacementType(specPlacementPlacementType *string) { + o.SpecPlacementPlacementType = specPlacementPlacementType +} + +// WithSpecUsercacert adds the specUsercacert to the bootstrap download relay network params +func (o *BootstrapDownloadRelayNetworkParams) WithSpecUsercacert(specUsercacert *string) *BootstrapDownloadRelayNetworkParams { + o.SetSpecUsercacert(specUsercacert) + return o +} + +// SetSpecUsercacert adds the specUsercacert to the bootstrap download relay network params +func (o *BootstrapDownloadRelayNetworkParams) SetSpecUsercacert(specUsercacert *string) { + o.SpecUsercacert = specUsercacert +} + +// WithSpecUsercert adds the specUsercert to the bootstrap download relay network params +func (o *BootstrapDownloadRelayNetworkParams) WithSpecUsercert(specUsercert *string) *BootstrapDownloadRelayNetworkParams { + o.SetSpecUsercert(specUsercert) + return o +} + +// SetSpecUsercert adds the specUsercert to the bootstrap download relay network params +func (o *BootstrapDownloadRelayNetworkParams) SetSpecUsercert(specUsercert *string) { + o.SpecUsercert = specUsercert +} + +// WithSpecUserhost adds the specUserhost to the bootstrap download relay network params +func (o *BootstrapDownloadRelayNetworkParams) WithSpecUserhost(specUserhost *string) *BootstrapDownloadRelayNetworkParams { + o.SetSpecUserhost(specUserhost) + return o +} + +// SetSpecUserhost adds the specUserhost to the bootstrap download relay network params +func (o *BootstrapDownloadRelayNetworkParams) SetSpecUserhost(specUserhost *string) { + o.SpecUserhost = specUserhost +} + +// WithSpecUserkey adds the specUserkey to the bootstrap download relay network params +func (o *BootstrapDownloadRelayNetworkParams) WithSpecUserkey(specUserkey *string) *BootstrapDownloadRelayNetworkParams { + o.SetSpecUserkey(specUserkey) + return o +} + +// SetSpecUserkey adds the specUserkey to the bootstrap download relay network params +func (o *BootstrapDownloadRelayNetworkParams) SetSpecUserkey(specUserkey *string) { + o.SpecUserkey = specUserkey +} + +// WithSpecUserpassword adds the specUserpassword to the bootstrap download relay network params +func (o *BootstrapDownloadRelayNetworkParams) WithSpecUserpassword(specUserpassword *string) *BootstrapDownloadRelayNetworkParams { + o.SetSpecUserpassword(specUserpassword) + return o +} + +// SetSpecUserpassword adds the specUserpassword to the bootstrap download relay network params +func (o *BootstrapDownloadRelayNetworkParams) SetSpecUserpassword(specUserpassword *string) { + o.SpecUserpassword = specUserpassword +} + +// WithSpecUserselfsigned adds the specUserselfsigned to the bootstrap download relay network params +func (o *BootstrapDownloadRelayNetworkParams) WithSpecUserselfsigned(specUserselfsigned *bool) *BootstrapDownloadRelayNetworkParams { + o.SetSpecUserselfsigned(specUserselfsigned) + return o +} + +// SetSpecUserselfsigned adds the specUserselfsigned to the bootstrap download relay network params +func (o *BootstrapDownloadRelayNetworkParams) SetSpecUserselfsigned(specUserselfsigned *bool) { + o.SpecUserselfsigned = specUserselfsigned +} + +// WriteToRequest writes these params to a swagger request +func (o *BootstrapDownloadRelayNetworkParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.APIVersion != nil { + + // query param apiVersion + var qrAPIVersion string + + if o.APIVersion != nil { + qrAPIVersion = *o.APIVersion + } + qAPIVersion := qrAPIVersion + if qAPIVersion != "" { + + if err := r.SetQueryParam("apiVersion", qAPIVersion); err != nil { + return err + } + } + } + + if o.Kind != nil { + + // query param kind + var qrKind string + + if o.Kind != nil { + qrKind = *o.Kind + } + qKind := qrKind + if qKind != "" { + + if err := r.SetQueryParam("kind", qKind); err != nil { + return err + } + } + } + + if o.MetadataDescription != nil { + + // query param metadata.description + var qrMetadataDescription string + + if o.MetadataDescription != nil { + qrMetadataDescription = *o.MetadataDescription + } + qMetadataDescription := qrMetadataDescription + if qMetadataDescription != "" { + + if err := r.SetQueryParam("metadata.description", qMetadataDescription); err != nil { + return err + } + } + } + + if o.MetadataID != nil { + + // query param metadata.id + var qrMetadataID string + + if o.MetadataID != nil { + qrMetadataID = *o.MetadataID + } + qMetadataID := qrMetadataID + if qMetadataID != "" { + + if err := r.SetQueryParam("metadata.id", qMetadataID); err != nil { + return err + } + } + } + + if o.MetadataModifiedAt != nil { + + // query param metadata.modifiedAt + var qrMetadataModifiedAt strfmt.DateTime + + if o.MetadataModifiedAt != nil { + qrMetadataModifiedAt = *o.MetadataModifiedAt + } + qMetadataModifiedAt := qrMetadataModifiedAt.String() + if qMetadataModifiedAt != "" { + + if err := r.SetQueryParam("metadata.modifiedAt", qMetadataModifiedAt); err != nil { + return err + } + } + } + + // path param metadata.name + if err := r.SetPathParam("metadata.name", o.MetadataName); err != nil { + return err + } + + if o.MetadataOrganization != nil { + + // query param metadata.organization + var qrMetadataOrganization string + + if o.MetadataOrganization != nil { + qrMetadataOrganization = *o.MetadataOrganization + } + qMetadataOrganization := qrMetadataOrganization + if qMetadataOrganization != "" { + + if err := r.SetQueryParam("metadata.organization", qMetadataOrganization); err != nil { + return err + } + } + } + + if o.MetadataPartner != nil { + + // query param metadata.partner + var qrMetadataPartner string + + if o.MetadataPartner != nil { + qrMetadataPartner = *o.MetadataPartner + } + qMetadataPartner := qrMetadataPartner + if qMetadataPartner != "" { + + if err := r.SetQueryParam("metadata.partner", qMetadataPartner); err != nil { + return err + } + } + } + + if o.MetadataProject != nil { + + // query param metadata.project + var qrMetadataProject string + + if o.MetadataProject != nil { + qrMetadataProject = *o.MetadataProject + } + qMetadataProject := qrMetadataProject + if qMetadataProject != "" { + + if err := r.SetQueryParam("metadata.project", qMetadataProject); err != nil { + return err + } + } + } + + if o.SpecClustercacert != nil { + + // query param spec.clustercacert + var qrSpecClustercacert string + + if o.SpecClustercacert != nil { + qrSpecClustercacert = *o.SpecClustercacert + } + qSpecClustercacert := qrSpecClustercacert + if qSpecClustercacert != "" { + + if err := r.SetQueryParam("spec.clustercacert", qSpecClustercacert); err != nil { + return err + } + } + } + + if o.SpecClustercert != nil { + + // query param spec.clustercert + var qrSpecClustercert string + + if o.SpecClustercert != nil { + qrSpecClustercert = *o.SpecClustercert + } + qSpecClustercert := qrSpecClustercert + if qSpecClustercert != "" { + + if err := r.SetQueryParam("spec.clustercert", qSpecClustercert); err != nil { + return err + } + } + } + + if o.SpecClusterhost != nil { + + // query param spec.clusterhost + var qrSpecClusterhost string + + if o.SpecClusterhost != nil { + qrSpecClusterhost = *o.SpecClusterhost + } + qSpecClusterhost := qrSpecClusterhost + if qSpecClusterhost != "" { + + if err := r.SetQueryParam("spec.clusterhost", qSpecClusterhost); err != nil { + return err + } + } + } + + if o.SpecClusterkey != nil { + + // query param spec.clusterkey + var qrSpecClusterkey string + + if o.SpecClusterkey != nil { + qrSpecClusterkey = *o.SpecClusterkey + } + qSpecClusterkey := qrSpecClusterkey + if qSpecClusterkey != "" { + + if err := r.SetQueryParam("spec.clusterkey", qSpecClusterkey); err != nil { + return err + } + } + } + + if o.SpecClusterpassword != nil { + + // query param spec.clusterpassword + var qrSpecClusterpassword string + + if o.SpecClusterpassword != nil { + qrSpecClusterpassword = *o.SpecClusterpassword + } + qSpecClusterpassword := qrSpecClusterpassword + if qSpecClusterpassword != "" { + + if err := r.SetQueryParam("spec.clusterpassword", qSpecClusterpassword); err != nil { + return err + } + } + } + + if o.SpecClusterselfsigned != nil { + + // query param spec.clusterselfsigned + var qrSpecClusterselfsigned bool + + if o.SpecClusterselfsigned != nil { + qrSpecClusterselfsigned = *o.SpecClusterselfsigned + } + qSpecClusterselfsigned := swag.FormatBool(qrSpecClusterselfsigned) + if qSpecClusterselfsigned != "" { + + if err := r.SetQueryParam("spec.clusterselfsigned", qSpecClusterselfsigned); err != nil { + return err + } + } + } + + if o.SpecPlacementClusterSelector != nil { + + // query param spec.placement.clusterSelector + var qrSpecPlacementClusterSelector string + + if o.SpecPlacementClusterSelector != nil { + qrSpecPlacementClusterSelector = *o.SpecPlacementClusterSelector + } + qSpecPlacementClusterSelector := qrSpecPlacementClusterSelector + if qSpecPlacementClusterSelector != "" { + + if err := r.SetQueryParam("spec.placement.clusterSelector", qSpecPlacementClusterSelector); err != nil { + return err + } + } + } + + if o.SpecPlacementDriftAction != nil { + + // query param spec.placement.driftAction + var qrSpecPlacementDriftAction string + + if o.SpecPlacementDriftAction != nil { + qrSpecPlacementDriftAction = *o.SpecPlacementDriftAction + } + qSpecPlacementDriftAction := qrSpecPlacementDriftAction + if qSpecPlacementDriftAction != "" { + + if err := r.SetQueryParam("spec.placement.driftAction", qSpecPlacementDriftAction); err != nil { + return err + } + } + } + + if o.SpecPlacementNodeGroupingKeys != nil { + + // binding items for spec.placement.nodeGroupingKeys + joinedSpecPlacementNodeGroupingKeys := o.bindParamSpecPlacementNodeGroupingKeys(reg) + + // query array param spec.placement.nodeGroupingKeys + if err := r.SetQueryParam("spec.placement.nodeGroupingKeys", joinedSpecPlacementNodeGroupingKeys...); err != nil { + return err + } + } + + if o.SpecPlacementPlacementType != nil { + + // query param spec.placement.placementType + var qrSpecPlacementPlacementType string + + if o.SpecPlacementPlacementType != nil { + qrSpecPlacementPlacementType = *o.SpecPlacementPlacementType + } + qSpecPlacementPlacementType := qrSpecPlacementPlacementType + if qSpecPlacementPlacementType != "" { + + if err := r.SetQueryParam("spec.placement.placementType", qSpecPlacementPlacementType); err != nil { + return err + } + } + } + + if o.SpecUsercacert != nil { + + // query param spec.usercacert + var qrSpecUsercacert string + + if o.SpecUsercacert != nil { + qrSpecUsercacert = *o.SpecUsercacert + } + qSpecUsercacert := qrSpecUsercacert + if qSpecUsercacert != "" { + + if err := r.SetQueryParam("spec.usercacert", qSpecUsercacert); err != nil { + return err + } + } + } + + if o.SpecUsercert != nil { + + // query param spec.usercert + var qrSpecUsercert string + + if o.SpecUsercert != nil { + qrSpecUsercert = *o.SpecUsercert + } + qSpecUsercert := qrSpecUsercert + if qSpecUsercert != "" { + + if err := r.SetQueryParam("spec.usercert", qSpecUsercert); err != nil { + return err + } + } + } + + if o.SpecUserhost != nil { + + // query param spec.userhost + var qrSpecUserhost string + + if o.SpecUserhost != nil { + qrSpecUserhost = *o.SpecUserhost + } + qSpecUserhost := qrSpecUserhost + if qSpecUserhost != "" { + + if err := r.SetQueryParam("spec.userhost", qSpecUserhost); err != nil { + return err + } + } + } + + if o.SpecUserkey != nil { + + // query param spec.userkey + var qrSpecUserkey string + + if o.SpecUserkey != nil { + qrSpecUserkey = *o.SpecUserkey + } + qSpecUserkey := qrSpecUserkey + if qSpecUserkey != "" { + + if err := r.SetQueryParam("spec.userkey", qSpecUserkey); err != nil { + return err + } + } + } + + if o.SpecUserpassword != nil { + + // query param spec.userpassword + var qrSpecUserpassword string + + if o.SpecUserpassword != nil { + qrSpecUserpassword = *o.SpecUserpassword + } + qSpecUserpassword := qrSpecUserpassword + if qSpecUserpassword != "" { + + if err := r.SetQueryParam("spec.userpassword", qSpecUserpassword); err != nil { + return err + } + } + } + + if o.SpecUserselfsigned != nil { + + // query param spec.userselfsigned + var qrSpecUserselfsigned bool + + if o.SpecUserselfsigned != nil { + qrSpecUserselfsigned = *o.SpecUserselfsigned + } + qSpecUserselfsigned := swag.FormatBool(qrSpecUserselfsigned) + if qSpecUserselfsigned != "" { + + if err := r.SetQueryParam("spec.userselfsigned", qSpecUserselfsigned); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// bindParamBootstrapDownloadRelayNetwork binds the parameter spec.placement.nodeGroupingKeys +func (o *BootstrapDownloadRelayNetworkParams) bindParamSpecPlacementNodeGroupingKeys(formats strfmt.Registry) []string { + specPlacementNodeGroupingKeysIR := o.SpecPlacementNodeGroupingKeys + + var specPlacementNodeGroupingKeysIC []string + for _, specPlacementNodeGroupingKeysIIR := range specPlacementNodeGroupingKeysIR { // explode []string + + specPlacementNodeGroupingKeysIIV := specPlacementNodeGroupingKeysIIR // string as string + specPlacementNodeGroupingKeysIC = append(specPlacementNodeGroupingKeysIC, specPlacementNodeGroupingKeysIIV) + } + + // items.CollectionFormat: "multi" + specPlacementNodeGroupingKeysIS := swag.JoinByFormat(specPlacementNodeGroupingKeysIC, "multi") + + return specPlacementNodeGroupingKeysIS +} diff --git a/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_download_relay_network_responses.go b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_download_relay_network_responses.go new file mode 100644 index 0000000..cfc9470 --- /dev/null +++ b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_download_relay_network_responses.go @@ -0,0 +1,223 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package bootstrap + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/RafaySystems/rcloud-base/components/common/api/def/clients/sentry/models" +) + +// BootstrapDownloadRelayNetworkReader is a Reader for the BootstrapDownloadRelayNetwork structure. +type BootstrapDownloadRelayNetworkReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *BootstrapDownloadRelayNetworkReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewBootstrapDownloadRelayNetworkOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 403: + result := NewBootstrapDownloadRelayNetworkForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewBootstrapDownloadRelayNetworkNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewBootstrapDownloadRelayNetworkInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + result := NewBootstrapDownloadRelayNetworkDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewBootstrapDownloadRelayNetworkOK creates a BootstrapDownloadRelayNetworkOK with default headers values +func NewBootstrapDownloadRelayNetworkOK() *BootstrapDownloadRelayNetworkOK { + return &BootstrapDownloadRelayNetworkOK{} +} + +/* BootstrapDownloadRelayNetworkOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type BootstrapDownloadRelayNetworkOK struct { + Payload *models.V3HTTPBody +} + +func (o *BootstrapDownloadRelayNetworkOK) Error() string { + return fmt.Sprintf("[GET /v2/sentry/relaynetwork/{metadata.name}/download][%d] bootstrapDownloadRelayNetworkOK %+v", 200, o.Payload) +} +func (o *BootstrapDownloadRelayNetworkOK) GetPayload() *models.V3HTTPBody { + return o.Payload +} + +func (o *BootstrapDownloadRelayNetworkOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V3HTTPBody) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBootstrapDownloadRelayNetworkForbidden creates a BootstrapDownloadRelayNetworkForbidden with default headers values +func NewBootstrapDownloadRelayNetworkForbidden() *BootstrapDownloadRelayNetworkForbidden { + return &BootstrapDownloadRelayNetworkForbidden{} +} + +/* BootstrapDownloadRelayNetworkForbidden describes a response with status code 403, with default header values. + +Returned when the user does not have permission to access the resource. +*/ +type BootstrapDownloadRelayNetworkForbidden struct { + Payload interface{} +} + +func (o *BootstrapDownloadRelayNetworkForbidden) Error() string { + return fmt.Sprintf("[GET /v2/sentry/relaynetwork/{metadata.name}/download][%d] bootstrapDownloadRelayNetworkForbidden %+v", 403, o.Payload) +} +func (o *BootstrapDownloadRelayNetworkForbidden) GetPayload() interface{} { + return o.Payload +} + +func (o *BootstrapDownloadRelayNetworkForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBootstrapDownloadRelayNetworkNotFound creates a BootstrapDownloadRelayNetworkNotFound with default headers values +func NewBootstrapDownloadRelayNetworkNotFound() *BootstrapDownloadRelayNetworkNotFound { + return &BootstrapDownloadRelayNetworkNotFound{} +} + +/* BootstrapDownloadRelayNetworkNotFound describes a response with status code 404, with default header values. + +Returned when the resource does not exist. +*/ +type BootstrapDownloadRelayNetworkNotFound struct { + Payload interface{} +} + +func (o *BootstrapDownloadRelayNetworkNotFound) Error() string { + return fmt.Sprintf("[GET /v2/sentry/relaynetwork/{metadata.name}/download][%d] bootstrapDownloadRelayNetworkNotFound %+v", 404, o.Payload) +} +func (o *BootstrapDownloadRelayNetworkNotFound) GetPayload() interface{} { + return o.Payload +} + +func (o *BootstrapDownloadRelayNetworkNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBootstrapDownloadRelayNetworkInternalServerError creates a BootstrapDownloadRelayNetworkInternalServerError with default headers values +func NewBootstrapDownloadRelayNetworkInternalServerError() *BootstrapDownloadRelayNetworkInternalServerError { + return &BootstrapDownloadRelayNetworkInternalServerError{} +} + +/* BootstrapDownloadRelayNetworkInternalServerError describes a response with status code 500, with default header values. + +Returned for internal server error +*/ +type BootstrapDownloadRelayNetworkInternalServerError struct { + Payload interface{} +} + +func (o *BootstrapDownloadRelayNetworkInternalServerError) Error() string { + return fmt.Sprintf("[GET /v2/sentry/relaynetwork/{metadata.name}/download][%d] bootstrapDownloadRelayNetworkInternalServerError %+v", 500, o.Payload) +} +func (o *BootstrapDownloadRelayNetworkInternalServerError) GetPayload() interface{} { + return o.Payload +} + +func (o *BootstrapDownloadRelayNetworkInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBootstrapDownloadRelayNetworkDefault creates a BootstrapDownloadRelayNetworkDefault with default headers values +func NewBootstrapDownloadRelayNetworkDefault(code int) *BootstrapDownloadRelayNetworkDefault { + return &BootstrapDownloadRelayNetworkDefault{ + _statusCode: code, + } +} + +/* BootstrapDownloadRelayNetworkDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type BootstrapDownloadRelayNetworkDefault struct { + _statusCode int + + Payload *models.GooglerpcStatus +} + +// Code gets the status code for the bootstrap download relay network default response +func (o *BootstrapDownloadRelayNetworkDefault) Code() int { + return o._statusCode +} + +func (o *BootstrapDownloadRelayNetworkDefault) Error() string { + return fmt.Sprintf("[GET /v2/sentry/relaynetwork/{metadata.name}/download][%d] Bootstrap_DownloadRelayNetwork default %+v", o._statusCode, o.Payload) +} +func (o *BootstrapDownloadRelayNetworkDefault) GetPayload() *models.GooglerpcStatus { + return o.Payload +} + +func (o *BootstrapDownloadRelayNetworkDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.GooglerpcStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_get_bootstrap_agent_config_parameters.go b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_get_bootstrap_agent_config_parameters.go new file mode 100644 index 0000000..4297f7a --- /dev/null +++ b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_get_bootstrap_agent_config_parameters.go @@ -0,0 +1,652 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package bootstrap + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewBootstrapGetBootstrapAgentConfigParams creates a new BootstrapGetBootstrapAgentConfigParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewBootstrapGetBootstrapAgentConfigParams() *BootstrapGetBootstrapAgentConfigParams { + return &BootstrapGetBootstrapAgentConfigParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewBootstrapGetBootstrapAgentConfigParamsWithTimeout creates a new BootstrapGetBootstrapAgentConfigParams object +// with the ability to set a timeout on a request. +func NewBootstrapGetBootstrapAgentConfigParamsWithTimeout(timeout time.Duration) *BootstrapGetBootstrapAgentConfigParams { + return &BootstrapGetBootstrapAgentConfigParams{ + timeout: timeout, + } +} + +// NewBootstrapGetBootstrapAgentConfigParamsWithContext creates a new BootstrapGetBootstrapAgentConfigParams object +// with the ability to set a context for a request. +func NewBootstrapGetBootstrapAgentConfigParamsWithContext(ctx context.Context) *BootstrapGetBootstrapAgentConfigParams { + return &BootstrapGetBootstrapAgentConfigParams{ + Context: ctx, + } +} + +// NewBootstrapGetBootstrapAgentConfigParamsWithHTTPClient creates a new BootstrapGetBootstrapAgentConfigParams object +// with the ability to set a custom HTTPClient for a request. +func NewBootstrapGetBootstrapAgentConfigParamsWithHTTPClient(client *http.Client) *BootstrapGetBootstrapAgentConfigParams { + return &BootstrapGetBootstrapAgentConfigParams{ + HTTPClient: client, + } +} + +/* BootstrapGetBootstrapAgentConfigParams contains all the parameters to send to the API endpoint + for the bootstrap get bootstrap agent config operation. + + Typically these are written to a http.Request. +*/ +type BootstrapGetBootstrapAgentConfigParams struct { + + /* APIVersion. + + API Version. API Version of the resource + + Default: "infra.k8smgmt.io/v3" + */ + APIVersion *string + + /* Kind. + + Kind. Kind of the resource + + Default: "BootstrapAgent" + */ + Kind *string + + /* MetadataDescription. + + Description. description of the resource + */ + MetadataDescription *string + + // MetadataID. + MetadataID *string + + // MetadataModifiedAt. + // + // Format: date-time + MetadataModifiedAt *strfmt.DateTime + + /* MetadataName. + + name of the resource + */ + MetadataName string + + /* MetadataOrganization. + + Organization. Organization to which the resource belongs + */ + MetadataOrganization *string + + /* MetadataPartner. + + Partner. Partner to which the resource belongs + */ + MetadataPartner *string + + /* MetadataProject. + + Project. Project of the resource + */ + MetadataProject *string + + // SpecAgentMode. + // + // Default: "InCluster" + SpecAgentMode *string + + // SpecTemplateRef. + SpecTemplateRef string + + // SpecToken. + SpecToken *string + + // StatusFingerprint. + StatusFingerprint *string + + // StatusIPAddress. + StatusIPAddress *string + + // StatusLastCheckedIn. + // + // Format: date-time + StatusLastCheckedIn *strfmt.DateTime + + // StatusTokenState. + // + // Default: "NotSet" + StatusTokenState *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the bootstrap get bootstrap agent config params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BootstrapGetBootstrapAgentConfigParams) WithDefaults() *BootstrapGetBootstrapAgentConfigParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the bootstrap get bootstrap agent config params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BootstrapGetBootstrapAgentConfigParams) SetDefaults() { + var ( + aPIVersionDefault = string("infra.k8smgmt.io/v3") + + kindDefault = string("BootstrapAgent") + + specAgentModeDefault = string("InCluster") + + statusTokenStateDefault = string("NotSet") + ) + + val := BootstrapGetBootstrapAgentConfigParams{ + APIVersion: &aPIVersionDefault, + Kind: &kindDefault, + SpecAgentMode: &specAgentModeDefault, + StatusTokenState: &statusTokenStateDefault, + } + + val.timeout = o.timeout + val.Context = o.Context + val.HTTPClient = o.HTTPClient + *o = val +} + +// WithTimeout adds the timeout to the bootstrap get bootstrap agent config params +func (o *BootstrapGetBootstrapAgentConfigParams) WithTimeout(timeout time.Duration) *BootstrapGetBootstrapAgentConfigParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the bootstrap get bootstrap agent config params +func (o *BootstrapGetBootstrapAgentConfigParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the bootstrap get bootstrap agent config params +func (o *BootstrapGetBootstrapAgentConfigParams) WithContext(ctx context.Context) *BootstrapGetBootstrapAgentConfigParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the bootstrap get bootstrap agent config params +func (o *BootstrapGetBootstrapAgentConfigParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the bootstrap get bootstrap agent config params +func (o *BootstrapGetBootstrapAgentConfigParams) WithHTTPClient(client *http.Client) *BootstrapGetBootstrapAgentConfigParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the bootstrap get bootstrap agent config params +func (o *BootstrapGetBootstrapAgentConfigParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAPIVersion adds the aPIVersion to the bootstrap get bootstrap agent config params +func (o *BootstrapGetBootstrapAgentConfigParams) WithAPIVersion(aPIVersion *string) *BootstrapGetBootstrapAgentConfigParams { + o.SetAPIVersion(aPIVersion) + return o +} + +// SetAPIVersion adds the apiVersion to the bootstrap get bootstrap agent config params +func (o *BootstrapGetBootstrapAgentConfigParams) SetAPIVersion(aPIVersion *string) { + o.APIVersion = aPIVersion +} + +// WithKind adds the kind to the bootstrap get bootstrap agent config params +func (o *BootstrapGetBootstrapAgentConfigParams) WithKind(kind *string) *BootstrapGetBootstrapAgentConfigParams { + o.SetKind(kind) + return o +} + +// SetKind adds the kind to the bootstrap get bootstrap agent config params +func (o *BootstrapGetBootstrapAgentConfigParams) SetKind(kind *string) { + o.Kind = kind +} + +// WithMetadataDescription adds the metadataDescription to the bootstrap get bootstrap agent config params +func (o *BootstrapGetBootstrapAgentConfigParams) WithMetadataDescription(metadataDescription *string) *BootstrapGetBootstrapAgentConfigParams { + o.SetMetadataDescription(metadataDescription) + return o +} + +// SetMetadataDescription adds the metadataDescription to the bootstrap get bootstrap agent config params +func (o *BootstrapGetBootstrapAgentConfigParams) SetMetadataDescription(metadataDescription *string) { + o.MetadataDescription = metadataDescription +} + +// WithMetadataID adds the metadataID to the bootstrap get bootstrap agent config params +func (o *BootstrapGetBootstrapAgentConfigParams) WithMetadataID(metadataID *string) *BootstrapGetBootstrapAgentConfigParams { + o.SetMetadataID(metadataID) + return o +} + +// SetMetadataID adds the metadataId to the bootstrap get bootstrap agent config params +func (o *BootstrapGetBootstrapAgentConfigParams) SetMetadataID(metadataID *string) { + o.MetadataID = metadataID +} + +// WithMetadataModifiedAt adds the metadataModifiedAt to the bootstrap get bootstrap agent config params +func (o *BootstrapGetBootstrapAgentConfigParams) WithMetadataModifiedAt(metadataModifiedAt *strfmt.DateTime) *BootstrapGetBootstrapAgentConfigParams { + o.SetMetadataModifiedAt(metadataModifiedAt) + return o +} + +// SetMetadataModifiedAt adds the metadataModifiedAt to the bootstrap get bootstrap agent config params +func (o *BootstrapGetBootstrapAgentConfigParams) SetMetadataModifiedAt(metadataModifiedAt *strfmt.DateTime) { + o.MetadataModifiedAt = metadataModifiedAt +} + +// WithMetadataName adds the metadataName to the bootstrap get bootstrap agent config params +func (o *BootstrapGetBootstrapAgentConfigParams) WithMetadataName(metadataName string) *BootstrapGetBootstrapAgentConfigParams { + o.SetMetadataName(metadataName) + return o +} + +// SetMetadataName adds the metadataName to the bootstrap get bootstrap agent config params +func (o *BootstrapGetBootstrapAgentConfigParams) SetMetadataName(metadataName string) { + o.MetadataName = metadataName +} + +// WithMetadataOrganization adds the metadataOrganization to the bootstrap get bootstrap agent config params +func (o *BootstrapGetBootstrapAgentConfigParams) WithMetadataOrganization(metadataOrganization *string) *BootstrapGetBootstrapAgentConfigParams { + o.SetMetadataOrganization(metadataOrganization) + return o +} + +// SetMetadataOrganization adds the metadataOrganization to the bootstrap get bootstrap agent config params +func (o *BootstrapGetBootstrapAgentConfigParams) SetMetadataOrganization(metadataOrganization *string) { + o.MetadataOrganization = metadataOrganization +} + +// WithMetadataPartner adds the metadataPartner to the bootstrap get bootstrap agent config params +func (o *BootstrapGetBootstrapAgentConfigParams) WithMetadataPartner(metadataPartner *string) *BootstrapGetBootstrapAgentConfigParams { + o.SetMetadataPartner(metadataPartner) + return o +} + +// SetMetadataPartner adds the metadataPartner to the bootstrap get bootstrap agent config params +func (o *BootstrapGetBootstrapAgentConfigParams) SetMetadataPartner(metadataPartner *string) { + o.MetadataPartner = metadataPartner +} + +// WithMetadataProject adds the metadataProject to the bootstrap get bootstrap agent config params +func (o *BootstrapGetBootstrapAgentConfigParams) WithMetadataProject(metadataProject *string) *BootstrapGetBootstrapAgentConfigParams { + o.SetMetadataProject(metadataProject) + return o +} + +// SetMetadataProject adds the metadataProject to the bootstrap get bootstrap agent config params +func (o *BootstrapGetBootstrapAgentConfigParams) SetMetadataProject(metadataProject *string) { + o.MetadataProject = metadataProject +} + +// WithSpecAgentMode adds the specAgentMode to the bootstrap get bootstrap agent config params +func (o *BootstrapGetBootstrapAgentConfigParams) WithSpecAgentMode(specAgentMode *string) *BootstrapGetBootstrapAgentConfigParams { + o.SetSpecAgentMode(specAgentMode) + return o +} + +// SetSpecAgentMode adds the specAgentMode to the bootstrap get bootstrap agent config params +func (o *BootstrapGetBootstrapAgentConfigParams) SetSpecAgentMode(specAgentMode *string) { + o.SpecAgentMode = specAgentMode +} + +// WithSpecTemplateRef adds the specTemplateRef to the bootstrap get bootstrap agent config params +func (o *BootstrapGetBootstrapAgentConfigParams) WithSpecTemplateRef(specTemplateRef string) *BootstrapGetBootstrapAgentConfigParams { + o.SetSpecTemplateRef(specTemplateRef) + return o +} + +// SetSpecTemplateRef adds the specTemplateRef to the bootstrap get bootstrap agent config params +func (o *BootstrapGetBootstrapAgentConfigParams) SetSpecTemplateRef(specTemplateRef string) { + o.SpecTemplateRef = specTemplateRef +} + +// WithSpecToken adds the specToken to the bootstrap get bootstrap agent config params +func (o *BootstrapGetBootstrapAgentConfigParams) WithSpecToken(specToken *string) *BootstrapGetBootstrapAgentConfigParams { + o.SetSpecToken(specToken) + return o +} + +// SetSpecToken adds the specToken to the bootstrap get bootstrap agent config params +func (o *BootstrapGetBootstrapAgentConfigParams) SetSpecToken(specToken *string) { + o.SpecToken = specToken +} + +// WithStatusFingerprint adds the statusFingerprint to the bootstrap get bootstrap agent config params +func (o *BootstrapGetBootstrapAgentConfigParams) WithStatusFingerprint(statusFingerprint *string) *BootstrapGetBootstrapAgentConfigParams { + o.SetStatusFingerprint(statusFingerprint) + return o +} + +// SetStatusFingerprint adds the statusFingerprint to the bootstrap get bootstrap agent config params +func (o *BootstrapGetBootstrapAgentConfigParams) SetStatusFingerprint(statusFingerprint *string) { + o.StatusFingerprint = statusFingerprint +} + +// WithStatusIPAddress adds the statusIPAddress to the bootstrap get bootstrap agent config params +func (o *BootstrapGetBootstrapAgentConfigParams) WithStatusIPAddress(statusIPAddress *string) *BootstrapGetBootstrapAgentConfigParams { + o.SetStatusIPAddress(statusIPAddress) + return o +} + +// SetStatusIPAddress adds the statusIpAddress to the bootstrap get bootstrap agent config params +func (o *BootstrapGetBootstrapAgentConfigParams) SetStatusIPAddress(statusIPAddress *string) { + o.StatusIPAddress = statusIPAddress +} + +// WithStatusLastCheckedIn adds the statusLastCheckedIn to the bootstrap get bootstrap agent config params +func (o *BootstrapGetBootstrapAgentConfigParams) WithStatusLastCheckedIn(statusLastCheckedIn *strfmt.DateTime) *BootstrapGetBootstrapAgentConfigParams { + o.SetStatusLastCheckedIn(statusLastCheckedIn) + return o +} + +// SetStatusLastCheckedIn adds the statusLastCheckedIn to the bootstrap get bootstrap agent config params +func (o *BootstrapGetBootstrapAgentConfigParams) SetStatusLastCheckedIn(statusLastCheckedIn *strfmt.DateTime) { + o.StatusLastCheckedIn = statusLastCheckedIn +} + +// WithStatusTokenState adds the statusTokenState to the bootstrap get bootstrap agent config params +func (o *BootstrapGetBootstrapAgentConfigParams) WithStatusTokenState(statusTokenState *string) *BootstrapGetBootstrapAgentConfigParams { + o.SetStatusTokenState(statusTokenState) + return o +} + +// SetStatusTokenState adds the statusTokenState to the bootstrap get bootstrap agent config params +func (o *BootstrapGetBootstrapAgentConfigParams) SetStatusTokenState(statusTokenState *string) { + o.StatusTokenState = statusTokenState +} + +// WriteToRequest writes these params to a swagger request +func (o *BootstrapGetBootstrapAgentConfigParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.APIVersion != nil { + + // query param apiVersion + var qrAPIVersion string + + if o.APIVersion != nil { + qrAPIVersion = *o.APIVersion + } + qAPIVersion := qrAPIVersion + if qAPIVersion != "" { + + if err := r.SetQueryParam("apiVersion", qAPIVersion); err != nil { + return err + } + } + } + + if o.Kind != nil { + + // query param kind + var qrKind string + + if o.Kind != nil { + qrKind = *o.Kind + } + qKind := qrKind + if qKind != "" { + + if err := r.SetQueryParam("kind", qKind); err != nil { + return err + } + } + } + + if o.MetadataDescription != nil { + + // query param metadata.description + var qrMetadataDescription string + + if o.MetadataDescription != nil { + qrMetadataDescription = *o.MetadataDescription + } + qMetadataDescription := qrMetadataDescription + if qMetadataDescription != "" { + + if err := r.SetQueryParam("metadata.description", qMetadataDescription); err != nil { + return err + } + } + } + + if o.MetadataID != nil { + + // query param metadata.id + var qrMetadataID string + + if o.MetadataID != nil { + qrMetadataID = *o.MetadataID + } + qMetadataID := qrMetadataID + if qMetadataID != "" { + + if err := r.SetQueryParam("metadata.id", qMetadataID); err != nil { + return err + } + } + } + + if o.MetadataModifiedAt != nil { + + // query param metadata.modifiedAt + var qrMetadataModifiedAt strfmt.DateTime + + if o.MetadataModifiedAt != nil { + qrMetadataModifiedAt = *o.MetadataModifiedAt + } + qMetadataModifiedAt := qrMetadataModifiedAt.String() + if qMetadataModifiedAt != "" { + + if err := r.SetQueryParam("metadata.modifiedAt", qMetadataModifiedAt); err != nil { + return err + } + } + } + + // path param metadata.name + if err := r.SetPathParam("metadata.name", o.MetadataName); err != nil { + return err + } + + if o.MetadataOrganization != nil { + + // query param metadata.organization + var qrMetadataOrganization string + + if o.MetadataOrganization != nil { + qrMetadataOrganization = *o.MetadataOrganization + } + qMetadataOrganization := qrMetadataOrganization + if qMetadataOrganization != "" { + + if err := r.SetQueryParam("metadata.organization", qMetadataOrganization); err != nil { + return err + } + } + } + + if o.MetadataPartner != nil { + + // query param metadata.partner + var qrMetadataPartner string + + if o.MetadataPartner != nil { + qrMetadataPartner = *o.MetadataPartner + } + qMetadataPartner := qrMetadataPartner + if qMetadataPartner != "" { + + if err := r.SetQueryParam("metadata.partner", qMetadataPartner); err != nil { + return err + } + } + } + + if o.MetadataProject != nil { + + // query param metadata.project + var qrMetadataProject string + + if o.MetadataProject != nil { + qrMetadataProject = *o.MetadataProject + } + qMetadataProject := qrMetadataProject + if qMetadataProject != "" { + + if err := r.SetQueryParam("metadata.project", qMetadataProject); err != nil { + return err + } + } + } + + if o.SpecAgentMode != nil { + + // query param spec.agentMode + var qrSpecAgentMode string + + if o.SpecAgentMode != nil { + qrSpecAgentMode = *o.SpecAgentMode + } + qSpecAgentMode := qrSpecAgentMode + if qSpecAgentMode != "" { + + if err := r.SetQueryParam("spec.agentMode", qSpecAgentMode); err != nil { + return err + } + } + } + + // path param spec.templateRef + if err := r.SetPathParam("spec.templateRef", o.SpecTemplateRef); err != nil { + return err + } + + if o.SpecToken != nil { + + // query param spec.token + var qrSpecToken string + + if o.SpecToken != nil { + qrSpecToken = *o.SpecToken + } + qSpecToken := qrSpecToken + if qSpecToken != "" { + + if err := r.SetQueryParam("spec.token", qSpecToken); err != nil { + return err + } + } + } + + if o.StatusFingerprint != nil { + + // query param status.fingerprint + var qrStatusFingerprint string + + if o.StatusFingerprint != nil { + qrStatusFingerprint = *o.StatusFingerprint + } + qStatusFingerprint := qrStatusFingerprint + if qStatusFingerprint != "" { + + if err := r.SetQueryParam("status.fingerprint", qStatusFingerprint); err != nil { + return err + } + } + } + + if o.StatusIPAddress != nil { + + // query param status.ipAddress + var qrStatusIPAddress string + + if o.StatusIPAddress != nil { + qrStatusIPAddress = *o.StatusIPAddress + } + qStatusIPAddress := qrStatusIPAddress + if qStatusIPAddress != "" { + + if err := r.SetQueryParam("status.ipAddress", qStatusIPAddress); err != nil { + return err + } + } + } + + if o.StatusLastCheckedIn != nil { + + // query param status.lastCheckedIn + var qrStatusLastCheckedIn strfmt.DateTime + + if o.StatusLastCheckedIn != nil { + qrStatusLastCheckedIn = *o.StatusLastCheckedIn + } + qStatusLastCheckedIn := qrStatusLastCheckedIn.String() + if qStatusLastCheckedIn != "" { + + if err := r.SetQueryParam("status.lastCheckedIn", qStatusLastCheckedIn); err != nil { + return err + } + } + } + + if o.StatusTokenState != nil { + + // query param status.tokenState + var qrStatusTokenState string + + if o.StatusTokenState != nil { + qrStatusTokenState = *o.StatusTokenState + } + qStatusTokenState := qrStatusTokenState + if qStatusTokenState != "" { + + if err := r.SetQueryParam("status.tokenState", qStatusTokenState); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_get_bootstrap_agent_config_responses.go b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_get_bootstrap_agent_config_responses.go new file mode 100644 index 0000000..4562871 --- /dev/null +++ b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_get_bootstrap_agent_config_responses.go @@ -0,0 +1,223 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package bootstrap + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/RafaySystems/rcloud-base/components/common/api/def/clients/sentry/models" +) + +// BootstrapGetBootstrapAgentConfigReader is a Reader for the BootstrapGetBootstrapAgentConfig structure. +type BootstrapGetBootstrapAgentConfigReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *BootstrapGetBootstrapAgentConfigReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewBootstrapGetBootstrapAgentConfigOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 403: + result := NewBootstrapGetBootstrapAgentConfigForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewBootstrapGetBootstrapAgentConfigNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewBootstrapGetBootstrapAgentConfigInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + result := NewBootstrapGetBootstrapAgentConfigDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewBootstrapGetBootstrapAgentConfigOK creates a BootstrapGetBootstrapAgentConfigOK with default headers values +func NewBootstrapGetBootstrapAgentConfigOK() *BootstrapGetBootstrapAgentConfigOK { + return &BootstrapGetBootstrapAgentConfigOK{} +} + +/* BootstrapGetBootstrapAgentConfigOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type BootstrapGetBootstrapAgentConfigOK struct { + Payload *models.V3HTTPBody +} + +func (o *BootstrapGetBootstrapAgentConfigOK) Error() string { + return fmt.Sprintf("[GET /v2/sentry/bootstrap/{spec.templateRef}/agent/{metadata.name}/config][%d] bootstrapGetBootstrapAgentConfigOK %+v", 200, o.Payload) +} +func (o *BootstrapGetBootstrapAgentConfigOK) GetPayload() *models.V3HTTPBody { + return o.Payload +} + +func (o *BootstrapGetBootstrapAgentConfigOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V3HTTPBody) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBootstrapGetBootstrapAgentConfigForbidden creates a BootstrapGetBootstrapAgentConfigForbidden with default headers values +func NewBootstrapGetBootstrapAgentConfigForbidden() *BootstrapGetBootstrapAgentConfigForbidden { + return &BootstrapGetBootstrapAgentConfigForbidden{} +} + +/* BootstrapGetBootstrapAgentConfigForbidden describes a response with status code 403, with default header values. + +Returned when the user does not have permission to access the resource. +*/ +type BootstrapGetBootstrapAgentConfigForbidden struct { + Payload interface{} +} + +func (o *BootstrapGetBootstrapAgentConfigForbidden) Error() string { + return fmt.Sprintf("[GET /v2/sentry/bootstrap/{spec.templateRef}/agent/{metadata.name}/config][%d] bootstrapGetBootstrapAgentConfigForbidden %+v", 403, o.Payload) +} +func (o *BootstrapGetBootstrapAgentConfigForbidden) GetPayload() interface{} { + return o.Payload +} + +func (o *BootstrapGetBootstrapAgentConfigForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBootstrapGetBootstrapAgentConfigNotFound creates a BootstrapGetBootstrapAgentConfigNotFound with default headers values +func NewBootstrapGetBootstrapAgentConfigNotFound() *BootstrapGetBootstrapAgentConfigNotFound { + return &BootstrapGetBootstrapAgentConfigNotFound{} +} + +/* BootstrapGetBootstrapAgentConfigNotFound describes a response with status code 404, with default header values. + +Returned when the resource does not exist. +*/ +type BootstrapGetBootstrapAgentConfigNotFound struct { + Payload interface{} +} + +func (o *BootstrapGetBootstrapAgentConfigNotFound) Error() string { + return fmt.Sprintf("[GET /v2/sentry/bootstrap/{spec.templateRef}/agent/{metadata.name}/config][%d] bootstrapGetBootstrapAgentConfigNotFound %+v", 404, o.Payload) +} +func (o *BootstrapGetBootstrapAgentConfigNotFound) GetPayload() interface{} { + return o.Payload +} + +func (o *BootstrapGetBootstrapAgentConfigNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBootstrapGetBootstrapAgentConfigInternalServerError creates a BootstrapGetBootstrapAgentConfigInternalServerError with default headers values +func NewBootstrapGetBootstrapAgentConfigInternalServerError() *BootstrapGetBootstrapAgentConfigInternalServerError { + return &BootstrapGetBootstrapAgentConfigInternalServerError{} +} + +/* BootstrapGetBootstrapAgentConfigInternalServerError describes a response with status code 500, with default header values. + +Returned for internal server error +*/ +type BootstrapGetBootstrapAgentConfigInternalServerError struct { + Payload interface{} +} + +func (o *BootstrapGetBootstrapAgentConfigInternalServerError) Error() string { + return fmt.Sprintf("[GET /v2/sentry/bootstrap/{spec.templateRef}/agent/{metadata.name}/config][%d] bootstrapGetBootstrapAgentConfigInternalServerError %+v", 500, o.Payload) +} +func (o *BootstrapGetBootstrapAgentConfigInternalServerError) GetPayload() interface{} { + return o.Payload +} + +func (o *BootstrapGetBootstrapAgentConfigInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBootstrapGetBootstrapAgentConfigDefault creates a BootstrapGetBootstrapAgentConfigDefault with default headers values +func NewBootstrapGetBootstrapAgentConfigDefault(code int) *BootstrapGetBootstrapAgentConfigDefault { + return &BootstrapGetBootstrapAgentConfigDefault{ + _statusCode: code, + } +} + +/* BootstrapGetBootstrapAgentConfigDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type BootstrapGetBootstrapAgentConfigDefault struct { + _statusCode int + + Payload *models.GooglerpcStatus +} + +// Code gets the status code for the bootstrap get bootstrap agent config default response +func (o *BootstrapGetBootstrapAgentConfigDefault) Code() int { + return o._statusCode +} + +func (o *BootstrapGetBootstrapAgentConfigDefault) Error() string { + return fmt.Sprintf("[GET /v2/sentry/bootstrap/{spec.templateRef}/agent/{metadata.name}/config][%d] Bootstrap_GetBootstrapAgentConfig default %+v", o._statusCode, o.Payload) +} +func (o *BootstrapGetBootstrapAgentConfigDefault) GetPayload() *models.GooglerpcStatus { + return o.Payload +} + +func (o *BootstrapGetBootstrapAgentConfigDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.GooglerpcStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_get_bootstrap_agent_parameters.go b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_get_bootstrap_agent_parameters.go new file mode 100644 index 0000000..5c5f914 --- /dev/null +++ b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_get_bootstrap_agent_parameters.go @@ -0,0 +1,652 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package bootstrap + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewBootstrapGetBootstrapAgentParams creates a new BootstrapGetBootstrapAgentParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewBootstrapGetBootstrapAgentParams() *BootstrapGetBootstrapAgentParams { + return &BootstrapGetBootstrapAgentParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewBootstrapGetBootstrapAgentParamsWithTimeout creates a new BootstrapGetBootstrapAgentParams object +// with the ability to set a timeout on a request. +func NewBootstrapGetBootstrapAgentParamsWithTimeout(timeout time.Duration) *BootstrapGetBootstrapAgentParams { + return &BootstrapGetBootstrapAgentParams{ + timeout: timeout, + } +} + +// NewBootstrapGetBootstrapAgentParamsWithContext creates a new BootstrapGetBootstrapAgentParams object +// with the ability to set a context for a request. +func NewBootstrapGetBootstrapAgentParamsWithContext(ctx context.Context) *BootstrapGetBootstrapAgentParams { + return &BootstrapGetBootstrapAgentParams{ + Context: ctx, + } +} + +// NewBootstrapGetBootstrapAgentParamsWithHTTPClient creates a new BootstrapGetBootstrapAgentParams object +// with the ability to set a custom HTTPClient for a request. +func NewBootstrapGetBootstrapAgentParamsWithHTTPClient(client *http.Client) *BootstrapGetBootstrapAgentParams { + return &BootstrapGetBootstrapAgentParams{ + HTTPClient: client, + } +} + +/* BootstrapGetBootstrapAgentParams contains all the parameters to send to the API endpoint + for the bootstrap get bootstrap agent operation. + + Typically these are written to a http.Request. +*/ +type BootstrapGetBootstrapAgentParams struct { + + /* APIVersion. + + API Version. API Version of the resource + + Default: "infra.k8smgmt.io/v3" + */ + APIVersion *string + + /* Kind. + + Kind. Kind of the resource + + Default: "BootstrapAgent" + */ + Kind *string + + /* MetadataDescription. + + Description. description of the resource + */ + MetadataDescription *string + + // MetadataID. + MetadataID *string + + // MetadataModifiedAt. + // + // Format: date-time + MetadataModifiedAt *strfmt.DateTime + + /* MetadataName. + + name of the resource + */ + MetadataName string + + /* MetadataOrganization. + + Organization. Organization to which the resource belongs + */ + MetadataOrganization *string + + /* MetadataPartner. + + Partner. Partner to which the resource belongs + */ + MetadataPartner *string + + /* MetadataProject. + + Project. Project of the resource + */ + MetadataProject *string + + // SpecAgentMode. + // + // Default: "InCluster" + SpecAgentMode *string + + // SpecTemplateRef. + SpecTemplateRef string + + // SpecToken. + SpecToken *string + + // StatusFingerprint. + StatusFingerprint *string + + // StatusIPAddress. + StatusIPAddress *string + + // StatusLastCheckedIn. + // + // Format: date-time + StatusLastCheckedIn *strfmt.DateTime + + // StatusTokenState. + // + // Default: "NotSet" + StatusTokenState *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the bootstrap get bootstrap agent params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BootstrapGetBootstrapAgentParams) WithDefaults() *BootstrapGetBootstrapAgentParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the bootstrap get bootstrap agent params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BootstrapGetBootstrapAgentParams) SetDefaults() { + var ( + aPIVersionDefault = string("infra.k8smgmt.io/v3") + + kindDefault = string("BootstrapAgent") + + specAgentModeDefault = string("InCluster") + + statusTokenStateDefault = string("NotSet") + ) + + val := BootstrapGetBootstrapAgentParams{ + APIVersion: &aPIVersionDefault, + Kind: &kindDefault, + SpecAgentMode: &specAgentModeDefault, + StatusTokenState: &statusTokenStateDefault, + } + + val.timeout = o.timeout + val.Context = o.Context + val.HTTPClient = o.HTTPClient + *o = val +} + +// WithTimeout adds the timeout to the bootstrap get bootstrap agent params +func (o *BootstrapGetBootstrapAgentParams) WithTimeout(timeout time.Duration) *BootstrapGetBootstrapAgentParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the bootstrap get bootstrap agent params +func (o *BootstrapGetBootstrapAgentParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the bootstrap get bootstrap agent params +func (o *BootstrapGetBootstrapAgentParams) WithContext(ctx context.Context) *BootstrapGetBootstrapAgentParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the bootstrap get bootstrap agent params +func (o *BootstrapGetBootstrapAgentParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the bootstrap get bootstrap agent params +func (o *BootstrapGetBootstrapAgentParams) WithHTTPClient(client *http.Client) *BootstrapGetBootstrapAgentParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the bootstrap get bootstrap agent params +func (o *BootstrapGetBootstrapAgentParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAPIVersion adds the aPIVersion to the bootstrap get bootstrap agent params +func (o *BootstrapGetBootstrapAgentParams) WithAPIVersion(aPIVersion *string) *BootstrapGetBootstrapAgentParams { + o.SetAPIVersion(aPIVersion) + return o +} + +// SetAPIVersion adds the apiVersion to the bootstrap get bootstrap agent params +func (o *BootstrapGetBootstrapAgentParams) SetAPIVersion(aPIVersion *string) { + o.APIVersion = aPIVersion +} + +// WithKind adds the kind to the bootstrap get bootstrap agent params +func (o *BootstrapGetBootstrapAgentParams) WithKind(kind *string) *BootstrapGetBootstrapAgentParams { + o.SetKind(kind) + return o +} + +// SetKind adds the kind to the bootstrap get bootstrap agent params +func (o *BootstrapGetBootstrapAgentParams) SetKind(kind *string) { + o.Kind = kind +} + +// WithMetadataDescription adds the metadataDescription to the bootstrap get bootstrap agent params +func (o *BootstrapGetBootstrapAgentParams) WithMetadataDescription(metadataDescription *string) *BootstrapGetBootstrapAgentParams { + o.SetMetadataDescription(metadataDescription) + return o +} + +// SetMetadataDescription adds the metadataDescription to the bootstrap get bootstrap agent params +func (o *BootstrapGetBootstrapAgentParams) SetMetadataDescription(metadataDescription *string) { + o.MetadataDescription = metadataDescription +} + +// WithMetadataID adds the metadataID to the bootstrap get bootstrap agent params +func (o *BootstrapGetBootstrapAgentParams) WithMetadataID(metadataID *string) *BootstrapGetBootstrapAgentParams { + o.SetMetadataID(metadataID) + return o +} + +// SetMetadataID adds the metadataId to the bootstrap get bootstrap agent params +func (o *BootstrapGetBootstrapAgentParams) SetMetadataID(metadataID *string) { + o.MetadataID = metadataID +} + +// WithMetadataModifiedAt adds the metadataModifiedAt to the bootstrap get bootstrap agent params +func (o *BootstrapGetBootstrapAgentParams) WithMetadataModifiedAt(metadataModifiedAt *strfmt.DateTime) *BootstrapGetBootstrapAgentParams { + o.SetMetadataModifiedAt(metadataModifiedAt) + return o +} + +// SetMetadataModifiedAt adds the metadataModifiedAt to the bootstrap get bootstrap agent params +func (o *BootstrapGetBootstrapAgentParams) SetMetadataModifiedAt(metadataModifiedAt *strfmt.DateTime) { + o.MetadataModifiedAt = metadataModifiedAt +} + +// WithMetadataName adds the metadataName to the bootstrap get bootstrap agent params +func (o *BootstrapGetBootstrapAgentParams) WithMetadataName(metadataName string) *BootstrapGetBootstrapAgentParams { + o.SetMetadataName(metadataName) + return o +} + +// SetMetadataName adds the metadataName to the bootstrap get bootstrap agent params +func (o *BootstrapGetBootstrapAgentParams) SetMetadataName(metadataName string) { + o.MetadataName = metadataName +} + +// WithMetadataOrganization adds the metadataOrganization to the bootstrap get bootstrap agent params +func (o *BootstrapGetBootstrapAgentParams) WithMetadataOrganization(metadataOrganization *string) *BootstrapGetBootstrapAgentParams { + o.SetMetadataOrganization(metadataOrganization) + return o +} + +// SetMetadataOrganization adds the metadataOrganization to the bootstrap get bootstrap agent params +func (o *BootstrapGetBootstrapAgentParams) SetMetadataOrganization(metadataOrganization *string) { + o.MetadataOrganization = metadataOrganization +} + +// WithMetadataPartner adds the metadataPartner to the bootstrap get bootstrap agent params +func (o *BootstrapGetBootstrapAgentParams) WithMetadataPartner(metadataPartner *string) *BootstrapGetBootstrapAgentParams { + o.SetMetadataPartner(metadataPartner) + return o +} + +// SetMetadataPartner adds the metadataPartner to the bootstrap get bootstrap agent params +func (o *BootstrapGetBootstrapAgentParams) SetMetadataPartner(metadataPartner *string) { + o.MetadataPartner = metadataPartner +} + +// WithMetadataProject adds the metadataProject to the bootstrap get bootstrap agent params +func (o *BootstrapGetBootstrapAgentParams) WithMetadataProject(metadataProject *string) *BootstrapGetBootstrapAgentParams { + o.SetMetadataProject(metadataProject) + return o +} + +// SetMetadataProject adds the metadataProject to the bootstrap get bootstrap agent params +func (o *BootstrapGetBootstrapAgentParams) SetMetadataProject(metadataProject *string) { + o.MetadataProject = metadataProject +} + +// WithSpecAgentMode adds the specAgentMode to the bootstrap get bootstrap agent params +func (o *BootstrapGetBootstrapAgentParams) WithSpecAgentMode(specAgentMode *string) *BootstrapGetBootstrapAgentParams { + o.SetSpecAgentMode(specAgentMode) + return o +} + +// SetSpecAgentMode adds the specAgentMode to the bootstrap get bootstrap agent params +func (o *BootstrapGetBootstrapAgentParams) SetSpecAgentMode(specAgentMode *string) { + o.SpecAgentMode = specAgentMode +} + +// WithSpecTemplateRef adds the specTemplateRef to the bootstrap get bootstrap agent params +func (o *BootstrapGetBootstrapAgentParams) WithSpecTemplateRef(specTemplateRef string) *BootstrapGetBootstrapAgentParams { + o.SetSpecTemplateRef(specTemplateRef) + return o +} + +// SetSpecTemplateRef adds the specTemplateRef to the bootstrap get bootstrap agent params +func (o *BootstrapGetBootstrapAgentParams) SetSpecTemplateRef(specTemplateRef string) { + o.SpecTemplateRef = specTemplateRef +} + +// WithSpecToken adds the specToken to the bootstrap get bootstrap agent params +func (o *BootstrapGetBootstrapAgentParams) WithSpecToken(specToken *string) *BootstrapGetBootstrapAgentParams { + o.SetSpecToken(specToken) + return o +} + +// SetSpecToken adds the specToken to the bootstrap get bootstrap agent params +func (o *BootstrapGetBootstrapAgentParams) SetSpecToken(specToken *string) { + o.SpecToken = specToken +} + +// WithStatusFingerprint adds the statusFingerprint to the bootstrap get bootstrap agent params +func (o *BootstrapGetBootstrapAgentParams) WithStatusFingerprint(statusFingerprint *string) *BootstrapGetBootstrapAgentParams { + o.SetStatusFingerprint(statusFingerprint) + return o +} + +// SetStatusFingerprint adds the statusFingerprint to the bootstrap get bootstrap agent params +func (o *BootstrapGetBootstrapAgentParams) SetStatusFingerprint(statusFingerprint *string) { + o.StatusFingerprint = statusFingerprint +} + +// WithStatusIPAddress adds the statusIPAddress to the bootstrap get bootstrap agent params +func (o *BootstrapGetBootstrapAgentParams) WithStatusIPAddress(statusIPAddress *string) *BootstrapGetBootstrapAgentParams { + o.SetStatusIPAddress(statusIPAddress) + return o +} + +// SetStatusIPAddress adds the statusIpAddress to the bootstrap get bootstrap agent params +func (o *BootstrapGetBootstrapAgentParams) SetStatusIPAddress(statusIPAddress *string) { + o.StatusIPAddress = statusIPAddress +} + +// WithStatusLastCheckedIn adds the statusLastCheckedIn to the bootstrap get bootstrap agent params +func (o *BootstrapGetBootstrapAgentParams) WithStatusLastCheckedIn(statusLastCheckedIn *strfmt.DateTime) *BootstrapGetBootstrapAgentParams { + o.SetStatusLastCheckedIn(statusLastCheckedIn) + return o +} + +// SetStatusLastCheckedIn adds the statusLastCheckedIn to the bootstrap get bootstrap agent params +func (o *BootstrapGetBootstrapAgentParams) SetStatusLastCheckedIn(statusLastCheckedIn *strfmt.DateTime) { + o.StatusLastCheckedIn = statusLastCheckedIn +} + +// WithStatusTokenState adds the statusTokenState to the bootstrap get bootstrap agent params +func (o *BootstrapGetBootstrapAgentParams) WithStatusTokenState(statusTokenState *string) *BootstrapGetBootstrapAgentParams { + o.SetStatusTokenState(statusTokenState) + return o +} + +// SetStatusTokenState adds the statusTokenState to the bootstrap get bootstrap agent params +func (o *BootstrapGetBootstrapAgentParams) SetStatusTokenState(statusTokenState *string) { + o.StatusTokenState = statusTokenState +} + +// WriteToRequest writes these params to a swagger request +func (o *BootstrapGetBootstrapAgentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.APIVersion != nil { + + // query param apiVersion + var qrAPIVersion string + + if o.APIVersion != nil { + qrAPIVersion = *o.APIVersion + } + qAPIVersion := qrAPIVersion + if qAPIVersion != "" { + + if err := r.SetQueryParam("apiVersion", qAPIVersion); err != nil { + return err + } + } + } + + if o.Kind != nil { + + // query param kind + var qrKind string + + if o.Kind != nil { + qrKind = *o.Kind + } + qKind := qrKind + if qKind != "" { + + if err := r.SetQueryParam("kind", qKind); err != nil { + return err + } + } + } + + if o.MetadataDescription != nil { + + // query param metadata.description + var qrMetadataDescription string + + if o.MetadataDescription != nil { + qrMetadataDescription = *o.MetadataDescription + } + qMetadataDescription := qrMetadataDescription + if qMetadataDescription != "" { + + if err := r.SetQueryParam("metadata.description", qMetadataDescription); err != nil { + return err + } + } + } + + if o.MetadataID != nil { + + // query param metadata.id + var qrMetadataID string + + if o.MetadataID != nil { + qrMetadataID = *o.MetadataID + } + qMetadataID := qrMetadataID + if qMetadataID != "" { + + if err := r.SetQueryParam("metadata.id", qMetadataID); err != nil { + return err + } + } + } + + if o.MetadataModifiedAt != nil { + + // query param metadata.modifiedAt + var qrMetadataModifiedAt strfmt.DateTime + + if o.MetadataModifiedAt != nil { + qrMetadataModifiedAt = *o.MetadataModifiedAt + } + qMetadataModifiedAt := qrMetadataModifiedAt.String() + if qMetadataModifiedAt != "" { + + if err := r.SetQueryParam("metadata.modifiedAt", qMetadataModifiedAt); err != nil { + return err + } + } + } + + // path param metadata.name + if err := r.SetPathParam("metadata.name", o.MetadataName); err != nil { + return err + } + + if o.MetadataOrganization != nil { + + // query param metadata.organization + var qrMetadataOrganization string + + if o.MetadataOrganization != nil { + qrMetadataOrganization = *o.MetadataOrganization + } + qMetadataOrganization := qrMetadataOrganization + if qMetadataOrganization != "" { + + if err := r.SetQueryParam("metadata.organization", qMetadataOrganization); err != nil { + return err + } + } + } + + if o.MetadataPartner != nil { + + // query param metadata.partner + var qrMetadataPartner string + + if o.MetadataPartner != nil { + qrMetadataPartner = *o.MetadataPartner + } + qMetadataPartner := qrMetadataPartner + if qMetadataPartner != "" { + + if err := r.SetQueryParam("metadata.partner", qMetadataPartner); err != nil { + return err + } + } + } + + if o.MetadataProject != nil { + + // query param metadata.project + var qrMetadataProject string + + if o.MetadataProject != nil { + qrMetadataProject = *o.MetadataProject + } + qMetadataProject := qrMetadataProject + if qMetadataProject != "" { + + if err := r.SetQueryParam("metadata.project", qMetadataProject); err != nil { + return err + } + } + } + + if o.SpecAgentMode != nil { + + // query param spec.agentMode + var qrSpecAgentMode string + + if o.SpecAgentMode != nil { + qrSpecAgentMode = *o.SpecAgentMode + } + qSpecAgentMode := qrSpecAgentMode + if qSpecAgentMode != "" { + + if err := r.SetQueryParam("spec.agentMode", qSpecAgentMode); err != nil { + return err + } + } + } + + // path param spec.templateRef + if err := r.SetPathParam("spec.templateRef", o.SpecTemplateRef); err != nil { + return err + } + + if o.SpecToken != nil { + + // query param spec.token + var qrSpecToken string + + if o.SpecToken != nil { + qrSpecToken = *o.SpecToken + } + qSpecToken := qrSpecToken + if qSpecToken != "" { + + if err := r.SetQueryParam("spec.token", qSpecToken); err != nil { + return err + } + } + } + + if o.StatusFingerprint != nil { + + // query param status.fingerprint + var qrStatusFingerprint string + + if o.StatusFingerprint != nil { + qrStatusFingerprint = *o.StatusFingerprint + } + qStatusFingerprint := qrStatusFingerprint + if qStatusFingerprint != "" { + + if err := r.SetQueryParam("status.fingerprint", qStatusFingerprint); err != nil { + return err + } + } + } + + if o.StatusIPAddress != nil { + + // query param status.ipAddress + var qrStatusIPAddress string + + if o.StatusIPAddress != nil { + qrStatusIPAddress = *o.StatusIPAddress + } + qStatusIPAddress := qrStatusIPAddress + if qStatusIPAddress != "" { + + if err := r.SetQueryParam("status.ipAddress", qStatusIPAddress); err != nil { + return err + } + } + } + + if o.StatusLastCheckedIn != nil { + + // query param status.lastCheckedIn + var qrStatusLastCheckedIn strfmt.DateTime + + if o.StatusLastCheckedIn != nil { + qrStatusLastCheckedIn = *o.StatusLastCheckedIn + } + qStatusLastCheckedIn := qrStatusLastCheckedIn.String() + if qStatusLastCheckedIn != "" { + + if err := r.SetQueryParam("status.lastCheckedIn", qStatusLastCheckedIn); err != nil { + return err + } + } + } + + if o.StatusTokenState != nil { + + // query param status.tokenState + var qrStatusTokenState string + + if o.StatusTokenState != nil { + qrStatusTokenState = *o.StatusTokenState + } + qStatusTokenState := qrStatusTokenState + if qStatusTokenState != "" { + + if err := r.SetQueryParam("status.tokenState", qStatusTokenState); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_get_bootstrap_agent_responses.go b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_get_bootstrap_agent_responses.go new file mode 100644 index 0000000..1849ea3 --- /dev/null +++ b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_get_bootstrap_agent_responses.go @@ -0,0 +1,223 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package bootstrap + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/RafaySystems/rcloud-base/components/common/api/def/clients/sentry/models" +) + +// BootstrapGetBootstrapAgentReader is a Reader for the BootstrapGetBootstrapAgent structure. +type BootstrapGetBootstrapAgentReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *BootstrapGetBootstrapAgentReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewBootstrapGetBootstrapAgentOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 403: + result := NewBootstrapGetBootstrapAgentForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewBootstrapGetBootstrapAgentNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewBootstrapGetBootstrapAgentInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + result := NewBootstrapGetBootstrapAgentDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewBootstrapGetBootstrapAgentOK creates a BootstrapGetBootstrapAgentOK with default headers values +func NewBootstrapGetBootstrapAgentOK() *BootstrapGetBootstrapAgentOK { + return &BootstrapGetBootstrapAgentOK{} +} + +/* BootstrapGetBootstrapAgentOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type BootstrapGetBootstrapAgentOK struct { + Payload *models.SentryBootstrapAgent +} + +func (o *BootstrapGetBootstrapAgentOK) Error() string { + return fmt.Sprintf("[GET /v2/sentry/bootstrap/{spec.templateRef}/agent/{metadata.name}][%d] bootstrapGetBootstrapAgentOK %+v", 200, o.Payload) +} +func (o *BootstrapGetBootstrapAgentOK) GetPayload() *models.SentryBootstrapAgent { + return o.Payload +} + +func (o *BootstrapGetBootstrapAgentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.SentryBootstrapAgent) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBootstrapGetBootstrapAgentForbidden creates a BootstrapGetBootstrapAgentForbidden with default headers values +func NewBootstrapGetBootstrapAgentForbidden() *BootstrapGetBootstrapAgentForbidden { + return &BootstrapGetBootstrapAgentForbidden{} +} + +/* BootstrapGetBootstrapAgentForbidden describes a response with status code 403, with default header values. + +Returned when the user does not have permission to access the resource. +*/ +type BootstrapGetBootstrapAgentForbidden struct { + Payload interface{} +} + +func (o *BootstrapGetBootstrapAgentForbidden) Error() string { + return fmt.Sprintf("[GET /v2/sentry/bootstrap/{spec.templateRef}/agent/{metadata.name}][%d] bootstrapGetBootstrapAgentForbidden %+v", 403, o.Payload) +} +func (o *BootstrapGetBootstrapAgentForbidden) GetPayload() interface{} { + return o.Payload +} + +func (o *BootstrapGetBootstrapAgentForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBootstrapGetBootstrapAgentNotFound creates a BootstrapGetBootstrapAgentNotFound with default headers values +func NewBootstrapGetBootstrapAgentNotFound() *BootstrapGetBootstrapAgentNotFound { + return &BootstrapGetBootstrapAgentNotFound{} +} + +/* BootstrapGetBootstrapAgentNotFound describes a response with status code 404, with default header values. + +Returned when the resource does not exist. +*/ +type BootstrapGetBootstrapAgentNotFound struct { + Payload interface{} +} + +func (o *BootstrapGetBootstrapAgentNotFound) Error() string { + return fmt.Sprintf("[GET /v2/sentry/bootstrap/{spec.templateRef}/agent/{metadata.name}][%d] bootstrapGetBootstrapAgentNotFound %+v", 404, o.Payload) +} +func (o *BootstrapGetBootstrapAgentNotFound) GetPayload() interface{} { + return o.Payload +} + +func (o *BootstrapGetBootstrapAgentNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBootstrapGetBootstrapAgentInternalServerError creates a BootstrapGetBootstrapAgentInternalServerError with default headers values +func NewBootstrapGetBootstrapAgentInternalServerError() *BootstrapGetBootstrapAgentInternalServerError { + return &BootstrapGetBootstrapAgentInternalServerError{} +} + +/* BootstrapGetBootstrapAgentInternalServerError describes a response with status code 500, with default header values. + +Returned for internal server error +*/ +type BootstrapGetBootstrapAgentInternalServerError struct { + Payload interface{} +} + +func (o *BootstrapGetBootstrapAgentInternalServerError) Error() string { + return fmt.Sprintf("[GET /v2/sentry/bootstrap/{spec.templateRef}/agent/{metadata.name}][%d] bootstrapGetBootstrapAgentInternalServerError %+v", 500, o.Payload) +} +func (o *BootstrapGetBootstrapAgentInternalServerError) GetPayload() interface{} { + return o.Payload +} + +func (o *BootstrapGetBootstrapAgentInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBootstrapGetBootstrapAgentDefault creates a BootstrapGetBootstrapAgentDefault with default headers values +func NewBootstrapGetBootstrapAgentDefault(code int) *BootstrapGetBootstrapAgentDefault { + return &BootstrapGetBootstrapAgentDefault{ + _statusCode: code, + } +} + +/* BootstrapGetBootstrapAgentDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type BootstrapGetBootstrapAgentDefault struct { + _statusCode int + + Payload *models.GooglerpcStatus +} + +// Code gets the status code for the bootstrap get bootstrap agent default response +func (o *BootstrapGetBootstrapAgentDefault) Code() int { + return o._statusCode +} + +func (o *BootstrapGetBootstrapAgentDefault) Error() string { + return fmt.Sprintf("[GET /v2/sentry/bootstrap/{spec.templateRef}/agent/{metadata.name}][%d] Bootstrap_GetBootstrapAgent default %+v", o._statusCode, o.Payload) +} +func (o *BootstrapGetBootstrapAgentDefault) GetPayload() *models.GooglerpcStatus { + return o.Payload +} + +func (o *BootstrapGetBootstrapAgentDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.GooglerpcStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_get_bootstrap_agent_template_parameters.go b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_get_bootstrap_agent_template_parameters.go new file mode 100644 index 0000000..76e5b27 --- /dev/null +++ b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_get_bootstrap_agent_template_parameters.go @@ -0,0 +1,689 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package bootstrap + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewBootstrapGetBootstrapAgentTemplateParams creates a new BootstrapGetBootstrapAgentTemplateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewBootstrapGetBootstrapAgentTemplateParams() *BootstrapGetBootstrapAgentTemplateParams { + return &BootstrapGetBootstrapAgentTemplateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewBootstrapGetBootstrapAgentTemplateParamsWithTimeout creates a new BootstrapGetBootstrapAgentTemplateParams object +// with the ability to set a timeout on a request. +func NewBootstrapGetBootstrapAgentTemplateParamsWithTimeout(timeout time.Duration) *BootstrapGetBootstrapAgentTemplateParams { + return &BootstrapGetBootstrapAgentTemplateParams{ + timeout: timeout, + } +} + +// NewBootstrapGetBootstrapAgentTemplateParamsWithContext creates a new BootstrapGetBootstrapAgentTemplateParams object +// with the ability to set a context for a request. +func NewBootstrapGetBootstrapAgentTemplateParamsWithContext(ctx context.Context) *BootstrapGetBootstrapAgentTemplateParams { + return &BootstrapGetBootstrapAgentTemplateParams{ + Context: ctx, + } +} + +// NewBootstrapGetBootstrapAgentTemplateParamsWithHTTPClient creates a new BootstrapGetBootstrapAgentTemplateParams object +// with the ability to set a custom HTTPClient for a request. +func NewBootstrapGetBootstrapAgentTemplateParamsWithHTTPClient(client *http.Client) *BootstrapGetBootstrapAgentTemplateParams { + return &BootstrapGetBootstrapAgentTemplateParams{ + HTTPClient: client, + } +} + +/* BootstrapGetBootstrapAgentTemplateParams contains all the parameters to send to the API endpoint + for the bootstrap get bootstrap agent template operation. + + Typically these are written to a http.Request. +*/ +type BootstrapGetBootstrapAgentTemplateParams struct { + + /* APIVersion. + + API Version. API Version of the resource + + Default: "infra.k8smgmt.io/v3" + */ + APIVersion *string + + /* Kind. + + Kind. Kind of the resource + + Default: "BootstrapAgentTemplate" + */ + Kind *string + + /* MetadataDescription. + + Description. description of the resource + */ + MetadataDescription *string + + // MetadataID. + MetadataID *string + + // MetadataModifiedAt. + // + // Format: date-time + MetadataModifiedAt *strfmt.DateTime + + /* MetadataName. + + name of the resource + */ + MetadataName string + + /* MetadataOrganization. + + Organization. Organization to which the resource belongs + */ + MetadataOrganization *string + + /* MetadataPartner. + + Partner. Partner to which the resource belongs + */ + MetadataPartner *string + + /* MetadataProject. + + Project. Project of the resource + */ + MetadataProject *string + + // SpecAutoApprove. + SpecAutoApprove *bool + + // SpecAutoRegister. + SpecAutoRegister *bool + + // SpecIgnoreMultipleRegister. + SpecIgnoreMultipleRegister *bool + + // SpecInClusterTemplate. + SpecInClusterTemplate *string + + // SpecInfraRef. + SpecInfraRef *string + + // SpecOutOfClusterTemplate. + SpecOutOfClusterTemplate *string + + // SpecTemplateType. + // + // Default: "TemplateTypeNotSet" + SpecTemplateType *string + + // SpecToken. + SpecToken *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the bootstrap get bootstrap agent template params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BootstrapGetBootstrapAgentTemplateParams) WithDefaults() *BootstrapGetBootstrapAgentTemplateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the bootstrap get bootstrap agent template params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BootstrapGetBootstrapAgentTemplateParams) SetDefaults() { + var ( + aPIVersionDefault = string("infra.k8smgmt.io/v3") + + kindDefault = string("BootstrapAgentTemplate") + + specTemplateTypeDefault = string("TemplateTypeNotSet") + ) + + val := BootstrapGetBootstrapAgentTemplateParams{ + APIVersion: &aPIVersionDefault, + Kind: &kindDefault, + SpecTemplateType: &specTemplateTypeDefault, + } + + val.timeout = o.timeout + val.Context = o.Context + val.HTTPClient = o.HTTPClient + *o = val +} + +// WithTimeout adds the timeout to the bootstrap get bootstrap agent template params +func (o *BootstrapGetBootstrapAgentTemplateParams) WithTimeout(timeout time.Duration) *BootstrapGetBootstrapAgentTemplateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the bootstrap get bootstrap agent template params +func (o *BootstrapGetBootstrapAgentTemplateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the bootstrap get bootstrap agent template params +func (o *BootstrapGetBootstrapAgentTemplateParams) WithContext(ctx context.Context) *BootstrapGetBootstrapAgentTemplateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the bootstrap get bootstrap agent template params +func (o *BootstrapGetBootstrapAgentTemplateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the bootstrap get bootstrap agent template params +func (o *BootstrapGetBootstrapAgentTemplateParams) WithHTTPClient(client *http.Client) *BootstrapGetBootstrapAgentTemplateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the bootstrap get bootstrap agent template params +func (o *BootstrapGetBootstrapAgentTemplateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAPIVersion adds the aPIVersion to the bootstrap get bootstrap agent template params +func (o *BootstrapGetBootstrapAgentTemplateParams) WithAPIVersion(aPIVersion *string) *BootstrapGetBootstrapAgentTemplateParams { + o.SetAPIVersion(aPIVersion) + return o +} + +// SetAPIVersion adds the apiVersion to the bootstrap get bootstrap agent template params +func (o *BootstrapGetBootstrapAgentTemplateParams) SetAPIVersion(aPIVersion *string) { + o.APIVersion = aPIVersion +} + +// WithKind adds the kind to the bootstrap get bootstrap agent template params +func (o *BootstrapGetBootstrapAgentTemplateParams) WithKind(kind *string) *BootstrapGetBootstrapAgentTemplateParams { + o.SetKind(kind) + return o +} + +// SetKind adds the kind to the bootstrap get bootstrap agent template params +func (o *BootstrapGetBootstrapAgentTemplateParams) SetKind(kind *string) { + o.Kind = kind +} + +// WithMetadataDescription adds the metadataDescription to the bootstrap get bootstrap agent template params +func (o *BootstrapGetBootstrapAgentTemplateParams) WithMetadataDescription(metadataDescription *string) *BootstrapGetBootstrapAgentTemplateParams { + o.SetMetadataDescription(metadataDescription) + return o +} + +// SetMetadataDescription adds the metadataDescription to the bootstrap get bootstrap agent template params +func (o *BootstrapGetBootstrapAgentTemplateParams) SetMetadataDescription(metadataDescription *string) { + o.MetadataDescription = metadataDescription +} + +// WithMetadataID adds the metadataID to the bootstrap get bootstrap agent template params +func (o *BootstrapGetBootstrapAgentTemplateParams) WithMetadataID(metadataID *string) *BootstrapGetBootstrapAgentTemplateParams { + o.SetMetadataID(metadataID) + return o +} + +// SetMetadataID adds the metadataId to the bootstrap get bootstrap agent template params +func (o *BootstrapGetBootstrapAgentTemplateParams) SetMetadataID(metadataID *string) { + o.MetadataID = metadataID +} + +// WithMetadataModifiedAt adds the metadataModifiedAt to the bootstrap get bootstrap agent template params +func (o *BootstrapGetBootstrapAgentTemplateParams) WithMetadataModifiedAt(metadataModifiedAt *strfmt.DateTime) *BootstrapGetBootstrapAgentTemplateParams { + o.SetMetadataModifiedAt(metadataModifiedAt) + return o +} + +// SetMetadataModifiedAt adds the metadataModifiedAt to the bootstrap get bootstrap agent template params +func (o *BootstrapGetBootstrapAgentTemplateParams) SetMetadataModifiedAt(metadataModifiedAt *strfmt.DateTime) { + o.MetadataModifiedAt = metadataModifiedAt +} + +// WithMetadataName adds the metadataName to the bootstrap get bootstrap agent template params +func (o *BootstrapGetBootstrapAgentTemplateParams) WithMetadataName(metadataName string) *BootstrapGetBootstrapAgentTemplateParams { + o.SetMetadataName(metadataName) + return o +} + +// SetMetadataName adds the metadataName to the bootstrap get bootstrap agent template params +func (o *BootstrapGetBootstrapAgentTemplateParams) SetMetadataName(metadataName string) { + o.MetadataName = metadataName +} + +// WithMetadataOrganization adds the metadataOrganization to the bootstrap get bootstrap agent template params +func (o *BootstrapGetBootstrapAgentTemplateParams) WithMetadataOrganization(metadataOrganization *string) *BootstrapGetBootstrapAgentTemplateParams { + o.SetMetadataOrganization(metadataOrganization) + return o +} + +// SetMetadataOrganization adds the metadataOrganization to the bootstrap get bootstrap agent template params +func (o *BootstrapGetBootstrapAgentTemplateParams) SetMetadataOrganization(metadataOrganization *string) { + o.MetadataOrganization = metadataOrganization +} + +// WithMetadataPartner adds the metadataPartner to the bootstrap get bootstrap agent template params +func (o *BootstrapGetBootstrapAgentTemplateParams) WithMetadataPartner(metadataPartner *string) *BootstrapGetBootstrapAgentTemplateParams { + o.SetMetadataPartner(metadataPartner) + return o +} + +// SetMetadataPartner adds the metadataPartner to the bootstrap get bootstrap agent template params +func (o *BootstrapGetBootstrapAgentTemplateParams) SetMetadataPartner(metadataPartner *string) { + o.MetadataPartner = metadataPartner +} + +// WithMetadataProject adds the metadataProject to the bootstrap get bootstrap agent template params +func (o *BootstrapGetBootstrapAgentTemplateParams) WithMetadataProject(metadataProject *string) *BootstrapGetBootstrapAgentTemplateParams { + o.SetMetadataProject(metadataProject) + return o +} + +// SetMetadataProject adds the metadataProject to the bootstrap get bootstrap agent template params +func (o *BootstrapGetBootstrapAgentTemplateParams) SetMetadataProject(metadataProject *string) { + o.MetadataProject = metadataProject +} + +// WithSpecAutoApprove adds the specAutoApprove to the bootstrap get bootstrap agent template params +func (o *BootstrapGetBootstrapAgentTemplateParams) WithSpecAutoApprove(specAutoApprove *bool) *BootstrapGetBootstrapAgentTemplateParams { + o.SetSpecAutoApprove(specAutoApprove) + return o +} + +// SetSpecAutoApprove adds the specAutoApprove to the bootstrap get bootstrap agent template params +func (o *BootstrapGetBootstrapAgentTemplateParams) SetSpecAutoApprove(specAutoApprove *bool) { + o.SpecAutoApprove = specAutoApprove +} + +// WithSpecAutoRegister adds the specAutoRegister to the bootstrap get bootstrap agent template params +func (o *BootstrapGetBootstrapAgentTemplateParams) WithSpecAutoRegister(specAutoRegister *bool) *BootstrapGetBootstrapAgentTemplateParams { + o.SetSpecAutoRegister(specAutoRegister) + return o +} + +// SetSpecAutoRegister adds the specAutoRegister to the bootstrap get bootstrap agent template params +func (o *BootstrapGetBootstrapAgentTemplateParams) SetSpecAutoRegister(specAutoRegister *bool) { + o.SpecAutoRegister = specAutoRegister +} + +// WithSpecIgnoreMultipleRegister adds the specIgnoreMultipleRegister to the bootstrap get bootstrap agent template params +func (o *BootstrapGetBootstrapAgentTemplateParams) WithSpecIgnoreMultipleRegister(specIgnoreMultipleRegister *bool) *BootstrapGetBootstrapAgentTemplateParams { + o.SetSpecIgnoreMultipleRegister(specIgnoreMultipleRegister) + return o +} + +// SetSpecIgnoreMultipleRegister adds the specIgnoreMultipleRegister to the bootstrap get bootstrap agent template params +func (o *BootstrapGetBootstrapAgentTemplateParams) SetSpecIgnoreMultipleRegister(specIgnoreMultipleRegister *bool) { + o.SpecIgnoreMultipleRegister = specIgnoreMultipleRegister +} + +// WithSpecInClusterTemplate adds the specInClusterTemplate to the bootstrap get bootstrap agent template params +func (o *BootstrapGetBootstrapAgentTemplateParams) WithSpecInClusterTemplate(specInClusterTemplate *string) *BootstrapGetBootstrapAgentTemplateParams { + o.SetSpecInClusterTemplate(specInClusterTemplate) + return o +} + +// SetSpecInClusterTemplate adds the specInClusterTemplate to the bootstrap get bootstrap agent template params +func (o *BootstrapGetBootstrapAgentTemplateParams) SetSpecInClusterTemplate(specInClusterTemplate *string) { + o.SpecInClusterTemplate = specInClusterTemplate +} + +// WithSpecInfraRef adds the specInfraRef to the bootstrap get bootstrap agent template params +func (o *BootstrapGetBootstrapAgentTemplateParams) WithSpecInfraRef(specInfraRef *string) *BootstrapGetBootstrapAgentTemplateParams { + o.SetSpecInfraRef(specInfraRef) + return o +} + +// SetSpecInfraRef adds the specInfraRef to the bootstrap get bootstrap agent template params +func (o *BootstrapGetBootstrapAgentTemplateParams) SetSpecInfraRef(specInfraRef *string) { + o.SpecInfraRef = specInfraRef +} + +// WithSpecOutOfClusterTemplate adds the specOutOfClusterTemplate to the bootstrap get bootstrap agent template params +func (o *BootstrapGetBootstrapAgentTemplateParams) WithSpecOutOfClusterTemplate(specOutOfClusterTemplate *string) *BootstrapGetBootstrapAgentTemplateParams { + o.SetSpecOutOfClusterTemplate(specOutOfClusterTemplate) + return o +} + +// SetSpecOutOfClusterTemplate adds the specOutOfClusterTemplate to the bootstrap get bootstrap agent template params +func (o *BootstrapGetBootstrapAgentTemplateParams) SetSpecOutOfClusterTemplate(specOutOfClusterTemplate *string) { + o.SpecOutOfClusterTemplate = specOutOfClusterTemplate +} + +// WithSpecTemplateType adds the specTemplateType to the bootstrap get bootstrap agent template params +func (o *BootstrapGetBootstrapAgentTemplateParams) WithSpecTemplateType(specTemplateType *string) *BootstrapGetBootstrapAgentTemplateParams { + o.SetSpecTemplateType(specTemplateType) + return o +} + +// SetSpecTemplateType adds the specTemplateType to the bootstrap get bootstrap agent template params +func (o *BootstrapGetBootstrapAgentTemplateParams) SetSpecTemplateType(specTemplateType *string) { + o.SpecTemplateType = specTemplateType +} + +// WithSpecToken adds the specToken to the bootstrap get bootstrap agent template params +func (o *BootstrapGetBootstrapAgentTemplateParams) WithSpecToken(specToken *string) *BootstrapGetBootstrapAgentTemplateParams { + o.SetSpecToken(specToken) + return o +} + +// SetSpecToken adds the specToken to the bootstrap get bootstrap agent template params +func (o *BootstrapGetBootstrapAgentTemplateParams) SetSpecToken(specToken *string) { + o.SpecToken = specToken +} + +// WriteToRequest writes these params to a swagger request +func (o *BootstrapGetBootstrapAgentTemplateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.APIVersion != nil { + + // query param apiVersion + var qrAPIVersion string + + if o.APIVersion != nil { + qrAPIVersion = *o.APIVersion + } + qAPIVersion := qrAPIVersion + if qAPIVersion != "" { + + if err := r.SetQueryParam("apiVersion", qAPIVersion); err != nil { + return err + } + } + } + + if o.Kind != nil { + + // query param kind + var qrKind string + + if o.Kind != nil { + qrKind = *o.Kind + } + qKind := qrKind + if qKind != "" { + + if err := r.SetQueryParam("kind", qKind); err != nil { + return err + } + } + } + + if o.MetadataDescription != nil { + + // query param metadata.description + var qrMetadataDescription string + + if o.MetadataDescription != nil { + qrMetadataDescription = *o.MetadataDescription + } + qMetadataDescription := qrMetadataDescription + if qMetadataDescription != "" { + + if err := r.SetQueryParam("metadata.description", qMetadataDescription); err != nil { + return err + } + } + } + + if o.MetadataID != nil { + + // query param metadata.id + var qrMetadataID string + + if o.MetadataID != nil { + qrMetadataID = *o.MetadataID + } + qMetadataID := qrMetadataID + if qMetadataID != "" { + + if err := r.SetQueryParam("metadata.id", qMetadataID); err != nil { + return err + } + } + } + + if o.MetadataModifiedAt != nil { + + // query param metadata.modifiedAt + var qrMetadataModifiedAt strfmt.DateTime + + if o.MetadataModifiedAt != nil { + qrMetadataModifiedAt = *o.MetadataModifiedAt + } + qMetadataModifiedAt := qrMetadataModifiedAt.String() + if qMetadataModifiedAt != "" { + + if err := r.SetQueryParam("metadata.modifiedAt", qMetadataModifiedAt); err != nil { + return err + } + } + } + + // path param metadata.name + if err := r.SetPathParam("metadata.name", o.MetadataName); err != nil { + return err + } + + if o.MetadataOrganization != nil { + + // query param metadata.organization + var qrMetadataOrganization string + + if o.MetadataOrganization != nil { + qrMetadataOrganization = *o.MetadataOrganization + } + qMetadataOrganization := qrMetadataOrganization + if qMetadataOrganization != "" { + + if err := r.SetQueryParam("metadata.organization", qMetadataOrganization); err != nil { + return err + } + } + } + + if o.MetadataPartner != nil { + + // query param metadata.partner + var qrMetadataPartner string + + if o.MetadataPartner != nil { + qrMetadataPartner = *o.MetadataPartner + } + qMetadataPartner := qrMetadataPartner + if qMetadataPartner != "" { + + if err := r.SetQueryParam("metadata.partner", qMetadataPartner); err != nil { + return err + } + } + } + + if o.MetadataProject != nil { + + // query param metadata.project + var qrMetadataProject string + + if o.MetadataProject != nil { + qrMetadataProject = *o.MetadataProject + } + qMetadataProject := qrMetadataProject + if qMetadataProject != "" { + + if err := r.SetQueryParam("metadata.project", qMetadataProject); err != nil { + return err + } + } + } + + if o.SpecAutoApprove != nil { + + // query param spec.autoApprove + var qrSpecAutoApprove bool + + if o.SpecAutoApprove != nil { + qrSpecAutoApprove = *o.SpecAutoApprove + } + qSpecAutoApprove := swag.FormatBool(qrSpecAutoApprove) + if qSpecAutoApprove != "" { + + if err := r.SetQueryParam("spec.autoApprove", qSpecAutoApprove); err != nil { + return err + } + } + } + + if o.SpecAutoRegister != nil { + + // query param spec.autoRegister + var qrSpecAutoRegister bool + + if o.SpecAutoRegister != nil { + qrSpecAutoRegister = *o.SpecAutoRegister + } + qSpecAutoRegister := swag.FormatBool(qrSpecAutoRegister) + if qSpecAutoRegister != "" { + + if err := r.SetQueryParam("spec.autoRegister", qSpecAutoRegister); err != nil { + return err + } + } + } + + if o.SpecIgnoreMultipleRegister != nil { + + // query param spec.ignoreMultipleRegister + var qrSpecIgnoreMultipleRegister bool + + if o.SpecIgnoreMultipleRegister != nil { + qrSpecIgnoreMultipleRegister = *o.SpecIgnoreMultipleRegister + } + qSpecIgnoreMultipleRegister := swag.FormatBool(qrSpecIgnoreMultipleRegister) + if qSpecIgnoreMultipleRegister != "" { + + if err := r.SetQueryParam("spec.ignoreMultipleRegister", qSpecIgnoreMultipleRegister); err != nil { + return err + } + } + } + + if o.SpecInClusterTemplate != nil { + + // query param spec.inClusterTemplate + var qrSpecInClusterTemplate string + + if o.SpecInClusterTemplate != nil { + qrSpecInClusterTemplate = *o.SpecInClusterTemplate + } + qSpecInClusterTemplate := qrSpecInClusterTemplate + if qSpecInClusterTemplate != "" { + + if err := r.SetQueryParam("spec.inClusterTemplate", qSpecInClusterTemplate); err != nil { + return err + } + } + } + + if o.SpecInfraRef != nil { + + // query param spec.infraRef + var qrSpecInfraRef string + + if o.SpecInfraRef != nil { + qrSpecInfraRef = *o.SpecInfraRef + } + qSpecInfraRef := qrSpecInfraRef + if qSpecInfraRef != "" { + + if err := r.SetQueryParam("spec.infraRef", qSpecInfraRef); err != nil { + return err + } + } + } + + if o.SpecOutOfClusterTemplate != nil { + + // query param spec.outOfClusterTemplate + var qrSpecOutOfClusterTemplate string + + if o.SpecOutOfClusterTemplate != nil { + qrSpecOutOfClusterTemplate = *o.SpecOutOfClusterTemplate + } + qSpecOutOfClusterTemplate := qrSpecOutOfClusterTemplate + if qSpecOutOfClusterTemplate != "" { + + if err := r.SetQueryParam("spec.outOfClusterTemplate", qSpecOutOfClusterTemplate); err != nil { + return err + } + } + } + + if o.SpecTemplateType != nil { + + // query param spec.templateType + var qrSpecTemplateType string + + if o.SpecTemplateType != nil { + qrSpecTemplateType = *o.SpecTemplateType + } + qSpecTemplateType := qrSpecTemplateType + if qSpecTemplateType != "" { + + if err := r.SetQueryParam("spec.templateType", qSpecTemplateType); err != nil { + return err + } + } + } + + if o.SpecToken != nil { + + // query param spec.token + var qrSpecToken string + + if o.SpecToken != nil { + qrSpecToken = *o.SpecToken + } + qSpecToken := qrSpecToken + if qSpecToken != "" { + + if err := r.SetQueryParam("spec.token", qSpecToken); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_get_bootstrap_agent_template_responses.go b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_get_bootstrap_agent_template_responses.go new file mode 100644 index 0000000..73bfb28 --- /dev/null +++ b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_get_bootstrap_agent_template_responses.go @@ -0,0 +1,223 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package bootstrap + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/RafaySystems/rcloud-base/components/common/api/def/clients/sentry/models" +) + +// BootstrapGetBootstrapAgentTemplateReader is a Reader for the BootstrapGetBootstrapAgentTemplate structure. +type BootstrapGetBootstrapAgentTemplateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *BootstrapGetBootstrapAgentTemplateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewBootstrapGetBootstrapAgentTemplateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 403: + result := NewBootstrapGetBootstrapAgentTemplateForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewBootstrapGetBootstrapAgentTemplateNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewBootstrapGetBootstrapAgentTemplateInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + result := NewBootstrapGetBootstrapAgentTemplateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewBootstrapGetBootstrapAgentTemplateOK creates a BootstrapGetBootstrapAgentTemplateOK with default headers values +func NewBootstrapGetBootstrapAgentTemplateOK() *BootstrapGetBootstrapAgentTemplateOK { + return &BootstrapGetBootstrapAgentTemplateOK{} +} + +/* BootstrapGetBootstrapAgentTemplateOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type BootstrapGetBootstrapAgentTemplateOK struct { + Payload *models.SentryBootstrapAgentTemplate +} + +func (o *BootstrapGetBootstrapAgentTemplateOK) Error() string { + return fmt.Sprintf("[GET /v2/sentry/bootstrap/template/{metadata.name}][%d] bootstrapGetBootstrapAgentTemplateOK %+v", 200, o.Payload) +} +func (o *BootstrapGetBootstrapAgentTemplateOK) GetPayload() *models.SentryBootstrapAgentTemplate { + return o.Payload +} + +func (o *BootstrapGetBootstrapAgentTemplateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.SentryBootstrapAgentTemplate) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBootstrapGetBootstrapAgentTemplateForbidden creates a BootstrapGetBootstrapAgentTemplateForbidden with default headers values +func NewBootstrapGetBootstrapAgentTemplateForbidden() *BootstrapGetBootstrapAgentTemplateForbidden { + return &BootstrapGetBootstrapAgentTemplateForbidden{} +} + +/* BootstrapGetBootstrapAgentTemplateForbidden describes a response with status code 403, with default header values. + +Returned when the user does not have permission to access the resource. +*/ +type BootstrapGetBootstrapAgentTemplateForbidden struct { + Payload interface{} +} + +func (o *BootstrapGetBootstrapAgentTemplateForbidden) Error() string { + return fmt.Sprintf("[GET /v2/sentry/bootstrap/template/{metadata.name}][%d] bootstrapGetBootstrapAgentTemplateForbidden %+v", 403, o.Payload) +} +func (o *BootstrapGetBootstrapAgentTemplateForbidden) GetPayload() interface{} { + return o.Payload +} + +func (o *BootstrapGetBootstrapAgentTemplateForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBootstrapGetBootstrapAgentTemplateNotFound creates a BootstrapGetBootstrapAgentTemplateNotFound with default headers values +func NewBootstrapGetBootstrapAgentTemplateNotFound() *BootstrapGetBootstrapAgentTemplateNotFound { + return &BootstrapGetBootstrapAgentTemplateNotFound{} +} + +/* BootstrapGetBootstrapAgentTemplateNotFound describes a response with status code 404, with default header values. + +Returned when the resource does not exist. +*/ +type BootstrapGetBootstrapAgentTemplateNotFound struct { + Payload interface{} +} + +func (o *BootstrapGetBootstrapAgentTemplateNotFound) Error() string { + return fmt.Sprintf("[GET /v2/sentry/bootstrap/template/{metadata.name}][%d] bootstrapGetBootstrapAgentTemplateNotFound %+v", 404, o.Payload) +} +func (o *BootstrapGetBootstrapAgentTemplateNotFound) GetPayload() interface{} { + return o.Payload +} + +func (o *BootstrapGetBootstrapAgentTemplateNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBootstrapGetBootstrapAgentTemplateInternalServerError creates a BootstrapGetBootstrapAgentTemplateInternalServerError with default headers values +func NewBootstrapGetBootstrapAgentTemplateInternalServerError() *BootstrapGetBootstrapAgentTemplateInternalServerError { + return &BootstrapGetBootstrapAgentTemplateInternalServerError{} +} + +/* BootstrapGetBootstrapAgentTemplateInternalServerError describes a response with status code 500, with default header values. + +Returned for internal server error +*/ +type BootstrapGetBootstrapAgentTemplateInternalServerError struct { + Payload interface{} +} + +func (o *BootstrapGetBootstrapAgentTemplateInternalServerError) Error() string { + return fmt.Sprintf("[GET /v2/sentry/bootstrap/template/{metadata.name}][%d] bootstrapGetBootstrapAgentTemplateInternalServerError %+v", 500, o.Payload) +} +func (o *BootstrapGetBootstrapAgentTemplateInternalServerError) GetPayload() interface{} { + return o.Payload +} + +func (o *BootstrapGetBootstrapAgentTemplateInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBootstrapGetBootstrapAgentTemplateDefault creates a BootstrapGetBootstrapAgentTemplateDefault with default headers values +func NewBootstrapGetBootstrapAgentTemplateDefault(code int) *BootstrapGetBootstrapAgentTemplateDefault { + return &BootstrapGetBootstrapAgentTemplateDefault{ + _statusCode: code, + } +} + +/* BootstrapGetBootstrapAgentTemplateDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type BootstrapGetBootstrapAgentTemplateDefault struct { + _statusCode int + + Payload *models.GooglerpcStatus +} + +// Code gets the status code for the bootstrap get bootstrap agent template default response +func (o *BootstrapGetBootstrapAgentTemplateDefault) Code() int { + return o._statusCode +} + +func (o *BootstrapGetBootstrapAgentTemplateDefault) Error() string { + return fmt.Sprintf("[GET /v2/sentry/bootstrap/template/{metadata.name}][%d] Bootstrap_GetBootstrapAgentTemplate default %+v", o._statusCode, o.Payload) +} +func (o *BootstrapGetBootstrapAgentTemplateDefault) GetPayload() *models.GooglerpcStatus { + return o.Payload +} + +func (o *BootstrapGetBootstrapAgentTemplateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.GooglerpcStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_get_bootstrap_agent_templates_parameters.go b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_get_bootstrap_agent_templates_parameters.go new file mode 100644 index 0000000..96c7c7f --- /dev/null +++ b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_get_bootstrap_agent_templates_parameters.go @@ -0,0 +1,878 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package bootstrap + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewBootstrapGetBootstrapAgentTemplatesParams creates a new BootstrapGetBootstrapAgentTemplatesParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewBootstrapGetBootstrapAgentTemplatesParams() *BootstrapGetBootstrapAgentTemplatesParams { + return &BootstrapGetBootstrapAgentTemplatesParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewBootstrapGetBootstrapAgentTemplatesParamsWithTimeout creates a new BootstrapGetBootstrapAgentTemplatesParams object +// with the ability to set a timeout on a request. +func NewBootstrapGetBootstrapAgentTemplatesParamsWithTimeout(timeout time.Duration) *BootstrapGetBootstrapAgentTemplatesParams { + return &BootstrapGetBootstrapAgentTemplatesParams{ + timeout: timeout, + } +} + +// NewBootstrapGetBootstrapAgentTemplatesParamsWithContext creates a new BootstrapGetBootstrapAgentTemplatesParams object +// with the ability to set a context for a request. +func NewBootstrapGetBootstrapAgentTemplatesParamsWithContext(ctx context.Context) *BootstrapGetBootstrapAgentTemplatesParams { + return &BootstrapGetBootstrapAgentTemplatesParams{ + Context: ctx, + } +} + +// NewBootstrapGetBootstrapAgentTemplatesParamsWithHTTPClient creates a new BootstrapGetBootstrapAgentTemplatesParams object +// with the ability to set a custom HTTPClient for a request. +func NewBootstrapGetBootstrapAgentTemplatesParamsWithHTTPClient(client *http.Client) *BootstrapGetBootstrapAgentTemplatesParams { + return &BootstrapGetBootstrapAgentTemplatesParams{ + HTTPClient: client, + } +} + +/* BootstrapGetBootstrapAgentTemplatesParams contains all the parameters to send to the API endpoint + for the bootstrap get bootstrap agent templates operation. + + Typically these are written to a http.Request. +*/ +type BootstrapGetBootstrapAgentTemplatesParams struct { + + // ID. + ID *string + + // BlueprintRef. + BlueprintRef *string + + // ClusterID. + ClusterID *string + + // Count. + // + // Format: int64 + Count *string + + // Deleted. + Deleted *bool + + /* DisplayName. + + displayName only used for update queries to set displayName (READONLY). + */ + DisplayName *string + + // Extended. + Extended *bool + + /* GlobalScope. + + globalScope sets partnerID,organizationID,projectID = 0. + */ + GlobalScope *bool + + // Groups. + Groups []string + + /* IgnoreScopeDefault. + + ignoreScopeDefault ignores default values for partnerID, organizationID and + projectID. + */ + IgnoreScopeDefault *bool + + // IsSSOUser. + IsSSOUser *bool + + // Limit. + // + // Format: int64 + Limit *string + + /* Name. + + name is unique ID of a resource along with (partnerID, organizationID, + projectID). + */ + Name *string + + // Offset. + // + // Format: int64 + Offset *string + + // Order. + Order *string + + // OrderBy. + OrderBy *string + + // OrganizationID. + OrganizationID *string + + // PartnerID. + PartnerID *string + + // ProjectID. + ProjectID *string + + // PublishedVersion. + PublishedVersion *string + + /* Selector. + + selector is used to filter the labels of a resource. + */ + Selector *string + + /* URLScope. + + urlScope is supposed to be passed in the URL as kind/HashID(value). + */ + URLScope *string + + // Username. + Username *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the bootstrap get bootstrap agent templates params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BootstrapGetBootstrapAgentTemplatesParams) WithDefaults() *BootstrapGetBootstrapAgentTemplatesParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the bootstrap get bootstrap agent templates params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BootstrapGetBootstrapAgentTemplatesParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the bootstrap get bootstrap agent templates params +func (o *BootstrapGetBootstrapAgentTemplatesParams) WithTimeout(timeout time.Duration) *BootstrapGetBootstrapAgentTemplatesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the bootstrap get bootstrap agent templates params +func (o *BootstrapGetBootstrapAgentTemplatesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the bootstrap get bootstrap agent templates params +func (o *BootstrapGetBootstrapAgentTemplatesParams) WithContext(ctx context.Context) *BootstrapGetBootstrapAgentTemplatesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the bootstrap get bootstrap agent templates params +func (o *BootstrapGetBootstrapAgentTemplatesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the bootstrap get bootstrap agent templates params +func (o *BootstrapGetBootstrapAgentTemplatesParams) WithHTTPClient(client *http.Client) *BootstrapGetBootstrapAgentTemplatesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the bootstrap get bootstrap agent templates params +func (o *BootstrapGetBootstrapAgentTemplatesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the bootstrap get bootstrap agent templates params +func (o *BootstrapGetBootstrapAgentTemplatesParams) WithID(id *string) *BootstrapGetBootstrapAgentTemplatesParams { + o.SetID(id) + return o +} + +// SetID adds the id to the bootstrap get bootstrap agent templates params +func (o *BootstrapGetBootstrapAgentTemplatesParams) SetID(id *string) { + o.ID = id +} + +// WithBlueprintRef adds the blueprintRef to the bootstrap get bootstrap agent templates params +func (o *BootstrapGetBootstrapAgentTemplatesParams) WithBlueprintRef(blueprintRef *string) *BootstrapGetBootstrapAgentTemplatesParams { + o.SetBlueprintRef(blueprintRef) + return o +} + +// SetBlueprintRef adds the blueprintRef to the bootstrap get bootstrap agent templates params +func (o *BootstrapGetBootstrapAgentTemplatesParams) SetBlueprintRef(blueprintRef *string) { + o.BlueprintRef = blueprintRef +} + +// WithClusterID adds the clusterID to the bootstrap get bootstrap agent templates params +func (o *BootstrapGetBootstrapAgentTemplatesParams) WithClusterID(clusterID *string) *BootstrapGetBootstrapAgentTemplatesParams { + o.SetClusterID(clusterID) + return o +} + +// SetClusterID adds the clusterId to the bootstrap get bootstrap agent templates params +func (o *BootstrapGetBootstrapAgentTemplatesParams) SetClusterID(clusterID *string) { + o.ClusterID = clusterID +} + +// WithCount adds the count to the bootstrap get bootstrap agent templates params +func (o *BootstrapGetBootstrapAgentTemplatesParams) WithCount(count *string) *BootstrapGetBootstrapAgentTemplatesParams { + o.SetCount(count) + return o +} + +// SetCount adds the count to the bootstrap get bootstrap agent templates params +func (o *BootstrapGetBootstrapAgentTemplatesParams) SetCount(count *string) { + o.Count = count +} + +// WithDeleted adds the deleted to the bootstrap get bootstrap agent templates params +func (o *BootstrapGetBootstrapAgentTemplatesParams) WithDeleted(deleted *bool) *BootstrapGetBootstrapAgentTemplatesParams { + o.SetDeleted(deleted) + return o +} + +// SetDeleted adds the deleted to the bootstrap get bootstrap agent templates params +func (o *BootstrapGetBootstrapAgentTemplatesParams) SetDeleted(deleted *bool) { + o.Deleted = deleted +} + +// WithDisplayName adds the displayName to the bootstrap get bootstrap agent templates params +func (o *BootstrapGetBootstrapAgentTemplatesParams) WithDisplayName(displayName *string) *BootstrapGetBootstrapAgentTemplatesParams { + o.SetDisplayName(displayName) + return o +} + +// SetDisplayName adds the displayName to the bootstrap get bootstrap agent templates params +func (o *BootstrapGetBootstrapAgentTemplatesParams) SetDisplayName(displayName *string) { + o.DisplayName = displayName +} + +// WithExtended adds the extended to the bootstrap get bootstrap agent templates params +func (o *BootstrapGetBootstrapAgentTemplatesParams) WithExtended(extended *bool) *BootstrapGetBootstrapAgentTemplatesParams { + o.SetExtended(extended) + return o +} + +// SetExtended adds the extended to the bootstrap get bootstrap agent templates params +func (o *BootstrapGetBootstrapAgentTemplatesParams) SetExtended(extended *bool) { + o.Extended = extended +} + +// WithGlobalScope adds the globalScope to the bootstrap get bootstrap agent templates params +func (o *BootstrapGetBootstrapAgentTemplatesParams) WithGlobalScope(globalScope *bool) *BootstrapGetBootstrapAgentTemplatesParams { + o.SetGlobalScope(globalScope) + return o +} + +// SetGlobalScope adds the globalScope to the bootstrap get bootstrap agent templates params +func (o *BootstrapGetBootstrapAgentTemplatesParams) SetGlobalScope(globalScope *bool) { + o.GlobalScope = globalScope +} + +// WithGroups adds the groups to the bootstrap get bootstrap agent templates params +func (o *BootstrapGetBootstrapAgentTemplatesParams) WithGroups(groups []string) *BootstrapGetBootstrapAgentTemplatesParams { + o.SetGroups(groups) + return o +} + +// SetGroups adds the groups to the bootstrap get bootstrap agent templates params +func (o *BootstrapGetBootstrapAgentTemplatesParams) SetGroups(groups []string) { + o.Groups = groups +} + +// WithIgnoreScopeDefault adds the ignoreScopeDefault to the bootstrap get bootstrap agent templates params +func (o *BootstrapGetBootstrapAgentTemplatesParams) WithIgnoreScopeDefault(ignoreScopeDefault *bool) *BootstrapGetBootstrapAgentTemplatesParams { + o.SetIgnoreScopeDefault(ignoreScopeDefault) + return o +} + +// SetIgnoreScopeDefault adds the ignoreScopeDefault to the bootstrap get bootstrap agent templates params +func (o *BootstrapGetBootstrapAgentTemplatesParams) SetIgnoreScopeDefault(ignoreScopeDefault *bool) { + o.IgnoreScopeDefault = ignoreScopeDefault +} + +// WithIsSSOUser adds the isSSOUser to the bootstrap get bootstrap agent templates params +func (o *BootstrapGetBootstrapAgentTemplatesParams) WithIsSSOUser(isSSOUser *bool) *BootstrapGetBootstrapAgentTemplatesParams { + o.SetIsSSOUser(isSSOUser) + return o +} + +// SetIsSSOUser adds the isSSOUser to the bootstrap get bootstrap agent templates params +func (o *BootstrapGetBootstrapAgentTemplatesParams) SetIsSSOUser(isSSOUser *bool) { + o.IsSSOUser = isSSOUser +} + +// WithLimit adds the limit to the bootstrap get bootstrap agent templates params +func (o *BootstrapGetBootstrapAgentTemplatesParams) WithLimit(limit *string) *BootstrapGetBootstrapAgentTemplatesParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the bootstrap get bootstrap agent templates params +func (o *BootstrapGetBootstrapAgentTemplatesParams) SetLimit(limit *string) { + o.Limit = limit +} + +// WithName adds the name to the bootstrap get bootstrap agent templates params +func (o *BootstrapGetBootstrapAgentTemplatesParams) WithName(name *string) *BootstrapGetBootstrapAgentTemplatesParams { + o.SetName(name) + return o +} + +// SetName adds the name to the bootstrap get bootstrap agent templates params +func (o *BootstrapGetBootstrapAgentTemplatesParams) SetName(name *string) { + o.Name = name +} + +// WithOffset adds the offset to the bootstrap get bootstrap agent templates params +func (o *BootstrapGetBootstrapAgentTemplatesParams) WithOffset(offset *string) *BootstrapGetBootstrapAgentTemplatesParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the bootstrap get bootstrap agent templates params +func (o *BootstrapGetBootstrapAgentTemplatesParams) SetOffset(offset *string) { + o.Offset = offset +} + +// WithOrder adds the order to the bootstrap get bootstrap agent templates params +func (o *BootstrapGetBootstrapAgentTemplatesParams) WithOrder(order *string) *BootstrapGetBootstrapAgentTemplatesParams { + o.SetOrder(order) + return o +} + +// SetOrder adds the order to the bootstrap get bootstrap agent templates params +func (o *BootstrapGetBootstrapAgentTemplatesParams) SetOrder(order *string) { + o.Order = order +} + +// WithOrderBy adds the orderBy to the bootstrap get bootstrap agent templates params +func (o *BootstrapGetBootstrapAgentTemplatesParams) WithOrderBy(orderBy *string) *BootstrapGetBootstrapAgentTemplatesParams { + o.SetOrderBy(orderBy) + return o +} + +// SetOrderBy adds the orderBy to the bootstrap get bootstrap agent templates params +func (o *BootstrapGetBootstrapAgentTemplatesParams) SetOrderBy(orderBy *string) { + o.OrderBy = orderBy +} + +// WithOrganizationID adds the organizationID to the bootstrap get bootstrap agent templates params +func (o *BootstrapGetBootstrapAgentTemplatesParams) WithOrganizationID(organizationID *string) *BootstrapGetBootstrapAgentTemplatesParams { + o.SetOrganizationID(organizationID) + return o +} + +// SetOrganizationID adds the organizationId to the bootstrap get bootstrap agent templates params +func (o *BootstrapGetBootstrapAgentTemplatesParams) SetOrganizationID(organizationID *string) { + o.OrganizationID = organizationID +} + +// WithPartnerID adds the partnerID to the bootstrap get bootstrap agent templates params +func (o *BootstrapGetBootstrapAgentTemplatesParams) WithPartnerID(partnerID *string) *BootstrapGetBootstrapAgentTemplatesParams { + o.SetPartnerID(partnerID) + return o +} + +// SetPartnerID adds the partnerId to the bootstrap get bootstrap agent templates params +func (o *BootstrapGetBootstrapAgentTemplatesParams) SetPartnerID(partnerID *string) { + o.PartnerID = partnerID +} + +// WithProjectID adds the projectID to the bootstrap get bootstrap agent templates params +func (o *BootstrapGetBootstrapAgentTemplatesParams) WithProjectID(projectID *string) *BootstrapGetBootstrapAgentTemplatesParams { + o.SetProjectID(projectID) + return o +} + +// SetProjectID adds the projectId to the bootstrap get bootstrap agent templates params +func (o *BootstrapGetBootstrapAgentTemplatesParams) SetProjectID(projectID *string) { + o.ProjectID = projectID +} + +// WithPublishedVersion adds the publishedVersion to the bootstrap get bootstrap agent templates params +func (o *BootstrapGetBootstrapAgentTemplatesParams) WithPublishedVersion(publishedVersion *string) *BootstrapGetBootstrapAgentTemplatesParams { + o.SetPublishedVersion(publishedVersion) + return o +} + +// SetPublishedVersion adds the publishedVersion to the bootstrap get bootstrap agent templates params +func (o *BootstrapGetBootstrapAgentTemplatesParams) SetPublishedVersion(publishedVersion *string) { + o.PublishedVersion = publishedVersion +} + +// WithSelector adds the selector to the bootstrap get bootstrap agent templates params +func (o *BootstrapGetBootstrapAgentTemplatesParams) WithSelector(selector *string) *BootstrapGetBootstrapAgentTemplatesParams { + o.SetSelector(selector) + return o +} + +// SetSelector adds the selector to the bootstrap get bootstrap agent templates params +func (o *BootstrapGetBootstrapAgentTemplatesParams) SetSelector(selector *string) { + o.Selector = selector +} + +// WithURLScope adds the uRLScope to the bootstrap get bootstrap agent templates params +func (o *BootstrapGetBootstrapAgentTemplatesParams) WithURLScope(uRLScope *string) *BootstrapGetBootstrapAgentTemplatesParams { + o.SetURLScope(uRLScope) + return o +} + +// SetURLScope adds the urlScope to the bootstrap get bootstrap agent templates params +func (o *BootstrapGetBootstrapAgentTemplatesParams) SetURLScope(uRLScope *string) { + o.URLScope = uRLScope +} + +// WithUsername adds the username to the bootstrap get bootstrap agent templates params +func (o *BootstrapGetBootstrapAgentTemplatesParams) WithUsername(username *string) *BootstrapGetBootstrapAgentTemplatesParams { + o.SetUsername(username) + return o +} + +// SetUsername adds the username to the bootstrap get bootstrap agent templates params +func (o *BootstrapGetBootstrapAgentTemplatesParams) SetUsername(username *string) { + o.Username = username +} + +// WriteToRequest writes these params to a swagger request +func (o *BootstrapGetBootstrapAgentTemplatesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.ID != nil { + + // query param ID + var qrID string + + if o.ID != nil { + qrID = *o.ID + } + qID := qrID + if qID != "" { + + if err := r.SetQueryParam("ID", qID); err != nil { + return err + } + } + } + + if o.BlueprintRef != nil { + + // query param blueprintRef + var qrBlueprintRef string + + if o.BlueprintRef != nil { + qrBlueprintRef = *o.BlueprintRef + } + qBlueprintRef := qrBlueprintRef + if qBlueprintRef != "" { + + if err := r.SetQueryParam("blueprintRef", qBlueprintRef); err != nil { + return err + } + } + } + + if o.ClusterID != nil { + + // query param clusterID + var qrClusterID string + + if o.ClusterID != nil { + qrClusterID = *o.ClusterID + } + qClusterID := qrClusterID + if qClusterID != "" { + + if err := r.SetQueryParam("clusterID", qClusterID); err != nil { + return err + } + } + } + + if o.Count != nil { + + // query param count + var qrCount string + + if o.Count != nil { + qrCount = *o.Count + } + qCount := qrCount + if qCount != "" { + + if err := r.SetQueryParam("count", qCount); err != nil { + return err + } + } + } + + if o.Deleted != nil { + + // query param deleted + var qrDeleted bool + + if o.Deleted != nil { + qrDeleted = *o.Deleted + } + qDeleted := swag.FormatBool(qrDeleted) + if qDeleted != "" { + + if err := r.SetQueryParam("deleted", qDeleted); err != nil { + return err + } + } + } + + if o.DisplayName != nil { + + // query param displayName + var qrDisplayName string + + if o.DisplayName != nil { + qrDisplayName = *o.DisplayName + } + qDisplayName := qrDisplayName + if qDisplayName != "" { + + if err := r.SetQueryParam("displayName", qDisplayName); err != nil { + return err + } + } + } + + if o.Extended != nil { + + // query param extended + var qrExtended bool + + if o.Extended != nil { + qrExtended = *o.Extended + } + qExtended := swag.FormatBool(qrExtended) + if qExtended != "" { + + if err := r.SetQueryParam("extended", qExtended); err != nil { + return err + } + } + } + + if o.GlobalScope != nil { + + // query param globalScope + var qrGlobalScope bool + + if o.GlobalScope != nil { + qrGlobalScope = *o.GlobalScope + } + qGlobalScope := swag.FormatBool(qrGlobalScope) + if qGlobalScope != "" { + + if err := r.SetQueryParam("globalScope", qGlobalScope); err != nil { + return err + } + } + } + + if o.Groups != nil { + + // binding items for groups + joinedGroups := o.bindParamGroups(reg) + + // query array param groups + if err := r.SetQueryParam("groups", joinedGroups...); err != nil { + return err + } + } + + if o.IgnoreScopeDefault != nil { + + // query param ignoreScopeDefault + var qrIgnoreScopeDefault bool + + if o.IgnoreScopeDefault != nil { + qrIgnoreScopeDefault = *o.IgnoreScopeDefault + } + qIgnoreScopeDefault := swag.FormatBool(qrIgnoreScopeDefault) + if qIgnoreScopeDefault != "" { + + if err := r.SetQueryParam("ignoreScopeDefault", qIgnoreScopeDefault); err != nil { + return err + } + } + } + + if o.IsSSOUser != nil { + + // query param isSSOUser + var qrIsSSOUser bool + + if o.IsSSOUser != nil { + qrIsSSOUser = *o.IsSSOUser + } + qIsSSOUser := swag.FormatBool(qrIsSSOUser) + if qIsSSOUser != "" { + + if err := r.SetQueryParam("isSSOUser", qIsSSOUser); err != nil { + return err + } + } + } + + if o.Limit != nil { + + // query param limit + var qrLimit string + + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := qrLimit + if qLimit != "" { + + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + } + + if o.Name != nil { + + // query param name + var qrName string + + if o.Name != nil { + qrName = *o.Name + } + qName := qrName + if qName != "" { + + if err := r.SetQueryParam("name", qName); err != nil { + return err + } + } + } + + if o.Offset != nil { + + // query param offset + var qrOffset string + + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := qrOffset + if qOffset != "" { + + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + } + + if o.Order != nil { + + // query param order + var qrOrder string + + if o.Order != nil { + qrOrder = *o.Order + } + qOrder := qrOrder + if qOrder != "" { + + if err := r.SetQueryParam("order", qOrder); err != nil { + return err + } + } + } + + if o.OrderBy != nil { + + // query param orderBy + var qrOrderBy string + + if o.OrderBy != nil { + qrOrderBy = *o.OrderBy + } + qOrderBy := qrOrderBy + if qOrderBy != "" { + + if err := r.SetQueryParam("orderBy", qOrderBy); err != nil { + return err + } + } + } + + if o.OrganizationID != nil { + + // query param organizationID + var qrOrganizationID string + + if o.OrganizationID != nil { + qrOrganizationID = *o.OrganizationID + } + qOrganizationID := qrOrganizationID + if qOrganizationID != "" { + + if err := r.SetQueryParam("organizationID", qOrganizationID); err != nil { + return err + } + } + } + + if o.PartnerID != nil { + + // query param partnerID + var qrPartnerID string + + if o.PartnerID != nil { + qrPartnerID = *o.PartnerID + } + qPartnerID := qrPartnerID + if qPartnerID != "" { + + if err := r.SetQueryParam("partnerID", qPartnerID); err != nil { + return err + } + } + } + + if o.ProjectID != nil { + + // query param projectID + var qrProjectID string + + if o.ProjectID != nil { + qrProjectID = *o.ProjectID + } + qProjectID := qrProjectID + if qProjectID != "" { + + if err := r.SetQueryParam("projectID", qProjectID); err != nil { + return err + } + } + } + + if o.PublishedVersion != nil { + + // query param publishedVersion + var qrPublishedVersion string + + if o.PublishedVersion != nil { + qrPublishedVersion = *o.PublishedVersion + } + qPublishedVersion := qrPublishedVersion + if qPublishedVersion != "" { + + if err := r.SetQueryParam("publishedVersion", qPublishedVersion); err != nil { + return err + } + } + } + + if o.Selector != nil { + + // query param selector + var qrSelector string + + if o.Selector != nil { + qrSelector = *o.Selector + } + qSelector := qrSelector + if qSelector != "" { + + if err := r.SetQueryParam("selector", qSelector); err != nil { + return err + } + } + } + + if o.URLScope != nil { + + // query param urlScope + var qrURLScope string + + if o.URLScope != nil { + qrURLScope = *o.URLScope + } + qURLScope := qrURLScope + if qURLScope != "" { + + if err := r.SetQueryParam("urlScope", qURLScope); err != nil { + return err + } + } + } + + if o.Username != nil { + + // query param username + var qrUsername string + + if o.Username != nil { + qrUsername = *o.Username + } + qUsername := qrUsername + if qUsername != "" { + + if err := r.SetQueryParam("username", qUsername); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// bindParamBootstrapGetBootstrapAgentTemplates binds the parameter groups +func (o *BootstrapGetBootstrapAgentTemplatesParams) bindParamGroups(formats strfmt.Registry) []string { + groupsIR := o.Groups + + var groupsIC []string + for _, groupsIIR := range groupsIR { // explode []string + + groupsIIV := groupsIIR // string as string + groupsIC = append(groupsIC, groupsIIV) + } + + // items.CollectionFormat: "multi" + groupsIS := swag.JoinByFormat(groupsIC, "multi") + + return groupsIS +} diff --git a/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_get_bootstrap_agent_templates_responses.go b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_get_bootstrap_agent_templates_responses.go new file mode 100644 index 0000000..e78edfc --- /dev/null +++ b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_get_bootstrap_agent_templates_responses.go @@ -0,0 +1,223 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package bootstrap + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/RafaySystems/rcloud-base/components/common/api/def/clients/sentry/models" +) + +// BootstrapGetBootstrapAgentTemplatesReader is a Reader for the BootstrapGetBootstrapAgentTemplates structure. +type BootstrapGetBootstrapAgentTemplatesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *BootstrapGetBootstrapAgentTemplatesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewBootstrapGetBootstrapAgentTemplatesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 403: + result := NewBootstrapGetBootstrapAgentTemplatesForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewBootstrapGetBootstrapAgentTemplatesNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewBootstrapGetBootstrapAgentTemplatesInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + result := NewBootstrapGetBootstrapAgentTemplatesDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewBootstrapGetBootstrapAgentTemplatesOK creates a BootstrapGetBootstrapAgentTemplatesOK with default headers values +func NewBootstrapGetBootstrapAgentTemplatesOK() *BootstrapGetBootstrapAgentTemplatesOK { + return &BootstrapGetBootstrapAgentTemplatesOK{} +} + +/* BootstrapGetBootstrapAgentTemplatesOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type BootstrapGetBootstrapAgentTemplatesOK struct { + Payload *models.SentryBootstrapAgentTemplateList +} + +func (o *BootstrapGetBootstrapAgentTemplatesOK) Error() string { + return fmt.Sprintf("[GET /v2/sentry/bootstrap/template][%d] bootstrapGetBootstrapAgentTemplatesOK %+v", 200, o.Payload) +} +func (o *BootstrapGetBootstrapAgentTemplatesOK) GetPayload() *models.SentryBootstrapAgentTemplateList { + return o.Payload +} + +func (o *BootstrapGetBootstrapAgentTemplatesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.SentryBootstrapAgentTemplateList) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBootstrapGetBootstrapAgentTemplatesForbidden creates a BootstrapGetBootstrapAgentTemplatesForbidden with default headers values +func NewBootstrapGetBootstrapAgentTemplatesForbidden() *BootstrapGetBootstrapAgentTemplatesForbidden { + return &BootstrapGetBootstrapAgentTemplatesForbidden{} +} + +/* BootstrapGetBootstrapAgentTemplatesForbidden describes a response with status code 403, with default header values. + +Returned when the user does not have permission to access the resource. +*/ +type BootstrapGetBootstrapAgentTemplatesForbidden struct { + Payload interface{} +} + +func (o *BootstrapGetBootstrapAgentTemplatesForbidden) Error() string { + return fmt.Sprintf("[GET /v2/sentry/bootstrap/template][%d] bootstrapGetBootstrapAgentTemplatesForbidden %+v", 403, o.Payload) +} +func (o *BootstrapGetBootstrapAgentTemplatesForbidden) GetPayload() interface{} { + return o.Payload +} + +func (o *BootstrapGetBootstrapAgentTemplatesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBootstrapGetBootstrapAgentTemplatesNotFound creates a BootstrapGetBootstrapAgentTemplatesNotFound with default headers values +func NewBootstrapGetBootstrapAgentTemplatesNotFound() *BootstrapGetBootstrapAgentTemplatesNotFound { + return &BootstrapGetBootstrapAgentTemplatesNotFound{} +} + +/* BootstrapGetBootstrapAgentTemplatesNotFound describes a response with status code 404, with default header values. + +Returned when the resource does not exist. +*/ +type BootstrapGetBootstrapAgentTemplatesNotFound struct { + Payload interface{} +} + +func (o *BootstrapGetBootstrapAgentTemplatesNotFound) Error() string { + return fmt.Sprintf("[GET /v2/sentry/bootstrap/template][%d] bootstrapGetBootstrapAgentTemplatesNotFound %+v", 404, o.Payload) +} +func (o *BootstrapGetBootstrapAgentTemplatesNotFound) GetPayload() interface{} { + return o.Payload +} + +func (o *BootstrapGetBootstrapAgentTemplatesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBootstrapGetBootstrapAgentTemplatesInternalServerError creates a BootstrapGetBootstrapAgentTemplatesInternalServerError with default headers values +func NewBootstrapGetBootstrapAgentTemplatesInternalServerError() *BootstrapGetBootstrapAgentTemplatesInternalServerError { + return &BootstrapGetBootstrapAgentTemplatesInternalServerError{} +} + +/* BootstrapGetBootstrapAgentTemplatesInternalServerError describes a response with status code 500, with default header values. + +Returned for internal server error +*/ +type BootstrapGetBootstrapAgentTemplatesInternalServerError struct { + Payload interface{} +} + +func (o *BootstrapGetBootstrapAgentTemplatesInternalServerError) Error() string { + return fmt.Sprintf("[GET /v2/sentry/bootstrap/template][%d] bootstrapGetBootstrapAgentTemplatesInternalServerError %+v", 500, o.Payload) +} +func (o *BootstrapGetBootstrapAgentTemplatesInternalServerError) GetPayload() interface{} { + return o.Payload +} + +func (o *BootstrapGetBootstrapAgentTemplatesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBootstrapGetBootstrapAgentTemplatesDefault creates a BootstrapGetBootstrapAgentTemplatesDefault with default headers values +func NewBootstrapGetBootstrapAgentTemplatesDefault(code int) *BootstrapGetBootstrapAgentTemplatesDefault { + return &BootstrapGetBootstrapAgentTemplatesDefault{ + _statusCode: code, + } +} + +/* BootstrapGetBootstrapAgentTemplatesDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type BootstrapGetBootstrapAgentTemplatesDefault struct { + _statusCode int + + Payload *models.GooglerpcStatus +} + +// Code gets the status code for the bootstrap get bootstrap agent templates default response +func (o *BootstrapGetBootstrapAgentTemplatesDefault) Code() int { + return o._statusCode +} + +func (o *BootstrapGetBootstrapAgentTemplatesDefault) Error() string { + return fmt.Sprintf("[GET /v2/sentry/bootstrap/template][%d] Bootstrap_GetBootstrapAgentTemplates default %+v", o._statusCode, o.Payload) +} +func (o *BootstrapGetBootstrapAgentTemplatesDefault) GetPayload() *models.GooglerpcStatus { + return o.Payload +} + +func (o *BootstrapGetBootstrapAgentTemplatesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.GooglerpcStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_get_bootstrap_agents_parameters.go b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_get_bootstrap_agents_parameters.go new file mode 100644 index 0000000..1eb99d9 --- /dev/null +++ b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_get_bootstrap_agents_parameters.go @@ -0,0 +1,897 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package bootstrap + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewBootstrapGetBootstrapAgentsParams creates a new BootstrapGetBootstrapAgentsParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewBootstrapGetBootstrapAgentsParams() *BootstrapGetBootstrapAgentsParams { + return &BootstrapGetBootstrapAgentsParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewBootstrapGetBootstrapAgentsParamsWithTimeout creates a new BootstrapGetBootstrapAgentsParams object +// with the ability to set a timeout on a request. +func NewBootstrapGetBootstrapAgentsParamsWithTimeout(timeout time.Duration) *BootstrapGetBootstrapAgentsParams { + return &BootstrapGetBootstrapAgentsParams{ + timeout: timeout, + } +} + +// NewBootstrapGetBootstrapAgentsParamsWithContext creates a new BootstrapGetBootstrapAgentsParams object +// with the ability to set a context for a request. +func NewBootstrapGetBootstrapAgentsParamsWithContext(ctx context.Context) *BootstrapGetBootstrapAgentsParams { + return &BootstrapGetBootstrapAgentsParams{ + Context: ctx, + } +} + +// NewBootstrapGetBootstrapAgentsParamsWithHTTPClient creates a new BootstrapGetBootstrapAgentsParams object +// with the ability to set a custom HTTPClient for a request. +func NewBootstrapGetBootstrapAgentsParamsWithHTTPClient(client *http.Client) *BootstrapGetBootstrapAgentsParams { + return &BootstrapGetBootstrapAgentsParams{ + HTTPClient: client, + } +} + +/* BootstrapGetBootstrapAgentsParams contains all the parameters to send to the API endpoint + for the bootstrap get bootstrap agents operation. + + Typically these are written to a http.Request. +*/ +type BootstrapGetBootstrapAgentsParams struct { + + // OptsID. + OptsID *string + + // OptsBlueprintRef. + OptsBlueprintRef *string + + // OptsClusterID. + OptsClusterID *string + + // OptsCount. + // + // Format: int64 + OptsCount *string + + // OptsDeleted. + OptsDeleted *bool + + /* OptsDisplayName. + + displayName only used for update queries to set displayName (READONLY). + */ + OptsDisplayName *string + + // OptsExtended. + OptsExtended *bool + + /* OptsGlobalScope. + + globalScope sets partnerID,organizationID,projectID = 0. + */ + OptsGlobalScope *bool + + // OptsGroups. + OptsGroups []string + + /* OptsIgnoreScopeDefault. + + ignoreScopeDefault ignores default values for partnerID, organizationID and + projectID. + */ + OptsIgnoreScopeDefault *bool + + // OptsIsSSOUser. + OptsIsSSOUser *bool + + // OptsLimit. + // + // Format: int64 + OptsLimit *string + + /* OptsName. + + name is unique ID of a resource along with (partnerID, organizationID, + projectID). + */ + OptsName *string + + // OptsOffset. + // + // Format: int64 + OptsOffset *string + + // OptsOrder. + OptsOrder *string + + // OptsOrderBy. + OptsOrderBy *string + + // OptsOrganizationID. + OptsOrganizationID *string + + // OptsPartnerID. + OptsPartnerID *string + + // OptsProjectID. + OptsProjectID *string + + // OptsPublishedVersion. + OptsPublishedVersion *string + + /* OptsSelector. + + selector is used to filter the labels of a resource. + */ + OptsSelector *string + + /* OptsURLScope. + + urlScope is supposed to be passed in the URL as kind/HashID(value). + */ + OptsURLScope *string + + // OptsUsername. + OptsUsername *string + + // TemplateScope. + TemplateScope string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the bootstrap get bootstrap agents params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BootstrapGetBootstrapAgentsParams) WithDefaults() *BootstrapGetBootstrapAgentsParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the bootstrap get bootstrap agents params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BootstrapGetBootstrapAgentsParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the bootstrap get bootstrap agents params +func (o *BootstrapGetBootstrapAgentsParams) WithTimeout(timeout time.Duration) *BootstrapGetBootstrapAgentsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the bootstrap get bootstrap agents params +func (o *BootstrapGetBootstrapAgentsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the bootstrap get bootstrap agents params +func (o *BootstrapGetBootstrapAgentsParams) WithContext(ctx context.Context) *BootstrapGetBootstrapAgentsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the bootstrap get bootstrap agents params +func (o *BootstrapGetBootstrapAgentsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the bootstrap get bootstrap agents params +func (o *BootstrapGetBootstrapAgentsParams) WithHTTPClient(client *http.Client) *BootstrapGetBootstrapAgentsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the bootstrap get bootstrap agents params +func (o *BootstrapGetBootstrapAgentsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithOptsID adds the optsID to the bootstrap get bootstrap agents params +func (o *BootstrapGetBootstrapAgentsParams) WithOptsID(optsID *string) *BootstrapGetBootstrapAgentsParams { + o.SetOptsID(optsID) + return o +} + +// SetOptsID adds the optsId to the bootstrap get bootstrap agents params +func (o *BootstrapGetBootstrapAgentsParams) SetOptsID(optsID *string) { + o.OptsID = optsID +} + +// WithOptsBlueprintRef adds the optsBlueprintRef to the bootstrap get bootstrap agents params +func (o *BootstrapGetBootstrapAgentsParams) WithOptsBlueprintRef(optsBlueprintRef *string) *BootstrapGetBootstrapAgentsParams { + o.SetOptsBlueprintRef(optsBlueprintRef) + return o +} + +// SetOptsBlueprintRef adds the optsBlueprintRef to the bootstrap get bootstrap agents params +func (o *BootstrapGetBootstrapAgentsParams) SetOptsBlueprintRef(optsBlueprintRef *string) { + o.OptsBlueprintRef = optsBlueprintRef +} + +// WithOptsClusterID adds the optsClusterID to the bootstrap get bootstrap agents params +func (o *BootstrapGetBootstrapAgentsParams) WithOptsClusterID(optsClusterID *string) *BootstrapGetBootstrapAgentsParams { + o.SetOptsClusterID(optsClusterID) + return o +} + +// SetOptsClusterID adds the optsClusterId to the bootstrap get bootstrap agents params +func (o *BootstrapGetBootstrapAgentsParams) SetOptsClusterID(optsClusterID *string) { + o.OptsClusterID = optsClusterID +} + +// WithOptsCount adds the optsCount to the bootstrap get bootstrap agents params +func (o *BootstrapGetBootstrapAgentsParams) WithOptsCount(optsCount *string) *BootstrapGetBootstrapAgentsParams { + o.SetOptsCount(optsCount) + return o +} + +// SetOptsCount adds the optsCount to the bootstrap get bootstrap agents params +func (o *BootstrapGetBootstrapAgentsParams) SetOptsCount(optsCount *string) { + o.OptsCount = optsCount +} + +// WithOptsDeleted adds the optsDeleted to the bootstrap get bootstrap agents params +func (o *BootstrapGetBootstrapAgentsParams) WithOptsDeleted(optsDeleted *bool) *BootstrapGetBootstrapAgentsParams { + o.SetOptsDeleted(optsDeleted) + return o +} + +// SetOptsDeleted adds the optsDeleted to the bootstrap get bootstrap agents params +func (o *BootstrapGetBootstrapAgentsParams) SetOptsDeleted(optsDeleted *bool) { + o.OptsDeleted = optsDeleted +} + +// WithOptsDisplayName adds the optsDisplayName to the bootstrap get bootstrap agents params +func (o *BootstrapGetBootstrapAgentsParams) WithOptsDisplayName(optsDisplayName *string) *BootstrapGetBootstrapAgentsParams { + o.SetOptsDisplayName(optsDisplayName) + return o +} + +// SetOptsDisplayName adds the optsDisplayName to the bootstrap get bootstrap agents params +func (o *BootstrapGetBootstrapAgentsParams) SetOptsDisplayName(optsDisplayName *string) { + o.OptsDisplayName = optsDisplayName +} + +// WithOptsExtended adds the optsExtended to the bootstrap get bootstrap agents params +func (o *BootstrapGetBootstrapAgentsParams) WithOptsExtended(optsExtended *bool) *BootstrapGetBootstrapAgentsParams { + o.SetOptsExtended(optsExtended) + return o +} + +// SetOptsExtended adds the optsExtended to the bootstrap get bootstrap agents params +func (o *BootstrapGetBootstrapAgentsParams) SetOptsExtended(optsExtended *bool) { + o.OptsExtended = optsExtended +} + +// WithOptsGlobalScope adds the optsGlobalScope to the bootstrap get bootstrap agents params +func (o *BootstrapGetBootstrapAgentsParams) WithOptsGlobalScope(optsGlobalScope *bool) *BootstrapGetBootstrapAgentsParams { + o.SetOptsGlobalScope(optsGlobalScope) + return o +} + +// SetOptsGlobalScope adds the optsGlobalScope to the bootstrap get bootstrap agents params +func (o *BootstrapGetBootstrapAgentsParams) SetOptsGlobalScope(optsGlobalScope *bool) { + o.OptsGlobalScope = optsGlobalScope +} + +// WithOptsGroups adds the optsGroups to the bootstrap get bootstrap agents params +func (o *BootstrapGetBootstrapAgentsParams) WithOptsGroups(optsGroups []string) *BootstrapGetBootstrapAgentsParams { + o.SetOptsGroups(optsGroups) + return o +} + +// SetOptsGroups adds the optsGroups to the bootstrap get bootstrap agents params +func (o *BootstrapGetBootstrapAgentsParams) SetOptsGroups(optsGroups []string) { + o.OptsGroups = optsGroups +} + +// WithOptsIgnoreScopeDefault adds the optsIgnoreScopeDefault to the bootstrap get bootstrap agents params +func (o *BootstrapGetBootstrapAgentsParams) WithOptsIgnoreScopeDefault(optsIgnoreScopeDefault *bool) *BootstrapGetBootstrapAgentsParams { + o.SetOptsIgnoreScopeDefault(optsIgnoreScopeDefault) + return o +} + +// SetOptsIgnoreScopeDefault adds the optsIgnoreScopeDefault to the bootstrap get bootstrap agents params +func (o *BootstrapGetBootstrapAgentsParams) SetOptsIgnoreScopeDefault(optsIgnoreScopeDefault *bool) { + o.OptsIgnoreScopeDefault = optsIgnoreScopeDefault +} + +// WithOptsIsSSOUser adds the optsIsSSOUser to the bootstrap get bootstrap agents params +func (o *BootstrapGetBootstrapAgentsParams) WithOptsIsSSOUser(optsIsSSOUser *bool) *BootstrapGetBootstrapAgentsParams { + o.SetOptsIsSSOUser(optsIsSSOUser) + return o +} + +// SetOptsIsSSOUser adds the optsIsSSOUser to the bootstrap get bootstrap agents params +func (o *BootstrapGetBootstrapAgentsParams) SetOptsIsSSOUser(optsIsSSOUser *bool) { + o.OptsIsSSOUser = optsIsSSOUser +} + +// WithOptsLimit adds the optsLimit to the bootstrap get bootstrap agents params +func (o *BootstrapGetBootstrapAgentsParams) WithOptsLimit(optsLimit *string) *BootstrapGetBootstrapAgentsParams { + o.SetOptsLimit(optsLimit) + return o +} + +// SetOptsLimit adds the optsLimit to the bootstrap get bootstrap agents params +func (o *BootstrapGetBootstrapAgentsParams) SetOptsLimit(optsLimit *string) { + o.OptsLimit = optsLimit +} + +// WithOptsName adds the optsName to the bootstrap get bootstrap agents params +func (o *BootstrapGetBootstrapAgentsParams) WithOptsName(optsName *string) *BootstrapGetBootstrapAgentsParams { + o.SetOptsName(optsName) + return o +} + +// SetOptsName adds the optsName to the bootstrap get bootstrap agents params +func (o *BootstrapGetBootstrapAgentsParams) SetOptsName(optsName *string) { + o.OptsName = optsName +} + +// WithOptsOffset adds the optsOffset to the bootstrap get bootstrap agents params +func (o *BootstrapGetBootstrapAgentsParams) WithOptsOffset(optsOffset *string) *BootstrapGetBootstrapAgentsParams { + o.SetOptsOffset(optsOffset) + return o +} + +// SetOptsOffset adds the optsOffset to the bootstrap get bootstrap agents params +func (o *BootstrapGetBootstrapAgentsParams) SetOptsOffset(optsOffset *string) { + o.OptsOffset = optsOffset +} + +// WithOptsOrder adds the optsOrder to the bootstrap get bootstrap agents params +func (o *BootstrapGetBootstrapAgentsParams) WithOptsOrder(optsOrder *string) *BootstrapGetBootstrapAgentsParams { + o.SetOptsOrder(optsOrder) + return o +} + +// SetOptsOrder adds the optsOrder to the bootstrap get bootstrap agents params +func (o *BootstrapGetBootstrapAgentsParams) SetOptsOrder(optsOrder *string) { + o.OptsOrder = optsOrder +} + +// WithOptsOrderBy adds the optsOrderBy to the bootstrap get bootstrap agents params +func (o *BootstrapGetBootstrapAgentsParams) WithOptsOrderBy(optsOrderBy *string) *BootstrapGetBootstrapAgentsParams { + o.SetOptsOrderBy(optsOrderBy) + return o +} + +// SetOptsOrderBy adds the optsOrderBy to the bootstrap get bootstrap agents params +func (o *BootstrapGetBootstrapAgentsParams) SetOptsOrderBy(optsOrderBy *string) { + o.OptsOrderBy = optsOrderBy +} + +// WithOptsOrganizationID adds the optsOrganizationID to the bootstrap get bootstrap agents params +func (o *BootstrapGetBootstrapAgentsParams) WithOptsOrganizationID(optsOrganizationID *string) *BootstrapGetBootstrapAgentsParams { + o.SetOptsOrganizationID(optsOrganizationID) + return o +} + +// SetOptsOrganizationID adds the optsOrganizationId to the bootstrap get bootstrap agents params +func (o *BootstrapGetBootstrapAgentsParams) SetOptsOrganizationID(optsOrganizationID *string) { + o.OptsOrganizationID = optsOrganizationID +} + +// WithOptsPartnerID adds the optsPartnerID to the bootstrap get bootstrap agents params +func (o *BootstrapGetBootstrapAgentsParams) WithOptsPartnerID(optsPartnerID *string) *BootstrapGetBootstrapAgentsParams { + o.SetOptsPartnerID(optsPartnerID) + return o +} + +// SetOptsPartnerID adds the optsPartnerId to the bootstrap get bootstrap agents params +func (o *BootstrapGetBootstrapAgentsParams) SetOptsPartnerID(optsPartnerID *string) { + o.OptsPartnerID = optsPartnerID +} + +// WithOptsProjectID adds the optsProjectID to the bootstrap get bootstrap agents params +func (o *BootstrapGetBootstrapAgentsParams) WithOptsProjectID(optsProjectID *string) *BootstrapGetBootstrapAgentsParams { + o.SetOptsProjectID(optsProjectID) + return o +} + +// SetOptsProjectID adds the optsProjectId to the bootstrap get bootstrap agents params +func (o *BootstrapGetBootstrapAgentsParams) SetOptsProjectID(optsProjectID *string) { + o.OptsProjectID = optsProjectID +} + +// WithOptsPublishedVersion adds the optsPublishedVersion to the bootstrap get bootstrap agents params +func (o *BootstrapGetBootstrapAgentsParams) WithOptsPublishedVersion(optsPublishedVersion *string) *BootstrapGetBootstrapAgentsParams { + o.SetOptsPublishedVersion(optsPublishedVersion) + return o +} + +// SetOptsPublishedVersion adds the optsPublishedVersion to the bootstrap get bootstrap agents params +func (o *BootstrapGetBootstrapAgentsParams) SetOptsPublishedVersion(optsPublishedVersion *string) { + o.OptsPublishedVersion = optsPublishedVersion +} + +// WithOptsSelector adds the optsSelector to the bootstrap get bootstrap agents params +func (o *BootstrapGetBootstrapAgentsParams) WithOptsSelector(optsSelector *string) *BootstrapGetBootstrapAgentsParams { + o.SetOptsSelector(optsSelector) + return o +} + +// SetOptsSelector adds the optsSelector to the bootstrap get bootstrap agents params +func (o *BootstrapGetBootstrapAgentsParams) SetOptsSelector(optsSelector *string) { + o.OptsSelector = optsSelector +} + +// WithOptsURLScope adds the optsURLScope to the bootstrap get bootstrap agents params +func (o *BootstrapGetBootstrapAgentsParams) WithOptsURLScope(optsURLScope *string) *BootstrapGetBootstrapAgentsParams { + o.SetOptsURLScope(optsURLScope) + return o +} + +// SetOptsURLScope adds the optsUrlScope to the bootstrap get bootstrap agents params +func (o *BootstrapGetBootstrapAgentsParams) SetOptsURLScope(optsURLScope *string) { + o.OptsURLScope = optsURLScope +} + +// WithOptsUsername adds the optsUsername to the bootstrap get bootstrap agents params +func (o *BootstrapGetBootstrapAgentsParams) WithOptsUsername(optsUsername *string) *BootstrapGetBootstrapAgentsParams { + o.SetOptsUsername(optsUsername) + return o +} + +// SetOptsUsername adds the optsUsername to the bootstrap get bootstrap agents params +func (o *BootstrapGetBootstrapAgentsParams) SetOptsUsername(optsUsername *string) { + o.OptsUsername = optsUsername +} + +// WithTemplateScope adds the templateScope to the bootstrap get bootstrap agents params +func (o *BootstrapGetBootstrapAgentsParams) WithTemplateScope(templateScope string) *BootstrapGetBootstrapAgentsParams { + o.SetTemplateScope(templateScope) + return o +} + +// SetTemplateScope adds the templateScope to the bootstrap get bootstrap agents params +func (o *BootstrapGetBootstrapAgentsParams) SetTemplateScope(templateScope string) { + o.TemplateScope = templateScope +} + +// WriteToRequest writes these params to a swagger request +func (o *BootstrapGetBootstrapAgentsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.OptsID != nil { + + // query param opts.ID + var qrOptsID string + + if o.OptsID != nil { + qrOptsID = *o.OptsID + } + qOptsID := qrOptsID + if qOptsID != "" { + + if err := r.SetQueryParam("opts.ID", qOptsID); err != nil { + return err + } + } + } + + if o.OptsBlueprintRef != nil { + + // query param opts.blueprintRef + var qrOptsBlueprintRef string + + if o.OptsBlueprintRef != nil { + qrOptsBlueprintRef = *o.OptsBlueprintRef + } + qOptsBlueprintRef := qrOptsBlueprintRef + if qOptsBlueprintRef != "" { + + if err := r.SetQueryParam("opts.blueprintRef", qOptsBlueprintRef); err != nil { + return err + } + } + } + + if o.OptsClusterID != nil { + + // query param opts.clusterID + var qrOptsClusterID string + + if o.OptsClusterID != nil { + qrOptsClusterID = *o.OptsClusterID + } + qOptsClusterID := qrOptsClusterID + if qOptsClusterID != "" { + + if err := r.SetQueryParam("opts.clusterID", qOptsClusterID); err != nil { + return err + } + } + } + + if o.OptsCount != nil { + + // query param opts.count + var qrOptsCount string + + if o.OptsCount != nil { + qrOptsCount = *o.OptsCount + } + qOptsCount := qrOptsCount + if qOptsCount != "" { + + if err := r.SetQueryParam("opts.count", qOptsCount); err != nil { + return err + } + } + } + + if o.OptsDeleted != nil { + + // query param opts.deleted + var qrOptsDeleted bool + + if o.OptsDeleted != nil { + qrOptsDeleted = *o.OptsDeleted + } + qOptsDeleted := swag.FormatBool(qrOptsDeleted) + if qOptsDeleted != "" { + + if err := r.SetQueryParam("opts.deleted", qOptsDeleted); err != nil { + return err + } + } + } + + if o.OptsDisplayName != nil { + + // query param opts.displayName + var qrOptsDisplayName string + + if o.OptsDisplayName != nil { + qrOptsDisplayName = *o.OptsDisplayName + } + qOptsDisplayName := qrOptsDisplayName + if qOptsDisplayName != "" { + + if err := r.SetQueryParam("opts.displayName", qOptsDisplayName); err != nil { + return err + } + } + } + + if o.OptsExtended != nil { + + // query param opts.extended + var qrOptsExtended bool + + if o.OptsExtended != nil { + qrOptsExtended = *o.OptsExtended + } + qOptsExtended := swag.FormatBool(qrOptsExtended) + if qOptsExtended != "" { + + if err := r.SetQueryParam("opts.extended", qOptsExtended); err != nil { + return err + } + } + } + + if o.OptsGlobalScope != nil { + + // query param opts.globalScope + var qrOptsGlobalScope bool + + if o.OptsGlobalScope != nil { + qrOptsGlobalScope = *o.OptsGlobalScope + } + qOptsGlobalScope := swag.FormatBool(qrOptsGlobalScope) + if qOptsGlobalScope != "" { + + if err := r.SetQueryParam("opts.globalScope", qOptsGlobalScope); err != nil { + return err + } + } + } + + if o.OptsGroups != nil { + + // binding items for opts.groups + joinedOptsGroups := o.bindParamOptsGroups(reg) + + // query array param opts.groups + if err := r.SetQueryParam("opts.groups", joinedOptsGroups...); err != nil { + return err + } + } + + if o.OptsIgnoreScopeDefault != nil { + + // query param opts.ignoreScopeDefault + var qrOptsIgnoreScopeDefault bool + + if o.OptsIgnoreScopeDefault != nil { + qrOptsIgnoreScopeDefault = *o.OptsIgnoreScopeDefault + } + qOptsIgnoreScopeDefault := swag.FormatBool(qrOptsIgnoreScopeDefault) + if qOptsIgnoreScopeDefault != "" { + + if err := r.SetQueryParam("opts.ignoreScopeDefault", qOptsIgnoreScopeDefault); err != nil { + return err + } + } + } + + if o.OptsIsSSOUser != nil { + + // query param opts.isSSOUser + var qrOptsIsSSOUser bool + + if o.OptsIsSSOUser != nil { + qrOptsIsSSOUser = *o.OptsIsSSOUser + } + qOptsIsSSOUser := swag.FormatBool(qrOptsIsSSOUser) + if qOptsIsSSOUser != "" { + + if err := r.SetQueryParam("opts.isSSOUser", qOptsIsSSOUser); err != nil { + return err + } + } + } + + if o.OptsLimit != nil { + + // query param opts.limit + var qrOptsLimit string + + if o.OptsLimit != nil { + qrOptsLimit = *o.OptsLimit + } + qOptsLimit := qrOptsLimit + if qOptsLimit != "" { + + if err := r.SetQueryParam("opts.limit", qOptsLimit); err != nil { + return err + } + } + } + + if o.OptsName != nil { + + // query param opts.name + var qrOptsName string + + if o.OptsName != nil { + qrOptsName = *o.OptsName + } + qOptsName := qrOptsName + if qOptsName != "" { + + if err := r.SetQueryParam("opts.name", qOptsName); err != nil { + return err + } + } + } + + if o.OptsOffset != nil { + + // query param opts.offset + var qrOptsOffset string + + if o.OptsOffset != nil { + qrOptsOffset = *o.OptsOffset + } + qOptsOffset := qrOptsOffset + if qOptsOffset != "" { + + if err := r.SetQueryParam("opts.offset", qOptsOffset); err != nil { + return err + } + } + } + + if o.OptsOrder != nil { + + // query param opts.order + var qrOptsOrder string + + if o.OptsOrder != nil { + qrOptsOrder = *o.OptsOrder + } + qOptsOrder := qrOptsOrder + if qOptsOrder != "" { + + if err := r.SetQueryParam("opts.order", qOptsOrder); err != nil { + return err + } + } + } + + if o.OptsOrderBy != nil { + + // query param opts.orderBy + var qrOptsOrderBy string + + if o.OptsOrderBy != nil { + qrOptsOrderBy = *o.OptsOrderBy + } + qOptsOrderBy := qrOptsOrderBy + if qOptsOrderBy != "" { + + if err := r.SetQueryParam("opts.orderBy", qOptsOrderBy); err != nil { + return err + } + } + } + + if o.OptsOrganizationID != nil { + + // query param opts.organizationID + var qrOptsOrganizationID string + + if o.OptsOrganizationID != nil { + qrOptsOrganizationID = *o.OptsOrganizationID + } + qOptsOrganizationID := qrOptsOrganizationID + if qOptsOrganizationID != "" { + + if err := r.SetQueryParam("opts.organizationID", qOptsOrganizationID); err != nil { + return err + } + } + } + + if o.OptsPartnerID != nil { + + // query param opts.partnerID + var qrOptsPartnerID string + + if o.OptsPartnerID != nil { + qrOptsPartnerID = *o.OptsPartnerID + } + qOptsPartnerID := qrOptsPartnerID + if qOptsPartnerID != "" { + + if err := r.SetQueryParam("opts.partnerID", qOptsPartnerID); err != nil { + return err + } + } + } + + if o.OptsProjectID != nil { + + // query param opts.projectID + var qrOptsProjectID string + + if o.OptsProjectID != nil { + qrOptsProjectID = *o.OptsProjectID + } + qOptsProjectID := qrOptsProjectID + if qOptsProjectID != "" { + + if err := r.SetQueryParam("opts.projectID", qOptsProjectID); err != nil { + return err + } + } + } + + if o.OptsPublishedVersion != nil { + + // query param opts.publishedVersion + var qrOptsPublishedVersion string + + if o.OptsPublishedVersion != nil { + qrOptsPublishedVersion = *o.OptsPublishedVersion + } + qOptsPublishedVersion := qrOptsPublishedVersion + if qOptsPublishedVersion != "" { + + if err := r.SetQueryParam("opts.publishedVersion", qOptsPublishedVersion); err != nil { + return err + } + } + } + + if o.OptsSelector != nil { + + // query param opts.selector + var qrOptsSelector string + + if o.OptsSelector != nil { + qrOptsSelector = *o.OptsSelector + } + qOptsSelector := qrOptsSelector + if qOptsSelector != "" { + + if err := r.SetQueryParam("opts.selector", qOptsSelector); err != nil { + return err + } + } + } + + if o.OptsURLScope != nil { + + // query param opts.urlScope + var qrOptsURLScope string + + if o.OptsURLScope != nil { + qrOptsURLScope = *o.OptsURLScope + } + qOptsURLScope := qrOptsURLScope + if qOptsURLScope != "" { + + if err := r.SetQueryParam("opts.urlScope", qOptsURLScope); err != nil { + return err + } + } + } + + if o.OptsUsername != nil { + + // query param opts.username + var qrOptsUsername string + + if o.OptsUsername != nil { + qrOptsUsername = *o.OptsUsername + } + qOptsUsername := qrOptsUsername + if qOptsUsername != "" { + + if err := r.SetQueryParam("opts.username", qOptsUsername); err != nil { + return err + } + } + } + + // path param templateScope + if err := r.SetPathParam("templateScope", o.TemplateScope); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// bindParamBootstrapGetBootstrapAgents binds the parameter opts.groups +func (o *BootstrapGetBootstrapAgentsParams) bindParamOptsGroups(formats strfmt.Registry) []string { + optsGroupsIR := o.OptsGroups + + var optsGroupsIC []string + for _, optsGroupsIIR := range optsGroupsIR { // explode []string + + optsGroupsIIV := optsGroupsIIR // string as string + optsGroupsIC = append(optsGroupsIC, optsGroupsIIV) + } + + // items.CollectionFormat: "multi" + optsGroupsIS := swag.JoinByFormat(optsGroupsIC, "multi") + + return optsGroupsIS +} diff --git a/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_get_bootstrap_agents_responses.go b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_get_bootstrap_agents_responses.go new file mode 100644 index 0000000..7c78e80 --- /dev/null +++ b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_get_bootstrap_agents_responses.go @@ -0,0 +1,223 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package bootstrap + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/RafaySystems/rcloud-base/components/common/api/def/clients/sentry/models" +) + +// BootstrapGetBootstrapAgentsReader is a Reader for the BootstrapGetBootstrapAgents structure. +type BootstrapGetBootstrapAgentsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *BootstrapGetBootstrapAgentsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewBootstrapGetBootstrapAgentsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 403: + result := NewBootstrapGetBootstrapAgentsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewBootstrapGetBootstrapAgentsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewBootstrapGetBootstrapAgentsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + result := NewBootstrapGetBootstrapAgentsDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewBootstrapGetBootstrapAgentsOK creates a BootstrapGetBootstrapAgentsOK with default headers values +func NewBootstrapGetBootstrapAgentsOK() *BootstrapGetBootstrapAgentsOK { + return &BootstrapGetBootstrapAgentsOK{} +} + +/* BootstrapGetBootstrapAgentsOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type BootstrapGetBootstrapAgentsOK struct { + Payload *models.SentryBootstrapAgentList +} + +func (o *BootstrapGetBootstrapAgentsOK) Error() string { + return fmt.Sprintf("[GET /v2/sentry/bootstrap/{templateScope}/agent][%d] bootstrapGetBootstrapAgentsOK %+v", 200, o.Payload) +} +func (o *BootstrapGetBootstrapAgentsOK) GetPayload() *models.SentryBootstrapAgentList { + return o.Payload +} + +func (o *BootstrapGetBootstrapAgentsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.SentryBootstrapAgentList) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBootstrapGetBootstrapAgentsForbidden creates a BootstrapGetBootstrapAgentsForbidden with default headers values +func NewBootstrapGetBootstrapAgentsForbidden() *BootstrapGetBootstrapAgentsForbidden { + return &BootstrapGetBootstrapAgentsForbidden{} +} + +/* BootstrapGetBootstrapAgentsForbidden describes a response with status code 403, with default header values. + +Returned when the user does not have permission to access the resource. +*/ +type BootstrapGetBootstrapAgentsForbidden struct { + Payload interface{} +} + +func (o *BootstrapGetBootstrapAgentsForbidden) Error() string { + return fmt.Sprintf("[GET /v2/sentry/bootstrap/{templateScope}/agent][%d] bootstrapGetBootstrapAgentsForbidden %+v", 403, o.Payload) +} +func (o *BootstrapGetBootstrapAgentsForbidden) GetPayload() interface{} { + return o.Payload +} + +func (o *BootstrapGetBootstrapAgentsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBootstrapGetBootstrapAgentsNotFound creates a BootstrapGetBootstrapAgentsNotFound with default headers values +func NewBootstrapGetBootstrapAgentsNotFound() *BootstrapGetBootstrapAgentsNotFound { + return &BootstrapGetBootstrapAgentsNotFound{} +} + +/* BootstrapGetBootstrapAgentsNotFound describes a response with status code 404, with default header values. + +Returned when the resource does not exist. +*/ +type BootstrapGetBootstrapAgentsNotFound struct { + Payload interface{} +} + +func (o *BootstrapGetBootstrapAgentsNotFound) Error() string { + return fmt.Sprintf("[GET /v2/sentry/bootstrap/{templateScope}/agent][%d] bootstrapGetBootstrapAgentsNotFound %+v", 404, o.Payload) +} +func (o *BootstrapGetBootstrapAgentsNotFound) GetPayload() interface{} { + return o.Payload +} + +func (o *BootstrapGetBootstrapAgentsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBootstrapGetBootstrapAgentsInternalServerError creates a BootstrapGetBootstrapAgentsInternalServerError with default headers values +func NewBootstrapGetBootstrapAgentsInternalServerError() *BootstrapGetBootstrapAgentsInternalServerError { + return &BootstrapGetBootstrapAgentsInternalServerError{} +} + +/* BootstrapGetBootstrapAgentsInternalServerError describes a response with status code 500, with default header values. + +Returned for internal server error +*/ +type BootstrapGetBootstrapAgentsInternalServerError struct { + Payload interface{} +} + +func (o *BootstrapGetBootstrapAgentsInternalServerError) Error() string { + return fmt.Sprintf("[GET /v2/sentry/bootstrap/{templateScope}/agent][%d] bootstrapGetBootstrapAgentsInternalServerError %+v", 500, o.Payload) +} +func (o *BootstrapGetBootstrapAgentsInternalServerError) GetPayload() interface{} { + return o.Payload +} + +func (o *BootstrapGetBootstrapAgentsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBootstrapGetBootstrapAgentsDefault creates a BootstrapGetBootstrapAgentsDefault with default headers values +func NewBootstrapGetBootstrapAgentsDefault(code int) *BootstrapGetBootstrapAgentsDefault { + return &BootstrapGetBootstrapAgentsDefault{ + _statusCode: code, + } +} + +/* BootstrapGetBootstrapAgentsDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type BootstrapGetBootstrapAgentsDefault struct { + _statusCode int + + Payload *models.GooglerpcStatus +} + +// Code gets the status code for the bootstrap get bootstrap agents default response +func (o *BootstrapGetBootstrapAgentsDefault) Code() int { + return o._statusCode +} + +func (o *BootstrapGetBootstrapAgentsDefault) Error() string { + return fmt.Sprintf("[GET /v2/sentry/bootstrap/{templateScope}/agent][%d] Bootstrap_GetBootstrapAgents default %+v", o._statusCode, o.Payload) +} +func (o *BootstrapGetBootstrapAgentsDefault) GetPayload() *models.GooglerpcStatus { + return o.Payload +} + +func (o *BootstrapGetBootstrapAgentsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.GooglerpcStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_get_bootstrap_infra_parameters.go b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_get_bootstrap_infra_parameters.go new file mode 100644 index 0000000..27a9492 --- /dev/null +++ b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_get_bootstrap_infra_parameters.go @@ -0,0 +1,528 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package bootstrap + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewBootstrapGetBootstrapInfraParams creates a new BootstrapGetBootstrapInfraParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewBootstrapGetBootstrapInfraParams() *BootstrapGetBootstrapInfraParams { + return &BootstrapGetBootstrapInfraParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewBootstrapGetBootstrapInfraParamsWithTimeout creates a new BootstrapGetBootstrapInfraParams object +// with the ability to set a timeout on a request. +func NewBootstrapGetBootstrapInfraParamsWithTimeout(timeout time.Duration) *BootstrapGetBootstrapInfraParams { + return &BootstrapGetBootstrapInfraParams{ + timeout: timeout, + } +} + +// NewBootstrapGetBootstrapInfraParamsWithContext creates a new BootstrapGetBootstrapInfraParams object +// with the ability to set a context for a request. +func NewBootstrapGetBootstrapInfraParamsWithContext(ctx context.Context) *BootstrapGetBootstrapInfraParams { + return &BootstrapGetBootstrapInfraParams{ + Context: ctx, + } +} + +// NewBootstrapGetBootstrapInfraParamsWithHTTPClient creates a new BootstrapGetBootstrapInfraParams object +// with the ability to set a custom HTTPClient for a request. +func NewBootstrapGetBootstrapInfraParamsWithHTTPClient(client *http.Client) *BootstrapGetBootstrapInfraParams { + return &BootstrapGetBootstrapInfraParams{ + HTTPClient: client, + } +} + +/* BootstrapGetBootstrapInfraParams contains all the parameters to send to the API endpoint + for the bootstrap get bootstrap infra operation. + + Typically these are written to a http.Request. +*/ +type BootstrapGetBootstrapInfraParams struct { + + /* APIVersion. + + API Version. API Version of the resource + + Default: "infra.k8smgmt.io/v3" + */ + APIVersion *string + + /* Kind. + + Kind. Kind of the resource + + Default: "BootstrapInfra" + */ + Kind *string + + /* MetadataDescription. + + Description. description of the resource + */ + MetadataDescription *string + + // MetadataID. + MetadataID *string + + // MetadataModifiedAt. + // + // Format: date-time + MetadataModifiedAt *strfmt.DateTime + + /* MetadataName. + + name of the resource + */ + MetadataName string + + /* MetadataOrganization. + + Organization. Organization to which the resource belongs + */ + MetadataOrganization *string + + /* MetadataPartner. + + Partner. Partner to which the resource belongs + */ + MetadataPartner *string + + /* MetadataProject. + + Project. Project of the resource + */ + MetadataProject *string + + // SpecCaCert. + SpecCaCert *string + + // SpecCaKey. + SpecCaKey *string + + // SpecCaKeyPass. + SpecCaKeyPass *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the bootstrap get bootstrap infra params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BootstrapGetBootstrapInfraParams) WithDefaults() *BootstrapGetBootstrapInfraParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the bootstrap get bootstrap infra params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BootstrapGetBootstrapInfraParams) SetDefaults() { + var ( + aPIVersionDefault = string("infra.k8smgmt.io/v3") + + kindDefault = string("BootstrapInfra") + ) + + val := BootstrapGetBootstrapInfraParams{ + APIVersion: &aPIVersionDefault, + Kind: &kindDefault, + } + + val.timeout = o.timeout + val.Context = o.Context + val.HTTPClient = o.HTTPClient + *o = val +} + +// WithTimeout adds the timeout to the bootstrap get bootstrap infra params +func (o *BootstrapGetBootstrapInfraParams) WithTimeout(timeout time.Duration) *BootstrapGetBootstrapInfraParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the bootstrap get bootstrap infra params +func (o *BootstrapGetBootstrapInfraParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the bootstrap get bootstrap infra params +func (o *BootstrapGetBootstrapInfraParams) WithContext(ctx context.Context) *BootstrapGetBootstrapInfraParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the bootstrap get bootstrap infra params +func (o *BootstrapGetBootstrapInfraParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the bootstrap get bootstrap infra params +func (o *BootstrapGetBootstrapInfraParams) WithHTTPClient(client *http.Client) *BootstrapGetBootstrapInfraParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the bootstrap get bootstrap infra params +func (o *BootstrapGetBootstrapInfraParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAPIVersion adds the aPIVersion to the bootstrap get bootstrap infra params +func (o *BootstrapGetBootstrapInfraParams) WithAPIVersion(aPIVersion *string) *BootstrapGetBootstrapInfraParams { + o.SetAPIVersion(aPIVersion) + return o +} + +// SetAPIVersion adds the apiVersion to the bootstrap get bootstrap infra params +func (o *BootstrapGetBootstrapInfraParams) SetAPIVersion(aPIVersion *string) { + o.APIVersion = aPIVersion +} + +// WithKind adds the kind to the bootstrap get bootstrap infra params +func (o *BootstrapGetBootstrapInfraParams) WithKind(kind *string) *BootstrapGetBootstrapInfraParams { + o.SetKind(kind) + return o +} + +// SetKind adds the kind to the bootstrap get bootstrap infra params +func (o *BootstrapGetBootstrapInfraParams) SetKind(kind *string) { + o.Kind = kind +} + +// WithMetadataDescription adds the metadataDescription to the bootstrap get bootstrap infra params +func (o *BootstrapGetBootstrapInfraParams) WithMetadataDescription(metadataDescription *string) *BootstrapGetBootstrapInfraParams { + o.SetMetadataDescription(metadataDescription) + return o +} + +// SetMetadataDescription adds the metadataDescription to the bootstrap get bootstrap infra params +func (o *BootstrapGetBootstrapInfraParams) SetMetadataDescription(metadataDescription *string) { + o.MetadataDescription = metadataDescription +} + +// WithMetadataID adds the metadataID to the bootstrap get bootstrap infra params +func (o *BootstrapGetBootstrapInfraParams) WithMetadataID(metadataID *string) *BootstrapGetBootstrapInfraParams { + o.SetMetadataID(metadataID) + return o +} + +// SetMetadataID adds the metadataId to the bootstrap get bootstrap infra params +func (o *BootstrapGetBootstrapInfraParams) SetMetadataID(metadataID *string) { + o.MetadataID = metadataID +} + +// WithMetadataModifiedAt adds the metadataModifiedAt to the bootstrap get bootstrap infra params +func (o *BootstrapGetBootstrapInfraParams) WithMetadataModifiedAt(metadataModifiedAt *strfmt.DateTime) *BootstrapGetBootstrapInfraParams { + o.SetMetadataModifiedAt(metadataModifiedAt) + return o +} + +// SetMetadataModifiedAt adds the metadataModifiedAt to the bootstrap get bootstrap infra params +func (o *BootstrapGetBootstrapInfraParams) SetMetadataModifiedAt(metadataModifiedAt *strfmt.DateTime) { + o.MetadataModifiedAt = metadataModifiedAt +} + +// WithMetadataName adds the metadataName to the bootstrap get bootstrap infra params +func (o *BootstrapGetBootstrapInfraParams) WithMetadataName(metadataName string) *BootstrapGetBootstrapInfraParams { + o.SetMetadataName(metadataName) + return o +} + +// SetMetadataName adds the metadataName to the bootstrap get bootstrap infra params +func (o *BootstrapGetBootstrapInfraParams) SetMetadataName(metadataName string) { + o.MetadataName = metadataName +} + +// WithMetadataOrganization adds the metadataOrganization to the bootstrap get bootstrap infra params +func (o *BootstrapGetBootstrapInfraParams) WithMetadataOrganization(metadataOrganization *string) *BootstrapGetBootstrapInfraParams { + o.SetMetadataOrganization(metadataOrganization) + return o +} + +// SetMetadataOrganization adds the metadataOrganization to the bootstrap get bootstrap infra params +func (o *BootstrapGetBootstrapInfraParams) SetMetadataOrganization(metadataOrganization *string) { + o.MetadataOrganization = metadataOrganization +} + +// WithMetadataPartner adds the metadataPartner to the bootstrap get bootstrap infra params +func (o *BootstrapGetBootstrapInfraParams) WithMetadataPartner(metadataPartner *string) *BootstrapGetBootstrapInfraParams { + o.SetMetadataPartner(metadataPartner) + return o +} + +// SetMetadataPartner adds the metadataPartner to the bootstrap get bootstrap infra params +func (o *BootstrapGetBootstrapInfraParams) SetMetadataPartner(metadataPartner *string) { + o.MetadataPartner = metadataPartner +} + +// WithMetadataProject adds the metadataProject to the bootstrap get bootstrap infra params +func (o *BootstrapGetBootstrapInfraParams) WithMetadataProject(metadataProject *string) *BootstrapGetBootstrapInfraParams { + o.SetMetadataProject(metadataProject) + return o +} + +// SetMetadataProject adds the metadataProject to the bootstrap get bootstrap infra params +func (o *BootstrapGetBootstrapInfraParams) SetMetadataProject(metadataProject *string) { + o.MetadataProject = metadataProject +} + +// WithSpecCaCert adds the specCaCert to the bootstrap get bootstrap infra params +func (o *BootstrapGetBootstrapInfraParams) WithSpecCaCert(specCaCert *string) *BootstrapGetBootstrapInfraParams { + o.SetSpecCaCert(specCaCert) + return o +} + +// SetSpecCaCert adds the specCaCert to the bootstrap get bootstrap infra params +func (o *BootstrapGetBootstrapInfraParams) SetSpecCaCert(specCaCert *string) { + o.SpecCaCert = specCaCert +} + +// WithSpecCaKey adds the specCaKey to the bootstrap get bootstrap infra params +func (o *BootstrapGetBootstrapInfraParams) WithSpecCaKey(specCaKey *string) *BootstrapGetBootstrapInfraParams { + o.SetSpecCaKey(specCaKey) + return o +} + +// SetSpecCaKey adds the specCaKey to the bootstrap get bootstrap infra params +func (o *BootstrapGetBootstrapInfraParams) SetSpecCaKey(specCaKey *string) { + o.SpecCaKey = specCaKey +} + +// WithSpecCaKeyPass adds the specCaKeyPass to the bootstrap get bootstrap infra params +func (o *BootstrapGetBootstrapInfraParams) WithSpecCaKeyPass(specCaKeyPass *string) *BootstrapGetBootstrapInfraParams { + o.SetSpecCaKeyPass(specCaKeyPass) + return o +} + +// SetSpecCaKeyPass adds the specCaKeyPass to the bootstrap get bootstrap infra params +func (o *BootstrapGetBootstrapInfraParams) SetSpecCaKeyPass(specCaKeyPass *string) { + o.SpecCaKeyPass = specCaKeyPass +} + +// WriteToRequest writes these params to a swagger request +func (o *BootstrapGetBootstrapInfraParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.APIVersion != nil { + + // query param apiVersion + var qrAPIVersion string + + if o.APIVersion != nil { + qrAPIVersion = *o.APIVersion + } + qAPIVersion := qrAPIVersion + if qAPIVersion != "" { + + if err := r.SetQueryParam("apiVersion", qAPIVersion); err != nil { + return err + } + } + } + + if o.Kind != nil { + + // query param kind + var qrKind string + + if o.Kind != nil { + qrKind = *o.Kind + } + qKind := qrKind + if qKind != "" { + + if err := r.SetQueryParam("kind", qKind); err != nil { + return err + } + } + } + + if o.MetadataDescription != nil { + + // query param metadata.description + var qrMetadataDescription string + + if o.MetadataDescription != nil { + qrMetadataDescription = *o.MetadataDescription + } + qMetadataDescription := qrMetadataDescription + if qMetadataDescription != "" { + + if err := r.SetQueryParam("metadata.description", qMetadataDescription); err != nil { + return err + } + } + } + + if o.MetadataID != nil { + + // query param metadata.id + var qrMetadataID string + + if o.MetadataID != nil { + qrMetadataID = *o.MetadataID + } + qMetadataID := qrMetadataID + if qMetadataID != "" { + + if err := r.SetQueryParam("metadata.id", qMetadataID); err != nil { + return err + } + } + } + + if o.MetadataModifiedAt != nil { + + // query param metadata.modifiedAt + var qrMetadataModifiedAt strfmt.DateTime + + if o.MetadataModifiedAt != nil { + qrMetadataModifiedAt = *o.MetadataModifiedAt + } + qMetadataModifiedAt := qrMetadataModifiedAt.String() + if qMetadataModifiedAt != "" { + + if err := r.SetQueryParam("metadata.modifiedAt", qMetadataModifiedAt); err != nil { + return err + } + } + } + + // path param metadata.name + if err := r.SetPathParam("metadata.name", o.MetadataName); err != nil { + return err + } + + if o.MetadataOrganization != nil { + + // query param metadata.organization + var qrMetadataOrganization string + + if o.MetadataOrganization != nil { + qrMetadataOrganization = *o.MetadataOrganization + } + qMetadataOrganization := qrMetadataOrganization + if qMetadataOrganization != "" { + + if err := r.SetQueryParam("metadata.organization", qMetadataOrganization); err != nil { + return err + } + } + } + + if o.MetadataPartner != nil { + + // query param metadata.partner + var qrMetadataPartner string + + if o.MetadataPartner != nil { + qrMetadataPartner = *o.MetadataPartner + } + qMetadataPartner := qrMetadataPartner + if qMetadataPartner != "" { + + if err := r.SetQueryParam("metadata.partner", qMetadataPartner); err != nil { + return err + } + } + } + + if o.MetadataProject != nil { + + // query param metadata.project + var qrMetadataProject string + + if o.MetadataProject != nil { + qrMetadataProject = *o.MetadataProject + } + qMetadataProject := qrMetadataProject + if qMetadataProject != "" { + + if err := r.SetQueryParam("metadata.project", qMetadataProject); err != nil { + return err + } + } + } + + if o.SpecCaCert != nil { + + // query param spec.caCert + var qrSpecCaCert string + + if o.SpecCaCert != nil { + qrSpecCaCert = *o.SpecCaCert + } + qSpecCaCert := qrSpecCaCert + if qSpecCaCert != "" { + + if err := r.SetQueryParam("spec.caCert", qSpecCaCert); err != nil { + return err + } + } + } + + if o.SpecCaKey != nil { + + // query param spec.caKey + var qrSpecCaKey string + + if o.SpecCaKey != nil { + qrSpecCaKey = *o.SpecCaKey + } + qSpecCaKey := qrSpecCaKey + if qSpecCaKey != "" { + + if err := r.SetQueryParam("spec.caKey", qSpecCaKey); err != nil { + return err + } + } + } + + if o.SpecCaKeyPass != nil { + + // query param spec.caKeyPass + var qrSpecCaKeyPass string + + if o.SpecCaKeyPass != nil { + qrSpecCaKeyPass = *o.SpecCaKeyPass + } + qSpecCaKeyPass := qrSpecCaKeyPass + if qSpecCaKeyPass != "" { + + if err := r.SetQueryParam("spec.caKeyPass", qSpecCaKeyPass); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_get_bootstrap_infra_responses.go b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_get_bootstrap_infra_responses.go new file mode 100644 index 0000000..e4e423b --- /dev/null +++ b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_get_bootstrap_infra_responses.go @@ -0,0 +1,223 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package bootstrap + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/RafaySystems/rcloud-base/components/common/api/def/clients/sentry/models" +) + +// BootstrapGetBootstrapInfraReader is a Reader for the BootstrapGetBootstrapInfra structure. +type BootstrapGetBootstrapInfraReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *BootstrapGetBootstrapInfraReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewBootstrapGetBootstrapInfraOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 403: + result := NewBootstrapGetBootstrapInfraForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewBootstrapGetBootstrapInfraNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewBootstrapGetBootstrapInfraInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + result := NewBootstrapGetBootstrapInfraDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewBootstrapGetBootstrapInfraOK creates a BootstrapGetBootstrapInfraOK with default headers values +func NewBootstrapGetBootstrapInfraOK() *BootstrapGetBootstrapInfraOK { + return &BootstrapGetBootstrapInfraOK{} +} + +/* BootstrapGetBootstrapInfraOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type BootstrapGetBootstrapInfraOK struct { + Payload *models.SentryBootstrapInfra +} + +func (o *BootstrapGetBootstrapInfraOK) Error() string { + return fmt.Sprintf("[GET /v2/sentry/bootstrap/infra/{metadata.name}][%d] bootstrapGetBootstrapInfraOK %+v", 200, o.Payload) +} +func (o *BootstrapGetBootstrapInfraOK) GetPayload() *models.SentryBootstrapInfra { + return o.Payload +} + +func (o *BootstrapGetBootstrapInfraOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.SentryBootstrapInfra) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBootstrapGetBootstrapInfraForbidden creates a BootstrapGetBootstrapInfraForbidden with default headers values +func NewBootstrapGetBootstrapInfraForbidden() *BootstrapGetBootstrapInfraForbidden { + return &BootstrapGetBootstrapInfraForbidden{} +} + +/* BootstrapGetBootstrapInfraForbidden describes a response with status code 403, with default header values. + +Returned when the user does not have permission to access the resource. +*/ +type BootstrapGetBootstrapInfraForbidden struct { + Payload interface{} +} + +func (o *BootstrapGetBootstrapInfraForbidden) Error() string { + return fmt.Sprintf("[GET /v2/sentry/bootstrap/infra/{metadata.name}][%d] bootstrapGetBootstrapInfraForbidden %+v", 403, o.Payload) +} +func (o *BootstrapGetBootstrapInfraForbidden) GetPayload() interface{} { + return o.Payload +} + +func (o *BootstrapGetBootstrapInfraForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBootstrapGetBootstrapInfraNotFound creates a BootstrapGetBootstrapInfraNotFound with default headers values +func NewBootstrapGetBootstrapInfraNotFound() *BootstrapGetBootstrapInfraNotFound { + return &BootstrapGetBootstrapInfraNotFound{} +} + +/* BootstrapGetBootstrapInfraNotFound describes a response with status code 404, with default header values. + +Returned when the resource does not exist. +*/ +type BootstrapGetBootstrapInfraNotFound struct { + Payload interface{} +} + +func (o *BootstrapGetBootstrapInfraNotFound) Error() string { + return fmt.Sprintf("[GET /v2/sentry/bootstrap/infra/{metadata.name}][%d] bootstrapGetBootstrapInfraNotFound %+v", 404, o.Payload) +} +func (o *BootstrapGetBootstrapInfraNotFound) GetPayload() interface{} { + return o.Payload +} + +func (o *BootstrapGetBootstrapInfraNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBootstrapGetBootstrapInfraInternalServerError creates a BootstrapGetBootstrapInfraInternalServerError with default headers values +func NewBootstrapGetBootstrapInfraInternalServerError() *BootstrapGetBootstrapInfraInternalServerError { + return &BootstrapGetBootstrapInfraInternalServerError{} +} + +/* BootstrapGetBootstrapInfraInternalServerError describes a response with status code 500, with default header values. + +Returned for internal server error +*/ +type BootstrapGetBootstrapInfraInternalServerError struct { + Payload interface{} +} + +func (o *BootstrapGetBootstrapInfraInternalServerError) Error() string { + return fmt.Sprintf("[GET /v2/sentry/bootstrap/infra/{metadata.name}][%d] bootstrapGetBootstrapInfraInternalServerError %+v", 500, o.Payload) +} +func (o *BootstrapGetBootstrapInfraInternalServerError) GetPayload() interface{} { + return o.Payload +} + +func (o *BootstrapGetBootstrapInfraInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBootstrapGetBootstrapInfraDefault creates a BootstrapGetBootstrapInfraDefault with default headers values +func NewBootstrapGetBootstrapInfraDefault(code int) *BootstrapGetBootstrapInfraDefault { + return &BootstrapGetBootstrapInfraDefault{ + _statusCode: code, + } +} + +/* BootstrapGetBootstrapInfraDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type BootstrapGetBootstrapInfraDefault struct { + _statusCode int + + Payload *models.GooglerpcStatus +} + +// Code gets the status code for the bootstrap get bootstrap infra default response +func (o *BootstrapGetBootstrapInfraDefault) Code() int { + return o._statusCode +} + +func (o *BootstrapGetBootstrapInfraDefault) Error() string { + return fmt.Sprintf("[GET /v2/sentry/bootstrap/infra/{metadata.name}][%d] Bootstrap_GetBootstrapInfra default %+v", o._statusCode, o.Payload) +} +func (o *BootstrapGetBootstrapInfraDefault) GetPayload() *models.GooglerpcStatus { + return o.Payload +} + +func (o *BootstrapGetBootstrapInfraDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.GooglerpcStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_get_relay_network_parameters.go b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_get_relay_network_parameters.go new file mode 100644 index 0000000..2254d7a --- /dev/null +++ b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_get_relay_network_parameters.go @@ -0,0 +1,956 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package bootstrap + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewBootstrapGetRelayNetworkParams creates a new BootstrapGetRelayNetworkParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewBootstrapGetRelayNetworkParams() *BootstrapGetRelayNetworkParams { + return &BootstrapGetRelayNetworkParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewBootstrapGetRelayNetworkParamsWithTimeout creates a new BootstrapGetRelayNetworkParams object +// with the ability to set a timeout on a request. +func NewBootstrapGetRelayNetworkParamsWithTimeout(timeout time.Duration) *BootstrapGetRelayNetworkParams { + return &BootstrapGetRelayNetworkParams{ + timeout: timeout, + } +} + +// NewBootstrapGetRelayNetworkParamsWithContext creates a new BootstrapGetRelayNetworkParams object +// with the ability to set a context for a request. +func NewBootstrapGetRelayNetworkParamsWithContext(ctx context.Context) *BootstrapGetRelayNetworkParams { + return &BootstrapGetRelayNetworkParams{ + Context: ctx, + } +} + +// NewBootstrapGetRelayNetworkParamsWithHTTPClient creates a new BootstrapGetRelayNetworkParams object +// with the ability to set a custom HTTPClient for a request. +func NewBootstrapGetRelayNetworkParamsWithHTTPClient(client *http.Client) *BootstrapGetRelayNetworkParams { + return &BootstrapGetRelayNetworkParams{ + HTTPClient: client, + } +} + +/* BootstrapGetRelayNetworkParams contains all the parameters to send to the API endpoint + for the bootstrap get relay network operation. + + Typically these are written to a http.Request. +*/ +type BootstrapGetRelayNetworkParams struct { + + /* APIVersion. + + API Version. API Version of the resource + + Default: "infra.k8smgmt.io/v3" + */ + APIVersion *string + + /* Kind. + + Kind. Kind of the resource + + Default: "RelayNetwork" + */ + Kind *string + + /* MetadataDescription. + + Description. description of the resource + */ + MetadataDescription *string + + // MetadataID. + MetadataID *string + + // MetadataModifiedAt. + // + // Format: date-time + MetadataModifiedAt *strfmt.DateTime + + /* MetadataName. + + name of the resource + */ + MetadataName string + + /* MetadataOrganization. + + Organization. Organization to which the resource belongs + */ + MetadataOrganization *string + + /* MetadataPartner. + + Partner. Partner to which the resource belongs + */ + MetadataPartner *string + + /* MetadataProject. + + Project. Project of the resource + */ + MetadataProject *string + + // SpecClustercacert. + SpecClustercacert *string + + // SpecClustercert. + SpecClustercert *string + + // SpecClusterhost. + SpecClusterhost *string + + // SpecClusterkey. + SpecClusterkey *string + + // SpecClusterpassword. + SpecClusterpassword *string + + // SpecClusterselfsigned. + SpecClusterselfsigned *bool + + // SpecPlacementClusterSelector. + SpecPlacementClusterSelector *string + + // SpecPlacementDriftAction. + // + // Default: "DriftReconcillationActionNotSet" + SpecPlacementDriftAction *string + + // SpecPlacementNodeGroupingKeys. + SpecPlacementNodeGroupingKeys []string + + /* SpecPlacementPlacementType. + + placementType is the type of placement. + + Default: "ClusterSelector" + */ + SpecPlacementPlacementType *string + + // SpecUsercacert. + SpecUsercacert *string + + // SpecUsercert. + SpecUsercert *string + + // SpecUserhost. + SpecUserhost *string + + // SpecUserkey. + SpecUserkey *string + + // SpecUserpassword. + SpecUserpassword *string + + // SpecUserselfsigned. + SpecUserselfsigned *bool + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the bootstrap get relay network params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BootstrapGetRelayNetworkParams) WithDefaults() *BootstrapGetRelayNetworkParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the bootstrap get relay network params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BootstrapGetRelayNetworkParams) SetDefaults() { + var ( + aPIVersionDefault = string("infra.k8smgmt.io/v3") + + kindDefault = string("RelayNetwork") + + specPlacementDriftActionDefault = string("DriftReconcillationActionNotSet") + + specPlacementPlacementTypeDefault = string("ClusterSelector") + ) + + val := BootstrapGetRelayNetworkParams{ + APIVersion: &aPIVersionDefault, + Kind: &kindDefault, + SpecPlacementDriftAction: &specPlacementDriftActionDefault, + SpecPlacementPlacementType: &specPlacementPlacementTypeDefault, + } + + val.timeout = o.timeout + val.Context = o.Context + val.HTTPClient = o.HTTPClient + *o = val +} + +// WithTimeout adds the timeout to the bootstrap get relay network params +func (o *BootstrapGetRelayNetworkParams) WithTimeout(timeout time.Duration) *BootstrapGetRelayNetworkParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the bootstrap get relay network params +func (o *BootstrapGetRelayNetworkParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the bootstrap get relay network params +func (o *BootstrapGetRelayNetworkParams) WithContext(ctx context.Context) *BootstrapGetRelayNetworkParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the bootstrap get relay network params +func (o *BootstrapGetRelayNetworkParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the bootstrap get relay network params +func (o *BootstrapGetRelayNetworkParams) WithHTTPClient(client *http.Client) *BootstrapGetRelayNetworkParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the bootstrap get relay network params +func (o *BootstrapGetRelayNetworkParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAPIVersion adds the aPIVersion to the bootstrap get relay network params +func (o *BootstrapGetRelayNetworkParams) WithAPIVersion(aPIVersion *string) *BootstrapGetRelayNetworkParams { + o.SetAPIVersion(aPIVersion) + return o +} + +// SetAPIVersion adds the apiVersion to the bootstrap get relay network params +func (o *BootstrapGetRelayNetworkParams) SetAPIVersion(aPIVersion *string) { + o.APIVersion = aPIVersion +} + +// WithKind adds the kind to the bootstrap get relay network params +func (o *BootstrapGetRelayNetworkParams) WithKind(kind *string) *BootstrapGetRelayNetworkParams { + o.SetKind(kind) + return o +} + +// SetKind adds the kind to the bootstrap get relay network params +func (o *BootstrapGetRelayNetworkParams) SetKind(kind *string) { + o.Kind = kind +} + +// WithMetadataDescription adds the metadataDescription to the bootstrap get relay network params +func (o *BootstrapGetRelayNetworkParams) WithMetadataDescription(metadataDescription *string) *BootstrapGetRelayNetworkParams { + o.SetMetadataDescription(metadataDescription) + return o +} + +// SetMetadataDescription adds the metadataDescription to the bootstrap get relay network params +func (o *BootstrapGetRelayNetworkParams) SetMetadataDescription(metadataDescription *string) { + o.MetadataDescription = metadataDescription +} + +// WithMetadataID adds the metadataID to the bootstrap get relay network params +func (o *BootstrapGetRelayNetworkParams) WithMetadataID(metadataID *string) *BootstrapGetRelayNetworkParams { + o.SetMetadataID(metadataID) + return o +} + +// SetMetadataID adds the metadataId to the bootstrap get relay network params +func (o *BootstrapGetRelayNetworkParams) SetMetadataID(metadataID *string) { + o.MetadataID = metadataID +} + +// WithMetadataModifiedAt adds the metadataModifiedAt to the bootstrap get relay network params +func (o *BootstrapGetRelayNetworkParams) WithMetadataModifiedAt(metadataModifiedAt *strfmt.DateTime) *BootstrapGetRelayNetworkParams { + o.SetMetadataModifiedAt(metadataModifiedAt) + return o +} + +// SetMetadataModifiedAt adds the metadataModifiedAt to the bootstrap get relay network params +func (o *BootstrapGetRelayNetworkParams) SetMetadataModifiedAt(metadataModifiedAt *strfmt.DateTime) { + o.MetadataModifiedAt = metadataModifiedAt +} + +// WithMetadataName adds the metadataName to the bootstrap get relay network params +func (o *BootstrapGetRelayNetworkParams) WithMetadataName(metadataName string) *BootstrapGetRelayNetworkParams { + o.SetMetadataName(metadataName) + return o +} + +// SetMetadataName adds the metadataName to the bootstrap get relay network params +func (o *BootstrapGetRelayNetworkParams) SetMetadataName(metadataName string) { + o.MetadataName = metadataName +} + +// WithMetadataOrganization adds the metadataOrganization to the bootstrap get relay network params +func (o *BootstrapGetRelayNetworkParams) WithMetadataOrganization(metadataOrganization *string) *BootstrapGetRelayNetworkParams { + o.SetMetadataOrganization(metadataOrganization) + return o +} + +// SetMetadataOrganization adds the metadataOrganization to the bootstrap get relay network params +func (o *BootstrapGetRelayNetworkParams) SetMetadataOrganization(metadataOrganization *string) { + o.MetadataOrganization = metadataOrganization +} + +// WithMetadataPartner adds the metadataPartner to the bootstrap get relay network params +func (o *BootstrapGetRelayNetworkParams) WithMetadataPartner(metadataPartner *string) *BootstrapGetRelayNetworkParams { + o.SetMetadataPartner(metadataPartner) + return o +} + +// SetMetadataPartner adds the metadataPartner to the bootstrap get relay network params +func (o *BootstrapGetRelayNetworkParams) SetMetadataPartner(metadataPartner *string) { + o.MetadataPartner = metadataPartner +} + +// WithMetadataProject adds the metadataProject to the bootstrap get relay network params +func (o *BootstrapGetRelayNetworkParams) WithMetadataProject(metadataProject *string) *BootstrapGetRelayNetworkParams { + o.SetMetadataProject(metadataProject) + return o +} + +// SetMetadataProject adds the metadataProject to the bootstrap get relay network params +func (o *BootstrapGetRelayNetworkParams) SetMetadataProject(metadataProject *string) { + o.MetadataProject = metadataProject +} + +// WithSpecClustercacert adds the specClustercacert to the bootstrap get relay network params +func (o *BootstrapGetRelayNetworkParams) WithSpecClustercacert(specClustercacert *string) *BootstrapGetRelayNetworkParams { + o.SetSpecClustercacert(specClustercacert) + return o +} + +// SetSpecClustercacert adds the specClustercacert to the bootstrap get relay network params +func (o *BootstrapGetRelayNetworkParams) SetSpecClustercacert(specClustercacert *string) { + o.SpecClustercacert = specClustercacert +} + +// WithSpecClustercert adds the specClustercert to the bootstrap get relay network params +func (o *BootstrapGetRelayNetworkParams) WithSpecClustercert(specClustercert *string) *BootstrapGetRelayNetworkParams { + o.SetSpecClustercert(specClustercert) + return o +} + +// SetSpecClustercert adds the specClustercert to the bootstrap get relay network params +func (o *BootstrapGetRelayNetworkParams) SetSpecClustercert(specClustercert *string) { + o.SpecClustercert = specClustercert +} + +// WithSpecClusterhost adds the specClusterhost to the bootstrap get relay network params +func (o *BootstrapGetRelayNetworkParams) WithSpecClusterhost(specClusterhost *string) *BootstrapGetRelayNetworkParams { + o.SetSpecClusterhost(specClusterhost) + return o +} + +// SetSpecClusterhost adds the specClusterhost to the bootstrap get relay network params +func (o *BootstrapGetRelayNetworkParams) SetSpecClusterhost(specClusterhost *string) { + o.SpecClusterhost = specClusterhost +} + +// WithSpecClusterkey adds the specClusterkey to the bootstrap get relay network params +func (o *BootstrapGetRelayNetworkParams) WithSpecClusterkey(specClusterkey *string) *BootstrapGetRelayNetworkParams { + o.SetSpecClusterkey(specClusterkey) + return o +} + +// SetSpecClusterkey adds the specClusterkey to the bootstrap get relay network params +func (o *BootstrapGetRelayNetworkParams) SetSpecClusterkey(specClusterkey *string) { + o.SpecClusterkey = specClusterkey +} + +// WithSpecClusterpassword adds the specClusterpassword to the bootstrap get relay network params +func (o *BootstrapGetRelayNetworkParams) WithSpecClusterpassword(specClusterpassword *string) *BootstrapGetRelayNetworkParams { + o.SetSpecClusterpassword(specClusterpassword) + return o +} + +// SetSpecClusterpassword adds the specClusterpassword to the bootstrap get relay network params +func (o *BootstrapGetRelayNetworkParams) SetSpecClusterpassword(specClusterpassword *string) { + o.SpecClusterpassword = specClusterpassword +} + +// WithSpecClusterselfsigned adds the specClusterselfsigned to the bootstrap get relay network params +func (o *BootstrapGetRelayNetworkParams) WithSpecClusterselfsigned(specClusterselfsigned *bool) *BootstrapGetRelayNetworkParams { + o.SetSpecClusterselfsigned(specClusterselfsigned) + return o +} + +// SetSpecClusterselfsigned adds the specClusterselfsigned to the bootstrap get relay network params +func (o *BootstrapGetRelayNetworkParams) SetSpecClusterselfsigned(specClusterselfsigned *bool) { + o.SpecClusterselfsigned = specClusterselfsigned +} + +// WithSpecPlacementClusterSelector adds the specPlacementClusterSelector to the bootstrap get relay network params +func (o *BootstrapGetRelayNetworkParams) WithSpecPlacementClusterSelector(specPlacementClusterSelector *string) *BootstrapGetRelayNetworkParams { + o.SetSpecPlacementClusterSelector(specPlacementClusterSelector) + return o +} + +// SetSpecPlacementClusterSelector adds the specPlacementClusterSelector to the bootstrap get relay network params +func (o *BootstrapGetRelayNetworkParams) SetSpecPlacementClusterSelector(specPlacementClusterSelector *string) { + o.SpecPlacementClusterSelector = specPlacementClusterSelector +} + +// WithSpecPlacementDriftAction adds the specPlacementDriftAction to the bootstrap get relay network params +func (o *BootstrapGetRelayNetworkParams) WithSpecPlacementDriftAction(specPlacementDriftAction *string) *BootstrapGetRelayNetworkParams { + o.SetSpecPlacementDriftAction(specPlacementDriftAction) + return o +} + +// SetSpecPlacementDriftAction adds the specPlacementDriftAction to the bootstrap get relay network params +func (o *BootstrapGetRelayNetworkParams) SetSpecPlacementDriftAction(specPlacementDriftAction *string) { + o.SpecPlacementDriftAction = specPlacementDriftAction +} + +// WithSpecPlacementNodeGroupingKeys adds the specPlacementNodeGroupingKeys to the bootstrap get relay network params +func (o *BootstrapGetRelayNetworkParams) WithSpecPlacementNodeGroupingKeys(specPlacementNodeGroupingKeys []string) *BootstrapGetRelayNetworkParams { + o.SetSpecPlacementNodeGroupingKeys(specPlacementNodeGroupingKeys) + return o +} + +// SetSpecPlacementNodeGroupingKeys adds the specPlacementNodeGroupingKeys to the bootstrap get relay network params +func (o *BootstrapGetRelayNetworkParams) SetSpecPlacementNodeGroupingKeys(specPlacementNodeGroupingKeys []string) { + o.SpecPlacementNodeGroupingKeys = specPlacementNodeGroupingKeys +} + +// WithSpecPlacementPlacementType adds the specPlacementPlacementType to the bootstrap get relay network params +func (o *BootstrapGetRelayNetworkParams) WithSpecPlacementPlacementType(specPlacementPlacementType *string) *BootstrapGetRelayNetworkParams { + o.SetSpecPlacementPlacementType(specPlacementPlacementType) + return o +} + +// SetSpecPlacementPlacementType adds the specPlacementPlacementType to the bootstrap get relay network params +func (o *BootstrapGetRelayNetworkParams) SetSpecPlacementPlacementType(specPlacementPlacementType *string) { + o.SpecPlacementPlacementType = specPlacementPlacementType +} + +// WithSpecUsercacert adds the specUsercacert to the bootstrap get relay network params +func (o *BootstrapGetRelayNetworkParams) WithSpecUsercacert(specUsercacert *string) *BootstrapGetRelayNetworkParams { + o.SetSpecUsercacert(specUsercacert) + return o +} + +// SetSpecUsercacert adds the specUsercacert to the bootstrap get relay network params +func (o *BootstrapGetRelayNetworkParams) SetSpecUsercacert(specUsercacert *string) { + o.SpecUsercacert = specUsercacert +} + +// WithSpecUsercert adds the specUsercert to the bootstrap get relay network params +func (o *BootstrapGetRelayNetworkParams) WithSpecUsercert(specUsercert *string) *BootstrapGetRelayNetworkParams { + o.SetSpecUsercert(specUsercert) + return o +} + +// SetSpecUsercert adds the specUsercert to the bootstrap get relay network params +func (o *BootstrapGetRelayNetworkParams) SetSpecUsercert(specUsercert *string) { + o.SpecUsercert = specUsercert +} + +// WithSpecUserhost adds the specUserhost to the bootstrap get relay network params +func (o *BootstrapGetRelayNetworkParams) WithSpecUserhost(specUserhost *string) *BootstrapGetRelayNetworkParams { + o.SetSpecUserhost(specUserhost) + return o +} + +// SetSpecUserhost adds the specUserhost to the bootstrap get relay network params +func (o *BootstrapGetRelayNetworkParams) SetSpecUserhost(specUserhost *string) { + o.SpecUserhost = specUserhost +} + +// WithSpecUserkey adds the specUserkey to the bootstrap get relay network params +func (o *BootstrapGetRelayNetworkParams) WithSpecUserkey(specUserkey *string) *BootstrapGetRelayNetworkParams { + o.SetSpecUserkey(specUserkey) + return o +} + +// SetSpecUserkey adds the specUserkey to the bootstrap get relay network params +func (o *BootstrapGetRelayNetworkParams) SetSpecUserkey(specUserkey *string) { + o.SpecUserkey = specUserkey +} + +// WithSpecUserpassword adds the specUserpassword to the bootstrap get relay network params +func (o *BootstrapGetRelayNetworkParams) WithSpecUserpassword(specUserpassword *string) *BootstrapGetRelayNetworkParams { + o.SetSpecUserpassword(specUserpassword) + return o +} + +// SetSpecUserpassword adds the specUserpassword to the bootstrap get relay network params +func (o *BootstrapGetRelayNetworkParams) SetSpecUserpassword(specUserpassword *string) { + o.SpecUserpassword = specUserpassword +} + +// WithSpecUserselfsigned adds the specUserselfsigned to the bootstrap get relay network params +func (o *BootstrapGetRelayNetworkParams) WithSpecUserselfsigned(specUserselfsigned *bool) *BootstrapGetRelayNetworkParams { + o.SetSpecUserselfsigned(specUserselfsigned) + return o +} + +// SetSpecUserselfsigned adds the specUserselfsigned to the bootstrap get relay network params +func (o *BootstrapGetRelayNetworkParams) SetSpecUserselfsigned(specUserselfsigned *bool) { + o.SpecUserselfsigned = specUserselfsigned +} + +// WriteToRequest writes these params to a swagger request +func (o *BootstrapGetRelayNetworkParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.APIVersion != nil { + + // query param apiVersion + var qrAPIVersion string + + if o.APIVersion != nil { + qrAPIVersion = *o.APIVersion + } + qAPIVersion := qrAPIVersion + if qAPIVersion != "" { + + if err := r.SetQueryParam("apiVersion", qAPIVersion); err != nil { + return err + } + } + } + + if o.Kind != nil { + + // query param kind + var qrKind string + + if o.Kind != nil { + qrKind = *o.Kind + } + qKind := qrKind + if qKind != "" { + + if err := r.SetQueryParam("kind", qKind); err != nil { + return err + } + } + } + + if o.MetadataDescription != nil { + + // query param metadata.description + var qrMetadataDescription string + + if o.MetadataDescription != nil { + qrMetadataDescription = *o.MetadataDescription + } + qMetadataDescription := qrMetadataDescription + if qMetadataDescription != "" { + + if err := r.SetQueryParam("metadata.description", qMetadataDescription); err != nil { + return err + } + } + } + + if o.MetadataID != nil { + + // query param metadata.id + var qrMetadataID string + + if o.MetadataID != nil { + qrMetadataID = *o.MetadataID + } + qMetadataID := qrMetadataID + if qMetadataID != "" { + + if err := r.SetQueryParam("metadata.id", qMetadataID); err != nil { + return err + } + } + } + + if o.MetadataModifiedAt != nil { + + // query param metadata.modifiedAt + var qrMetadataModifiedAt strfmt.DateTime + + if o.MetadataModifiedAt != nil { + qrMetadataModifiedAt = *o.MetadataModifiedAt + } + qMetadataModifiedAt := qrMetadataModifiedAt.String() + if qMetadataModifiedAt != "" { + + if err := r.SetQueryParam("metadata.modifiedAt", qMetadataModifiedAt); err != nil { + return err + } + } + } + + // path param metadata.name + if err := r.SetPathParam("metadata.name", o.MetadataName); err != nil { + return err + } + + if o.MetadataOrganization != nil { + + // query param metadata.organization + var qrMetadataOrganization string + + if o.MetadataOrganization != nil { + qrMetadataOrganization = *o.MetadataOrganization + } + qMetadataOrganization := qrMetadataOrganization + if qMetadataOrganization != "" { + + if err := r.SetQueryParam("metadata.organization", qMetadataOrganization); err != nil { + return err + } + } + } + + if o.MetadataPartner != nil { + + // query param metadata.partner + var qrMetadataPartner string + + if o.MetadataPartner != nil { + qrMetadataPartner = *o.MetadataPartner + } + qMetadataPartner := qrMetadataPartner + if qMetadataPartner != "" { + + if err := r.SetQueryParam("metadata.partner", qMetadataPartner); err != nil { + return err + } + } + } + + if o.MetadataProject != nil { + + // query param metadata.project + var qrMetadataProject string + + if o.MetadataProject != nil { + qrMetadataProject = *o.MetadataProject + } + qMetadataProject := qrMetadataProject + if qMetadataProject != "" { + + if err := r.SetQueryParam("metadata.project", qMetadataProject); err != nil { + return err + } + } + } + + if o.SpecClustercacert != nil { + + // query param spec.clustercacert + var qrSpecClustercacert string + + if o.SpecClustercacert != nil { + qrSpecClustercacert = *o.SpecClustercacert + } + qSpecClustercacert := qrSpecClustercacert + if qSpecClustercacert != "" { + + if err := r.SetQueryParam("spec.clustercacert", qSpecClustercacert); err != nil { + return err + } + } + } + + if o.SpecClustercert != nil { + + // query param spec.clustercert + var qrSpecClustercert string + + if o.SpecClustercert != nil { + qrSpecClustercert = *o.SpecClustercert + } + qSpecClustercert := qrSpecClustercert + if qSpecClustercert != "" { + + if err := r.SetQueryParam("spec.clustercert", qSpecClustercert); err != nil { + return err + } + } + } + + if o.SpecClusterhost != nil { + + // query param spec.clusterhost + var qrSpecClusterhost string + + if o.SpecClusterhost != nil { + qrSpecClusterhost = *o.SpecClusterhost + } + qSpecClusterhost := qrSpecClusterhost + if qSpecClusterhost != "" { + + if err := r.SetQueryParam("spec.clusterhost", qSpecClusterhost); err != nil { + return err + } + } + } + + if o.SpecClusterkey != nil { + + // query param spec.clusterkey + var qrSpecClusterkey string + + if o.SpecClusterkey != nil { + qrSpecClusterkey = *o.SpecClusterkey + } + qSpecClusterkey := qrSpecClusterkey + if qSpecClusterkey != "" { + + if err := r.SetQueryParam("spec.clusterkey", qSpecClusterkey); err != nil { + return err + } + } + } + + if o.SpecClusterpassword != nil { + + // query param spec.clusterpassword + var qrSpecClusterpassword string + + if o.SpecClusterpassword != nil { + qrSpecClusterpassword = *o.SpecClusterpassword + } + qSpecClusterpassword := qrSpecClusterpassword + if qSpecClusterpassword != "" { + + if err := r.SetQueryParam("spec.clusterpassword", qSpecClusterpassword); err != nil { + return err + } + } + } + + if o.SpecClusterselfsigned != nil { + + // query param spec.clusterselfsigned + var qrSpecClusterselfsigned bool + + if o.SpecClusterselfsigned != nil { + qrSpecClusterselfsigned = *o.SpecClusterselfsigned + } + qSpecClusterselfsigned := swag.FormatBool(qrSpecClusterselfsigned) + if qSpecClusterselfsigned != "" { + + if err := r.SetQueryParam("spec.clusterselfsigned", qSpecClusterselfsigned); err != nil { + return err + } + } + } + + if o.SpecPlacementClusterSelector != nil { + + // query param spec.placement.clusterSelector + var qrSpecPlacementClusterSelector string + + if o.SpecPlacementClusterSelector != nil { + qrSpecPlacementClusterSelector = *o.SpecPlacementClusterSelector + } + qSpecPlacementClusterSelector := qrSpecPlacementClusterSelector + if qSpecPlacementClusterSelector != "" { + + if err := r.SetQueryParam("spec.placement.clusterSelector", qSpecPlacementClusterSelector); err != nil { + return err + } + } + } + + if o.SpecPlacementDriftAction != nil { + + // query param spec.placement.driftAction + var qrSpecPlacementDriftAction string + + if o.SpecPlacementDriftAction != nil { + qrSpecPlacementDriftAction = *o.SpecPlacementDriftAction + } + qSpecPlacementDriftAction := qrSpecPlacementDriftAction + if qSpecPlacementDriftAction != "" { + + if err := r.SetQueryParam("spec.placement.driftAction", qSpecPlacementDriftAction); err != nil { + return err + } + } + } + + if o.SpecPlacementNodeGroupingKeys != nil { + + // binding items for spec.placement.nodeGroupingKeys + joinedSpecPlacementNodeGroupingKeys := o.bindParamSpecPlacementNodeGroupingKeys(reg) + + // query array param spec.placement.nodeGroupingKeys + if err := r.SetQueryParam("spec.placement.nodeGroupingKeys", joinedSpecPlacementNodeGroupingKeys...); err != nil { + return err + } + } + + if o.SpecPlacementPlacementType != nil { + + // query param spec.placement.placementType + var qrSpecPlacementPlacementType string + + if o.SpecPlacementPlacementType != nil { + qrSpecPlacementPlacementType = *o.SpecPlacementPlacementType + } + qSpecPlacementPlacementType := qrSpecPlacementPlacementType + if qSpecPlacementPlacementType != "" { + + if err := r.SetQueryParam("spec.placement.placementType", qSpecPlacementPlacementType); err != nil { + return err + } + } + } + + if o.SpecUsercacert != nil { + + // query param spec.usercacert + var qrSpecUsercacert string + + if o.SpecUsercacert != nil { + qrSpecUsercacert = *o.SpecUsercacert + } + qSpecUsercacert := qrSpecUsercacert + if qSpecUsercacert != "" { + + if err := r.SetQueryParam("spec.usercacert", qSpecUsercacert); err != nil { + return err + } + } + } + + if o.SpecUsercert != nil { + + // query param spec.usercert + var qrSpecUsercert string + + if o.SpecUsercert != nil { + qrSpecUsercert = *o.SpecUsercert + } + qSpecUsercert := qrSpecUsercert + if qSpecUsercert != "" { + + if err := r.SetQueryParam("spec.usercert", qSpecUsercert); err != nil { + return err + } + } + } + + if o.SpecUserhost != nil { + + // query param spec.userhost + var qrSpecUserhost string + + if o.SpecUserhost != nil { + qrSpecUserhost = *o.SpecUserhost + } + qSpecUserhost := qrSpecUserhost + if qSpecUserhost != "" { + + if err := r.SetQueryParam("spec.userhost", qSpecUserhost); err != nil { + return err + } + } + } + + if o.SpecUserkey != nil { + + // query param spec.userkey + var qrSpecUserkey string + + if o.SpecUserkey != nil { + qrSpecUserkey = *o.SpecUserkey + } + qSpecUserkey := qrSpecUserkey + if qSpecUserkey != "" { + + if err := r.SetQueryParam("spec.userkey", qSpecUserkey); err != nil { + return err + } + } + } + + if o.SpecUserpassword != nil { + + // query param spec.userpassword + var qrSpecUserpassword string + + if o.SpecUserpassword != nil { + qrSpecUserpassword = *o.SpecUserpassword + } + qSpecUserpassword := qrSpecUserpassword + if qSpecUserpassword != "" { + + if err := r.SetQueryParam("spec.userpassword", qSpecUserpassword); err != nil { + return err + } + } + } + + if o.SpecUserselfsigned != nil { + + // query param spec.userselfsigned + var qrSpecUserselfsigned bool + + if o.SpecUserselfsigned != nil { + qrSpecUserselfsigned = *o.SpecUserselfsigned + } + qSpecUserselfsigned := swag.FormatBool(qrSpecUserselfsigned) + if qSpecUserselfsigned != "" { + + if err := r.SetQueryParam("spec.userselfsigned", qSpecUserselfsigned); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// bindParamBootstrapGetRelayNetwork binds the parameter spec.placement.nodeGroupingKeys +func (o *BootstrapGetRelayNetworkParams) bindParamSpecPlacementNodeGroupingKeys(formats strfmt.Registry) []string { + specPlacementNodeGroupingKeysIR := o.SpecPlacementNodeGroupingKeys + + var specPlacementNodeGroupingKeysIC []string + for _, specPlacementNodeGroupingKeysIIR := range specPlacementNodeGroupingKeysIR { // explode []string + + specPlacementNodeGroupingKeysIIV := specPlacementNodeGroupingKeysIIR // string as string + specPlacementNodeGroupingKeysIC = append(specPlacementNodeGroupingKeysIC, specPlacementNodeGroupingKeysIIV) + } + + // items.CollectionFormat: "multi" + specPlacementNodeGroupingKeysIS := swag.JoinByFormat(specPlacementNodeGroupingKeysIC, "multi") + + return specPlacementNodeGroupingKeysIS +} diff --git a/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_get_relay_network_responses.go b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_get_relay_network_responses.go new file mode 100644 index 0000000..4dec0ad --- /dev/null +++ b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_get_relay_network_responses.go @@ -0,0 +1,223 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package bootstrap + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/RafaySystems/rcloud-base/components/common/api/def/clients/sentry/models" +) + +// BootstrapGetRelayNetworkReader is a Reader for the BootstrapGetRelayNetwork structure. +type BootstrapGetRelayNetworkReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *BootstrapGetRelayNetworkReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewBootstrapGetRelayNetworkOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 403: + result := NewBootstrapGetRelayNetworkForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewBootstrapGetRelayNetworkNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewBootstrapGetRelayNetworkInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + result := NewBootstrapGetRelayNetworkDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewBootstrapGetRelayNetworkOK creates a BootstrapGetRelayNetworkOK with default headers values +func NewBootstrapGetRelayNetworkOK() *BootstrapGetRelayNetworkOK { + return &BootstrapGetRelayNetworkOK{} +} + +/* BootstrapGetRelayNetworkOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type BootstrapGetRelayNetworkOK struct { + Payload *models.SentryRelayNetwork +} + +func (o *BootstrapGetRelayNetworkOK) Error() string { + return fmt.Sprintf("[GET /v2/sentry/relaynetwork/{metadata.name}][%d] bootstrapGetRelayNetworkOK %+v", 200, o.Payload) +} +func (o *BootstrapGetRelayNetworkOK) GetPayload() *models.SentryRelayNetwork { + return o.Payload +} + +func (o *BootstrapGetRelayNetworkOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.SentryRelayNetwork) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBootstrapGetRelayNetworkForbidden creates a BootstrapGetRelayNetworkForbidden with default headers values +func NewBootstrapGetRelayNetworkForbidden() *BootstrapGetRelayNetworkForbidden { + return &BootstrapGetRelayNetworkForbidden{} +} + +/* BootstrapGetRelayNetworkForbidden describes a response with status code 403, with default header values. + +Returned when the user does not have permission to access the resource. +*/ +type BootstrapGetRelayNetworkForbidden struct { + Payload interface{} +} + +func (o *BootstrapGetRelayNetworkForbidden) Error() string { + return fmt.Sprintf("[GET /v2/sentry/relaynetwork/{metadata.name}][%d] bootstrapGetRelayNetworkForbidden %+v", 403, o.Payload) +} +func (o *BootstrapGetRelayNetworkForbidden) GetPayload() interface{} { + return o.Payload +} + +func (o *BootstrapGetRelayNetworkForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBootstrapGetRelayNetworkNotFound creates a BootstrapGetRelayNetworkNotFound with default headers values +func NewBootstrapGetRelayNetworkNotFound() *BootstrapGetRelayNetworkNotFound { + return &BootstrapGetRelayNetworkNotFound{} +} + +/* BootstrapGetRelayNetworkNotFound describes a response with status code 404, with default header values. + +Returned when the resource does not exist. +*/ +type BootstrapGetRelayNetworkNotFound struct { + Payload interface{} +} + +func (o *BootstrapGetRelayNetworkNotFound) Error() string { + return fmt.Sprintf("[GET /v2/sentry/relaynetwork/{metadata.name}][%d] bootstrapGetRelayNetworkNotFound %+v", 404, o.Payload) +} +func (o *BootstrapGetRelayNetworkNotFound) GetPayload() interface{} { + return o.Payload +} + +func (o *BootstrapGetRelayNetworkNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBootstrapGetRelayNetworkInternalServerError creates a BootstrapGetRelayNetworkInternalServerError with default headers values +func NewBootstrapGetRelayNetworkInternalServerError() *BootstrapGetRelayNetworkInternalServerError { + return &BootstrapGetRelayNetworkInternalServerError{} +} + +/* BootstrapGetRelayNetworkInternalServerError describes a response with status code 500, with default header values. + +Returned for internal server error +*/ +type BootstrapGetRelayNetworkInternalServerError struct { + Payload interface{} +} + +func (o *BootstrapGetRelayNetworkInternalServerError) Error() string { + return fmt.Sprintf("[GET /v2/sentry/relaynetwork/{metadata.name}][%d] bootstrapGetRelayNetworkInternalServerError %+v", 500, o.Payload) +} +func (o *BootstrapGetRelayNetworkInternalServerError) GetPayload() interface{} { + return o.Payload +} + +func (o *BootstrapGetRelayNetworkInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBootstrapGetRelayNetworkDefault creates a BootstrapGetRelayNetworkDefault with default headers values +func NewBootstrapGetRelayNetworkDefault(code int) *BootstrapGetRelayNetworkDefault { + return &BootstrapGetRelayNetworkDefault{ + _statusCode: code, + } +} + +/* BootstrapGetRelayNetworkDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type BootstrapGetRelayNetworkDefault struct { + _statusCode int + + Payload *models.GooglerpcStatus +} + +// Code gets the status code for the bootstrap get relay network default response +func (o *BootstrapGetRelayNetworkDefault) Code() int { + return o._statusCode +} + +func (o *BootstrapGetRelayNetworkDefault) Error() string { + return fmt.Sprintf("[GET /v2/sentry/relaynetwork/{metadata.name}][%d] Bootstrap_GetRelayNetwork default %+v", o._statusCode, o.Payload) +} +func (o *BootstrapGetRelayNetworkDefault) GetPayload() *models.GooglerpcStatus { + return o.Payload +} + +func (o *BootstrapGetRelayNetworkDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.GooglerpcStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_get_relay_networks_parameters.go b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_get_relay_networks_parameters.go new file mode 100644 index 0000000..e307dd1 --- /dev/null +++ b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_get_relay_networks_parameters.go @@ -0,0 +1,878 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package bootstrap + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewBootstrapGetRelayNetworksParams creates a new BootstrapGetRelayNetworksParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewBootstrapGetRelayNetworksParams() *BootstrapGetRelayNetworksParams { + return &BootstrapGetRelayNetworksParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewBootstrapGetRelayNetworksParamsWithTimeout creates a new BootstrapGetRelayNetworksParams object +// with the ability to set a timeout on a request. +func NewBootstrapGetRelayNetworksParamsWithTimeout(timeout time.Duration) *BootstrapGetRelayNetworksParams { + return &BootstrapGetRelayNetworksParams{ + timeout: timeout, + } +} + +// NewBootstrapGetRelayNetworksParamsWithContext creates a new BootstrapGetRelayNetworksParams object +// with the ability to set a context for a request. +func NewBootstrapGetRelayNetworksParamsWithContext(ctx context.Context) *BootstrapGetRelayNetworksParams { + return &BootstrapGetRelayNetworksParams{ + Context: ctx, + } +} + +// NewBootstrapGetRelayNetworksParamsWithHTTPClient creates a new BootstrapGetRelayNetworksParams object +// with the ability to set a custom HTTPClient for a request. +func NewBootstrapGetRelayNetworksParamsWithHTTPClient(client *http.Client) *BootstrapGetRelayNetworksParams { + return &BootstrapGetRelayNetworksParams{ + HTTPClient: client, + } +} + +/* BootstrapGetRelayNetworksParams contains all the parameters to send to the API endpoint + for the bootstrap get relay networks operation. + + Typically these are written to a http.Request. +*/ +type BootstrapGetRelayNetworksParams struct { + + // OptsID. + OptsID *string + + // OptsBlueprintRef. + OptsBlueprintRef *string + + // OptsClusterID. + OptsClusterID *string + + // OptsCount. + // + // Format: int64 + OptsCount *string + + // OptsDeleted. + OptsDeleted *bool + + /* OptsDisplayName. + + displayName only used for update queries to set displayName (READONLY). + */ + OptsDisplayName *string + + // OptsExtended. + OptsExtended *bool + + /* OptsGlobalScope. + + globalScope sets partnerID,organizationID,projectID = 0. + */ + OptsGlobalScope *bool + + // OptsGroups. + OptsGroups []string + + /* OptsIgnoreScopeDefault. + + ignoreScopeDefault ignores default values for partnerID, organizationID and + projectID. + */ + OptsIgnoreScopeDefault *bool + + // OptsIsSSOUser. + OptsIsSSOUser *bool + + // OptsLimit. + // + // Format: int64 + OptsLimit *string + + /* OptsName. + + name is unique ID of a resource along with (partnerID, organizationID, + projectID). + */ + OptsName *string + + // OptsOffset. + // + // Format: int64 + OptsOffset *string + + // OptsOrder. + OptsOrder *string + + // OptsOrderBy. + OptsOrderBy *string + + // OptsOrganizationID. + OptsOrganizationID *string + + // OptsPartnerID. + OptsPartnerID *string + + // OptsProjectID. + OptsProjectID *string + + // OptsPublishedVersion. + OptsPublishedVersion *string + + /* OptsSelector. + + selector is used to filter the labels of a resource. + */ + OptsSelector *string + + /* OptsURLScope. + + urlScope is supposed to be passed in the URL as kind/HashID(value). + */ + OptsURLScope *string + + // OptsUsername. + OptsUsername *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the bootstrap get relay networks params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BootstrapGetRelayNetworksParams) WithDefaults() *BootstrapGetRelayNetworksParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the bootstrap get relay networks params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BootstrapGetRelayNetworksParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the bootstrap get relay networks params +func (o *BootstrapGetRelayNetworksParams) WithTimeout(timeout time.Duration) *BootstrapGetRelayNetworksParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the bootstrap get relay networks params +func (o *BootstrapGetRelayNetworksParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the bootstrap get relay networks params +func (o *BootstrapGetRelayNetworksParams) WithContext(ctx context.Context) *BootstrapGetRelayNetworksParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the bootstrap get relay networks params +func (o *BootstrapGetRelayNetworksParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the bootstrap get relay networks params +func (o *BootstrapGetRelayNetworksParams) WithHTTPClient(client *http.Client) *BootstrapGetRelayNetworksParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the bootstrap get relay networks params +func (o *BootstrapGetRelayNetworksParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithOptsID adds the optsID to the bootstrap get relay networks params +func (o *BootstrapGetRelayNetworksParams) WithOptsID(optsID *string) *BootstrapGetRelayNetworksParams { + o.SetOptsID(optsID) + return o +} + +// SetOptsID adds the optsId to the bootstrap get relay networks params +func (o *BootstrapGetRelayNetworksParams) SetOptsID(optsID *string) { + o.OptsID = optsID +} + +// WithOptsBlueprintRef adds the optsBlueprintRef to the bootstrap get relay networks params +func (o *BootstrapGetRelayNetworksParams) WithOptsBlueprintRef(optsBlueprintRef *string) *BootstrapGetRelayNetworksParams { + o.SetOptsBlueprintRef(optsBlueprintRef) + return o +} + +// SetOptsBlueprintRef adds the optsBlueprintRef to the bootstrap get relay networks params +func (o *BootstrapGetRelayNetworksParams) SetOptsBlueprintRef(optsBlueprintRef *string) { + o.OptsBlueprintRef = optsBlueprintRef +} + +// WithOptsClusterID adds the optsClusterID to the bootstrap get relay networks params +func (o *BootstrapGetRelayNetworksParams) WithOptsClusterID(optsClusterID *string) *BootstrapGetRelayNetworksParams { + o.SetOptsClusterID(optsClusterID) + return o +} + +// SetOptsClusterID adds the optsClusterId to the bootstrap get relay networks params +func (o *BootstrapGetRelayNetworksParams) SetOptsClusterID(optsClusterID *string) { + o.OptsClusterID = optsClusterID +} + +// WithOptsCount adds the optsCount to the bootstrap get relay networks params +func (o *BootstrapGetRelayNetworksParams) WithOptsCount(optsCount *string) *BootstrapGetRelayNetworksParams { + o.SetOptsCount(optsCount) + return o +} + +// SetOptsCount adds the optsCount to the bootstrap get relay networks params +func (o *BootstrapGetRelayNetworksParams) SetOptsCount(optsCount *string) { + o.OptsCount = optsCount +} + +// WithOptsDeleted adds the optsDeleted to the bootstrap get relay networks params +func (o *BootstrapGetRelayNetworksParams) WithOptsDeleted(optsDeleted *bool) *BootstrapGetRelayNetworksParams { + o.SetOptsDeleted(optsDeleted) + return o +} + +// SetOptsDeleted adds the optsDeleted to the bootstrap get relay networks params +func (o *BootstrapGetRelayNetworksParams) SetOptsDeleted(optsDeleted *bool) { + o.OptsDeleted = optsDeleted +} + +// WithOptsDisplayName adds the optsDisplayName to the bootstrap get relay networks params +func (o *BootstrapGetRelayNetworksParams) WithOptsDisplayName(optsDisplayName *string) *BootstrapGetRelayNetworksParams { + o.SetOptsDisplayName(optsDisplayName) + return o +} + +// SetOptsDisplayName adds the optsDisplayName to the bootstrap get relay networks params +func (o *BootstrapGetRelayNetworksParams) SetOptsDisplayName(optsDisplayName *string) { + o.OptsDisplayName = optsDisplayName +} + +// WithOptsExtended adds the optsExtended to the bootstrap get relay networks params +func (o *BootstrapGetRelayNetworksParams) WithOptsExtended(optsExtended *bool) *BootstrapGetRelayNetworksParams { + o.SetOptsExtended(optsExtended) + return o +} + +// SetOptsExtended adds the optsExtended to the bootstrap get relay networks params +func (o *BootstrapGetRelayNetworksParams) SetOptsExtended(optsExtended *bool) { + o.OptsExtended = optsExtended +} + +// WithOptsGlobalScope adds the optsGlobalScope to the bootstrap get relay networks params +func (o *BootstrapGetRelayNetworksParams) WithOptsGlobalScope(optsGlobalScope *bool) *BootstrapGetRelayNetworksParams { + o.SetOptsGlobalScope(optsGlobalScope) + return o +} + +// SetOptsGlobalScope adds the optsGlobalScope to the bootstrap get relay networks params +func (o *BootstrapGetRelayNetworksParams) SetOptsGlobalScope(optsGlobalScope *bool) { + o.OptsGlobalScope = optsGlobalScope +} + +// WithOptsGroups adds the optsGroups to the bootstrap get relay networks params +func (o *BootstrapGetRelayNetworksParams) WithOptsGroups(optsGroups []string) *BootstrapGetRelayNetworksParams { + o.SetOptsGroups(optsGroups) + return o +} + +// SetOptsGroups adds the optsGroups to the bootstrap get relay networks params +func (o *BootstrapGetRelayNetworksParams) SetOptsGroups(optsGroups []string) { + o.OptsGroups = optsGroups +} + +// WithOptsIgnoreScopeDefault adds the optsIgnoreScopeDefault to the bootstrap get relay networks params +func (o *BootstrapGetRelayNetworksParams) WithOptsIgnoreScopeDefault(optsIgnoreScopeDefault *bool) *BootstrapGetRelayNetworksParams { + o.SetOptsIgnoreScopeDefault(optsIgnoreScopeDefault) + return o +} + +// SetOptsIgnoreScopeDefault adds the optsIgnoreScopeDefault to the bootstrap get relay networks params +func (o *BootstrapGetRelayNetworksParams) SetOptsIgnoreScopeDefault(optsIgnoreScopeDefault *bool) { + o.OptsIgnoreScopeDefault = optsIgnoreScopeDefault +} + +// WithOptsIsSSOUser adds the optsIsSSOUser to the bootstrap get relay networks params +func (o *BootstrapGetRelayNetworksParams) WithOptsIsSSOUser(optsIsSSOUser *bool) *BootstrapGetRelayNetworksParams { + o.SetOptsIsSSOUser(optsIsSSOUser) + return o +} + +// SetOptsIsSSOUser adds the optsIsSSOUser to the bootstrap get relay networks params +func (o *BootstrapGetRelayNetworksParams) SetOptsIsSSOUser(optsIsSSOUser *bool) { + o.OptsIsSSOUser = optsIsSSOUser +} + +// WithOptsLimit adds the optsLimit to the bootstrap get relay networks params +func (o *BootstrapGetRelayNetworksParams) WithOptsLimit(optsLimit *string) *BootstrapGetRelayNetworksParams { + o.SetOptsLimit(optsLimit) + return o +} + +// SetOptsLimit adds the optsLimit to the bootstrap get relay networks params +func (o *BootstrapGetRelayNetworksParams) SetOptsLimit(optsLimit *string) { + o.OptsLimit = optsLimit +} + +// WithOptsName adds the optsName to the bootstrap get relay networks params +func (o *BootstrapGetRelayNetworksParams) WithOptsName(optsName *string) *BootstrapGetRelayNetworksParams { + o.SetOptsName(optsName) + return o +} + +// SetOptsName adds the optsName to the bootstrap get relay networks params +func (o *BootstrapGetRelayNetworksParams) SetOptsName(optsName *string) { + o.OptsName = optsName +} + +// WithOptsOffset adds the optsOffset to the bootstrap get relay networks params +func (o *BootstrapGetRelayNetworksParams) WithOptsOffset(optsOffset *string) *BootstrapGetRelayNetworksParams { + o.SetOptsOffset(optsOffset) + return o +} + +// SetOptsOffset adds the optsOffset to the bootstrap get relay networks params +func (o *BootstrapGetRelayNetworksParams) SetOptsOffset(optsOffset *string) { + o.OptsOffset = optsOffset +} + +// WithOptsOrder adds the optsOrder to the bootstrap get relay networks params +func (o *BootstrapGetRelayNetworksParams) WithOptsOrder(optsOrder *string) *BootstrapGetRelayNetworksParams { + o.SetOptsOrder(optsOrder) + return o +} + +// SetOptsOrder adds the optsOrder to the bootstrap get relay networks params +func (o *BootstrapGetRelayNetworksParams) SetOptsOrder(optsOrder *string) { + o.OptsOrder = optsOrder +} + +// WithOptsOrderBy adds the optsOrderBy to the bootstrap get relay networks params +func (o *BootstrapGetRelayNetworksParams) WithOptsOrderBy(optsOrderBy *string) *BootstrapGetRelayNetworksParams { + o.SetOptsOrderBy(optsOrderBy) + return o +} + +// SetOptsOrderBy adds the optsOrderBy to the bootstrap get relay networks params +func (o *BootstrapGetRelayNetworksParams) SetOptsOrderBy(optsOrderBy *string) { + o.OptsOrderBy = optsOrderBy +} + +// WithOptsOrganizationID adds the optsOrganizationID to the bootstrap get relay networks params +func (o *BootstrapGetRelayNetworksParams) WithOptsOrganizationID(optsOrganizationID *string) *BootstrapGetRelayNetworksParams { + o.SetOptsOrganizationID(optsOrganizationID) + return o +} + +// SetOptsOrganizationID adds the optsOrganizationId to the bootstrap get relay networks params +func (o *BootstrapGetRelayNetworksParams) SetOptsOrganizationID(optsOrganizationID *string) { + o.OptsOrganizationID = optsOrganizationID +} + +// WithOptsPartnerID adds the optsPartnerID to the bootstrap get relay networks params +func (o *BootstrapGetRelayNetworksParams) WithOptsPartnerID(optsPartnerID *string) *BootstrapGetRelayNetworksParams { + o.SetOptsPartnerID(optsPartnerID) + return o +} + +// SetOptsPartnerID adds the optsPartnerId to the bootstrap get relay networks params +func (o *BootstrapGetRelayNetworksParams) SetOptsPartnerID(optsPartnerID *string) { + o.OptsPartnerID = optsPartnerID +} + +// WithOptsProjectID adds the optsProjectID to the bootstrap get relay networks params +func (o *BootstrapGetRelayNetworksParams) WithOptsProjectID(optsProjectID *string) *BootstrapGetRelayNetworksParams { + o.SetOptsProjectID(optsProjectID) + return o +} + +// SetOptsProjectID adds the optsProjectId to the bootstrap get relay networks params +func (o *BootstrapGetRelayNetworksParams) SetOptsProjectID(optsProjectID *string) { + o.OptsProjectID = optsProjectID +} + +// WithOptsPublishedVersion adds the optsPublishedVersion to the bootstrap get relay networks params +func (o *BootstrapGetRelayNetworksParams) WithOptsPublishedVersion(optsPublishedVersion *string) *BootstrapGetRelayNetworksParams { + o.SetOptsPublishedVersion(optsPublishedVersion) + return o +} + +// SetOptsPublishedVersion adds the optsPublishedVersion to the bootstrap get relay networks params +func (o *BootstrapGetRelayNetworksParams) SetOptsPublishedVersion(optsPublishedVersion *string) { + o.OptsPublishedVersion = optsPublishedVersion +} + +// WithOptsSelector adds the optsSelector to the bootstrap get relay networks params +func (o *BootstrapGetRelayNetworksParams) WithOptsSelector(optsSelector *string) *BootstrapGetRelayNetworksParams { + o.SetOptsSelector(optsSelector) + return o +} + +// SetOptsSelector adds the optsSelector to the bootstrap get relay networks params +func (o *BootstrapGetRelayNetworksParams) SetOptsSelector(optsSelector *string) { + o.OptsSelector = optsSelector +} + +// WithOptsURLScope adds the optsURLScope to the bootstrap get relay networks params +func (o *BootstrapGetRelayNetworksParams) WithOptsURLScope(optsURLScope *string) *BootstrapGetRelayNetworksParams { + o.SetOptsURLScope(optsURLScope) + return o +} + +// SetOptsURLScope adds the optsUrlScope to the bootstrap get relay networks params +func (o *BootstrapGetRelayNetworksParams) SetOptsURLScope(optsURLScope *string) { + o.OptsURLScope = optsURLScope +} + +// WithOptsUsername adds the optsUsername to the bootstrap get relay networks params +func (o *BootstrapGetRelayNetworksParams) WithOptsUsername(optsUsername *string) *BootstrapGetRelayNetworksParams { + o.SetOptsUsername(optsUsername) + return o +} + +// SetOptsUsername adds the optsUsername to the bootstrap get relay networks params +func (o *BootstrapGetRelayNetworksParams) SetOptsUsername(optsUsername *string) { + o.OptsUsername = optsUsername +} + +// WriteToRequest writes these params to a swagger request +func (o *BootstrapGetRelayNetworksParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.OptsID != nil { + + // query param opts.ID + var qrOptsID string + + if o.OptsID != nil { + qrOptsID = *o.OptsID + } + qOptsID := qrOptsID + if qOptsID != "" { + + if err := r.SetQueryParam("opts.ID", qOptsID); err != nil { + return err + } + } + } + + if o.OptsBlueprintRef != nil { + + // query param opts.blueprintRef + var qrOptsBlueprintRef string + + if o.OptsBlueprintRef != nil { + qrOptsBlueprintRef = *o.OptsBlueprintRef + } + qOptsBlueprintRef := qrOptsBlueprintRef + if qOptsBlueprintRef != "" { + + if err := r.SetQueryParam("opts.blueprintRef", qOptsBlueprintRef); err != nil { + return err + } + } + } + + if o.OptsClusterID != nil { + + // query param opts.clusterID + var qrOptsClusterID string + + if o.OptsClusterID != nil { + qrOptsClusterID = *o.OptsClusterID + } + qOptsClusterID := qrOptsClusterID + if qOptsClusterID != "" { + + if err := r.SetQueryParam("opts.clusterID", qOptsClusterID); err != nil { + return err + } + } + } + + if o.OptsCount != nil { + + // query param opts.count + var qrOptsCount string + + if o.OptsCount != nil { + qrOptsCount = *o.OptsCount + } + qOptsCount := qrOptsCount + if qOptsCount != "" { + + if err := r.SetQueryParam("opts.count", qOptsCount); err != nil { + return err + } + } + } + + if o.OptsDeleted != nil { + + // query param opts.deleted + var qrOptsDeleted bool + + if o.OptsDeleted != nil { + qrOptsDeleted = *o.OptsDeleted + } + qOptsDeleted := swag.FormatBool(qrOptsDeleted) + if qOptsDeleted != "" { + + if err := r.SetQueryParam("opts.deleted", qOptsDeleted); err != nil { + return err + } + } + } + + if o.OptsDisplayName != nil { + + // query param opts.displayName + var qrOptsDisplayName string + + if o.OptsDisplayName != nil { + qrOptsDisplayName = *o.OptsDisplayName + } + qOptsDisplayName := qrOptsDisplayName + if qOptsDisplayName != "" { + + if err := r.SetQueryParam("opts.displayName", qOptsDisplayName); err != nil { + return err + } + } + } + + if o.OptsExtended != nil { + + // query param opts.extended + var qrOptsExtended bool + + if o.OptsExtended != nil { + qrOptsExtended = *o.OptsExtended + } + qOptsExtended := swag.FormatBool(qrOptsExtended) + if qOptsExtended != "" { + + if err := r.SetQueryParam("opts.extended", qOptsExtended); err != nil { + return err + } + } + } + + if o.OptsGlobalScope != nil { + + // query param opts.globalScope + var qrOptsGlobalScope bool + + if o.OptsGlobalScope != nil { + qrOptsGlobalScope = *o.OptsGlobalScope + } + qOptsGlobalScope := swag.FormatBool(qrOptsGlobalScope) + if qOptsGlobalScope != "" { + + if err := r.SetQueryParam("opts.globalScope", qOptsGlobalScope); err != nil { + return err + } + } + } + + if o.OptsGroups != nil { + + // binding items for opts.groups + joinedOptsGroups := o.bindParamOptsGroups(reg) + + // query array param opts.groups + if err := r.SetQueryParam("opts.groups", joinedOptsGroups...); err != nil { + return err + } + } + + if o.OptsIgnoreScopeDefault != nil { + + // query param opts.ignoreScopeDefault + var qrOptsIgnoreScopeDefault bool + + if o.OptsIgnoreScopeDefault != nil { + qrOptsIgnoreScopeDefault = *o.OptsIgnoreScopeDefault + } + qOptsIgnoreScopeDefault := swag.FormatBool(qrOptsIgnoreScopeDefault) + if qOptsIgnoreScopeDefault != "" { + + if err := r.SetQueryParam("opts.ignoreScopeDefault", qOptsIgnoreScopeDefault); err != nil { + return err + } + } + } + + if o.OptsIsSSOUser != nil { + + // query param opts.isSSOUser + var qrOptsIsSSOUser bool + + if o.OptsIsSSOUser != nil { + qrOptsIsSSOUser = *o.OptsIsSSOUser + } + qOptsIsSSOUser := swag.FormatBool(qrOptsIsSSOUser) + if qOptsIsSSOUser != "" { + + if err := r.SetQueryParam("opts.isSSOUser", qOptsIsSSOUser); err != nil { + return err + } + } + } + + if o.OptsLimit != nil { + + // query param opts.limit + var qrOptsLimit string + + if o.OptsLimit != nil { + qrOptsLimit = *o.OptsLimit + } + qOptsLimit := qrOptsLimit + if qOptsLimit != "" { + + if err := r.SetQueryParam("opts.limit", qOptsLimit); err != nil { + return err + } + } + } + + if o.OptsName != nil { + + // query param opts.name + var qrOptsName string + + if o.OptsName != nil { + qrOptsName = *o.OptsName + } + qOptsName := qrOptsName + if qOptsName != "" { + + if err := r.SetQueryParam("opts.name", qOptsName); err != nil { + return err + } + } + } + + if o.OptsOffset != nil { + + // query param opts.offset + var qrOptsOffset string + + if o.OptsOffset != nil { + qrOptsOffset = *o.OptsOffset + } + qOptsOffset := qrOptsOffset + if qOptsOffset != "" { + + if err := r.SetQueryParam("opts.offset", qOptsOffset); err != nil { + return err + } + } + } + + if o.OptsOrder != nil { + + // query param opts.order + var qrOptsOrder string + + if o.OptsOrder != nil { + qrOptsOrder = *o.OptsOrder + } + qOptsOrder := qrOptsOrder + if qOptsOrder != "" { + + if err := r.SetQueryParam("opts.order", qOptsOrder); err != nil { + return err + } + } + } + + if o.OptsOrderBy != nil { + + // query param opts.orderBy + var qrOptsOrderBy string + + if o.OptsOrderBy != nil { + qrOptsOrderBy = *o.OptsOrderBy + } + qOptsOrderBy := qrOptsOrderBy + if qOptsOrderBy != "" { + + if err := r.SetQueryParam("opts.orderBy", qOptsOrderBy); err != nil { + return err + } + } + } + + if o.OptsOrganizationID != nil { + + // query param opts.organizationID + var qrOptsOrganizationID string + + if o.OptsOrganizationID != nil { + qrOptsOrganizationID = *o.OptsOrganizationID + } + qOptsOrganizationID := qrOptsOrganizationID + if qOptsOrganizationID != "" { + + if err := r.SetQueryParam("opts.organizationID", qOptsOrganizationID); err != nil { + return err + } + } + } + + if o.OptsPartnerID != nil { + + // query param opts.partnerID + var qrOptsPartnerID string + + if o.OptsPartnerID != nil { + qrOptsPartnerID = *o.OptsPartnerID + } + qOptsPartnerID := qrOptsPartnerID + if qOptsPartnerID != "" { + + if err := r.SetQueryParam("opts.partnerID", qOptsPartnerID); err != nil { + return err + } + } + } + + if o.OptsProjectID != nil { + + // query param opts.projectID + var qrOptsProjectID string + + if o.OptsProjectID != nil { + qrOptsProjectID = *o.OptsProjectID + } + qOptsProjectID := qrOptsProjectID + if qOptsProjectID != "" { + + if err := r.SetQueryParam("opts.projectID", qOptsProjectID); err != nil { + return err + } + } + } + + if o.OptsPublishedVersion != nil { + + // query param opts.publishedVersion + var qrOptsPublishedVersion string + + if o.OptsPublishedVersion != nil { + qrOptsPublishedVersion = *o.OptsPublishedVersion + } + qOptsPublishedVersion := qrOptsPublishedVersion + if qOptsPublishedVersion != "" { + + if err := r.SetQueryParam("opts.publishedVersion", qOptsPublishedVersion); err != nil { + return err + } + } + } + + if o.OptsSelector != nil { + + // query param opts.selector + var qrOptsSelector string + + if o.OptsSelector != nil { + qrOptsSelector = *o.OptsSelector + } + qOptsSelector := qrOptsSelector + if qOptsSelector != "" { + + if err := r.SetQueryParam("opts.selector", qOptsSelector); err != nil { + return err + } + } + } + + if o.OptsURLScope != nil { + + // query param opts.urlScope + var qrOptsURLScope string + + if o.OptsURLScope != nil { + qrOptsURLScope = *o.OptsURLScope + } + qOptsURLScope := qrOptsURLScope + if qOptsURLScope != "" { + + if err := r.SetQueryParam("opts.urlScope", qOptsURLScope); err != nil { + return err + } + } + } + + if o.OptsUsername != nil { + + // query param opts.username + var qrOptsUsername string + + if o.OptsUsername != nil { + qrOptsUsername = *o.OptsUsername + } + qOptsUsername := qrOptsUsername + if qOptsUsername != "" { + + if err := r.SetQueryParam("opts.username", qOptsUsername); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// bindParamBootstrapGetRelayNetworks binds the parameter opts.groups +func (o *BootstrapGetRelayNetworksParams) bindParamOptsGroups(formats strfmt.Registry) []string { + optsGroupsIR := o.OptsGroups + + var optsGroupsIC []string + for _, optsGroupsIIR := range optsGroupsIR { // explode []string + + optsGroupsIIV := optsGroupsIIR // string as string + optsGroupsIC = append(optsGroupsIC, optsGroupsIIV) + } + + // items.CollectionFormat: "multi" + optsGroupsIS := swag.JoinByFormat(optsGroupsIC, "multi") + + return optsGroupsIS +} diff --git a/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_get_relay_networks_responses.go b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_get_relay_networks_responses.go new file mode 100644 index 0000000..e25b6f9 --- /dev/null +++ b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_get_relay_networks_responses.go @@ -0,0 +1,223 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package bootstrap + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/RafaySystems/rcloud-base/components/common/api/def/clients/sentry/models" +) + +// BootstrapGetRelayNetworksReader is a Reader for the BootstrapGetRelayNetworks structure. +type BootstrapGetRelayNetworksReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *BootstrapGetRelayNetworksReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewBootstrapGetRelayNetworksOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 403: + result := NewBootstrapGetRelayNetworksForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewBootstrapGetRelayNetworksNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewBootstrapGetRelayNetworksInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + result := NewBootstrapGetRelayNetworksDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewBootstrapGetRelayNetworksOK creates a BootstrapGetRelayNetworksOK with default headers values +func NewBootstrapGetRelayNetworksOK() *BootstrapGetRelayNetworksOK { + return &BootstrapGetRelayNetworksOK{} +} + +/* BootstrapGetRelayNetworksOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type BootstrapGetRelayNetworksOK struct { + Payload *models.SentryRelayNetworkList +} + +func (o *BootstrapGetRelayNetworksOK) Error() string { + return fmt.Sprintf("[GET /v2/sentry/relaynetwork][%d] bootstrapGetRelayNetworksOK %+v", 200, o.Payload) +} +func (o *BootstrapGetRelayNetworksOK) GetPayload() *models.SentryRelayNetworkList { + return o.Payload +} + +func (o *BootstrapGetRelayNetworksOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.SentryRelayNetworkList) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBootstrapGetRelayNetworksForbidden creates a BootstrapGetRelayNetworksForbidden with default headers values +func NewBootstrapGetRelayNetworksForbidden() *BootstrapGetRelayNetworksForbidden { + return &BootstrapGetRelayNetworksForbidden{} +} + +/* BootstrapGetRelayNetworksForbidden describes a response with status code 403, with default header values. + +Returned when the user does not have permission to access the resource. +*/ +type BootstrapGetRelayNetworksForbidden struct { + Payload interface{} +} + +func (o *BootstrapGetRelayNetworksForbidden) Error() string { + return fmt.Sprintf("[GET /v2/sentry/relaynetwork][%d] bootstrapGetRelayNetworksForbidden %+v", 403, o.Payload) +} +func (o *BootstrapGetRelayNetworksForbidden) GetPayload() interface{} { + return o.Payload +} + +func (o *BootstrapGetRelayNetworksForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBootstrapGetRelayNetworksNotFound creates a BootstrapGetRelayNetworksNotFound with default headers values +func NewBootstrapGetRelayNetworksNotFound() *BootstrapGetRelayNetworksNotFound { + return &BootstrapGetRelayNetworksNotFound{} +} + +/* BootstrapGetRelayNetworksNotFound describes a response with status code 404, with default header values. + +Returned when the resource does not exist. +*/ +type BootstrapGetRelayNetworksNotFound struct { + Payload interface{} +} + +func (o *BootstrapGetRelayNetworksNotFound) Error() string { + return fmt.Sprintf("[GET /v2/sentry/relaynetwork][%d] bootstrapGetRelayNetworksNotFound %+v", 404, o.Payload) +} +func (o *BootstrapGetRelayNetworksNotFound) GetPayload() interface{} { + return o.Payload +} + +func (o *BootstrapGetRelayNetworksNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBootstrapGetRelayNetworksInternalServerError creates a BootstrapGetRelayNetworksInternalServerError with default headers values +func NewBootstrapGetRelayNetworksInternalServerError() *BootstrapGetRelayNetworksInternalServerError { + return &BootstrapGetRelayNetworksInternalServerError{} +} + +/* BootstrapGetRelayNetworksInternalServerError describes a response with status code 500, with default header values. + +Returned for internal server error +*/ +type BootstrapGetRelayNetworksInternalServerError struct { + Payload interface{} +} + +func (o *BootstrapGetRelayNetworksInternalServerError) Error() string { + return fmt.Sprintf("[GET /v2/sentry/relaynetwork][%d] bootstrapGetRelayNetworksInternalServerError %+v", 500, o.Payload) +} +func (o *BootstrapGetRelayNetworksInternalServerError) GetPayload() interface{} { + return o.Payload +} + +func (o *BootstrapGetRelayNetworksInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBootstrapGetRelayNetworksDefault creates a BootstrapGetRelayNetworksDefault with default headers values +func NewBootstrapGetRelayNetworksDefault(code int) *BootstrapGetRelayNetworksDefault { + return &BootstrapGetRelayNetworksDefault{ + _statusCode: code, + } +} + +/* BootstrapGetRelayNetworksDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type BootstrapGetRelayNetworksDefault struct { + _statusCode int + + Payload *models.GooglerpcStatus +} + +// Code gets the status code for the bootstrap get relay networks default response +func (o *BootstrapGetRelayNetworksDefault) Code() int { + return o._statusCode +} + +func (o *BootstrapGetRelayNetworksDefault) Error() string { + return fmt.Sprintf("[GET /v2/sentry/relaynetwork][%d] Bootstrap_GetRelayNetworks default %+v", o._statusCode, o.Payload) +} +func (o *BootstrapGetRelayNetworksDefault) GetPayload() *models.GooglerpcStatus { + return o.Payload +} + +func (o *BootstrapGetRelayNetworksDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.GooglerpcStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_patch_bootstrap_agent_template_parameters.go b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_patch_bootstrap_agent_template_parameters.go new file mode 100644 index 0000000..8058f28 --- /dev/null +++ b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_patch_bootstrap_agent_template_parameters.go @@ -0,0 +1,170 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package bootstrap + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/RafaySystems/rcloud-base/components/common/api/def/clients/sentry/models" +) + +// NewBootstrapPatchBootstrapAgentTemplateParams creates a new BootstrapPatchBootstrapAgentTemplateParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewBootstrapPatchBootstrapAgentTemplateParams() *BootstrapPatchBootstrapAgentTemplateParams { + return &BootstrapPatchBootstrapAgentTemplateParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewBootstrapPatchBootstrapAgentTemplateParamsWithTimeout creates a new BootstrapPatchBootstrapAgentTemplateParams object +// with the ability to set a timeout on a request. +func NewBootstrapPatchBootstrapAgentTemplateParamsWithTimeout(timeout time.Duration) *BootstrapPatchBootstrapAgentTemplateParams { + return &BootstrapPatchBootstrapAgentTemplateParams{ + timeout: timeout, + } +} + +// NewBootstrapPatchBootstrapAgentTemplateParamsWithContext creates a new BootstrapPatchBootstrapAgentTemplateParams object +// with the ability to set a context for a request. +func NewBootstrapPatchBootstrapAgentTemplateParamsWithContext(ctx context.Context) *BootstrapPatchBootstrapAgentTemplateParams { + return &BootstrapPatchBootstrapAgentTemplateParams{ + Context: ctx, + } +} + +// NewBootstrapPatchBootstrapAgentTemplateParamsWithHTTPClient creates a new BootstrapPatchBootstrapAgentTemplateParams object +// with the ability to set a custom HTTPClient for a request. +func NewBootstrapPatchBootstrapAgentTemplateParamsWithHTTPClient(client *http.Client) *BootstrapPatchBootstrapAgentTemplateParams { + return &BootstrapPatchBootstrapAgentTemplateParams{ + HTTPClient: client, + } +} + +/* BootstrapPatchBootstrapAgentTemplateParams contains all the parameters to send to the API endpoint + for the bootstrap patch bootstrap agent template operation. + + Typically these are written to a http.Request. +*/ +type BootstrapPatchBootstrapAgentTemplateParams struct { + + // Body. + Body *models.SentryBootstrapAgentTemplate + + /* MetadataName. + + name of the resource + */ + MetadataName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the bootstrap patch bootstrap agent template params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BootstrapPatchBootstrapAgentTemplateParams) WithDefaults() *BootstrapPatchBootstrapAgentTemplateParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the bootstrap patch bootstrap agent template params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BootstrapPatchBootstrapAgentTemplateParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the bootstrap patch bootstrap agent template params +func (o *BootstrapPatchBootstrapAgentTemplateParams) WithTimeout(timeout time.Duration) *BootstrapPatchBootstrapAgentTemplateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the bootstrap patch bootstrap agent template params +func (o *BootstrapPatchBootstrapAgentTemplateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the bootstrap patch bootstrap agent template params +func (o *BootstrapPatchBootstrapAgentTemplateParams) WithContext(ctx context.Context) *BootstrapPatchBootstrapAgentTemplateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the bootstrap patch bootstrap agent template params +func (o *BootstrapPatchBootstrapAgentTemplateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the bootstrap patch bootstrap agent template params +func (o *BootstrapPatchBootstrapAgentTemplateParams) WithHTTPClient(client *http.Client) *BootstrapPatchBootstrapAgentTemplateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the bootstrap patch bootstrap agent template params +func (o *BootstrapPatchBootstrapAgentTemplateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the bootstrap patch bootstrap agent template params +func (o *BootstrapPatchBootstrapAgentTemplateParams) WithBody(body *models.SentryBootstrapAgentTemplate) *BootstrapPatchBootstrapAgentTemplateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the bootstrap patch bootstrap agent template params +func (o *BootstrapPatchBootstrapAgentTemplateParams) SetBody(body *models.SentryBootstrapAgentTemplate) { + o.Body = body +} + +// WithMetadataName adds the metadataName to the bootstrap patch bootstrap agent template params +func (o *BootstrapPatchBootstrapAgentTemplateParams) WithMetadataName(metadataName string) *BootstrapPatchBootstrapAgentTemplateParams { + o.SetMetadataName(metadataName) + return o +} + +// SetMetadataName adds the metadataName to the bootstrap patch bootstrap agent template params +func (o *BootstrapPatchBootstrapAgentTemplateParams) SetMetadataName(metadataName string) { + o.MetadataName = metadataName +} + +// WriteToRequest writes these params to a swagger request +func (o *BootstrapPatchBootstrapAgentTemplateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param metadata.name + if err := r.SetPathParam("metadata.name", o.MetadataName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_patch_bootstrap_agent_template_responses.go b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_patch_bootstrap_agent_template_responses.go new file mode 100644 index 0000000..a8dcfae --- /dev/null +++ b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_patch_bootstrap_agent_template_responses.go @@ -0,0 +1,223 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package bootstrap + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/RafaySystems/rcloud-base/components/common/api/def/clients/sentry/models" +) + +// BootstrapPatchBootstrapAgentTemplateReader is a Reader for the BootstrapPatchBootstrapAgentTemplate structure. +type BootstrapPatchBootstrapAgentTemplateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *BootstrapPatchBootstrapAgentTemplateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewBootstrapPatchBootstrapAgentTemplateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 403: + result := NewBootstrapPatchBootstrapAgentTemplateForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewBootstrapPatchBootstrapAgentTemplateNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewBootstrapPatchBootstrapAgentTemplateInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + result := NewBootstrapPatchBootstrapAgentTemplateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewBootstrapPatchBootstrapAgentTemplateOK creates a BootstrapPatchBootstrapAgentTemplateOK with default headers values +func NewBootstrapPatchBootstrapAgentTemplateOK() *BootstrapPatchBootstrapAgentTemplateOK { + return &BootstrapPatchBootstrapAgentTemplateOK{} +} + +/* BootstrapPatchBootstrapAgentTemplateOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type BootstrapPatchBootstrapAgentTemplateOK struct { + Payload *models.SentryBootstrapAgentTemplate +} + +func (o *BootstrapPatchBootstrapAgentTemplateOK) Error() string { + return fmt.Sprintf("[PUT /v2/sentry/bootstrap/template/{metadata.name}][%d] bootstrapPatchBootstrapAgentTemplateOK %+v", 200, o.Payload) +} +func (o *BootstrapPatchBootstrapAgentTemplateOK) GetPayload() *models.SentryBootstrapAgentTemplate { + return o.Payload +} + +func (o *BootstrapPatchBootstrapAgentTemplateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.SentryBootstrapAgentTemplate) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBootstrapPatchBootstrapAgentTemplateForbidden creates a BootstrapPatchBootstrapAgentTemplateForbidden with default headers values +func NewBootstrapPatchBootstrapAgentTemplateForbidden() *BootstrapPatchBootstrapAgentTemplateForbidden { + return &BootstrapPatchBootstrapAgentTemplateForbidden{} +} + +/* BootstrapPatchBootstrapAgentTemplateForbidden describes a response with status code 403, with default header values. + +Returned when the user does not have permission to access the resource. +*/ +type BootstrapPatchBootstrapAgentTemplateForbidden struct { + Payload interface{} +} + +func (o *BootstrapPatchBootstrapAgentTemplateForbidden) Error() string { + return fmt.Sprintf("[PUT /v2/sentry/bootstrap/template/{metadata.name}][%d] bootstrapPatchBootstrapAgentTemplateForbidden %+v", 403, o.Payload) +} +func (o *BootstrapPatchBootstrapAgentTemplateForbidden) GetPayload() interface{} { + return o.Payload +} + +func (o *BootstrapPatchBootstrapAgentTemplateForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBootstrapPatchBootstrapAgentTemplateNotFound creates a BootstrapPatchBootstrapAgentTemplateNotFound with default headers values +func NewBootstrapPatchBootstrapAgentTemplateNotFound() *BootstrapPatchBootstrapAgentTemplateNotFound { + return &BootstrapPatchBootstrapAgentTemplateNotFound{} +} + +/* BootstrapPatchBootstrapAgentTemplateNotFound describes a response with status code 404, with default header values. + +Returned when the resource does not exist. +*/ +type BootstrapPatchBootstrapAgentTemplateNotFound struct { + Payload interface{} +} + +func (o *BootstrapPatchBootstrapAgentTemplateNotFound) Error() string { + return fmt.Sprintf("[PUT /v2/sentry/bootstrap/template/{metadata.name}][%d] bootstrapPatchBootstrapAgentTemplateNotFound %+v", 404, o.Payload) +} +func (o *BootstrapPatchBootstrapAgentTemplateNotFound) GetPayload() interface{} { + return o.Payload +} + +func (o *BootstrapPatchBootstrapAgentTemplateNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBootstrapPatchBootstrapAgentTemplateInternalServerError creates a BootstrapPatchBootstrapAgentTemplateInternalServerError with default headers values +func NewBootstrapPatchBootstrapAgentTemplateInternalServerError() *BootstrapPatchBootstrapAgentTemplateInternalServerError { + return &BootstrapPatchBootstrapAgentTemplateInternalServerError{} +} + +/* BootstrapPatchBootstrapAgentTemplateInternalServerError describes a response with status code 500, with default header values. + +Returned for internal server error +*/ +type BootstrapPatchBootstrapAgentTemplateInternalServerError struct { + Payload interface{} +} + +func (o *BootstrapPatchBootstrapAgentTemplateInternalServerError) Error() string { + return fmt.Sprintf("[PUT /v2/sentry/bootstrap/template/{metadata.name}][%d] bootstrapPatchBootstrapAgentTemplateInternalServerError %+v", 500, o.Payload) +} +func (o *BootstrapPatchBootstrapAgentTemplateInternalServerError) GetPayload() interface{} { + return o.Payload +} + +func (o *BootstrapPatchBootstrapAgentTemplateInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBootstrapPatchBootstrapAgentTemplateDefault creates a BootstrapPatchBootstrapAgentTemplateDefault with default headers values +func NewBootstrapPatchBootstrapAgentTemplateDefault(code int) *BootstrapPatchBootstrapAgentTemplateDefault { + return &BootstrapPatchBootstrapAgentTemplateDefault{ + _statusCode: code, + } +} + +/* BootstrapPatchBootstrapAgentTemplateDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type BootstrapPatchBootstrapAgentTemplateDefault struct { + _statusCode int + + Payload *models.GooglerpcStatus +} + +// Code gets the status code for the bootstrap patch bootstrap agent template default response +func (o *BootstrapPatchBootstrapAgentTemplateDefault) Code() int { + return o._statusCode +} + +func (o *BootstrapPatchBootstrapAgentTemplateDefault) Error() string { + return fmt.Sprintf("[PUT /v2/sentry/bootstrap/template/{metadata.name}][%d] Bootstrap_PatchBootstrapAgentTemplate default %+v", o._statusCode, o.Payload) +} +func (o *BootstrapPatchBootstrapAgentTemplateDefault) GetPayload() *models.GooglerpcStatus { + return o.Payload +} + +func (o *BootstrapPatchBootstrapAgentTemplateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.GooglerpcStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_patch_bootstrap_infra_parameters.go b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_patch_bootstrap_infra_parameters.go new file mode 100644 index 0000000..c9d0b2d --- /dev/null +++ b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_patch_bootstrap_infra_parameters.go @@ -0,0 +1,170 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package bootstrap + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/RafaySystems/rcloud-base/components/common/api/def/clients/sentry/models" +) + +// NewBootstrapPatchBootstrapInfraParams creates a new BootstrapPatchBootstrapInfraParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewBootstrapPatchBootstrapInfraParams() *BootstrapPatchBootstrapInfraParams { + return &BootstrapPatchBootstrapInfraParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewBootstrapPatchBootstrapInfraParamsWithTimeout creates a new BootstrapPatchBootstrapInfraParams object +// with the ability to set a timeout on a request. +func NewBootstrapPatchBootstrapInfraParamsWithTimeout(timeout time.Duration) *BootstrapPatchBootstrapInfraParams { + return &BootstrapPatchBootstrapInfraParams{ + timeout: timeout, + } +} + +// NewBootstrapPatchBootstrapInfraParamsWithContext creates a new BootstrapPatchBootstrapInfraParams object +// with the ability to set a context for a request. +func NewBootstrapPatchBootstrapInfraParamsWithContext(ctx context.Context) *BootstrapPatchBootstrapInfraParams { + return &BootstrapPatchBootstrapInfraParams{ + Context: ctx, + } +} + +// NewBootstrapPatchBootstrapInfraParamsWithHTTPClient creates a new BootstrapPatchBootstrapInfraParams object +// with the ability to set a custom HTTPClient for a request. +func NewBootstrapPatchBootstrapInfraParamsWithHTTPClient(client *http.Client) *BootstrapPatchBootstrapInfraParams { + return &BootstrapPatchBootstrapInfraParams{ + HTTPClient: client, + } +} + +/* BootstrapPatchBootstrapInfraParams contains all the parameters to send to the API endpoint + for the bootstrap patch bootstrap infra operation. + + Typically these are written to a http.Request. +*/ +type BootstrapPatchBootstrapInfraParams struct { + + // Body. + Body *models.SentryBootstrapInfra + + /* MetadataName. + + name of the resource + */ + MetadataName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the bootstrap patch bootstrap infra params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BootstrapPatchBootstrapInfraParams) WithDefaults() *BootstrapPatchBootstrapInfraParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the bootstrap patch bootstrap infra params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BootstrapPatchBootstrapInfraParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the bootstrap patch bootstrap infra params +func (o *BootstrapPatchBootstrapInfraParams) WithTimeout(timeout time.Duration) *BootstrapPatchBootstrapInfraParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the bootstrap patch bootstrap infra params +func (o *BootstrapPatchBootstrapInfraParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the bootstrap patch bootstrap infra params +func (o *BootstrapPatchBootstrapInfraParams) WithContext(ctx context.Context) *BootstrapPatchBootstrapInfraParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the bootstrap patch bootstrap infra params +func (o *BootstrapPatchBootstrapInfraParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the bootstrap patch bootstrap infra params +func (o *BootstrapPatchBootstrapInfraParams) WithHTTPClient(client *http.Client) *BootstrapPatchBootstrapInfraParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the bootstrap patch bootstrap infra params +func (o *BootstrapPatchBootstrapInfraParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the bootstrap patch bootstrap infra params +func (o *BootstrapPatchBootstrapInfraParams) WithBody(body *models.SentryBootstrapInfra) *BootstrapPatchBootstrapInfraParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the bootstrap patch bootstrap infra params +func (o *BootstrapPatchBootstrapInfraParams) SetBody(body *models.SentryBootstrapInfra) { + o.Body = body +} + +// WithMetadataName adds the metadataName to the bootstrap patch bootstrap infra params +func (o *BootstrapPatchBootstrapInfraParams) WithMetadataName(metadataName string) *BootstrapPatchBootstrapInfraParams { + o.SetMetadataName(metadataName) + return o +} + +// SetMetadataName adds the metadataName to the bootstrap patch bootstrap infra params +func (o *BootstrapPatchBootstrapInfraParams) SetMetadataName(metadataName string) { + o.MetadataName = metadataName +} + +// WriteToRequest writes these params to a swagger request +func (o *BootstrapPatchBootstrapInfraParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param metadata.name + if err := r.SetPathParam("metadata.name", o.MetadataName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_patch_bootstrap_infra_responses.go b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_patch_bootstrap_infra_responses.go new file mode 100644 index 0000000..b32d949 --- /dev/null +++ b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_patch_bootstrap_infra_responses.go @@ -0,0 +1,223 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package bootstrap + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/RafaySystems/rcloud-base/components/common/api/def/clients/sentry/models" +) + +// BootstrapPatchBootstrapInfraReader is a Reader for the BootstrapPatchBootstrapInfra structure. +type BootstrapPatchBootstrapInfraReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *BootstrapPatchBootstrapInfraReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewBootstrapPatchBootstrapInfraOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 403: + result := NewBootstrapPatchBootstrapInfraForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewBootstrapPatchBootstrapInfraNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewBootstrapPatchBootstrapInfraInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + result := NewBootstrapPatchBootstrapInfraDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewBootstrapPatchBootstrapInfraOK creates a BootstrapPatchBootstrapInfraOK with default headers values +func NewBootstrapPatchBootstrapInfraOK() *BootstrapPatchBootstrapInfraOK { + return &BootstrapPatchBootstrapInfraOK{} +} + +/* BootstrapPatchBootstrapInfraOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type BootstrapPatchBootstrapInfraOK struct { + Payload *models.SentryBootstrapInfra +} + +func (o *BootstrapPatchBootstrapInfraOK) Error() string { + return fmt.Sprintf("[PUT /v2/sentry/bootstrap/infra/{metadata.name}][%d] bootstrapPatchBootstrapInfraOK %+v", 200, o.Payload) +} +func (o *BootstrapPatchBootstrapInfraOK) GetPayload() *models.SentryBootstrapInfra { + return o.Payload +} + +func (o *BootstrapPatchBootstrapInfraOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.SentryBootstrapInfra) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBootstrapPatchBootstrapInfraForbidden creates a BootstrapPatchBootstrapInfraForbidden with default headers values +func NewBootstrapPatchBootstrapInfraForbidden() *BootstrapPatchBootstrapInfraForbidden { + return &BootstrapPatchBootstrapInfraForbidden{} +} + +/* BootstrapPatchBootstrapInfraForbidden describes a response with status code 403, with default header values. + +Returned when the user does not have permission to access the resource. +*/ +type BootstrapPatchBootstrapInfraForbidden struct { + Payload interface{} +} + +func (o *BootstrapPatchBootstrapInfraForbidden) Error() string { + return fmt.Sprintf("[PUT /v2/sentry/bootstrap/infra/{metadata.name}][%d] bootstrapPatchBootstrapInfraForbidden %+v", 403, o.Payload) +} +func (o *BootstrapPatchBootstrapInfraForbidden) GetPayload() interface{} { + return o.Payload +} + +func (o *BootstrapPatchBootstrapInfraForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBootstrapPatchBootstrapInfraNotFound creates a BootstrapPatchBootstrapInfraNotFound with default headers values +func NewBootstrapPatchBootstrapInfraNotFound() *BootstrapPatchBootstrapInfraNotFound { + return &BootstrapPatchBootstrapInfraNotFound{} +} + +/* BootstrapPatchBootstrapInfraNotFound describes a response with status code 404, with default header values. + +Returned when the resource does not exist. +*/ +type BootstrapPatchBootstrapInfraNotFound struct { + Payload interface{} +} + +func (o *BootstrapPatchBootstrapInfraNotFound) Error() string { + return fmt.Sprintf("[PUT /v2/sentry/bootstrap/infra/{metadata.name}][%d] bootstrapPatchBootstrapInfraNotFound %+v", 404, o.Payload) +} +func (o *BootstrapPatchBootstrapInfraNotFound) GetPayload() interface{} { + return o.Payload +} + +func (o *BootstrapPatchBootstrapInfraNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBootstrapPatchBootstrapInfraInternalServerError creates a BootstrapPatchBootstrapInfraInternalServerError with default headers values +func NewBootstrapPatchBootstrapInfraInternalServerError() *BootstrapPatchBootstrapInfraInternalServerError { + return &BootstrapPatchBootstrapInfraInternalServerError{} +} + +/* BootstrapPatchBootstrapInfraInternalServerError describes a response with status code 500, with default header values. + +Returned for internal server error +*/ +type BootstrapPatchBootstrapInfraInternalServerError struct { + Payload interface{} +} + +func (o *BootstrapPatchBootstrapInfraInternalServerError) Error() string { + return fmt.Sprintf("[PUT /v2/sentry/bootstrap/infra/{metadata.name}][%d] bootstrapPatchBootstrapInfraInternalServerError %+v", 500, o.Payload) +} +func (o *BootstrapPatchBootstrapInfraInternalServerError) GetPayload() interface{} { + return o.Payload +} + +func (o *BootstrapPatchBootstrapInfraInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBootstrapPatchBootstrapInfraDefault creates a BootstrapPatchBootstrapInfraDefault with default headers values +func NewBootstrapPatchBootstrapInfraDefault(code int) *BootstrapPatchBootstrapInfraDefault { + return &BootstrapPatchBootstrapInfraDefault{ + _statusCode: code, + } +} + +/* BootstrapPatchBootstrapInfraDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type BootstrapPatchBootstrapInfraDefault struct { + _statusCode int + + Payload *models.GooglerpcStatus +} + +// Code gets the status code for the bootstrap patch bootstrap infra default response +func (o *BootstrapPatchBootstrapInfraDefault) Code() int { + return o._statusCode +} + +func (o *BootstrapPatchBootstrapInfraDefault) Error() string { + return fmt.Sprintf("[PUT /v2/sentry/bootstrap/infra/{metadata.name}][%d] Bootstrap_PatchBootstrapInfra default %+v", o._statusCode, o.Payload) +} +func (o *BootstrapPatchBootstrapInfraDefault) GetPayload() *models.GooglerpcStatus { + return o.Payload +} + +func (o *BootstrapPatchBootstrapInfraDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.GooglerpcStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_patch_relay_network_parameters.go b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_patch_relay_network_parameters.go new file mode 100644 index 0000000..c2fcc3a --- /dev/null +++ b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_patch_relay_network_parameters.go @@ -0,0 +1,170 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package bootstrap + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/RafaySystems/rcloud-base/components/common/api/def/clients/sentry/models" +) + +// NewBootstrapPatchRelayNetworkParams creates a new BootstrapPatchRelayNetworkParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewBootstrapPatchRelayNetworkParams() *BootstrapPatchRelayNetworkParams { + return &BootstrapPatchRelayNetworkParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewBootstrapPatchRelayNetworkParamsWithTimeout creates a new BootstrapPatchRelayNetworkParams object +// with the ability to set a timeout on a request. +func NewBootstrapPatchRelayNetworkParamsWithTimeout(timeout time.Duration) *BootstrapPatchRelayNetworkParams { + return &BootstrapPatchRelayNetworkParams{ + timeout: timeout, + } +} + +// NewBootstrapPatchRelayNetworkParamsWithContext creates a new BootstrapPatchRelayNetworkParams object +// with the ability to set a context for a request. +func NewBootstrapPatchRelayNetworkParamsWithContext(ctx context.Context) *BootstrapPatchRelayNetworkParams { + return &BootstrapPatchRelayNetworkParams{ + Context: ctx, + } +} + +// NewBootstrapPatchRelayNetworkParamsWithHTTPClient creates a new BootstrapPatchRelayNetworkParams object +// with the ability to set a custom HTTPClient for a request. +func NewBootstrapPatchRelayNetworkParamsWithHTTPClient(client *http.Client) *BootstrapPatchRelayNetworkParams { + return &BootstrapPatchRelayNetworkParams{ + HTTPClient: client, + } +} + +/* BootstrapPatchRelayNetworkParams contains all the parameters to send to the API endpoint + for the bootstrap patch relay network operation. + + Typically these are written to a http.Request. +*/ +type BootstrapPatchRelayNetworkParams struct { + + // Body. + Body *models.SentryRelayNetwork + + /* MetadataName. + + name of the resource + */ + MetadataName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the bootstrap patch relay network params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BootstrapPatchRelayNetworkParams) WithDefaults() *BootstrapPatchRelayNetworkParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the bootstrap patch relay network params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BootstrapPatchRelayNetworkParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the bootstrap patch relay network params +func (o *BootstrapPatchRelayNetworkParams) WithTimeout(timeout time.Duration) *BootstrapPatchRelayNetworkParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the bootstrap patch relay network params +func (o *BootstrapPatchRelayNetworkParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the bootstrap patch relay network params +func (o *BootstrapPatchRelayNetworkParams) WithContext(ctx context.Context) *BootstrapPatchRelayNetworkParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the bootstrap patch relay network params +func (o *BootstrapPatchRelayNetworkParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the bootstrap patch relay network params +func (o *BootstrapPatchRelayNetworkParams) WithHTTPClient(client *http.Client) *BootstrapPatchRelayNetworkParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the bootstrap patch relay network params +func (o *BootstrapPatchRelayNetworkParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the bootstrap patch relay network params +func (o *BootstrapPatchRelayNetworkParams) WithBody(body *models.SentryRelayNetwork) *BootstrapPatchRelayNetworkParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the bootstrap patch relay network params +func (o *BootstrapPatchRelayNetworkParams) SetBody(body *models.SentryRelayNetwork) { + o.Body = body +} + +// WithMetadataName adds the metadataName to the bootstrap patch relay network params +func (o *BootstrapPatchRelayNetworkParams) WithMetadataName(metadataName string) *BootstrapPatchRelayNetworkParams { + o.SetMetadataName(metadataName) + return o +} + +// SetMetadataName adds the metadataName to the bootstrap patch relay network params +func (o *BootstrapPatchRelayNetworkParams) SetMetadataName(metadataName string) { + o.MetadataName = metadataName +} + +// WriteToRequest writes these params to a swagger request +func (o *BootstrapPatchRelayNetworkParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param metadata.name + if err := r.SetPathParam("metadata.name", o.MetadataName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_patch_relay_network_responses.go b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_patch_relay_network_responses.go new file mode 100644 index 0000000..c2a4d91 --- /dev/null +++ b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_patch_relay_network_responses.go @@ -0,0 +1,223 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package bootstrap + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/RafaySystems/rcloud-base/components/common/api/def/clients/sentry/models" +) + +// BootstrapPatchRelayNetworkReader is a Reader for the BootstrapPatchRelayNetwork structure. +type BootstrapPatchRelayNetworkReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *BootstrapPatchRelayNetworkReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewBootstrapPatchRelayNetworkOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 403: + result := NewBootstrapPatchRelayNetworkForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewBootstrapPatchRelayNetworkNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewBootstrapPatchRelayNetworkInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + result := NewBootstrapPatchRelayNetworkDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewBootstrapPatchRelayNetworkOK creates a BootstrapPatchRelayNetworkOK with default headers values +func NewBootstrapPatchRelayNetworkOK() *BootstrapPatchRelayNetworkOK { + return &BootstrapPatchRelayNetworkOK{} +} + +/* BootstrapPatchRelayNetworkOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type BootstrapPatchRelayNetworkOK struct { + Payload *models.SentryRelayNetwork +} + +func (o *BootstrapPatchRelayNetworkOK) Error() string { + return fmt.Sprintf("[PUT /v2/sentry/relaynetwork/{metadata.name}][%d] bootstrapPatchRelayNetworkOK %+v", 200, o.Payload) +} +func (o *BootstrapPatchRelayNetworkOK) GetPayload() *models.SentryRelayNetwork { + return o.Payload +} + +func (o *BootstrapPatchRelayNetworkOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.SentryRelayNetwork) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBootstrapPatchRelayNetworkForbidden creates a BootstrapPatchRelayNetworkForbidden with default headers values +func NewBootstrapPatchRelayNetworkForbidden() *BootstrapPatchRelayNetworkForbidden { + return &BootstrapPatchRelayNetworkForbidden{} +} + +/* BootstrapPatchRelayNetworkForbidden describes a response with status code 403, with default header values. + +Returned when the user does not have permission to access the resource. +*/ +type BootstrapPatchRelayNetworkForbidden struct { + Payload interface{} +} + +func (o *BootstrapPatchRelayNetworkForbidden) Error() string { + return fmt.Sprintf("[PUT /v2/sentry/relaynetwork/{metadata.name}][%d] bootstrapPatchRelayNetworkForbidden %+v", 403, o.Payload) +} +func (o *BootstrapPatchRelayNetworkForbidden) GetPayload() interface{} { + return o.Payload +} + +func (o *BootstrapPatchRelayNetworkForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBootstrapPatchRelayNetworkNotFound creates a BootstrapPatchRelayNetworkNotFound with default headers values +func NewBootstrapPatchRelayNetworkNotFound() *BootstrapPatchRelayNetworkNotFound { + return &BootstrapPatchRelayNetworkNotFound{} +} + +/* BootstrapPatchRelayNetworkNotFound describes a response with status code 404, with default header values. + +Returned when the resource does not exist. +*/ +type BootstrapPatchRelayNetworkNotFound struct { + Payload interface{} +} + +func (o *BootstrapPatchRelayNetworkNotFound) Error() string { + return fmt.Sprintf("[PUT /v2/sentry/relaynetwork/{metadata.name}][%d] bootstrapPatchRelayNetworkNotFound %+v", 404, o.Payload) +} +func (o *BootstrapPatchRelayNetworkNotFound) GetPayload() interface{} { + return o.Payload +} + +func (o *BootstrapPatchRelayNetworkNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBootstrapPatchRelayNetworkInternalServerError creates a BootstrapPatchRelayNetworkInternalServerError with default headers values +func NewBootstrapPatchRelayNetworkInternalServerError() *BootstrapPatchRelayNetworkInternalServerError { + return &BootstrapPatchRelayNetworkInternalServerError{} +} + +/* BootstrapPatchRelayNetworkInternalServerError describes a response with status code 500, with default header values. + +Returned for internal server error +*/ +type BootstrapPatchRelayNetworkInternalServerError struct { + Payload interface{} +} + +func (o *BootstrapPatchRelayNetworkInternalServerError) Error() string { + return fmt.Sprintf("[PUT /v2/sentry/relaynetwork/{metadata.name}][%d] bootstrapPatchRelayNetworkInternalServerError %+v", 500, o.Payload) +} +func (o *BootstrapPatchRelayNetworkInternalServerError) GetPayload() interface{} { + return o.Payload +} + +func (o *BootstrapPatchRelayNetworkInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBootstrapPatchRelayNetworkDefault creates a BootstrapPatchRelayNetworkDefault with default headers values +func NewBootstrapPatchRelayNetworkDefault(code int) *BootstrapPatchRelayNetworkDefault { + return &BootstrapPatchRelayNetworkDefault{ + _statusCode: code, + } +} + +/* BootstrapPatchRelayNetworkDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type BootstrapPatchRelayNetworkDefault struct { + _statusCode int + + Payload *models.GooglerpcStatus +} + +// Code gets the status code for the bootstrap patch relay network default response +func (o *BootstrapPatchRelayNetworkDefault) Code() int { + return o._statusCode +} + +func (o *BootstrapPatchRelayNetworkDefault) Error() string { + return fmt.Sprintf("[PUT /v2/sentry/relaynetwork/{metadata.name}][%d] Bootstrap_PatchRelayNetwork default %+v", o._statusCode, o.Payload) +} +func (o *BootstrapPatchRelayNetworkDefault) GetPayload() *models.GooglerpcStatus { + return o.Payload +} + +func (o *BootstrapPatchRelayNetworkDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.GooglerpcStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_register_bootstrap_agent_parameters.go b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_register_bootstrap_agent_parameters.go new file mode 100644 index 0000000..d4a5d15 --- /dev/null +++ b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_register_bootstrap_agent_parameters.go @@ -0,0 +1,163 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package bootstrap + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewBootstrapRegisterBootstrapAgentParams creates a new BootstrapRegisterBootstrapAgentParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewBootstrapRegisterBootstrapAgentParams() *BootstrapRegisterBootstrapAgentParams { + return &BootstrapRegisterBootstrapAgentParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewBootstrapRegisterBootstrapAgentParamsWithTimeout creates a new BootstrapRegisterBootstrapAgentParams object +// with the ability to set a timeout on a request. +func NewBootstrapRegisterBootstrapAgentParamsWithTimeout(timeout time.Duration) *BootstrapRegisterBootstrapAgentParams { + return &BootstrapRegisterBootstrapAgentParams{ + timeout: timeout, + } +} + +// NewBootstrapRegisterBootstrapAgentParamsWithContext creates a new BootstrapRegisterBootstrapAgentParams object +// with the ability to set a context for a request. +func NewBootstrapRegisterBootstrapAgentParamsWithContext(ctx context.Context) *BootstrapRegisterBootstrapAgentParams { + return &BootstrapRegisterBootstrapAgentParams{ + Context: ctx, + } +} + +// NewBootstrapRegisterBootstrapAgentParamsWithHTTPClient creates a new BootstrapRegisterBootstrapAgentParams object +// with the ability to set a custom HTTPClient for a request. +func NewBootstrapRegisterBootstrapAgentParamsWithHTTPClient(client *http.Client) *BootstrapRegisterBootstrapAgentParams { + return &BootstrapRegisterBootstrapAgentParams{ + HTTPClient: client, + } +} + +/* BootstrapRegisterBootstrapAgentParams contains all the parameters to send to the API endpoint + for the bootstrap register bootstrap agent operation. + + Typically these are written to a http.Request. +*/ +type BootstrapRegisterBootstrapAgentParams struct { + + // Body. + Body BootstrapRegisterBootstrapAgentBody + + // TemplateToken. + TemplateToken string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the bootstrap register bootstrap agent params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BootstrapRegisterBootstrapAgentParams) WithDefaults() *BootstrapRegisterBootstrapAgentParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the bootstrap register bootstrap agent params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BootstrapRegisterBootstrapAgentParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the bootstrap register bootstrap agent params +func (o *BootstrapRegisterBootstrapAgentParams) WithTimeout(timeout time.Duration) *BootstrapRegisterBootstrapAgentParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the bootstrap register bootstrap agent params +func (o *BootstrapRegisterBootstrapAgentParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the bootstrap register bootstrap agent params +func (o *BootstrapRegisterBootstrapAgentParams) WithContext(ctx context.Context) *BootstrapRegisterBootstrapAgentParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the bootstrap register bootstrap agent params +func (o *BootstrapRegisterBootstrapAgentParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the bootstrap register bootstrap agent params +func (o *BootstrapRegisterBootstrapAgentParams) WithHTTPClient(client *http.Client) *BootstrapRegisterBootstrapAgentParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the bootstrap register bootstrap agent params +func (o *BootstrapRegisterBootstrapAgentParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the bootstrap register bootstrap agent params +func (o *BootstrapRegisterBootstrapAgentParams) WithBody(body BootstrapRegisterBootstrapAgentBody) *BootstrapRegisterBootstrapAgentParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the bootstrap register bootstrap agent params +func (o *BootstrapRegisterBootstrapAgentParams) SetBody(body BootstrapRegisterBootstrapAgentBody) { + o.Body = body +} + +// WithTemplateToken adds the templateToken to the bootstrap register bootstrap agent params +func (o *BootstrapRegisterBootstrapAgentParams) WithTemplateToken(templateToken string) *BootstrapRegisterBootstrapAgentParams { + o.SetTemplateToken(templateToken) + return o +} + +// SetTemplateToken adds the templateToken to the bootstrap register bootstrap agent params +func (o *BootstrapRegisterBootstrapAgentParams) SetTemplateToken(templateToken string) { + o.TemplateToken = templateToken +} + +// WriteToRequest writes these params to a swagger request +func (o *BootstrapRegisterBootstrapAgentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + + // path param templateToken + if err := r.SetPathParam("templateToken", o.TemplateToken); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_register_bootstrap_agent_responses.go b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_register_bootstrap_agent_responses.go new file mode 100644 index 0000000..498939f --- /dev/null +++ b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_register_bootstrap_agent_responses.go @@ -0,0 +1,275 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package bootstrap + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/RafaySystems/rcloud-base/components/common/api/def/clients/sentry/models" +) + +// BootstrapRegisterBootstrapAgentReader is a Reader for the BootstrapRegisterBootstrapAgent structure. +type BootstrapRegisterBootstrapAgentReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *BootstrapRegisterBootstrapAgentReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewBootstrapRegisterBootstrapAgentOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 403: + result := NewBootstrapRegisterBootstrapAgentForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewBootstrapRegisterBootstrapAgentNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewBootstrapRegisterBootstrapAgentInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + result := NewBootstrapRegisterBootstrapAgentDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewBootstrapRegisterBootstrapAgentOK creates a BootstrapRegisterBootstrapAgentOK with default headers values +func NewBootstrapRegisterBootstrapAgentOK() *BootstrapRegisterBootstrapAgentOK { + return &BootstrapRegisterBootstrapAgentOK{} +} + +/* BootstrapRegisterBootstrapAgentOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type BootstrapRegisterBootstrapAgentOK struct { + Payload *models.RPCRegisterAgentResponse +} + +func (o *BootstrapRegisterBootstrapAgentOK) Error() string { + return fmt.Sprintf("[POST /v2/sentry/bootstrap/{templateToken}/register][%d] bootstrapRegisterBootstrapAgentOK %+v", 200, o.Payload) +} +func (o *BootstrapRegisterBootstrapAgentOK) GetPayload() *models.RPCRegisterAgentResponse { + return o.Payload +} + +func (o *BootstrapRegisterBootstrapAgentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.RPCRegisterAgentResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBootstrapRegisterBootstrapAgentForbidden creates a BootstrapRegisterBootstrapAgentForbidden with default headers values +func NewBootstrapRegisterBootstrapAgentForbidden() *BootstrapRegisterBootstrapAgentForbidden { + return &BootstrapRegisterBootstrapAgentForbidden{} +} + +/* BootstrapRegisterBootstrapAgentForbidden describes a response with status code 403, with default header values. + +Returned when the user does not have permission to access the resource. +*/ +type BootstrapRegisterBootstrapAgentForbidden struct { + Payload interface{} +} + +func (o *BootstrapRegisterBootstrapAgentForbidden) Error() string { + return fmt.Sprintf("[POST /v2/sentry/bootstrap/{templateToken}/register][%d] bootstrapRegisterBootstrapAgentForbidden %+v", 403, o.Payload) +} +func (o *BootstrapRegisterBootstrapAgentForbidden) GetPayload() interface{} { + return o.Payload +} + +func (o *BootstrapRegisterBootstrapAgentForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBootstrapRegisterBootstrapAgentNotFound creates a BootstrapRegisterBootstrapAgentNotFound with default headers values +func NewBootstrapRegisterBootstrapAgentNotFound() *BootstrapRegisterBootstrapAgentNotFound { + return &BootstrapRegisterBootstrapAgentNotFound{} +} + +/* BootstrapRegisterBootstrapAgentNotFound describes a response with status code 404, with default header values. + +Returned when the resource does not exist. +*/ +type BootstrapRegisterBootstrapAgentNotFound struct { + Payload interface{} +} + +func (o *BootstrapRegisterBootstrapAgentNotFound) Error() string { + return fmt.Sprintf("[POST /v2/sentry/bootstrap/{templateToken}/register][%d] bootstrapRegisterBootstrapAgentNotFound %+v", 404, o.Payload) +} +func (o *BootstrapRegisterBootstrapAgentNotFound) GetPayload() interface{} { + return o.Payload +} + +func (o *BootstrapRegisterBootstrapAgentNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBootstrapRegisterBootstrapAgentInternalServerError creates a BootstrapRegisterBootstrapAgentInternalServerError with default headers values +func NewBootstrapRegisterBootstrapAgentInternalServerError() *BootstrapRegisterBootstrapAgentInternalServerError { + return &BootstrapRegisterBootstrapAgentInternalServerError{} +} + +/* BootstrapRegisterBootstrapAgentInternalServerError describes a response with status code 500, with default header values. + +Returned for internal server error +*/ +type BootstrapRegisterBootstrapAgentInternalServerError struct { + Payload interface{} +} + +func (o *BootstrapRegisterBootstrapAgentInternalServerError) Error() string { + return fmt.Sprintf("[POST /v2/sentry/bootstrap/{templateToken}/register][%d] bootstrapRegisterBootstrapAgentInternalServerError %+v", 500, o.Payload) +} +func (o *BootstrapRegisterBootstrapAgentInternalServerError) GetPayload() interface{} { + return o.Payload +} + +func (o *BootstrapRegisterBootstrapAgentInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBootstrapRegisterBootstrapAgentDefault creates a BootstrapRegisterBootstrapAgentDefault with default headers values +func NewBootstrapRegisterBootstrapAgentDefault(code int) *BootstrapRegisterBootstrapAgentDefault { + return &BootstrapRegisterBootstrapAgentDefault{ + _statusCode: code, + } +} + +/* BootstrapRegisterBootstrapAgentDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type BootstrapRegisterBootstrapAgentDefault struct { + _statusCode int + + Payload *models.GooglerpcStatus +} + +// Code gets the status code for the bootstrap register bootstrap agent default response +func (o *BootstrapRegisterBootstrapAgentDefault) Code() int { + return o._statusCode +} + +func (o *BootstrapRegisterBootstrapAgentDefault) Error() string { + return fmt.Sprintf("[POST /v2/sentry/bootstrap/{templateToken}/register][%d] Bootstrap_RegisterBootstrapAgent default %+v", o._statusCode, o.Payload) +} +func (o *BootstrapRegisterBootstrapAgentDefault) GetPayload() *models.GooglerpcStatus { + return o.Payload +} + +func (o *BootstrapRegisterBootstrapAgentDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.GooglerpcStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +/*BootstrapRegisterBootstrapAgentBody bootstrap register bootstrap agent body +swagger:model BootstrapRegisterBootstrapAgentBody +*/ +type BootstrapRegisterBootstrapAgentBody struct { + + // csr + // Format: byte + Csr strfmt.Base64 `json:"csr,omitempty"` + + // ip address + IPAddress string `json:"ipAddress,omitempty"` + + // name + Name string `json:"name,omitempty"` + + // template name + TemplateName string `json:"templateName,omitempty"` + + // token + Token string `json:"token,omitempty"` +} + +// Validate validates this bootstrap register bootstrap agent body +func (o *BootstrapRegisterBootstrapAgentBody) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this bootstrap register bootstrap agent body based on context it is used +func (o *BootstrapRegisterBootstrapAgentBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *BootstrapRegisterBootstrapAgentBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *BootstrapRegisterBootstrapAgentBody) UnmarshalBinary(b []byte) error { + var res BootstrapRegisterBootstrapAgentBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} diff --git a/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_update_bootstrap_agent_parameters.go b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_update_bootstrap_agent_parameters.go new file mode 100644 index 0000000..3b0bc72 --- /dev/null +++ b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_update_bootstrap_agent_parameters.go @@ -0,0 +1,189 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package bootstrap + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/RafaySystems/rcloud-base/components/common/api/def/clients/sentry/models" +) + +// NewBootstrapUpdateBootstrapAgentParams creates a new BootstrapUpdateBootstrapAgentParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewBootstrapUpdateBootstrapAgentParams() *BootstrapUpdateBootstrapAgentParams { + return &BootstrapUpdateBootstrapAgentParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewBootstrapUpdateBootstrapAgentParamsWithTimeout creates a new BootstrapUpdateBootstrapAgentParams object +// with the ability to set a timeout on a request. +func NewBootstrapUpdateBootstrapAgentParamsWithTimeout(timeout time.Duration) *BootstrapUpdateBootstrapAgentParams { + return &BootstrapUpdateBootstrapAgentParams{ + timeout: timeout, + } +} + +// NewBootstrapUpdateBootstrapAgentParamsWithContext creates a new BootstrapUpdateBootstrapAgentParams object +// with the ability to set a context for a request. +func NewBootstrapUpdateBootstrapAgentParamsWithContext(ctx context.Context) *BootstrapUpdateBootstrapAgentParams { + return &BootstrapUpdateBootstrapAgentParams{ + Context: ctx, + } +} + +// NewBootstrapUpdateBootstrapAgentParamsWithHTTPClient creates a new BootstrapUpdateBootstrapAgentParams object +// with the ability to set a custom HTTPClient for a request. +func NewBootstrapUpdateBootstrapAgentParamsWithHTTPClient(client *http.Client) *BootstrapUpdateBootstrapAgentParams { + return &BootstrapUpdateBootstrapAgentParams{ + HTTPClient: client, + } +} + +/* BootstrapUpdateBootstrapAgentParams contains all the parameters to send to the API endpoint + for the bootstrap update bootstrap agent operation. + + Typically these are written to a http.Request. +*/ +type BootstrapUpdateBootstrapAgentParams struct { + + // Body. + Body *models.SentryBootstrapAgent + + /* MetadataName. + + name of the resource + */ + MetadataName string + + // SpecTemplateRef. + SpecTemplateRef string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the bootstrap update bootstrap agent params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BootstrapUpdateBootstrapAgentParams) WithDefaults() *BootstrapUpdateBootstrapAgentParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the bootstrap update bootstrap agent params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *BootstrapUpdateBootstrapAgentParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the bootstrap update bootstrap agent params +func (o *BootstrapUpdateBootstrapAgentParams) WithTimeout(timeout time.Duration) *BootstrapUpdateBootstrapAgentParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the bootstrap update bootstrap agent params +func (o *BootstrapUpdateBootstrapAgentParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the bootstrap update bootstrap agent params +func (o *BootstrapUpdateBootstrapAgentParams) WithContext(ctx context.Context) *BootstrapUpdateBootstrapAgentParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the bootstrap update bootstrap agent params +func (o *BootstrapUpdateBootstrapAgentParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the bootstrap update bootstrap agent params +func (o *BootstrapUpdateBootstrapAgentParams) WithHTTPClient(client *http.Client) *BootstrapUpdateBootstrapAgentParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the bootstrap update bootstrap agent params +func (o *BootstrapUpdateBootstrapAgentParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the bootstrap update bootstrap agent params +func (o *BootstrapUpdateBootstrapAgentParams) WithBody(body *models.SentryBootstrapAgent) *BootstrapUpdateBootstrapAgentParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the bootstrap update bootstrap agent params +func (o *BootstrapUpdateBootstrapAgentParams) SetBody(body *models.SentryBootstrapAgent) { + o.Body = body +} + +// WithMetadataName adds the metadataName to the bootstrap update bootstrap agent params +func (o *BootstrapUpdateBootstrapAgentParams) WithMetadataName(metadataName string) *BootstrapUpdateBootstrapAgentParams { + o.SetMetadataName(metadataName) + return o +} + +// SetMetadataName adds the metadataName to the bootstrap update bootstrap agent params +func (o *BootstrapUpdateBootstrapAgentParams) SetMetadataName(metadataName string) { + o.MetadataName = metadataName +} + +// WithSpecTemplateRef adds the specTemplateRef to the bootstrap update bootstrap agent params +func (o *BootstrapUpdateBootstrapAgentParams) WithSpecTemplateRef(specTemplateRef string) *BootstrapUpdateBootstrapAgentParams { + o.SetSpecTemplateRef(specTemplateRef) + return o +} + +// SetSpecTemplateRef adds the specTemplateRef to the bootstrap update bootstrap agent params +func (o *BootstrapUpdateBootstrapAgentParams) SetSpecTemplateRef(specTemplateRef string) { + o.SpecTemplateRef = specTemplateRef +} + +// WriteToRequest writes these params to a swagger request +func (o *BootstrapUpdateBootstrapAgentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param metadata.name + if err := r.SetPathParam("metadata.name", o.MetadataName); err != nil { + return err + } + + // path param spec.templateRef + if err := r.SetPathParam("spec.templateRef", o.SpecTemplateRef); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_update_bootstrap_agent_responses.go b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_update_bootstrap_agent_responses.go new file mode 100644 index 0000000..b479f45 --- /dev/null +++ b/components/common/api/def/clients/sentry/client/bootstrap/bootstrap_update_bootstrap_agent_responses.go @@ -0,0 +1,223 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package bootstrap + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/RafaySystems/rcloud-base/components/common/api/def/clients/sentry/models" +) + +// BootstrapUpdateBootstrapAgentReader is a Reader for the BootstrapUpdateBootstrapAgent structure. +type BootstrapUpdateBootstrapAgentReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *BootstrapUpdateBootstrapAgentReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewBootstrapUpdateBootstrapAgentOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 403: + result := NewBootstrapUpdateBootstrapAgentForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewBootstrapUpdateBootstrapAgentNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewBootstrapUpdateBootstrapAgentInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + result := NewBootstrapUpdateBootstrapAgentDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewBootstrapUpdateBootstrapAgentOK creates a BootstrapUpdateBootstrapAgentOK with default headers values +func NewBootstrapUpdateBootstrapAgentOK() *BootstrapUpdateBootstrapAgentOK { + return &BootstrapUpdateBootstrapAgentOK{} +} + +/* BootstrapUpdateBootstrapAgentOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type BootstrapUpdateBootstrapAgentOK struct { + Payload *models.SentryBootstrapAgent +} + +func (o *BootstrapUpdateBootstrapAgentOK) Error() string { + return fmt.Sprintf("[PUT /v2/sentry/bootstrap/{spec.templateRef}/agent/{metadata.name}][%d] bootstrapUpdateBootstrapAgentOK %+v", 200, o.Payload) +} +func (o *BootstrapUpdateBootstrapAgentOK) GetPayload() *models.SentryBootstrapAgent { + return o.Payload +} + +func (o *BootstrapUpdateBootstrapAgentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.SentryBootstrapAgent) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBootstrapUpdateBootstrapAgentForbidden creates a BootstrapUpdateBootstrapAgentForbidden with default headers values +func NewBootstrapUpdateBootstrapAgentForbidden() *BootstrapUpdateBootstrapAgentForbidden { + return &BootstrapUpdateBootstrapAgentForbidden{} +} + +/* BootstrapUpdateBootstrapAgentForbidden describes a response with status code 403, with default header values. + +Returned when the user does not have permission to access the resource. +*/ +type BootstrapUpdateBootstrapAgentForbidden struct { + Payload interface{} +} + +func (o *BootstrapUpdateBootstrapAgentForbidden) Error() string { + return fmt.Sprintf("[PUT /v2/sentry/bootstrap/{spec.templateRef}/agent/{metadata.name}][%d] bootstrapUpdateBootstrapAgentForbidden %+v", 403, o.Payload) +} +func (o *BootstrapUpdateBootstrapAgentForbidden) GetPayload() interface{} { + return o.Payload +} + +func (o *BootstrapUpdateBootstrapAgentForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBootstrapUpdateBootstrapAgentNotFound creates a BootstrapUpdateBootstrapAgentNotFound with default headers values +func NewBootstrapUpdateBootstrapAgentNotFound() *BootstrapUpdateBootstrapAgentNotFound { + return &BootstrapUpdateBootstrapAgentNotFound{} +} + +/* BootstrapUpdateBootstrapAgentNotFound describes a response with status code 404, with default header values. + +Returned when the resource does not exist. +*/ +type BootstrapUpdateBootstrapAgentNotFound struct { + Payload interface{} +} + +func (o *BootstrapUpdateBootstrapAgentNotFound) Error() string { + return fmt.Sprintf("[PUT /v2/sentry/bootstrap/{spec.templateRef}/agent/{metadata.name}][%d] bootstrapUpdateBootstrapAgentNotFound %+v", 404, o.Payload) +} +func (o *BootstrapUpdateBootstrapAgentNotFound) GetPayload() interface{} { + return o.Payload +} + +func (o *BootstrapUpdateBootstrapAgentNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBootstrapUpdateBootstrapAgentInternalServerError creates a BootstrapUpdateBootstrapAgentInternalServerError with default headers values +func NewBootstrapUpdateBootstrapAgentInternalServerError() *BootstrapUpdateBootstrapAgentInternalServerError { + return &BootstrapUpdateBootstrapAgentInternalServerError{} +} + +/* BootstrapUpdateBootstrapAgentInternalServerError describes a response with status code 500, with default header values. + +Returned for internal server error +*/ +type BootstrapUpdateBootstrapAgentInternalServerError struct { + Payload interface{} +} + +func (o *BootstrapUpdateBootstrapAgentInternalServerError) Error() string { + return fmt.Sprintf("[PUT /v2/sentry/bootstrap/{spec.templateRef}/agent/{metadata.name}][%d] bootstrapUpdateBootstrapAgentInternalServerError %+v", 500, o.Payload) +} +func (o *BootstrapUpdateBootstrapAgentInternalServerError) GetPayload() interface{} { + return o.Payload +} + +func (o *BootstrapUpdateBootstrapAgentInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewBootstrapUpdateBootstrapAgentDefault creates a BootstrapUpdateBootstrapAgentDefault with default headers values +func NewBootstrapUpdateBootstrapAgentDefault(code int) *BootstrapUpdateBootstrapAgentDefault { + return &BootstrapUpdateBootstrapAgentDefault{ + _statusCode: code, + } +} + +/* BootstrapUpdateBootstrapAgentDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type BootstrapUpdateBootstrapAgentDefault struct { + _statusCode int + + Payload *models.GooglerpcStatus +} + +// Code gets the status code for the bootstrap update bootstrap agent default response +func (o *BootstrapUpdateBootstrapAgentDefault) Code() int { + return o._statusCode +} + +func (o *BootstrapUpdateBootstrapAgentDefault) Error() string { + return fmt.Sprintf("[PUT /v2/sentry/bootstrap/{spec.templateRef}/agent/{metadata.name}][%d] Bootstrap_UpdateBootstrapAgent default %+v", o._statusCode, o.Payload) +} +func (o *BootstrapUpdateBootstrapAgentDefault) GetPayload() *models.GooglerpcStatus { + return o.Payload +} + +func (o *BootstrapUpdateBootstrapAgentDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.GooglerpcStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/components/common/api/def/clients/sentry/client/cluster_authorization/cluster_authorization_client.go b/components/common/api/def/clients/sentry/client/cluster_authorization/cluster_authorization_client.go new file mode 100644 index 0000000..5f36dec --- /dev/null +++ b/components/common/api/def/clients/sentry/client/cluster_authorization/cluster_authorization_client.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package cluster_authorization + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new cluster authorization API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for cluster authorization API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientOption is the option for Client methods +type ClientOption func(*runtime.ClientOperation) + +// ClientService is the interface for Client methods +type ClientService interface { + ClusterAuthorizationGetUserAuthorization(params *ClusterAuthorizationGetUserAuthorizationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ClusterAuthorizationGetUserAuthorizationOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* + ClusterAuthorizationGetUserAuthorization cluster authorization get user authorization API +*/ +func (a *Client) ClusterAuthorizationGetUserAuthorization(params *ClusterAuthorizationGetUserAuthorizationParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ClusterAuthorizationGetUserAuthorizationOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewClusterAuthorizationGetUserAuthorizationParams() + } + op := &runtime.ClientOperation{ + ID: "ClusterAuthorization_GetUserAuthorization", + Method: "GET", + PathPattern: "/v2/sentry/authorization/user", + ProducesMediaTypes: []string{"application/json", "application/yaml"}, + ConsumesMediaTypes: []string{"application/json", "application/yaml"}, + Schemes: []string{"https"}, + Params: params, + Reader: &ClusterAuthorizationGetUserAuthorizationReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*ClusterAuthorizationGetUserAuthorizationOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ClusterAuthorizationGetUserAuthorizationDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/components/common/api/def/clients/sentry/client/cluster_authorization/cluster_authorization_get_user_authorization_parameters.go b/components/common/api/def/clients/sentry/client/cluster_authorization/cluster_authorization_get_user_authorization_parameters.go new file mode 100644 index 0000000..93f761b --- /dev/null +++ b/components/common/api/def/clients/sentry/client/cluster_authorization/cluster_authorization_get_user_authorization_parameters.go @@ -0,0 +1,222 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package cluster_authorization + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewClusterAuthorizationGetUserAuthorizationParams creates a new ClusterAuthorizationGetUserAuthorizationParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewClusterAuthorizationGetUserAuthorizationParams() *ClusterAuthorizationGetUserAuthorizationParams { + return &ClusterAuthorizationGetUserAuthorizationParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewClusterAuthorizationGetUserAuthorizationParamsWithTimeout creates a new ClusterAuthorizationGetUserAuthorizationParams object +// with the ability to set a timeout on a request. +func NewClusterAuthorizationGetUserAuthorizationParamsWithTimeout(timeout time.Duration) *ClusterAuthorizationGetUserAuthorizationParams { + return &ClusterAuthorizationGetUserAuthorizationParams{ + timeout: timeout, + } +} + +// NewClusterAuthorizationGetUserAuthorizationParamsWithContext creates a new ClusterAuthorizationGetUserAuthorizationParams object +// with the ability to set a context for a request. +func NewClusterAuthorizationGetUserAuthorizationParamsWithContext(ctx context.Context) *ClusterAuthorizationGetUserAuthorizationParams { + return &ClusterAuthorizationGetUserAuthorizationParams{ + Context: ctx, + } +} + +// NewClusterAuthorizationGetUserAuthorizationParamsWithHTTPClient creates a new ClusterAuthorizationGetUserAuthorizationParams object +// with the ability to set a custom HTTPClient for a request. +func NewClusterAuthorizationGetUserAuthorizationParamsWithHTTPClient(client *http.Client) *ClusterAuthorizationGetUserAuthorizationParams { + return &ClusterAuthorizationGetUserAuthorizationParams{ + HTTPClient: client, + } +} + +/* ClusterAuthorizationGetUserAuthorizationParams contains all the parameters to send to the API endpoint + for the cluster authorization get user authorization operation. + + Typically these are written to a http.Request. +*/ +type ClusterAuthorizationGetUserAuthorizationParams struct { + + // CertIssueSeconds. + // + // Format: int64 + CertIssueSeconds *string + + // ClusterID. + ClusterID *string + + // UserCN. + UserCN *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the cluster authorization get user authorization params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ClusterAuthorizationGetUserAuthorizationParams) WithDefaults() *ClusterAuthorizationGetUserAuthorizationParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the cluster authorization get user authorization params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ClusterAuthorizationGetUserAuthorizationParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the cluster authorization get user authorization params +func (o *ClusterAuthorizationGetUserAuthorizationParams) WithTimeout(timeout time.Duration) *ClusterAuthorizationGetUserAuthorizationParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the cluster authorization get user authorization params +func (o *ClusterAuthorizationGetUserAuthorizationParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the cluster authorization get user authorization params +func (o *ClusterAuthorizationGetUserAuthorizationParams) WithContext(ctx context.Context) *ClusterAuthorizationGetUserAuthorizationParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the cluster authorization get user authorization params +func (o *ClusterAuthorizationGetUserAuthorizationParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the cluster authorization get user authorization params +func (o *ClusterAuthorizationGetUserAuthorizationParams) WithHTTPClient(client *http.Client) *ClusterAuthorizationGetUserAuthorizationParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the cluster authorization get user authorization params +func (o *ClusterAuthorizationGetUserAuthorizationParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCertIssueSeconds adds the certIssueSeconds to the cluster authorization get user authorization params +func (o *ClusterAuthorizationGetUserAuthorizationParams) WithCertIssueSeconds(certIssueSeconds *string) *ClusterAuthorizationGetUserAuthorizationParams { + o.SetCertIssueSeconds(certIssueSeconds) + return o +} + +// SetCertIssueSeconds adds the certIssueSeconds to the cluster authorization get user authorization params +func (o *ClusterAuthorizationGetUserAuthorizationParams) SetCertIssueSeconds(certIssueSeconds *string) { + o.CertIssueSeconds = certIssueSeconds +} + +// WithClusterID adds the clusterID to the cluster authorization get user authorization params +func (o *ClusterAuthorizationGetUserAuthorizationParams) WithClusterID(clusterID *string) *ClusterAuthorizationGetUserAuthorizationParams { + o.SetClusterID(clusterID) + return o +} + +// SetClusterID adds the clusterId to the cluster authorization get user authorization params +func (o *ClusterAuthorizationGetUserAuthorizationParams) SetClusterID(clusterID *string) { + o.ClusterID = clusterID +} + +// WithUserCN adds the userCN to the cluster authorization get user authorization params +func (o *ClusterAuthorizationGetUserAuthorizationParams) WithUserCN(userCN *string) *ClusterAuthorizationGetUserAuthorizationParams { + o.SetUserCN(userCN) + return o +} + +// SetUserCN adds the userCN to the cluster authorization get user authorization params +func (o *ClusterAuthorizationGetUserAuthorizationParams) SetUserCN(userCN *string) { + o.UserCN = userCN +} + +// WriteToRequest writes these params to a swagger request +func (o *ClusterAuthorizationGetUserAuthorizationParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.CertIssueSeconds != nil { + + // query param certIssueSeconds + var qrCertIssueSeconds string + + if o.CertIssueSeconds != nil { + qrCertIssueSeconds = *o.CertIssueSeconds + } + qCertIssueSeconds := qrCertIssueSeconds + if qCertIssueSeconds != "" { + + if err := r.SetQueryParam("certIssueSeconds", qCertIssueSeconds); err != nil { + return err + } + } + } + + if o.ClusterID != nil { + + // query param clusterID + var qrClusterID string + + if o.ClusterID != nil { + qrClusterID = *o.ClusterID + } + qClusterID := qrClusterID + if qClusterID != "" { + + if err := r.SetQueryParam("clusterID", qClusterID); err != nil { + return err + } + } + } + + if o.UserCN != nil { + + // query param userCN + var qrUserCN string + + if o.UserCN != nil { + qrUserCN = *o.UserCN + } + qUserCN := qrUserCN + if qUserCN != "" { + + if err := r.SetQueryParam("userCN", qUserCN); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/components/common/api/def/clients/sentry/client/cluster_authorization/cluster_authorization_get_user_authorization_responses.go b/components/common/api/def/clients/sentry/client/cluster_authorization/cluster_authorization_get_user_authorization_responses.go new file mode 100644 index 0000000..9beb121 --- /dev/null +++ b/components/common/api/def/clients/sentry/client/cluster_authorization/cluster_authorization_get_user_authorization_responses.go @@ -0,0 +1,187 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package cluster_authorization + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/RafaySystems/rcloud-base/components/common/api/def/clients/sentry/models" +) + +// ClusterAuthorizationGetUserAuthorizationReader is a Reader for the ClusterAuthorizationGetUserAuthorization structure. +type ClusterAuthorizationGetUserAuthorizationReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ClusterAuthorizationGetUserAuthorizationReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewClusterAuthorizationGetUserAuthorizationOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 403: + result := NewClusterAuthorizationGetUserAuthorizationForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewClusterAuthorizationGetUserAuthorizationNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + result := NewClusterAuthorizationGetUserAuthorizationDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewClusterAuthorizationGetUserAuthorizationOK creates a ClusterAuthorizationGetUserAuthorizationOK with default headers values +func NewClusterAuthorizationGetUserAuthorizationOK() *ClusterAuthorizationGetUserAuthorizationOK { + return &ClusterAuthorizationGetUserAuthorizationOK{} +} + +/* ClusterAuthorizationGetUserAuthorizationOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type ClusterAuthorizationGetUserAuthorizationOK struct { + Payload *models.RPCGetUserAuthorizationResponse +} + +func (o *ClusterAuthorizationGetUserAuthorizationOK) Error() string { + return fmt.Sprintf("[GET /v2/sentry/authorization/user][%d] clusterAuthorizationGetUserAuthorizationOK %+v", 200, o.Payload) +} +func (o *ClusterAuthorizationGetUserAuthorizationOK) GetPayload() *models.RPCGetUserAuthorizationResponse { + return o.Payload +} + +func (o *ClusterAuthorizationGetUserAuthorizationOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.RPCGetUserAuthorizationResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewClusterAuthorizationGetUserAuthorizationForbidden creates a ClusterAuthorizationGetUserAuthorizationForbidden with default headers values +func NewClusterAuthorizationGetUserAuthorizationForbidden() *ClusterAuthorizationGetUserAuthorizationForbidden { + return &ClusterAuthorizationGetUserAuthorizationForbidden{} +} + +/* ClusterAuthorizationGetUserAuthorizationForbidden describes a response with status code 403, with default header values. + +Returned when the user does not have permission to access the resource. +*/ +type ClusterAuthorizationGetUserAuthorizationForbidden struct { + Payload interface{} +} + +func (o *ClusterAuthorizationGetUserAuthorizationForbidden) Error() string { + return fmt.Sprintf("[GET /v2/sentry/authorization/user][%d] clusterAuthorizationGetUserAuthorizationForbidden %+v", 403, o.Payload) +} +func (o *ClusterAuthorizationGetUserAuthorizationForbidden) GetPayload() interface{} { + return o.Payload +} + +func (o *ClusterAuthorizationGetUserAuthorizationForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewClusterAuthorizationGetUserAuthorizationNotFound creates a ClusterAuthorizationGetUserAuthorizationNotFound with default headers values +func NewClusterAuthorizationGetUserAuthorizationNotFound() *ClusterAuthorizationGetUserAuthorizationNotFound { + return &ClusterAuthorizationGetUserAuthorizationNotFound{} +} + +/* ClusterAuthorizationGetUserAuthorizationNotFound describes a response with status code 404, with default header values. + +Returned when the resource does not exist. +*/ +type ClusterAuthorizationGetUserAuthorizationNotFound struct { + Payload string +} + +func (o *ClusterAuthorizationGetUserAuthorizationNotFound) Error() string { + return fmt.Sprintf("[GET /v2/sentry/authorization/user][%d] clusterAuthorizationGetUserAuthorizationNotFound %+v", 404, o.Payload) +} +func (o *ClusterAuthorizationGetUserAuthorizationNotFound) GetPayload() string { + return o.Payload +} + +func (o *ClusterAuthorizationGetUserAuthorizationNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewClusterAuthorizationGetUserAuthorizationDefault creates a ClusterAuthorizationGetUserAuthorizationDefault with default headers values +func NewClusterAuthorizationGetUserAuthorizationDefault(code int) *ClusterAuthorizationGetUserAuthorizationDefault { + return &ClusterAuthorizationGetUserAuthorizationDefault{ + _statusCode: code, + } +} + +/* ClusterAuthorizationGetUserAuthorizationDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type ClusterAuthorizationGetUserAuthorizationDefault struct { + _statusCode int + + Payload *models.GooglerpcStatus +} + +// Code gets the status code for the cluster authorization get user authorization default response +func (o *ClusterAuthorizationGetUserAuthorizationDefault) Code() int { + return o._statusCode +} + +func (o *ClusterAuthorizationGetUserAuthorizationDefault) Error() string { + return fmt.Sprintf("[GET /v2/sentry/authorization/user][%d] ClusterAuthorization_GetUserAuthorization default %+v", o._statusCode, o.Payload) +} +func (o *ClusterAuthorizationGetUserAuthorizationDefault) GetPayload() *models.GooglerpcStatus { + return o.Payload +} + +func (o *ClusterAuthorizationGetUserAuthorizationDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.GooglerpcStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/components/common/api/def/clients/sentry/client/kubectl_cluster_settings/kubectl_cluster_settings_client.go b/components/common/api/def/clients/sentry/client/kubectl_cluster_settings/kubectl_cluster_settings_client.go new file mode 100644 index 0000000..5bd6024 --- /dev/null +++ b/components/common/api/def/clients/sentry/client/kubectl_cluster_settings/kubectl_cluster_settings_client.go @@ -0,0 +1,117 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package kubectl_cluster_settings + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new kubectl cluster settings API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for kubectl cluster settings API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientOption is the option for Client methods +type ClientOption func(*runtime.ClientOperation) + +// ClientService is the interface for Client methods +type ClientService interface { + KubectlClusterSettingsGetKubectlClusterSettings(params *KubectlClusterSettingsGetKubectlClusterSettingsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*KubectlClusterSettingsGetKubectlClusterSettingsOK, error) + + KubectlClusterSettingsUpdateKubectlClusterSettings(params *KubectlClusterSettingsUpdateKubectlClusterSettingsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*KubectlClusterSettingsUpdateKubectlClusterSettingsOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* + KubectlClusterSettingsGetKubectlClusterSettings kubectl cluster settings get kubectl cluster settings API +*/ +func (a *Client) KubectlClusterSettingsGetKubectlClusterSettings(params *KubectlClusterSettingsGetKubectlClusterSettingsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*KubectlClusterSettingsGetKubectlClusterSettingsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewKubectlClusterSettingsGetKubectlClusterSettingsParams() + } + op := &runtime.ClientOperation{ + ID: "KubectlClusterSettings_GetKubectlClusterSettings", + Method: "GET", + PathPattern: "/v2/sentry/kubectl/{opts.urlScope}/settings", + ProducesMediaTypes: []string{"application/json", "application/yaml"}, + ConsumesMediaTypes: []string{"application/json", "application/yaml"}, + Schemes: []string{"https"}, + Params: params, + Reader: &KubectlClusterSettingsGetKubectlClusterSettingsReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*KubectlClusterSettingsGetKubectlClusterSettingsOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*KubectlClusterSettingsGetKubectlClusterSettingsDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* + KubectlClusterSettingsUpdateKubectlClusterSettings kubectl cluster settings update kubectl cluster settings API +*/ +func (a *Client) KubectlClusterSettingsUpdateKubectlClusterSettings(params *KubectlClusterSettingsUpdateKubectlClusterSettingsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*KubectlClusterSettingsUpdateKubectlClusterSettingsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewKubectlClusterSettingsUpdateKubectlClusterSettingsParams() + } + op := &runtime.ClientOperation{ + ID: "KubectlClusterSettings_UpdateKubectlClusterSettings", + Method: "PUT", + PathPattern: "/v2/sentry/kubectl/{opts.urlScope}/settings", + ProducesMediaTypes: []string{"application/json", "application/yaml"}, + ConsumesMediaTypes: []string{"application/json", "application/yaml"}, + Schemes: []string{"https"}, + Params: params, + Reader: &KubectlClusterSettingsUpdateKubectlClusterSettingsReader{formats: a.formats}, + AuthInfo: authInfo, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*KubectlClusterSettingsUpdateKubectlClusterSettingsOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*KubectlClusterSettingsUpdateKubectlClusterSettingsDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/components/common/api/def/clients/sentry/client/kubectl_cluster_settings/kubectl_cluster_settings_get_kubectl_cluster_settings_parameters.go b/components/common/api/def/clients/sentry/client/kubectl_cluster_settings/kubectl_cluster_settings_get_kubectl_cluster_settings_parameters.go new file mode 100644 index 0000000..a054523 --- /dev/null +++ b/components/common/api/def/clients/sentry/client/kubectl_cluster_settings/kubectl_cluster_settings_get_kubectl_cluster_settings_parameters.go @@ -0,0 +1,866 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package kubectl_cluster_settings + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewKubectlClusterSettingsGetKubectlClusterSettingsParams creates a new KubectlClusterSettingsGetKubectlClusterSettingsParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewKubectlClusterSettingsGetKubectlClusterSettingsParams() *KubectlClusterSettingsGetKubectlClusterSettingsParams { + return &KubectlClusterSettingsGetKubectlClusterSettingsParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewKubectlClusterSettingsGetKubectlClusterSettingsParamsWithTimeout creates a new KubectlClusterSettingsGetKubectlClusterSettingsParams object +// with the ability to set a timeout on a request. +func NewKubectlClusterSettingsGetKubectlClusterSettingsParamsWithTimeout(timeout time.Duration) *KubectlClusterSettingsGetKubectlClusterSettingsParams { + return &KubectlClusterSettingsGetKubectlClusterSettingsParams{ + timeout: timeout, + } +} + +// NewKubectlClusterSettingsGetKubectlClusterSettingsParamsWithContext creates a new KubectlClusterSettingsGetKubectlClusterSettingsParams object +// with the ability to set a context for a request. +func NewKubectlClusterSettingsGetKubectlClusterSettingsParamsWithContext(ctx context.Context) *KubectlClusterSettingsGetKubectlClusterSettingsParams { + return &KubectlClusterSettingsGetKubectlClusterSettingsParams{ + Context: ctx, + } +} + +// NewKubectlClusterSettingsGetKubectlClusterSettingsParamsWithHTTPClient creates a new KubectlClusterSettingsGetKubectlClusterSettingsParams object +// with the ability to set a custom HTTPClient for a request. +func NewKubectlClusterSettingsGetKubectlClusterSettingsParamsWithHTTPClient(client *http.Client) *KubectlClusterSettingsGetKubectlClusterSettingsParams { + return &KubectlClusterSettingsGetKubectlClusterSettingsParams{ + HTTPClient: client, + } +} + +/* KubectlClusterSettingsGetKubectlClusterSettingsParams contains all the parameters to send to the API endpoint + for the kubectl cluster settings get kubectl cluster settings operation. + + Typically these are written to a http.Request. +*/ +type KubectlClusterSettingsGetKubectlClusterSettingsParams struct { + + // OptsID. + OptsID *string + + // OptsBlueprintRef. + OptsBlueprintRef *string + + // OptsClusterID. + OptsClusterID *string + + // OptsCount. + // + // Format: int64 + OptsCount *string + + // OptsDeleted. + OptsDeleted *bool + + /* OptsDisplayName. + + displayName only used for update queries to set displayName (READONLY). + */ + OptsDisplayName *string + + // OptsExtended. + OptsExtended *bool + + /* OptsGlobalScope. + + globalScope sets partnerID,organizationID,projectID = 0. + */ + OptsGlobalScope *bool + + // OptsGroups. + OptsGroups []string + + /* OptsIgnoreScopeDefault. + + ignoreScopeDefault ignores default values for partnerID, organizationID and + projectID. + */ + OptsIgnoreScopeDefault *bool + + // OptsIsSSOUser. + OptsIsSSOUser *bool + + // OptsLimit. + // + // Format: int64 + OptsLimit *string + + /* OptsName. + + name is unique ID of a resource along with (partnerID, organizationID, + projectID). + */ + OptsName *string + + // OptsOffset. + // + // Format: int64 + OptsOffset *string + + // OptsOrder. + OptsOrder *string + + // OptsOrderBy. + OptsOrderBy *string + + // OptsOrganizationID. + OptsOrganizationID *string + + // OptsPartnerID. + OptsPartnerID *string + + // OptsProjectID. + OptsProjectID *string + + // OptsPublishedVersion. + OptsPublishedVersion *string + + /* OptsSelector. + + selector is used to filter the labels of a resource. + */ + OptsSelector *string + + /* OptsURLScope. + + urlScope is supposed to be passed in the URL as kind/HashID(value) + */ + OptsURLScope string + + // OptsUsername. + OptsUsername *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the kubectl cluster settings get kubectl cluster settings params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *KubectlClusterSettingsGetKubectlClusterSettingsParams) WithDefaults() *KubectlClusterSettingsGetKubectlClusterSettingsParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the kubectl cluster settings get kubectl cluster settings params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *KubectlClusterSettingsGetKubectlClusterSettingsParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the kubectl cluster settings get kubectl cluster settings params +func (o *KubectlClusterSettingsGetKubectlClusterSettingsParams) WithTimeout(timeout time.Duration) *KubectlClusterSettingsGetKubectlClusterSettingsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the kubectl cluster settings get kubectl cluster settings params +func (o *KubectlClusterSettingsGetKubectlClusterSettingsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the kubectl cluster settings get kubectl cluster settings params +func (o *KubectlClusterSettingsGetKubectlClusterSettingsParams) WithContext(ctx context.Context) *KubectlClusterSettingsGetKubectlClusterSettingsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the kubectl cluster settings get kubectl cluster settings params +func (o *KubectlClusterSettingsGetKubectlClusterSettingsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the kubectl cluster settings get kubectl cluster settings params +func (o *KubectlClusterSettingsGetKubectlClusterSettingsParams) WithHTTPClient(client *http.Client) *KubectlClusterSettingsGetKubectlClusterSettingsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the kubectl cluster settings get kubectl cluster settings params +func (o *KubectlClusterSettingsGetKubectlClusterSettingsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithOptsID adds the optsID to the kubectl cluster settings get kubectl cluster settings params +func (o *KubectlClusterSettingsGetKubectlClusterSettingsParams) WithOptsID(optsID *string) *KubectlClusterSettingsGetKubectlClusterSettingsParams { + o.SetOptsID(optsID) + return o +} + +// SetOptsID adds the optsId to the kubectl cluster settings get kubectl cluster settings params +func (o *KubectlClusterSettingsGetKubectlClusterSettingsParams) SetOptsID(optsID *string) { + o.OptsID = optsID +} + +// WithOptsBlueprintRef adds the optsBlueprintRef to the kubectl cluster settings get kubectl cluster settings params +func (o *KubectlClusterSettingsGetKubectlClusterSettingsParams) WithOptsBlueprintRef(optsBlueprintRef *string) *KubectlClusterSettingsGetKubectlClusterSettingsParams { + o.SetOptsBlueprintRef(optsBlueprintRef) + return o +} + +// SetOptsBlueprintRef adds the optsBlueprintRef to the kubectl cluster settings get kubectl cluster settings params +func (o *KubectlClusterSettingsGetKubectlClusterSettingsParams) SetOptsBlueprintRef(optsBlueprintRef *string) { + o.OptsBlueprintRef = optsBlueprintRef +} + +// WithOptsClusterID adds the optsClusterID to the kubectl cluster settings get kubectl cluster settings params +func (o *KubectlClusterSettingsGetKubectlClusterSettingsParams) WithOptsClusterID(optsClusterID *string) *KubectlClusterSettingsGetKubectlClusterSettingsParams { + o.SetOptsClusterID(optsClusterID) + return o +} + +// SetOptsClusterID adds the optsClusterId to the kubectl cluster settings get kubectl cluster settings params +func (o *KubectlClusterSettingsGetKubectlClusterSettingsParams) SetOptsClusterID(optsClusterID *string) { + o.OptsClusterID = optsClusterID +} + +// WithOptsCount adds the optsCount to the kubectl cluster settings get kubectl cluster settings params +func (o *KubectlClusterSettingsGetKubectlClusterSettingsParams) WithOptsCount(optsCount *string) *KubectlClusterSettingsGetKubectlClusterSettingsParams { + o.SetOptsCount(optsCount) + return o +} + +// SetOptsCount adds the optsCount to the kubectl cluster settings get kubectl cluster settings params +func (o *KubectlClusterSettingsGetKubectlClusterSettingsParams) SetOptsCount(optsCount *string) { + o.OptsCount = optsCount +} + +// WithOptsDeleted adds the optsDeleted to the kubectl cluster settings get kubectl cluster settings params +func (o *KubectlClusterSettingsGetKubectlClusterSettingsParams) WithOptsDeleted(optsDeleted *bool) *KubectlClusterSettingsGetKubectlClusterSettingsParams { + o.SetOptsDeleted(optsDeleted) + return o +} + +// SetOptsDeleted adds the optsDeleted to the kubectl cluster settings get kubectl cluster settings params +func (o *KubectlClusterSettingsGetKubectlClusterSettingsParams) SetOptsDeleted(optsDeleted *bool) { + o.OptsDeleted = optsDeleted +} + +// WithOptsDisplayName adds the optsDisplayName to the kubectl cluster settings get kubectl cluster settings params +func (o *KubectlClusterSettingsGetKubectlClusterSettingsParams) WithOptsDisplayName(optsDisplayName *string) *KubectlClusterSettingsGetKubectlClusterSettingsParams { + o.SetOptsDisplayName(optsDisplayName) + return o +} + +// SetOptsDisplayName adds the optsDisplayName to the kubectl cluster settings get kubectl cluster settings params +func (o *KubectlClusterSettingsGetKubectlClusterSettingsParams) SetOptsDisplayName(optsDisplayName *string) { + o.OptsDisplayName = optsDisplayName +} + +// WithOptsExtended adds the optsExtended to the kubectl cluster settings get kubectl cluster settings params +func (o *KubectlClusterSettingsGetKubectlClusterSettingsParams) WithOptsExtended(optsExtended *bool) *KubectlClusterSettingsGetKubectlClusterSettingsParams { + o.SetOptsExtended(optsExtended) + return o +} + +// SetOptsExtended adds the optsExtended to the kubectl cluster settings get kubectl cluster settings params +func (o *KubectlClusterSettingsGetKubectlClusterSettingsParams) SetOptsExtended(optsExtended *bool) { + o.OptsExtended = optsExtended +} + +// WithOptsGlobalScope adds the optsGlobalScope to the kubectl cluster settings get kubectl cluster settings params +func (o *KubectlClusterSettingsGetKubectlClusterSettingsParams) WithOptsGlobalScope(optsGlobalScope *bool) *KubectlClusterSettingsGetKubectlClusterSettingsParams { + o.SetOptsGlobalScope(optsGlobalScope) + return o +} + +// SetOptsGlobalScope adds the optsGlobalScope to the kubectl cluster settings get kubectl cluster settings params +func (o *KubectlClusterSettingsGetKubectlClusterSettingsParams) SetOptsGlobalScope(optsGlobalScope *bool) { + o.OptsGlobalScope = optsGlobalScope +} + +// WithOptsGroups adds the optsGroups to the kubectl cluster settings get kubectl cluster settings params +func (o *KubectlClusterSettingsGetKubectlClusterSettingsParams) WithOptsGroups(optsGroups []string) *KubectlClusterSettingsGetKubectlClusterSettingsParams { + o.SetOptsGroups(optsGroups) + return o +} + +// SetOptsGroups adds the optsGroups to the kubectl cluster settings get kubectl cluster settings params +func (o *KubectlClusterSettingsGetKubectlClusterSettingsParams) SetOptsGroups(optsGroups []string) { + o.OptsGroups = optsGroups +} + +// WithOptsIgnoreScopeDefault adds the optsIgnoreScopeDefault to the kubectl cluster settings get kubectl cluster settings params +func (o *KubectlClusterSettingsGetKubectlClusterSettingsParams) WithOptsIgnoreScopeDefault(optsIgnoreScopeDefault *bool) *KubectlClusterSettingsGetKubectlClusterSettingsParams { + o.SetOptsIgnoreScopeDefault(optsIgnoreScopeDefault) + return o +} + +// SetOptsIgnoreScopeDefault adds the optsIgnoreScopeDefault to the kubectl cluster settings get kubectl cluster settings params +func (o *KubectlClusterSettingsGetKubectlClusterSettingsParams) SetOptsIgnoreScopeDefault(optsIgnoreScopeDefault *bool) { + o.OptsIgnoreScopeDefault = optsIgnoreScopeDefault +} + +// WithOptsIsSSOUser adds the optsIsSSOUser to the kubectl cluster settings get kubectl cluster settings params +func (o *KubectlClusterSettingsGetKubectlClusterSettingsParams) WithOptsIsSSOUser(optsIsSSOUser *bool) *KubectlClusterSettingsGetKubectlClusterSettingsParams { + o.SetOptsIsSSOUser(optsIsSSOUser) + return o +} + +// SetOptsIsSSOUser adds the optsIsSSOUser to the kubectl cluster settings get kubectl cluster settings params +func (o *KubectlClusterSettingsGetKubectlClusterSettingsParams) SetOptsIsSSOUser(optsIsSSOUser *bool) { + o.OptsIsSSOUser = optsIsSSOUser +} + +// WithOptsLimit adds the optsLimit to the kubectl cluster settings get kubectl cluster settings params +func (o *KubectlClusterSettingsGetKubectlClusterSettingsParams) WithOptsLimit(optsLimit *string) *KubectlClusterSettingsGetKubectlClusterSettingsParams { + o.SetOptsLimit(optsLimit) + return o +} + +// SetOptsLimit adds the optsLimit to the kubectl cluster settings get kubectl cluster settings params +func (o *KubectlClusterSettingsGetKubectlClusterSettingsParams) SetOptsLimit(optsLimit *string) { + o.OptsLimit = optsLimit +} + +// WithOptsName adds the optsName to the kubectl cluster settings get kubectl cluster settings params +func (o *KubectlClusterSettingsGetKubectlClusterSettingsParams) WithOptsName(optsName *string) *KubectlClusterSettingsGetKubectlClusterSettingsParams { + o.SetOptsName(optsName) + return o +} + +// SetOptsName adds the optsName to the kubectl cluster settings get kubectl cluster settings params +func (o *KubectlClusterSettingsGetKubectlClusterSettingsParams) SetOptsName(optsName *string) { + o.OptsName = optsName +} + +// WithOptsOffset adds the optsOffset to the kubectl cluster settings get kubectl cluster settings params +func (o *KubectlClusterSettingsGetKubectlClusterSettingsParams) WithOptsOffset(optsOffset *string) *KubectlClusterSettingsGetKubectlClusterSettingsParams { + o.SetOptsOffset(optsOffset) + return o +} + +// SetOptsOffset adds the optsOffset to the kubectl cluster settings get kubectl cluster settings params +func (o *KubectlClusterSettingsGetKubectlClusterSettingsParams) SetOptsOffset(optsOffset *string) { + o.OptsOffset = optsOffset +} + +// WithOptsOrder adds the optsOrder to the kubectl cluster settings get kubectl cluster settings params +func (o *KubectlClusterSettingsGetKubectlClusterSettingsParams) WithOptsOrder(optsOrder *string) *KubectlClusterSettingsGetKubectlClusterSettingsParams { + o.SetOptsOrder(optsOrder) + return o +} + +// SetOptsOrder adds the optsOrder to the kubectl cluster settings get kubectl cluster settings params +func (o *KubectlClusterSettingsGetKubectlClusterSettingsParams) SetOptsOrder(optsOrder *string) { + o.OptsOrder = optsOrder +} + +// WithOptsOrderBy adds the optsOrderBy to the kubectl cluster settings get kubectl cluster settings params +func (o *KubectlClusterSettingsGetKubectlClusterSettingsParams) WithOptsOrderBy(optsOrderBy *string) *KubectlClusterSettingsGetKubectlClusterSettingsParams { + o.SetOptsOrderBy(optsOrderBy) + return o +} + +// SetOptsOrderBy adds the optsOrderBy to the kubectl cluster settings get kubectl cluster settings params +func (o *KubectlClusterSettingsGetKubectlClusterSettingsParams) SetOptsOrderBy(optsOrderBy *string) { + o.OptsOrderBy = optsOrderBy +} + +// WithOptsOrganizationID adds the optsOrganizationID to the kubectl cluster settings get kubectl cluster settings params +func (o *KubectlClusterSettingsGetKubectlClusterSettingsParams) WithOptsOrganizationID(optsOrganizationID *string) *KubectlClusterSettingsGetKubectlClusterSettingsParams { + o.SetOptsOrganizationID(optsOrganizationID) + return o +} + +// SetOptsOrganizationID adds the optsOrganizationId to the kubectl cluster settings get kubectl cluster settings params +func (o *KubectlClusterSettingsGetKubectlClusterSettingsParams) SetOptsOrganizationID(optsOrganizationID *string) { + o.OptsOrganizationID = optsOrganizationID +} + +// WithOptsPartnerID adds the optsPartnerID to the kubectl cluster settings get kubectl cluster settings params +func (o *KubectlClusterSettingsGetKubectlClusterSettingsParams) WithOptsPartnerID(optsPartnerID *string) *KubectlClusterSettingsGetKubectlClusterSettingsParams { + o.SetOptsPartnerID(optsPartnerID) + return o +} + +// SetOptsPartnerID adds the optsPartnerId to the kubectl cluster settings get kubectl cluster settings params +func (o *KubectlClusterSettingsGetKubectlClusterSettingsParams) SetOptsPartnerID(optsPartnerID *string) { + o.OptsPartnerID = optsPartnerID +} + +// WithOptsProjectID adds the optsProjectID to the kubectl cluster settings get kubectl cluster settings params +func (o *KubectlClusterSettingsGetKubectlClusterSettingsParams) WithOptsProjectID(optsProjectID *string) *KubectlClusterSettingsGetKubectlClusterSettingsParams { + o.SetOptsProjectID(optsProjectID) + return o +} + +// SetOptsProjectID adds the optsProjectId to the kubectl cluster settings get kubectl cluster settings params +func (o *KubectlClusterSettingsGetKubectlClusterSettingsParams) SetOptsProjectID(optsProjectID *string) { + o.OptsProjectID = optsProjectID +} + +// WithOptsPublishedVersion adds the optsPublishedVersion to the kubectl cluster settings get kubectl cluster settings params +func (o *KubectlClusterSettingsGetKubectlClusterSettingsParams) WithOptsPublishedVersion(optsPublishedVersion *string) *KubectlClusterSettingsGetKubectlClusterSettingsParams { + o.SetOptsPublishedVersion(optsPublishedVersion) + return o +} + +// SetOptsPublishedVersion adds the optsPublishedVersion to the kubectl cluster settings get kubectl cluster settings params +func (o *KubectlClusterSettingsGetKubectlClusterSettingsParams) SetOptsPublishedVersion(optsPublishedVersion *string) { + o.OptsPublishedVersion = optsPublishedVersion +} + +// WithOptsSelector adds the optsSelector to the kubectl cluster settings get kubectl cluster settings params +func (o *KubectlClusterSettingsGetKubectlClusterSettingsParams) WithOptsSelector(optsSelector *string) *KubectlClusterSettingsGetKubectlClusterSettingsParams { + o.SetOptsSelector(optsSelector) + return o +} + +// SetOptsSelector adds the optsSelector to the kubectl cluster settings get kubectl cluster settings params +func (o *KubectlClusterSettingsGetKubectlClusterSettingsParams) SetOptsSelector(optsSelector *string) { + o.OptsSelector = optsSelector +} + +// WithOptsURLScope adds the optsURLScope to the kubectl cluster settings get kubectl cluster settings params +func (o *KubectlClusterSettingsGetKubectlClusterSettingsParams) WithOptsURLScope(optsURLScope string) *KubectlClusterSettingsGetKubectlClusterSettingsParams { + o.SetOptsURLScope(optsURLScope) + return o +} + +// SetOptsURLScope adds the optsUrlScope to the kubectl cluster settings get kubectl cluster settings params +func (o *KubectlClusterSettingsGetKubectlClusterSettingsParams) SetOptsURLScope(optsURLScope string) { + o.OptsURLScope = optsURLScope +} + +// WithOptsUsername adds the optsUsername to the kubectl cluster settings get kubectl cluster settings params +func (o *KubectlClusterSettingsGetKubectlClusterSettingsParams) WithOptsUsername(optsUsername *string) *KubectlClusterSettingsGetKubectlClusterSettingsParams { + o.SetOptsUsername(optsUsername) + return o +} + +// SetOptsUsername adds the optsUsername to the kubectl cluster settings get kubectl cluster settings params +func (o *KubectlClusterSettingsGetKubectlClusterSettingsParams) SetOptsUsername(optsUsername *string) { + o.OptsUsername = optsUsername +} + +// WriteToRequest writes these params to a swagger request +func (o *KubectlClusterSettingsGetKubectlClusterSettingsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.OptsID != nil { + + // query param opts.ID + var qrOptsID string + + if o.OptsID != nil { + qrOptsID = *o.OptsID + } + qOptsID := qrOptsID + if qOptsID != "" { + + if err := r.SetQueryParam("opts.ID", qOptsID); err != nil { + return err + } + } + } + + if o.OptsBlueprintRef != nil { + + // query param opts.blueprintRef + var qrOptsBlueprintRef string + + if o.OptsBlueprintRef != nil { + qrOptsBlueprintRef = *o.OptsBlueprintRef + } + qOptsBlueprintRef := qrOptsBlueprintRef + if qOptsBlueprintRef != "" { + + if err := r.SetQueryParam("opts.blueprintRef", qOptsBlueprintRef); err != nil { + return err + } + } + } + + if o.OptsClusterID != nil { + + // query param opts.clusterID + var qrOptsClusterID string + + if o.OptsClusterID != nil { + qrOptsClusterID = *o.OptsClusterID + } + qOptsClusterID := qrOptsClusterID + if qOptsClusterID != "" { + + if err := r.SetQueryParam("opts.clusterID", qOptsClusterID); err != nil { + return err + } + } + } + + if o.OptsCount != nil { + + // query param opts.count + var qrOptsCount string + + if o.OptsCount != nil { + qrOptsCount = *o.OptsCount + } + qOptsCount := qrOptsCount + if qOptsCount != "" { + + if err := r.SetQueryParam("opts.count", qOptsCount); err != nil { + return err + } + } + } + + if o.OptsDeleted != nil { + + // query param opts.deleted + var qrOptsDeleted bool + + if o.OptsDeleted != nil { + qrOptsDeleted = *o.OptsDeleted + } + qOptsDeleted := swag.FormatBool(qrOptsDeleted) + if qOptsDeleted != "" { + + if err := r.SetQueryParam("opts.deleted", qOptsDeleted); err != nil { + return err + } + } + } + + if o.OptsDisplayName != nil { + + // query param opts.displayName + var qrOptsDisplayName string + + if o.OptsDisplayName != nil { + qrOptsDisplayName = *o.OptsDisplayName + } + qOptsDisplayName := qrOptsDisplayName + if qOptsDisplayName != "" { + + if err := r.SetQueryParam("opts.displayName", qOptsDisplayName); err != nil { + return err + } + } + } + + if o.OptsExtended != nil { + + // query param opts.extended + var qrOptsExtended bool + + if o.OptsExtended != nil { + qrOptsExtended = *o.OptsExtended + } + qOptsExtended := swag.FormatBool(qrOptsExtended) + if qOptsExtended != "" { + + if err := r.SetQueryParam("opts.extended", qOptsExtended); err != nil { + return err + } + } + } + + if o.OptsGlobalScope != nil { + + // query param opts.globalScope + var qrOptsGlobalScope bool + + if o.OptsGlobalScope != nil { + qrOptsGlobalScope = *o.OptsGlobalScope + } + qOptsGlobalScope := swag.FormatBool(qrOptsGlobalScope) + if qOptsGlobalScope != "" { + + if err := r.SetQueryParam("opts.globalScope", qOptsGlobalScope); err != nil { + return err + } + } + } + + if o.OptsGroups != nil { + + // binding items for opts.groups + joinedOptsGroups := o.bindParamOptsGroups(reg) + + // query array param opts.groups + if err := r.SetQueryParam("opts.groups", joinedOptsGroups...); err != nil { + return err + } + } + + if o.OptsIgnoreScopeDefault != nil { + + // query param opts.ignoreScopeDefault + var qrOptsIgnoreScopeDefault bool + + if o.OptsIgnoreScopeDefault != nil { + qrOptsIgnoreScopeDefault = *o.OptsIgnoreScopeDefault + } + qOptsIgnoreScopeDefault := swag.FormatBool(qrOptsIgnoreScopeDefault) + if qOptsIgnoreScopeDefault != "" { + + if err := r.SetQueryParam("opts.ignoreScopeDefault", qOptsIgnoreScopeDefault); err != nil { + return err + } + } + } + + if o.OptsIsSSOUser != nil { + + // query param opts.isSSOUser + var qrOptsIsSSOUser bool + + if o.OptsIsSSOUser != nil { + qrOptsIsSSOUser = *o.OptsIsSSOUser + } + qOptsIsSSOUser := swag.FormatBool(qrOptsIsSSOUser) + if qOptsIsSSOUser != "" { + + if err := r.SetQueryParam("opts.isSSOUser", qOptsIsSSOUser); err != nil { + return err + } + } + } + + if o.OptsLimit != nil { + + // query param opts.limit + var qrOptsLimit string + + if o.OptsLimit != nil { + qrOptsLimit = *o.OptsLimit + } + qOptsLimit := qrOptsLimit + if qOptsLimit != "" { + + if err := r.SetQueryParam("opts.limit", qOptsLimit); err != nil { + return err + } + } + } + + if o.OptsName != nil { + + // query param opts.name + var qrOptsName string + + if o.OptsName != nil { + qrOptsName = *o.OptsName + } + qOptsName := qrOptsName + if qOptsName != "" { + + if err := r.SetQueryParam("opts.name", qOptsName); err != nil { + return err + } + } + } + + if o.OptsOffset != nil { + + // query param opts.offset + var qrOptsOffset string + + if o.OptsOffset != nil { + qrOptsOffset = *o.OptsOffset + } + qOptsOffset := qrOptsOffset + if qOptsOffset != "" { + + if err := r.SetQueryParam("opts.offset", qOptsOffset); err != nil { + return err + } + } + } + + if o.OptsOrder != nil { + + // query param opts.order + var qrOptsOrder string + + if o.OptsOrder != nil { + qrOptsOrder = *o.OptsOrder + } + qOptsOrder := qrOptsOrder + if qOptsOrder != "" { + + if err := r.SetQueryParam("opts.order", qOptsOrder); err != nil { + return err + } + } + } + + if o.OptsOrderBy != nil { + + // query param opts.orderBy + var qrOptsOrderBy string + + if o.OptsOrderBy != nil { + qrOptsOrderBy = *o.OptsOrderBy + } + qOptsOrderBy := qrOptsOrderBy + if qOptsOrderBy != "" { + + if err := r.SetQueryParam("opts.orderBy", qOptsOrderBy); err != nil { + return err + } + } + } + + if o.OptsOrganizationID != nil { + + // query param opts.organizationID + var qrOptsOrganizationID string + + if o.OptsOrganizationID != nil { + qrOptsOrganizationID = *o.OptsOrganizationID + } + qOptsOrganizationID := qrOptsOrganizationID + if qOptsOrganizationID != "" { + + if err := r.SetQueryParam("opts.organizationID", qOptsOrganizationID); err != nil { + return err + } + } + } + + if o.OptsPartnerID != nil { + + // query param opts.partnerID + var qrOptsPartnerID string + + if o.OptsPartnerID != nil { + qrOptsPartnerID = *o.OptsPartnerID + } + qOptsPartnerID := qrOptsPartnerID + if qOptsPartnerID != "" { + + if err := r.SetQueryParam("opts.partnerID", qOptsPartnerID); err != nil { + return err + } + } + } + + if o.OptsProjectID != nil { + + // query param opts.projectID + var qrOptsProjectID string + + if o.OptsProjectID != nil { + qrOptsProjectID = *o.OptsProjectID + } + qOptsProjectID := qrOptsProjectID + if qOptsProjectID != "" { + + if err := r.SetQueryParam("opts.projectID", qOptsProjectID); err != nil { + return err + } + } + } + + if o.OptsPublishedVersion != nil { + + // query param opts.publishedVersion + var qrOptsPublishedVersion string + + if o.OptsPublishedVersion != nil { + qrOptsPublishedVersion = *o.OptsPublishedVersion + } + qOptsPublishedVersion := qrOptsPublishedVersion + if qOptsPublishedVersion != "" { + + if err := r.SetQueryParam("opts.publishedVersion", qOptsPublishedVersion); err != nil { + return err + } + } + } + + if o.OptsSelector != nil { + + // query param opts.selector + var qrOptsSelector string + + if o.OptsSelector != nil { + qrOptsSelector = *o.OptsSelector + } + qOptsSelector := qrOptsSelector + if qOptsSelector != "" { + + if err := r.SetQueryParam("opts.selector", qOptsSelector); err != nil { + return err + } + } + } + + // path param opts.urlScope + if err := r.SetPathParam("opts.urlScope", o.OptsURLScope); err != nil { + return err + } + + if o.OptsUsername != nil { + + // query param opts.username + var qrOptsUsername string + + if o.OptsUsername != nil { + qrOptsUsername = *o.OptsUsername + } + qOptsUsername := qrOptsUsername + if qOptsUsername != "" { + + if err := r.SetQueryParam("opts.username", qOptsUsername); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// bindParamKubectlClusterSettingsGetKubectlClusterSettings binds the parameter opts.groups +func (o *KubectlClusterSettingsGetKubectlClusterSettingsParams) bindParamOptsGroups(formats strfmt.Registry) []string { + optsGroupsIR := o.OptsGroups + + var optsGroupsIC []string + for _, optsGroupsIIR := range optsGroupsIR { // explode []string + + optsGroupsIIV := optsGroupsIIR // string as string + optsGroupsIC = append(optsGroupsIC, optsGroupsIIV) + } + + // items.CollectionFormat: "multi" + optsGroupsIS := swag.JoinByFormat(optsGroupsIC, "multi") + + return optsGroupsIS +} diff --git a/components/common/api/def/clients/sentry/client/kubectl_cluster_settings/kubectl_cluster_settings_get_kubectl_cluster_settings_responses.go b/components/common/api/def/clients/sentry/client/kubectl_cluster_settings/kubectl_cluster_settings_get_kubectl_cluster_settings_responses.go new file mode 100644 index 0000000..d92acdd --- /dev/null +++ b/components/common/api/def/clients/sentry/client/kubectl_cluster_settings/kubectl_cluster_settings_get_kubectl_cluster_settings_responses.go @@ -0,0 +1,187 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package kubectl_cluster_settings + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/RafaySystems/rcloud-base/components/common/api/def/clients/sentry/models" +) + +// KubectlClusterSettingsGetKubectlClusterSettingsReader is a Reader for the KubectlClusterSettingsGetKubectlClusterSettings structure. +type KubectlClusterSettingsGetKubectlClusterSettingsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *KubectlClusterSettingsGetKubectlClusterSettingsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewKubectlClusterSettingsGetKubectlClusterSettingsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 403: + result := NewKubectlClusterSettingsGetKubectlClusterSettingsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewKubectlClusterSettingsGetKubectlClusterSettingsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + result := NewKubectlClusterSettingsGetKubectlClusterSettingsDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewKubectlClusterSettingsGetKubectlClusterSettingsOK creates a KubectlClusterSettingsGetKubectlClusterSettingsOK with default headers values +func NewKubectlClusterSettingsGetKubectlClusterSettingsOK() *KubectlClusterSettingsGetKubectlClusterSettingsOK { + return &KubectlClusterSettingsGetKubectlClusterSettingsOK{} +} + +/* KubectlClusterSettingsGetKubectlClusterSettingsOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type KubectlClusterSettingsGetKubectlClusterSettingsOK struct { + Payload *models.RPCGetKubectlClusterSettingsResponse +} + +func (o *KubectlClusterSettingsGetKubectlClusterSettingsOK) Error() string { + return fmt.Sprintf("[GET /v2/sentry/kubectl/{opts.urlScope}/settings][%d] kubectlClusterSettingsGetKubectlClusterSettingsOK %+v", 200, o.Payload) +} +func (o *KubectlClusterSettingsGetKubectlClusterSettingsOK) GetPayload() *models.RPCGetKubectlClusterSettingsResponse { + return o.Payload +} + +func (o *KubectlClusterSettingsGetKubectlClusterSettingsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.RPCGetKubectlClusterSettingsResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewKubectlClusterSettingsGetKubectlClusterSettingsForbidden creates a KubectlClusterSettingsGetKubectlClusterSettingsForbidden with default headers values +func NewKubectlClusterSettingsGetKubectlClusterSettingsForbidden() *KubectlClusterSettingsGetKubectlClusterSettingsForbidden { + return &KubectlClusterSettingsGetKubectlClusterSettingsForbidden{} +} + +/* KubectlClusterSettingsGetKubectlClusterSettingsForbidden describes a response with status code 403, with default header values. + +Returned when the user does not have permission to access the resource. +*/ +type KubectlClusterSettingsGetKubectlClusterSettingsForbidden struct { + Payload interface{} +} + +func (o *KubectlClusterSettingsGetKubectlClusterSettingsForbidden) Error() string { + return fmt.Sprintf("[GET /v2/sentry/kubectl/{opts.urlScope}/settings][%d] kubectlClusterSettingsGetKubectlClusterSettingsForbidden %+v", 403, o.Payload) +} +func (o *KubectlClusterSettingsGetKubectlClusterSettingsForbidden) GetPayload() interface{} { + return o.Payload +} + +func (o *KubectlClusterSettingsGetKubectlClusterSettingsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewKubectlClusterSettingsGetKubectlClusterSettingsNotFound creates a KubectlClusterSettingsGetKubectlClusterSettingsNotFound with default headers values +func NewKubectlClusterSettingsGetKubectlClusterSettingsNotFound() *KubectlClusterSettingsGetKubectlClusterSettingsNotFound { + return &KubectlClusterSettingsGetKubectlClusterSettingsNotFound{} +} + +/* KubectlClusterSettingsGetKubectlClusterSettingsNotFound describes a response with status code 404, with default header values. + +Returned when the resource does not exist. +*/ +type KubectlClusterSettingsGetKubectlClusterSettingsNotFound struct { + Payload string +} + +func (o *KubectlClusterSettingsGetKubectlClusterSettingsNotFound) Error() string { + return fmt.Sprintf("[GET /v2/sentry/kubectl/{opts.urlScope}/settings][%d] kubectlClusterSettingsGetKubectlClusterSettingsNotFound %+v", 404, o.Payload) +} +func (o *KubectlClusterSettingsGetKubectlClusterSettingsNotFound) GetPayload() string { + return o.Payload +} + +func (o *KubectlClusterSettingsGetKubectlClusterSettingsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewKubectlClusterSettingsGetKubectlClusterSettingsDefault creates a KubectlClusterSettingsGetKubectlClusterSettingsDefault with default headers values +func NewKubectlClusterSettingsGetKubectlClusterSettingsDefault(code int) *KubectlClusterSettingsGetKubectlClusterSettingsDefault { + return &KubectlClusterSettingsGetKubectlClusterSettingsDefault{ + _statusCode: code, + } +} + +/* KubectlClusterSettingsGetKubectlClusterSettingsDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type KubectlClusterSettingsGetKubectlClusterSettingsDefault struct { + _statusCode int + + Payload *models.GooglerpcStatus +} + +// Code gets the status code for the kubectl cluster settings get kubectl cluster settings default response +func (o *KubectlClusterSettingsGetKubectlClusterSettingsDefault) Code() int { + return o._statusCode +} + +func (o *KubectlClusterSettingsGetKubectlClusterSettingsDefault) Error() string { + return fmt.Sprintf("[GET /v2/sentry/kubectl/{opts.urlScope}/settings][%d] KubectlClusterSettings_GetKubectlClusterSettings default %+v", o._statusCode, o.Payload) +} +func (o *KubectlClusterSettingsGetKubectlClusterSettingsDefault) GetPayload() *models.GooglerpcStatus { + return o.Payload +} + +func (o *KubectlClusterSettingsGetKubectlClusterSettingsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.GooglerpcStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/components/common/api/def/clients/sentry/client/kubectl_cluster_settings/kubectl_cluster_settings_update_kubectl_cluster_settings_parameters.go b/components/common/api/def/clients/sentry/client/kubectl_cluster_settings/kubectl_cluster_settings_update_kubectl_cluster_settings_parameters.go new file mode 100644 index 0000000..5929991 --- /dev/null +++ b/components/common/api/def/clients/sentry/client/kubectl_cluster_settings/kubectl_cluster_settings_update_kubectl_cluster_settings_parameters.go @@ -0,0 +1,170 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package kubectl_cluster_settings + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/RafaySystems/rcloud-base/components/common/api/def/clients/sentry/models" +) + +// NewKubectlClusterSettingsUpdateKubectlClusterSettingsParams creates a new KubectlClusterSettingsUpdateKubectlClusterSettingsParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewKubectlClusterSettingsUpdateKubectlClusterSettingsParams() *KubectlClusterSettingsUpdateKubectlClusterSettingsParams { + return &KubectlClusterSettingsUpdateKubectlClusterSettingsParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewKubectlClusterSettingsUpdateKubectlClusterSettingsParamsWithTimeout creates a new KubectlClusterSettingsUpdateKubectlClusterSettingsParams object +// with the ability to set a timeout on a request. +func NewKubectlClusterSettingsUpdateKubectlClusterSettingsParamsWithTimeout(timeout time.Duration) *KubectlClusterSettingsUpdateKubectlClusterSettingsParams { + return &KubectlClusterSettingsUpdateKubectlClusterSettingsParams{ + timeout: timeout, + } +} + +// NewKubectlClusterSettingsUpdateKubectlClusterSettingsParamsWithContext creates a new KubectlClusterSettingsUpdateKubectlClusterSettingsParams object +// with the ability to set a context for a request. +func NewKubectlClusterSettingsUpdateKubectlClusterSettingsParamsWithContext(ctx context.Context) *KubectlClusterSettingsUpdateKubectlClusterSettingsParams { + return &KubectlClusterSettingsUpdateKubectlClusterSettingsParams{ + Context: ctx, + } +} + +// NewKubectlClusterSettingsUpdateKubectlClusterSettingsParamsWithHTTPClient creates a new KubectlClusterSettingsUpdateKubectlClusterSettingsParams object +// with the ability to set a custom HTTPClient for a request. +func NewKubectlClusterSettingsUpdateKubectlClusterSettingsParamsWithHTTPClient(client *http.Client) *KubectlClusterSettingsUpdateKubectlClusterSettingsParams { + return &KubectlClusterSettingsUpdateKubectlClusterSettingsParams{ + HTTPClient: client, + } +} + +/* KubectlClusterSettingsUpdateKubectlClusterSettingsParams contains all the parameters to send to the API endpoint + for the kubectl cluster settings update kubectl cluster settings operation. + + Typically these are written to a http.Request. +*/ +type KubectlClusterSettingsUpdateKubectlClusterSettingsParams struct { + + // Body. + Body *models.RPCUpdateKubectlClusterSettingsRequest + + /* OptsURLScope. + + urlScope is supposed to be passed in the URL as kind/HashID(value) + */ + OptsURLScope string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the kubectl cluster settings update kubectl cluster settings params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *KubectlClusterSettingsUpdateKubectlClusterSettingsParams) WithDefaults() *KubectlClusterSettingsUpdateKubectlClusterSettingsParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the kubectl cluster settings update kubectl cluster settings params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *KubectlClusterSettingsUpdateKubectlClusterSettingsParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the kubectl cluster settings update kubectl cluster settings params +func (o *KubectlClusterSettingsUpdateKubectlClusterSettingsParams) WithTimeout(timeout time.Duration) *KubectlClusterSettingsUpdateKubectlClusterSettingsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the kubectl cluster settings update kubectl cluster settings params +func (o *KubectlClusterSettingsUpdateKubectlClusterSettingsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the kubectl cluster settings update kubectl cluster settings params +func (o *KubectlClusterSettingsUpdateKubectlClusterSettingsParams) WithContext(ctx context.Context) *KubectlClusterSettingsUpdateKubectlClusterSettingsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the kubectl cluster settings update kubectl cluster settings params +func (o *KubectlClusterSettingsUpdateKubectlClusterSettingsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the kubectl cluster settings update kubectl cluster settings params +func (o *KubectlClusterSettingsUpdateKubectlClusterSettingsParams) WithHTTPClient(client *http.Client) *KubectlClusterSettingsUpdateKubectlClusterSettingsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the kubectl cluster settings update kubectl cluster settings params +func (o *KubectlClusterSettingsUpdateKubectlClusterSettingsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the kubectl cluster settings update kubectl cluster settings params +func (o *KubectlClusterSettingsUpdateKubectlClusterSettingsParams) WithBody(body *models.RPCUpdateKubectlClusterSettingsRequest) *KubectlClusterSettingsUpdateKubectlClusterSettingsParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the kubectl cluster settings update kubectl cluster settings params +func (o *KubectlClusterSettingsUpdateKubectlClusterSettingsParams) SetBody(body *models.RPCUpdateKubectlClusterSettingsRequest) { + o.Body = body +} + +// WithOptsURLScope adds the optsURLScope to the kubectl cluster settings update kubectl cluster settings params +func (o *KubectlClusterSettingsUpdateKubectlClusterSettingsParams) WithOptsURLScope(optsURLScope string) *KubectlClusterSettingsUpdateKubectlClusterSettingsParams { + o.SetOptsURLScope(optsURLScope) + return o +} + +// SetOptsURLScope adds the optsUrlScope to the kubectl cluster settings update kubectl cluster settings params +func (o *KubectlClusterSettingsUpdateKubectlClusterSettingsParams) SetOptsURLScope(optsURLScope string) { + o.OptsURLScope = optsURLScope +} + +// WriteToRequest writes these params to a swagger request +func (o *KubectlClusterSettingsUpdateKubectlClusterSettingsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param opts.urlScope + if err := r.SetPathParam("opts.urlScope", o.OptsURLScope); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/components/common/api/def/clients/sentry/client/kubectl_cluster_settings/kubectl_cluster_settings_update_kubectl_cluster_settings_responses.go b/components/common/api/def/clients/sentry/client/kubectl_cluster_settings/kubectl_cluster_settings_update_kubectl_cluster_settings_responses.go new file mode 100644 index 0000000..48d045f --- /dev/null +++ b/components/common/api/def/clients/sentry/client/kubectl_cluster_settings/kubectl_cluster_settings_update_kubectl_cluster_settings_responses.go @@ -0,0 +1,185 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package kubectl_cluster_settings + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/RafaySystems/rcloud-base/components/common/api/def/clients/sentry/models" +) + +// KubectlClusterSettingsUpdateKubectlClusterSettingsReader is a Reader for the KubectlClusterSettingsUpdateKubectlClusterSettings structure. +type KubectlClusterSettingsUpdateKubectlClusterSettingsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *KubectlClusterSettingsUpdateKubectlClusterSettingsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewKubectlClusterSettingsUpdateKubectlClusterSettingsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 403: + result := NewKubectlClusterSettingsUpdateKubectlClusterSettingsForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewKubectlClusterSettingsUpdateKubectlClusterSettingsNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + result := NewKubectlClusterSettingsUpdateKubectlClusterSettingsDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewKubectlClusterSettingsUpdateKubectlClusterSettingsOK creates a KubectlClusterSettingsUpdateKubectlClusterSettingsOK with default headers values +func NewKubectlClusterSettingsUpdateKubectlClusterSettingsOK() *KubectlClusterSettingsUpdateKubectlClusterSettingsOK { + return &KubectlClusterSettingsUpdateKubectlClusterSettingsOK{} +} + +/* KubectlClusterSettingsUpdateKubectlClusterSettingsOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type KubectlClusterSettingsUpdateKubectlClusterSettingsOK struct { + Payload models.RPCUpdateKubectlClusterSettingsResponse +} + +func (o *KubectlClusterSettingsUpdateKubectlClusterSettingsOK) Error() string { + return fmt.Sprintf("[PUT /v2/sentry/kubectl/{opts.urlScope}/settings][%d] kubectlClusterSettingsUpdateKubectlClusterSettingsOK %+v", 200, o.Payload) +} +func (o *KubectlClusterSettingsUpdateKubectlClusterSettingsOK) GetPayload() models.RPCUpdateKubectlClusterSettingsResponse { + return o.Payload +} + +func (o *KubectlClusterSettingsUpdateKubectlClusterSettingsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewKubectlClusterSettingsUpdateKubectlClusterSettingsForbidden creates a KubectlClusterSettingsUpdateKubectlClusterSettingsForbidden with default headers values +func NewKubectlClusterSettingsUpdateKubectlClusterSettingsForbidden() *KubectlClusterSettingsUpdateKubectlClusterSettingsForbidden { + return &KubectlClusterSettingsUpdateKubectlClusterSettingsForbidden{} +} + +/* KubectlClusterSettingsUpdateKubectlClusterSettingsForbidden describes a response with status code 403, with default header values. + +Returned when the user does not have permission to access the resource. +*/ +type KubectlClusterSettingsUpdateKubectlClusterSettingsForbidden struct { + Payload interface{} +} + +func (o *KubectlClusterSettingsUpdateKubectlClusterSettingsForbidden) Error() string { + return fmt.Sprintf("[PUT /v2/sentry/kubectl/{opts.urlScope}/settings][%d] kubectlClusterSettingsUpdateKubectlClusterSettingsForbidden %+v", 403, o.Payload) +} +func (o *KubectlClusterSettingsUpdateKubectlClusterSettingsForbidden) GetPayload() interface{} { + return o.Payload +} + +func (o *KubectlClusterSettingsUpdateKubectlClusterSettingsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewKubectlClusterSettingsUpdateKubectlClusterSettingsNotFound creates a KubectlClusterSettingsUpdateKubectlClusterSettingsNotFound with default headers values +func NewKubectlClusterSettingsUpdateKubectlClusterSettingsNotFound() *KubectlClusterSettingsUpdateKubectlClusterSettingsNotFound { + return &KubectlClusterSettingsUpdateKubectlClusterSettingsNotFound{} +} + +/* KubectlClusterSettingsUpdateKubectlClusterSettingsNotFound describes a response with status code 404, with default header values. + +Returned when the resource does not exist. +*/ +type KubectlClusterSettingsUpdateKubectlClusterSettingsNotFound struct { + Payload string +} + +func (o *KubectlClusterSettingsUpdateKubectlClusterSettingsNotFound) Error() string { + return fmt.Sprintf("[PUT /v2/sentry/kubectl/{opts.urlScope}/settings][%d] kubectlClusterSettingsUpdateKubectlClusterSettingsNotFound %+v", 404, o.Payload) +} +func (o *KubectlClusterSettingsUpdateKubectlClusterSettingsNotFound) GetPayload() string { + return o.Payload +} + +func (o *KubectlClusterSettingsUpdateKubectlClusterSettingsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewKubectlClusterSettingsUpdateKubectlClusterSettingsDefault creates a KubectlClusterSettingsUpdateKubectlClusterSettingsDefault with default headers values +func NewKubectlClusterSettingsUpdateKubectlClusterSettingsDefault(code int) *KubectlClusterSettingsUpdateKubectlClusterSettingsDefault { + return &KubectlClusterSettingsUpdateKubectlClusterSettingsDefault{ + _statusCode: code, + } +} + +/* KubectlClusterSettingsUpdateKubectlClusterSettingsDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type KubectlClusterSettingsUpdateKubectlClusterSettingsDefault struct { + _statusCode int + + Payload *models.GooglerpcStatus +} + +// Code gets the status code for the kubectl cluster settings update kubectl cluster settings default response +func (o *KubectlClusterSettingsUpdateKubectlClusterSettingsDefault) Code() int { + return o._statusCode +} + +func (o *KubectlClusterSettingsUpdateKubectlClusterSettingsDefault) Error() string { + return fmt.Sprintf("[PUT /v2/sentry/kubectl/{opts.urlScope}/settings][%d] KubectlClusterSettings_UpdateKubectlClusterSettings default %+v", o._statusCode, o.Payload) +} +func (o *KubectlClusterSettingsUpdateKubectlClusterSettingsDefault) GetPayload() *models.GooglerpcStatus { + return o.Payload +} + +func (o *KubectlClusterSettingsUpdateKubectlClusterSettingsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.GooglerpcStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/components/common/api/def/clients/sentry/client/sentry_bootstrap_service_client.go b/components/common/api/def/clients/sentry/client/sentry_bootstrap_service_client.go new file mode 100644 index 0000000..ea4fbee --- /dev/null +++ b/components/common/api/def/clients/sentry/client/sentry_bootstrap_service_client.go @@ -0,0 +1,112 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package client + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/RafaySystems/rcloud-base/components/common/api/def/clients/sentry/client/bootstrap" +) + +// Default sentry bootstrap service HTTP client. +var Default = NewHTTPClient(nil) + +const ( + // DefaultHost is the default Host + // found in Meta (info) section of spec file + DefaultHost string = "localhost" + // DefaultBasePath is the default BasePath + // found in Meta (info) section of spec file + DefaultBasePath string = "/" +) + +// DefaultSchemes are the default schemes found in Meta (info) section of spec file +var DefaultSchemes = []string{"https"} + +// NewHTTPClient creates a new sentry bootstrap service HTTP client. +func NewHTTPClient(formats strfmt.Registry) *SentryBootstrapService { + return NewHTTPClientWithConfig(formats, nil) +} + +// NewHTTPClientWithConfig creates a new sentry bootstrap service HTTP client, +// using a customizable transport config. +func NewHTTPClientWithConfig(formats strfmt.Registry, cfg *TransportConfig) *SentryBootstrapService { + // ensure nullable parameters have default + if cfg == nil { + cfg = DefaultTransportConfig() + } + + // create transport and client + transport := httptransport.New(cfg.Host, cfg.BasePath, cfg.Schemes) + return New(transport, formats) +} + +// New creates a new sentry bootstrap service client +func New(transport runtime.ClientTransport, formats strfmt.Registry) *SentryBootstrapService { + // ensure nullable parameters have default + if formats == nil { + formats = strfmt.Default + } + + cli := new(SentryBootstrapService) + cli.Transport = transport + cli.Bootstrap = bootstrap.New(transport, formats) + return cli +} + +// DefaultTransportConfig creates a TransportConfig with the +// default settings taken from the meta section of the spec file. +func DefaultTransportConfig() *TransportConfig { + return &TransportConfig{ + Host: DefaultHost, + BasePath: DefaultBasePath, + Schemes: DefaultSchemes, + } +} + +// TransportConfig contains the transport related info, +// found in the meta section of the spec file. +type TransportConfig struct { + Host string + BasePath string + Schemes []string +} + +// WithHost overrides the default host, +// provided by the meta section of the spec file. +func (cfg *TransportConfig) WithHost(host string) *TransportConfig { + cfg.Host = host + return cfg +} + +// WithBasePath overrides the default basePath, +// provided by the meta section of the spec file. +func (cfg *TransportConfig) WithBasePath(basePath string) *TransportConfig { + cfg.BasePath = basePath + return cfg +} + +// WithSchemes overrides the default schemes, +// provided by the meta section of the spec file. +func (cfg *TransportConfig) WithSchemes(schemes []string) *TransportConfig { + cfg.Schemes = schemes + return cfg +} + +// SentryBootstrapService is a client for sentry bootstrap service +type SentryBootstrapService struct { + Bootstrap bootstrap.ClientService + + Transport runtime.ClientTransport +} + +// SetTransport changes the transport on the client and all its subresources +func (c *SentryBootstrapService) SetTransport(transport runtime.ClientTransport) { + c.Transport = transport + c.Bootstrap.SetTransport(transport) +} diff --git a/components/common/api/def/clients/sentry/models/config_drift_reconcillation_action.go b/components/common/api/def/clients/sentry/models/config_drift_reconcillation_action.go new file mode 100644 index 0000000..33f7bdf --- /dev/null +++ b/components/common/api/def/clients/sentry/models/config_drift_reconcillation_action.go @@ -0,0 +1,81 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" +) + +// ConfigDriftReconcillationAction config drift reconcillation action +// +// swagger:model configDriftReconcillationAction +type ConfigDriftReconcillationAction string + +func NewConfigDriftReconcillationAction(value ConfigDriftReconcillationAction) *ConfigDriftReconcillationAction { + return &value +} + +// Pointer returns a pointer to a freshly-allocated ConfigDriftReconcillationAction. +func (m ConfigDriftReconcillationAction) Pointer() *ConfigDriftReconcillationAction { + return &m +} + +const ( + + // ConfigDriftReconcillationActionDriftReconcillationActionNotSet captures enum value "DriftReconcillationActionNotSet" + ConfigDriftReconcillationActionDriftReconcillationActionNotSet ConfigDriftReconcillationAction = "DriftReconcillationActionNotSet" + + // ConfigDriftReconcillationActionDriftReconcillationActionNotify captures enum value "DriftReconcillationActionNotify" + ConfigDriftReconcillationActionDriftReconcillationActionNotify ConfigDriftReconcillationAction = "DriftReconcillationActionNotify" + + // ConfigDriftReconcillationActionDriftReconcillationActionDeny captures enum value "DriftReconcillationActionDeny" + ConfigDriftReconcillationActionDriftReconcillationActionDeny ConfigDriftReconcillationAction = "DriftReconcillationActionDeny" +) + +// for schema +var configDriftReconcillationActionEnum []interface{} + +func init() { + var res []ConfigDriftReconcillationAction + if err := json.Unmarshal([]byte(`["DriftReconcillationActionNotSet","DriftReconcillationActionNotify","DriftReconcillationActionDeny"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + configDriftReconcillationActionEnum = append(configDriftReconcillationActionEnum, v) + } +} + +func (m ConfigDriftReconcillationAction) validateConfigDriftReconcillationActionEnum(path, location string, value ConfigDriftReconcillationAction) error { + if err := validate.EnumCase(path, location, value, configDriftReconcillationActionEnum, true); err != nil { + return err + } + return nil +} + +// Validate validates this config drift reconcillation action +func (m ConfigDriftReconcillationAction) Validate(formats strfmt.Registry) error { + var res []error + + // value enum + if err := m.validateConfigDriftReconcillationActionEnum("", "body", m); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// ContextValidate validates this config drift reconcillation action based on context it is used +func (m ConfigDriftReconcillationAction) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} diff --git a/components/common/api/def/clients/sentry/models/config_placement_type.go b/components/common/api/def/clients/sentry/models/config_placement_type.go new file mode 100644 index 0000000..77baa3c --- /dev/null +++ b/components/common/api/def/clients/sentry/models/config_placement_type.go @@ -0,0 +1,84 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" +) + +// ConfigPlacementType config placement type +// +// swagger:model configPlacementType +type ConfigPlacementType string + +func NewConfigPlacementType(value ConfigPlacementType) *ConfigPlacementType { + return &value +} + +// Pointer returns a pointer to a freshly-allocated ConfigPlacementType. +func (m ConfigPlacementType) Pointer() *ConfigPlacementType { + return &m +} + +const ( + + // ConfigPlacementTypeClusterSelector captures enum value "ClusterSelector" + ConfigPlacementTypeClusterSelector ConfigPlacementType = "ClusterSelector" + + // ConfigPlacementTypeClusterLocations captures enum value "ClusterLocations" + ConfigPlacementTypeClusterLocations ConfigPlacementType = "ClusterLocations" + + // ConfigPlacementTypeClusterLabels captures enum value "ClusterLabels" + ConfigPlacementTypeClusterLabels ConfigPlacementType = "ClusterLabels" + + // ConfigPlacementTypeClusterSpecific captures enum value "ClusterSpecific" + ConfigPlacementTypeClusterSpecific ConfigPlacementType = "ClusterSpecific" +) + +// for schema +var configPlacementTypeEnum []interface{} + +func init() { + var res []ConfigPlacementType + if err := json.Unmarshal([]byte(`["ClusterSelector","ClusterLocations","ClusterLabels","ClusterSpecific"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + configPlacementTypeEnum = append(configPlacementTypeEnum, v) + } +} + +func (m ConfigPlacementType) validateConfigPlacementTypeEnum(path, location string, value ConfigPlacementType) error { + if err := validate.EnumCase(path, location, value, configPlacementTypeEnum, true); err != nil { + return err + } + return nil +} + +// Validate validates this config placement type +func (m ConfigPlacementType) Validate(formats strfmt.Registry) error { + var res []error + + // value enum + if err := m.validateConfigPlacementTypeEnum("", "body", m); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// ContextValidate validates this config placement type based on context it is used +func (m ConfigPlacementType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} diff --git a/components/common/api/def/clients/sentry/models/controller_step_object.go b/components/common/api/def/clients/sentry/models/controller_step_object.go new file mode 100644 index 0000000..29dd584 --- /dev/null +++ b/components/common/api/def/clients/sentry/models/controller_step_object.go @@ -0,0 +1,112 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// ControllerStepObject +kubebuilder:object:generate=true +// StepObject can represent any kubernetes object +// +// swagger:model controllerStepObject +type ControllerStepObject struct { + + // name + Name string `json:"name,omitempty"` + + // raw + // Format: byte + Raw strfmt.Base64 `json:"raw,omitempty"` + + // type meta + TypeMeta *Metav1TypeMeta `json:"typeMeta,omitempty"` +} + +// Validate validates this controller step object +func (m *ControllerStepObject) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateTypeMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ControllerStepObject) validateTypeMeta(formats strfmt.Registry) error { + if swag.IsZero(m.TypeMeta) { // not required + return nil + } + + if m.TypeMeta != nil { + if err := m.TypeMeta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("typeMeta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("typeMeta") + } + return err + } + } + + return nil +} + +// ContextValidate validate this controller step object based on the context it is used +func (m *ControllerStepObject) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateTypeMeta(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ControllerStepObject) contextValidateTypeMeta(ctx context.Context, formats strfmt.Registry) error { + + if m.TypeMeta != nil { + if err := m.TypeMeta.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("typeMeta") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("typeMeta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ControllerStepObject) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ControllerStepObject) UnmarshalBinary(b []byte) error { + var res ControllerStepObject + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/sentry/models/googlerpc_status.go b/components/common/api/def/clients/sentry/models/googlerpc_status.go new file mode 100644 index 0000000..dc0414a --- /dev/null +++ b/components/common/api/def/clients/sentry/models/googlerpc_status.go @@ -0,0 +1,122 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// GooglerpcStatus googlerpc status +// +// swagger:model googlerpcStatus +type GooglerpcStatus struct { + + // code + Code int32 `json:"code,omitempty"` + + // details + Details []*ProtobufAny `json:"details"` + + // message + Message string `json:"message,omitempty"` +} + +// Validate validates this googlerpc status +func (m *GooglerpcStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDetails(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *GooglerpcStatus) validateDetails(formats strfmt.Registry) error { + if swag.IsZero(m.Details) { // not required + return nil + } + + for i := 0; i < len(m.Details); i++ { + if swag.IsZero(m.Details[i]) { // not required + continue + } + + if m.Details[i] != nil { + if err := m.Details[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("details" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("details" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this googlerpc status based on the context it is used +func (m *GooglerpcStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateDetails(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *GooglerpcStatus) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Details); i++ { + + if m.Details[i] != nil { + if err := m.Details[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("details" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("details" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *GooglerpcStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *GooglerpcStatus) UnmarshalBinary(b []byte) error { + var res GooglerpcStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/sentry/models/metav1_type_meta.go b/components/common/api/def/clients/sentry/models/metav1_type_meta.go new file mode 100644 index 0000000..5fd9db2 --- /dev/null +++ b/components/common/api/def/clients/sentry/models/metav1_type_meta.go @@ -0,0 +1,66 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// Metav1TypeMeta TypeMeta describes an individual object in an API response or request +// with strings representing the type of the object and its API schema version. +// Structures that are versioned or persisted should inline TypeMeta. +// +// +k8s:deepcopy-gen=false +// +// swagger:model metav1TypeMeta +type Metav1TypeMeta struct { + + // APIVersion defines the versioned schema of this representation of an object. + // Servers should convert recognized schemas to the latest internal value, and + // may reject unrecognized values. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + // +optional + APIVersion string `json:"apiVersion,omitempty"` + + // Kind is a string value representing the REST resource this object represents. + // Servers may infer this from the endpoint the client submits requests to. + // Cannot be updated. + // In CamelCase. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + // +optional + Kind string `json:"kind,omitempty"` +} + +// Validate validates this metav1 type meta +func (m *Metav1TypeMeta) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this metav1 type meta based on context it is used +func (m *Metav1TypeMeta) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *Metav1TypeMeta) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Metav1TypeMeta) UnmarshalBinary(b []byte) error { + var res Metav1TypeMeta + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/sentry/models/protobuf_any.go b/components/common/api/def/clients/sentry/models/protobuf_any.go new file mode 100644 index 0000000..cbc9799 --- /dev/null +++ b/components/common/api/def/clients/sentry/models/protobuf_any.go @@ -0,0 +1,50 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// ProtobufAny protobuf any +// +// swagger:model protobufAny +type ProtobufAny struct { + + // at type + AtType string `json:"@type,omitempty"` +} + +// Validate validates this protobuf any +func (m *ProtobufAny) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this protobuf any based on context it is used +func (m *ProtobufAny) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *ProtobufAny) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ProtobufAny) UnmarshalBinary(b []byte) error { + var res ProtobufAny + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/sentry/models/rpc_delete_bootstrap_agent_response.go b/components/common/api/def/clients/sentry/models/rpc_delete_bootstrap_agent_response.go new file mode 100644 index 0000000..7e0c52a --- /dev/null +++ b/components/common/api/def/clients/sentry/models/rpc_delete_bootstrap_agent_response.go @@ -0,0 +1,11 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +// RPCDeleteBootstrapAgentResponse rpc delete bootstrap agent response +// +// swagger:model rpcDeleteBootstrapAgentResponse +type RPCDeleteBootstrapAgentResponse interface{} diff --git a/components/common/api/def/clients/sentry/models/rpc_delete_relay_network_response.go b/components/common/api/def/clients/sentry/models/rpc_delete_relay_network_response.go new file mode 100644 index 0000000..8310ffb --- /dev/null +++ b/components/common/api/def/clients/sentry/models/rpc_delete_relay_network_response.go @@ -0,0 +1,11 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +// RPCDeleteRelayNetworkResponse rpc delete relay network response +// +// swagger:model rpcDeleteRelayNetworkResponse +type RPCDeleteRelayNetworkResponse interface{} diff --git a/components/common/api/def/clients/sentry/models/rpc_get_kubectl_cluster_settings_response.go b/components/common/api/def/clients/sentry/models/rpc_get_kubectl_cluster_settings_response.go new file mode 100644 index 0000000..ac9fcb6 --- /dev/null +++ b/components/common/api/def/clients/sentry/models/rpc_get_kubectl_cluster_settings_response.go @@ -0,0 +1,53 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// RPCGetKubectlClusterSettingsResponse rpc get kubectl cluster settings response +// +// swagger:model rpcGetKubectlClusterSettingsResponse +type RPCGetKubectlClusterSettingsResponse struct { + + // disable c l i kubectl + DisableCLIKubectl bool `json:"disableCLIKubectl,omitempty"` + + // disable web kubectl + DisableWebKubectl bool `json:"disableWebKubectl,omitempty"` +} + +// Validate validates this rpc get kubectl cluster settings response +func (m *RPCGetKubectlClusterSettingsResponse) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this rpc get kubectl cluster settings response based on context it is used +func (m *RPCGetKubectlClusterSettingsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *RPCGetKubectlClusterSettingsResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *RPCGetKubectlClusterSettingsResponse) UnmarshalBinary(b []byte) error { + var res RPCGetKubectlClusterSettingsResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/sentry/models/rpc_get_user_authorization_response.go b/components/common/api/def/clients/sentry/models/rpc_get_user_authorization_response.go new file mode 100644 index 0000000..30ed882 --- /dev/null +++ b/components/common/api/def/clients/sentry/models/rpc_get_user_authorization_response.go @@ -0,0 +1,519 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// RPCGetUserAuthorizationResponse rpc get user authorization response +// +// swagger:model rpcGetUserAuthorizationResponse +type RPCGetUserAuthorizationResponse struct { + + // cluster role bindings + ClusterRoleBindings []*ControllerStepObject `json:"clusterRoleBindings"` + + // cluster roles + ClusterRoles []*ControllerStepObject `json:"clusterRoles"` + + // delete cluster role bindings + DeleteClusterRoleBindings []*ControllerStepObject `json:"deleteClusterRoleBindings"` + + // delete role bindings + DeleteRoleBindings []*ControllerStepObject `json:"deleteRoleBindings"` + + // enforce org admin only secret access + EnforceOrgAdminOnlySecretAccess bool `json:"enforceOrgAdminOnlySecretAccess,omitempty"` + + // is org admin + IsOrgAdmin bool `json:"isOrgAdmin,omitempty"` + + // is read + IsRead bool `json:"isRead,omitempty"` + + // namespaces + Namespaces []*ControllerStepObject `json:"namespaces"` + + // role bindings + RoleBindings []*ControllerStepObject `json:"roleBindings"` + + // role name + RoleName string `json:"roleName,omitempty"` + + // roles + Roles []*ControllerStepObject `json:"roles"` + + // service account + ServiceAccount *ControllerStepObject `json:"serviceAccount,omitempty"` + + // user name + UserName string `json:"userName,omitempty"` +} + +// Validate validates this rpc get user authorization response +func (m *RPCGetUserAuthorizationResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusterRoleBindings(formats); err != nil { + res = append(res, err) + } + + if err := m.validateClusterRoles(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDeleteClusterRoleBindings(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDeleteRoleBindings(formats); err != nil { + res = append(res, err) + } + + if err := m.validateNamespaces(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRoleBindings(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRoles(formats); err != nil { + res = append(res, err) + } + + if err := m.validateServiceAccount(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *RPCGetUserAuthorizationResponse) validateClusterRoleBindings(formats strfmt.Registry) error { + if swag.IsZero(m.ClusterRoleBindings) { // not required + return nil + } + + for i := 0; i < len(m.ClusterRoleBindings); i++ { + if swag.IsZero(m.ClusterRoleBindings[i]) { // not required + continue + } + + if m.ClusterRoleBindings[i] != nil { + if err := m.ClusterRoleBindings[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterRoleBindings" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("clusterRoleBindings" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *RPCGetUserAuthorizationResponse) validateClusterRoles(formats strfmt.Registry) error { + if swag.IsZero(m.ClusterRoles) { // not required + return nil + } + + for i := 0; i < len(m.ClusterRoles); i++ { + if swag.IsZero(m.ClusterRoles[i]) { // not required + continue + } + + if m.ClusterRoles[i] != nil { + if err := m.ClusterRoles[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterRoles" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("clusterRoles" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *RPCGetUserAuthorizationResponse) validateDeleteClusterRoleBindings(formats strfmt.Registry) error { + if swag.IsZero(m.DeleteClusterRoleBindings) { // not required + return nil + } + + for i := 0; i < len(m.DeleteClusterRoleBindings); i++ { + if swag.IsZero(m.DeleteClusterRoleBindings[i]) { // not required + continue + } + + if m.DeleteClusterRoleBindings[i] != nil { + if err := m.DeleteClusterRoleBindings[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("deleteClusterRoleBindings" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("deleteClusterRoleBindings" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *RPCGetUserAuthorizationResponse) validateDeleteRoleBindings(formats strfmt.Registry) error { + if swag.IsZero(m.DeleteRoleBindings) { // not required + return nil + } + + for i := 0; i < len(m.DeleteRoleBindings); i++ { + if swag.IsZero(m.DeleteRoleBindings[i]) { // not required + continue + } + + if m.DeleteRoleBindings[i] != nil { + if err := m.DeleteRoleBindings[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("deleteRoleBindings" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("deleteRoleBindings" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *RPCGetUserAuthorizationResponse) validateNamespaces(formats strfmt.Registry) error { + if swag.IsZero(m.Namespaces) { // not required + return nil + } + + for i := 0; i < len(m.Namespaces); i++ { + if swag.IsZero(m.Namespaces[i]) { // not required + continue + } + + if m.Namespaces[i] != nil { + if err := m.Namespaces[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("namespaces" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("namespaces" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *RPCGetUserAuthorizationResponse) validateRoleBindings(formats strfmt.Registry) error { + if swag.IsZero(m.RoleBindings) { // not required + return nil + } + + for i := 0; i < len(m.RoleBindings); i++ { + if swag.IsZero(m.RoleBindings[i]) { // not required + continue + } + + if m.RoleBindings[i] != nil { + if err := m.RoleBindings[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("roleBindings" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("roleBindings" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *RPCGetUserAuthorizationResponse) validateRoles(formats strfmt.Registry) error { + if swag.IsZero(m.Roles) { // not required + return nil + } + + for i := 0; i < len(m.Roles); i++ { + if swag.IsZero(m.Roles[i]) { // not required + continue + } + + if m.Roles[i] != nil { + if err := m.Roles[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("roles" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("roles" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *RPCGetUserAuthorizationResponse) validateServiceAccount(formats strfmt.Registry) error { + if swag.IsZero(m.ServiceAccount) { // not required + return nil + } + + if m.ServiceAccount != nil { + if err := m.ServiceAccount.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("serviceAccount") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("serviceAccount") + } + return err + } + } + + return nil +} + +// ContextValidate validate this rpc get user authorization response based on the context it is used +func (m *RPCGetUserAuthorizationResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateClusterRoleBindings(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateClusterRoles(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateDeleteClusterRoleBindings(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateDeleteRoleBindings(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateNamespaces(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateRoleBindings(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateRoles(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateServiceAccount(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *RPCGetUserAuthorizationResponse) contextValidateClusterRoleBindings(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.ClusterRoleBindings); i++ { + + if m.ClusterRoleBindings[i] != nil { + if err := m.ClusterRoleBindings[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterRoleBindings" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("clusterRoleBindings" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *RPCGetUserAuthorizationResponse) contextValidateClusterRoles(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.ClusterRoles); i++ { + + if m.ClusterRoles[i] != nil { + if err := m.ClusterRoles[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterRoles" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("clusterRoles" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *RPCGetUserAuthorizationResponse) contextValidateDeleteClusterRoleBindings(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.DeleteClusterRoleBindings); i++ { + + if m.DeleteClusterRoleBindings[i] != nil { + if err := m.DeleteClusterRoleBindings[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("deleteClusterRoleBindings" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("deleteClusterRoleBindings" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *RPCGetUserAuthorizationResponse) contextValidateDeleteRoleBindings(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.DeleteRoleBindings); i++ { + + if m.DeleteRoleBindings[i] != nil { + if err := m.DeleteRoleBindings[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("deleteRoleBindings" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("deleteRoleBindings" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *RPCGetUserAuthorizationResponse) contextValidateNamespaces(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Namespaces); i++ { + + if m.Namespaces[i] != nil { + if err := m.Namespaces[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("namespaces" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("namespaces" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *RPCGetUserAuthorizationResponse) contextValidateRoleBindings(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.RoleBindings); i++ { + + if m.RoleBindings[i] != nil { + if err := m.RoleBindings[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("roleBindings" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("roleBindings" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *RPCGetUserAuthorizationResponse) contextValidateRoles(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Roles); i++ { + + if m.Roles[i] != nil { + if err := m.Roles[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("roles" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("roles" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *RPCGetUserAuthorizationResponse) contextValidateServiceAccount(ctx context.Context, formats strfmt.Registry) error { + + if m.ServiceAccount != nil { + if err := m.ServiceAccount.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("serviceAccount") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("serviceAccount") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *RPCGetUserAuthorizationResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *RPCGetUserAuthorizationResponse) UnmarshalBinary(b []byte) error { + var res RPCGetUserAuthorizationResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/sentry/models/rpc_register_agent_response.go b/components/common/api/def/clients/sentry/models/rpc_register_agent_response.go new file mode 100644 index 0000000..f6d86b1 --- /dev/null +++ b/components/common/api/def/clients/sentry/models/rpc_register_agent_response.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// RPCRegisterAgentResponse rpc register agent response +// +// swagger:model rpcRegisterAgentResponse +type RPCRegisterAgentResponse struct { + + // ca certificate + // Format: byte + CaCertificate strfmt.Base64 `json:"caCertificate,omitempty"` + + // certificate + // Format: byte + Certificate strfmt.Base64 `json:"certificate,omitempty"` +} + +// Validate validates this rpc register agent response +func (m *RPCRegisterAgentResponse) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this rpc register agent response based on context it is used +func (m *RPCRegisterAgentResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *RPCRegisterAgentResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *RPCRegisterAgentResponse) UnmarshalBinary(b []byte) error { + var res RPCRegisterAgentResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/sentry/models/rpc_update_kubectl_cluster_settings_request.go b/components/common/api/def/clients/sentry/models/rpc_update_kubectl_cluster_settings_request.go new file mode 100644 index 0000000..c28a0fd --- /dev/null +++ b/components/common/api/def/clients/sentry/models/rpc_update_kubectl_cluster_settings_request.go @@ -0,0 +1,110 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// RPCUpdateKubectlClusterSettingsRequest rpc update kubectl cluster settings request +// +// swagger:model rpcUpdateKubectlClusterSettingsRequest +type RPCUpdateKubectlClusterSettingsRequest struct { + + // disable c l i kubectl + DisableCLIKubectl bool `json:"disableCLIKubectl,omitempty"` + + // disable web kubectl + DisableWebKubectl bool `json:"disableWebKubectl,omitempty"` + + // opts + Opts *V3QueryOptions `json:"opts,omitempty"` +} + +// Validate validates this rpc update kubectl cluster settings request +func (m *RPCUpdateKubectlClusterSettingsRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateOpts(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *RPCUpdateKubectlClusterSettingsRequest) validateOpts(formats strfmt.Registry) error { + if swag.IsZero(m.Opts) { // not required + return nil + } + + if m.Opts != nil { + if err := m.Opts.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("opts") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("opts") + } + return err + } + } + + return nil +} + +// ContextValidate validate this rpc update kubectl cluster settings request based on the context it is used +func (m *RPCUpdateKubectlClusterSettingsRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateOpts(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *RPCUpdateKubectlClusterSettingsRequest) contextValidateOpts(ctx context.Context, formats strfmt.Registry) error { + + if m.Opts != nil { + if err := m.Opts.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("opts") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("opts") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *RPCUpdateKubectlClusterSettingsRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *RPCUpdateKubectlClusterSettingsRequest) UnmarshalBinary(b []byte) error { + var res RPCUpdateKubectlClusterSettingsRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/sentry/models/rpc_update_kubectl_cluster_settings_response.go b/components/common/api/def/clients/sentry/models/rpc_update_kubectl_cluster_settings_response.go new file mode 100644 index 0000000..75f3529 --- /dev/null +++ b/components/common/api/def/clients/sentry/models/rpc_update_kubectl_cluster_settings_response.go @@ -0,0 +1,11 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +// RPCUpdateKubectlClusterSettingsResponse rpc update kubectl cluster settings response +// +// swagger:model rpcUpdateKubectlClusterSettingsResponse +type RPCUpdateKubectlClusterSettingsResponse interface{} diff --git a/components/common/api/def/clients/sentry/models/sentry_boot_strap_agent_status.go b/components/common/api/def/clients/sentry/models/sentry_boot_strap_agent_status.go new file mode 100644 index 0000000..57fb0a1 --- /dev/null +++ b/components/common/api/def/clients/sentry/models/sentry_boot_strap_agent_status.go @@ -0,0 +1,131 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// SentryBootStrapAgentStatus sentry boot strap agent status +// +// swagger:model sentryBootStrapAgentStatus +type SentryBootStrapAgentStatus struct { + + // fingerprint + Fingerprint string `json:"fingerprint,omitempty"` + + // ip address + IPAddress string `json:"ipAddress,omitempty"` + + // last checked in + // Format: date-time + LastCheckedIn strfmt.DateTime `json:"lastCheckedIn,omitempty"` + + // token state + TokenState *SentryBootstrapAgentState `json:"tokenState,omitempty"` +} + +// Validate validates this sentry boot strap agent status +func (m *SentryBootStrapAgentStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLastCheckedIn(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTokenState(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *SentryBootStrapAgentStatus) validateLastCheckedIn(formats strfmt.Registry) error { + if swag.IsZero(m.LastCheckedIn) { // not required + return nil + } + + if err := validate.FormatOf("lastCheckedIn", "body", "date-time", m.LastCheckedIn.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *SentryBootStrapAgentStatus) validateTokenState(formats strfmt.Registry) error { + if swag.IsZero(m.TokenState) { // not required + return nil + } + + if m.TokenState != nil { + if err := m.TokenState.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tokenState") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tokenState") + } + return err + } + } + + return nil +} + +// ContextValidate validate this sentry boot strap agent status based on the context it is used +func (m *SentryBootStrapAgentStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateTokenState(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *SentryBootStrapAgentStatus) contextValidateTokenState(ctx context.Context, formats strfmt.Registry) error { + + if m.TokenState != nil { + if err := m.TokenState.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tokenState") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("tokenState") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *SentryBootStrapAgentStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *SentryBootStrapAgentStatus) UnmarshalBinary(b []byte) error { + var res SentryBootStrapAgentStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/sentry/models/sentry_bootstrap_agent.go b/components/common/api/def/clients/sentry/models/sentry_bootstrap_agent.go new file mode 100644 index 0000000..5cd2a68 --- /dev/null +++ b/components/common/api/def/clients/sentry/models/sentry_bootstrap_agent.go @@ -0,0 +1,237 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// SentryBootstrapAgent sentry bootstrap agent +// +// swagger:model sentryBootstrapAgent +type SentryBootstrapAgent struct { + + // API Version + // + // API Version of the resource + // Read Only: true + APIVersion string `json:"apiVersion,omitempty"` + + // Kind + // + // Kind of the resource + // Read Only: true + Kind string `json:"kind,omitempty"` + + // Metadata + // + // Metadata of the resource + Metadata *V3Metadata `json:"metadata,omitempty"` + + // spec + Spec *SentryBootstrapAgentSpec `json:"spec,omitempty"` + + // status + Status *SentryBootStrapAgentStatus `json:"status,omitempty"` +} + +// Validate validates this sentry bootstrap agent +func (m *SentryBootstrapAgent) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *SentryBootstrapAgent) validateMetadata(formats strfmt.Registry) error { + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *SentryBootstrapAgent) validateSpec(formats strfmt.Registry) error { + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *SentryBootstrapAgent) validateStatus(formats strfmt.Registry) error { + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("status") + } + return err + } + } + + return nil +} + +// ContextValidate validate this sentry bootstrap agent based on the context it is used +func (m *SentryBootstrapAgent) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateAPIVersion(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateKind(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateMetadata(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateSpec(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateStatus(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *SentryBootstrapAgent) contextValidateAPIVersion(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "apiVersion", "body", string(m.APIVersion)); err != nil { + return err + } + + return nil +} + +func (m *SentryBootstrapAgent) contextValidateKind(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "kind", "body", string(m.Kind)); err != nil { + return err + } + + return nil +} + +func (m *SentryBootstrapAgent) contextValidateMetadata(ctx context.Context, formats strfmt.Registry) error { + + if m.Metadata != nil { + if err := m.Metadata.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *SentryBootstrapAgent) contextValidateSpec(ctx context.Context, formats strfmt.Registry) error { + + if m.Spec != nil { + if err := m.Spec.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *SentryBootstrapAgent) contextValidateStatus(ctx context.Context, formats strfmt.Registry) error { + + if m.Status != nil { + if err := m.Status.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *SentryBootstrapAgent) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *SentryBootstrapAgent) UnmarshalBinary(b []byte) error { + var res SentryBootstrapAgent + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/sentry/models/sentry_bootstrap_agent_list.go b/components/common/api/def/clients/sentry/models/sentry_bootstrap_agent_list.go new file mode 100644 index 0000000..d1f2338 --- /dev/null +++ b/components/common/api/def/clients/sentry/models/sentry_bootstrap_agent_list.go @@ -0,0 +1,204 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// SentryBootstrapAgentList BootstrapAgentList is a list of bootstrap agents +// +// swagger:model sentryBootstrapAgentList +type SentryBootstrapAgentList struct { + + // API Version + // + // API Version of the list resource + // Read Only: true + APIVersion string `json:"apiVersion,omitempty"` + + // items + Items []*SentryBootstrapAgent `json:"items"` + + // Kind + // + // Kind of the list resource + // Read Only: true + Kind string `json:"kind,omitempty"` + + // ListMetadata + // + // Metadata of the list resource + // Read Only: true + Metadata *V3ListMetadata `json:"metadata,omitempty"` +} + +// Validate validates this sentry bootstrap agent list +func (m *SentryBootstrapAgentList) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *SentryBootstrapAgentList) validateItems(formats strfmt.Registry) error { + if swag.IsZero(m.Items) { // not required + return nil + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *SentryBootstrapAgentList) validateMetadata(formats strfmt.Registry) error { + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("metadata") + } + return err + } + } + + return nil +} + +// ContextValidate validate this sentry bootstrap agent list based on the context it is used +func (m *SentryBootstrapAgentList) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateAPIVersion(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateItems(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateKind(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateMetadata(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *SentryBootstrapAgentList) contextValidateAPIVersion(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "apiVersion", "body", string(m.APIVersion)); err != nil { + return err + } + + return nil +} + +func (m *SentryBootstrapAgentList) contextValidateItems(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Items); i++ { + + if m.Items[i] != nil { + if err := m.Items[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *SentryBootstrapAgentList) contextValidateKind(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "kind", "body", string(m.Kind)); err != nil { + return err + } + + return nil +} + +func (m *SentryBootstrapAgentList) contextValidateMetadata(ctx context.Context, formats strfmt.Registry) error { + + if m.Metadata != nil { + if err := m.Metadata.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("metadata") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *SentryBootstrapAgentList) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *SentryBootstrapAgentList) UnmarshalBinary(b []byte) error { + var res SentryBootstrapAgentList + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/sentry/models/sentry_bootstrap_agent_mode.go b/components/common/api/def/clients/sentry/models/sentry_bootstrap_agent_mode.go new file mode 100644 index 0000000..d5b10b5 --- /dev/null +++ b/components/common/api/def/clients/sentry/models/sentry_bootstrap_agent_mode.go @@ -0,0 +1,78 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" +) + +// SentryBootstrapAgentMode sentry bootstrap agent mode +// +// swagger:model sentryBootstrapAgentMode +type SentryBootstrapAgentMode string + +func NewSentryBootstrapAgentMode(value SentryBootstrapAgentMode) *SentryBootstrapAgentMode { + return &value +} + +// Pointer returns a pointer to a freshly-allocated SentryBootstrapAgentMode. +func (m SentryBootstrapAgentMode) Pointer() *SentryBootstrapAgentMode { + return &m +} + +const ( + + // SentryBootstrapAgentModeInCluster captures enum value "InCluster" + SentryBootstrapAgentModeInCluster SentryBootstrapAgentMode = "InCluster" + + // SentryBootstrapAgentModeOutOfCluster captures enum value "OutOfCluster" + SentryBootstrapAgentModeOutOfCluster SentryBootstrapAgentMode = "OutOfCluster" +) + +// for schema +var sentryBootstrapAgentModeEnum []interface{} + +func init() { + var res []SentryBootstrapAgentMode + if err := json.Unmarshal([]byte(`["InCluster","OutOfCluster"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + sentryBootstrapAgentModeEnum = append(sentryBootstrapAgentModeEnum, v) + } +} + +func (m SentryBootstrapAgentMode) validateSentryBootstrapAgentModeEnum(path, location string, value SentryBootstrapAgentMode) error { + if err := validate.EnumCase(path, location, value, sentryBootstrapAgentModeEnum, true); err != nil { + return err + } + return nil +} + +// Validate validates this sentry bootstrap agent mode +func (m SentryBootstrapAgentMode) Validate(formats strfmt.Registry) error { + var res []error + + // value enum + if err := m.validateSentryBootstrapAgentModeEnum("", "body", m); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// ContextValidate validates this sentry bootstrap agent mode based on context it is used +func (m SentryBootstrapAgentMode) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} diff --git a/components/common/api/def/clients/sentry/models/sentry_bootstrap_agent_spec.go b/components/common/api/def/clients/sentry/models/sentry_bootstrap_agent_spec.go new file mode 100644 index 0000000..f621e41 --- /dev/null +++ b/components/common/api/def/clients/sentry/models/sentry_bootstrap_agent_spec.go @@ -0,0 +1,110 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// SentryBootstrapAgentSpec sentry bootstrap agent spec +// +// swagger:model sentryBootstrapAgentSpec +type SentryBootstrapAgentSpec struct { + + // agent mode + AgentMode *SentryBootstrapAgentMode `json:"agentMode,omitempty"` + + // template ref + TemplateRef string `json:"templateRef,omitempty"` + + // token + Token string `json:"token,omitempty"` +} + +// Validate validates this sentry bootstrap agent spec +func (m *SentryBootstrapAgentSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAgentMode(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *SentryBootstrapAgentSpec) validateAgentMode(formats strfmt.Registry) error { + if swag.IsZero(m.AgentMode) { // not required + return nil + } + + if m.AgentMode != nil { + if err := m.AgentMode.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("agentMode") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("agentMode") + } + return err + } + } + + return nil +} + +// ContextValidate validate this sentry bootstrap agent spec based on the context it is used +func (m *SentryBootstrapAgentSpec) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateAgentMode(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *SentryBootstrapAgentSpec) contextValidateAgentMode(ctx context.Context, formats strfmt.Registry) error { + + if m.AgentMode != nil { + if err := m.AgentMode.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("agentMode") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("agentMode") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *SentryBootstrapAgentSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *SentryBootstrapAgentSpec) UnmarshalBinary(b []byte) error { + var res SentryBootstrapAgentSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/sentry/models/sentry_bootstrap_agent_state.go b/components/common/api/def/clients/sentry/models/sentry_bootstrap_agent_state.go new file mode 100644 index 0000000..eaebe6f --- /dev/null +++ b/components/common/api/def/clients/sentry/models/sentry_bootstrap_agent_state.go @@ -0,0 +1,84 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" +) + +// SentryBootstrapAgentState sentry bootstrap agent state +// +// swagger:model sentryBootstrapAgentState +type SentryBootstrapAgentState string + +func NewSentryBootstrapAgentState(value SentryBootstrapAgentState) *SentryBootstrapAgentState { + return &value +} + +// Pointer returns a pointer to a freshly-allocated SentryBootstrapAgentState. +func (m SentryBootstrapAgentState) Pointer() *SentryBootstrapAgentState { + return &m +} + +const ( + + // SentryBootstrapAgentStateNotSet captures enum value "NotSet" + SentryBootstrapAgentStateNotSet SentryBootstrapAgentState = "NotSet" + + // SentryBootstrapAgentStateNotRegistered captures enum value "NotRegistered" + SentryBootstrapAgentStateNotRegistered SentryBootstrapAgentState = "NotRegistered" + + // SentryBootstrapAgentStateNotApproved captures enum value "NotApproved" + SentryBootstrapAgentStateNotApproved SentryBootstrapAgentState = "NotApproved" + + // SentryBootstrapAgentStateApproved captures enum value "Approved" + SentryBootstrapAgentStateApproved SentryBootstrapAgentState = "Approved" +) + +// for schema +var sentryBootstrapAgentStateEnum []interface{} + +func init() { + var res []SentryBootstrapAgentState + if err := json.Unmarshal([]byte(`["NotSet","NotRegistered","NotApproved","Approved"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + sentryBootstrapAgentStateEnum = append(sentryBootstrapAgentStateEnum, v) + } +} + +func (m SentryBootstrapAgentState) validateSentryBootstrapAgentStateEnum(path, location string, value SentryBootstrapAgentState) error { + if err := validate.EnumCase(path, location, value, sentryBootstrapAgentStateEnum, true); err != nil { + return err + } + return nil +} + +// Validate validates this sentry bootstrap agent state +func (m SentryBootstrapAgentState) Validate(formats strfmt.Registry) error { + var res []error + + // value enum + if err := m.validateSentryBootstrapAgentStateEnum("", "body", m); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// ContextValidate validates this sentry bootstrap agent state based on context it is used +func (m SentryBootstrapAgentState) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} diff --git a/components/common/api/def/clients/sentry/models/sentry_bootstrap_agent_template.go b/components/common/api/def/clients/sentry/models/sentry_bootstrap_agent_template.go new file mode 100644 index 0000000..397385b --- /dev/null +++ b/components/common/api/def/clients/sentry/models/sentry_bootstrap_agent_template.go @@ -0,0 +1,194 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// SentryBootstrapAgentTemplate sentry bootstrap agent template +// +// swagger:model sentryBootstrapAgentTemplate +type SentryBootstrapAgentTemplate struct { + + // API Version + // + // API Version of the resource + // Read Only: true + APIVersion string `json:"apiVersion,omitempty"` + + // Kind + // + // Kind of the resource + // Read Only: true + Kind string `json:"kind,omitempty"` + + // Metadata + // + // Metadata of the resource + Metadata *V3Metadata `json:"metadata,omitempty"` + + // spec + Spec *SentryBootstrapAgentTemplateSpec `json:"spec,omitempty"` + + // status + Status SentryBootstrapAgentTemplateStatus `json:"status,omitempty"` +} + +// Validate validates this sentry bootstrap agent template +func (m *SentryBootstrapAgentTemplate) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *SentryBootstrapAgentTemplate) validateMetadata(formats strfmt.Registry) error { + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *SentryBootstrapAgentTemplate) validateSpec(formats strfmt.Registry) error { + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("spec") + } + return err + } + } + + return nil +} + +// ContextValidate validate this sentry bootstrap agent template based on the context it is used +func (m *SentryBootstrapAgentTemplate) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateAPIVersion(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateKind(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateMetadata(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateSpec(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *SentryBootstrapAgentTemplate) contextValidateAPIVersion(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "apiVersion", "body", string(m.APIVersion)); err != nil { + return err + } + + return nil +} + +func (m *SentryBootstrapAgentTemplate) contextValidateKind(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "kind", "body", string(m.Kind)); err != nil { + return err + } + + return nil +} + +func (m *SentryBootstrapAgentTemplate) contextValidateMetadata(ctx context.Context, formats strfmt.Registry) error { + + if m.Metadata != nil { + if err := m.Metadata.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *SentryBootstrapAgentTemplate) contextValidateSpec(ctx context.Context, formats strfmt.Registry) error { + + if m.Spec != nil { + if err := m.Spec.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *SentryBootstrapAgentTemplate) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *SentryBootstrapAgentTemplate) UnmarshalBinary(b []byte) error { + var res SentryBootstrapAgentTemplate + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/sentry/models/sentry_bootstrap_agent_template_list.go b/components/common/api/def/clients/sentry/models/sentry_bootstrap_agent_template_list.go new file mode 100644 index 0000000..2edf229 --- /dev/null +++ b/components/common/api/def/clients/sentry/models/sentry_bootstrap_agent_template_list.go @@ -0,0 +1,204 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// SentryBootstrapAgentTemplateList sentry bootstrap agent template list +// +// swagger:model sentryBootstrapAgentTemplateList +type SentryBootstrapAgentTemplateList struct { + + // API Version + // + // API Version of the list resource + // Read Only: true + APIVersion string `json:"apiVersion,omitempty"` + + // items + Items []*SentryBootstrapAgentTemplate `json:"items"` + + // Kind + // + // Kind of the list resource + // Read Only: true + Kind string `json:"kind,omitempty"` + + // ListMetadata + // + // Metadata of the list resource + // Read Only: true + Metadata *V3ListMetadata `json:"metadata,omitempty"` +} + +// Validate validates this sentry bootstrap agent template list +func (m *SentryBootstrapAgentTemplateList) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *SentryBootstrapAgentTemplateList) validateItems(formats strfmt.Registry) error { + if swag.IsZero(m.Items) { // not required + return nil + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *SentryBootstrapAgentTemplateList) validateMetadata(formats strfmt.Registry) error { + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("metadata") + } + return err + } + } + + return nil +} + +// ContextValidate validate this sentry bootstrap agent template list based on the context it is used +func (m *SentryBootstrapAgentTemplateList) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateAPIVersion(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateItems(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateKind(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateMetadata(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *SentryBootstrapAgentTemplateList) contextValidateAPIVersion(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "apiVersion", "body", string(m.APIVersion)); err != nil { + return err + } + + return nil +} + +func (m *SentryBootstrapAgentTemplateList) contextValidateItems(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Items); i++ { + + if m.Items[i] != nil { + if err := m.Items[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *SentryBootstrapAgentTemplateList) contextValidateKind(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "kind", "body", string(m.Kind)); err != nil { + return err + } + + return nil +} + +func (m *SentryBootstrapAgentTemplateList) contextValidateMetadata(ctx context.Context, formats strfmt.Registry) error { + + if m.Metadata != nil { + if err := m.Metadata.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("metadata") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *SentryBootstrapAgentTemplateList) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *SentryBootstrapAgentTemplateList) UnmarshalBinary(b []byte) error { + var res SentryBootstrapAgentTemplateList + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/sentry/models/sentry_bootstrap_agent_template_spec.go b/components/common/api/def/clients/sentry/models/sentry_bootstrap_agent_template_spec.go new file mode 100644 index 0000000..5244bef --- /dev/null +++ b/components/common/api/def/clients/sentry/models/sentry_bootstrap_agent_template_spec.go @@ -0,0 +1,183 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// SentryBootstrapAgentTemplateSpec sentry bootstrap agent template spec +// +// swagger:model sentryBootstrapAgentTemplateSpec +type SentryBootstrapAgentTemplateSpec struct { + + // auto approve + AutoApprove bool `json:"autoApprove,omitempty"` + + // auto register + AutoRegister bool `json:"autoRegister,omitempty"` + + // hosts + Hosts []*SentryBootstrapTemplateHost `json:"hosts"` + + // ignore multiple register + IgnoreMultipleRegister bool `json:"ignoreMultipleRegister,omitempty"` + + // in cluster template + InClusterTemplate string `json:"inClusterTemplate,omitempty"` + + // infra ref + InfraRef string `json:"infraRef,omitempty"` + + // out of cluster template + OutOfClusterTemplate string `json:"outOfClusterTemplate,omitempty"` + + // template type + TemplateType *SentryBootstrapAgentTemplateType `json:"templateType,omitempty"` + + // token + Token string `json:"token,omitempty"` +} + +// Validate validates this sentry bootstrap agent template spec +func (m *SentryBootstrapAgentTemplateSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateHosts(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTemplateType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *SentryBootstrapAgentTemplateSpec) validateHosts(formats strfmt.Registry) error { + if swag.IsZero(m.Hosts) { // not required + return nil + } + + for i := 0; i < len(m.Hosts); i++ { + if swag.IsZero(m.Hosts[i]) { // not required + continue + } + + if m.Hosts[i] != nil { + if err := m.Hosts[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("hosts" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("hosts" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *SentryBootstrapAgentTemplateSpec) validateTemplateType(formats strfmt.Registry) error { + if swag.IsZero(m.TemplateType) { // not required + return nil + } + + if m.TemplateType != nil { + if err := m.TemplateType.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("templateType") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("templateType") + } + return err + } + } + + return nil +} + +// ContextValidate validate this sentry bootstrap agent template spec based on the context it is used +func (m *SentryBootstrapAgentTemplateSpec) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateHosts(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateTemplateType(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *SentryBootstrapAgentTemplateSpec) contextValidateHosts(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Hosts); i++ { + + if m.Hosts[i] != nil { + if err := m.Hosts[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("hosts" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("hosts" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *SentryBootstrapAgentTemplateSpec) contextValidateTemplateType(ctx context.Context, formats strfmt.Registry) error { + + if m.TemplateType != nil { + if err := m.TemplateType.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("templateType") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("templateType") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *SentryBootstrapAgentTemplateSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *SentryBootstrapAgentTemplateSpec) UnmarshalBinary(b []byte) error { + var res SentryBootstrapAgentTemplateSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/sentry/models/sentry_bootstrap_agent_template_status.go b/components/common/api/def/clients/sentry/models/sentry_bootstrap_agent_template_status.go new file mode 100644 index 0000000..501623b --- /dev/null +++ b/components/common/api/def/clients/sentry/models/sentry_bootstrap_agent_template_status.go @@ -0,0 +1,11 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +// SentryBootstrapAgentTemplateStatus sentry bootstrap agent template status +// +// swagger:model sentryBootstrapAgentTemplateStatus +type SentryBootstrapAgentTemplateStatus interface{} diff --git a/components/common/api/def/clients/sentry/models/sentry_bootstrap_agent_template_type.go b/components/common/api/def/clients/sentry/models/sentry_bootstrap_agent_template_type.go new file mode 100644 index 0000000..e0a9aed --- /dev/null +++ b/components/common/api/def/clients/sentry/models/sentry_bootstrap_agent_template_type.go @@ -0,0 +1,84 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" +) + +// SentryBootstrapAgentTemplateType sentry bootstrap agent template type +// +// swagger:model sentryBootstrapAgentTemplateType +type SentryBootstrapAgentTemplateType string + +func NewSentryBootstrapAgentTemplateType(value SentryBootstrapAgentTemplateType) *SentryBootstrapAgentTemplateType { + return &value +} + +// Pointer returns a pointer to a freshly-allocated SentryBootstrapAgentTemplateType. +func (m SentryBootstrapAgentTemplateType) Pointer() *SentryBootstrapAgentTemplateType { + return &m +} + +const ( + + // SentryBootstrapAgentTemplateTypeTemplateTypeNotSet captures enum value "TemplateTypeNotSet" + SentryBootstrapAgentTemplateTypeTemplateTypeNotSet SentryBootstrapAgentTemplateType = "TemplateTypeNotSet" + + // SentryBootstrapAgentTemplateTypeClient captures enum value "Client" + SentryBootstrapAgentTemplateTypeClient SentryBootstrapAgentTemplateType = "Client" + + // SentryBootstrapAgentTemplateTypeServer captures enum value "Server" + SentryBootstrapAgentTemplateTypeServer SentryBootstrapAgentTemplateType = "Server" + + // SentryBootstrapAgentTemplateTypeMixed captures enum value "Mixed" + SentryBootstrapAgentTemplateTypeMixed SentryBootstrapAgentTemplateType = "Mixed" +) + +// for schema +var sentryBootstrapAgentTemplateTypeEnum []interface{} + +func init() { + var res []SentryBootstrapAgentTemplateType + if err := json.Unmarshal([]byte(`["TemplateTypeNotSet","Client","Server","Mixed"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + sentryBootstrapAgentTemplateTypeEnum = append(sentryBootstrapAgentTemplateTypeEnum, v) + } +} + +func (m SentryBootstrapAgentTemplateType) validateSentryBootstrapAgentTemplateTypeEnum(path, location string, value SentryBootstrapAgentTemplateType) error { + if err := validate.EnumCase(path, location, value, sentryBootstrapAgentTemplateTypeEnum, true); err != nil { + return err + } + return nil +} + +// Validate validates this sentry bootstrap agent template type +func (m SentryBootstrapAgentTemplateType) Validate(formats strfmt.Registry) error { + var res []error + + // value enum + if err := m.validateSentryBootstrapAgentTemplateTypeEnum("", "body", m); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// ContextValidate validates this sentry bootstrap agent template type based on context it is used +func (m SentryBootstrapAgentTemplateType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} diff --git a/components/common/api/def/clients/sentry/models/sentry_bootstrap_infra.go b/components/common/api/def/clients/sentry/models/sentry_bootstrap_infra.go new file mode 100644 index 0000000..e2e8b99 --- /dev/null +++ b/components/common/api/def/clients/sentry/models/sentry_bootstrap_infra.go @@ -0,0 +1,194 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// SentryBootstrapInfra sentry bootstrap infra +// +// swagger:model sentryBootstrapInfra +type SentryBootstrapInfra struct { + + // API Version + // + // API Version of the resource + // Read Only: true + APIVersion string `json:"apiVersion,omitempty"` + + // Kind + // + // Kind of the resource + // Read Only: true + Kind string `json:"kind,omitempty"` + + // Metadata + // + // Metadata of the resource + Metadata *V3Metadata `json:"metadata,omitempty"` + + // spec + Spec *SentryBootstrapInfraSpec `json:"spec,omitempty"` + + // status + Status SentryBootstrapInfraStatus `json:"status,omitempty"` +} + +// Validate validates this sentry bootstrap infra +func (m *SentryBootstrapInfra) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *SentryBootstrapInfra) validateMetadata(formats strfmt.Registry) error { + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *SentryBootstrapInfra) validateSpec(formats strfmt.Registry) error { + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("spec") + } + return err + } + } + + return nil +} + +// ContextValidate validate this sentry bootstrap infra based on the context it is used +func (m *SentryBootstrapInfra) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateAPIVersion(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateKind(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateMetadata(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateSpec(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *SentryBootstrapInfra) contextValidateAPIVersion(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "apiVersion", "body", string(m.APIVersion)); err != nil { + return err + } + + return nil +} + +func (m *SentryBootstrapInfra) contextValidateKind(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "kind", "body", string(m.Kind)); err != nil { + return err + } + + return nil +} + +func (m *SentryBootstrapInfra) contextValidateMetadata(ctx context.Context, formats strfmt.Registry) error { + + if m.Metadata != nil { + if err := m.Metadata.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *SentryBootstrapInfra) contextValidateSpec(ctx context.Context, formats strfmt.Registry) error { + + if m.Spec != nil { + if err := m.Spec.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *SentryBootstrapInfra) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *SentryBootstrapInfra) UnmarshalBinary(b []byte) error { + var res SentryBootstrapInfra + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/sentry/models/sentry_bootstrap_infra_spec.go b/components/common/api/def/clients/sentry/models/sentry_bootstrap_infra_spec.go new file mode 100644 index 0000000..2667153 --- /dev/null +++ b/components/common/api/def/clients/sentry/models/sentry_bootstrap_infra_spec.go @@ -0,0 +1,56 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// SentryBootstrapInfraSpec sentry bootstrap infra spec +// +// swagger:model sentryBootstrapInfraSpec +type SentryBootstrapInfraSpec struct { + + // ca cert + CaCert string `json:"caCert,omitempty"` + + // ca key + CaKey string `json:"caKey,omitempty"` + + // ca key pass + CaKeyPass string `json:"caKeyPass,omitempty"` +} + +// Validate validates this sentry bootstrap infra spec +func (m *SentryBootstrapInfraSpec) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this sentry bootstrap infra spec based on context it is used +func (m *SentryBootstrapInfraSpec) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *SentryBootstrapInfraSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *SentryBootstrapInfraSpec) UnmarshalBinary(b []byte) error { + var res SentryBootstrapInfraSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/sentry/models/sentry_bootstrap_infra_status.go b/components/common/api/def/clients/sentry/models/sentry_bootstrap_infra_status.go new file mode 100644 index 0000000..5fbbdb3 --- /dev/null +++ b/components/common/api/def/clients/sentry/models/sentry_bootstrap_infra_status.go @@ -0,0 +1,11 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +// SentryBootstrapInfraStatus sentry bootstrap infra status +// +// swagger:model sentryBootstrapInfraStatus +type SentryBootstrapInfraStatus interface{} diff --git a/components/common/api/def/clients/sentry/models/sentry_bootstrap_template_host.go b/components/common/api/def/clients/sentry/models/sentry_bootstrap_template_host.go new file mode 100644 index 0000000..23a27bb --- /dev/null +++ b/components/common/api/def/clients/sentry/models/sentry_bootstrap_template_host.go @@ -0,0 +1,107 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// SentryBootstrapTemplateHost sentry bootstrap template host +// +// swagger:model sentryBootstrapTemplateHost +type SentryBootstrapTemplateHost struct { + + // host + Host string `json:"host,omitempty"` + + // type + Type *SentryBootstrapTemplateHostType `json:"type,omitempty"` +} + +// Validate validates this sentry bootstrap template host +func (m *SentryBootstrapTemplateHost) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *SentryBootstrapTemplateHost) validateType(formats strfmt.Registry) error { + if swag.IsZero(m.Type) { // not required + return nil + } + + if m.Type != nil { + if err := m.Type.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("type") + } + return err + } + } + + return nil +} + +// ContextValidate validate this sentry bootstrap template host based on the context it is used +func (m *SentryBootstrapTemplateHost) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateType(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *SentryBootstrapTemplateHost) contextValidateType(ctx context.Context, formats strfmt.Registry) error { + + if m.Type != nil { + if err := m.Type.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("type") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("type") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *SentryBootstrapTemplateHost) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *SentryBootstrapTemplateHost) UnmarshalBinary(b []byte) error { + var res SentryBootstrapTemplateHost + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/sentry/models/sentry_bootstrap_template_host_type.go b/components/common/api/def/clients/sentry/models/sentry_bootstrap_template_host_type.go new file mode 100644 index 0000000..7fa3e6b --- /dev/null +++ b/components/common/api/def/clients/sentry/models/sentry_bootstrap_template_host_type.go @@ -0,0 +1,81 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" +) + +// SentryBootstrapTemplateHostType sentry bootstrap template host type +// +// swagger:model sentryBootstrapTemplateHostType +type SentryBootstrapTemplateHostType string + +func NewSentryBootstrapTemplateHostType(value SentryBootstrapTemplateHostType) *SentryBootstrapTemplateHostType { + return &value +} + +// Pointer returns a pointer to a freshly-allocated SentryBootstrapTemplateHostType. +func (m SentryBootstrapTemplateHostType) Pointer() *SentryBootstrapTemplateHostType { + return &m +} + +const ( + + // SentryBootstrapTemplateHostTypeHostTypeNotSet captures enum value "HostTypeNotSet" + SentryBootstrapTemplateHostTypeHostTypeNotSet SentryBootstrapTemplateHostType = "HostTypeNotSet" + + // SentryBootstrapTemplateHostTypeHostTypeInternal captures enum value "HostTypeInternal" + SentryBootstrapTemplateHostTypeHostTypeInternal SentryBootstrapTemplateHostType = "HostTypeInternal" + + // SentryBootstrapTemplateHostTypeHostTypeExternal captures enum value "HostTypeExternal" + SentryBootstrapTemplateHostTypeHostTypeExternal SentryBootstrapTemplateHostType = "HostTypeExternal" +) + +// for schema +var sentryBootstrapTemplateHostTypeEnum []interface{} + +func init() { + var res []SentryBootstrapTemplateHostType + if err := json.Unmarshal([]byte(`["HostTypeNotSet","HostTypeInternal","HostTypeExternal"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + sentryBootstrapTemplateHostTypeEnum = append(sentryBootstrapTemplateHostTypeEnum, v) + } +} + +func (m SentryBootstrapTemplateHostType) validateSentryBootstrapTemplateHostTypeEnum(path, location string, value SentryBootstrapTemplateHostType) error { + if err := validate.EnumCase(path, location, value, sentryBootstrapTemplateHostTypeEnum, true); err != nil { + return err + } + return nil +} + +// Validate validates this sentry bootstrap template host type +func (m SentryBootstrapTemplateHostType) Validate(formats strfmt.Registry) error { + var res []error + + // value enum + if err := m.validateSentryBootstrapTemplateHostTypeEnum("", "body", m); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// ContextValidate validates this sentry bootstrap template host type based on context it is used +func (m SentryBootstrapTemplateHostType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} diff --git a/components/common/api/def/clients/sentry/models/sentry_relay_network.go b/components/common/api/def/clients/sentry/models/sentry_relay_network.go new file mode 100644 index 0000000..65ab635 --- /dev/null +++ b/components/common/api/def/clients/sentry/models/sentry_relay_network.go @@ -0,0 +1,194 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// SentryRelayNetwork sentry relay network +// +// swagger:model sentryRelayNetwork +type SentryRelayNetwork struct { + + // API Version + // + // API Version of the resource + // Read Only: true + APIVersion string `json:"apiVersion,omitempty"` + + // Kind + // + // Kind of the resource + // Read Only: true + Kind string `json:"kind,omitempty"` + + // Metadata + // + // Metadata of the resource + Metadata *V3Metadata `json:"metadata,omitempty"` + + // spec + Spec *SentryRelayNetworkSpec `json:"spec,omitempty"` + + // status + Status SentryRelayNetworkStatus `json:"status,omitempty"` +} + +// Validate validates this sentry relay network +func (m *SentryRelayNetwork) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *SentryRelayNetwork) validateMetadata(formats strfmt.Registry) error { + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *SentryRelayNetwork) validateSpec(formats strfmt.Registry) error { + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("spec") + } + return err + } + } + + return nil +} + +// ContextValidate validate this sentry relay network based on the context it is used +func (m *SentryRelayNetwork) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateAPIVersion(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateKind(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateMetadata(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateSpec(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *SentryRelayNetwork) contextValidateAPIVersion(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "apiVersion", "body", string(m.APIVersion)); err != nil { + return err + } + + return nil +} + +func (m *SentryRelayNetwork) contextValidateKind(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "kind", "body", string(m.Kind)); err != nil { + return err + } + + return nil +} + +func (m *SentryRelayNetwork) contextValidateMetadata(ctx context.Context, formats strfmt.Registry) error { + + if m.Metadata != nil { + if err := m.Metadata.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *SentryRelayNetwork) contextValidateSpec(ctx context.Context, formats strfmt.Registry) error { + + if m.Spec != nil { + if err := m.Spec.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *SentryRelayNetwork) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *SentryRelayNetwork) UnmarshalBinary(b []byte) error { + var res SentryRelayNetwork + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/sentry/models/sentry_relay_network_list.go b/components/common/api/def/clients/sentry/models/sentry_relay_network_list.go new file mode 100644 index 0000000..3f79d49 --- /dev/null +++ b/components/common/api/def/clients/sentry/models/sentry_relay_network_list.go @@ -0,0 +1,204 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// SentryRelayNetworkList RelayNetworkList is a list of relaynetworks +// +// swagger:model sentryRelayNetworkList +type SentryRelayNetworkList struct { + + // API Version + // + // API Version of the list resource + // Read Only: true + APIVersion string `json:"apiVersion,omitempty"` + + // items + Items []*SentryRelayNetwork `json:"items"` + + // Kind + // + // Kind of the list resource + // Read Only: true + Kind string `json:"kind,omitempty"` + + // ListMetadata + // + // Metadata of the list resource + // Read Only: true + Metadata *V3ListMetadata `json:"metadata,omitempty"` +} + +// Validate validates this sentry relay network list +func (m *SentryRelayNetworkList) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *SentryRelayNetworkList) validateItems(formats strfmt.Registry) error { + if swag.IsZero(m.Items) { // not required + return nil + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *SentryRelayNetworkList) validateMetadata(formats strfmt.Registry) error { + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("metadata") + } + return err + } + } + + return nil +} + +// ContextValidate validate this sentry relay network list based on the context it is used +func (m *SentryRelayNetworkList) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateAPIVersion(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateItems(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateKind(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateMetadata(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *SentryRelayNetworkList) contextValidateAPIVersion(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "apiVersion", "body", string(m.APIVersion)); err != nil { + return err + } + + return nil +} + +func (m *SentryRelayNetworkList) contextValidateItems(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Items); i++ { + + if m.Items[i] != nil { + if err := m.Items[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *SentryRelayNetworkList) contextValidateKind(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "kind", "body", string(m.Kind)); err != nil { + return err + } + + return nil +} + +func (m *SentryRelayNetworkList) contextValidateMetadata(ctx context.Context, formats strfmt.Registry) error { + + if m.Metadata != nil { + if err := m.Metadata.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("metadata") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *SentryRelayNetworkList) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *SentryRelayNetworkList) UnmarshalBinary(b []byte) error { + var res SentryRelayNetworkList + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/sentry/models/sentry_relay_network_spec.go b/components/common/api/def/clients/sentry/models/sentry_relay_network_spec.go new file mode 100644 index 0000000..7c1c921 --- /dev/null +++ b/components/common/api/def/clients/sentry/models/sentry_relay_network_spec.go @@ -0,0 +1,140 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// SentryRelayNetworkSpec sentry relay network spec +// +// swagger:model sentryRelayNetworkSpec +type SentryRelayNetworkSpec struct { + + // clustercacert + Clustercacert string `json:"clustercacert,omitempty"` + + // clustercert + Clustercert string `json:"clustercert,omitempty"` + + // clusterhost + Clusterhost string `json:"clusterhost,omitempty"` + + // clusterkey + Clusterkey string `json:"clusterkey,omitempty"` + + // clusterpassword + Clusterpassword string `json:"clusterpassword,omitempty"` + + // clusterselfsigned + Clusterselfsigned bool `json:"clusterselfsigned,omitempty"` + + // placement + Placement *TypesconfigPlacementSpec `json:"placement,omitempty"` + + // usercacert + Usercacert string `json:"usercacert,omitempty"` + + // usercert + Usercert string `json:"usercert,omitempty"` + + // userhost + Userhost string `json:"userhost,omitempty"` + + // userkey + Userkey string `json:"userkey,omitempty"` + + // userpassword + Userpassword string `json:"userpassword,omitempty"` + + // userselfsigned + Userselfsigned bool `json:"userselfsigned,omitempty"` +} + +// Validate validates this sentry relay network spec +func (m *SentryRelayNetworkSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validatePlacement(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *SentryRelayNetworkSpec) validatePlacement(formats strfmt.Registry) error { + if swag.IsZero(m.Placement) { // not required + return nil + } + + if m.Placement != nil { + if err := m.Placement.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("placement") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("placement") + } + return err + } + } + + return nil +} + +// ContextValidate validate this sentry relay network spec based on the context it is used +func (m *SentryRelayNetworkSpec) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidatePlacement(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *SentryRelayNetworkSpec) contextValidatePlacement(ctx context.Context, formats strfmt.Registry) error { + + if m.Placement != nil { + if err := m.Placement.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("placement") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("placement") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *SentryRelayNetworkSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *SentryRelayNetworkSpec) UnmarshalBinary(b []byte) error { + var res SentryRelayNetworkSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/sentry/models/sentry_relay_network_status.go b/components/common/api/def/clients/sentry/models/sentry_relay_network_status.go new file mode 100644 index 0000000..e0a77b3 --- /dev/null +++ b/components/common/api/def/clients/sentry/models/sentry_relay_network_status.go @@ -0,0 +1,11 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +// SentryRelayNetworkStatus sentry relay network status +// +// swagger:model sentryRelayNetworkStatus +type SentryRelayNetworkStatus interface{} diff --git a/components/common/api/def/clients/sentry/models/typesconfig_placement_label.go b/components/common/api/def/clients/sentry/models/typesconfig_placement_label.go new file mode 100644 index 0000000..4d3e2fe --- /dev/null +++ b/components/common/api/def/clients/sentry/models/typesconfig_placement_label.go @@ -0,0 +1,53 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// TypesconfigPlacementLabel typesconfig placement label +// +// swagger:model typesconfigPlacementLabel +type TypesconfigPlacementLabel struct { + + // key + Key string `json:"key,omitempty"` + + // value + Value string `json:"value,omitempty"` +} + +// Validate validates this typesconfig placement label +func (m *TypesconfigPlacementLabel) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this typesconfig placement label based on context it is used +func (m *TypesconfigPlacementLabel) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *TypesconfigPlacementLabel) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *TypesconfigPlacementLabel) UnmarshalBinary(b []byte) error { + var res TypesconfigPlacementLabel + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/sentry/models/typesconfig_placement_spec.go b/components/common/api/def/clients/sentry/models/typesconfig_placement_spec.go new file mode 100644 index 0000000..e15e51a --- /dev/null +++ b/components/common/api/def/clients/sentry/models/typesconfig_placement_spec.go @@ -0,0 +1,214 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// TypesconfigPlacementSpec PlacementSpec is the specification of placement +// +// swagger:model typesconfigPlacementSpec +type TypesconfigPlacementSpec struct { + + // cluster labels + ClusterLabels []*TypesconfigPlacementLabel `json:"clusterLabels"` + + // cluster selector + ClusterSelector string `json:"clusterSelector,omitempty"` + + // drift action + DriftAction *ConfigDriftReconcillationAction `json:"driftAction,omitempty"` + + // node grouping keys + NodeGroupingKeys []string `json:"nodeGroupingKeys"` + + // placementType is the type of placement + PlacementType *ConfigPlacementType `json:"placementType,omitempty"` +} + +// Validate validates this typesconfig placement spec +func (m *TypesconfigPlacementSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusterLabels(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDriftAction(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePlacementType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *TypesconfigPlacementSpec) validateClusterLabels(formats strfmt.Registry) error { + if swag.IsZero(m.ClusterLabels) { // not required + return nil + } + + for i := 0; i < len(m.ClusterLabels); i++ { + if swag.IsZero(m.ClusterLabels[i]) { // not required + continue + } + + if m.ClusterLabels[i] != nil { + if err := m.ClusterLabels[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterLabels" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("clusterLabels" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *TypesconfigPlacementSpec) validateDriftAction(formats strfmt.Registry) error { + if swag.IsZero(m.DriftAction) { // not required + return nil + } + + if m.DriftAction != nil { + if err := m.DriftAction.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("driftAction") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("driftAction") + } + return err + } + } + + return nil +} + +func (m *TypesconfigPlacementSpec) validatePlacementType(formats strfmt.Registry) error { + if swag.IsZero(m.PlacementType) { // not required + return nil + } + + if m.PlacementType != nil { + if err := m.PlacementType.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("placementType") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("placementType") + } + return err + } + } + + return nil +} + +// ContextValidate validate this typesconfig placement spec based on the context it is used +func (m *TypesconfigPlacementSpec) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateClusterLabels(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateDriftAction(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidatePlacementType(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *TypesconfigPlacementSpec) contextValidateClusterLabels(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.ClusterLabels); i++ { + + if m.ClusterLabels[i] != nil { + if err := m.ClusterLabels[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterLabels" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("clusterLabels" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *TypesconfigPlacementSpec) contextValidateDriftAction(ctx context.Context, formats strfmt.Registry) error { + + if m.DriftAction != nil { + if err := m.DriftAction.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("driftAction") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("driftAction") + } + return err + } + } + + return nil +} + +func (m *TypesconfigPlacementSpec) contextValidatePlacementType(ctx context.Context, formats strfmt.Registry) error { + + if m.PlacementType != nil { + if err := m.PlacementType.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("placementType") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("placementType") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *TypesconfigPlacementSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *TypesconfigPlacementSpec) UnmarshalBinary(b []byte) error { + var res TypesconfigPlacementSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/sentry/models/v3_http_body.go b/components/common/api/def/clients/sentry/models/v3_http_body.go new file mode 100644 index 0000000..91659b0 --- /dev/null +++ b/components/common/api/def/clients/sentry/models/v3_http_body.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V3HTTPBody HttpBody represents arbitrary HTTP Body. It should only be used for +// payload formats that can't be represented as JSON +// +// swagger:model v3HttpBody +type V3HTTPBody struct { + + // The HTTP Content-Type header value specifying the content type of the body. + ContentType string `json:"contentType,omitempty"` + + // The HTTP request/response body as raw binary. + // Format: byte + Data strfmt.Base64 `json:"data,omitempty"` +} + +// Validate validates this v3 Http body +func (m *V3HTTPBody) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v3 Http body based on context it is used +func (m *V3HTTPBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V3HTTPBody) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V3HTTPBody) UnmarshalBinary(b []byte) error { + var res V3HTTPBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/sentry/models/v3_list_metadata.go b/components/common/api/def/clients/sentry/models/v3_list_metadata.go new file mode 100644 index 0000000..34b2308 --- /dev/null +++ b/components/common/api/def/clients/sentry/models/v3_list_metadata.go @@ -0,0 +1,58 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V3ListMetadata $title: ListMetadata +// $description: metadata for a list of resources +// $required: enabled +// +// swagger:model v3ListMetadata +type V3ListMetadata struct { + + // count + Count string `json:"count,omitempty"` + + // limit + Limit string `json:"limit,omitempty"` + + // offset + Offset string `json:"offset,omitempty"` +} + +// Validate validates this v3 list metadata +func (m *V3ListMetadata) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v3 list metadata based on context it is used +func (m *V3ListMetadata) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V3ListMetadata) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V3ListMetadata) UnmarshalBinary(b []byte) error { + var res V3ListMetadata + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/sentry/models/v3_metadata.go b/components/common/api/def/clients/sentry/models/v3_metadata.go new file mode 100644 index 0000000..2ba69ea --- /dev/null +++ b/components/common/api/def/clients/sentry/models/v3_metadata.go @@ -0,0 +1,176 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V3Metadata Metadata +// +// metadata of the resource +// Example: {"name":"some-name","project":"defaultproject"} +// +// swagger:model v3Metadata +type V3Metadata struct { + + // Annotations + // + // annotations of the resource + Annotations map[string]string `json:"annotations,omitempty"` + + // Description + // + // description of the resource + Description string `json:"description,omitempty"` + + // id + // Read Only: true + ID string `json:"id,omitempty"` + + // Lables + // + // labels of the resource + Labels map[string]string `json:"labels,omitempty"` + + // modified at + // Read Only: true + // Format: date-time + ModifiedAt strfmt.DateTime `json:"modifiedAt,omitempty"` + + // Name + // + // name of the resource + // Required: true + Name *string `json:"name"` + + // Organization + // + // Organization to which the resource belongs + Organization string `json:"organization,omitempty"` + + // Partner + // + // Partner to which the resource belongs + Partner string `json:"partner,omitempty"` + + // Project + // + // Project of the resource + // Required: true + Project *string `json:"project"` +} + +// Validate validates this v3 metadata +func (m *V3Metadata) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateModifiedAt(formats); err != nil { + res = append(res, err) + } + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateProject(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V3Metadata) validateModifiedAt(formats strfmt.Registry) error { + if swag.IsZero(m.ModifiedAt) { // not required + return nil + } + + if err := validate.FormatOf("modifiedAt", "body", "date-time", m.ModifiedAt.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *V3Metadata) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + return nil +} + +func (m *V3Metadata) validateProject(formats strfmt.Registry) error { + + if err := validate.Required("project", "body", m.Project); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this v3 metadata based on the context it is used +func (m *V3Metadata) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateID(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateModifiedAt(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V3Metadata) contextValidateID(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "id", "body", string(m.ID)); err != nil { + return err + } + + return nil +} + +func (m *V3Metadata) contextValidateModifiedAt(ctx context.Context, formats strfmt.Registry) error { + + if err := validate.ReadOnly(ctx, "modifiedAt", "body", strfmt.DateTime(m.ModifiedAt)); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V3Metadata) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V3Metadata) UnmarshalBinary(b []byte) error { + var res V3Metadata + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/api/def/clients/sentry/models/v3_query_options.go b/components/common/api/def/clients/sentry/models/v3_query_options.go new file mode 100644 index 0000000..dfc5b10 --- /dev/null +++ b/components/common/api/def/clients/sentry/models/v3_query_options.go @@ -0,0 +1,124 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V3QueryOptions QueryOptions is the options for performing queries on resources +// +// swagger:model v3QueryOptions +type V3QueryOptions struct { + + // ID + ID string `json:"ID,omitempty"` + + // annotations only used for update queries to set annotations (READONLY) + Annotations map[string]string `json:"annotations,omitempty"` + + // blueprint ref + BlueprintRef string `json:"blueprintRef,omitempty"` + + // cluster ID + ClusterID string `json:"clusterID,omitempty"` + + // count + Count string `json:"count,omitempty"` + + // deleted + Deleted bool `json:"deleted,omitempty"` + + // displayName only used for update queries to set displayName (READONLY) + DisplayName string `json:"displayName,omitempty"` + + // extended + Extended bool `json:"extended,omitempty"` + + // globalScope sets partnerID,organizationID,projectID = 0 + GlobalScope bool `json:"globalScope,omitempty"` + + // groups + Groups []string `json:"groups"` + + // ignoreScopeDefault ignores default values for partnerID, organizationID and + // projectID + IgnoreScopeDefault bool `json:"ignoreScopeDefault,omitempty"` + + // is s s o user + IsSSOUser bool `json:"isSSOUser,omitempty"` + + // labels only used for update queries to set labels (READONLY) + Labels map[string]string `json:"labels,omitempty"` + + // limit + Limit string `json:"limit,omitempty"` + + // name is unique ID of a resource along with (partnerID, organizationID, + // projectID) + Name string `json:"name,omitempty"` + + // offset + Offset string `json:"offset,omitempty"` + + // order + Order string `json:"order,omitempty"` + + // order by + OrderBy string `json:"orderBy,omitempty"` + + // organization ID + OrganizationID string `json:"organizationID,omitempty"` + + // partner ID + PartnerID string `json:"partnerID,omitempty"` + + // project ID + ProjectID string `json:"projectID,omitempty"` + + // published version + PublishedVersion string `json:"publishedVersion,omitempty"` + + // selector is used to filter the labels of a resource + Selector string `json:"selector,omitempty"` + + // urlScope is supposed to be passed in the URL as kind/HashID(value) + URLScope string `json:"urlScope,omitempty"` + + // username + Username string `json:"username,omitempty"` +} + +// Validate validates this v3 query options +func (m *V3QueryOptions) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this v3 query options based on context it is used +func (m *V3QueryOptions) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V3QueryOptions) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V3QueryOptions) UnmarshalBinary(b []byte) error { + var res V3QueryOptions + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/components/common/buf.gen.yaml b/components/common/buf.gen.yaml index 511e41e..5d369b7 100644 --- a/components/common/buf.gen.yaml +++ b/components/common/buf.gen.yaml @@ -7,6 +7,7 @@ managed: - buf.build/googleapis/googleapis - buf.build/grpc-ecosystem/grpc-gateway - buf.build/gogo/protobuf + - buf.build/rafay/k8s plugins: - name: go out: . @@ -20,4 +21,4 @@ plugins: out: . opt: paths=source_relative - name: openapiv2 - out: gen/openapi \ No newline at end of file + out: gen/openapi diff --git a/components/common/buf.lock b/components/common/buf.lock index ee65047..d9fc7e8 100644 --- a/components/common/buf.lock +++ b/components/common/buf.lock @@ -12,9 +12,9 @@ deps: owner: googleapis repository: googleapis branch: main - commit: 9088184d3ed04821b7e990024ff05656 - digest: b1---R9Xre3yvH8peoJPQ0dsUYp37KzdlBlx5fjPsYekyI= - create_time: 2021-12-23T15:04:49.66847Z + commit: b53ed4c940ec4644ad883e5f762f72c9 + digest: b1-Hn98QihtUQeHWUou8-tO1IrLAOplFch71V2xunGjBvc= + create_time: 2022-02-09T15:07:44.173247Z - remote: buf.build owner: grpc-ecosystem repository: grpc-gateway @@ -22,3 +22,10 @@ deps: commit: ff83506eb9cc4cf8972f49ce87e6ed3e digest: b1-iLPHgLaoeWWinMiXXqPnxqE4BThtY3eSbswVGh9GOGI= create_time: 2021-10-23T16:26:52.283938Z + - remote: buf.build + owner: rafay + repository: k8s + branch: main + commit: b96f66eb56bc4f279431f4b2187a2fee + digest: b1-U7KVig2Fgpf6eRczjqxrYFa3p6HLqgtEy5QJAOVB8BI= + create_time: 2022-02-09T08:44:35.431677Z diff --git a/components/common/buf.yaml b/components/common/buf.yaml index 68a180d..5d53970 100644 --- a/components/common/buf.yaml +++ b/components/common/buf.yaml @@ -4,6 +4,7 @@ deps: - buf.build/googleapis/googleapis - buf.build/grpc-ecosystem/grpc-gateway - buf.build/gogo/protobuf + - buf.build/rafay/k8s breaking: use: - FILE diff --git a/components/common/build/swagger.sh b/components/common/build/swagger.sh new file mode 100755 index 0000000..2ef0177 --- /dev/null +++ b/components/common/build/swagger.sh @@ -0,0 +1,6 @@ +# use swagger files generated by buf for client gen + +for file in $(find gen/openapi -type f -name "*.swagger.json"); do + echo "building api client ${file}..." + docker run --rm -it -v ${HOME}:${HOME} -w ${PWD}/api/def/clients/$(echo "${file}" | xargs -n1 dirname | xargs -n1 basename) quay.io/goswagger/swagger generate client -f ${PWD}/${file} +done diff --git a/components/common/cmd/generate-enum/main.go b/components/common/cmd/generate-enum/main.go new file mode 100644 index 0000000..81ce85a --- /dev/null +++ b/components/common/cmd/generate-enum/main.go @@ -0,0 +1,84 @@ +package main + +import ( + "fmt" + "os" + "strings" + "text/template" +) + +const tmpl = ` +// Code generated by go generate; DO NOT EDIT. +package {{ .PackageName }} + +import ( + driver "database/sql/driver" + bytes "bytes" +) + +// Scan converts database string to {{ .EnumName }} +func (e *{{ .EnumName }}) Scan(value interface{}) error { + s := value.([]byte) + *e = {{ .EnumName }}({{ .EnumName }}_value[string(s)]) + return nil +} + +// Value converts {{ .EnumName }} into database string +func (e {{ .EnumName }}) Value() (driver.Value, error) { + return {{ .EnumName }}_name[int32(e)], nil +} + +// MarshalJSON converts {{ .EnumName }} to JSON +func (e {{ .EnumName }}) MarshalJSON() ([]byte, error) { + buffer := bytes.NewBufferString("\"") + buffer.WriteString(e.String()) + buffer.WriteString("\"") + return buffer.Bytes(), nil +} + +// UnmarshalJSON converts {{ .EnumName }} from JSON +func (e *{{ .EnumName }}) UnmarshalJSON(b []byte) error { + if b != nil { + *e = {{ .EnumName }}({{ .EnumName }}_value[string(b[1:len(b)-1])]) + } + return nil +} + +// implement proto enum interface +func (e {{ .EnumName }}) IsEnum() { +} + +` + +type TemplateData struct { + PackageName string + EnumName string +} + +func main() { + if len(os.Args) != 3 { + fmt.Println("expected generate-enum ") + fmt.Println("got", os.Args) + os.Exit(1) + } + s := strings.Split(os.Args[2], "/") + packageName := s[len(s)-1] + + fName := fmt.Sprintf("%s/%s.enum.go", os.Args[2], strings.ToLower(os.Args[1])) + + f, err := os.Create(fName) + if err != nil { + fmt.Println("unable to create file ", err) + os.Exit(1) + } + defer f.Close() + pkgTemplate := template.Must(template.New("").Parse(tmpl)) + err = pkgTemplate.Execute(f, TemplateData{ + PackageName: packageName, + EnumName: os.Args[1], + }) + if err != nil { + fmt.Println("render template ", err) + os.Exit(1) + } +} diff --git a/components/common/fix.go b/components/common/fix.go new file mode 100644 index 0000000..ea86315 --- /dev/null +++ b/components/common/fix.go @@ -0,0 +1,16 @@ +package main + +//sentry +//go:generate go run cmd/generate-enum/main.go BootstrapInfraType $PWD/proto/types/sentry +//go:generate go run cmd/generate-enum/main.go BootstrapAgentType $PWD/proto/types/sentry +//go:generate go run cmd/generate-enum/main.go BootstrapAgentMode $PWD/proto/types/sentry +//go:generate go run cmd/generate-enum/main.go BootstrapAgentState $PWD/proto/types/sentry +//go:generate go run cmd/generate-enum/main.go BootstrapAgentTemplateType $PWD/proto/types/sentry +//go:generate go run cmd/generate-enum/main.go BootstrapTemplateHostType $PWD/proto/types/sentry +//go:generate go run cmd/generate-enum/main.go ClusterTokenState $PWD/proto/types/infrapb/v3 +//go:generate go run cmd/generate-enum/main.go ClusterTokenType $PWD/proto/types/infrapb/v3 +//go:generate go run cmd/generate-enum/main.go ClusterNodeState $PWD/proto/types/infrapb/v3 +//go:generate go run cmd/generate-enum/main.go ClusterConditionType $PWD/proto/types/infrapb/v3 +//go:generate go run cmd/generate-enum/main.go ClusterNamespaceConditionType $PWD/proto/types/infrapb/v3 +//go:generate go run cmd/generate-enum/main.go ClusterTaskConditionType $PWD/proto/types/infrapb/v3 +//go:generate go run cmd/generate-enum/main.go ClusterShareMode $PWD/proto/types/infrapb/v3 diff --git a/components/common/gen/openapi/proto/rpc/config/override.swagger.json b/components/common/gen/openapi/proto/rpc/config/override.swagger.json new file mode 100644 index 0000000..19c4384 --- /dev/null +++ b/components/common/gen/openapi/proto/rpc/config/override.swagger.json @@ -0,0 +1,4640 @@ +{ + "swagger": "2.0", + "info": { + "title": "Override Service", + "version": "2.0", + "contact": { + "name": "Rafay Dev" + } + }, + "tags": [ + { + "name": "Override" + } + ], + "schemes": [ + "https" + ], + "consumes": [ + "application/json", + "application/yaml" + ], + "produces": [ + "application/json", + "application/yaml" + ], + "paths": { + "/v2/config/override/apply": { + "post": { + "operationId": "Override_ApplyOverride", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/rpcApplyOverrideResponse" + } + }, + "403": { + "description": "Returned when the user does not have permission to access the resource.", + "schema": {} + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": { + "type": "string", + "format": "string" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/rpcApplyOverrideRequest" + } + } + ], + "tags": [ + "Override" + ] + } + }, + "/v2/config/override/default/cluster": { + "post": { + "operationId": "Override_AddDefaultOverrides", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/rpcAddDefaultOverridesResponse" + } + }, + "403": { + "description": "Returned when the user does not have permission to access the resource.", + "schema": {} + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": { + "type": "string", + "format": "string" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/rpcAddDefaultOverridesRequest" + } + } + ], + "tags": [ + "Override" + ] + } + }, + "/v2/config/project/{metadata.project}/override": { + "post": { + "operationId": "Override_CreateOverride", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/configOverride" + } + }, + "201": { + "description": "Returned when taskset is created successfully.", + "schema": {} + }, + "403": { + "description": "Returned when the user does not have permission to access the resource.", + "schema": {} + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": { + "type": "string", + "format": "string" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "metadata.project", + "description": "Project of the resource", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/configOverride" + } + } + ], + "tags": [ + "Override" + ] + } + }, + "/v2/config/project/{metadata.project}/override/{metadata.name}": { + "get": { + "operationId": "Override_GetOverride", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/configOverride" + } + }, + "403": { + "description": "Returned when the user does not have permission to access the resource.", + "schema": {} + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": { + "type": "string", + "format": "string" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "metadata.project", + "description": "Project of the resource", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "metadata.name", + "description": "name of the resource", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "apiVersion", + "description": "API Version. API Version of the resource", + "in": "query", + "required": false, + "type": "string", + "default": "config.k8smgmt.io/v3" + }, + { + "name": "kind", + "description": "Kind. Kind of the resource", + "in": "query", + "required": false, + "type": "string", + "default": "Cluster" + }, + { + "name": "metadata.displayName", + "description": "Display Name. display name of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.description", + "description": "Description. description of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.organization", + "description": "Organization. Organization to which the resource belongs", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.partner", + "description": "Partner. Partner to which the resource belongs", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.id", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.modifiedAt", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "spec.resourceSelector", + "description": "an override is only applied if selector matches the taskset/namespace\nlabels.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.valuesFile", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.templateOverrides.clusterName", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.templateOverrides.partnerID", + "in": "query", + "required": false, + "type": "string", + "format": "int64" + }, + { + "name": "spec.templateOverrides.organizationID", + "in": "query", + "required": false, + "type": "string", + "format": "int64" + }, + { + "name": "spec.templateOverrides.projectID", + "in": "query", + "required": false, + "type": "string", + "format": "int64" + }, + { + "name": "spec.templateOverrides.v1EdgeID", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.templateOverrides.v1FluentdAggregatorAddr", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.templateOverrides.v1DeploymentEnv", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.templateOverrides.v1InfluxDBFQDN", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.templateOverrides.v1InfluxDBPassword", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.templateOverrides.v1PromethuesRelayFQDN", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.templateOverrides.v1EdgeDisplayName", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.templateOverrides.organizationHash", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.templateOverrides.partnerHash", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.templateOverrides.orgDisplayName", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.templateOverrides.partnerDisplayName", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.templateOverrides.V2EventFrameworkFQDN", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.templateOverrides.proxyURL", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.clusterSelector", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.clusterPlacement.placementType", + "description": "placementType is the type of placement.", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "ClusterSelector", + "ClusterLocations", + "ClusterLabels", + "ClusterSpecific" + ], + "default": "ClusterSelector" + }, + { + "name": "spec.clusterPlacement.clusterSelector", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.clusterPlacement.driftAction", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "DriftReconcillationActionNotSet", + "DriftReconcillationActionNotify", + "DriftReconcillationActionDeny" + ], + "default": "DriftReconcillationActionNotSet" + }, + { + "name": "spec.clusterPlacement.nodeGroupingKeys", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "spec.repositoryRef", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.repoArtifactMeta.git.revision", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.repoArtifactMeta.helm.chartName", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.repoArtifactMeta.helm.tag", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.repoArtifactMeta.timeout", + "in": "query", + "required": false, + "type": "string", + "format": "int64" + }, + { + "name": "status.conditionType", + "description": "Condition Type. type of the status condition", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "status.conditionStatus", + "description": "Condition Status. status of the condition", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "StatusNotSet", + "StatusSubmitted", + "StatusOK", + "StatusFailed" + ], + "default": "StatusNotSet" + }, + { + "name": "status.lastUpdated", + "description": "Last Updated. when the condition status is last updated", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "status.reason", + "description": "Reason. reason of the last condition status", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "Override" + ] + }, + "delete": { + "operationId": "Override_DeleteOverride", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/rpcDeleteOverrideResponse" + } + }, + "204": { + "description": "Returned when namespace is deleted successfully.", + "schema": {} + }, + "403": { + "description": "Returned when the user does not have permission to access the resource.", + "schema": {} + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": { + "type": "string", + "format": "string" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "metadata.project", + "description": "Project of the resource", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "metadata.name", + "description": "name of the resource", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "apiVersion", + "description": "API Version. API Version of the resource", + "in": "query", + "required": false, + "type": "string", + "default": "config.k8smgmt.io/v3" + }, + { + "name": "kind", + "description": "Kind. Kind of the resource", + "in": "query", + "required": false, + "type": "string", + "default": "Cluster" + }, + { + "name": "metadata.displayName", + "description": "Display Name. display name of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.description", + "description": "Description. description of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.organization", + "description": "Organization. Organization to which the resource belongs", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.partner", + "description": "Partner. Partner to which the resource belongs", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.id", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.modifiedAt", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "spec.resourceSelector", + "description": "an override is only applied if selector matches the taskset/namespace\nlabels.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.valuesFile", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.templateOverrides.clusterName", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.templateOverrides.partnerID", + "in": "query", + "required": false, + "type": "string", + "format": "int64" + }, + { + "name": "spec.templateOverrides.organizationID", + "in": "query", + "required": false, + "type": "string", + "format": "int64" + }, + { + "name": "spec.templateOverrides.projectID", + "in": "query", + "required": false, + "type": "string", + "format": "int64" + }, + { + "name": "spec.templateOverrides.v1EdgeID", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.templateOverrides.v1FluentdAggregatorAddr", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.templateOverrides.v1DeploymentEnv", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.templateOverrides.v1InfluxDBFQDN", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.templateOverrides.v1InfluxDBPassword", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.templateOverrides.v1PromethuesRelayFQDN", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.templateOverrides.v1EdgeDisplayName", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.templateOverrides.organizationHash", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.templateOverrides.partnerHash", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.templateOverrides.orgDisplayName", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.templateOverrides.partnerDisplayName", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.templateOverrides.V2EventFrameworkFQDN", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.templateOverrides.proxyURL", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.clusterSelector", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.clusterPlacement.placementType", + "description": "placementType is the type of placement.", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "ClusterSelector", + "ClusterLocations", + "ClusterLabels", + "ClusterSpecific" + ], + "default": "ClusterSelector" + }, + { + "name": "spec.clusterPlacement.clusterSelector", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.clusterPlacement.driftAction", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "DriftReconcillationActionNotSet", + "DriftReconcillationActionNotify", + "DriftReconcillationActionDeny" + ], + "default": "DriftReconcillationActionNotSet" + }, + { + "name": "spec.clusterPlacement.nodeGroupingKeys", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "spec.repositoryRef", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.repoArtifactMeta.git.revision", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.repoArtifactMeta.helm.chartName", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.repoArtifactMeta.helm.tag", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.repoArtifactMeta.timeout", + "in": "query", + "required": false, + "type": "string", + "format": "int64" + }, + { + "name": "status.conditionType", + "description": "Condition Type. type of the status condition", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "status.conditionStatus", + "description": "Condition Status. status of the condition", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "StatusNotSet", + "StatusSubmitted", + "StatusOK", + "StatusFailed" + ], + "default": "StatusNotSet" + }, + { + "name": "status.lastUpdated", + "description": "Last Updated. when the condition status is last updated", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "status.reason", + "description": "Reason. reason of the last condition status", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "Override" + ] + }, + "put": { + "operationId": "Override_UpdateOverride", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/configOverride" + } + }, + "403": { + "description": "Returned when the user does not have permission to access the resource.", + "schema": {} + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": { + "type": "string", + "format": "string" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "metadata.project", + "description": "Project of the resource", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "metadata.name", + "description": "name of the resource", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/configOverride" + } + } + ], + "tags": [ + "Override" + ] + } + }, + "/v2/config/{urlScope}/override": { + "get": { + "operationId": "Override_GetOverrides", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/configOverrideList" + } + }, + "403": { + "description": "Returned when the user does not have permission to access the resource.", + "schema": {} + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": { + "type": "string", + "format": "string" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "urlScope", + "description": "urlScope is supposed to be passed in the URL as kind/HashID(value)", + "in": "path", + "required": true, + "type": "string", + "pattern": "project/[^/]+" + }, + { + "name": "name", + "description": "name is unique ID of a resource along with (partnerID, organizationID,\nprojectID).", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "selector", + "description": "selector is used to filter the labels of a resource.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "partner", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "organization", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "project", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "displayName", + "description": "displayName only used for update queries to set displayName (READONLY).", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "count", + "in": "query", + "required": false, + "type": "string", + "format": "int64" + }, + { + "name": "offset", + "in": "query", + "required": false, + "type": "string", + "format": "int64" + }, + { + "name": "limit", + "in": "query", + "required": false, + "type": "string", + "format": "int64" + }, + { + "name": "ignoreScopeDefault", + "description": "ignoreScopeDefault ignores default values for partnerID, organizationID and\nprojectID.", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "globalScope", + "description": "globalScope sets partnerID,organizationID,projectID = 0.", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "orderBy", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "order", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "deleted", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "extended", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "isSSOUser", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "username", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "groups", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "blueprintRef", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "publishedVersion", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "clusterID", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "ID", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "account", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "Override" + ] + } + } + }, + "definitions": { + "commonv3Status": { + "type": "object", + "properties": { + "conditionType": { + "type": "string", + "description": "type of the status condition", + "title": "Condition Type", + "readOnly": true + }, + "conditionStatus": { + "$ref": "#/definitions/v3ConditionStatus", + "enum": [ + "StatusNotSet", + "StatusSubmitted", + "StatusOK", + "StatusFailed" + ], + "description": "status of the condition", + "title": "Condition Status", + "readOnly": true + }, + "lastUpdated": { + "type": "string", + "format": "date-time", + "description": "when the condition status is last updated", + "title": "Last Updated", + "readOnly": true + }, + "reason": { + "type": "string", + "description": "reason of the last condition status", + "title": "Reason", + "readOnly": true + } + }, + "description": "status of a resource", + "title": "Status", + "readOnly": true + }, + "configDriftReconcillationAction": { + "type": "string", + "enum": [ + "DriftReconcillationActionNotSet", + "DriftReconcillationActionNotify", + "DriftReconcillationActionDeny" + ], + "default": "DriftReconcillationActionNotSet" + }, + "configFileType": { + "type": "string", + "enum": [ + "FileTypeNotSet", + "K8sYAMLFile", + "HelmChartFile", + "HelmValuesFile", + "JSONFile" + ], + "default": "FileTypeNotSet" + }, + "configGitOptions": { + "type": "object", + "properties": { + "revision": { + "type": "string" + }, + "repoArtifactFiles": { + "type": "array", + "items": { + "$ref": "#/definitions/configRepoFile" + } + } + } + }, + "configHelmOptions": { + "type": "object", + "properties": { + "chartName": { + "type": "string" + }, + "tag": { + "type": "string" + } + } + }, + "configNamespaceTemplate": { + "type": "object", + "properties": { + "objectMeta": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/typescontrollerNamespaceSpec" + }, + "resourceQuota": { + "$ref": "#/definitions/typesconfigResourceQuota" + }, + "limitRange": { + "$ref": "#/definitions/typesconfigLimitRange" + }, + "placement": { + "$ref": "#/definitions/typesconfigPlacementSpec" + }, + "type": { + "type": "string" + }, + "namespaceFromFile": { + "type": "string" + }, + "repoRef": { + "type": "string" + }, + "repoArtifactMeta": { + "$ref": "#/definitions/configRepoArtifactMeta" + }, + "namespaceFromRepo": { + "type": "string" + } + }, + "title": "NamespaceTemplate is the template for creating namespace" + }, + "configOverride": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "default": "config.k8smgmt.io/v3", + "description": "API Version of the resource", + "title": "API Version", + "readOnly": true + }, + "kind": { + "type": "string", + "default": "Cluster", + "description": "Kind of the resource", + "title": "Kind", + "readOnly": true + }, + "metadata": { + "$ref": "#/definitions/v3Metadata", + "description": "Metadata of the resource", + "title": "Metadata" + }, + "spec": { + "$ref": "#/definitions/configOverrideSpec" + }, + "status": { + "$ref": "#/definitions/commonv3Status", + "description": "Status of the resource", + "title": "Status", + "readOnly": true + } + }, + "description": "Override", + "title": "Override", + "required": [ + "apiVersion", + "kind", + "metadata", + "spec" + ] + }, + "configOverrideList": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "default": "config.k8smgmt.io/v3", + "description": "API Version of the list resource", + "title": "API Version", + "readOnly": true + }, + "kind": { + "type": "string", + "default": "ClusterList", + "description": "Kind of the list resource", + "title": "Kind", + "readOnly": true + }, + "metadata": { + "$ref": "#/definitions/v3ListMetadata", + "description": "Metadata of the list resource", + "title": "ListMetadata", + "readOnly": true + }, + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/configOverride" + } + } + }, + "title": "OverrideList is a list of overrides" + }, + "configOverrideSpec": { + "type": "object", + "properties": { + "resourceSelector": { + "type": "string", + "title": "an override is only applied if selector matches the taskset/namespace\nlabels" + }, + "overrides": { + "type": "array", + "items": { + "$ref": "#/definitions/controllerStepObject" + }, + "title": "overrides is list of objects to be overriden" + }, + "valuesFile": { + "type": "string" + }, + "templateOverrides": { + "$ref": "#/definitions/configTemplateOverrides" + }, + "clusterSelector": { + "type": "string" + }, + "clusterPlacement": { + "$ref": "#/definitions/typesconfigPlacementSpec" + }, + "repositoryRef": { + "type": "string" + }, + "repoArtifactMeta": { + "$ref": "#/definitions/configRepoArtifactMeta" + } + }, + "title": "OverrideSpec is the specification of override" + }, + "configPlacementType": { + "type": "string", + "enum": [ + "ClusterSelector", + "ClusterLocations", + "ClusterLabels", + "ClusterSpecific" + ], + "default": "ClusterSelector" + }, + "configRepoArtifactMeta": { + "type": "object", + "properties": { + "git": { + "$ref": "#/definitions/configGitOptions" + }, + "helm": { + "$ref": "#/definitions/configHelmOptions" + }, + "timeout": { + "type": "string", + "format": "int64" + } + } + }, + "configRepoFile": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "relPath": { + "type": "string" + }, + "fileType": { + "$ref": "#/definitions/configFileType" + } + } + }, + "configTemplateOverrides": { + "type": "object", + "properties": { + "clusterName": { + "type": "string" + }, + "partnerID": { + "type": "string", + "format": "int64" + }, + "organizationID": { + "type": "string", + "format": "int64" + }, + "projectID": { + "type": "string", + "format": "int64" + }, + "v1EdgeID": { + "type": "string" + }, + "v1FluentdAggregatorAddr": { + "type": "string" + }, + "v1DeploymentEnv": { + "type": "string" + }, + "v1InfluxDBFQDN": { + "type": "string" + }, + "v1InfluxDBPassword": { + "type": "string" + }, + "v1PromethuesRelayFQDN": { + "type": "string" + }, + "v1EdgeDisplayName": { + "type": "string" + }, + "organizationHash": { + "type": "string" + }, + "partnerHash": { + "type": "string" + }, + "orgDisplayName": { + "type": "string" + }, + "partnerDisplayName": { + "type": "string" + }, + "V2EventFrameworkFQDN": { + "type": "string" + }, + "proxyURL": { + "type": "string" + } + } + }, + "controllerStepObject": { + "type": "object", + "properties": { + "typeMeta": { + "$ref": "#/definitions/metav1TypeMeta" + }, + "objectMeta": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "name": { + "type": "string" + }, + "raw": { + "type": "string", + "format": "byte" + } + }, + "title": "+kubebuilder:object:generate=true\nStepObject can represent any kubernetes object" + }, + "controllerStepTemplate": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "onFailed": { + "type": "string" + }, + "object": { + "$ref": "#/definitions/controllerStepObject" + }, + "jobTemplate": { + "$ref": "#/definitions/v1beta1JobTemplateSpec" + } + }, + "title": "+kubebuilder:object:generate=true\nStepTemplate is the description of a step" + }, + "corev1ResourceRequirements": { + "type": "object", + "properties": { + "limits": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/resourceQuantity" + }, + "title": "Limits describes the maximum amount of compute resources allowed.\nMore info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/\n+optional" + }, + "requests": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/resourceQuantity" + }, + "title": "Requests describes the minimum amount of compute resources required.\nIf Requests is omitted for a container, it defaults to Limits if that is explicitly specified,\notherwise to an implementation-defined value.\nMore info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/\n+optional" + } + }, + "description": "ResourceRequirements describes the compute resource requirements." + }, + "corev1VolumeMount": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "This must match the Name of a Volume." + }, + "readOnly": { + "type": "boolean", + "title": "Mounted read-only if true, read-write otherwise (false or unspecified).\nDefaults to false.\n+optional" + }, + "mountPath": { + "type": "string", + "description": "Path within the container at which the volume should be mounted. Must\nnot contain ':'." + }, + "subPath": { + "type": "string", + "title": "Path within the volume from which the container's volume should be mounted.\nDefaults to \"\" (volume's root).\n+optional" + }, + "mountPropagation": { + "type": "string", + "title": "mountPropagation determines how mounts are propagated from the host\nto container and the other way around.\nWhen not set, MountPropagationNone is used.\nThis field is beta in 1.10.\n+optional" + }, + "subPathExpr": { + "type": "string", + "title": "Expanded path within the volume from which the container's volume should be mounted.\nBehaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment.\nDefaults to \"\" (volume's root).\nSubPathExpr and SubPath are mutually exclusive.\n+optional" + } + }, + "description": "VolumeMount describes a mounting of a Volume within a container." + }, + "googlerpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "intstrIntOrString": { + "type": "object", + "properties": { + "type": { + "type": "string", + "format": "int64" + }, + "intVal": { + "type": "integer", + "format": "int32" + }, + "strVal": { + "type": "string" + } + }, + "description": "+protobuf=true\n+protobuf.options.(gogoproto.goproto_stringer)=false\n+k8s:openapi-gen=true", + "title": "IntOrString is a type that can hold an int32 or a string. When used in\nJSON or YAML marshalling and unmarshalling, it produces or consumes the\ninner type. This allows you to have, for example, a JSON field that can\naccept a name or number.\nTODO: Rename to Int32OrString" + }, + "metav1TypeMeta": { + "type": "object", + "properties": { + "kind": { + "type": "string", + "title": "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\n+optional" + }, + "apiVersion": { + "type": "string", + "title": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\n+optional" + } + }, + "description": "TypeMeta describes an individual object in an API response or request\nwith strings representing the type of the object and its API schema version.\nStructures that are versioned or persisted should inline TypeMeta.\n\n+k8s:deepcopy-gen=false" + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "resourceQuantity": { + "type": "object", + "properties": { + "string": { + "type": "string" + } + }, + "description": "Quantity is a fixed-point representation of a number.\nIt provides convenient marshaling/unmarshaling in JSON and YAML,\nin addition to String() and AsInt64() accessors.\n\nThe serialization format is:\n\n\u003cquantity\u003e ::= \u003csignedNumber\u003e\u003csuffix\u003e\n (Note that \u003csuffix\u003e may be empty, from the \"\" case in \u003cdecimalSI\u003e.)\n\u003cdigit\u003e ::= 0 | 1 | ... | 9\n\u003cdigits\u003e ::= \u003cdigit\u003e | \u003cdigit\u003e\u003cdigits\u003e\n\u003cnumber\u003e ::= \u003cdigits\u003e | \u003cdigits\u003e.\u003cdigits\u003e | \u003cdigits\u003e. | .\u003cdigits\u003e\n\u003csign\u003e ::= \"+\" | \"-\"\n\u003csignedNumber\u003e ::= \u003cnumber\u003e | \u003csign\u003e\u003cnumber\u003e\n\u003csuffix\u003e ::= \u003cbinarySI\u003e | \u003cdecimalExponent\u003e | \u003cdecimalSI\u003e\n\u003cbinarySI\u003e ::= Ki | Mi | Gi | Ti | Pi | Ei\n (International System of units; See: http://physics.nist.gov/cuu/Units/binary.html)\n\u003cdecimalSI\u003e ::= m | \"\" | k | M | G | T | P | E\n (Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.)\n\u003cdecimalExponent\u003e ::= \"e\" \u003csignedNumber\u003e | \"E\" \u003csignedNumber\u003e\n\nNo matter which of the three exponent forms is used, no quantity may represent\na number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal\nplaces. Numbers larger or more precise will be capped or rounded up.\n(E.g.: 0.1m will rounded up to 1m.)\nThis may be extended in the future if we require larger or smaller quantities.\n\nWhen a Quantity is parsed from a string, it will remember the type of suffix\nit had, and will use the same type again when it is serialized.\n\nBefore serializing, Quantity will be put in \"canonical form\".\nThis means that Exponent/suffix will be adjusted up or down (with a\ncorresponding increase or decrease in Mantissa) such that:\n a. No precision is lost\n b. No fractional digits will be emitted\n c. The exponent (or suffix) is as large as possible.\nThe sign will be omitted unless the number is negative.\n\nExamples:\n 1.5 will be serialized as \"1500m\"\n 1.5Gi will be serialized as \"1536Mi\"\n\nNote that the quantity will NEVER be internally represented by a\nfloating point number. That is the whole point of this exercise.\n\nNon-canonical values will still parse as long as they are well formed,\nbut will be re-emitted in their canonical form. (So always use canonical\nform, or don't diff.)\n\nThis format is intended to make it difficult to use these numbers without\nwriting some sort of special handling code in the hopes that that will\ncause implementors to also use a fixed point implementation.\n\n+protobuf=true\n+protobuf.embed=string\n+protobuf.options.marshal=false\n+protobuf.options.(gogoproto.goproto_stringer)=false\n+k8s:deepcopy-gen=true\n+k8s:openapi-gen=true" + }, + "rpcAddDefaultOverridesRequest": { + "type": "object", + "properties": { + "clusterName": { + "type": "string" + }, + "partnerID": { + "type": "string", + "format": "int64" + }, + "organizationID": { + "type": "string", + "format": "int64" + }, + "projectID": { + "type": "string", + "format": "int64" + }, + "pullSecret": { + "type": "string" + }, + "controlAddr": { + "type": "string" + }, + "apiAddr": { + "type": "string" + }, + "token": { + "type": "string" + }, + "v1EdgeMetadata": { + "type": "string" + }, + "v1CACert": { + "type": "string" + }, + "v1WorkloadClientCert": { + "type": "string" + }, + "v1WorkloadClientKey": { + "type": "string" + }, + "v1PostgresPassword": { + "type": "string" + }, + "v1CryptoEdgeCert": { + "type": "string" + }, + "v1CryptoEdgeKey": { + "type": "string" + }, + "v1CrypotKMIKey": { + "type": "string" + }, + "v1EdgeID": { + "type": "string" + }, + "v1DebugCert": { + "type": "string" + }, + "v1DebugKey": { + "type": "string" + }, + "v1ConfigEdgeCert": { + "type": "string" + }, + "v1ConfigEdgeKey": { + "type": "string" + }, + "v1EdgeClientCert": { + "type": "string" + }, + "v1EdgeClientKey": { + "type": "string" + }, + "v1FluentdAggregatorAddr": { + "type": "string" + }, + "v1AlertManagerYaml": { + "type": "string" + }, + "v1DeploymentEnv": { + "type": "string" + }, + "v1InfluxDBFQDN": { + "type": "string" + }, + "v1InfluxDBPassword": { + "type": "string" + }, + "v1PromethuesRelayFQDN": { + "type": "string" + }, + "v1EdgeDisplayName": { + "type": "string" + }, + "organizationHash": { + "type": "string" + }, + "partnerHash": { + "type": "string" + }, + "orgDisplayName": { + "type": "string" + }, + "partnerDisplayName": { + "type": "string" + }, + "v2EventFrmwkCert": { + "type": "string" + }, + "v2EventFrmwkKey": { + "type": "string" + }, + "V2EventFrameworkFQDN": { + "type": "string" + }, + "proxyConfig": { + "$ref": "#/definitions/rpcProxyConfig" + }, + "connectorPodSpecOverride": { + "type": "string" + }, + "connectorContainerSpecOverride": { + "type": "string" + }, + "ingressControllerOverride": { + "type": "string" + }, + "clusterType": { + "type": "string" + }, + "cniProvider": { + "type": "string" + } + } + }, + "rpcAddDefaultOverridesResponse": { + "type": "object" + }, + "rpcApplyOverrideRequest": { + "type": "object", + "properties": { + "selector": { + "type": "string" + }, + "type": { + "type": "string" + }, + "partnerID": { + "type": "string", + "format": "int64" + }, + "organizationID": { + "type": "string", + "format": "int64" + }, + "projectID": { + "type": "string", + "format": "int64" + }, + "namespace": { + "$ref": "#/definitions/configNamespaceTemplate" + }, + "setNamespace": { + "type": "boolean" + }, + "atleastOne": { + "type": "boolean" + } + } + }, + "rpcApplyOverrideResponse": { + "type": "object", + "properties": { + "namespace": { + "$ref": "#/definitions/configNamespaceTemplate" + } + } + }, + "rpcDeleteOverrideResponse": { + "type": "object" + }, + "rpcProxyConfig": { + "type": "object", + "properties": { + "httpProxy": { + "type": "string" + }, + "httpsProxy": { + "type": "string" + }, + "noProxy": { + "type": "string" + }, + "proxyAuth": { + "type": "string" + }, + "allowInsecureBootstrap": { + "type": "boolean" + }, + "enabled": { + "type": "boolean" + }, + "bootstrapCA": { + "type": "string" + } + } + }, + "typesconfigLimitRange": { + "type": "object", + "properties": { + "podLimits": { + "$ref": "#/definitions/typesconfigLimitRangeItem" + }, + "containerLimits": { + "$ref": "#/definitions/typesconfigLimitRangeItem" + } + } + }, + "typesconfigLimitRangeItem": { + "type": "object", + "properties": { + "maxCpu": { + "type": "number", + "format": "float" + }, + "maxMemory": { + "type": "number", + "format": "float" + }, + "minCpu": { + "type": "number", + "format": "float" + }, + "minMemory": { + "type": "number", + "format": "float" + }, + "defaultCpu": { + "type": "number", + "format": "float" + }, + "defaultMemory": { + "type": "number", + "format": "float" + }, + "defaultRequestCpu": { + "type": "number", + "format": "float" + }, + "defaultRequestMemory": { + "type": "number", + "format": "float" + }, + "maxLimitRequestRatioCpu": { + "type": "number", + "format": "float" + }, + "maxLimitRequestRatioMemory": { + "type": "number", + "format": "float" + } + } + }, + "typesconfigPlacementLabel": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "value": { + "type": "string" + } + } + }, + "typesconfigPlacementSpec": { + "type": "object", + "properties": { + "placementType": { + "$ref": "#/definitions/configPlacementType", + "title": "placementType is the type of placement" + }, + "clusterSelector": { + "type": "string" + }, + "driftAction": { + "$ref": "#/definitions/configDriftReconcillationAction" + }, + "clusterLabels": { + "type": "array", + "items": { + "$ref": "#/definitions/typesconfigPlacementLabel" + } + }, + "nodeGroupingKeys": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "title": "PlacementSpec is the specification of placement" + }, + "typesconfigResourceQuota": { + "type": "object", + "properties": { + "cpuRequests": { + "type": "number", + "format": "float" + }, + "memoryRequests": { + "type": "number", + "format": "float" + }, + "cpuLimits": { + "type": "number", + "format": "float" + }, + "memoryLimits": { + "type": "number", + "format": "float" + } + } + }, + "typescontrollerNamespaceSpec": { + "type": "object", + "properties": { + "init": { + "type": "array", + "items": { + "$ref": "#/definitions/controllerStepTemplate" + } + }, + "namespaceMeta": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "postCreate": { + "type": "array", + "items": { + "$ref": "#/definitions/controllerStepTemplate" + } + }, + "preDelete": { + "type": "array", + "items": { + "$ref": "#/definitions/controllerStepTemplate" + } + } + }, + "title": "+kubebuilder:object:generate=true\nNamespaceSpec is the spec of the namespace" + }, + "v1AWSElasticBlockStoreVolumeSource": { + "type": "object", + "properties": { + "volumeID": { + "type": "string", + "title": "Unique ID of the persistent disk resource in AWS (Amazon EBS volume).\nMore info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore" + }, + "fsType": { + "type": "string", + "title": "Filesystem type of the volume that you want to mount.\nTip: Ensure that the filesystem type is supported by the host operating system.\nExamples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.\nMore info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore\nTODO: how do we prevent errors in the filesystem from compromising the machine\n+optional" + }, + "partition": { + "type": "integer", + "format": "int32", + "title": "The partition in the volume that you want to mount.\nIf omitted, the default is to mount by volume name.\nExamples: For volume /dev/sda1, you specify the partition as \"1\".\nSimilarly, the volume partition for /dev/sda is \"0\" (or you can leave the property empty).\n+optional" + }, + "readOnly": { + "type": "boolean", + "title": "Specify \"true\" to force and set the ReadOnly property in VolumeMounts to \"true\".\nIf omitted, the default is \"false\".\nMore info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore\n+optional" + } + }, + "description": "Represents a Persistent Disk resource in AWS.\n\nAn AWS EBS disk must exist before mounting to a container. The disk\nmust also be in the same AWS zone as the kubelet. An AWS EBS disk\ncan only be mounted as read/write once. AWS EBS volumes support\nownership management and SELinux relabeling." + }, + "v1Affinity": { + "type": "object", + "properties": { + "nodeAffinity": { + "$ref": "#/definitions/v1NodeAffinity", + "title": "Describes node affinity scheduling rules for the pod.\n+optional" + }, + "podAffinity": { + "$ref": "#/definitions/v1PodAffinity", + "title": "Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)).\n+optional" + }, + "podAntiAffinity": { + "$ref": "#/definitions/v1PodAntiAffinity", + "title": "Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)).\n+optional" + } + }, + "description": "Affinity is a group of affinity scheduling rules." + }, + "v1AzureDiskVolumeSource": { + "type": "object", + "properties": { + "diskName": { + "type": "string", + "title": "The Name of the data disk in the blob storage" + }, + "diskURI": { + "type": "string", + "title": "The URI the data disk in the blob storage" + }, + "cachingMode": { + "type": "string", + "title": "Host Caching mode: None, Read Only, Read Write.\n+optional" + }, + "fsType": { + "type": "string", + "title": "Filesystem type to mount.\nMust be a filesystem type supported by the host operating system.\nEx. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.\n+optional" + }, + "readOnly": { + "type": "boolean", + "title": "Defaults to false (read/write). ReadOnly here will force\nthe ReadOnly setting in VolumeMounts.\n+optional" + }, + "kind": { + "type": "string", + "title": "Expected values Shared: multiple blob disks per storage account Dedicated: single blob disk per storage account Managed: azure managed data disk (only in managed availability set). defaults to shared" + } + }, + "description": "AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod." + }, + "v1AzureFileVolumeSource": { + "type": "object", + "properties": { + "secretName": { + "type": "string", + "title": "the name of secret that contains Azure Storage Account Name and Key" + }, + "shareName": { + "type": "string", + "title": "Share Name" + }, + "readOnly": { + "type": "boolean", + "title": "Defaults to false (read/write). ReadOnly here will force\nthe ReadOnly setting in VolumeMounts.\n+optional" + } + }, + "description": "AzureFile represents an Azure File Service mount on the host and bind mount to the pod." + }, + "v1CSIVolumeSource": { + "type": "object", + "properties": { + "driver": { + "type": "string", + "description": "Driver is the name of the CSI driver that handles this volume.\nConsult with your admin for the correct name as registered in the cluster." + }, + "readOnly": { + "type": "boolean", + "title": "Specifies a read-only configuration for the volume.\nDefaults to false (read/write).\n+optional" + }, + "fsType": { + "type": "string", + "title": "Filesystem type to mount. Ex. \"ext4\", \"xfs\", \"ntfs\".\nIf not provided, the empty value is passed to the associated CSI driver\nwhich will determine the default filesystem to apply.\n+optional" + }, + "volumeAttributes": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "VolumeAttributes stores driver-specific properties that are passed to the CSI\ndriver. Consult your driver's documentation for supported values.\n+optional" + }, + "nodePublishSecretRef": { + "$ref": "#/definitions/v1LocalObjectReference", + "title": "NodePublishSecretRef is a reference to the secret object containing\nsensitive information to pass to the CSI driver to complete the CSI\nNodePublishVolume and NodeUnpublishVolume calls.\nThis field is optional, and may be empty if no secret is required. If the\nsecret object contains more than one secret, all secret references are passed.\n+optional" + } + }, + "title": "Represents a source location of a volume to mount, managed by an external CSI driver" + }, + "v1Capabilities": { + "type": "object", + "properties": { + "add": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Added capabilities\n+optional" + }, + "drop": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Removed capabilities\n+optional" + } + }, + "description": "Adds and removes POSIX capabilities from running containers." + }, + "v1CephFSVolumeSource": { + "type": "object", + "properties": { + "monitors": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Required: Monitors is a collection of Ceph monitors\nMore info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it" + }, + "path": { + "type": "string", + "title": "Optional: Used as the mounted root, rather than the full Ceph tree, default is /\n+optional" + }, + "user": { + "type": "string", + "title": "Optional: User is the rados user name, default is admin\nMore info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it\n+optional" + }, + "secretFile": { + "type": "string", + "title": "Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret\nMore info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it\n+optional" + }, + "secretRef": { + "$ref": "#/definitions/v1LocalObjectReference", + "title": "Optional: SecretRef is reference to the authentication secret for User, default is empty.\nMore info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it\n+optional" + }, + "readOnly": { + "type": "boolean", + "title": "Optional: Defaults to false (read/write). ReadOnly here will force\nthe ReadOnly setting in VolumeMounts.\nMore info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it\n+optional" + } + }, + "description": "Represents a Ceph Filesystem mount that lasts the lifetime of a pod\nCephfs volumes do not support ownership management or SELinux relabeling." + }, + "v1CinderVolumeSource": { + "type": "object", + "properties": { + "volumeID": { + "type": "string", + "title": "volume id used to identify the volume in cinder.\nMore info: https://examples.k8s.io/mysql-cinder-pd/README.md" + }, + "fsType": { + "type": "string", + "title": "Filesystem type to mount.\nMust be a filesystem type supported by the host operating system.\nExamples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.\nMore info: https://examples.k8s.io/mysql-cinder-pd/README.md\n+optional" + }, + "readOnly": { + "type": "boolean", + "title": "Optional: Defaults to false (read/write). ReadOnly here will force\nthe ReadOnly setting in VolumeMounts.\nMore info: https://examples.k8s.io/mysql-cinder-pd/README.md\n+optional" + }, + "secretRef": { + "$ref": "#/definitions/v1LocalObjectReference", + "title": "Optional: points to a secret object containing parameters used to connect\nto OpenStack.\n+optional" + } + }, + "description": "Represents a cinder volume resource in Openstack.\nA Cinder volume must exist before mounting to a container.\nThe volume must also be in the same region as the kubelet.\nCinder volumes support ownership management and SELinux relabeling." + }, + "v1ConfigMapEnvSource": { + "type": "object", + "properties": { + "localObjectReference": { + "$ref": "#/definitions/v1LocalObjectReference", + "description": "The ConfigMap to select from." + }, + "optional": { + "type": "boolean", + "title": "Specify whether the ConfigMap must be defined\n+optional" + } + }, + "description": "ConfigMapEnvSource selects a ConfigMap to populate the environment\nvariables with.\n\nThe contents of the target ConfigMap's Data field will represent the\nkey-value pairs as environment variables." + }, + "v1ConfigMapKeySelector": { + "type": "object", + "properties": { + "localObjectReference": { + "$ref": "#/definitions/v1LocalObjectReference", + "description": "The ConfigMap to select from." + }, + "key": { + "type": "string", + "description": "The key to select." + }, + "optional": { + "type": "boolean", + "title": "Specify whether the ConfigMap or its key must be defined\n+optional" + } + }, + "description": "Selects a key from a ConfigMap." + }, + "v1ConfigMapProjection": { + "type": "object", + "properties": { + "localObjectReference": { + "$ref": "#/definitions/v1LocalObjectReference" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/v1KeyToPath" + }, + "title": "If unspecified, each key-value pair in the Data field of the referenced\nConfigMap will be projected into the volume as a file whose name is the\nkey and content is the value. If specified, the listed keys will be\nprojected into the specified paths, and unlisted keys will not be\npresent. If a key is specified which is not present in the ConfigMap,\nthe volume setup will error unless it is marked optional. Paths must be\nrelative and may not contain the '..' path or start with '..'.\n+optional" + }, + "optional": { + "type": "boolean", + "title": "Specify whether the ConfigMap or its keys must be defined\n+optional" + } + }, + "description": "Adapts a ConfigMap into a projected volume.\n\nThe contents of the target ConfigMap's Data field will be presented in a\nprojected volume as files using the keys in the Data field as the file names,\nunless the items element is populated with specific mappings of keys to paths.\nNote that this is identical to a configmap volume source without the default\nmode." + }, + "v1ConfigMapVolumeSource": { + "type": "object", + "properties": { + "localObjectReference": { + "$ref": "#/definitions/v1LocalObjectReference" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/v1KeyToPath" + }, + "title": "If unspecified, each key-value pair in the Data field of the referenced\nConfigMap will be projected into the volume as a file whose name is the\nkey and content is the value. If specified, the listed keys will be\nprojected into the specified paths, and unlisted keys will not be\npresent. If a key is specified which is not present in the ConfigMap,\nthe volume setup will error unless it is marked optional. Paths must be\nrelative and may not contain the '..' path or start with '..'.\n+optional" + }, + "defaultMode": { + "type": "integer", + "format": "int32", + "title": "Optional: mode bits used to set permissions on created files by default.\nMust be an octal value between 0000 and 0777 or a decimal value between 0 and 511.\nYAML accepts both octal and decimal values, JSON requires decimal values for mode bits.\nDefaults to 0644.\nDirectories within the path are not affected by this setting.\nThis might be in conflict with other options that affect the file\nmode, like fsGroup, and the result can be other mode bits set.\n+optional" + }, + "optional": { + "type": "boolean", + "title": "Specify whether the ConfigMap or its keys must be defined\n+optional" + } + }, + "description": "Adapts a ConfigMap into a volume.\n\nThe contents of the target ConfigMap's Data field will be presented in a\nvolume as files using the keys in the Data field as the file names, unless\nthe items element is populated with specific mappings of keys to paths.\nConfigMap volumes support ownership management and SELinux relabeling." + }, + "v1Container": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the container specified as a DNS_LABEL.\nEach container in a pod must have a unique name (DNS_LABEL).\nCannot be updated." + }, + "image": { + "type": "string", + "title": "Docker image name.\nMore info: https://kubernetes.io/docs/concepts/containers/images\nThis field is optional to allow higher level config management to default or override\ncontainer images in workload controllers like Deployments and StatefulSets.\n+optional" + }, + "command": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Entrypoint array. Not executed within a shell.\nThe docker image's ENTRYPOINT is used if this is not provided.\nVariable references $(VAR_NAME) are expanded using the container's environment. If a variable\ncannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax\ncan be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded,\nregardless of whether the variable exists or not.\nCannot be updated.\nMore info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell\n+optional" + }, + "args": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Arguments to the entrypoint.\nThe docker image's CMD is used if this is not provided.\nVariable references $(VAR_NAME) are expanded using the container's environment. If a variable\ncannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax\ncan be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded,\nregardless of whether the variable exists or not.\nCannot be updated.\nMore info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell\n+optional" + }, + "workingDir": { + "type": "string", + "title": "Container's working directory.\nIf not specified, the container runtime's default will be used, which\nmight be configured in the container image.\nCannot be updated.\n+optional" + }, + "ports": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ContainerPort" + }, + "title": "List of ports to expose from the container. Exposing a port here gives\nthe system additional information about the network connections a\ncontainer uses, but is primarily informational. Not specifying a port here\nDOES NOT prevent that port from being exposed. Any port which is\nlistening on the default \"0.0.0.0\" address inside a container will be\naccessible from the network.\nCannot be updated.\n+optional\n+patchMergeKey=containerPort\n+patchStrategy=merge\n+listType=map\n+listMapKey=containerPort\n+listMapKey=protocol" + }, + "envFrom": { + "type": "array", + "items": { + "$ref": "#/definitions/v1EnvFromSource" + }, + "title": "List of sources to populate environment variables in the container.\nThe keys defined within a source must be a C_IDENTIFIER. All invalid keys\nwill be reported as an event when the container is starting. When a key exists in multiple\nsources, the value associated with the last source will take precedence.\nValues defined by an Env with a duplicate key will take precedence.\nCannot be updated.\n+optional" + }, + "env": { + "type": "array", + "items": { + "$ref": "#/definitions/v1EnvVar" + }, + "title": "List of environment variables to set in the container.\nCannot be updated.\n+optional\n+patchMergeKey=name\n+patchStrategy=merge" + }, + "resources": { + "$ref": "#/definitions/corev1ResourceRequirements", + "title": "Compute Resources required by this container.\nCannot be updated.\nMore info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/\n+optional" + }, + "volumeMounts": { + "type": "array", + "items": { + "$ref": "#/definitions/corev1VolumeMount" + }, + "title": "Pod volumes to mount into the container's filesystem.\nCannot be updated.\n+optional\n+patchMergeKey=mountPath\n+patchStrategy=merge" + }, + "volumeDevices": { + "type": "array", + "items": { + "$ref": "#/definitions/v1VolumeDevice" + }, + "title": "volumeDevices is the list of block devices to be used by the container.\n+patchMergeKey=devicePath\n+patchStrategy=merge\n+optional" + }, + "livenessProbe": { + "$ref": "#/definitions/v1Probe", + "title": "Periodic probe of container liveness.\nContainer will be restarted if the probe fails.\nCannot be updated.\nMore info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes\n+optional" + }, + "readinessProbe": { + "$ref": "#/definitions/v1Probe", + "title": "Periodic probe of container service readiness.\nContainer will be removed from service endpoints if the probe fails.\nCannot be updated.\nMore info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes\n+optional" + }, + "startupProbe": { + "$ref": "#/definitions/v1Probe", + "title": "StartupProbe indicates that the Pod has successfully initialized.\nIf specified, no other probes are executed until this completes successfully.\nIf this probe fails, the Pod will be restarted, just as if the livenessProbe failed.\nThis can be used to provide different probe parameters at the beginning of a Pod's lifecycle,\nwhen it might take a long time to load data or warm a cache, than during steady-state operation.\nThis cannot be updated.\nMore info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes\n+optional" + }, + "lifecycle": { + "$ref": "#/definitions/v1Lifecycle", + "title": "Actions that the management system should take in response to container lifecycle events.\nCannot be updated.\n+optional" + }, + "terminationMessagePath": { + "type": "string", + "title": "Optional: Path at which the file to which the container's termination message\nwill be written is mounted into the container's filesystem.\nMessage written is intended to be brief final status, such as an assertion failure message.\nWill be truncated by the node if greater than 4096 bytes. The total message length across\nall containers will be limited to 12kb.\nDefaults to /dev/termination-log.\nCannot be updated.\n+optional" + }, + "terminationMessagePolicy": { + "type": "string", + "title": "Indicate how the termination message should be populated. File will use the contents of\nterminationMessagePath to populate the container status message on both success and failure.\nFallbackToLogsOnError will use the last chunk of container log output if the termination\nmessage file is empty and the container exited with an error.\nThe log output is limited to 2048 bytes or 80 lines, whichever is smaller.\nDefaults to File.\nCannot be updated.\n+optional" + }, + "imagePullPolicy": { + "type": "string", + "title": "Image pull policy.\nOne of Always, Never, IfNotPresent.\nDefaults to Always if :latest tag is specified, or IfNotPresent otherwise.\nCannot be updated.\nMore info: https://kubernetes.io/docs/concepts/containers/images#updating-images\n+optional" + }, + "securityContext": { + "$ref": "#/definitions/v1SecurityContext", + "title": "Security options the pod should run with.\nMore info: https://kubernetes.io/docs/concepts/policy/security-context/\nMore info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/\n+optional" + }, + "stdin": { + "type": "boolean", + "title": "Whether this container should allocate a buffer for stdin in the container runtime. If this\nis not set, reads from stdin in the container will always result in EOF.\nDefault is false.\n+optional" + }, + "stdinOnce": { + "type": "boolean", + "title": "Whether the container runtime should close the stdin channel after it has been opened by\na single attach. When stdin is true the stdin stream will remain open across multiple attach\nsessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the\nfirst client attaches to stdin, and then remains open and accepts data until the client disconnects,\nat which time stdin is closed and remains closed until the container is restarted. If this\nflag is false, a container processes that reads from stdin will never receive an EOF.\nDefault is false\n+optional" + }, + "tty": { + "type": "boolean", + "title": "Whether this container should allocate a TTY for itself, also requires 'stdin' to be true.\nDefault is false.\n+optional" + } + }, + "description": "A single application container that you want to run within a pod." + }, + "v1ContainerPort": { + "type": "object", + "properties": { + "name": { + "type": "string", + "title": "If specified, this must be an IANA_SVC_NAME and unique within the pod. Each\nnamed port in a pod must have a unique name. Name for the port that can be\nreferred to by services.\n+optional" + }, + "hostPort": { + "type": "integer", + "format": "int32", + "title": "Number of port to expose on the host.\nIf specified, this must be a valid port number, 0 \u003c x \u003c 65536.\nIf HostNetwork is specified, this must match ContainerPort.\nMost containers do not need this.\n+optional" + }, + "containerPort": { + "type": "integer", + "format": "int32", + "description": "Number of port to expose on the pod's IP address.\nThis must be a valid port number, 0 \u003c x \u003c 65536." + }, + "protocol": { + "type": "string", + "title": "Protocol for port. Must be UDP, TCP, or SCTP.\nDefaults to \"TCP\".\n+optional\n+default=\"TCP\"" + }, + "hostIP": { + "type": "string", + "title": "What host IP to bind the external port to.\n+optional" + } + }, + "description": "ContainerPort represents a network port in a single container." + }, + "v1DownwardAPIProjection": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/v1DownwardAPIVolumeFile" + }, + "title": "Items is a list of DownwardAPIVolume file\n+optional" + } + }, + "description": "Represents downward API info for projecting into a projected volume.\nNote that this is identical to a downwardAPI volume source without the default\nmode." + }, + "v1DownwardAPIVolumeFile": { + "type": "object", + "properties": { + "path": { + "type": "string", + "title": "Required: Path is the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..'" + }, + "fieldRef": { + "$ref": "#/definitions/v1ObjectFieldSelector", + "title": "Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.\n+optional" + }, + "resourceFieldRef": { + "$ref": "#/definitions/v1ResourceFieldSelector", + "title": "Selects a resource of the container: only resources limits and requests\n(limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.\n+optional" + }, + "mode": { + "type": "integer", + "format": "int32", + "title": "Optional: mode bits used to set permissions on this file, must be an octal value\nbetween 0000 and 0777 or a decimal value between 0 and 511.\nYAML accepts both octal and decimal values, JSON requires decimal values for mode bits.\nIf not specified, the volume defaultMode will be used.\nThis might be in conflict with other options that affect the file\nmode, like fsGroup, and the result can be other mode bits set.\n+optional" + } + }, + "title": "DownwardAPIVolumeFile represents information to create the file containing the pod field" + }, + "v1DownwardAPIVolumeSource": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/v1DownwardAPIVolumeFile" + }, + "title": "Items is a list of downward API volume file\n+optional" + }, + "defaultMode": { + "type": "integer", + "format": "int32", + "title": "Optional: mode bits to use on created files by default. Must be a\nOptional: mode bits used to set permissions on created files by default.\nMust be an octal value between 0000 and 0777 or a decimal value between 0 and 511.\nYAML accepts both octal and decimal values, JSON requires decimal values for mode bits.\nDefaults to 0644.\nDirectories within the path are not affected by this setting.\nThis might be in conflict with other options that affect the file\nmode, like fsGroup, and the result can be other mode bits set.\n+optional" + } + }, + "description": "DownwardAPIVolumeSource represents a volume containing downward API info.\nDownward API volumes support ownership management and SELinux relabeling." + }, + "v1EmptyDirVolumeSource": { + "type": "object", + "properties": { + "medium": { + "type": "string", + "title": "What type of storage medium should back this directory.\nThe default is \"\" which means to use the node's default medium.\nMust be an empty string (default) or Memory.\nMore info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir\n+optional" + }, + "sizeLimit": { + "$ref": "#/definitions/resourceQuantity", + "title": "Total amount of local storage required for this EmptyDir volume.\nThe size limit is also applicable for memory medium.\nThe maximum usage on memory medium EmptyDir would be the minimum value between\nthe SizeLimit specified here and the sum of memory limits of all containers in a pod.\nThe default is nil which means that the limit is undefined.\nMore info: http://kubernetes.io/docs/user-guide/volumes#emptydir\n+optional" + } + }, + "description": "Represents an empty directory for a pod.\nEmpty directory volumes support ownership management and SELinux relabeling." + }, + "v1EnvFromSource": { + "type": "object", + "properties": { + "prefix": { + "type": "string", + "title": "An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER.\n+optional" + }, + "configMapRef": { + "$ref": "#/definitions/v1ConfigMapEnvSource", + "title": "The ConfigMap to select from\n+optional" + }, + "secretRef": { + "$ref": "#/definitions/v1SecretEnvSource", + "title": "The Secret to select from\n+optional" + } + }, + "title": "EnvFromSource represents the source of a set of ConfigMaps" + }, + "v1EnvVar": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the environment variable. Must be a C_IDENTIFIER." + }, + "value": { + "type": "string", + "title": "Variable references $(VAR_NAME) are expanded\nusing the previous defined environment variables in the container and\nany service environment variables. If a variable cannot be resolved,\nthe reference in the input string will be unchanged. The $(VAR_NAME)\nsyntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped\nreferences will never be expanded, regardless of whether the variable\nexists or not.\nDefaults to \"\".\n+optional" + }, + "valueFrom": { + "$ref": "#/definitions/v1EnvVarSource", + "title": "Source for the environment variable's value. Cannot be used if value is not empty.\n+optional" + } + }, + "description": "EnvVar represents an environment variable present in a Container." + }, + "v1EnvVarSource": { + "type": "object", + "properties": { + "fieldRef": { + "$ref": "#/definitions/v1ObjectFieldSelector", + "title": "Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['\u003cKEY\u003e']`, `metadata.annotations['\u003cKEY\u003e']`,\nspec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.\n+optional" + }, + "resourceFieldRef": { + "$ref": "#/definitions/v1ResourceFieldSelector", + "title": "Selects a resource of the container: only resources limits and requests\n(limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.\n+optional" + }, + "configMapKeyRef": { + "$ref": "#/definitions/v1ConfigMapKeySelector", + "title": "Selects a key of a ConfigMap.\n+optional" + }, + "secretKeyRef": { + "$ref": "#/definitions/v1SecretKeySelector", + "title": "Selects a key of a secret in the pod's namespace\n+optional" + } + }, + "description": "EnvVarSource represents a source for the value of an EnvVar." + }, + "v1EphemeralContainer": { + "type": "object", + "properties": { + "ephemeralContainerCommon": { + "$ref": "#/definitions/v1EphemeralContainerCommon", + "description": "Ephemeral containers have all of the fields of Container, plus additional fields\nspecific to ephemeral containers. Fields in common with Container are in the\nfollowing inlined struct so than an EphemeralContainer may easily be converted\nto a Container." + }, + "targetContainerName": { + "type": "string", + "title": "If set, the name of the container from PodSpec that this ephemeral container targets.\nThe ephemeral container will be run in the namespaces (IPC, PID, etc) of this container.\nIf not set then the ephemeral container is run in whatever namespaces are shared\nfor the pod. Note that the container runtime must support this feature.\n+optional" + } + }, + "description": "An EphemeralContainer is a container that may be added temporarily to an existing pod for\nuser-initiated activities such as debugging. Ephemeral containers have no resource or\nscheduling guarantees, and they will not be restarted when they exit or when a pod is\nremoved or restarted. If an ephemeral container causes a pod to exceed its resource\nallocation, the pod may be evicted.\nEphemeral containers may not be added by directly updating the pod spec. They must be added\nvia the pod's ephemeralcontainers subresource, and they will appear in the pod spec\nonce added.\nThis is an alpha feature enabled by the EphemeralContainers feature flag." + }, + "v1EphemeralContainerCommon": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the ephemeral container specified as a DNS_LABEL.\nThis name must be unique among all containers, init containers and ephemeral containers." + }, + "image": { + "type": "string", + "title": "Docker image name.\nMore info: https://kubernetes.io/docs/concepts/containers/images" + }, + "command": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Entrypoint array. Not executed within a shell.\nThe docker image's ENTRYPOINT is used if this is not provided.\nVariable references $(VAR_NAME) are expanded using the container's environment. If a variable\ncannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax\ncan be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded,\nregardless of whether the variable exists or not.\nCannot be updated.\nMore info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell\n+optional" + }, + "args": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Arguments to the entrypoint.\nThe docker image's CMD is used if this is not provided.\nVariable references $(VAR_NAME) are expanded using the container's environment. If a variable\ncannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax\ncan be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded,\nregardless of whether the variable exists or not.\nCannot be updated.\nMore info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell\n+optional" + }, + "workingDir": { + "type": "string", + "title": "Container's working directory.\nIf not specified, the container runtime's default will be used, which\nmight be configured in the container image.\nCannot be updated.\n+optional" + }, + "ports": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ContainerPort" + }, + "description": "Ports are not allowed for ephemeral containers." + }, + "envFrom": { + "type": "array", + "items": { + "$ref": "#/definitions/v1EnvFromSource" + }, + "title": "List of sources to populate environment variables in the container.\nThe keys defined within a source must be a C_IDENTIFIER. All invalid keys\nwill be reported as an event when the container is starting. When a key exists in multiple\nsources, the value associated with the last source will take precedence.\nValues defined by an Env with a duplicate key will take precedence.\nCannot be updated.\n+optional" + }, + "env": { + "type": "array", + "items": { + "$ref": "#/definitions/v1EnvVar" + }, + "title": "List of environment variables to set in the container.\nCannot be updated.\n+optional\n+patchMergeKey=name\n+patchStrategy=merge" + }, + "resources": { + "$ref": "#/definitions/corev1ResourceRequirements", + "title": "Resources are not allowed for ephemeral containers. Ephemeral containers use spare resources\nalready allocated to the pod.\n+optional" + }, + "volumeMounts": { + "type": "array", + "items": { + "$ref": "#/definitions/corev1VolumeMount" + }, + "title": "Pod volumes to mount into the container's filesystem.\nCannot be updated.\n+optional\n+patchMergeKey=mountPath\n+patchStrategy=merge" + }, + "volumeDevices": { + "type": "array", + "items": { + "$ref": "#/definitions/v1VolumeDevice" + }, + "title": "volumeDevices is the list of block devices to be used by the container.\n+patchMergeKey=devicePath\n+patchStrategy=merge\n+optional" + }, + "livenessProbe": { + "$ref": "#/definitions/v1Probe", + "title": "Probes are not allowed for ephemeral containers.\n+optional" + }, + "readinessProbe": { + "$ref": "#/definitions/v1Probe", + "title": "Probes are not allowed for ephemeral containers.\n+optional" + }, + "startupProbe": { + "$ref": "#/definitions/v1Probe", + "title": "Probes are not allowed for ephemeral containers.\n+optional" + }, + "lifecycle": { + "$ref": "#/definitions/v1Lifecycle", + "title": "Lifecycle is not allowed for ephemeral containers.\n+optional" + }, + "terminationMessagePath": { + "type": "string", + "title": "Optional: Path at which the file to which the container's termination message\nwill be written is mounted into the container's filesystem.\nMessage written is intended to be brief final status, such as an assertion failure message.\nWill be truncated by the node if greater than 4096 bytes. The total message length across\nall containers will be limited to 12kb.\nDefaults to /dev/termination-log.\nCannot be updated.\n+optional" + }, + "terminationMessagePolicy": { + "type": "string", + "title": "Indicate how the termination message should be populated. File will use the contents of\nterminationMessagePath to populate the container status message on both success and failure.\nFallbackToLogsOnError will use the last chunk of container log output if the termination\nmessage file is empty and the container exited with an error.\nThe log output is limited to 2048 bytes or 80 lines, whichever is smaller.\nDefaults to File.\nCannot be updated.\n+optional" + }, + "imagePullPolicy": { + "type": "string", + "title": "Image pull policy.\nOne of Always, Never, IfNotPresent.\nDefaults to Always if :latest tag is specified, or IfNotPresent otherwise.\nCannot be updated.\nMore info: https://kubernetes.io/docs/concepts/containers/images#updating-images\n+optional" + }, + "securityContext": { + "$ref": "#/definitions/v1SecurityContext", + "title": "SecurityContext is not allowed for ephemeral containers.\n+optional" + }, + "stdin": { + "type": "boolean", + "title": "Whether this container should allocate a buffer for stdin in the container runtime. If this\nis not set, reads from stdin in the container will always result in EOF.\nDefault is false.\n+optional" + }, + "stdinOnce": { + "type": "boolean", + "title": "Whether the container runtime should close the stdin channel after it has been opened by\na single attach. When stdin is true the stdin stream will remain open across multiple attach\nsessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the\nfirst client attaches to stdin, and then remains open and accepts data until the client disconnects,\nat which time stdin is closed and remains closed until the container is restarted. If this\nflag is false, a container processes that reads from stdin will never receive an EOF.\nDefault is false\n+optional" + }, + "tty": { + "type": "boolean", + "title": "Whether this container should allocate a TTY for itself, also requires 'stdin' to be true.\nDefault is false.\n+optional" + } + }, + "description": "EphemeralContainerCommon is a copy of all fields in Container to be inlined in\nEphemeralContainer. This separate type allows easy conversion from EphemeralContainer\nto Container and allows separate documentation for the fields of EphemeralContainer.\nWhen a new field is added to Container it must be added here as well." + }, + "v1EphemeralVolumeSource": { + "type": "object", + "properties": { + "volumeClaimTemplate": { + "$ref": "#/definitions/v1PersistentVolumeClaimTemplate", + "description": "Will be used to create a stand-alone PVC to provision the volume.\nThe pod in which this EphemeralVolumeSource is embedded will be the\nowner of the PVC, i.e. the PVC will be deleted together with the\npod. The name of the PVC will be `\u003cpod name\u003e-\u003cvolume name\u003e` where\n`\u003cvolume name\u003e` is the name from the `PodSpec.Volumes` array\nentry. Pod validation will reject the pod if the concatenated name\nis not valid for a PVC (for example, too long).\n\nAn existing PVC with that name that is not owned by the pod\nwill *not* be used for the pod to avoid using an unrelated\nvolume by mistake. Starting the pod is then blocked until\nthe unrelated PVC is removed. If such a pre-created PVC is\nmeant to be used by the pod, the PVC has to updated with an\nowner reference to the pod once the pod exists. Normally\nthis should not be necessary, but it may be useful when\nmanually reconstructing a broken cluster.\n\nThis field is read-only and no changes will be made by Kubernetes\nto the PVC after it has been created.\n\nRequired, must not be nil." + }, + "readOnly": { + "type": "boolean", + "title": "Specifies a read-only configuration for the volume.\nDefaults to false (read/write).\n+optional" + } + }, + "description": "Represents an ephemeral volume that is handled by a normal storage driver." + }, + "v1ExecAction": { + "type": "object", + "properties": { + "command": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Command is the command line to execute inside the container, the working directory for the\ncommand is root ('/') in the container's filesystem. The command is simply exec'd, it is\nnot run inside a shell, so traditional shell instructions ('|', etc) won't work. To use\na shell, you need to explicitly call out to that shell.\nExit status of 0 is treated as live/healthy and non-zero is unhealthy.\n+optional" + } + }, + "description": "ExecAction describes a \"run in container\" action." + }, + "v1FCVolumeSource": { + "type": "object", + "properties": { + "targetWWNs": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Optional: FC target worldwide names (WWNs)\n+optional" + }, + "lun": { + "type": "integer", + "format": "int32", + "title": "Optional: FC target lun number\n+optional" + }, + "fsType": { + "type": "string", + "title": "Filesystem type to mount.\nMust be a filesystem type supported by the host operating system.\nEx. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.\nTODO: how do we prevent errors in the filesystem from compromising the machine\n+optional" + }, + "readOnly": { + "type": "boolean", + "title": "Optional: Defaults to false (read/write). ReadOnly here will force\nthe ReadOnly setting in VolumeMounts.\n+optional" + }, + "wwids": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Optional: FC volume world wide identifiers (wwids)\nEither wwids or combination of targetWWNs and lun must be set, but not both simultaneously.\n+optional" + } + }, + "description": "Represents a Fibre Channel volume.\nFibre Channel volumes can only be mounted as read/write once.\nFibre Channel volumes support ownership management and SELinux relabeling." + }, + "v1FieldsV1": { + "type": "object", + "properties": { + "Raw": { + "type": "string", + "format": "byte", + "description": "Raw is the underlying serialization of this object." + } + }, + "description": "FieldsV1 stores a set of fields in a data structure like a Trie, in JSON format.\n\nEach key is either a '.' representing the field itself, and will always map to an empty set,\nor a string representing a sub-field or item. The string will follow one of these four formats:\n'f:\u003cname\u003e', where \u003cname\u003e is the name of a field in a struct, or key in a map\n'v:\u003cvalue\u003e', where \u003cvalue\u003e is the exact json formatted value of a list item\n'i:\u003cindex\u003e', where \u003cindex\u003e is position of a item in a list\n'k:\u003ckeys\u003e', where \u003ckeys\u003e is a map of a list item's key fields to their unique values\nIf a key maps to an empty Fields value, the field that key represents is part of the set.\n\nThe exact format is defined in sigs.k8s.io/structured-merge-diff\n+protobuf.options.(gogoproto.goproto_stringer)=false" + }, + "v1FlexVolumeSource": { + "type": "object", + "properties": { + "driver": { + "type": "string", + "description": "Driver is the name of the driver to use for this volume." + }, + "fsType": { + "type": "string", + "title": "Filesystem type to mount.\nMust be a filesystem type supported by the host operating system.\nEx. \"ext4\", \"xfs\", \"ntfs\". The default filesystem depends on FlexVolume script.\n+optional" + }, + "secretRef": { + "$ref": "#/definitions/v1LocalObjectReference", + "title": "Optional: SecretRef is reference to the secret object containing\nsensitive information to pass to the plugin scripts. This may be\nempty if no secret object is specified. If the secret object\ncontains more than one secret, all secrets are passed to the plugin\nscripts.\n+optional" + }, + "readOnly": { + "type": "boolean", + "title": "Optional: Defaults to false (read/write). ReadOnly here will force\nthe ReadOnly setting in VolumeMounts.\n+optional" + }, + "options": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Optional: Extra command options if any.\n+optional" + } + }, + "description": "FlexVolume represents a generic volume resource that is\nprovisioned/attached using an exec based plugin." + }, + "v1FlockerVolumeSource": { + "type": "object", + "properties": { + "datasetName": { + "type": "string", + "title": "Name of the dataset stored as metadata -\u003e name on the dataset for Flocker\nshould be considered as deprecated\n+optional" + }, + "datasetUUID": { + "type": "string", + "title": "UUID of the dataset. This is unique identifier of a Flocker dataset\n+optional" + } + }, + "description": "Represents a Flocker volume mounted by the Flocker agent.\nOne and only one of datasetName and datasetUUID should be set.\nFlocker volumes do not support ownership management or SELinux relabeling." + }, + "v1GCEPersistentDiskVolumeSource": { + "type": "object", + "properties": { + "pdName": { + "type": "string", + "title": "Unique name of the PD resource in GCE. Used to identify the disk in GCE.\nMore info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk" + }, + "fsType": { + "type": "string", + "title": "Filesystem type of the volume that you want to mount.\nTip: Ensure that the filesystem type is supported by the host operating system.\nExamples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.\nMore info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk\nTODO: how do we prevent errors in the filesystem from compromising the machine\n+optional" + }, + "partition": { + "type": "integer", + "format": "int32", + "title": "The partition in the volume that you want to mount.\nIf omitted, the default is to mount by volume name.\nExamples: For volume /dev/sda1, you specify the partition as \"1\".\nSimilarly, the volume partition for /dev/sda is \"0\" (or you can leave the property empty).\nMore info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk\n+optional" + }, + "readOnly": { + "type": "boolean", + "title": "ReadOnly here will force the ReadOnly setting in VolumeMounts.\nDefaults to false.\nMore info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk\n+optional" + } + }, + "description": "Represents a Persistent Disk resource in Google Compute Engine.\n\nA GCE PD must exist before mounting to a container. The disk must\nalso be in the same GCE project and zone as the kubelet. A GCE PD\ncan only be mounted as read/write once or read-only many times. GCE\nPDs support ownership management and SELinux relabeling." + }, + "v1GitRepoVolumeSource": { + "type": "object", + "properties": { + "repository": { + "type": "string", + "title": "Repository URL" + }, + "revision": { + "type": "string", + "title": "Commit hash for the specified revision.\n+optional" + }, + "directory": { + "type": "string", + "title": "Target directory name.\nMust not contain or start with '..'. If '.' is supplied, the volume directory will be the\ngit repository. Otherwise, if specified, the volume will contain the git repository in\nthe subdirectory with the given name.\n+optional" + } + }, + "description": "Represents a volume that is populated with the contents of a git repository.\nGit repo volumes do not support ownership management.\nGit repo volumes support SELinux relabeling.\n\nDEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an\nEmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir\ninto the Pod's container." + }, + "v1GlusterfsVolumeSource": { + "type": "object", + "properties": { + "endpoints": { + "type": "string", + "title": "EndpointsName is the endpoint name that details Glusterfs topology.\nMore info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod" + }, + "path": { + "type": "string", + "title": "Path is the Glusterfs volume path.\nMore info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod" + }, + "readOnly": { + "type": "boolean", + "title": "ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions.\nDefaults to false.\nMore info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod\n+optional" + } + }, + "description": "Represents a Glusterfs mount that lasts the lifetime of a pod.\nGlusterfs volumes do not support ownership management or SELinux relabeling." + }, + "v1HTTPGetAction": { + "type": "object", + "properties": { + "path": { + "type": "string", + "title": "Path to access on the HTTP server.\n+optional" + }, + "port": { + "$ref": "#/definitions/intstrIntOrString", + "description": "Name or number of the port to access on the container.\nNumber must be in the range 1 to 65535.\nName must be an IANA_SVC_NAME." + }, + "host": { + "type": "string", + "title": "Host name to connect to, defaults to the pod IP. You probably want to set\n\"Host\" in httpHeaders instead.\n+optional" + }, + "scheme": { + "type": "string", + "title": "Scheme to use for connecting to the host.\nDefaults to HTTP.\n+optional" + }, + "httpHeaders": { + "type": "array", + "items": { + "$ref": "#/definitions/v1HTTPHeader" + }, + "title": "Custom headers to set in the request. HTTP allows repeated headers.\n+optional" + } + }, + "description": "HTTPGetAction describes an action based on HTTP Get requests." + }, + "v1HTTPHeader": { + "type": "object", + "properties": { + "name": { + "type": "string", + "title": "The header field name" + }, + "value": { + "type": "string", + "title": "The header field value" + } + }, + "title": "HTTPHeader describes a custom header to be used in HTTP probes" + }, + "v1Handler": { + "type": "object", + "properties": { + "exec": { + "$ref": "#/definitions/v1ExecAction", + "title": "One and only one of the following should be specified.\nExec specifies the action to take.\n+optional" + }, + "httpGet": { + "$ref": "#/definitions/v1HTTPGetAction", + "title": "HTTPGet specifies the http request to perform.\n+optional" + }, + "tcpSocket": { + "$ref": "#/definitions/v1TCPSocketAction", + "title": "TCPSocket specifies an action involving a TCP port.\nTCP hooks not yet supported\nTODO: implement a realistic TCP lifecycle hook\n+optional" + } + }, + "description": "Handler defines a specific action that should be taken\nTODO: pass structured data to these actions, and document that data here." + }, + "v1HostAlias": { + "type": "object", + "properties": { + "ip": { + "type": "string", + "description": "IP address of the host file entry." + }, + "hostnames": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Hostnames for the above IP address." + } + }, + "description": "HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the\npod's hosts file." + }, + "v1HostPathVolumeSource": { + "type": "object", + "properties": { + "path": { + "type": "string", + "title": "Path of the directory on the host.\nIf the path is a symlink, it will follow the link to the real path.\nMore info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath" + }, + "type": { + "type": "string", + "title": "Type for HostPath Volume\nDefaults to \"\"\nMore info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath\n+optional" + } + }, + "description": "Represents a host path mapped into a pod.\nHost path volumes do not support ownership management or SELinux relabeling." + }, + "v1ISCSIVolumeSource": { + "type": "object", + "properties": { + "targetPortal": { + "type": "string", + "description": "iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port\nis other than default (typically TCP ports 860 and 3260)." + }, + "iqn": { + "type": "string", + "description": "Target iSCSI Qualified Name." + }, + "lun": { + "type": "integer", + "format": "int32", + "description": "iSCSI Target Lun number." + }, + "iscsiInterface": { + "type": "string", + "title": "iSCSI Interface Name that uses an iSCSI transport.\nDefaults to 'default' (tcp).\n+optional" + }, + "fsType": { + "type": "string", + "title": "Filesystem type of the volume that you want to mount.\nTip: Ensure that the filesystem type is supported by the host operating system.\nExamples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.\nMore info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi\nTODO: how do we prevent errors in the filesystem from compromising the machine\n+optional" + }, + "readOnly": { + "type": "boolean", + "title": "ReadOnly here will force the ReadOnly setting in VolumeMounts.\nDefaults to false.\n+optional" + }, + "portals": { + "type": "array", + "items": { + "type": "string" + }, + "title": "iSCSI Target Portal List. The portal is either an IP or ip_addr:port if the port\nis other than default (typically TCP ports 860 and 3260).\n+optional" + }, + "chapAuthDiscovery": { + "type": "boolean", + "title": "whether support iSCSI Discovery CHAP authentication\n+optional" + }, + "chapAuthSession": { + "type": "boolean", + "title": "whether support iSCSI Session CHAP authentication\n+optional" + }, + "secretRef": { + "$ref": "#/definitions/v1LocalObjectReference", + "title": "CHAP Secret for iSCSI target and initiator authentication\n+optional" + }, + "initiatorName": { + "type": "string", + "title": "Custom iSCSI Initiator Name.\nIf initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface\n\u003ctarget portal\u003e:\u003cvolume name\u003e will be created for the connection.\n+optional" + } + }, + "description": "Represents an ISCSI disk.\nISCSI volumes can only be mounted as read/write once.\nISCSI volumes support ownership management and SELinux relabeling." + }, + "v1JobSpec": { + "type": "object", + "properties": { + "parallelism": { + "type": "integer", + "format": "int32", + "title": "Specifies the maximum desired number of pods the job should\nrun at any given time. The actual number of pods running in steady state will\nbe less than this number when ((.spec.completions - .status.successful) \u003c .spec.parallelism),\ni.e. when the work left to do is less than max parallelism.\nMore info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/\n+optional" + }, + "completions": { + "type": "integer", + "format": "int32", + "title": "Specifies the desired number of successfully finished pods the\njob should be run with. Setting to nil means that the success of any\npod signals the success of all pods, and allows parallelism to have any positive\nvalue. Setting to 1 means that parallelism is limited to 1 and the success of that\npod signals the success of the job.\nMore info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/\n+optional" + }, + "activeDeadlineSeconds": { + "type": "string", + "format": "int64", + "title": "Specifies the duration in seconds relative to the startTime that the job may be active\nbefore the system tries to terminate it; value must be positive integer\n+optional" + }, + "backoffLimit": { + "type": "integer", + "format": "int32", + "title": "Specifies the number of retries before marking this job failed.\nDefaults to 6\n+optional" + }, + "selector": { + "$ref": "#/definitions/v1LabelSelector", + "title": "A label query over pods that should match the pod count.\nNormally, the system sets this field for you.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors\n+optional" + }, + "manualSelector": { + "type": "boolean", + "title": "manualSelector controls generation of pod labels and pod selectors.\nLeave `manualSelector` unset unless you are certain what you are doing.\nWhen false or unset, the system pick labels unique to this job\nand appends those labels to the pod template. When true,\nthe user is responsible for picking unique labels and specifying\nthe selector. Failure to pick a unique label may cause this\nand other jobs to not function correctly. However, You may see\n`manualSelector=true` in jobs that were created with the old `extensions/v1beta1`\nAPI.\nMore info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/#specifying-your-own-pod-selector\n+optional" + }, + "template": { + "$ref": "#/definitions/v1PodTemplateSpec", + "title": "Describes the pod that will be created when executing a job.\nMore info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/" + }, + "ttlSecondsAfterFinished": { + "type": "integer", + "format": "int32", + "title": "ttlSecondsAfterFinished limits the lifetime of a Job that has finished\nexecution (either Complete or Failed). If this field is set,\nttlSecondsAfterFinished after the Job finishes, it is eligible to be\nautomatically deleted. When the Job is being deleted, its lifecycle\nguarantees (e.g. finalizers) will be honored. If this field is unset,\nthe Job won't be automatically deleted. If this field is set to zero,\nthe Job becomes eligible to be deleted immediately after it finishes.\nThis field is alpha-level and is only honored by servers that enable the\nTTLAfterFinished feature.\n+optional" + } + }, + "description": "JobSpec describes how the job execution will look like." + }, + "v1KeyToPath": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "The key to project." + }, + "path": { + "type": "string", + "description": "The relative path of the file to map the key to.\nMay not be an absolute path.\nMay not contain the path element '..'.\nMay not start with the string '..'." + }, + "mode": { + "type": "integer", + "format": "int32", + "title": "Optional: mode bits used to set permissions on this file.\nMust be an octal value between 0000 and 0777 or a decimal value between 0 and 511.\nYAML accepts both octal and decimal values, JSON requires decimal values for mode bits.\nIf not specified, the volume defaultMode will be used.\nThis might be in conflict with other options that affect the file\nmode, like fsGroup, and the result can be other mode bits set.\n+optional" + } + }, + "description": "Maps a string key to a path within a volume." + }, + "v1LabelSelector": { + "type": "object", + "properties": { + "matchLabels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed.\n+optional" + }, + "matchExpressions": { + "type": "array", + "items": { + "$ref": "#/definitions/v1LabelSelectorRequirement" + }, + "title": "matchExpressions is a list of label selector requirements. The requirements are ANDed.\n+optional" + } + }, + "description": "A label selector is a label query over a set of resources. The result of matchLabels and\nmatchExpressions are ANDed. An empty label selector matches all objects. A null\nlabel selector matches no objects." + }, + "v1LabelSelectorRequirement": { + "type": "object", + "properties": { + "key": { + "type": "string", + "title": "key is the label key that the selector applies to.\n+patchMergeKey=key\n+patchStrategy=merge" + }, + "operator": { + "type": "string", + "description": "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist." + }, + "values": { + "type": "array", + "items": { + "type": "string" + }, + "title": "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch.\n+optional" + } + }, + "description": "A label selector requirement is a selector that contains values, a key, and an operator that\nrelates the key and values." + }, + "v1Lifecycle": { + "type": "object", + "properties": { + "postStart": { + "$ref": "#/definitions/v1Handler", + "title": "PostStart is called immediately after a container is created. If the handler fails,\nthe container is terminated and restarted according to its restart policy.\nOther management of the container blocks until the hook completes.\nMore info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks\n+optional" + }, + "preStop": { + "$ref": "#/definitions/v1Handler", + "title": "PreStop is called immediately before a container is terminated due to an\nAPI request or management event such as liveness/startup probe failure,\npreemption, resource contention, etc. The handler is not called if the\ncontainer crashes or exits. The reason for termination is passed to the\nhandler. The Pod's termination grace period countdown begins before the\nPreStop hooked is executed. Regardless of the outcome of the handler, the\ncontainer will eventually terminate within the Pod's termination grace\nperiod. Other management of the container blocks until the hook completes\nor until the termination grace period is reached.\nMore info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks\n+optional" + } + }, + "description": "Lifecycle describes actions that the management system should take in response to container lifecycle\nevents. For the PostStart and PreStop lifecycle handlers, management of the container blocks\nuntil the action is complete, unless the container process fails, in which case the handler is aborted." + }, + "v1LocalObjectReference": { + "type": "object", + "properties": { + "name": { + "type": "string", + "title": "Name of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\nTODO: Add other useful fields. apiVersion, kind, uid?\n+optional" + } + }, + "description": "LocalObjectReference contains enough information to let you locate the\nreferenced object inside the same namespace." + }, + "v1ManagedFieldsEntry": { + "type": "object", + "properties": { + "manager": { + "type": "string", + "description": "Manager is an identifier of the workflow managing these fields." + }, + "operation": { + "type": "string", + "description": "Operation is the type of operation which lead to this ManagedFieldsEntry being created.\nThe only valid values for this field are 'Apply' and 'Update'." + }, + "apiVersion": { + "type": "string", + "description": "APIVersion defines the version of this resource that this field set\napplies to. The format is \"group/version\" just like the top-level\nAPIVersion field. It is necessary to track the version of a field\nset because it cannot be automatically converted." + }, + "time": { + "$ref": "#/definitions/v1Time", + "title": "Time is timestamp of when these fields were set. It should always be empty if Operation is 'Apply'\n+optional" + }, + "fieldsType": { + "type": "string", + "title": "FieldsType is the discriminator for the different fields format and version.\nThere is currently only one possible value: \"FieldsV1\"" + }, + "fieldsV1": { + "$ref": "#/definitions/v1FieldsV1", + "title": "FieldsV1 holds the first JSON version format as described in the \"FieldsV1\" type.\n+optional" + } + }, + "description": "ManagedFieldsEntry is a workflow-id, a FieldSet and the group version of the resource\nthat the fieldset applies to." + }, + "v1NFSVolumeSource": { + "type": "object", + "properties": { + "server": { + "type": "string", + "title": "Server is the hostname or IP address of the NFS server.\nMore info: https://kubernetes.io/docs/concepts/storage/volumes#nfs" + }, + "path": { + "type": "string", + "title": "Path that is exported by the NFS server.\nMore info: https://kubernetes.io/docs/concepts/storage/volumes#nfs" + }, + "readOnly": { + "type": "boolean", + "title": "ReadOnly here will force\nthe NFS export to be mounted with read-only permissions.\nDefaults to false.\nMore info: https://kubernetes.io/docs/concepts/storage/volumes#nfs\n+optional" + } + }, + "description": "Represents an NFS mount that lasts the lifetime of a pod.\nNFS volumes do not support ownership management or SELinux relabeling." + }, + "v1NodeAffinity": { + "type": "object", + "properties": { + "requiredDuringSchedulingIgnoredDuringExecution": { + "$ref": "#/definitions/v1NodeSelector", + "title": "If the affinity requirements specified by this field are not met at\nscheduling time, the pod will not be scheduled onto the node.\nIf the affinity requirements specified by this field cease to be met\nat some point during pod execution (e.g. due to an update), the system\nmay or may not try to eventually evict the pod from its node.\n+optional" + }, + "preferredDuringSchedulingIgnoredDuringExecution": { + "type": "array", + "items": { + "$ref": "#/definitions/v1PreferredSchedulingTerm" + }, + "title": "The scheduler will prefer to schedule pods to nodes that satisfy\nthe affinity expressions specified by this field, but it may choose\na node that violates one or more of the expressions. The node that is\nmost preferred is the one with the greatest sum of weights, i.e.\nfor each node that meets all of the scheduling requirements (resource\nrequest, requiredDuringScheduling affinity expressions, etc.),\ncompute a sum by iterating through the elements of this field and adding\n\"weight\" to the sum if the node matches the corresponding matchExpressions; the\nnode(s) with the highest sum are the most preferred.\n+optional" + } + }, + "description": "Node affinity is a group of node affinity scheduling rules." + }, + "v1NodeSelector": { + "type": "object", + "properties": { + "nodeSelectorTerms": { + "type": "array", + "items": { + "$ref": "#/definitions/v1NodeSelectorTerm" + }, + "description": "Required. A list of node selector terms. The terms are ORed." + } + }, + "description": "A node selector represents the union of the results of one or more label queries\nover a set of nodes; that is, it represents the OR of the selectors represented\nby the node selector terms." + }, + "v1NodeSelectorRequirement": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "The label key that the selector applies to." + }, + "operator": { + "type": "string", + "description": "Represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt." + }, + "values": { + "type": "array", + "items": { + "type": "string" + }, + "title": "An array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. If the operator is Gt or Lt, the values\narray must have a single element, which will be interpreted as an integer.\nThis array is replaced during a strategic merge patch.\n+optional" + } + }, + "description": "A node selector requirement is a selector that contains values, a key, and an operator\nthat relates the key and values." + }, + "v1NodeSelectorTerm": { + "type": "object", + "properties": { + "matchExpressions": { + "type": "array", + "items": { + "$ref": "#/definitions/v1NodeSelectorRequirement" + }, + "title": "A list of node selector requirements by node's labels.\n+optional" + }, + "matchFields": { + "type": "array", + "items": { + "$ref": "#/definitions/v1NodeSelectorRequirement" + }, + "title": "A list of node selector requirements by node's fields.\n+optional" + } + }, + "description": "A null or empty node selector term matches no objects. The requirements of\nthem are ANDed.\nThe TopologySelectorTerm type implements a subset of the NodeSelectorTerm." + }, + "v1ObjectFieldSelector": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "title": "Version of the schema the FieldPath is written in terms of, defaults to \"v1\".\n+optional" + }, + "fieldPath": { + "type": "string", + "description": "Path of the field to select in the specified API version." + } + }, + "description": "ObjectFieldSelector selects an APIVersioned field of an object." + }, + "v1ObjectMeta": { + "type": "object", + "properties": { + "name": { + "type": "string", + "title": "Name must be unique within a namespace. Is required when creating resources, although\nsome resources may allow a client to request the generation of an appropriate name\nautomatically. Name is primarily intended for creation idempotence and configuration\ndefinition.\nCannot be updated.\nMore info: http://kubernetes.io/docs/user-guide/identifiers#names\n+optional" + }, + "generateName": { + "type": "string", + "description": "GenerateName is an optional prefix, used by the server, to generate a unique\nname ONLY IF the Name field has not been provided.\nIf this field is used, the name returned to the client will be different\nthan the name passed. This value will also be combined with a unique suffix.\nThe provided value has the same validation rules as the Name field,\nand may be truncated by the length of the suffix required to make the value\nunique on the server.\n\nIf this field is specified and the generated name exists, the server will\nNOT return a 409 - instead, it will either return 201 Created or 500 with Reason\nServerTimeout indicating a unique name could not be found in the time allotted, and the client\nshould retry (optionally after the time indicated in the Retry-After header).\n\nApplied only if Name is not specified.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency\n+optional" + }, + "namespace": { + "type": "string", + "description": "Namespace defines the space within which each name must be unique. An empty namespace is\nequivalent to the \"default\" namespace, but \"default\" is the canonical representation.\nNot all objects are required to be scoped to a namespace - the value of this field for\nthose objects will be empty.\n\nMust be a DNS_LABEL.\nCannot be updated.\nMore info: http://kubernetes.io/docs/user-guide/namespaces\n+optional" + }, + "selfLink": { + "type": "string", + "description": "SelfLink is a URL representing this object.\nPopulated by the system.\nRead-only.\n\nDEPRECATED\nKubernetes will stop propagating this field in 1.20 release and the field is planned\nto be removed in 1.21 release.\n+optional" + }, + "uid": { + "type": "string", + "description": "UID is the unique in time and space value for this object. It is typically generated by\nthe server on successful creation of a resource and is not allowed to change on PUT\noperations.\n\nPopulated by the system.\nRead-only.\nMore info: http://kubernetes.io/docs/user-guide/identifiers#uids\n+optional" + }, + "resourceVersion": { + "type": "string", + "description": "An opaque value that represents the internal version of this object that can\nbe used by clients to determine when objects have changed. May be used for optimistic\nconcurrency, change detection, and the watch operation on a resource or set of resources.\nClients must treat these values as opaque and passed unmodified back to the server.\nThey may only be valid for a particular resource or set of resources.\n\nPopulated by the system.\nRead-only.\nValue must be treated as opaque by clients and .\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency\n+optional" + }, + "generation": { + "type": "string", + "format": "int64", + "title": "A sequence number representing a specific generation of the desired state.\nPopulated by the system. Read-only.\n+optional" + }, + "creationTimestamp": { + "$ref": "#/definitions/v1Time", + "description": "CreationTimestamp is a timestamp representing the server time when this object was\ncreated. It is not guaranteed to be set in happens-before order across separate operations.\nClients may not set this value. It is represented in RFC3339 form and is in UTC.\n\nPopulated by the system.\nRead-only.\nNull for lists.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\n+optional" + }, + "deletionTimestamp": { + "$ref": "#/definitions/v1Time", + "description": "DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This\nfield is set by the server when a graceful deletion is requested by the user, and is not\ndirectly settable by a client. The resource is expected to be deleted (no longer visible\nfrom resource lists, and not reachable by name) after the time in this field, once the\nfinalizers list is empty. As long as the finalizers list contains items, deletion is blocked.\nOnce the deletionTimestamp is set, this value may not be unset or be set further into the\nfuture, although it may be shortened or the resource may be deleted prior to this time.\nFor example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react\nby sending a graceful termination signal to the containers in the pod. After that 30 seconds,\nthe Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup,\nremove the pod from the API. In the presence of network partitions, this object may still\nexist after this timestamp, until an administrator or automated process can determine the\nresource is fully terminated.\nIf not set, graceful deletion of the object has not been requested.\n\nPopulated by the system when a graceful deletion is requested.\nRead-only.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\n+optional" + }, + "deletionGracePeriodSeconds": { + "type": "string", + "format": "int64", + "title": "Number of seconds allowed for this object to gracefully terminate before\nit will be removed from the system. Only set when deletionTimestamp is also set.\nMay only be shortened.\nRead-only.\n+optional" + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Map of string keys and values that can be used to organize and categorize\n(scope and select) objects. May match selectors of replication controllers\nand services.\nMore info: http://kubernetes.io/docs/user-guide/labels\n+optional" + }, + "annotations": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Annotations is an unstructured key value map stored with a resource that may be\nset by external tools to store and retrieve arbitrary metadata. They are not\nqueryable and should be preserved when modifying objects.\nMore info: http://kubernetes.io/docs/user-guide/annotations\n+optional" + }, + "ownerReferences": { + "type": "array", + "items": { + "$ref": "#/definitions/v1OwnerReference" + }, + "title": "List of objects depended by this object. If ALL objects in the list have\nbeen deleted, this object will be garbage collected. If this object is managed by a controller,\nthen an entry in this list will point to this controller, with the controller field set to true.\nThere cannot be more than one managing controller.\n+optional\n+patchMergeKey=uid\n+patchStrategy=merge" + }, + "finalizers": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Must be empty before the object is deleted from the registry. Each entry\nis an identifier for the responsible component that will remove the entry\nfrom the list. If the deletionTimestamp of the object is non-nil, entries\nin this list can only be removed.\nFinalizers may be processed and removed in any order. Order is NOT enforced\nbecause it introduces significant risk of stuck finalizers.\nfinalizers is a shared field, any actor with permission can reorder it.\nIf the finalizer list is processed in order, then this can lead to a situation\nin which the component responsible for the first finalizer in the list is\nwaiting for a signal (field value, external system, or other) produced by a\ncomponent responsible for a finalizer later in the list, resulting in a deadlock.\nWithout enforced ordering finalizers are free to order amongst themselves and\nare not vulnerable to ordering changes in the list.\n+optional\n+patchStrategy=merge" + }, + "clusterName": { + "type": "string", + "title": "The name of the cluster which the object belongs to.\nThis is used to distinguish resources with same name and namespace in different clusters.\nThis field is not set anywhere right now and apiserver is going to ignore it if set in create or update request.\n+optional" + }, + "managedFields": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ManagedFieldsEntry" + }, + "description": "ManagedFields maps workflow-id and version to the set of fields\nthat are managed by that workflow. This is mostly for internal\nhousekeeping, and users typically shouldn't need to set or\nunderstand this field. A workflow can be the user's name, a\ncontroller's name, or the name of a specific apply path like\n\"ci-cd\". The set of fields is always in the version that the\nworkflow used when modifying the object.\n\n+optional" + } + }, + "description": "ObjectMeta is metadata that all persisted resources must have, which includes all objects\nusers must create." + }, + "v1OwnerReference": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "description": "API version of the referent." + }, + "kind": { + "type": "string", + "title": "Kind of the referent.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" + }, + "name": { + "type": "string", + "title": "Name of the referent.\nMore info: http://kubernetes.io/docs/user-guide/identifiers#names" + }, + "uid": { + "type": "string", + "title": "UID of the referent.\nMore info: http://kubernetes.io/docs/user-guide/identifiers#uids" + }, + "controller": { + "type": "boolean", + "title": "If true, this reference points to the managing controller.\n+optional" + }, + "blockOwnerDeletion": { + "type": "boolean", + "title": "If true, AND if the owner has the \"foregroundDeletion\" finalizer, then\nthe owner cannot be deleted from the key-value store until this\nreference is removed.\nDefaults to false.\nTo set this field, a user needs \"delete\" permission of the owner,\notherwise 422 (Unprocessable Entity) will be returned.\n+optional" + } + }, + "description": "OwnerReference contains enough information to let you identify an owning\nobject. An owning object must be in the same namespace as the dependent, or\nbe cluster-scoped, so there is no namespace field." + }, + "v1PersistentVolumeClaimSpec": { + "type": "object", + "properties": { + "accessModes": { + "type": "array", + "items": { + "type": "string" + }, + "title": "AccessModes contains the desired access modes the volume should have.\nMore info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1\n+optional" + }, + "selector": { + "$ref": "#/definitions/v1LabelSelector", + "title": "A label query over volumes to consider for binding.\n+optional" + }, + "resources": { + "$ref": "#/definitions/corev1ResourceRequirements", + "title": "Resources represents the minimum resources the volume should have.\nMore info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources\n+optional" + }, + "volumeName": { + "type": "string", + "title": "VolumeName is the binding reference to the PersistentVolume backing this claim.\n+optional" + }, + "storageClassName": { + "type": "string", + "title": "Name of the StorageClass required by the claim.\nMore info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1\n+optional" + }, + "volumeMode": { + "type": "string", + "title": "volumeMode defines what type of volume is required by the claim.\nValue of Filesystem is implied when not included in claim spec.\n+optional" + }, + "dataSource": { + "$ref": "#/definitions/v1TypedLocalObjectReference", + "title": "This field can be used to specify either:\n* An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot)\n* An existing PVC (PersistentVolumeClaim)\n* An existing custom resource that implements data population (Alpha)\nIn order to use custom resource types that implement data population,\nthe AnyVolumeDataSource feature gate must be enabled.\nIf the provisioner or an external controller can support the specified data source,\nit will create a new volume based on the contents of the specified data source.\n+optional" + } + }, + "title": "PersistentVolumeClaimSpec describes the common attributes of storage devices\nand allows a Source for provider-specific attributes" + }, + "v1PersistentVolumeClaimTemplate": { + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta", + "description": "May contain labels and annotations that will be copied into the PVC\nwhen creating it. No other fields are allowed and will be rejected during\nvalidation.\n\n+optional" + }, + "spec": { + "$ref": "#/definitions/v1PersistentVolumeClaimSpec", + "description": "The specification for the PersistentVolumeClaim. The entire content is\ncopied unchanged into the PVC that gets created from this\ntemplate. The same fields as in a PersistentVolumeClaim\nare also valid here." + } + }, + "description": "PersistentVolumeClaimTemplate is used to produce\nPersistentVolumeClaim objects as part of an EphemeralVolumeSource." + }, + "v1PersistentVolumeClaimVolumeSource": { + "type": "object", + "properties": { + "claimName": { + "type": "string", + "title": "ClaimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume.\nMore info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims" + }, + "readOnly": { + "type": "boolean", + "title": "Will force the ReadOnly setting in VolumeMounts.\nDefault false.\n+optional" + } + }, + "description": "PersistentVolumeClaimVolumeSource references the user's PVC in the same namespace.\nThis volume finds the bound PV and mounts that volume for the pod. A\nPersistentVolumeClaimVolumeSource is, essentially, a wrapper around another\ntype of volume that is owned by someone else (the system)." + }, + "v1PhotonPersistentDiskVolumeSource": { + "type": "object", + "properties": { + "pdID": { + "type": "string", + "title": "ID that identifies Photon Controller persistent disk" + }, + "fsType": { + "type": "string", + "description": "Filesystem type to mount.\nMust be a filesystem type supported by the host operating system.\nEx. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified." + } + }, + "description": "Represents a Photon Controller persistent disk resource." + }, + "v1PodAffinity": { + "type": "object", + "properties": { + "requiredDuringSchedulingIgnoredDuringExecution": { + "type": "array", + "items": { + "$ref": "#/definitions/v1PodAffinityTerm" + }, + "title": "If the affinity requirements specified by this field are not met at\nscheduling time, the pod will not be scheduled onto the node.\nIf the affinity requirements specified by this field cease to be met\nat some point during pod execution (e.g. due to a pod label update), the\nsystem may or may not try to eventually evict the pod from its node.\nWhen there are multiple elements, the lists of nodes corresponding to each\npodAffinityTerm are intersected, i.e. all terms must be satisfied.\n+optional" + }, + "preferredDuringSchedulingIgnoredDuringExecution": { + "type": "array", + "items": { + "$ref": "#/definitions/v1WeightedPodAffinityTerm" + }, + "title": "The scheduler will prefer to schedule pods to nodes that satisfy\nthe affinity expressions specified by this field, but it may choose\na node that violates one or more of the expressions. The node that is\nmost preferred is the one with the greatest sum of weights, i.e.\nfor each node that meets all of the scheduling requirements (resource\nrequest, requiredDuringScheduling affinity expressions, etc.),\ncompute a sum by iterating through the elements of this field and adding\n\"weight\" to the sum if the node has pods which matches the corresponding podAffinityTerm; the\nnode(s) with the highest sum are the most preferred.\n+optional" + } + }, + "description": "Pod affinity is a group of inter pod affinity scheduling rules." + }, + "v1PodAffinityTerm": { + "type": "object", + "properties": { + "labelSelector": { + "$ref": "#/definitions/v1LabelSelector", + "title": "A label query over a set of resources, in this case pods.\n+optional" + }, + "namespaces": { + "type": "array", + "items": { + "type": "string" + }, + "title": "namespaces specifies which namespaces the labelSelector applies to (matches against);\nnull or empty list means \"this pod's namespace\"\n+optional" + }, + "topologyKey": { + "type": "string", + "description": "This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching\nthe labelSelector in the specified namespaces, where co-located is defined as running on a node\nwhose value of the label with key topologyKey matches that of any node on which any of the\nselected pods is running.\nEmpty topologyKey is not allowed." + } + }, + "title": "Defines a set of pods (namely those matching the labelSelector\nrelative to the given namespace(s)) that this pod should be\nco-located (affinity) or not co-located (anti-affinity) with,\nwhere co-located is defined as running on a node whose value of\nthe label with key \u003ctopologyKey\u003e matches that of any node on which\na pod of the set of pods is running" + }, + "v1PodAntiAffinity": { + "type": "object", + "properties": { + "requiredDuringSchedulingIgnoredDuringExecution": { + "type": "array", + "items": { + "$ref": "#/definitions/v1PodAffinityTerm" + }, + "title": "If the anti-affinity requirements specified by this field are not met at\nscheduling time, the pod will not be scheduled onto the node.\nIf the anti-affinity requirements specified by this field cease to be met\nat some point during pod execution (e.g. due to a pod label update), the\nsystem may or may not try to eventually evict the pod from its node.\nWhen there are multiple elements, the lists of nodes corresponding to each\npodAffinityTerm are intersected, i.e. all terms must be satisfied.\n+optional" + }, + "preferredDuringSchedulingIgnoredDuringExecution": { + "type": "array", + "items": { + "$ref": "#/definitions/v1WeightedPodAffinityTerm" + }, + "title": "The scheduler will prefer to schedule pods to nodes that satisfy\nthe anti-affinity expressions specified by this field, but it may choose\na node that violates one or more of the expressions. The node that is\nmost preferred is the one with the greatest sum of weights, i.e.\nfor each node that meets all of the scheduling requirements (resource\nrequest, requiredDuringScheduling anti-affinity expressions, etc.),\ncompute a sum by iterating through the elements of this field and adding\n\"weight\" to the sum if the node has pods which matches the corresponding podAffinityTerm; the\nnode(s) with the highest sum are the most preferred.\n+optional" + } + }, + "description": "Pod anti affinity is a group of inter pod anti affinity scheduling rules." + }, + "v1PodDNSConfig": { + "type": "object", + "properties": { + "nameservers": { + "type": "array", + "items": { + "type": "string" + }, + "title": "A list of DNS name server IP addresses.\nThis will be appended to the base nameservers generated from DNSPolicy.\nDuplicated nameservers will be removed.\n+optional" + }, + "searches": { + "type": "array", + "items": { + "type": "string" + }, + "title": "A list of DNS search domains for host-name lookup.\nThis will be appended to the base search paths generated from DNSPolicy.\nDuplicated search paths will be removed.\n+optional" + }, + "options": { + "type": "array", + "items": { + "$ref": "#/definitions/v1PodDNSConfigOption" + }, + "title": "A list of DNS resolver options.\nThis will be merged with the base options generated from DNSPolicy.\nDuplicated entries will be removed. Resolution options given in Options\nwill override those that appear in the base DNSPolicy.\n+optional" + } + }, + "description": "PodDNSConfig defines the DNS parameters of a pod in addition to\nthose generated from DNSPolicy." + }, + "v1PodDNSConfigOption": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Required." + }, + "value": { + "type": "string", + "title": "+optional" + } + }, + "description": "PodDNSConfigOption defines DNS resolver options of a pod." + }, + "v1PodReadinessGate": { + "type": "object", + "properties": { + "conditionType": { + "type": "string", + "description": "ConditionType refers to a condition in the pod's condition list with matching type." + } + }, + "title": "PodReadinessGate contains the reference to a pod condition" + }, + "v1PodSecurityContext": { + "type": "object", + "properties": { + "seLinuxOptions": { + "$ref": "#/definitions/v1SELinuxOptions", + "title": "The SELinux context to be applied to all containers.\nIf unspecified, the container runtime will allocate a random SELinux context for each\ncontainer. May also be set in SecurityContext. If set in\nboth SecurityContext and PodSecurityContext, the value specified in SecurityContext\ntakes precedence for that container.\n+optional" + }, + "windowsOptions": { + "$ref": "#/definitions/v1WindowsSecurityContextOptions", + "title": "The Windows specific settings applied to all containers.\nIf unspecified, the options within a container's SecurityContext will be used.\nIf set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.\n+optional" + }, + "runAsUser": { + "type": "string", + "format": "int64", + "title": "The UID to run the entrypoint of the container process.\nDefaults to user specified in image metadata if unspecified.\nMay also be set in SecurityContext. If set in both SecurityContext and\nPodSecurityContext, the value specified in SecurityContext takes precedence\nfor that container.\n+optional" + }, + "runAsGroup": { + "type": "string", + "format": "int64", + "title": "The GID to run the entrypoint of the container process.\nUses runtime default if unset.\nMay also be set in SecurityContext. If set in both SecurityContext and\nPodSecurityContext, the value specified in SecurityContext takes precedence\nfor that container.\n+optional" + }, + "runAsNonRoot": { + "type": "boolean", + "title": "Indicates that the container must run as a non-root user.\nIf true, the Kubelet will validate the image at runtime to ensure that it\ndoes not run as UID 0 (root) and fail to start the container if it does.\nIf unset or false, no such validation will be performed.\nMay also be set in SecurityContext. If set in both SecurityContext and\nPodSecurityContext, the value specified in SecurityContext takes precedence.\n+optional" + }, + "supplementalGroups": { + "type": "array", + "items": { + "type": "string", + "format": "int64" + }, + "title": "A list of groups applied to the first process run in each container, in addition\nto the container's primary GID. If unspecified, no groups will be added to\nany container.\n+optional" + }, + "fsGroup": { + "type": "string", + "format": "int64", + "description": "1. The owning GID will be the FSGroup\n2. The setgid bit is set (new files created in the volume will be owned by FSGroup)\n3. The permission bits are OR'd with rw-rw----\n\nIf unset, the Kubelet will not modify the ownership and permissions of any volume.\n+optional", + "title": "A special supplemental group that applies to all containers in a pod.\nSome volume types allow the Kubelet to change the ownership of that volume\nto be owned by the pod:" + }, + "sysctls": { + "type": "array", + "items": { + "$ref": "#/definitions/v1Sysctl" + }, + "title": "Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported\nsysctls (by the container runtime) might fail to launch.\n+optional" + }, + "fsGroupChangePolicy": { + "type": "string", + "title": "fsGroupChangePolicy defines behavior of changing ownership and permission of the volume\nbefore being exposed inside Pod. This field will only apply to\nvolume types which support fsGroup based ownership(and permissions).\nIt will have no effect on ephemeral volume types such as: secret, configmaps\nand emptydir.\nValid values are \"OnRootMismatch\" and \"Always\". If not specified, \"Always\" is used.\n+optional" + }, + "seccompProfile": { + "$ref": "#/definitions/v1SeccompProfile", + "title": "The seccomp options to use by the containers in this pod.\n+optional" + } + }, + "description": "PodSecurityContext holds pod-level security attributes and common container settings.\nSome fields are also present in container.securityContext. Field values of\ncontainer.securityContext take precedence over field values of PodSecurityContext." + }, + "v1PodSpec": { + "type": "object", + "properties": { + "volumes": { + "type": "array", + "items": { + "$ref": "#/definitions/v1Volume" + }, + "title": "List of volumes that can be mounted by containers belonging to the pod.\nMore info: https://kubernetes.io/docs/concepts/storage/volumes\n+optional\n+patchMergeKey=name\n+patchStrategy=merge,retainKeys" + }, + "initContainers": { + "type": "array", + "items": { + "$ref": "#/definitions/v1Container" + }, + "title": "List of initialization containers belonging to the pod.\nInit containers are executed in order prior to containers being started. If any\ninit container fails, the pod is considered to have failed and is handled according\nto its restartPolicy. The name for an init container or normal container must be\nunique among all containers.\nInit containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes.\nThe resourceRequirements of an init container are taken into account during scheduling\nby finding the highest request/limit for each resource type, and then using the max of\nof that value or the sum of the normal containers. Limits are applied to init containers\nin a similar fashion.\nInit containers cannot currently be added or removed.\nCannot be updated.\nMore info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/\n+patchMergeKey=name\n+patchStrategy=merge" + }, + "containers": { + "type": "array", + "items": { + "$ref": "#/definitions/v1Container" + }, + "title": "List of containers belonging to the pod.\nContainers cannot currently be added or removed.\nThere must be at least one container in a Pod.\nCannot be updated.\n+patchMergeKey=name\n+patchStrategy=merge" + }, + "ephemeralContainers": { + "type": "array", + "items": { + "$ref": "#/definitions/v1EphemeralContainer" + }, + "title": "List of ephemeral containers run in this pod. Ephemeral containers may be run in an existing\npod to perform user-initiated actions such as debugging. This list cannot be specified when\ncreating a pod, and it cannot be modified by updating the pod spec. In order to add an\nephemeral container to an existing pod, use the pod's ephemeralcontainers subresource.\nThis field is alpha-level and is only honored by servers that enable the EphemeralContainers feature.\n+optional\n+patchMergeKey=name\n+patchStrategy=merge" + }, + "restartPolicy": { + "type": "string", + "title": "Restart policy for all containers within the pod.\nOne of Always, OnFailure, Never.\nDefault to Always.\nMore info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy\n+optional" + }, + "terminationGracePeriodSeconds": { + "type": "string", + "format": "int64", + "title": "Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request.\nValue must be non-negative integer. The value zero indicates delete immediately.\nIf this value is nil, the default grace period will be used instead.\nThe grace period is the duration in seconds after the processes running in the pod are sent\na termination signal and the time when the processes are forcibly halted with a kill signal.\nSet this value longer than the expected cleanup time for your process.\nDefaults to 30 seconds.\n+optional" + }, + "activeDeadlineSeconds": { + "type": "string", + "format": "int64", + "title": "Optional duration in seconds the pod may be active on the node relative to\nStartTime before the system will actively try to mark it failed and kill associated containers.\nValue must be a positive integer.\n+optional" + }, + "dnsPolicy": { + "type": "string", + "title": "Set DNS policy for the pod.\nDefaults to \"ClusterFirst\".\nValid values are 'ClusterFirstWithHostNet', 'ClusterFirst', 'Default' or 'None'.\nDNS parameters given in DNSConfig will be merged with the policy selected with DNSPolicy.\nTo have DNS options set along with hostNetwork, you have to specify DNS policy\nexplicitly to 'ClusterFirstWithHostNet'.\n+optional" + }, + "nodeSelector": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "NodeSelector is a selector which must be true for the pod to fit on a node.\nSelector which must match a node's labels for the pod to be scheduled on that node.\nMore info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/\n+optional" + }, + "serviceAccountName": { + "type": "string", + "title": "ServiceAccountName is the name of the ServiceAccount to use to run this pod.\nMore info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/\n+optional" + }, + "serviceAccount": { + "type": "string", + "title": "DeprecatedServiceAccount is a depreciated alias for ServiceAccountName.\nDeprecated: Use serviceAccountName instead.\n+k8s:conversion-gen=false\n+optional" + }, + "automountServiceAccountToken": { + "type": "boolean", + "title": "AutomountServiceAccountToken indicates whether a service account token should be automatically mounted.\n+optional" + }, + "nodeName": { + "type": "string", + "title": "NodeName is a request to schedule this pod onto a specific node. If it is non-empty,\nthe scheduler simply schedules this pod onto that node, assuming that it fits resource\nrequirements.\n+optional" + }, + "hostNetwork": { + "type": "boolean", + "title": "Host networking requested for this pod. Use the host's network namespace.\nIf this option is set, the ports that will be used must be specified.\nDefault to false.\n+k8s:conversion-gen=false\n+optional" + }, + "hostPID": { + "type": "boolean", + "title": "Use the host's pid namespace.\nOptional: Default to false.\n+k8s:conversion-gen=false\n+optional" + }, + "hostIPC": { + "type": "boolean", + "title": "Use the host's ipc namespace.\nOptional: Default to false.\n+k8s:conversion-gen=false\n+optional" + }, + "shareProcessNamespace": { + "type": "boolean", + "title": "Share a single process namespace between all of the containers in a pod.\nWhen this is set containers will be able to view and signal processes from other containers\nin the same pod, and the first process in each container will not be assigned PID 1.\nHostPID and ShareProcessNamespace cannot both be set.\nOptional: Default to false.\n+k8s:conversion-gen=false\n+optional" + }, + "securityContext": { + "$ref": "#/definitions/v1PodSecurityContext", + "title": "SecurityContext holds pod-level security attributes and common container settings.\nOptional: Defaults to empty. See type description for default values of each field.\n+optional" + }, + "imagePullSecrets": { + "type": "array", + "items": { + "$ref": "#/definitions/v1LocalObjectReference" + }, + "title": "ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec.\nIf specified, these secrets will be passed to individual puller implementations for them to use. For example,\nin the case of docker, only DockerConfig type secrets are honored.\nMore info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod\n+optional\n+patchMergeKey=name\n+patchStrategy=merge" + }, + "hostname": { + "type": "string", + "title": "Specifies the hostname of the Pod\nIf not specified, the pod's hostname will be set to a system-defined value.\n+optional" + }, + "subdomain": { + "type": "string", + "title": "If specified, the fully qualified Pod hostname will be \"\u003chostname\u003e.\u003csubdomain\u003e.\u003cpod namespace\u003e.svc.\u003ccluster domain\u003e\".\nIf not specified, the pod will not have a domainname at all.\n+optional" + }, + "affinity": { + "$ref": "#/definitions/v1Affinity", + "title": "If specified, the pod's scheduling constraints\n+optional" + }, + "schedulerName": { + "type": "string", + "title": "If specified, the pod will be dispatched by specified scheduler.\nIf not specified, the pod will be dispatched by default scheduler.\n+optional" + }, + "tolerations": { + "type": "array", + "items": { + "$ref": "#/definitions/v1Toleration" + }, + "title": "If specified, the pod's tolerations.\n+optional" + }, + "hostAliases": { + "type": "array", + "items": { + "$ref": "#/definitions/v1HostAlias" + }, + "title": "HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts\nfile if specified. This is only valid for non-hostNetwork pods.\n+optional\n+patchMergeKey=ip\n+patchStrategy=merge" + }, + "priorityClassName": { + "type": "string", + "title": "If specified, indicates the pod's priority. \"system-node-critical\" and\n\"system-cluster-critical\" are two special keywords which indicate the\nhighest priorities with the former being the highest priority. Any other\nname must be defined by creating a PriorityClass object with that name.\nIf not specified, the pod priority will be default or zero if there is no\ndefault.\n+optional" + }, + "priority": { + "type": "integer", + "format": "int32", + "title": "The priority value. Various system components use this field to find the\npriority of the pod. When Priority Admission Controller is enabled, it\nprevents users from setting this field. The admission controller populates\nthis field from PriorityClassName.\nThe higher the value, the higher the priority.\n+optional" + }, + "dnsConfig": { + "$ref": "#/definitions/v1PodDNSConfig", + "title": "Specifies the DNS parameters of a pod.\nParameters specified here will be merged to the generated DNS\nconfiguration based on DNSPolicy.\n+optional" + }, + "readinessGates": { + "type": "array", + "items": { + "$ref": "#/definitions/v1PodReadinessGate" + }, + "title": "If specified, all readiness gates will be evaluated for pod readiness.\nA pod is ready when all its containers are ready AND\nall conditions specified in the readiness gates have status equal to \"True\"\nMore info: https://git.k8s.io/enhancements/keps/sig-network/0007-pod-ready%2B%2B.md\n+optional" + }, + "runtimeClassName": { + "type": "string", + "title": "RuntimeClassName refers to a RuntimeClass object in the node.k8s.io group, which should be used\nto run this pod. If no RuntimeClass resource matches the named class, the pod will not be run.\nIf unset or empty, the \"legacy\" RuntimeClass will be used, which is an implicit class with an\nempty definition that uses the default runtime handler.\nMore info: https://git.k8s.io/enhancements/keps/sig-node/runtime-class.md\nThis is a beta feature as of Kubernetes v1.14.\n+optional" + }, + "enableServiceLinks": { + "type": "boolean", + "title": "EnableServiceLinks indicates whether information about services should be injected into pod's\nenvironment variables, matching the syntax of Docker links.\nOptional: Defaults to true.\n+optional" + }, + "preemptionPolicy": { + "type": "string", + "title": "PreemptionPolicy is the Policy for preempting pods with lower priority.\nOne of Never, PreemptLowerPriority.\nDefaults to PreemptLowerPriority if unset.\nThis field is beta-level, gated by the NonPreemptingPriority feature-gate.\n+optional" + }, + "overhead": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/resourceQuantity" + }, + "title": "Overhead represents the resource overhead associated with running a pod for a given RuntimeClass.\nThis field will be autopopulated at admission time by the RuntimeClass admission controller. If\nthe RuntimeClass admission controller is enabled, overhead must not be set in Pod create requests.\nThe RuntimeClass admission controller will reject Pod create requests which have the overhead already\nset. If RuntimeClass is configured and selected in the PodSpec, Overhead will be set to the value\ndefined in the corresponding RuntimeClass, otherwise it will remain unset and treated as zero.\nMore info: https://git.k8s.io/enhancements/keps/sig-node/20190226-pod-overhead.md\nThis field is alpha-level as of Kubernetes v1.16, and is only honored by servers that enable the PodOverhead feature.\n+optional" + }, + "topologySpreadConstraints": { + "type": "array", + "items": { + "$ref": "#/definitions/v1TopologySpreadConstraint" + }, + "title": "TopologySpreadConstraints describes how a group of pods ought to spread across topology\ndomains. Scheduler will schedule pods in a way which abides by the constraints.\nAll topologySpreadConstraints are ANDed.\n+optional\n+patchMergeKey=topologyKey\n+patchStrategy=merge\n+listType=map\n+listMapKey=topologyKey\n+listMapKey=whenUnsatisfiable" + }, + "setHostnameAsFQDN": { + "type": "boolean", + "title": "If true the pod's hostname will be configured as the pod's FQDN, rather than the leaf name (the default).\nIn Linux containers, this means setting the FQDN in the hostname field of the kernel (the nodename field of struct utsname).\nIn Windows containers, this means setting the registry value of hostname for the registry key HKEY_LOCAL_MACHINE\\\\SYSTEM\\\\CurrentControlSet\\\\Services\\\\Tcpip\\\\Parameters to FQDN.\nIf a pod does not have FQDN, this has no effect.\nDefault to false.\n+optional" + } + }, + "description": "PodSpec is a description of a pod." + }, + "v1PodTemplateSpec": { + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta", + "title": "Standard object's metadata.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\n+optional" + }, + "spec": { + "$ref": "#/definitions/v1PodSpec", + "title": "Specification of the desired behavior of the pod.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status\n+optional" + } + }, + "title": "PodTemplateSpec describes the data a pod should have when created from a template" + }, + "v1PortworxVolumeSource": { + "type": "object", + "properties": { + "volumeID": { + "type": "string", + "title": "VolumeID uniquely identifies a Portworx volume" + }, + "fsType": { + "type": "string", + "description": "FSType represents the filesystem type to mount\nMust be a filesystem type supported by the host operating system.\nEx. \"ext4\", \"xfs\". Implicitly inferred to be \"ext4\" if unspecified." + }, + "readOnly": { + "type": "boolean", + "title": "Defaults to false (read/write). ReadOnly here will force\nthe ReadOnly setting in VolumeMounts.\n+optional" + } + }, + "description": "PortworxVolumeSource represents a Portworx volume resource." + }, + "v1PreferredSchedulingTerm": { + "type": "object", + "properties": { + "weight": { + "type": "integer", + "format": "int32", + "description": "Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100." + }, + "preference": { + "$ref": "#/definitions/v1NodeSelectorTerm", + "description": "A node selector term, associated with the corresponding weight." + } + }, + "description": "An empty preferred scheduling term matches all objects with implicit weight 0\n(i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op)." + }, + "v1Probe": { + "type": "object", + "properties": { + "handler": { + "$ref": "#/definitions/v1Handler", + "title": "The action taken to determine the health of a container" + }, + "initialDelaySeconds": { + "type": "integer", + "format": "int32", + "title": "Number of seconds after the container has started before liveness probes are initiated.\nMore info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes\n+optional" + }, + "timeoutSeconds": { + "type": "integer", + "format": "int32", + "title": "Number of seconds after which the probe times out.\nDefaults to 1 second. Minimum value is 1.\nMore info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes\n+optional" + }, + "periodSeconds": { + "type": "integer", + "format": "int32", + "title": "How often (in seconds) to perform the probe.\nDefault to 10 seconds. Minimum value is 1.\n+optional" + }, + "successThreshold": { + "type": "integer", + "format": "int32", + "title": "Minimum consecutive successes for the probe to be considered successful after having failed.\nDefaults to 1. Must be 1 for liveness and startup. Minimum value is 1.\n+optional" + }, + "failureThreshold": { + "type": "integer", + "format": "int32", + "title": "Minimum consecutive failures for the probe to be considered failed after having succeeded.\nDefaults to 3. Minimum value is 1.\n+optional" + } + }, + "description": "Probe describes a health check to be performed against a container to determine whether it is\nalive or ready to receive traffic." + }, + "v1ProjectedVolumeSource": { + "type": "object", + "properties": { + "sources": { + "type": "array", + "items": { + "$ref": "#/definitions/v1VolumeProjection" + }, + "title": "list of volume projections\n+optional" + }, + "defaultMode": { + "type": "integer", + "format": "int32", + "title": "Mode bits used to set permissions on created files by default.\nMust be an octal value between 0000 and 0777 or a decimal value between 0 and 511.\nYAML accepts both octal and decimal values, JSON requires decimal values for mode bits.\nDirectories within the path are not affected by this setting.\nThis might be in conflict with other options that affect the file\nmode, like fsGroup, and the result can be other mode bits set.\n+optional" + } + }, + "title": "Represents a projected volume source" + }, + "v1QuobyteVolumeSource": { + "type": "object", + "properties": { + "registry": { + "type": "string", + "title": "Registry represents a single or multiple Quobyte Registry services\nspecified as a string as host:port pair (multiple entries are separated with commas)\nwhich acts as the central registry for volumes" + }, + "volume": { + "type": "string", + "description": "Volume is a string that references an already created Quobyte volume by name." + }, + "readOnly": { + "type": "boolean", + "title": "ReadOnly here will force the Quobyte volume to be mounted with read-only permissions.\nDefaults to false.\n+optional" + }, + "user": { + "type": "string", + "title": "User to map volume access to\nDefaults to serivceaccount user\n+optional" + }, + "group": { + "type": "string", + "title": "Group to map volume access to\nDefault is no group\n+optional" + }, + "tenant": { + "type": "string", + "title": "Tenant owning the given Quobyte volume in the Backend\nUsed with dynamically provisioned Quobyte volumes, value is set by the plugin\n+optional" + } + }, + "description": "Represents a Quobyte mount that lasts the lifetime of a pod.\nQuobyte volumes do not support ownership management or SELinux relabeling." + }, + "v1RBDVolumeSource": { + "type": "object", + "properties": { + "monitors": { + "type": "array", + "items": { + "type": "string" + }, + "title": "A collection of Ceph monitors.\nMore info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it" + }, + "image": { + "type": "string", + "title": "The rados image name.\nMore info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it" + }, + "fsType": { + "type": "string", + "title": "Filesystem type of the volume that you want to mount.\nTip: Ensure that the filesystem type is supported by the host operating system.\nExamples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.\nMore info: https://kubernetes.io/docs/concepts/storage/volumes#rbd\nTODO: how do we prevent errors in the filesystem from compromising the machine\n+optional" + }, + "pool": { + "type": "string", + "title": "The rados pool name.\nDefault is rbd.\nMore info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it\n+optional" + }, + "user": { + "type": "string", + "title": "The rados user name.\nDefault is admin.\nMore info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it\n+optional" + }, + "keyring": { + "type": "string", + "title": "Keyring is the path to key ring for RBDUser.\nDefault is /etc/ceph/keyring.\nMore info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it\n+optional" + }, + "secretRef": { + "$ref": "#/definitions/v1LocalObjectReference", + "title": "SecretRef is name of the authentication secret for RBDUser. If provided\noverrides keyring.\nDefault is nil.\nMore info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it\n+optional" + }, + "readOnly": { + "type": "boolean", + "title": "ReadOnly here will force the ReadOnly setting in VolumeMounts.\nDefaults to false.\nMore info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it\n+optional" + } + }, + "description": "Represents a Rados Block Device mount that lasts the lifetime of a pod.\nRBD volumes support ownership management and SELinux relabeling." + }, + "v1ResourceFieldSelector": { + "type": "object", + "properties": { + "containerName": { + "type": "string", + "title": "Container name: required for volumes, optional for env vars\n+optional" + }, + "resource": { + "type": "string", + "title": "Required: resource to select" + }, + "divisor": { + "$ref": "#/definitions/resourceQuantity", + "title": "Specifies the output format of the exposed resources, defaults to \"1\"\n+optional" + } + }, + "title": "ResourceFieldSelector represents container resources (cpu, memory) and their output format" + }, + "v1SELinuxOptions": { + "type": "object", + "properties": { + "user": { + "type": "string", + "title": "User is a SELinux user label that applies to the container.\n+optional" + }, + "role": { + "type": "string", + "title": "Role is a SELinux role label that applies to the container.\n+optional" + }, + "type": { + "type": "string", + "title": "Type is a SELinux type label that applies to the container.\n+optional" + }, + "level": { + "type": "string", + "title": "Level is SELinux level label that applies to the container.\n+optional" + } + }, + "title": "SELinuxOptions are the labels to be applied to the container" + }, + "v1ScaleIOVolumeSource": { + "type": "object", + "properties": { + "gateway": { + "type": "string", + "description": "The host address of the ScaleIO API Gateway." + }, + "system": { + "type": "string", + "description": "The name of the storage system as configured in ScaleIO." + }, + "secretRef": { + "$ref": "#/definitions/v1LocalObjectReference", + "description": "SecretRef references to the secret for ScaleIO user and other\nsensitive information. If this is not provided, Login operation will fail." + }, + "sslEnabled": { + "type": "boolean", + "title": "Flag to enable/disable SSL communication with Gateway, default false\n+optional" + }, + "protectionDomain": { + "type": "string", + "title": "The name of the ScaleIO Protection Domain for the configured storage.\n+optional" + }, + "storagePool": { + "type": "string", + "title": "The ScaleIO Storage Pool associated with the protection domain.\n+optional" + }, + "storageMode": { + "type": "string", + "title": "Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned.\nDefault is ThinProvisioned.\n+optional" + }, + "volumeName": { + "type": "string", + "description": "The name of a volume already created in the ScaleIO system\nthat is associated with this volume source." + }, + "fsType": { + "type": "string", + "title": "Filesystem type to mount.\nMust be a filesystem type supported by the host operating system.\nEx. \"ext4\", \"xfs\", \"ntfs\".\nDefault is \"xfs\".\n+optional" + }, + "readOnly": { + "type": "boolean", + "title": "Defaults to false (read/write). ReadOnly here will force\nthe ReadOnly setting in VolumeMounts.\n+optional" + } + }, + "title": "ScaleIOVolumeSource represents a persistent ScaleIO volume" + }, + "v1SeccompProfile": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Localhost - a profile defined in a file on the node should be used.\nRuntimeDefault - the container runtime default profile should be used.\nUnconfined - no profile should be applied.\n+unionDiscriminator", + "title": "type indicates which kind of seccomp profile will be applied.\nValid options are:" + }, + "localhostProfile": { + "type": "string", + "title": "localhostProfile indicates a profile defined in a file on the node should be used.\nThe profile must be preconfigured on the node to work.\nMust be a descending path, relative to the kubelet's configured seccomp profile location.\nMust only be set if type is \"Localhost\".\n+optional" + } + }, + "title": "SeccompProfile defines a pod/container's seccomp profile settings.\nOnly one profile source may be set.\n+union" + }, + "v1SecretEnvSource": { + "type": "object", + "properties": { + "localObjectReference": { + "$ref": "#/definitions/v1LocalObjectReference", + "description": "The Secret to select from." + }, + "optional": { + "type": "boolean", + "title": "Specify whether the Secret must be defined\n+optional" + } + }, + "description": "SecretEnvSource selects a Secret to populate the environment\nvariables with.\n\nThe contents of the target Secret's Data field will represent the\nkey-value pairs as environment variables." + }, + "v1SecretKeySelector": { + "type": "object", + "properties": { + "localObjectReference": { + "$ref": "#/definitions/v1LocalObjectReference", + "description": "The name of the secret in the pod's namespace to select from." + }, + "key": { + "type": "string", + "description": "The key of the secret to select from. Must be a valid secret key." + }, + "optional": { + "type": "boolean", + "title": "Specify whether the Secret or its key must be defined\n+optional" + } + }, + "description": "SecretKeySelector selects a key of a Secret." + }, + "v1SecretProjection": { + "type": "object", + "properties": { + "localObjectReference": { + "$ref": "#/definitions/v1LocalObjectReference" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/v1KeyToPath" + }, + "title": "If unspecified, each key-value pair in the Data field of the referenced\nSecret will be projected into the volume as a file whose name is the\nkey and content is the value. If specified, the listed keys will be\nprojected into the specified paths, and unlisted keys will not be\npresent. If a key is specified which is not present in the Secret,\nthe volume setup will error unless it is marked optional. Paths must be\nrelative and may not contain the '..' path or start with '..'.\n+optional" + }, + "optional": { + "type": "boolean", + "title": "Specify whether the Secret or its key must be defined\n+optional" + } + }, + "description": "Adapts a secret into a projected volume.\n\nThe contents of the target Secret's Data field will be presented in a\nprojected volume as files using the keys in the Data field as the file names.\nNote that this is identical to a secret volume source without the default\nmode." + }, + "v1SecretVolumeSource": { + "type": "object", + "properties": { + "secretName": { + "type": "string", + "title": "Name of the secret in the pod's namespace to use.\nMore info: https://kubernetes.io/docs/concepts/storage/volumes#secret\n+optional" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/v1KeyToPath" + }, + "title": "If unspecified, each key-value pair in the Data field of the referenced\nSecret will be projected into the volume as a file whose name is the\nkey and content is the value. If specified, the listed keys will be\nprojected into the specified paths, and unlisted keys will not be\npresent. If a key is specified which is not present in the Secret,\nthe volume setup will error unless it is marked optional. Paths must be\nrelative and may not contain the '..' path or start with '..'.\n+optional" + }, + "defaultMode": { + "type": "integer", + "format": "int32", + "title": "Optional: mode bits used to set permissions on created files by default.\nMust be an octal value between 0000 and 0777 or a decimal value between 0 and 511.\nYAML accepts both octal and decimal values, JSON requires decimal values\nfor mode bits. Defaults to 0644.\nDirectories within the path are not affected by this setting.\nThis might be in conflict with other options that affect the file\nmode, like fsGroup, and the result can be other mode bits set.\n+optional" + }, + "optional": { + "type": "boolean", + "title": "Specify whether the Secret or its keys must be defined\n+optional" + } + }, + "description": "Adapts a Secret into a volume.\n\nThe contents of the target Secret's Data field will be presented in a volume\nas files using the keys in the Data field as the file names.\nSecret volumes support ownership management and SELinux relabeling." + }, + "v1SecurityContext": { + "type": "object", + "properties": { + "capabilities": { + "$ref": "#/definitions/v1Capabilities", + "title": "The capabilities to add/drop when running containers.\nDefaults to the default set of capabilities granted by the container runtime.\n+optional" + }, + "privileged": { + "type": "boolean", + "title": "Run container in privileged mode.\nProcesses in privileged containers are essentially equivalent to root on the host.\nDefaults to false.\n+optional" + }, + "seLinuxOptions": { + "$ref": "#/definitions/v1SELinuxOptions", + "title": "The SELinux context to be applied to the container.\nIf unspecified, the container runtime will allocate a random SELinux context for each\ncontainer. May also be set in PodSecurityContext. If set in both SecurityContext and\nPodSecurityContext, the value specified in SecurityContext takes precedence.\n+optional" + }, + "windowsOptions": { + "$ref": "#/definitions/v1WindowsSecurityContextOptions", + "title": "The Windows specific settings applied to all containers.\nIf unspecified, the options from the PodSecurityContext will be used.\nIf set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.\n+optional" + }, + "runAsUser": { + "type": "string", + "format": "int64", + "title": "The UID to run the entrypoint of the container process.\nDefaults to user specified in image metadata if unspecified.\nMay also be set in PodSecurityContext. If set in both SecurityContext and\nPodSecurityContext, the value specified in SecurityContext takes precedence.\n+optional" + }, + "runAsGroup": { + "type": "string", + "format": "int64", + "title": "The GID to run the entrypoint of the container process.\nUses runtime default if unset.\nMay also be set in PodSecurityContext. If set in both SecurityContext and\nPodSecurityContext, the value specified in SecurityContext takes precedence.\n+optional" + }, + "runAsNonRoot": { + "type": "boolean", + "title": "Indicates that the container must run as a non-root user.\nIf true, the Kubelet will validate the image at runtime to ensure that it\ndoes not run as UID 0 (root) and fail to start the container if it does.\nIf unset or false, no such validation will be performed.\nMay also be set in PodSecurityContext. If set in both SecurityContext and\nPodSecurityContext, the value specified in SecurityContext takes precedence.\n+optional" + }, + "readOnlyRootFilesystem": { + "type": "boolean", + "title": "Whether this container has a read-only root filesystem.\nDefault is false.\n+optional" + }, + "allowPrivilegeEscalation": { + "type": "boolean", + "title": "AllowPrivilegeEscalation controls whether a process can gain more\nprivileges than its parent process. This bool directly controls if\nthe no_new_privs flag will be set on the container process.\nAllowPrivilegeEscalation is true always when the container is:\n1) run as Privileged\n2) has CAP_SYS_ADMIN\n+optional" + }, + "procMount": { + "type": "string", + "title": "procMount denotes the type of proc mount to use for the containers.\nThe default is DefaultProcMount which uses the container runtime defaults for\nreadonly paths and masked paths.\nThis requires the ProcMountType feature flag to be enabled.\n+optional" + }, + "seccompProfile": { + "$ref": "#/definitions/v1SeccompProfile", + "title": "The seccomp options to use by this container. If seccomp options are\nprovided at both the pod \u0026 container level, the container options\noverride the pod options.\n+optional" + } + }, + "description": "SecurityContext holds security configuration that will be applied to a container.\nSome fields are present in both SecurityContext and PodSecurityContext. When both\nare set, the values in SecurityContext take precedence." + }, + "v1ServiceAccountTokenProjection": { + "type": "object", + "properties": { + "audience": { + "type": "string", + "title": "Audience is the intended audience of the token. A recipient of a token\nmust identify itself with an identifier specified in the audience of the\ntoken, and otherwise should reject the token. The audience defaults to the\nidentifier of the apiserver.\n+optional" + }, + "expirationSeconds": { + "type": "string", + "format": "int64", + "title": "ExpirationSeconds is the requested duration of validity of the service\naccount token. As the token approaches expiration, the kubelet volume\nplugin will proactively rotate the service account token. The kubelet will\nstart trying to rotate the token if the token is older than 80 percent of\nits time to live or if the token is older than 24 hours.Defaults to 1 hour\nand must be at least 10 minutes.\n+optional" + }, + "path": { + "type": "string", + "description": "Path is the path relative to the mount point of the file to project the\ntoken into." + } + }, + "description": "ServiceAccountTokenProjection represents a projected service account token\nvolume. This projection can be used to insert a service account token into\nthe pods runtime filesystem for use against APIs (Kubernetes API Server or\notherwise)." + }, + "v1StorageOSVolumeSource": { + "type": "object", + "properties": { + "volumeName": { + "type": "string", + "description": "VolumeName is the human-readable name of the StorageOS volume. Volume\nnames are only unique within a namespace." + }, + "volumeNamespace": { + "type": "string", + "title": "VolumeNamespace specifies the scope of the volume within StorageOS. If no\nnamespace is specified then the Pod's namespace will be used. This allows the\nKubernetes name scoping to be mirrored within StorageOS for tighter integration.\nSet VolumeName to any name to override the default behaviour.\nSet to \"default\" if you are not using namespaces within StorageOS.\nNamespaces that do not pre-exist within StorageOS will be created.\n+optional" + }, + "fsType": { + "type": "string", + "title": "Filesystem type to mount.\nMust be a filesystem type supported by the host operating system.\nEx. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.\n+optional" + }, + "readOnly": { + "type": "boolean", + "title": "Defaults to false (read/write). ReadOnly here will force\nthe ReadOnly setting in VolumeMounts.\n+optional" + }, + "secretRef": { + "$ref": "#/definitions/v1LocalObjectReference", + "title": "SecretRef specifies the secret to use for obtaining the StorageOS API\ncredentials. If not specified, default values will be attempted.\n+optional" + } + }, + "description": "Represents a StorageOS persistent volume resource." + }, + "v1Sysctl": { + "type": "object", + "properties": { + "name": { + "type": "string", + "title": "Name of a property to set" + }, + "value": { + "type": "string", + "title": "Value of a property to set" + } + }, + "title": "Sysctl defines a kernel parameter to be set" + }, + "v1TCPSocketAction": { + "type": "object", + "properties": { + "port": { + "$ref": "#/definitions/intstrIntOrString", + "description": "Number or name of the port to access on the container.\nNumber must be in the range 1 to 65535.\nName must be an IANA_SVC_NAME." + }, + "host": { + "type": "string", + "title": "Optional: Host name to connect to, defaults to the pod IP.\n+optional" + } + }, + "title": "TCPSocketAction describes an action based on opening a socket" + }, + "v1Time": { + "type": "object", + "properties": { + "seconds": { + "type": "string", + "format": "int64", + "description": "Represents seconds of UTC time since Unix epoch\n1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to\n9999-12-31T23:59:59Z inclusive." + }, + "nanos": { + "type": "integer", + "format": "int32", + "description": "Non-negative fractions of a second at nanosecond resolution. Negative\nsecond values with fractions must still have non-negative nanos values\nthat count forward in time. Must be from 0 to 999,999,999\ninclusive. This field may be limited in precision depending on context." + } + }, + "description": "Time is a wrapper around time.Time which supports correct\nmarshaling to YAML and JSON. Wrappers are provided for many\nof the factory methods that the time package offers.\n\n+protobuf.options.marshal=false\n+protobuf.as=Timestamp\n+protobuf.options.(gogoproto.goproto_stringer)=false" + }, + "v1Toleration": { + "type": "object", + "properties": { + "key": { + "type": "string", + "title": "Key is the taint key that the toleration applies to. Empty means match all taint keys.\nIf the key is empty, operator must be Exists; this combination means to match all values and all keys.\n+optional" + }, + "operator": { + "type": "string", + "title": "Operator represents a key's relationship to the value.\nValid operators are Exists and Equal. Defaults to Equal.\nExists is equivalent to wildcard for value, so that a pod can\ntolerate all taints of a particular category.\n+optional" + }, + "value": { + "type": "string", + "title": "Value is the taint value the toleration matches to.\nIf the operator is Exists, the value should be empty, otherwise just a regular string.\n+optional" + }, + "effect": { + "type": "string", + "title": "Effect indicates the taint effect to match. Empty means match all taint effects.\nWhen specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.\n+optional" + }, + "tolerationSeconds": { + "type": "string", + "format": "int64", + "title": "TolerationSeconds represents the period of time the toleration (which must be\nof effect NoExecute, otherwise this field is ignored) tolerates the taint. By default,\nit is not set, which means tolerate the taint forever (do not evict). Zero and\nnegative values will be treated as 0 (evict immediately) by the system.\n+optional" + } + }, + "description": "The pod this Toleration is attached to tolerates any taint that matches\nthe triple \u003ckey,value,effect\u003e using the matching operator \u003coperator\u003e." + }, + "v1TopologySpreadConstraint": { + "type": "object", + "properties": { + "maxSkew": { + "type": "integer", + "format": "int32", + "description": "MaxSkew describes the degree to which pods may be unevenly distributed.\nWhen `whenUnsatisfiable=DoNotSchedule`, it is the maximum permitted difference\nbetween the number of matching pods in the target topology and the global minimum.\nFor example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same\nlabelSelector spread as 1/1/0:\n+-------+-------+-------+\n| zone1 | zone2 | zone3 |\n+-------+-------+-------+\n| P | P | |\n+-------+-------+-------+\n- if MaxSkew is 1, incoming pod can only be scheduled to zone3 to become 1/1/1;\nscheduling it onto zone1(zone2) would make the ActualSkew(2-0) on zone1(zone2)\nviolate MaxSkew(1).\n- if MaxSkew is 2, incoming pod can be scheduled onto any zone.\nWhen `whenUnsatisfiable=ScheduleAnyway`, it is used to give higher precedence\nto topologies that satisfy it.\nIt's a required field. Default value is 1 and 0 is not allowed." + }, + "topologyKey": { + "type": "string", + "description": "TopologyKey is the key of node labels. Nodes that have a label with this key\nand identical values are considered to be in the same topology.\nWe consider each \u003ckey, value\u003e as a \"bucket\", and try to put balanced number\nof pods into each bucket.\nIt's a required field." + }, + "whenUnsatisfiable": { + "type": "string", + "description": "WhenUnsatisfiable indicates how to deal with a pod if it doesn't satisfy\nthe spread constraint.\n- DoNotSchedule (default) tells the scheduler not to schedule it.\n- ScheduleAnyway tells the scheduler to schedule the pod in any location,\n but giving higher precedence to topologies that would help reduce the\n skew.\nA constraint is considered \"Unsatisfiable\" for an incoming pod\nif and only if every possible node assigment for that pod would violate\n\"MaxSkew\" on some topology.\nFor example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same\nlabelSelector spread as 3/1/1:\n+-------+-------+-------+\n| zone1 | zone2 | zone3 |\n+-------+-------+-------+\n| P P P | P | P |\n+-------+-------+-------+\nIf WhenUnsatisfiable is set to DoNotSchedule, incoming pod can only be scheduled\nto zone2(zone3) to become 3/2/1(3/1/2) as ActualSkew(2-1) on zone2(zone3) satisfies\nMaxSkew(1). In other words, the cluster can still be imbalanced, but scheduler\nwon't make it *more* imbalanced.\nIt's a required field." + }, + "labelSelector": { + "$ref": "#/definitions/v1LabelSelector", + "title": "LabelSelector is used to find matching pods.\nPods that match this label selector are counted to determine the number of pods\nin their corresponding topology domain.\n+optional" + } + }, + "description": "TopologySpreadConstraint specifies how to spread matching pods among the given topology." + }, + "v1TypedLocalObjectReference": { + "type": "object", + "properties": { + "apiGroup": { + "type": "string", + "title": "APIGroup is the group for the resource being referenced.\nIf APIGroup is not specified, the specified Kind must be in the core API group.\nFor any other third-party types, APIGroup is required.\n+optional" + }, + "kind": { + "type": "string", + "title": "Kind is the type of resource being referenced" + }, + "name": { + "type": "string", + "title": "Name is the name of resource being referenced" + } + }, + "description": "TypedLocalObjectReference contains enough information to let you locate the\ntyped referenced object inside the same namespace." + }, + "v1Volume": { + "type": "object", + "properties": { + "name": { + "type": "string", + "title": "Volume's name.\nMust be a DNS_LABEL and unique within the pod.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names" + }, + "volumeSource": { + "$ref": "#/definitions/v1VolumeSource", + "description": "VolumeSource represents the location and type of the mounted volume.\nIf not specified, the Volume is implied to be an EmptyDir.\nThis implied behavior is deprecated and will be removed in a future version." + } + }, + "description": "Volume represents a named volume in a pod that may be accessed by any container in the pod." + }, + "v1VolumeDevice": { + "type": "object", + "properties": { + "name": { + "type": "string", + "title": "name must match the name of a persistentVolumeClaim in the pod" + }, + "devicePath": { + "type": "string", + "description": "devicePath is the path inside of the container that the device will be mapped to." + } + }, + "description": "volumeDevice describes a mapping of a raw block device within a container." + }, + "v1VolumeProjection": { + "type": "object", + "properties": { + "secret": { + "$ref": "#/definitions/v1SecretProjection", + "title": "information about the secret data to project\n+optional" + }, + "downwardAPI": { + "$ref": "#/definitions/v1DownwardAPIProjection", + "title": "information about the downwardAPI data to project\n+optional" + }, + "configMap": { + "$ref": "#/definitions/v1ConfigMapProjection", + "title": "information about the configMap data to project\n+optional" + }, + "serviceAccountToken": { + "$ref": "#/definitions/v1ServiceAccountTokenProjection", + "title": "information about the serviceAccountToken data to project\n+optional" + } + }, + "title": "Projection that may be projected along with other supported volume types" + }, + "v1VolumeSource": { + "type": "object", + "properties": { + "hostPath": { + "$ref": "#/definitions/v1HostPathVolumeSource", + "title": "HostPath represents a pre-existing file or directory on the host\nmachine that is directly exposed to the container. This is generally\nused for system agents or other privileged things that are allowed\nto see the host machine. Most containers will NOT need this.\nMore info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath\n---\nTODO(jonesdl) We need to restrict who can use host directory mounts and who can/can not\nmount host directories as read/write.\n+optional" + }, + "emptyDir": { + "$ref": "#/definitions/v1EmptyDirVolumeSource", + "title": "EmptyDir represents a temporary directory that shares a pod's lifetime.\nMore info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir\n+optional" + }, + "gcePersistentDisk": { + "$ref": "#/definitions/v1GCEPersistentDiskVolumeSource", + "title": "GCEPersistentDisk represents a GCE Disk resource that is attached to a\nkubelet's host machine and then exposed to the pod.\nMore info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk\n+optional" + }, + "awsElasticBlockStore": { + "$ref": "#/definitions/v1AWSElasticBlockStoreVolumeSource", + "title": "AWSElasticBlockStore represents an AWS Disk resource that is attached to a\nkubelet's host machine and then exposed to the pod.\nMore info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore\n+optional" + }, + "gitRepo": { + "$ref": "#/definitions/v1GitRepoVolumeSource", + "title": "GitRepo represents a git repository at a particular revision.\nDEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an\nEmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir\ninto the Pod's container.\n+optional" + }, + "secret": { + "$ref": "#/definitions/v1SecretVolumeSource", + "title": "Secret represents a secret that should populate this volume.\nMore info: https://kubernetes.io/docs/concepts/storage/volumes#secret\n+optional" + }, + "nfs": { + "$ref": "#/definitions/v1NFSVolumeSource", + "title": "NFS represents an NFS mount on the host that shares a pod's lifetime\nMore info: https://kubernetes.io/docs/concepts/storage/volumes#nfs\n+optional" + }, + "iscsi": { + "$ref": "#/definitions/v1ISCSIVolumeSource", + "title": "ISCSI represents an ISCSI Disk resource that is attached to a\nkubelet's host machine and then exposed to the pod.\nMore info: https://examples.k8s.io/volumes/iscsi/README.md\n+optional" + }, + "glusterfs": { + "$ref": "#/definitions/v1GlusterfsVolumeSource", + "title": "Glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime.\nMore info: https://examples.k8s.io/volumes/glusterfs/README.md\n+optional" + }, + "persistentVolumeClaim": { + "$ref": "#/definitions/v1PersistentVolumeClaimVolumeSource", + "title": "PersistentVolumeClaimVolumeSource represents a reference to a\nPersistentVolumeClaim in the same namespace.\nMore info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims\n+optional" + }, + "rbd": { + "$ref": "#/definitions/v1RBDVolumeSource", + "title": "RBD represents a Rados Block Device mount on the host that shares a pod's lifetime.\nMore info: https://examples.k8s.io/volumes/rbd/README.md\n+optional" + }, + "flexVolume": { + "$ref": "#/definitions/v1FlexVolumeSource", + "title": "FlexVolume represents a generic volume resource that is\nprovisioned/attached using an exec based plugin.\n+optional" + }, + "cinder": { + "$ref": "#/definitions/v1CinderVolumeSource", + "title": "Cinder represents a cinder volume attached and mounted on kubelets host machine.\nMore info: https://examples.k8s.io/mysql-cinder-pd/README.md\n+optional" + }, + "cephfs": { + "$ref": "#/definitions/v1CephFSVolumeSource", + "title": "CephFS represents a Ceph FS mount on the host that shares a pod's lifetime\n+optional" + }, + "flocker": { + "$ref": "#/definitions/v1FlockerVolumeSource", + "title": "Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running\n+optional" + }, + "downwardAPI": { + "$ref": "#/definitions/v1DownwardAPIVolumeSource", + "title": "DownwardAPI represents downward API about the pod that should populate this volume\n+optional" + }, + "fc": { + "$ref": "#/definitions/v1FCVolumeSource", + "title": "FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.\n+optional" + }, + "azureFile": { + "$ref": "#/definitions/v1AzureFileVolumeSource", + "title": "AzureFile represents an Azure File Service mount on the host and bind mount to the pod.\n+optional" + }, + "configMap": { + "$ref": "#/definitions/v1ConfigMapVolumeSource", + "title": "ConfigMap represents a configMap that should populate this volume\n+optional" + }, + "vsphereVolume": { + "$ref": "#/definitions/v1VsphereVirtualDiskVolumeSource", + "title": "VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine\n+optional" + }, + "quobyte": { + "$ref": "#/definitions/v1QuobyteVolumeSource", + "title": "Quobyte represents a Quobyte mount on the host that shares a pod's lifetime\n+optional" + }, + "azureDisk": { + "$ref": "#/definitions/v1AzureDiskVolumeSource", + "title": "AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.\n+optional" + }, + "photonPersistentDisk": { + "$ref": "#/definitions/v1PhotonPersistentDiskVolumeSource", + "title": "PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine" + }, + "projected": { + "$ref": "#/definitions/v1ProjectedVolumeSource", + "title": "Items for all in one resources secrets, configmaps, and downward API" + }, + "portworxVolume": { + "$ref": "#/definitions/v1PortworxVolumeSource", + "title": "PortworxVolume represents a portworx volume attached and mounted on kubelets host machine\n+optional" + }, + "scaleIO": { + "$ref": "#/definitions/v1ScaleIOVolumeSource", + "title": "ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.\n+optional" + }, + "storageos": { + "$ref": "#/definitions/v1StorageOSVolumeSource", + "title": "StorageOS represents a StorageOS volume attached and mounted on Kubernetes nodes.\n+optional" + }, + "csi": { + "$ref": "#/definitions/v1CSIVolumeSource", + "title": "CSI (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature).\n+optional" + }, + "ephemeral": { + "$ref": "#/definitions/v1EphemeralVolumeSource", + "description": "Ephemeral represents a volume that is handled by a cluster storage driver (Alpha feature).\nThe volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts,\nand deleted when the pod is removed.\n\nUse this if:\na) the volume is only needed while the pod runs,\nb) features of normal volumes like restoring from snapshot or capacity\n tracking are needed,\nc) the storage driver is specified through a storage class, and\nd) the storage driver supports dynamic volume provisioning through\n a PersistentVolumeClaim (see EphemeralVolumeSource for more\n information on the connection between this volume type\n and PersistentVolumeClaim).\n\nUse PersistentVolumeClaim or one of the vendor-specific\nAPIs for volumes that persist for longer than the lifecycle\nof an individual pod.\n\nUse CSI for light-weight local ephemeral volumes if the CSI driver is meant to\nbe used that way - see the documentation of the driver for\nmore information.\n\nA pod can use both types of ephemeral volumes and\npersistent volumes at the same time.\n\n+optional" + } + }, + "description": "Represents the source of a volume to mount.\nOnly one of its members may be specified." + }, + "v1VsphereVirtualDiskVolumeSource": { + "type": "object", + "properties": { + "volumePath": { + "type": "string", + "title": "Path that identifies vSphere volume vmdk" + }, + "fsType": { + "type": "string", + "title": "Filesystem type to mount.\nMust be a filesystem type supported by the host operating system.\nEx. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.\n+optional" + }, + "storagePolicyName": { + "type": "string", + "title": "Storage Policy Based Management (SPBM) profile name.\n+optional" + }, + "storagePolicyID": { + "type": "string", + "title": "Storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName.\n+optional" + } + }, + "description": "Represents a vSphere volume resource." + }, + "v1WeightedPodAffinityTerm": { + "type": "object", + "properties": { + "weight": { + "type": "integer", + "format": "int32", + "description": "weight associated with matching the corresponding podAffinityTerm,\nin the range 1-100." + }, + "podAffinityTerm": { + "$ref": "#/definitions/v1PodAffinityTerm", + "description": "Required. A pod affinity term, associated with the corresponding weight." + } + }, + "title": "The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s)" + }, + "v1WindowsSecurityContextOptions": { + "type": "object", + "properties": { + "gmsaCredentialSpecName": { + "type": "string", + "title": "GMSACredentialSpecName is the name of the GMSA credential spec to use.\n+optional" + }, + "gmsaCredentialSpec": { + "type": "string", + "title": "GMSACredentialSpec is where the GMSA admission webhook\n(https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the\nGMSA credential spec named by the GMSACredentialSpecName field.\n+optional" + }, + "runAsUserName": { + "type": "string", + "title": "The UserName in Windows to run the entrypoint of the container process.\nDefaults to the user specified in image metadata if unspecified.\nMay also be set in PodSecurityContext. If set in both SecurityContext and\nPodSecurityContext, the value specified in SecurityContext takes precedence.\n+optional" + } + }, + "description": "WindowsSecurityContextOptions contain Windows-specific options and credentials." + }, + "v1beta1JobTemplateSpec": { + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta", + "title": "Standard object's metadata of the jobs created from this template.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\n+optional" + }, + "spec": { + "$ref": "#/definitions/v1JobSpec", + "title": "Specification of the desired behavior of the job.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status\n+optional" + } + }, + "title": "JobTemplateSpec describes the data a Job should have when created from a template" + }, + "v3ConditionStatus": { + "type": "string", + "enum": [ + "StatusNotSet", + "StatusSubmitted", + "StatusOK", + "StatusFailed" + ], + "default": "StatusNotSet", + "title": "$title: ConditionStatus\n$description: status of a condition for a resource" + }, + "v3ListMetadata": { + "type": "object", + "properties": { + "count": { + "type": "string", + "format": "int64" + }, + "offset": { + "type": "string", + "format": "int64" + }, + "limit": { + "type": "string", + "format": "int64" + } + }, + "title": "$title: ListMetadata\n$description: metadata for a list of resources\n$required: enabled" + }, + "v3Metadata": { + "type": "object", + "example": { + "name": "some-name", + "project": "defaultproject" + }, + "properties": { + "name": { + "type": "string", + "description": "name of the resource", + "title": "Name" + }, + "displayName": { + "type": "string", + "description": "display name of the resource", + "title": "Display Name" + }, + "description": { + "type": "string", + "description": "description of the resource", + "title": "Description" + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "labels of the resource", + "title": "Lables" + }, + "annotations": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "annotations of the resource", + "title": "Annotations" + }, + "project": { + "type": "string", + "description": "Project of the resource", + "title": "Project" + }, + "organization": { + "type": "string", + "description": "Organization to which the resource belongs", + "title": "Organization" + }, + "partner": { + "type": "string", + "description": "Partner to which the resource belongs", + "title": "Partner" + }, + "id": { + "type": "string", + "readOnly": true + }, + "modifiedAt": { + "type": "string", + "format": "date-time", + "readOnly": true + } + }, + "description": "metadata of the resource", + "title": "Metadata", + "required": [ + "name", + "project" + ] + } + }, + "securityDefinitions": { + "ApiKeyAuth": { + "type": "apiKey", + "name": "X-RAFAY-API-KEYID", + "in": "header" + }, + "BasicAuth": { + "type": "basic" + } + }, + "security": [ + { + "ApiKeyAuth": [], + "BasicAuth": [] + } + ] +} diff --git a/components/cluster-scheduler/gen/openapi/proto/rpc/v3/cluster.swagger.json b/components/common/gen/openapi/proto/rpc/scheduler/cluster.swagger.json similarity index 94% rename from components/cluster-scheduler/gen/openapi/proto/rpc/v3/cluster.swagger.json rename to components/common/gen/openapi/proto/rpc/scheduler/cluster.swagger.json index 1a9ea5f..0498ff3 100644 --- a/components/cluster-scheduler/gen/openapi/proto/rpc/v3/cluster.swagger.json +++ b/components/common/gen/openapi/proto/rpc/scheduler/cluster.swagger.json @@ -137,6 +137,13 @@ "type": "string", "default": "Cluster" }, + { + "name": "metadata.displayName", + "description": "Display Name. display name of the resource", + "in": "query", + "required": false, + "type": "string" + }, { "name": "metadata.description", "description": "Description. description of the resource", @@ -508,7 +515,7 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v3DeleteClusterResponse" + "$ref": "#/definitions/rpcDeleteClusterResponse" } }, "204": { @@ -564,6 +571,13 @@ "type": "string", "default": "Cluster" }, + { + "name": "metadata.displayName", + "description": "Display Name. display name of the resource", + "in": "query", + "required": false, + "type": "string" + }, { "name": "metadata.description", "description": "Description. description of the resource", @@ -1044,6 +1058,13 @@ "type": "string", "default": "Cluster" }, + { + "name": "metadata.displayName", + "description": "Display Name. display name of the resource", + "in": "query", + "required": false, + "type": "string" + }, { "name": "metadata.description", "description": "Description. description of the resource", @@ -1410,7 +1431,64 @@ ] } }, - "/infra/v3/project/{projectID}/cluster": { + "/infra/v3/project/{metadata.project}/cluster/{metadata.name}/status": { + "put": { + "operationId": "Cluster_UpdateClusterStatus", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v3Cluster" + } + }, + "403": { + "description": "Returned when the user does not have permission to access the resource.", + "schema": {} + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": { + "type": "string", + "format": "string" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "metadata.project", + "description": "Project of the resource", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "metadata.name", + "description": "name of the resource", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v3Cluster" + } + } + ], + "tags": [ + "Cluster" + ] + } + }, + "/infra/v3/project/{project}/cluster": { "get": { "operationId": "Cluster_GetClusters", "responses": { @@ -1440,7 +1518,7 @@ }, "parameters": [ { - "name": "projectID", + "name": "project", "in": "path", "required": true, "type": "string" @@ -1460,13 +1538,13 @@ "type": "string" }, { - "name": "partnerID", + "name": "partner", "in": "query", "required": false, "type": "string" }, { - "name": "organizationID", + "name": "organization", "in": "query", "required": false, "type": "string" @@ -1589,6 +1667,12 @@ "in": "query", "required": false, "type": "string" + }, + { + "name": "account", + "in": "query", + "required": false, + "type": "string" } ], "tags": [ @@ -1603,7 +1687,7 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v3RegisterClusterResponse" + "$ref": "#/definitions/rpcRegisterClusterResponse" } }, "403": { @@ -1630,7 +1714,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v3RegisterClusterRequest" + "$ref": "#/definitions/rpcRegisterClusterRequest" } } ], @@ -1707,6 +1791,148 @@ }, "additionalProperties": {} }, + "rpcDeleteClusterResponse": { + "type": "object" + }, + "rpcRegisterClusterRequest": { + "type": "object", + "properties": { + "token": { + "type": "string" + }, + "signingRequest": { + "type": "string", + "format": "byte" + } + } + }, + "rpcRegisterClusterResponse": { + "type": "object", + "properties": { + "certificate": { + "type": "string", + "format": "byte" + }, + "caCertificate": { + "type": "string", + "format": "byte" + } + } + }, + "v1NodeCondition": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of node condition." + }, + "status": { + "type": "string", + "description": "Status of the condition, one of True, False, Unknown." + }, + "lastHeartbeatTime": { + "$ref": "#/definitions/v1Time", + "title": "Last time we got an update on a given condition.\n+optional" + }, + "lastTransitionTime": { + "$ref": "#/definitions/v1Time", + "title": "Last time the condition transit from one status to another.\n+optional" + }, + "reason": { + "type": "string", + "title": "(brief) reason for the condition's last transition.\n+optional" + }, + "message": { + "type": "string", + "title": "Human readable message indicating details about last transition.\n+optional" + } + }, + "description": "NodeCondition contains condition information for a node." + }, + "v1NodeSystemInfo": { + "type": "object", + "properties": { + "machineID": { + "type": "string", + "title": "MachineID reported by the node. For unique machine identification\nin the cluster this field is preferred. Learn more from man(5)\nmachine-id: http://man7.org/linux/man-pages/man5/machine-id.5.html" + }, + "systemUUID": { + "type": "string", + "title": "SystemUUID reported by the node. For unique machine identification\nMachineID is preferred. This field is specific to Red Hat hosts\nhttps://access.redhat.com/documentation/en-us/red_hat_subscription_management/1/html/rhsm/uuid" + }, + "bootID": { + "type": "string", + "description": "Boot ID reported by the node." + }, + "kernelVersion": { + "type": "string", + "description": "Kernel Version reported by the node from 'uname -r' (e.g. 3.16.0-0.bpo.4-amd64)." + }, + "osImage": { + "type": "string", + "description": "OS Image reported by the node from /etc/os-release (e.g. Debian GNU/Linux 7 (wheezy))." + }, + "containerRuntimeVersion": { + "type": "string", + "description": "ContainerRuntime Version reported by the node through runtime remote API (e.g. docker://1.5.0)." + }, + "kubeletVersion": { + "type": "string", + "description": "Kubelet Version reported by the node." + }, + "kubeProxyVersion": { + "type": "string", + "description": "KubeProxy Version reported by the node." + }, + "operatingSystem": { + "type": "string", + "title": "The Operating System reported by the node" + }, + "architecture": { + "type": "string", + "title": "The Architecture reported by the node" + } + }, + "description": "NodeSystemInfo is a set of ids/uuids to uniquely identify the node." + }, + "v1Taint": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "Required. The taint key to be applied to a node." + }, + "value": { + "type": "string", + "title": "The taint value corresponding to the taint key.\n+optional" + }, + "effect": { + "type": "string", + "description": "Required. The effect of the taint on pods\nthat do not tolerate the taint.\nValid effects are NoSchedule, PreferNoSchedule and NoExecute." + }, + "timeAdded": { + "$ref": "#/definitions/v1Time", + "title": "TimeAdded represents the time at which the taint was added.\nIt is only written for NoExecute taints.\n+optional" + } + }, + "description": "The node this Taint is attached to has the \"effect\" on\nany pod that does not tolerate the Taint." + }, + "v1Time": { + "type": "object", + "properties": { + "seconds": { + "type": "string", + "format": "int64", + "description": "Represents seconds of UTC time since Unix epoch\n1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to\n9999-12-31T23:59:59Z inclusive." + }, + "nanos": { + "type": "integer", + "format": "int32", + "description": "Non-negative fractions of a second at nanosecond resolution. Negative\nsecond values with fractions must still have non-negative nanos values\nthat count forward in time. Must be from 0 to 999,999,999\ninclusive. This field may be limited in precision depending on context." + } + }, + "description": "Time is a wrapper around time.Time which supports correct\nmarshaling to YAML and JSON. Wrappers are provided for many\nof the factory methods that the time package offers.\n\n+protobuf.options.marshal=false\n+protobuf.as=Timestamp\n+protobuf.options.(gogoproto.goproto_stringer)=false" + }, "v3Cluster": { "type": "object", "properties": { @@ -1779,18 +2005,18 @@ "v3ClusterConditionType": { "type": "string", "enum": [ - "ClusterRegister", + "ClusterBlueprintSync", "ClusterApprove", "ClusterCheckIn", "ClusterNodeSync", - "ClusterBlueprintSync", + "ClusterRegister", "ClusterNamespaceSync", "ClusterReady", "ClusterAuxiliaryTaskSync", "ClusterBootstrapAgent", "ClusterDelete" ], - "default": "ClusterRegister" + "default": "ClusterBlueprintSync" }, "v3ClusterData": { "type": "object", @@ -1935,7 +2161,7 @@ "taints": { "type": "array", "items": { - "$ref": "#/definitions/v3Taint" + "$ref": "#/definitions/v1Taint" } } } @@ -1958,11 +2184,11 @@ "conditions": { "type": "array", "items": { - "$ref": "#/definitions/v3NodeCondition" + "$ref": "#/definitions/v1NodeCondition" } }, "nodeInfo": { - "$ref": "#/definitions/v3NodeSystemInfo" + "$ref": "#/definitions/v1NodeSystemInfo" }, "capacity": { "$ref": "#/definitions/v3Resources" @@ -2084,9 +2310,6 @@ "default": "StatusNotSet", "title": "$title: ConditionStatus\n$description: status of a condition for a resource" }, - "v3DeleteClusterResponse": { - "type": "object" - }, "v3Health": { "type": "string", "enum": [ @@ -2142,6 +2365,11 @@ "description": "name of the resource", "title": "Name" }, + "displayName": { + "type": "string", + "description": "display name of the resource", + "title": "Display Name" + }, "description": { "type": "string", "description": "description of the resource", @@ -2258,85 +2486,6 @@ } } }, - "v3NodeCondition": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Type of node condition", - "title": "Type" - }, - "status": { - "type": "string", - "description": "Status of the condition, one of True, False, Unknown." - }, - "lastHeartbeatTime": { - "$ref": "#/definitions/v3Time", - "description": "Last time we got an update on a given condition." - }, - "lastTransitionTime": { - "$ref": "#/definitions/v3Time", - "description": "Last time the condition transit from one status to another." - }, - "reason": { - "type": "string", - "description": "(brief) reason for the condition's last transition." - }, - "message": { - "type": "string", - "description": "Human readable message indicating details about last transition." - } - }, - "description": "Node Condition", - "title": "NodeCondition" - }, - "v3NodeSystemInfo": { - "type": "object", - "properties": { - "machineID": { - "type": "string", - "title": "MachineID reported by the node. For unique machine identification\nin the cluster this field is preferred. Learn more from man(5)\nmachine-id: http://man7.org/linux/man-pages/man5/machine-id.5.html" - }, - "systemUUID": { - "type": "string", - "title": "SystemUUID reported by the node. For unique machine identification\nMachineID is preferred. This field is specific to Red Hat hosts\nhttps://access.redhat.com/documentation/en-us/red_hat_subscription_management/1/html/rhsm/uuid" - }, - "bootID": { - "type": "string", - "description": "Boot ID reported by the node." - }, - "kernelVersion": { - "type": "string", - "description": "Kernel Version reported by the node from 'uname -r' (e.g. 3.16.0-0.bpo.4-amd64)." - }, - "osImage": { - "type": "string", - "description": "OS Image reported by the node from /etc/os-release (e.g. Debian GNU/Linux 7 (wheezy))." - }, - "containerRuntimeVersion": { - "type": "string", - "description": "ContainerRuntime Version reported by the node through runtime remote API (e.g. docker://1.5.0)." - }, - "kubeletVersion": { - "type": "string", - "description": "Kubelet Version reported by the node." - }, - "kubeProxyVersion": { - "type": "string", - "description": "KubeProxy Version reported by the node." - }, - "operatingSystem": { - "type": "string", - "title": "The Operating System reported by the node" - }, - "architecture": { - "type": "string", - "title": "The Architecture reported by the node" - } - }, - "description": "Node System Info", - "title": "NodeSystemInfo" - }, "v3ProjectCluster": { "type": "object", "properties": { @@ -2445,31 +2594,6 @@ "default": "NotSet", "title": "RafayConditionStatus is the status of the status condition" }, - "v3RegisterClusterRequest": { - "type": "object", - "properties": { - "token": { - "type": "string" - }, - "signingRequest": { - "type": "string", - "format": "byte" - } - } - }, - "v3RegisterClusterResponse": { - "type": "object", - "properties": { - "certificate": { - "type": "string", - "format": "byte" - }, - "caCertificate": { - "type": "string", - "format": "byte" - } - } - }, "v3Resources": { "type": "object", "properties": { @@ -2494,46 +2618,6 @@ "format": "int64" } } - }, - "v3Taint": { - "type": "object", - "properties": { - "key": { - "type": "string", - "description": "Required. The taint key to be applied to a node." - }, - "value": { - "type": "string", - "description": "The taint value corresponding to the taint key." - }, - "effect": { - "type": "string", - "description": "Required. The effect of the taint on pods\nthat do not tolerate the taint.\nValid effects are NoSchedule, PreferNoSchedule and NoExecute." - }, - "timeAdded": { - "$ref": "#/definitions/v3Time", - "description": "TimeAdded represents the time at which the taint was added.\nIt is only written for NoExecute taints." - } - }, - "description": "Taint of the cluster", - "title": "Taint" - }, - "v3Time": { - "type": "object", - "properties": { - "seconds": { - "type": "string", - "format": "int64", - "description": "Represents seconds of UTC time since Unix epoch\n1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to\n9999-12-31T23:59:59Z inclusive." - }, - "nanos": { - "type": "integer", - "format": "int32", - "description": "Non-negative fractions of a second at nanosecond resolution. Negative\nsecond values with fractions must still have non-negative nanos values\nthat count forward in time. Must be from 0 to 999,999,999\ninclusive. This field may be limited in precision depending on context." - } - }, - "description": "Time", - "title": "Time" } }, "securityDefinitions": { diff --git a/components/common/gen/openapi/proto/rpc/sentry/audit_info.swagger.json b/components/common/gen/openapi/proto/rpc/sentry/audit_info.swagger.json new file mode 100644 index 0000000..203e92c --- /dev/null +++ b/components/common/gen/openapi/proto/rpc/sentry/audit_info.swagger.json @@ -0,0 +1,189 @@ +{ + "swagger": "2.0", + "info": { + "title": "Sentry Audit Information Service", + "version": "2.0", + "contact": { + "name": "Rafay Dev" + } + }, + "tags": [ + { + "name": "AuditInformation" + } + ], + "schemes": [ + "https" + ], + "consumes": [ + "application/json", + "application/yaml" + ], + "produces": [ + "application/json", + "application/yaml" + ], + "paths": { + "/v2/sentry/auditInfo/cluster": { + "get": { + "operationId": "AuditInformation_LookupCluster", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/rpcLookupClusterResponse" + } + }, + "403": { + "description": "Returned when the user does not have permission to access the resource.", + "schema": {} + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": { + "type": "string", + "format": "string" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "clusterSNI", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "AuditInformation" + ] + } + }, + "/v2/sentry/auditInfo/user": { + "get": { + "operationId": "AuditInformation_LookupUser", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/rpcLookupUserResponse" + } + }, + "403": { + "description": "Returned when the user does not have permission to access the resource.", + "schema": {} + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": { + "type": "string", + "format": "string" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "userCN", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "AuditInformation" + ] + } + } + }, + "definitions": { + "googlerpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcLookupClusterResponse": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "displayName": { + "type": "string" + } + } + }, + "rpcLookupUserResponse": { + "type": "object", + "properties": { + "userName": { + "type": "string" + }, + "accountID": { + "type": "string" + }, + "isSSO": { + "type": "string" + }, + "organizationID": { + "type": "string" + }, + "partnerID": { + "type": "string" + }, + "sessionType": { + "type": "string" + } + } + } + }, + "securityDefinitions": { + "ApiKeyAuth": { + "type": "apiKey", + "name": "X-RAFAY-API-KEYID", + "in": "header" + }, + "BasicAuth": { + "type": "basic" + } + }, + "security": [ + { + "ApiKeyAuth": [], + "BasicAuth": [] + } + ] +} diff --git a/components/common/gen/openapi/proto/rpc/sentry/bootstrap.swagger.json b/components/common/gen/openapi/proto/rpc/sentry/bootstrap.swagger.json new file mode 100644 index 0000000..ca02707 --- /dev/null +++ b/components/common/gen/openapi/proto/rpc/sentry/bootstrap.swagger.json @@ -0,0 +1,2025 @@ +{ + "swagger": "2.0", + "info": { + "title": "Sentry Bootstrap Service", + "version": "2.0", + "contact": { + "name": "Rafay Dev" + } + }, + "tags": [ + { + "name": "Bootstrap" + } + ], + "schemes": [ + "https" + ], + "consumes": [ + "application/json", + "application/yaml" + ], + "produces": [ + "application/json", + "application/yaml" + ], + "paths": { + "/v2/sentry/bootstrap/infra/{metadata.name}": { + "get": { + "operationId": "Bootstrap_GetBootstrapInfra", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/sentryBootstrapInfra" + } + }, + "403": { + "description": "Returned when the user does not have permission to access the resource.", + "schema": {} + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": {} + }, + "500": { + "description": "Returned for internal server error", + "schema": {} + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "metadata.name", + "description": "name of the resource", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "apiVersion", + "description": "API Version. API Version of the resource", + "in": "query", + "required": false, + "type": "string", + "default": "infra.k8smgmt.io/v3" + }, + { + "name": "kind", + "description": "Kind. Kind of the resource", + "in": "query", + "required": false, + "type": "string", + "default": "BootstrapInfra" + }, + { + "name": "metadata.displayName", + "description": "Display Name. display name of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.description", + "description": "Description. description of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.project", + "description": "Project. Project of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.organization", + "description": "Organization. Organization to which the resource belongs", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.partner", + "description": "Partner. Partner to which the resource belongs", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.id", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.modifiedAt", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "spec.caCert", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.caKey", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.caKeyPass", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "Bootstrap" + ] + }, + "put": { + "operationId": "Bootstrap_PatchBootstrapInfra", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/sentryBootstrapInfra" + } + }, + "403": { + "description": "Returned when the user does not have permission to access the resource.", + "schema": {} + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": {} + }, + "500": { + "description": "Returned for internal server error", + "schema": {} + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "metadata.name", + "description": "name of the resource", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/sentryBootstrapInfra" + } + } + ], + "tags": [ + "Bootstrap" + ] + } + }, + "/v2/sentry/bootstrap/template": { + "get": { + "operationId": "Bootstrap_GetBootstrapAgentTemplates", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/sentryBootstrapAgentTemplateList" + } + }, + "403": { + "description": "Returned when the user does not have permission to access the resource.", + "schema": {} + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": {} + }, + "500": { + "description": "Returned for internal server error", + "schema": {} + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "name", + "description": "name is unique ID of a resource along with (partnerID, organizationID,\nprojectID).", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "selector", + "description": "selector is used to filter the labels of a resource.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "partner", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "organization", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "project", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "displayName", + "description": "displayName only used for update queries to set displayName (READONLY).", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "count", + "in": "query", + "required": false, + "type": "string", + "format": "int64" + }, + { + "name": "offset", + "in": "query", + "required": false, + "type": "string", + "format": "int64" + }, + { + "name": "limit", + "in": "query", + "required": false, + "type": "string", + "format": "int64" + }, + { + "name": "ignoreScopeDefault", + "description": "ignoreScopeDefault ignores default values for partnerID, organizationID and\nprojectID.", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "globalScope", + "description": "globalScope sets partnerID,organizationID,projectID = 0.", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "orderBy", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "order", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "deleted", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "extended", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "urlScope", + "description": "urlScope is supposed to be passed in the URL as kind/HashID(value).", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "isSSOUser", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "username", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "groups", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "blueprintRef", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "publishedVersion", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "clusterID", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "ID", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "account", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "Bootstrap" + ] + } + }, + "/v2/sentry/bootstrap/template/{metadata.name}": { + "get": { + "operationId": "Bootstrap_GetBootstrapAgentTemplate", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/sentryBootstrapAgentTemplate" + } + }, + "403": { + "description": "Returned when the user does not have permission to access the resource.", + "schema": {} + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": {} + }, + "500": { + "description": "Returned for internal server error", + "schema": {} + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "metadata.name", + "description": "name of the resource", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "apiVersion", + "description": "API Version. API Version of the resource", + "in": "query", + "required": false, + "type": "string", + "default": "infra.k8smgmt.io/v3" + }, + { + "name": "kind", + "description": "Kind. Kind of the resource", + "in": "query", + "required": false, + "type": "string", + "default": "BootstrapAgentTemplate" + }, + { + "name": "metadata.displayName", + "description": "Display Name. display name of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.description", + "description": "Description. description of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.project", + "description": "Project. Project of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.organization", + "description": "Organization. Organization to which the resource belongs", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.partner", + "description": "Partner. Partner to which the resource belongs", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.id", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.modifiedAt", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "spec.infraRef", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.autoRegister", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "spec.ignoreMultipleRegister", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "spec.autoApprove", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "spec.templateType", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "TemplateTypeNotSet", + "Client", + "Server", + "Mixed" + ], + "default": "TemplateTypeNotSet" + }, + { + "name": "spec.token", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.inClusterTemplate", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.outOfClusterTemplate", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "Bootstrap" + ] + }, + "put": { + "operationId": "Bootstrap_PatchBootstrapAgentTemplate", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/sentryBootstrapAgentTemplate" + } + }, + "403": { + "description": "Returned when the user does not have permission to access the resource.", + "schema": {} + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": {} + }, + "500": { + "description": "Returned for internal server error", + "schema": {} + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "metadata.name", + "description": "name of the resource", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/sentryBootstrapAgentTemplate" + } + } + ], + "tags": [ + "Bootstrap" + ] + } + }, + "/v2/sentry/bootstrap/{spec.templateRef}/agent": { + "post": { + "operationId": "Bootstrap_CreateBootstrapAgent", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/sentryBootstrapAgent" + } + }, + "403": { + "description": "Returned when the user does not have permission to access the resource.", + "schema": {} + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": {} + }, + "500": { + "description": "Returned for internal server error", + "schema": {} + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "spec.templateRef", + "in": "path", + "required": true, + "type": "string", + "pattern": "template/[^/]+" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/sentryBootstrapAgent" + } + } + ], + "tags": [ + "Bootstrap" + ] + } + }, + "/v2/sentry/bootstrap/{spec.templateRef}/agent/{metadata.name}": { + "get": { + "operationId": "Bootstrap_GetBootstrapAgent", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/sentryBootstrapAgent" + } + }, + "403": { + "description": "Returned when the user does not have permission to access the resource.", + "schema": {} + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": {} + }, + "500": { + "description": "Returned for internal server error", + "schema": {} + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "spec.templateRef", + "in": "path", + "required": true, + "type": "string", + "pattern": "template/[^/]+" + }, + { + "name": "metadata.name", + "description": "name of the resource", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "apiVersion", + "description": "API Version. API Version of the resource", + "in": "query", + "required": false, + "type": "string", + "default": "infra.k8smgmt.io/v3" + }, + { + "name": "kind", + "description": "Kind. Kind of the resource", + "in": "query", + "required": false, + "type": "string", + "default": "BootstrapAgent" + }, + { + "name": "metadata.displayName", + "description": "Display Name. display name of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.description", + "description": "Description. description of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.project", + "description": "Project. Project of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.organization", + "description": "Organization. Organization to which the resource belongs", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.partner", + "description": "Partner. Partner to which the resource belongs", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.id", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.modifiedAt", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "spec.token", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.agentMode", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "InCluster", + "OutOfCluster" + ], + "default": "InCluster" + }, + { + "name": "status.tokenState", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "NotSet", + "NotRegistered", + "NotApproved", + "Approved" + ], + "default": "NotSet" + }, + { + "name": "status.ipAddress", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "status.lastCheckedIn", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "status.fingerprint", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "Bootstrap" + ] + }, + "delete": { + "operationId": "Bootstrap_DeleteBootstrapAgent", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/rpcDeleteBootstrapAgentResponse" + } + }, + "403": { + "description": "Returned when the user does not have permission to access the resource.", + "schema": {} + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": {} + }, + "500": { + "description": "Returned for internal server error", + "schema": {} + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "spec.templateRef", + "in": "path", + "required": true, + "type": "string", + "pattern": "template/[^/]+" + }, + { + "name": "metadata.name", + "description": "name of the resource", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "apiVersion", + "description": "API Version. API Version of the resource", + "in": "query", + "required": false, + "type": "string", + "default": "infra.k8smgmt.io/v3" + }, + { + "name": "kind", + "description": "Kind. Kind of the resource", + "in": "query", + "required": false, + "type": "string", + "default": "BootstrapAgent" + }, + { + "name": "metadata.displayName", + "description": "Display Name. display name of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.description", + "description": "Description. description of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.project", + "description": "Project. Project of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.organization", + "description": "Organization. Organization to which the resource belongs", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.partner", + "description": "Partner. Partner to which the resource belongs", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.id", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.modifiedAt", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "spec.token", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.agentMode", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "InCluster", + "OutOfCluster" + ], + "default": "InCluster" + }, + { + "name": "status.tokenState", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "NotSet", + "NotRegistered", + "NotApproved", + "Approved" + ], + "default": "NotSet" + }, + { + "name": "status.ipAddress", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "status.lastCheckedIn", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "status.fingerprint", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "Bootstrap" + ] + }, + "put": { + "operationId": "Bootstrap_UpdateBootstrapAgent", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/sentryBootstrapAgent" + } + }, + "403": { + "description": "Returned when the user does not have permission to access the resource.", + "schema": {} + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": {} + }, + "500": { + "description": "Returned for internal server error", + "schema": {} + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "spec.templateRef", + "in": "path", + "required": true, + "type": "string", + "pattern": "template/[^/]+" + }, + { + "name": "metadata.name", + "description": "name of the resource", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/sentryBootstrapAgent" + } + } + ], + "tags": [ + "Bootstrap" + ] + } + }, + "/v2/sentry/bootstrap/{spec.templateRef}/agent/{metadata.name}/config": { + "get": { + "operationId": "Bootstrap_GetBootstrapAgentConfig", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v3HttpBody" + } + }, + "403": { + "description": "Returned when the user does not have permission to access the resource.", + "schema": {} + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": {} + }, + "500": { + "description": "Returned for internal server error", + "schema": {} + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "spec.templateRef", + "in": "path", + "required": true, + "type": "string", + "pattern": "template/[^/]+" + }, + { + "name": "metadata.name", + "description": "name of the resource", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "apiVersion", + "description": "API Version. API Version of the resource", + "in": "query", + "required": false, + "type": "string", + "default": "infra.k8smgmt.io/v3" + }, + { + "name": "kind", + "description": "Kind. Kind of the resource", + "in": "query", + "required": false, + "type": "string", + "default": "BootstrapAgent" + }, + { + "name": "metadata.displayName", + "description": "Display Name. display name of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.description", + "description": "Description. description of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.project", + "description": "Project. Project of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.organization", + "description": "Organization. Organization to which the resource belongs", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.partner", + "description": "Partner. Partner to which the resource belongs", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.id", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.modifiedAt", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "spec.token", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "spec.agentMode", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "InCluster", + "OutOfCluster" + ], + "default": "InCluster" + }, + { + "name": "status.tokenState", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "NotSet", + "NotRegistered", + "NotApproved", + "Approved" + ], + "default": "NotSet" + }, + { + "name": "status.ipAddress", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "status.lastCheckedIn", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "status.fingerprint", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "Bootstrap" + ] + } + }, + "/v2/sentry/bootstrap/{templateScope}/agent": { + "get": { + "operationId": "Bootstrap_GetBootstrapAgents", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/sentryBootstrapAgentList" + } + }, + "403": { + "description": "Returned when the user does not have permission to access the resource.", + "schema": {} + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": {} + }, + "500": { + "description": "Returned for internal server error", + "schema": {} + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "templateScope", + "in": "path", + "required": true, + "type": "string", + "pattern": "template/[^/]+" + }, + { + "name": "opts.name", + "description": "name is unique ID of a resource along with (partnerID, organizationID,\nprojectID).", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.selector", + "description": "selector is used to filter the labels of a resource.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.partner", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.organization", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.project", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.displayName", + "description": "displayName only used for update queries to set displayName (READONLY).", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.count", + "in": "query", + "required": false, + "type": "string", + "format": "int64" + }, + { + "name": "opts.offset", + "in": "query", + "required": false, + "type": "string", + "format": "int64" + }, + { + "name": "opts.limit", + "in": "query", + "required": false, + "type": "string", + "format": "int64" + }, + { + "name": "opts.ignoreScopeDefault", + "description": "ignoreScopeDefault ignores default values for partnerID, organizationID and\nprojectID.", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "opts.globalScope", + "description": "globalScope sets partnerID,organizationID,projectID = 0.", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "opts.orderBy", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.order", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.deleted", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "opts.extended", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "opts.urlScope", + "description": "urlScope is supposed to be passed in the URL as kind/HashID(value).", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.isSSOUser", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "opts.username", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.groups", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "opts.blueprintRef", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.publishedVersion", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.clusterID", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.ID", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.account", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "Bootstrap" + ] + } + }, + "/v2/sentry/bootstrap/{templateToken}/register": { + "post": { + "operationId": "Bootstrap_RegisterBootstrapAgent", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/rpcRegisterAgentResponse" + } + }, + "403": { + "description": "Returned when the user does not have permission to access the resource.", + "schema": {} + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": {} + }, + "500": { + "description": "Returned for internal server error", + "schema": {} + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "templateToken", + "in": "path", + "required": true, + "type": "string", + "pattern": "template/[^/]+" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "properties": { + "templateName": { + "type": "string" + }, + "token": { + "type": "string" + }, + "csr": { + "type": "string", + "format": "byte" + }, + "ipAddress": { + "type": "string" + }, + "name": { + "type": "string" + } + } + } + } + ], + "tags": [ + "Bootstrap" + ] + } + } + }, + "definitions": { + "googlerpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcDeleteBootstrapAgentResponse": { + "type": "object" + }, + "rpcRegisterAgentResponse": { + "type": "object", + "properties": { + "certificate": { + "type": "string", + "format": "byte" + }, + "caCertificate": { + "type": "string", + "format": "byte" + } + } + }, + "sentryBootStrapAgentStatus": { + "type": "object", + "properties": { + "tokenState": { + "$ref": "#/definitions/sentryBootstrapAgentState" + }, + "ipAddress": { + "type": "string" + }, + "lastCheckedIn": { + "type": "string", + "format": "date-time" + }, + "fingerprint": { + "type": "string" + } + } + }, + "sentryBootstrapAgent": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "default": "infra.k8smgmt.io/v3", + "description": "API Version of the resource", + "title": "API Version", + "readOnly": true + }, + "kind": { + "type": "string", + "default": "BootstrapAgent", + "description": "Kind of the resource", + "title": "Kind", + "readOnly": true + }, + "metadata": { + "$ref": "#/definitions/v3Metadata", + "description": "Metadata of the resource", + "title": "Metadata" + }, + "spec": { + "$ref": "#/definitions/sentryBootstrapAgentSpec" + }, + "status": { + "$ref": "#/definitions/sentryBootStrapAgentStatus" + } + } + }, + "sentryBootstrapAgentList": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "default": "infra.k8smgmt.io/v3", + "description": "API Version of the list resource", + "title": "API Version", + "readOnly": true + }, + "kind": { + "type": "string", + "default": "BootstrapAgentList", + "description": "Kind of the list resource", + "title": "Kind", + "readOnly": true + }, + "metadata": { + "$ref": "#/definitions/v3ListMetadata", + "description": "Metadata of the list resource", + "title": "ListMetadata", + "readOnly": true + }, + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/sentryBootstrapAgent" + } + } + }, + "title": "BootstrapAgentList is a list of bootstrap agents" + }, + "sentryBootstrapAgentMode": { + "type": "string", + "enum": [ + "InCluster", + "OutOfCluster" + ], + "default": "InCluster" + }, + "sentryBootstrapAgentSpec": { + "type": "object", + "properties": { + "token": { + "type": "string" + }, + "templateRef": { + "type": "string" + }, + "agentMode": { + "$ref": "#/definitions/sentryBootstrapAgentMode" + } + } + }, + "sentryBootstrapAgentState": { + "type": "string", + "enum": [ + "NotSet", + "NotRegistered", + "NotApproved", + "Approved" + ], + "default": "NotSet" + }, + "sentryBootstrapAgentTemplate": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "default": "infra.k8smgmt.io/v3", + "description": "API Version of the resource", + "title": "API Version", + "readOnly": true + }, + "kind": { + "type": "string", + "default": "BootstrapAgentTemplate", + "description": "Kind of the resource", + "title": "Kind", + "readOnly": true + }, + "metadata": { + "$ref": "#/definitions/v3Metadata", + "description": "Metadata of the resource", + "title": "Metadata" + }, + "spec": { + "$ref": "#/definitions/sentryBootstrapAgentTemplateSpec" + }, + "status": { + "$ref": "#/definitions/sentryBootstrapAgentTemplateStatus" + } + } + }, + "sentryBootstrapAgentTemplateList": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "default": "infra.k8smgmt.io/v3", + "description": "API Version of the list resource", + "title": "API Version", + "readOnly": true + }, + "kind": { + "type": "string", + "default": "BootstrapAgentTemplateList", + "description": "Kind of the list resource", + "title": "Kind", + "readOnly": true + }, + "metadata": { + "$ref": "#/definitions/v3ListMetadata", + "description": "Metadata of the list resource", + "title": "ListMetadata", + "readOnly": true + }, + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/sentryBootstrapAgentTemplate" + } + } + } + }, + "sentryBootstrapAgentTemplateSpec": { + "type": "object", + "properties": { + "infraRef": { + "type": "string" + }, + "autoRegister": { + "type": "boolean" + }, + "ignoreMultipleRegister": { + "type": "boolean" + }, + "autoApprove": { + "type": "boolean" + }, + "templateType": { + "$ref": "#/definitions/sentryBootstrapAgentTemplateType" + }, + "token": { + "type": "string" + }, + "hosts": { + "type": "array", + "items": { + "$ref": "#/definitions/sentryBootstrapTemplateHost" + } + }, + "inClusterTemplate": { + "type": "string" + }, + "outOfClusterTemplate": { + "type": "string" + } + } + }, + "sentryBootstrapAgentTemplateStatus": { + "type": "object" + }, + "sentryBootstrapAgentTemplateType": { + "type": "string", + "enum": [ + "TemplateTypeNotSet", + "Client", + "Server", + "Mixed" + ], + "default": "TemplateTypeNotSet" + }, + "sentryBootstrapInfra": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "default": "infra.k8smgmt.io/v3", + "description": "API Version of the resource", + "title": "API Version", + "readOnly": true + }, + "kind": { + "type": "string", + "default": "BootstrapInfra", + "description": "Kind of the resource", + "title": "Kind", + "readOnly": true + }, + "metadata": { + "$ref": "#/definitions/v3Metadata", + "description": "Metadata of the resource", + "title": "Metadata" + }, + "spec": { + "$ref": "#/definitions/sentryBootstrapInfraSpec" + }, + "status": { + "$ref": "#/definitions/sentryBootstrapInfraStatus" + } + } + }, + "sentryBootstrapInfraSpec": { + "type": "object", + "properties": { + "caCert": { + "type": "string" + }, + "caKey": { + "type": "string" + }, + "caKeyPass": { + "type": "string" + } + } + }, + "sentryBootstrapInfraStatus": { + "type": "object" + }, + "sentryBootstrapTemplateHost": { + "type": "object", + "properties": { + "host": { + "type": "string" + }, + "type": { + "$ref": "#/definitions/sentryBootstrapTemplateHostType" + } + } + }, + "sentryBootstrapTemplateHostType": { + "type": "string", + "enum": [ + "HostTypeNotSet", + "HostTypeInternal", + "HostTypeExternal" + ], + "default": "HostTypeNotSet" + }, + "v3HttpBody": { + "type": "object", + "properties": { + "contentType": { + "type": "string", + "description": "The HTTP Content-Type header value specifying the content type of the body." + }, + "data": { + "type": "string", + "format": "byte", + "description": "The HTTP request/response body as raw binary." + } + }, + "title": "HttpBody represents arbitrary HTTP Body. It should only be used for\npayload formats that can't be represented as JSON" + }, + "v3ListMetadata": { + "type": "object", + "properties": { + "count": { + "type": "string", + "format": "int64" + }, + "offset": { + "type": "string", + "format": "int64" + }, + "limit": { + "type": "string", + "format": "int64" + } + }, + "title": "$title: ListMetadata\n$description: metadata for a list of resources\n$required: enabled" + }, + "v3Metadata": { + "type": "object", + "example": { + "name": "some-name", + "project": "defaultproject" + }, + "properties": { + "name": { + "type": "string", + "description": "name of the resource", + "title": "Name" + }, + "displayName": { + "type": "string", + "description": "display name of the resource", + "title": "Display Name" + }, + "description": { + "type": "string", + "description": "description of the resource", + "title": "Description" + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "labels of the resource", + "title": "Lables" + }, + "annotations": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "annotations of the resource", + "title": "Annotations" + }, + "project": { + "type": "string", + "description": "Project of the resource", + "title": "Project" + }, + "organization": { + "type": "string", + "description": "Organization to which the resource belongs", + "title": "Organization" + }, + "partner": { + "type": "string", + "description": "Partner to which the resource belongs", + "title": "Partner" + }, + "id": { + "type": "string", + "readOnly": true + }, + "modifiedAt": { + "type": "string", + "format": "date-time", + "readOnly": true + } + }, + "description": "metadata of the resource", + "title": "Metadata", + "required": [ + "name", + "project" + ] + }, + "v3QueryOptions": { + "type": "object", + "properties": { + "name": { + "type": "string", + "title": "name is unique ID of a resource along with (partnerID, organizationID,\nprojectID)" + }, + "selector": { + "type": "string", + "title": "selector is used to filter the labels of a resource" + }, + "partner": { + "type": "string" + }, + "organization": { + "type": "string" + }, + "project": { + "type": "string" + }, + "displayName": { + "type": "string", + "title": "displayName only used for update queries to set displayName (READONLY)" + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "labels only used for update queries to set labels (READONLY)" + }, + "annotations": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "annotations only used for update queries to set annotations (READONLY)" + }, + "count": { + "type": "string", + "format": "int64" + }, + "offset": { + "type": "string", + "format": "int64" + }, + "limit": { + "type": "string", + "format": "int64" + }, + "ignoreScopeDefault": { + "type": "boolean", + "title": "ignoreScopeDefault ignores default values for partnerID, organizationID and\nprojectID" + }, + "globalScope": { + "type": "boolean", + "title": "globalScope sets partnerID,organizationID,projectID = 0" + }, + "orderBy": { + "type": "string" + }, + "order": { + "type": "string" + }, + "deleted": { + "type": "boolean" + }, + "extended": { + "type": "boolean" + }, + "urlScope": { + "type": "string", + "title": "urlScope is supposed to be passed in the URL as kind/HashID(value)" + }, + "isSSOUser": { + "type": "boolean" + }, + "username": { + "type": "string" + }, + "groups": { + "type": "array", + "items": { + "type": "string" + } + }, + "blueprintRef": { + "type": "string" + }, + "publishedVersion": { + "type": "string" + }, + "clusterID": { + "type": "string" + }, + "ID": { + "type": "string" + }, + "account": { + "type": "string" + } + }, + "title": "QueryOptions is the options for performing queries on resources" + } + }, + "securityDefinitions": { + "ApiKeyAuth": { + "type": "apiKey", + "name": "X-RAFAY-API-KEYID", + "in": "header" + }, + "BasicAuth": { + "type": "basic" + } + }, + "security": [ + { + "ApiKeyAuth": [], + "BasicAuth": [] + } + ] +} diff --git a/components/common/gen/openapi/proto/rpc/sentry/cluster_authz.swagger.json b/components/common/gen/openapi/proto/rpc/sentry/cluster_authz.swagger.json new file mode 100644 index 0000000..1f7fbfb --- /dev/null +++ b/components/common/gen/openapi/proto/rpc/sentry/cluster_authz.swagger.json @@ -0,0 +1,399 @@ +{ + "swagger": "2.0", + "info": { + "title": "Sentry Cluster Authorization Service", + "version": "2.0", + "contact": { + "name": "Rafay Dev" + } + }, + "tags": [ + { + "name": "ClusterAuthorization" + } + ], + "schemes": [ + "https" + ], + "consumes": [ + "application/json", + "application/yaml" + ], + "produces": [ + "application/json", + "application/yaml" + ], + "paths": { + "/v2/sentry/authorization/user": { + "get": { + "operationId": "ClusterAuthorization_GetUserAuthorization", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/rpcGetUserAuthorizationResponse" + } + }, + "403": { + "description": "Returned when the user does not have permission to access the resource.", + "schema": {} + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": { + "type": "string", + "format": "string" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "userCN", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "clusterID", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "certIssueSeconds", + "in": "query", + "required": false, + "type": "string", + "format": "int64" + } + ], + "tags": [ + "ClusterAuthorization" + ] + } + } + }, + "definitions": { + "controllerStepObject": { + "type": "object", + "properties": { + "typeMeta": { + "$ref": "#/definitions/metav1TypeMeta" + }, + "objectMeta": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "name": { + "type": "string" + }, + "raw": { + "type": "string", + "format": "byte" + } + }, + "title": "+kubebuilder:object:generate=true\nStepObject can represent any kubernetes object" + }, + "googlerpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "metav1TypeMeta": { + "type": "object", + "properties": { + "kind": { + "type": "string", + "title": "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\n+optional" + }, + "apiVersion": { + "type": "string", + "title": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\n+optional" + } + }, + "description": "TypeMeta describes an individual object in an API response or request\nwith strings representing the type of the object and its API schema version.\nStructures that are versioned or persisted should inline TypeMeta.\n\n+k8s:deepcopy-gen=false" + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcGetUserAuthorizationResponse": { + "type": "object", + "properties": { + "userName": { + "type": "string" + }, + "serviceAccount": { + "$ref": "#/definitions/controllerStepObject" + }, + "clusterRoles": { + "type": "array", + "items": { + "$ref": "#/definitions/controllerStepObject" + } + }, + "clusterRoleBindings": { + "type": "array", + "items": { + "$ref": "#/definitions/controllerStepObject" + } + }, + "roles": { + "type": "array", + "items": { + "$ref": "#/definitions/controllerStepObject" + } + }, + "roleBindings": { + "type": "array", + "items": { + "$ref": "#/definitions/controllerStepObject" + } + }, + "deleteClusterRoleBindings": { + "type": "array", + "items": { + "$ref": "#/definitions/controllerStepObject" + } + }, + "deleteRoleBindings": { + "type": "array", + "items": { + "$ref": "#/definitions/controllerStepObject" + } + }, + "namespaces": { + "type": "array", + "items": { + "$ref": "#/definitions/controllerStepObject" + } + }, + "roleName": { + "type": "string" + }, + "isRead": { + "type": "boolean" + }, + "enforceOrgAdminOnlySecretAccess": { + "type": "boolean" + }, + "isOrgAdmin": { + "type": "boolean" + } + } + }, + "v1FieldsV1": { + "type": "object", + "properties": { + "Raw": { + "type": "string", + "format": "byte", + "description": "Raw is the underlying serialization of this object." + } + }, + "description": "FieldsV1 stores a set of fields in a data structure like a Trie, in JSON format.\n\nEach key is either a '.' representing the field itself, and will always map to an empty set,\nor a string representing a sub-field or item. The string will follow one of these four formats:\n'f:\u003cname\u003e', where \u003cname\u003e is the name of a field in a struct, or key in a map\n'v:\u003cvalue\u003e', where \u003cvalue\u003e is the exact json formatted value of a list item\n'i:\u003cindex\u003e', where \u003cindex\u003e is position of a item in a list\n'k:\u003ckeys\u003e', where \u003ckeys\u003e is a map of a list item's key fields to their unique values\nIf a key maps to an empty Fields value, the field that key represents is part of the set.\n\nThe exact format is defined in sigs.k8s.io/structured-merge-diff\n+protobuf.options.(gogoproto.goproto_stringer)=false" + }, + "v1ManagedFieldsEntry": { + "type": "object", + "properties": { + "manager": { + "type": "string", + "description": "Manager is an identifier of the workflow managing these fields." + }, + "operation": { + "type": "string", + "description": "Operation is the type of operation which lead to this ManagedFieldsEntry being created.\nThe only valid values for this field are 'Apply' and 'Update'." + }, + "apiVersion": { + "type": "string", + "description": "APIVersion defines the version of this resource that this field set\napplies to. The format is \"group/version\" just like the top-level\nAPIVersion field. It is necessary to track the version of a field\nset because it cannot be automatically converted." + }, + "time": { + "$ref": "#/definitions/v1Time", + "title": "Time is timestamp of when these fields were set. It should always be empty if Operation is 'Apply'\n+optional" + }, + "fieldsType": { + "type": "string", + "title": "FieldsType is the discriminator for the different fields format and version.\nThere is currently only one possible value: \"FieldsV1\"" + }, + "fieldsV1": { + "$ref": "#/definitions/v1FieldsV1", + "title": "FieldsV1 holds the first JSON version format as described in the \"FieldsV1\" type.\n+optional" + } + }, + "description": "ManagedFieldsEntry is a workflow-id, a FieldSet and the group version of the resource\nthat the fieldset applies to." + }, + "v1ObjectMeta": { + "type": "object", + "properties": { + "name": { + "type": "string", + "title": "Name must be unique within a namespace. Is required when creating resources, although\nsome resources may allow a client to request the generation of an appropriate name\nautomatically. Name is primarily intended for creation idempotence and configuration\ndefinition.\nCannot be updated.\nMore info: http://kubernetes.io/docs/user-guide/identifiers#names\n+optional" + }, + "generateName": { + "type": "string", + "description": "GenerateName is an optional prefix, used by the server, to generate a unique\nname ONLY IF the Name field has not been provided.\nIf this field is used, the name returned to the client will be different\nthan the name passed. This value will also be combined with a unique suffix.\nThe provided value has the same validation rules as the Name field,\nand may be truncated by the length of the suffix required to make the value\nunique on the server.\n\nIf this field is specified and the generated name exists, the server will\nNOT return a 409 - instead, it will either return 201 Created or 500 with Reason\nServerTimeout indicating a unique name could not be found in the time allotted, and the client\nshould retry (optionally after the time indicated in the Retry-After header).\n\nApplied only if Name is not specified.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency\n+optional" + }, + "namespace": { + "type": "string", + "description": "Namespace defines the space within which each name must be unique. An empty namespace is\nequivalent to the \"default\" namespace, but \"default\" is the canonical representation.\nNot all objects are required to be scoped to a namespace - the value of this field for\nthose objects will be empty.\n\nMust be a DNS_LABEL.\nCannot be updated.\nMore info: http://kubernetes.io/docs/user-guide/namespaces\n+optional" + }, + "selfLink": { + "type": "string", + "description": "SelfLink is a URL representing this object.\nPopulated by the system.\nRead-only.\n\nDEPRECATED\nKubernetes will stop propagating this field in 1.20 release and the field is planned\nto be removed in 1.21 release.\n+optional" + }, + "uid": { + "type": "string", + "description": "UID is the unique in time and space value for this object. It is typically generated by\nthe server on successful creation of a resource and is not allowed to change on PUT\noperations.\n\nPopulated by the system.\nRead-only.\nMore info: http://kubernetes.io/docs/user-guide/identifiers#uids\n+optional" + }, + "resourceVersion": { + "type": "string", + "description": "An opaque value that represents the internal version of this object that can\nbe used by clients to determine when objects have changed. May be used for optimistic\nconcurrency, change detection, and the watch operation on a resource or set of resources.\nClients must treat these values as opaque and passed unmodified back to the server.\nThey may only be valid for a particular resource or set of resources.\n\nPopulated by the system.\nRead-only.\nValue must be treated as opaque by clients and .\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency\n+optional" + }, + "generation": { + "type": "string", + "format": "int64", + "title": "A sequence number representing a specific generation of the desired state.\nPopulated by the system. Read-only.\n+optional" + }, + "creationTimestamp": { + "$ref": "#/definitions/v1Time", + "description": "CreationTimestamp is a timestamp representing the server time when this object was\ncreated. It is not guaranteed to be set in happens-before order across separate operations.\nClients may not set this value. It is represented in RFC3339 form and is in UTC.\n\nPopulated by the system.\nRead-only.\nNull for lists.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\n+optional" + }, + "deletionTimestamp": { + "$ref": "#/definitions/v1Time", + "description": "DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This\nfield is set by the server when a graceful deletion is requested by the user, and is not\ndirectly settable by a client. The resource is expected to be deleted (no longer visible\nfrom resource lists, and not reachable by name) after the time in this field, once the\nfinalizers list is empty. As long as the finalizers list contains items, deletion is blocked.\nOnce the deletionTimestamp is set, this value may not be unset or be set further into the\nfuture, although it may be shortened or the resource may be deleted prior to this time.\nFor example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react\nby sending a graceful termination signal to the containers in the pod. After that 30 seconds,\nthe Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup,\nremove the pod from the API. In the presence of network partitions, this object may still\nexist after this timestamp, until an administrator or automated process can determine the\nresource is fully terminated.\nIf not set, graceful deletion of the object has not been requested.\n\nPopulated by the system when a graceful deletion is requested.\nRead-only.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\n+optional" + }, + "deletionGracePeriodSeconds": { + "type": "string", + "format": "int64", + "title": "Number of seconds allowed for this object to gracefully terminate before\nit will be removed from the system. Only set when deletionTimestamp is also set.\nMay only be shortened.\nRead-only.\n+optional" + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Map of string keys and values that can be used to organize and categorize\n(scope and select) objects. May match selectors of replication controllers\nand services.\nMore info: http://kubernetes.io/docs/user-guide/labels\n+optional" + }, + "annotations": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Annotations is an unstructured key value map stored with a resource that may be\nset by external tools to store and retrieve arbitrary metadata. They are not\nqueryable and should be preserved when modifying objects.\nMore info: http://kubernetes.io/docs/user-guide/annotations\n+optional" + }, + "ownerReferences": { + "type": "array", + "items": { + "$ref": "#/definitions/v1OwnerReference" + }, + "title": "List of objects depended by this object. If ALL objects in the list have\nbeen deleted, this object will be garbage collected. If this object is managed by a controller,\nthen an entry in this list will point to this controller, with the controller field set to true.\nThere cannot be more than one managing controller.\n+optional\n+patchMergeKey=uid\n+patchStrategy=merge" + }, + "finalizers": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Must be empty before the object is deleted from the registry. Each entry\nis an identifier for the responsible component that will remove the entry\nfrom the list. If the deletionTimestamp of the object is non-nil, entries\nin this list can only be removed.\nFinalizers may be processed and removed in any order. Order is NOT enforced\nbecause it introduces significant risk of stuck finalizers.\nfinalizers is a shared field, any actor with permission can reorder it.\nIf the finalizer list is processed in order, then this can lead to a situation\nin which the component responsible for the first finalizer in the list is\nwaiting for a signal (field value, external system, or other) produced by a\ncomponent responsible for a finalizer later in the list, resulting in a deadlock.\nWithout enforced ordering finalizers are free to order amongst themselves and\nare not vulnerable to ordering changes in the list.\n+optional\n+patchStrategy=merge" + }, + "clusterName": { + "type": "string", + "title": "The name of the cluster which the object belongs to.\nThis is used to distinguish resources with same name and namespace in different clusters.\nThis field is not set anywhere right now and apiserver is going to ignore it if set in create or update request.\n+optional" + }, + "managedFields": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ManagedFieldsEntry" + }, + "description": "ManagedFields maps workflow-id and version to the set of fields\nthat are managed by that workflow. This is mostly for internal\nhousekeeping, and users typically shouldn't need to set or\nunderstand this field. A workflow can be the user's name, a\ncontroller's name, or the name of a specific apply path like\n\"ci-cd\". The set of fields is always in the version that the\nworkflow used when modifying the object.\n\n+optional" + } + }, + "description": "ObjectMeta is metadata that all persisted resources must have, which includes all objects\nusers must create." + }, + "v1OwnerReference": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "description": "API version of the referent." + }, + "kind": { + "type": "string", + "title": "Kind of the referent.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" + }, + "name": { + "type": "string", + "title": "Name of the referent.\nMore info: http://kubernetes.io/docs/user-guide/identifiers#names" + }, + "uid": { + "type": "string", + "title": "UID of the referent.\nMore info: http://kubernetes.io/docs/user-guide/identifiers#uids" + }, + "controller": { + "type": "boolean", + "title": "If true, this reference points to the managing controller.\n+optional" + }, + "blockOwnerDeletion": { + "type": "boolean", + "title": "If true, AND if the owner has the \"foregroundDeletion\" finalizer, then\nthe owner cannot be deleted from the key-value store until this\nreference is removed.\nDefaults to false.\nTo set this field, a user needs \"delete\" permission of the owner,\notherwise 422 (Unprocessable Entity) will be returned.\n+optional" + } + }, + "description": "OwnerReference contains enough information to let you identify an owning\nobject. An owning object must be in the same namespace as the dependent, or\nbe cluster-scoped, so there is no namespace field." + }, + "v1Time": { + "type": "object", + "properties": { + "seconds": { + "type": "string", + "format": "int64", + "description": "Represents seconds of UTC time since Unix epoch\n1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to\n9999-12-31T23:59:59Z inclusive." + }, + "nanos": { + "type": "integer", + "format": "int32", + "description": "Non-negative fractions of a second at nanosecond resolution. Negative\nsecond values with fractions must still have non-negative nanos values\nthat count forward in time. Must be from 0 to 999,999,999\ninclusive. This field may be limited in precision depending on context." + } + }, + "description": "Time is a wrapper around time.Time which supports correct\nmarshaling to YAML and JSON. Wrappers are provided for many\nof the factory methods that the time package offers.\n\n+protobuf.options.marshal=false\n+protobuf.as=Timestamp\n+protobuf.options.(gogoproto.goproto_stringer)=false" + } + }, + "securityDefinitions": { + "ApiKeyAuth": { + "type": "apiKey", + "name": "X-RAFAY-API-KEYID", + "in": "header" + }, + "BasicAuth": { + "type": "basic" + } + }, + "security": [ + { + "ApiKeyAuth": [], + "BasicAuth": [] + } + ] +} diff --git a/components/common/gen/openapi/proto/rpc/sentry/kubeconfig.swagger.json b/components/common/gen/openapi/proto/rpc/sentry/kubeconfig.swagger.json new file mode 100644 index 0000000..884469b --- /dev/null +++ b/components/common/gen/openapi/proto/rpc/sentry/kubeconfig.swagger.json @@ -0,0 +1,1882 @@ +{ + "swagger": "2.0", + "info": { + "title": "Sentry KubeConfig Service", + "version": "2.0", + "contact": { + "name": "Rafay Dev" + } + }, + "tags": [ + { + "name": "KubeConfig" + } + ], + "schemes": [ + "https" + ], + "consumes": [ + "application/json", + "application/yaml" + ], + "produces": [ + "application/json", + "application/yaml" + ], + "paths": { + "/v2/sentry/kubeconfig/clustersystemsession": { + "get": { + "operationId": "KubeConfig_GetForClusterSystemSession", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v3HttpBody" + } + }, + "403": { + "description": "Returned when the user does not have permission to access the resource.", + "schema": {} + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": { + "type": "string", + "format": "string" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "opts.name", + "description": "name is unique ID of a resource along with (partnerID, organizationID,\nprojectID).", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.selector", + "description": "selector is used to filter the labels of a resource.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.partner", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.organization", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.project", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.displayName", + "description": "displayName only used for update queries to set displayName (READONLY).", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.count", + "in": "query", + "required": false, + "type": "string", + "format": "int64" + }, + { + "name": "opts.offset", + "in": "query", + "required": false, + "type": "string", + "format": "int64" + }, + { + "name": "opts.limit", + "in": "query", + "required": false, + "type": "string", + "format": "int64" + }, + { + "name": "opts.ignoreScopeDefault", + "description": "ignoreScopeDefault ignores default values for partnerID, organizationID and\nprojectID.", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "opts.globalScope", + "description": "globalScope sets partnerID,organizationID,projectID = 0.", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "opts.orderBy", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.order", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.deleted", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "opts.extended", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "opts.urlScope", + "description": "urlScope is supposed to be passed in the URL as kind/HashID(value).", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.isSSOUser", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "opts.username", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.groups", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "opts.blueprintRef", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.publishedVersion", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.clusterID", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.ID", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.account", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "namespace", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "systemUser", + "in": "query", + "required": false, + "type": "boolean" + } + ], + "tags": [ + "KubeConfig" + ] + } + }, + "/v2/sentry/kubeconfig/clusterwebsession": { + "get": { + "operationId": "KubeConfig_GetForClusterWebSession", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v3HttpBody" + } + }, + "403": { + "description": "Returned when the user does not have permission to access the resource.", + "schema": {} + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": { + "type": "string", + "format": "string" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "opts.name", + "description": "name is unique ID of a resource along with (partnerID, organizationID,\nprojectID).", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.selector", + "description": "selector is used to filter the labels of a resource.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.partner", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.organization", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.project", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.displayName", + "description": "displayName only used for update queries to set displayName (READONLY).", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.count", + "in": "query", + "required": false, + "type": "string", + "format": "int64" + }, + { + "name": "opts.offset", + "in": "query", + "required": false, + "type": "string", + "format": "int64" + }, + { + "name": "opts.limit", + "in": "query", + "required": false, + "type": "string", + "format": "int64" + }, + { + "name": "opts.ignoreScopeDefault", + "description": "ignoreScopeDefault ignores default values for partnerID, organizationID and\nprojectID.", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "opts.globalScope", + "description": "globalScope sets partnerID,organizationID,projectID = 0.", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "opts.orderBy", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.order", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.deleted", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "opts.extended", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "opts.urlScope", + "description": "urlScope is supposed to be passed in the URL as kind/HashID(value).", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.isSSOUser", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "opts.username", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.groups", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "opts.blueprintRef", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.publishedVersion", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.clusterID", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.ID", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.account", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "namespace", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "systemUser", + "in": "query", + "required": false, + "type": "boolean" + } + ], + "tags": [ + "KubeConfig" + ] + } + }, + "/v2/sentry/kubeconfig/revoke": { + "post": { + "operationId": "KubeConfig_RevokeKubeconfig", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/rpcRevokeKubeconfigResponse" + } + }, + "403": { + "description": "Returned when the user does not have permission to access the resource.", + "schema": {} + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": { + "type": "string", + "format": "string" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/rpcRevokeKubeconfigRequest" + } + } + ], + "tags": [ + "KubeConfig" + ] + } + }, + "/v2/sentry/kubeconfig/user": { + "get": { + "operationId": "KubeConfig_GetForUser", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v3HttpBody" + } + }, + "403": { + "description": "Returned when the user does not have permission to access the resource.", + "schema": {} + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": { + "type": "string", + "format": "string" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "opts.name", + "description": "name is unique ID of a resource along with (partnerID, organizationID,\nprojectID).", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.selector", + "description": "selector is used to filter the labels of a resource.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.partner", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.organization", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.project", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.displayName", + "description": "displayName only used for update queries to set displayName (READONLY).", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.count", + "in": "query", + "required": false, + "type": "string", + "format": "int64" + }, + { + "name": "opts.offset", + "in": "query", + "required": false, + "type": "string", + "format": "int64" + }, + { + "name": "opts.limit", + "in": "query", + "required": false, + "type": "string", + "format": "int64" + }, + { + "name": "opts.ignoreScopeDefault", + "description": "ignoreScopeDefault ignores default values for partnerID, organizationID and\nprojectID.", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "opts.globalScope", + "description": "globalScope sets partnerID,organizationID,projectID = 0.", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "opts.orderBy", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.order", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.deleted", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "opts.extended", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "opts.urlScope", + "description": "urlScope is supposed to be passed in the URL as kind/HashID(value).", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.isSSOUser", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "opts.username", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.groups", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "opts.blueprintRef", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.publishedVersion", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.clusterID", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.ID", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.account", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "namespace", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "KubeConfig" + ] + } + }, + "/v2/sentry/kubeconfig/{opts.urlScope_1}/setting": { + "get": { + "operationId": "KubeConfig_GetOrganizationSetting", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/rpcGetKubeconfigSettingResponse" + } + }, + "403": { + "description": "Returned when the user does not have permission to access the resource.", + "schema": {} + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": { + "type": "string", + "format": "string" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "opts.urlScope", + "description": "urlScope is supposed to be passed in the URL as kind/HashID(value)", + "in": "path", + "required": true, + "type": "string", + "pattern": "organization/[^/]+" + }, + { + "name": "opts.name", + "description": "name is unique ID of a resource along with (partnerID, organizationID,\nprojectID).", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.selector", + "description": "selector is used to filter the labels of a resource.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.partner", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.organization", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.project", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.displayName", + "description": "displayName only used for update queries to set displayName (READONLY).", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.count", + "in": "query", + "required": false, + "type": "string", + "format": "int64" + }, + { + "name": "opts.offset", + "in": "query", + "required": false, + "type": "string", + "format": "int64" + }, + { + "name": "opts.limit", + "in": "query", + "required": false, + "type": "string", + "format": "int64" + }, + { + "name": "opts.ignoreScopeDefault", + "description": "ignoreScopeDefault ignores default values for partnerID, organizationID and\nprojectID.", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "opts.globalScope", + "description": "globalScope sets partnerID,organizationID,projectID = 0.", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "opts.orderBy", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.order", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.deleted", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "opts.extended", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "opts.isSSOUser", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "opts.username", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.groups", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "opts.blueprintRef", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.publishedVersion", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.clusterID", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.ID", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.account", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "KubeConfig" + ] + }, + "put": { + "operationId": "KubeConfig_UpdateUserSetting", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/rpcUpdateKubeconfigSettingResponse" + } + }, + "403": { + "description": "Returned when the user does not have permission to access the resource.", + "schema": {} + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": { + "type": "string", + "format": "string" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "opts.urlScope_1", + "description": "urlScope is supposed to be passed in the URL as kind/HashID(value)", + "in": "path", + "required": true, + "type": "string", + "pattern": "user/[^/]+" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/rpcUpdateKubeconfigSettingRequest" + } + } + ], + "tags": [ + "KubeConfig" + ] + } + }, + "/v2/sentry/kubeconfig/{opts.urlScope_2}/setting": { + "get": { + "operationId": "KubeConfig_GetOrganizationSetting", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/rpcGetKubeconfigSettingResponse" + } + }, + "403": { + "description": "Returned when the user does not have permission to access the resource.", + "schema": {} + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": { + "type": "string", + "format": "string" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "opts.urlScope", + "description": "urlScope is supposed to be passed in the URL as kind/HashID(value)", + "in": "path", + "required": true, + "type": "string", + "pattern": "organization/[^/]+" + }, + { + "name": "opts.name", + "description": "name is unique ID of a resource along with (partnerID, organizationID,\nprojectID).", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.selector", + "description": "selector is used to filter the labels of a resource.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.partner", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.organization", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.project", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.displayName", + "description": "displayName only used for update queries to set displayName (READONLY).", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.count", + "in": "query", + "required": false, + "type": "string", + "format": "int64" + }, + { + "name": "opts.offset", + "in": "query", + "required": false, + "type": "string", + "format": "int64" + }, + { + "name": "opts.limit", + "in": "query", + "required": false, + "type": "string", + "format": "int64" + }, + { + "name": "opts.ignoreScopeDefault", + "description": "ignoreScopeDefault ignores default values for partnerID, organizationID and\nprojectID.", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "opts.globalScope", + "description": "globalScope sets partnerID,organizationID,projectID = 0.", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "opts.orderBy", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.order", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.deleted", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "opts.extended", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "opts.isSSOUser", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "opts.username", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.groups", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "opts.blueprintRef", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.publishedVersion", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.clusterID", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.ID", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.account", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "KubeConfig" + ] + }, + "put": { + "operationId": "KubeConfig_UpdateSSOUserSetting", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/rpcUpdateKubeconfigSettingResponse" + } + }, + "403": { + "description": "Returned when the user does not have permission to access the resource.", + "schema": {} + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": { + "type": "string", + "format": "string" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "opts.urlScope_2", + "description": "urlScope is supposed to be passed in the URL as kind/HashID(value)", + "in": "path", + "required": true, + "type": "string", + "pattern": "ssouser/[^/]+" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/rpcUpdateKubeconfigSettingRequest" + } + } + ], + "tags": [ + "KubeConfig" + ] + } + }, + "/v2/sentry/kubeconfig/{opts.urlScope}/download": { + "get": { + "operationId": "KubeConfig_GetForUser2", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v3HttpBody" + } + }, + "403": { + "description": "Returned when the user does not have permission to access the resource.", + "schema": {} + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": { + "type": "string", + "format": "string" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "opts.urlScope", + "description": "urlScope is supposed to be passed in the URL as kind/HashID(value)", + "in": "path", + "required": true, + "type": "string", + "pattern": "user/[^/]+" + }, + { + "name": "opts.name", + "description": "name is unique ID of a resource along with (partnerID, organizationID,\nprojectID).", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.selector", + "description": "selector is used to filter the labels of a resource.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.partner", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.organization", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.project", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.displayName", + "description": "displayName only used for update queries to set displayName (READONLY).", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.count", + "in": "query", + "required": false, + "type": "string", + "format": "int64" + }, + { + "name": "opts.offset", + "in": "query", + "required": false, + "type": "string", + "format": "int64" + }, + { + "name": "opts.limit", + "in": "query", + "required": false, + "type": "string", + "format": "int64" + }, + { + "name": "opts.ignoreScopeDefault", + "description": "ignoreScopeDefault ignores default values for partnerID, organizationID and\nprojectID.", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "opts.globalScope", + "description": "globalScope sets partnerID,organizationID,projectID = 0.", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "opts.orderBy", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.order", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.deleted", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "opts.extended", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "opts.isSSOUser", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "opts.username", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.groups", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "opts.blueprintRef", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.publishedVersion", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.clusterID", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.ID", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.account", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "namespace", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "KubeConfig" + ] + } + }, + "/v2/sentry/kubeconfig/{opts.urlScope}/revoke": { + "post": { + "operationId": "KubeConfig_RevokeKubeconfig2", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/rpcRevokeKubeconfigResponse" + } + }, + "403": { + "description": "Returned when the user does not have permission to access the resource.", + "schema": {} + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": { + "type": "string", + "format": "string" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "opts.urlScope", + "description": "urlScope is supposed to be passed in the URL as kind/HashID(value)", + "in": "path", + "required": true, + "type": "string", + "pattern": "user/[^/]+" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/rpcRevokeKubeconfigRequest" + } + } + ], + "tags": [ + "KubeConfig" + ] + } + }, + "/v2/sentry/kubeconfig/{opts.urlScope}/setting": { + "get": { + "operationId": "KubeConfig_GetOrganizationSetting", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/rpcGetKubeconfigSettingResponse" + } + }, + "403": { + "description": "Returned when the user does not have permission to access the resource.", + "schema": {} + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": { + "type": "string", + "format": "string" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "opts.urlScope", + "description": "urlScope is supposed to be passed in the URL as kind/HashID(value)", + "in": "path", + "required": true, + "type": "string", + "pattern": "organization/[^/]+" + }, + { + "name": "opts.name", + "description": "name is unique ID of a resource along with (partnerID, organizationID,\nprojectID).", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.selector", + "description": "selector is used to filter the labels of a resource.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.partner", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.organization", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.project", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.displayName", + "description": "displayName only used for update queries to set displayName (READONLY).", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.count", + "in": "query", + "required": false, + "type": "string", + "format": "int64" + }, + { + "name": "opts.offset", + "in": "query", + "required": false, + "type": "string", + "format": "int64" + }, + { + "name": "opts.limit", + "in": "query", + "required": false, + "type": "string", + "format": "int64" + }, + { + "name": "opts.ignoreScopeDefault", + "description": "ignoreScopeDefault ignores default values for partnerID, organizationID and\nprojectID.", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "opts.globalScope", + "description": "globalScope sets partnerID,organizationID,projectID = 0.", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "opts.orderBy", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.order", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.deleted", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "opts.extended", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "opts.isSSOUser", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "opts.username", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.groups", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "opts.blueprintRef", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.publishedVersion", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.clusterID", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.ID", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.account", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "KubeConfig" + ] + }, + "put": { + "operationId": "KubeConfig_UpdateOrganizationSetting", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/rpcUpdateKubeconfigSettingResponse" + } + }, + "403": { + "description": "Returned when the user does not have permission to access the resource.", + "schema": {} + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": { + "type": "string", + "format": "string" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "opts.urlScope", + "description": "urlScope is supposed to be passed in the URL as kind/HashID(value)", + "in": "path", + "required": true, + "type": "string", + "pattern": "organization/[^/]+" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/rpcUpdateKubeconfigSettingRequest" + } + } + ], + "tags": [ + "KubeConfig" + ] + } + } + }, + "definitions": { + "googlerpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcGetKubeconfigSettingResponse": { + "type": "object", + "properties": { + "validitySeconds": { + "type": "string", + "format": "int64" + }, + "enableSessionCheck": { + "type": "boolean" + }, + "enablePrivateRelay": { + "type": "boolean" + }, + "enforceOrgAdminSecretAccess": { + "type": "boolean" + }, + "disableWebKubectl": { + "type": "boolean" + }, + "disableCLIKubectl": { + "type": "boolean" + } + } + }, + "rpcRevokeKubeconfigRequest": { + "type": "object", + "properties": { + "opts": { + "$ref": "#/definitions/v3QueryOptions" + } + } + }, + "rpcRevokeKubeconfigResponse": { + "type": "object" + }, + "rpcUpdateKubeconfigSettingRequest": { + "type": "object", + "properties": { + "opts": { + "$ref": "#/definitions/v3QueryOptions" + }, + "validitySeconds": { + "type": "string", + "format": "int64" + }, + "enableSessionCheck": { + "type": "boolean" + }, + "enablePrivateRelay": { + "type": "boolean" + }, + "enforceOrgAdminSecretAccess": { + "type": "boolean" + }, + "disableWebKubectl": { + "type": "boolean" + }, + "disableCLIKubectl": { + "type": "boolean" + } + } + }, + "rpcUpdateKubeconfigSettingResponse": { + "type": "object" + }, + "v3HttpBody": { + "type": "object", + "properties": { + "contentType": { + "type": "string", + "description": "The HTTP Content-Type header value specifying the content type of the body." + }, + "data": { + "type": "string", + "format": "byte", + "description": "The HTTP request/response body as raw binary." + } + }, + "title": "HttpBody represents arbitrary HTTP Body. It should only be used for\npayload formats that can't be represented as JSON" + }, + "v3QueryOptions": { + "type": "object", + "properties": { + "name": { + "type": "string", + "title": "name is unique ID of a resource along with (partnerID, organizationID,\nprojectID)" + }, + "selector": { + "type": "string", + "title": "selector is used to filter the labels of a resource" + }, + "partner": { + "type": "string" + }, + "organization": { + "type": "string" + }, + "project": { + "type": "string" + }, + "displayName": { + "type": "string", + "title": "displayName only used for update queries to set displayName (READONLY)" + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "labels only used for update queries to set labels (READONLY)" + }, + "annotations": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "annotations only used for update queries to set annotations (READONLY)" + }, + "count": { + "type": "string", + "format": "int64" + }, + "offset": { + "type": "string", + "format": "int64" + }, + "limit": { + "type": "string", + "format": "int64" + }, + "ignoreScopeDefault": { + "type": "boolean", + "title": "ignoreScopeDefault ignores default values for partnerID, organizationID and\nprojectID" + }, + "globalScope": { + "type": "boolean", + "title": "globalScope sets partnerID,organizationID,projectID = 0" + }, + "orderBy": { + "type": "string" + }, + "order": { + "type": "string" + }, + "deleted": { + "type": "boolean" + }, + "extended": { + "type": "boolean" + }, + "urlScope": { + "type": "string", + "title": "urlScope is supposed to be passed in the URL as kind/HashID(value)" + }, + "isSSOUser": { + "type": "boolean" + }, + "username": { + "type": "string" + }, + "groups": { + "type": "array", + "items": { + "type": "string" + } + }, + "blueprintRef": { + "type": "string" + }, + "publishedVersion": { + "type": "string" + }, + "clusterID": { + "type": "string" + }, + "ID": { + "type": "string" + }, + "account": { + "type": "string" + } + }, + "title": "QueryOptions is the options for performing queries on resources" + } + }, + "securityDefinitions": { + "ApiKeyAuth": { + "type": "apiKey", + "name": "X-RAFAY-API-KEYID", + "in": "header" + }, + "BasicAuth": { + "type": "basic" + } + }, + "security": [ + { + "ApiKeyAuth": [], + "BasicAuth": [] + } + ] +} diff --git a/components/common/gen/openapi/proto/rpc/sentry/kubectl_cluster.swagger.json b/components/common/gen/openapi/proto/rpc/sentry/kubectl_cluster.swagger.json new file mode 100644 index 0000000..a7653d1 --- /dev/null +++ b/components/common/gen/openapi/proto/rpc/sentry/kubectl_cluster.swagger.json @@ -0,0 +1,447 @@ +{ + "swagger": "2.0", + "info": { + "title": "Sentry KubectlClusterSettings Service", + "version": "2.0", + "contact": { + "name": "Rafay Dev" + } + }, + "tags": [ + { + "name": "KubectlClusterSettings" + } + ], + "schemes": [ + "https" + ], + "consumes": [ + "application/json", + "application/yaml" + ], + "produces": [ + "application/json", + "application/yaml" + ], + "paths": { + "/v2/sentry/kubectl/{opts.urlScope}/settings": { + "get": { + "operationId": "KubectlClusterSettings_GetKubectlClusterSettings", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/rpcGetKubectlClusterSettingsResponse" + } + }, + "403": { + "description": "Returned when the user does not have permission to access the resource.", + "schema": {} + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": { + "type": "string", + "format": "string" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "opts.urlScope", + "description": "urlScope is supposed to be passed in the URL as kind/HashID(value)", + "in": "path", + "required": true, + "type": "string", + "pattern": "cluster/[^/]+" + }, + { + "name": "opts.name", + "description": "name is unique ID of a resource along with (partnerID, organizationID,\nprojectID).", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.selector", + "description": "selector is used to filter the labels of a resource.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.partner", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.organization", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.project", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.displayName", + "description": "displayName only used for update queries to set displayName (READONLY).", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.count", + "in": "query", + "required": false, + "type": "string", + "format": "int64" + }, + { + "name": "opts.offset", + "in": "query", + "required": false, + "type": "string", + "format": "int64" + }, + { + "name": "opts.limit", + "in": "query", + "required": false, + "type": "string", + "format": "int64" + }, + { + "name": "opts.ignoreScopeDefault", + "description": "ignoreScopeDefault ignores default values for partnerID, organizationID and\nprojectID.", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "opts.globalScope", + "description": "globalScope sets partnerID,organizationID,projectID = 0.", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "opts.orderBy", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.order", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.deleted", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "opts.extended", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "opts.isSSOUser", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "opts.username", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.groups", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "opts.blueprintRef", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.publishedVersion", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.clusterID", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.ID", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "opts.account", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "KubectlClusterSettings" + ] + }, + "put": { + "operationId": "KubectlClusterSettings_UpdateKubectlClusterSettings", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/rpcUpdateKubectlClusterSettingsResponse" + } + }, + "403": { + "description": "Returned when the user does not have permission to access the resource.", + "schema": {} + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": { + "type": "string", + "format": "string" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "opts.urlScope", + "description": "urlScope is supposed to be passed in the URL as kind/HashID(value)", + "in": "path", + "required": true, + "type": "string", + "pattern": "cluster/[^/]+" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/rpcUpdateKubectlClusterSettingsRequest" + } + } + ], + "tags": [ + "KubectlClusterSettings" + ] + } + } + }, + "definitions": { + "googlerpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcGetKubectlClusterSettingsResponse": { + "type": "object", + "properties": { + "disableWebKubectl": { + "type": "boolean" + }, + "disableCLIKubectl": { + "type": "boolean" + } + } + }, + "rpcUpdateKubectlClusterSettingsRequest": { + "type": "object", + "properties": { + "opts": { + "$ref": "#/definitions/v3QueryOptions" + }, + "disableWebKubectl": { + "type": "boolean" + }, + "disableCLIKubectl": { + "type": "boolean" + } + } + }, + "rpcUpdateKubectlClusterSettingsResponse": { + "type": "object" + }, + "v3QueryOptions": { + "type": "object", + "properties": { + "name": { + "type": "string", + "title": "name is unique ID of a resource along with (partnerID, organizationID,\nprojectID)" + }, + "selector": { + "type": "string", + "title": "selector is used to filter the labels of a resource" + }, + "partner": { + "type": "string" + }, + "organization": { + "type": "string" + }, + "project": { + "type": "string" + }, + "displayName": { + "type": "string", + "title": "displayName only used for update queries to set displayName (READONLY)" + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "labels only used for update queries to set labels (READONLY)" + }, + "annotations": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "annotations only used for update queries to set annotations (READONLY)" + }, + "count": { + "type": "string", + "format": "int64" + }, + "offset": { + "type": "string", + "format": "int64" + }, + "limit": { + "type": "string", + "format": "int64" + }, + "ignoreScopeDefault": { + "type": "boolean", + "title": "ignoreScopeDefault ignores default values for partnerID, organizationID and\nprojectID" + }, + "globalScope": { + "type": "boolean", + "title": "globalScope sets partnerID,organizationID,projectID = 0" + }, + "orderBy": { + "type": "string" + }, + "order": { + "type": "string" + }, + "deleted": { + "type": "boolean" + }, + "extended": { + "type": "boolean" + }, + "urlScope": { + "type": "string", + "title": "urlScope is supposed to be passed in the URL as kind/HashID(value)" + }, + "isSSOUser": { + "type": "boolean" + }, + "username": { + "type": "string" + }, + "groups": { + "type": "array", + "items": { + "type": "string" + } + }, + "blueprintRef": { + "type": "string" + }, + "publishedVersion": { + "type": "string" + }, + "clusterID": { + "type": "string" + }, + "ID": { + "type": "string" + }, + "account": { + "type": "string" + } + }, + "title": "QueryOptions is the options for performing queries on resources" + } + }, + "securityDefinitions": { + "ApiKeyAuth": { + "type": "apiKey", + "name": "X-RAFAY-API-KEYID", + "in": "header" + }, + "BasicAuth": { + "type": "basic" + } + }, + "security": [ + { + "ApiKeyAuth": [], + "BasicAuth": [] + } + ] +} diff --git a/components/common/gen/openapi/proto/rpc/sentry/relaypeer.swagger.json b/components/common/gen/openapi/proto/rpc/sentry/relaypeer.swagger.json new file mode 100644 index 0000000..d47a286 --- /dev/null +++ b/components/common/gen/openapi/proto/rpc/sentry/relaypeer.swagger.json @@ -0,0 +1,94 @@ +{ + "swagger": "2.0", + "info": { + "title": "proto/rpc/sentry/relaypeer.proto", + "version": "version not set" + }, + "tags": [ + { + "name": "RelayPeerService" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "googlerpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcPeerHelloResponse": { + "type": "object", + "properties": { + "serviceuuid": { + "type": "string" + }, + "serviceip": { + "type": "string" + } + } + }, + "rpcPeerProbeResponse": { + "type": "object", + "properties": { + "clustersni": { + "type": "string" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/rpcrelayClusterConnectionInfo" + } + } + }, + "title": "Probe Response from service to relay" + }, + "rpcPeerSurveyRequest": { + "type": "object", + "properties": { + "clustersni": { + "type": "string" + } + }, + "title": "Survey request sent from the service to all relays" + }, + "rpcrelayClusterConnectionInfo": { + "type": "object", + "properties": { + "relayuuid": { + "type": "string" + }, + "relayip": { + "type": "string" + } + } + } + } +} diff --git a/components/common/gen/openapi/proto/types/commonpb/v3/kube.swagger.json b/components/common/gen/openapi/proto/types/config/config.swagger.json similarity index 93% rename from components/common/gen/openapi/proto/types/commonpb/v3/kube.swagger.json rename to components/common/gen/openapi/proto/types/config/config.swagger.json index 9c1f9aa..97a883c 100644 --- a/components/common/gen/openapi/proto/types/commonpb/v3/kube.swagger.json +++ b/components/common/gen/openapi/proto/types/config/config.swagger.json @@ -1,7 +1,7 @@ { "swagger": "2.0", "info": { - "title": "proto/types/commonpb/v3/kube.proto", + "title": "proto/types/config/config.proto", "version": "version not set" }, "consumes": [ diff --git a/components/common/gen/openapi/proto/types/config/namespace.swagger.json b/components/common/gen/openapi/proto/types/config/namespace.swagger.json new file mode 100644 index 0000000..64e9763 --- /dev/null +++ b/components/common/gen/openapi/proto/types/config/namespace.swagger.json @@ -0,0 +1,43 @@ +{ + "swagger": "2.0", + "info": { + "title": "proto/types/config/namespace.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "googlerpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + } + } +} diff --git a/components/common/gen/openapi/proto/types/config/override.swagger.json b/components/common/gen/openapi/proto/types/config/override.swagger.json new file mode 100644 index 0000000..da41e56 --- /dev/null +++ b/components/common/gen/openapi/proto/types/config/override.swagger.json @@ -0,0 +1,43 @@ +{ + "swagger": "2.0", + "info": { + "title": "proto/types/config/override.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "googlerpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + } + } +} diff --git a/components/common/gen/openapi/proto/types/config/placement.swagger.json b/components/common/gen/openapi/proto/types/config/placement.swagger.json new file mode 100644 index 0000000..d627b9a --- /dev/null +++ b/components/common/gen/openapi/proto/types/config/placement.swagger.json @@ -0,0 +1,43 @@ +{ + "swagger": "2.0", + "info": { + "title": "proto/types/config/placement.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "googlerpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + } + } +} diff --git a/components/common/gen/openapi/proto/types/config/repository.swagger.json b/components/common/gen/openapi/proto/types/config/repository.swagger.json new file mode 100644 index 0000000..ccdebd6 --- /dev/null +++ b/components/common/gen/openapi/proto/types/config/repository.swagger.json @@ -0,0 +1,43 @@ +{ + "swagger": "2.0", + "info": { + "title": "proto/types/config/repository.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "googlerpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + } + } +} diff --git a/components/common/gen/openapi/proto/types/config/workload.swagger.json b/components/common/gen/openapi/proto/types/config/workload.swagger.json new file mode 100644 index 0000000..8c80c88 --- /dev/null +++ b/components/common/gen/openapi/proto/types/config/workload.swagger.json @@ -0,0 +1,43 @@ +{ + "swagger": "2.0", + "info": { + "title": "proto/types/config/workload.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "googlerpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + } + } +} diff --git a/components/common/gen/openapi/proto/types/controller/cluster_controller.swagger.json b/components/common/gen/openapi/proto/types/controller/cluster_controller.swagger.json new file mode 100644 index 0000000..e565ac0 --- /dev/null +++ b/components/common/gen/openapi/proto/types/controller/cluster_controller.swagger.json @@ -0,0 +1,43 @@ +{ + "swagger": "2.0", + "info": { + "title": "proto/types/controller/cluster_controller.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "googlerpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + } + } +} diff --git a/components/common/gen/openapi/proto/types/scheduler/namespace.swagger.json b/components/common/gen/openapi/proto/types/scheduler/namespace.swagger.json new file mode 100644 index 0000000..c7ba2d2 --- /dev/null +++ b/components/common/gen/openapi/proto/types/scheduler/namespace.swagger.json @@ -0,0 +1,43 @@ +{ + "swagger": "2.0", + "info": { + "title": "proto/types/scheduler/namespace.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "googlerpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + } + } +} diff --git a/components/common/gen/openapi/proto/types/sentry/account_permission.swagger.json b/components/common/gen/openapi/proto/types/sentry/account_permission.swagger.json new file mode 100644 index 0000000..4e56769 --- /dev/null +++ b/components/common/gen/openapi/proto/types/sentry/account_permission.swagger.json @@ -0,0 +1,43 @@ +{ + "swagger": "2.0", + "info": { + "title": "proto/types/sentry/account_permission.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "googlerpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + } + } +} diff --git a/components/common/gen/openapi/proto/types/sentry/group_permission.swagger.json b/components/common/gen/openapi/proto/types/sentry/group_permission.swagger.json new file mode 100644 index 0000000..6b86dbc --- /dev/null +++ b/components/common/gen/openapi/proto/types/sentry/group_permission.swagger.json @@ -0,0 +1,43 @@ +{ + "swagger": "2.0", + "info": { + "title": "proto/types/sentry/group_permission.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "googlerpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + } + } +} diff --git a/components/common/gen/openapi/proto/types/sentry/kubeconfig_setting.swagger.json b/components/common/gen/openapi/proto/types/sentry/kubeconfig_setting.swagger.json new file mode 100644 index 0000000..f594b79 --- /dev/null +++ b/components/common/gen/openapi/proto/types/sentry/kubeconfig_setting.swagger.json @@ -0,0 +1,43 @@ +{ + "swagger": "2.0", + "info": { + "title": "proto/types/sentry/kubeconfig_setting.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "googlerpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + } + } +} diff --git a/components/common/gen/openapi/proto/types/sentry/kubectl_cluster_setting.swagger.json b/components/common/gen/openapi/proto/types/sentry/kubectl_cluster_setting.swagger.json new file mode 100644 index 0000000..7651be8 --- /dev/null +++ b/components/common/gen/openapi/proto/types/sentry/kubectl_cluster_setting.swagger.json @@ -0,0 +1,43 @@ +{ + "swagger": "2.0", + "info": { + "title": "proto/types/sentry/kubectl_cluster_setting.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "googlerpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + } + } +} diff --git a/components/common/gen/openapi/proto/types/sentry/sentry.swagger.json b/components/common/gen/openapi/proto/types/sentry/sentry.swagger.json new file mode 100644 index 0000000..9a0388f --- /dev/null +++ b/components/common/gen/openapi/proto/types/sentry/sentry.swagger.json @@ -0,0 +1,43 @@ +{ + "swagger": "2.0", + "info": { + "title": "proto/types/sentry/sentry.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "googlerpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + } + } +} diff --git a/components/common/go.mod b/components/common/go.mod index 8713a70..1819996 100644 --- a/components/common/go.mod +++ b/components/common/go.mod @@ -2,55 +2,105 @@ module github.com/RafaySystems/rcloud-base/components/common go 1.17 +replace github.com/RafaySystems/rcloud-base/components/common => ./ + require ( + github.com/evanphx/json-patch v4.12.0+incompatible + github.com/go-openapi/errors v0.20.2 + github.com/go-openapi/runtime v0.21.1 + github.com/go-openapi/strfmt v0.21.1 + github.com/go-openapi/swag v0.19.15 + github.com/go-openapi/validate v0.20.3 github.com/gogo/protobuf v1.3.2 github.com/google/uuid v1.3.0 github.com/grpc-ecosystem/grpc-gateway v1.16.0 - github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.2 + github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.3 github.com/json-iterator/go v1.1.12 github.com/julienschmidt/httprouter v1.3.0 github.com/processout/grpc-go-pool v1.2.1 - github.com/segmentio/encoding v0.3.2 + github.com/segmentio/encoding v0.3.3 github.com/speps/go-hashids v2.0.0+incompatible - github.com/uptrace/bun v1.0.20 - go.uber.org/zap v1.19.1 - google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa + github.com/uptrace/bun v1.0.21 + github.com/valyala/fastjson v1.6.3 + go.uber.org/zap v1.20.0 + google.golang.org/genproto v0.0.0-20220118154757-00ab72f36ad5 google.golang.org/grpc v1.43.0 google.golang.org/protobuf v1.27.1 - k8s.io/apimachinery v0.23.1 - k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 + k8s.io/api v0.23.2 + k8s.io/apiextensions-apiserver v0.23.2 + k8s.io/apimachinery v0.23.2 + k8s.io/client-go v0.23.2 + k8s.io/kube-openapi v0.0.0-20220114203427-a0453230fd26 + sigs.k8s.io/controller-runtime v0.11.0 sigs.k8s.io/kustomize/pseudo/k8s v0.1.0 sigs.k8s.io/yaml v1.3.0 ) require ( + github.com/PuerkitoBio/purell v1.1.1 // indirect + github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect + github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/cespare/xxhash/v2 v2.1.1 // indirect github.com/davecgh/go-spew v1.1.1 // indirect + github.com/dgraph-io/ristretto v0.1.0 + github.com/fsnotify/fsnotify v1.5.1 // indirect github.com/go-logr/logr v1.2.0 // indirect + github.com/go-openapi/analysis v0.20.1 // indirect + github.com/go-openapi/jsonpointer v0.19.5 // indirect + github.com/go-openapi/jsonreference v0.19.6 // indirect + github.com/go-openapi/loads v0.21.0 // indirect + github.com/go-openapi/spec v0.20.4 // indirect + github.com/go-stack/stack v1.8.0 // indirect + github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.2 // indirect - github.com/google/go-cmp v0.5.6 // indirect + github.com/google/go-cmp v0.5.7 // indirect github.com/google/gofuzz v1.1.0 // indirect github.com/googleapis/gnostic v0.5.5 // indirect + github.com/imdario/mergo v0.3.12 // indirect github.com/jinzhu/inflection v1.0.0 // indirect - github.com/klauspost/cpuid/v2 v2.0.6 // indirect + github.com/josharian/intern v1.0.0 // indirect + github.com/mailru/easyjson v0.7.6 // indirect + github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect + github.com/mitchellh/mapstructure v1.4.1 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/segmentio/asm v1.1.0 // indirect + github.com/oklog/ulid v1.3.1 // indirect + github.com/opentracing/opentracing-go v1.2.0 // indirect + github.com/pkg/errors v0.9.1 // indirect + github.com/prometheus/client_golang v1.11.0 // indirect + github.com/prometheus/client_model v0.2.0 // indirect + github.com/prometheus/common v0.28.0 // indirect + github.com/prometheus/procfs v0.6.0 // indirect + github.com/segmentio/asm v1.1.3 // indirect + github.com/spf13/pflag v1.0.5 // indirect github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc // indirect github.com/vmihailenco/msgpack/v5 v5.3.5 // indirect github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect + go.mongodb.org/mongo-driver v1.7.5 // indirect go.uber.org/atomic v1.7.0 // indirect go.uber.org/multierr v1.6.0 // indirect golang.org/x/net v0.0.0-20211209124913-491a49abca63 // indirect + golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect golang.org/x/sys v0.0.0-20211123173158-ef496fb156ab // indirect + golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b // indirect golang.org/x/text v0.3.7 // indirect + golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect + gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect + google.golang.org/appengine v1.6.7 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect + k8s.io/component-base v0.23.2 // indirect k8s.io/klog v1.0.0 // indirect k8s.io/klog/v2 v2.30.0 // indirect k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b // indirect sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.1.2 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect ) -replace github.com/RafaySystems/rcloud-base/components/common => ./ +require ( + github.com/dustin/go-humanize v1.0.0 // indirect + github.com/golang/glog v1.0.0 // indirect + github.com/rs/xid v1.3.0 +) diff --git a/components/common/go.sum b/components/common/go.sum index d6ab4ba..d3153d1 100644 --- a/components/common/go.sum +++ b/components/common/go.sum @@ -13,6 +13,11 @@ cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKV cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= +cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= +cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= +cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= +cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= @@ -21,6 +26,7 @@ cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4g cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= @@ -31,95 +37,310 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/Azure/go-ansiterm v0.0.0-20210608223527-2377c96fe795/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= +github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= github.com/Azure/go-autorest/autorest v0.9.2/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= +github.com/Azure/go-autorest/autorest v0.11.18/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA= github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= github.com/Azure/go-autorest/autorest/adal v0.8.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc= +github.com/Azure/go-autorest/autorest/adal v0.9.13/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M= github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= +github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= +github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= +github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= +github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= +github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= +github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/antlr/antlr4/runtime/Go/antlr v0.0.0-20210826220005-b48c857c3a0e/go.mod h1:F7bn7fEU90QkQ3tnmaTx3LTKLEDqnwWODIYppRQ5hnY= +github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= +github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg= +github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg= +github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef h1:46PFijGLmAjMPwCCCo7Jf0W6f9slllCkkv7vyc1yOSg= +github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= +github.com/aws/aws-sdk-go v1.34.28/go.mod h1:H7NKnBqNVzoTJpGfLrQkkD+ytBA93eiDYi/+8rV9s48= +github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= 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= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= +github.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM= +github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/certifi/gocertifi v0.0.0-20191021191039-0944d244cd40/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= +github.com/certifi/gocertifi v0.0.0-20200922220541-2c3bb06c6054/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= +github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cockroachdb/datadriven v0.0.0-20200714090401-bf6692d28da5/go.mod h1:h6jFvWxBdQXxjopDMZyH2UVceIRfR84bdzbkoKrsWNo= +github.com/cockroachdb/errors v1.2.4/go.mod h1:rQD95gz6FARkaKkQXUksEje/d9a6wBJoCr5oaCLELYA= +github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI= +github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= +github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= +github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v0.0.0-20151105211317-5215b55f46b2/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dgraph-io/ristretto v0.1.0 h1:Jv3CGQHp9OjuMBSne1485aDpUkTKEcUqF+jm/LuerPI= +github.com/dgraph-io/ristretto v0.1.0/go.mod h1:fux0lOrBhrVCJd3lcTHsIJhq1T2rokOu6v9Vcb3Q9ug= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= +github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/spdystream v0.0.0-20181023171402-6480d4af844c/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= +github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= +github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/elazarl/goproxy v0.0.0-20191011121108-aa519ddbe484/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= github.com/elazarl/goproxy/ext v0.0.0-20190711103511-473e67f1d7d2/go.mod h1:gNh8nYJoAm43RfaxurUnxr+N1PwuFV3ZMl/efxlIlY8= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ= github.com/evanphx/json-patch v4.5.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84= github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= +github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI= +github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= github.com/getkin/kin-openapi v0.76.0/go.mod h1:660oXbgy5JFMKreazJaQTw7o+X00qeSyhcnluiMv+Xg= +github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= +github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v1.2.0 h1:QK40JKJyMdUDz+h+xvCsru/bJhvG0UxvePV0ufL/AcE= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/zapr v1.2.0 h1:n4JnPI1T3Qq1SFEi/F8rwLrZERp2bso19PJZDB9dayk= +github.com/go-logr/zapr v1.2.0/go.mod h1:Qa4Bsj2Vb+FAVeAKsLD8RLQ+YRJB8YDmOAKxaBQf7Ro= +github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= +github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= +github.com/go-openapi/analysis v0.18.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= +github.com/go-openapi/analysis v0.19.2/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= +github.com/go-openapi/analysis v0.19.4/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= +github.com/go-openapi/analysis v0.19.5/go.mod h1:hkEAkxagaIvIP7VTn8ygJNkd4kAYON2rCu0v0ObL0AU= +github.com/go-openapi/analysis v0.19.10/go.mod h1:qmhS3VNFxBlquFJ0RGoDtylO9y4pgTAUNE9AEEMdlJQ= +github.com/go-openapi/analysis v0.19.16/go.mod h1:GLInF007N83Ad3m8a/CbQ5TPzdnGT7workfHwuVjNVk= +github.com/go-openapi/analysis v0.20.0/go.mod h1:BMchjvaHDykmRMsK40iPtvyOfFdMMxlOmQr9FBZk+Og= +github.com/go-openapi/analysis v0.20.1 h1:zdVbw8yoD4SWZeq+cWdGgquaB0W4VrsJvDJHJND/Ktc= +github.com/go-openapi/analysis v0.20.1/go.mod h1:BMchjvaHDykmRMsK40iPtvyOfFdMMxlOmQr9FBZk+Og= +github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= +github.com/go-openapi/errors v0.18.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= +github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= +github.com/go-openapi/errors v0.19.3/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= +github.com/go-openapi/errors v0.19.6/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= +github.com/go-openapi/errors v0.19.7/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= +github.com/go-openapi/errors v0.19.8/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= +github.com/go-openapi/errors v0.19.9/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= +github.com/go-openapi/errors v0.20.1/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= +github.com/go-openapi/errors v0.20.2 h1:dxy7PGTqEh94zj2E3h1cUmQQWiM1+aeCROfAr02EmK8= +github.com/go-openapi/errors v0.20.2/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= +github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= +github.com/go-openapi/jsonpointer v0.18.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= +github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= +github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= +github.com/go-openapi/jsonreference v0.18.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= +github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= +github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= +github.com/go-openapi/jsonreference v0.19.6 h1:UBIxjkht+AWIgYzCDSv2GN+E/togfwXUJFRTWhl2Jjs= +github.com/go-openapi/jsonreference v0.19.6/go.mod h1:diGHMEHg2IqXZGKxqyvWdfWU/aim5Dprw5bqpKkTvns= +github.com/go-openapi/loads v0.17.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= +github.com/go-openapi/loads v0.18.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= +github.com/go-openapi/loads v0.19.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= +github.com/go-openapi/loads v0.19.2/go.mod h1:QAskZPMX5V0C2gvfkGZzJlINuP7Hx/4+ix5jWFxsNPs= +github.com/go-openapi/loads v0.19.3/go.mod h1:YVfqhUCdahYwR3f3iiwQLhicVRvLlU/WO5WPaZvcvSI= +github.com/go-openapi/loads v0.19.5/go.mod h1:dswLCAdonkRufe/gSUC3gN8nTSaB9uaS2es0x5/IbjY= +github.com/go-openapi/loads v0.19.6/go.mod h1:brCsvE6j8mnbmGBh103PT/QLHfbyDxA4hsKvYBNEGVc= +github.com/go-openapi/loads v0.19.7/go.mod h1:brCsvE6j8mnbmGBh103PT/QLHfbyDxA4hsKvYBNEGVc= +github.com/go-openapi/loads v0.20.0/go.mod h1:2LhKquiE513rN5xC6Aan6lYOSddlL8Mp20AW9kpviM4= +github.com/go-openapi/loads v0.20.2/go.mod h1:hTVUotJ+UonAMMZsvakEgmWKgtulweO9vYP2bQYKA/o= +github.com/go-openapi/loads v0.21.0 h1:jYtUO4wwP7psAweisP/MDoOpdzsYEESdoPcsWjHDR68= +github.com/go-openapi/loads v0.21.0/go.mod h1:rHYve9nZrQ4CJhyeIIFJINGCg1tQpx2yJrrNo8sf1ws= +github.com/go-openapi/runtime v0.0.0-20180920151709-4f900dc2ade9/go.mod h1:6v9a6LTXWQCdL8k1AO3cvqx5OtZY/Y9wKTgaoP6YRfA= +github.com/go-openapi/runtime v0.19.0/go.mod h1:OwNfisksmmaZse4+gpV3Ne9AyMOlP1lt4sK4FXt0O64= +github.com/go-openapi/runtime v0.19.4/go.mod h1:X277bwSUBxVlCYR3r7xgZZGKVvBd/29gLDlFGtJ8NL4= +github.com/go-openapi/runtime v0.19.15/go.mod h1:dhGWCTKRXlAfGnQG0ONViOZpjfg0m2gUt9nTQPQZuoo= +github.com/go-openapi/runtime v0.19.16/go.mod h1:5P9104EJgYcizotuXhEuUrzVc+j1RiSjahULvYmlv98= +github.com/go-openapi/runtime v0.19.24/go.mod h1:Lm9YGCeecBnUUkFTxPC4s1+lwrkJ0pthx8YvyjCfkgk= +github.com/go-openapi/runtime v0.21.1 h1:/KIG00BzA2x2HRStX2tnhbqbQdPcFlkgsYCiNY20FZs= +github.com/go-openapi/runtime v0.21.1/go.mod h1:aQg+kaIQEn+A2CRSY1TxbM8+sT9g2V3aLc1FbIAnbbs= github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= +github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= +github.com/go-openapi/spec v0.18.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= +github.com/go-openapi/spec v0.19.2/go.mod h1:sCxk3jxKgioEJikev4fgkNmwS+3kuYdJtcsZsD5zxMY= +github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= +github.com/go-openapi/spec v0.19.6/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= +github.com/go-openapi/spec v0.19.8/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= +github.com/go-openapi/spec v0.19.15/go.mod h1:+81FIL1JwC5P3/Iuuozq3pPE9dXdIEGxFutcFKaVbmU= +github.com/go-openapi/spec v0.20.0/go.mod h1:+81FIL1JwC5P3/Iuuozq3pPE9dXdIEGxFutcFKaVbmU= +github.com/go-openapi/spec v0.20.1/go.mod h1:93x7oh+d+FQsmsieroS4cmR3u0p/ywH649a3qwC9OsQ= +github.com/go-openapi/spec v0.20.3/go.mod h1:gG4F8wdEDN+YPBMVnzE85Rbhf+Th2DTvA9nFPQ5AYEg= +github.com/go-openapi/spec v0.20.4 h1:O8hJrt0UMnhHcluhIdUgCLRWyM2x7QkBXRvOs7m+O1M= +github.com/go-openapi/spec v0.20.4/go.mod h1:faYFR1CvsJZ0mNsmsphTMSoRrNV3TEDoAM7FOEWeq8I= +github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= +github.com/go-openapi/strfmt v0.18.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= +github.com/go-openapi/strfmt v0.19.0/go.mod h1:+uW+93UVvGGq2qGaZxdDeJqSAqBqBdl+ZPMF/cC8nDY= +github.com/go-openapi/strfmt v0.19.2/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= +github.com/go-openapi/strfmt v0.19.3/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= +github.com/go-openapi/strfmt v0.19.4/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk= +github.com/go-openapi/strfmt v0.19.5/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk= +github.com/go-openapi/strfmt v0.19.11/go.mod h1:UukAYgTaQfqJuAFlNxxMWNvMYiwiXtLsF2VwmoFtbtc= +github.com/go-openapi/strfmt v0.20.0/go.mod h1:UukAYgTaQfqJuAFlNxxMWNvMYiwiXtLsF2VwmoFtbtc= +github.com/go-openapi/strfmt v0.20.2/go.mod h1:43urheQI9dNtE5lTZQfuFJvjYJKPrxicATpEfZwHUNk= +github.com/go-openapi/strfmt v0.21.0/go.mod h1:ZRQ409bWMj+SOgXofQAGTIo2Ebu72Gs+WaRADcS5iNg= +github.com/go-openapi/strfmt v0.21.1 h1:G6s2t5V5kGCHLVbSdZ/6lI8Wm4OzoPFkc3/cjAsKQrM= +github.com/go-openapi/strfmt v0.21.1/go.mod h1:I/XVKeLc5+MM5oPNN7P6urMOpuLXEcNrCX/rPGuWb0k= github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= +github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= +github.com/go-openapi/swag v0.18.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= +github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.7/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY= +github.com/go-openapi/swag v0.19.9/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY= +github.com/go-openapi/swag v0.19.12/go.mod h1:eFdyEBkTdoAf/9RXBvj4cr1nH7GD8Kzo5HTt47gr72M= +github.com/go-openapi/swag v0.19.13/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= +github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= +github.com/go-openapi/swag v0.19.15 h1:D2NRCBzS9/pEY3gP9Nl8aDqGUcPFrwG2p+CNFrLyrCM= +github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= +github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= +github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA= +github.com/go-openapi/validate v0.19.3/go.mod h1:90Vh6jjkTn+OT1Eefm0ZixWNFjhtOH7vS9k0lo6zwJo= +github.com/go-openapi/validate v0.19.10/go.mod h1:RKEZTUWDkxKQxN2jDT7ZnZi2bhZlbNMAuKvKB+IaGx8= +github.com/go-openapi/validate v0.19.12/go.mod h1:Rzou8hA/CBw8donlS6WNEUQupNvUZ0waH08tGe6kAQ4= +github.com/go-openapi/validate v0.19.15/go.mod h1:tbn/fdOwYHgrhPBzidZfJC2MIVvs9GA7monOmWBbeCI= +github.com/go-openapi/validate v0.20.1/go.mod h1:b60iJT+xNNLfaQJUqLI7946tYiFEOuE9E4k54HpKcJ0= +github.com/go-openapi/validate v0.20.3 h1:GZPPhhKSZrE8HjB4eEkoYAZmoWA4+tCemSgINH1/vKw= +github.com/go-openapi/validate v0.20.3/go.mod h1:goDdqVGiigM3jChcrYJxD2joalke3ZXeftD16byIjA4= +github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= +github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= +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/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= +github.com/gobuffalo/attrs v0.0.0-20190224210810-a9411de4debd/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0= +github.com/gobuffalo/depgen v0.0.0-20190329151759-d478694a28d3/go.mod h1:3STtPUQYuzV0gBVOY3vy6CfMm/ljR4pABfrTeHNLHUY= +github.com/gobuffalo/depgen v0.1.0/go.mod h1:+ifsuy7fhi15RWncXQQKjWS9JPkdah5sZvtHc2RXGlg= +github.com/gobuffalo/envy v1.6.15/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= +github.com/gobuffalo/envy v1.7.0/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= +github.com/gobuffalo/flect v0.1.0/go.mod h1:d2ehjJqGOH/Kjqcoz+F7jHTBbmDb38yXA598Hb50EGs= +github.com/gobuffalo/flect v0.1.1/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= +github.com/gobuffalo/flect v0.1.3/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= +github.com/gobuffalo/genny v0.0.0-20190329151137-27723ad26ef9/go.mod h1:rWs4Z12d1Zbf19rlsn0nurr75KqhYp52EAGGxTbBhNk= +github.com/gobuffalo/genny v0.0.0-20190403191548-3ca520ef0d9e/go.mod h1:80lIj3kVJWwOrXWWMRzzdhW3DsrdjILVil/SFKBzF28= +github.com/gobuffalo/genny v0.1.0/go.mod h1:XidbUqzak3lHdS//TPu2OgiFB+51Ur5f7CSnXZ/JDvo= +github.com/gobuffalo/genny v0.1.1/go.mod h1:5TExbEyY48pfunL4QSXxlDOmdsD44RRq4mVZ0Ex28Xk= +github.com/gobuffalo/gitgen v0.0.0-20190315122116-cc086187d211/go.mod h1:vEHJk/E9DmhejeLeNt7UVvlSGv3ziL+djtTr3yyzcOw= +github.com/gobuffalo/gogen v0.0.0-20190315121717-8f38393713f5/go.mod h1:V9QVDIxsgKNZs6L2IYiGR8datgMhB577vzTDqypH360= +github.com/gobuffalo/gogen v0.1.0/go.mod h1:8NTelM5qd8RZ15VjQTFkAW6qOMx5wBbW4dSCS3BY8gg= +github.com/gobuffalo/gogen v0.1.1/go.mod h1:y8iBtmHmGc4qa3urIyo1shvOD8JftTtfcKi+71xfDNE= +github.com/gobuffalo/logger v0.0.0-20190315122211-86e12af44bc2/go.mod h1:QdxcLw541hSGtBnhUc4gaNIXRjiDppFGaDqzbrBd3v8= +github.com/gobuffalo/mapi v1.0.1/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= +github.com/gobuffalo/mapi v1.0.2/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= +github.com/gobuffalo/packd v0.0.0-20190315124812-a385830c7fc0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= +github.com/gobuffalo/packd v0.1.0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= +github.com/gobuffalo/packr/v2 v2.0.9/go.mod h1:emmyGweYTm6Kdper+iywB6YK5YzuKchGtJQZ0Odn4pQ= +github.com/gobuffalo/packr/v2 v2.2.0/go.mod h1:CaAwI0GPIAv+5wKLtv8Afwl+Cm78K/I/VCm/3ptBN+0= +github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw= +github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v1.0.0 h1:nfP3RFugxnNRyKgeWd4oI1nYvXpxrx8ck8ZrcizshdQ= github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= +github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191027212112-611e8accdfc9/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= @@ -127,6 +348,7 @@ github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -143,10 +365,15 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= +github.com/google/cel-go v0.9.0/go.mod h1:U7ayypeSkw23szu4GaQTPJGx66c20mx8JklMSxrmI1w= +github.com/google/cel-spec v0.6.0/go.mod h1:Nwjgxy5CbjlPrtCWjeDjUyKMl8w41YBYGjsyDdqk0xA= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -154,15 +381,19 @@ github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= -github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o= +github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= github.com/google/gofuzz v0.0.0-20161122191042-44d81051d367/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= @@ -170,7 +401,12 @@ github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-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-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= @@ -182,46 +418,124 @@ github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2c github.com/googleapis/gnostic v0.5.5 h1:9fHAtK0uDfpveeqqo1hkEZJcFvYXAiCN3UutL8F9xHw= github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97DwqyJO1AENw9kA= github.com/gophercloud/gophercloud v0.6.0/go.mod h1:GICNByuaEBibcjmjvI7QvYJSZEbGkcYwAR7EZK2WMqM= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.2 h1:I/pwhnUln5wbMnTyRbzswA0/JxpK8sZj0aUfI3TV1So= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.2/go.mod h1:lsuH8kb4GlMdSlI4alNIBBSAt5CHJtg3i+0WuN9J5YM= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.3 h1:I8MsauTJQXZ8df8qJvEln0kYNc3bSapuaSsEsnFdEFU= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.3/go.mod h1:lZdb/YAJUSj9OqrCHs2ihjtoO3+xK3G53wTYXFWRGDo= +github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= +github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= +github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= +github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= +github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= 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.3/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= +github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= +github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= +github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= +github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E= github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= +github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= +github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= +github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= +github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= +github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v0.0.0-20180612202835-f2b4162afba3/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0 h1:U0609e9tgbseu3rBINet9P48AI/D3oJs4dN7jwJOQ1U= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= +github.com/karrick/godirwalk v1.8.0/go.mod h1:H5KPZjojv4lE+QYImBI8xVtrBRgYrIVsaRPx4tDPEn4= +github.com/karrick/godirwalk v1.10.3/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA= +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= 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/cpuid/v2 v2.0.6 h1:dQ5ueTiftKxp0gyjKSx5+8BtPWkyQbd95m8Gys/RarI= -github.com/klauspost/cpuid/v2 v2.0.6/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= +github.com/klauspost/compress v1.9.5/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= +github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.7.1/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= +github.com/mailru/easyjson v0.7.6 h1:8yTIVnZgCoiM1TgqoeTl+LfU5Jg6/xL3QhGQnimLYnA= +github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= +github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= +github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= +github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= +github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= +github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.3.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.4.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.4.1 h1:CpVNEelQCZBooIPDn+AR3NpivK/TIKU8bDxdASFVQag= +github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= +github.com/moby/term v0.0.0-20210610120745-9d4ed1856297/go.mod h1:vgPCkQMyxTZ7IDy8SXRufE172gr8+K/JE/7hHFxHW3A= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -230,86 +544,238 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= +github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= +github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= +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 v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= -github.com/onsi/ginkgo v1.14.0 h1:2mOpI4JVVPBN+WQRa0WKH2eXR+Ey+uK4n7Zj0aYpIQA= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= +github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= +github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= +github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= -github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= +github.com/onsi/gomega v1.17.0 h1:9Luw4uT5HTjHTN8+aNcSThgH1vdXnmdJ8xIfZ4wyTRE= +github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= +github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= +github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= +github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= +github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pelletier/go-toml v1.4.0/go.mod h1:PN7xzY2wHTK0K9p34ErDQMlFxa51Fk0OUruD3k1mMwo= +github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= +github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= github.com/processout/grpc-go-pool v1.2.1 h1:hbp1BOA02CIxEAoRLHGpUhhPFv77nwfBLBeO3Ya9P7I= github.com/processout/grpc-go-pool v1.2.1/go.mod h1:F4hiNj96O6VQ87jv4rdz8R9tkHdelQQJ/J2B1a5VSt4= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= +github.com/prometheus/client_golang v1.11.0 h1:HNkLOAEQMIDv/K+04rukrLx6ch7msSRwf3/SASFAGtQ= +github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= +github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= +github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= +github.com/prometheus/common v0.28.0 h1:vGVfV9KrDTvWt5boZO0I19g2E3CsWfpPPKZM9dt3mEw= +github.com/prometheus/common v0.28.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.6.0 h1:mxy4L2jP6qMonqmq+aTtOx1ifVWUgG/TAmntgbh3xv4= +github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-charset v0.0.0-20180617210344-2471d30d28b4/go.mod h1:qgYeAmZ5ZIpBWTGllZSQnw97Dj+woV0toclVaRGI8pc= +github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/segmentio/asm v1.1.0 h1:fkVr8k5J4sKoFjTGVD6r1yKvDKqmvrEh3K7iyVxgBs8= -github.com/segmentio/asm v1.1.0/go.mod h1:4EUJGaKsB8ImLUwOGORVsNd9vTRDeh44JGsY4aKp5I4= -github.com/segmentio/encoding v0.3.2 h1:gkXXteOfNaPPlrXTEf/e5tWvaQGVJWnvT3LqMzUeH7U= -github.com/segmentio/encoding v0.3.2/go.mod h1:waft2p6XI4z2pk07M0YzZV4wEiqaRvsBSyWNHxVx4gU= +github.com/rs/xid v1.3.0 h1:6NjYksEUlhurdVehpc7S7dk6DAmcKv8V9gG0FsVN2U4= +github.com/rs/xid v1.3.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= +github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/segmentio/asm v1.1.3 h1:WM03sfUOENvvKexOLp+pCqgb/WDjsi7EK8gIsICtzhc= +github.com/segmentio/asm v1.1.3/go.mod h1:Ld3L4ZXGNcSLRg4JBsZ3//1+f/TjYl0Mzen/DQy1EJg= +github.com/segmentio/encoding v0.3.3 h1:VG1HceOLwHkSDdkxshlu9pD4FftWkScmHc8RDQ+w9uM= +github.com/segmentio/encoding v0.3.3/go.mod h1:n0JeuIqEQrQoPDGsjo8UNd1iA0U8d8+oHAA4E3G3OxM= +github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/speps/go-hashids v2.0.0+incompatible h1:kSfxGfESueJKTx0mpER9Y/1XHl+FVQjtCqRyYcviFbw= github.com/speps/go-hashids v2.0.0+incompatible/go.mod h1:P7hqPzMdnZOfyIk+xrlG1QaSMw+gCBdHKsBDnhpaZvc= +github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= +github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= +github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= +github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk= +github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= +github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/testify v0.0.0-20151208002404-e3a8ff8ce365/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= +github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4= +github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= +github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc h1:9lRDQMhESg+zvGYmW5DyG0UqvY96Bu5QYsTLvCHdrgo= github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc/go.mod h1:bciPuU6GHm1iF1pBvUfxfsH0Wmnc2VbpgvbI9ZWuIRs= -github.com/uptrace/bun v1.0.20 h1:/T4p9C9tEN75U3cFMBr5njlP+rBfs4An8BmlQQPbcfE= -github.com/uptrace/bun v1.0.20/go.mod h1:Uv7z0z+7dXnUS9P5hMF0hdiM/4M+xOUHQCrZpyDrpRc= +github.com/uptrace/bun v1.0.21 h1:5ek4bnrEmZo6wvY/RHt1dJNXzOPOnrfJeZMoZfZt9Io= +github.com/uptrace/bun v1.0.21/go.mod h1:u+QsgCgjGFwshy3euGAN1CLEO9RMf42lga5jQ/ezYsc= +github.com/valyala/fastjson v1.6.3 h1:tAKFnnwmeMGPbwJ7IwxcTPCNr3uIzoIj3/Fh90ra4xc= +github.com/valyala/fastjson v1.6.3/go.mod h1:CLCAqky6SMuOcxStkYQvblddUtoRxhYMGLrsQns1aXY= +github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw= github.com/vmihailenco/msgpack/v5 v5.3.5 h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9znI5mJU= github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= +github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= +github.com/xdg-go/scram v1.0.2/go.mod h1:1WAq6h33pAW+iRreB34OORO2Nf7qel3VV3fjBj+hCSs= +github.com/xdg-go/stringprep v1.0.2/go.mod h1:8F9zXuvzgwmyT5DUm4GUfZGDdT3W+LCvS6+da4O5kxM= +github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I= +github.com/xdg/stringprep v0.0.0-20180714160509-73f8eece6fdc/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= +go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= +go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= +go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= +go.etcd.io/etcd/client/v3 v3.5.0/go.mod h1:AIKXXVX/DQXtfTEqBryiLTUXwON+GuvO6Z7lLS/oTh0= +go.etcd.io/etcd/pkg/v3 v3.5.0/go.mod h1:UzJGatBQ1lXChBkQF0AuAtkRQMYnHubxAEYIrC3MSsE= +go.etcd.io/etcd/raft/v3 v3.5.0/go.mod h1:UFOHSIvO/nKwd4lhkwabrTD3cqW5yVyYYf/KlD00Szc= +go.etcd.io/etcd/server/v3 v3.5.0/go.mod h1:3Ah5ruV+M+7RZr0+Y/5mNLwC+eQlni+mQmOVdCRJoS4= +go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= +go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= +go.mongodb.org/mongo-driver v1.3.0/go.mod h1:MSWZXKOynuguX+JSvwP8i+58jYCXxbia8HS3gZBapIE= +go.mongodb.org/mongo-driver v1.3.4/go.mod h1:MSWZXKOynuguX+JSvwP8i+58jYCXxbia8HS3gZBapIE= +go.mongodb.org/mongo-driver v1.4.3/go.mod h1:WcMNYLx/IlOxLe6JRJiv2uXuCz6zBLndR4SoGjYphSc= +go.mongodb.org/mongo-driver v1.4.4/go.mod h1:WcMNYLx/IlOxLe6JRJiv2uXuCz6zBLndR4SoGjYphSc= +go.mongodb.org/mongo-driver v1.4.6/go.mod h1:WcMNYLx/IlOxLe6JRJiv2uXuCz6zBLndR4SoGjYphSc= +go.mongodb.org/mongo-driver v1.5.1/go.mod h1:gRXCHX4Jo7J0IJ1oDQyUxF7jfy19UfxniMS4xxMmUqw= +go.mongodb.org/mongo-driver v1.7.3/go.mod h1:NqaYOwnXWr5Pm7AOpO5QFxKJ503nbMse/R79oO62zWg= +go.mongodb.org/mongo-driver v1.7.5 h1:ny3p0reEpgsR2cfA5cjgwFZg3Cv/ofFh/8jbhGtz9VI= +go.mongodb.org/mongo-driver v1.7.5/go.mod h1:VXEWRZ6URJIkUq2SCAyapmhH0ZLRBP+FT4xhp5Zvxng= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= +go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +go.opentelemetry.io/contrib v0.20.0/go.mod h1:G/EtFaa6qaN7+LxqfIAT3GiZa7Wv5DTBUzl5H4LY0Kc= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.20.0/go.mod h1:oVGt1LRbBOBq1A5BQLlUg9UaU/54aiHw8cgjV3aWZ/E= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0/go.mod h1:2AboqHi0CiIZU0qwhtUfCYD1GeUzvvIXWNkhDt7ZMG4= +go.opentelemetry.io/otel v0.20.0/go.mod h1:Y3ugLH2oa81t5QO+Lty+zXf8zC9L26ax4Nzoxm/dooo= +go.opentelemetry.io/otel/exporters/otlp v0.20.0/go.mod h1:YIieizyaN77rtLJra0buKiNBOm9XQfkPEKBeuhoMwAM= +go.opentelemetry.io/otel/metric v0.20.0/go.mod h1:598I5tYlH1vzBjn+BTuhzTCSb/9debfNp6R3s7Pr1eU= +go.opentelemetry.io/otel/oteltest v0.20.0/go.mod h1:L7bgKf9ZB7qCwT9Up7i9/pn0PWIa9FqQ2IQ8LoxiGnw= +go.opentelemetry.io/otel/sdk v0.20.0/go.mod h1:g/IcepuwNsoiX5Byy2nNV0ySUF1em498m7hBWC279Yc= +go.opentelemetry.io/otel/sdk/export/metric v0.20.0/go.mod h1:h7RBNMsDJ5pmI1zExLi+bJK+Dr8NQCh0qGhm1KDnNlE= +go.opentelemetry.io/otel/sdk/metric v0.20.0/go.mod h1:knxiS8Xd4E/N+ZqKmUPf3gTTZ4/0TjTXukfxjzSTpHE= +go.opentelemetry.io/otel/trace v0.20.0/go.mod h1:6GjCW8zgDjwGHGa6GkyeB8+/5vjT16gUEi0Nf1iBdgw= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= +go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/goleak v1.1.11-0.20210813005559-691160354723 h1:sHOAIxRGBp443oHZIPB+HsUGaksVCXVQENPxwTfQdH4= +go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= +go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= +go.uber.org/goleak v1.1.12 h1:gZAh5/EyT/HQwlpkCy6wTpqfH9H8Lz8zbm3dZh+OyzA= +go.uber.org/goleak v1.1.12/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= +go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= -go.uber.org/zap v1.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI= +go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= +go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= +go.uber.org/zap v1.20.0 h1:N4oPlghZwYG55MlU6LXk/Zp00FVNE9X9wrYO8CEs4lc= +go.uber.org/zap v1.20.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190320223903-b7391e95e576/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190422162423-af44ce270edf/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190530122614-20be4c3c3ed5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -332,6 +798,8 @@ golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= @@ -340,18 +808,27 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 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-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190320064053-1272bf9dcd53/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -368,11 +845,25 @@ golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/ golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200602114024-627f9648deb9/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM= +golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= +golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210825183410-e898025ed96a/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211209124913-491a49abca63 h1:iocB37TsdFuN6IBRZ+ry36wrkoV51/tl5vOWqkcPGvY= golang.org/x/net v0.0.0-20211209124913-491a49abca63/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -380,34 +871,59 @@ golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4Iltr golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 h1:RerP+noqYHUQ8CMRcPlC2nvTa4dcBIjegkuWdcUDuqg= golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190412183630-56d357773e84/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190321052220-f7bb7a8bee54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190419153524-e8e3143a4f4a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190531175056-4c3a928424d2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -421,22 +937,48 @@ golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200923182605-d9f96fdee20d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210420072515-93ed5bcd2bfe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211029165221-6e7872819dc8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211110154304-99a53858aa08/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211123173158-ef496fb156ab h1:rfJ1bsoJQQIAoAxTxB7bme+vHrNkRw8CqfsYh9w54cw= golang.org/x/sys v0.0.0-20211123173158-ef496fb156ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b h1:9zKuko04nR4gjZ4+DNjHqRlAJqbJETHwiNKDqTfOjfE= +golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= @@ -444,23 +986,38 @@ golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac h1:7zkz7BUtwNFFqcowJ+RIgu2MaV/MapERkDIy+mwPyjs= +golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190125232054-d66bd3c5d5a6/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190329151228-23e29df326fe/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190416151739-9c9e1878f421/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190420181800-aa740d480789/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190531172133-b3315ee88b7d/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190617190820-da514acc4774/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -488,13 +1045,24 @@ golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= +golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= +golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.6-0.20210820212750-d4cc65f0b2ff/go.mod h1:YD9qOF0M9xpSpdWTBbzEl5e/RnCefISl8E5Noe10jFM= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +gomodules.xyz/jsonpatch/v2 v2.2.0 h1:4pT439QV83L+G9FkcCriY6EkpcK6r6bK+A5FBUMI7qY= +gomodules.xyz/jsonpatch/v2 v2.2.0/go.mod h1:WXp+iVDkoLQqPudfQ9GBlwB2eZ5DKOnjQZCYdOS8GPY= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= @@ -511,12 +1079,20 @@ google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0M google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= +google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= +google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= +google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= +google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= +google.golang.org/api v0.44.0/go.mod h1:EBOGZqzyhtvMDoxwS97ctnh0zUmYY6CxqXsc1AvkYD8= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= +google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -538,6 +1114,7 @@ google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= @@ -547,9 +1124,22 @@ google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7Fc google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa h1:I0YcKz0I7OAhddo7ya8kMnvprhcWM045PmkBdMO9zN0= -google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20201102152239-715cce707fb0/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= +google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20220118154757-00ab72f36ad5 h1:zzNejm+EgrbLfDZ6lu9Uud2IVvHySPl8vQzf04laR5Q= +google.golang.org/genproto v0.0.0-20220118154757-00ab72f36ad5/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -562,8 +1152,15 @@ google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKa google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= +google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= +google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= +google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc v1.43.0 h1:Eeu7bZtDZ2DpRCsLhUlcrLnvYaMK1Gz86a+hMVvELmM= google.golang.org/grpc v1.43.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= @@ -581,6 +1178,7 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -590,20 +1188,30 @@ gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= +gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= +gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= +gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -611,8 +1219,25 @@ 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/apimachinery v0.23.1 h1:sfBjlDFwj2onG0Ijx5C+SrAoeUscPrmghm7wHP+uXlo= -k8s.io/apimachinery v0.23.1/go.mod h1:SADt2Kl8/sttJ62RRsi9MIV4o8f5S3coArm0Iu3fBno= +k8s.io/api v0.23.0/go.mod h1:8wmDdLBHBNxtOIytwLstXt5E9PddnZb0GaMcqsvDBpg= +k8s.io/api v0.23.2 h1:62cpzreV3dCuj0hqPi8r4dyWh48ogMcyh+ga9jEGij4= +k8s.io/api v0.23.2/go.mod h1:sYuDb3flCtRPI8ghn6qFrcK5ZBu2mhbElxRE95qpwlI= +k8s.io/apiextensions-apiserver v0.23.0/go.mod h1:xIFAEEDlAZgpVBl/1VSjGDmLoXAWRG40+GsWhKhAxY4= +k8s.io/apiextensions-apiserver v0.23.2 h1:N6CIVAhmF0ahgFKUMDdV/AUyckhUb4nIyVPohPtdUPk= +k8s.io/apiextensions-apiserver v0.23.2/go.mod h1:9cs7avT6+GfzbB0pambTvH11wcaR85QQg4ovl9s15UU= +k8s.io/apimachinery v0.23.0/go.mod h1:fFCTTBKvKcwTPFzjlcxp91uPFZr+JA0FubU4fLzzFYc= +k8s.io/apimachinery v0.23.2 h1:dBmjCOeYBdg2ibcQxMuUq+OopZ9fjfLIR5taP/XKeTs= +k8s.io/apimachinery v0.23.2/go.mod h1:zDqeV0AK62LbCI0CI7KbWCAYdLg+E+8UXJ0rIz5gmS8= +k8s.io/apiserver v0.23.0/go.mod h1:Cec35u/9zAepDPPFyT+UMrgqOCjgJ5qtfVJDxjZYmt4= +k8s.io/apiserver v0.23.2/go.mod h1:Kdt8gafkPev9Gfh+H6lCPbmRu42f7BfhOfHKKa3dtyU= +k8s.io/client-go v0.23.0/go.mod h1:hrDnpnK1mSr65lHHcUuIZIXDgEbzc7/683c6hyG4jTA= +k8s.io/client-go v0.23.2 h1:BNbOcxa99jxHH8mM1cPKGIrrKRnCSAfAtyonYGsbFtE= +k8s.io/client-go v0.23.2/go.mod h1:k3YbsWg6GWdHF1THHTQP88X9RhB1DWPo3Dq7KfU/D1c= +k8s.io/code-generator v0.23.0/go.mod h1:vQvOhDXhuzqiVfM/YHp+dmg10WDZCchJVObc9MvowsE= +k8s.io/code-generator v0.23.2/go.mod h1:S0Q1JVA+kSzTI1oUvbKAxZY/DYbA/ZUb4Uknog12ETk= +k8s.io/component-base v0.23.0/go.mod h1:DHH5uiFvLC1edCpvcTDV++NKULdYYU6pR9Tt3HIKMKI= +k8s.io/component-base v0.23.2 h1:dAYmUhWIBWO762etTjBEEKtYYHi5CoQInSLtK6LM1Zs= +k8s.io/component-base v0.23.2/go.mod h1:wS9Z03MO3oJ0RU8bB/dbXTiluGju+SC/F5i660gxB8c= k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= @@ -624,8 +1249,9 @@ k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.30.0 h1:bUO6drIvCIsvZ/XFgfxoGFQU/a4Qkh0iAlvUR7vlHJw= k8s.io/klog/v2 v2.30.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E= -k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 h1:E3J9oCLlaobFUqsjG9DfKbP2BmgwBL2p7pn0A3dG9W4= k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65/go.mod h1:sX9MT8g7NVZM5lVL/j8QyCCJe8YSMW30QvGZWaCIDIk= +k8s.io/kube-openapi v0.0.0-20220114203427-a0453230fd26 h1:2G24ndYyfk0l23ZrGutxb0s9TRe4m1ZjFlcu4cEU1zA= +k8s.io/kube-openapi v0.0.0-20220114203427-a0453230fd26/go.mod h1:sX9MT8g7NVZM5lVL/j8QyCCJe8YSMW30QvGZWaCIDIk= k8s.io/utils v0.0.0-20191030222137-2b95a09bc58d/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b h1:wxEMGetGMur3J1xuGLQY7GEQYg9bZxKn3tKo5k/eYcs= @@ -633,6 +1259,10 @@ k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b/go.mod h1:jPW/WVKK9YHAvNhRxK0md/ rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.25/go.mod h1:Mlj9PNLmG9bZ6BHFwFKDo5afkpWyUISkb9Me0GnK66I= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.27/go.mod h1:tq2nT0Kx7W+/f2JVE+zxYtUhdjuELJkVpNz+x/QN5R4= +sigs.k8s.io/controller-runtime v0.11.0 h1:DqO+c8mywcZLFJWILq4iktoECTyn30Bkj0CwgqMpZWQ= +sigs.k8s.io/controller-runtime v0.11.0/go.mod h1:KKwLiTooNGu+JmLZGn9Sl3Gjmfj66eMbCQznLP5zcqA= sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 h1:fD1pz4yfdADVNfFmcP2aBEtudwUQ1AlLnRBALr33v3s= sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6/go.mod h1:p4QtZmO4uMYipTQNzagwnNoseA6OxSUutVw05NhYDRs= sigs.k8s.io/kustomize/pseudo/k8s v0.1.0 h1:otg4dLFc03c3gzl+2CV8GPGcd1kk8wjXwD+UhhcCn5I= @@ -640,8 +1270,10 @@ sigs.k8s.io/kustomize/pseudo/k8s v0.1.0/go.mod h1:bl/gVJgYYhJZCZdYU2BfnaKYAlqFkg sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e h1:4Z09Hglb792X0kfOBBJUPFEyvVfQWrYT/l8h5EKA6JQ= sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= -sigs.k8s.io/structured-merge-diff/v4 v4.1.2 h1:Hr/htKFmJEbtMgS/UD0N+gtgctAqz81t3nu+sPzynno= sigs.k8s.io/structured-merge-diff/v4 v4.1.2/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= +sigs.k8s.io/structured-merge-diff/v4 v4.2.0/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= +sigs.k8s.io/structured-merge-diff/v4 v4.2.1 h1:bKCqE9GvQ5tiVHn5rfn1r+yao3aLQEaLzkkmAkf+A6Y= +sigs.k8s.io/structured-merge-diff/v4 v4.2.1/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= diff --git a/components/common/pkg/controller/apply/apply.go b/components/common/pkg/controller/apply/apply.go new file mode 100644 index 0000000..e6cf067 --- /dev/null +++ b/components/common/pkg/controller/apply/apply.go @@ -0,0 +1,350 @@ +package apply + +import ( + "context" + "fmt" + "net/url" + "strings" + "time" + + "github.com/RafaySystems/rcloud-base/components/common/pkg/controller/client" + scheme "github.com/RafaySystems/rcloud-base/components/common/pkg/controller/scheme" + "github.com/RafaySystems/rcloud-base/components/common/pkg/controller/util" + clusterv2 "github.com/RafaySystems/rcloud-base/components/common/proto/types/controller" + apixv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" + apierrs "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/client-go/util/retry" + ctrlclient "sigs.k8s.io/controller-runtime/pkg/client" + logf "sigs.k8s.io/controller-runtime/pkg/log" +) + +var ( + applyLog = logf.Log.WithName("cluster-v2-apply") +) + +var ( + crdv1beta1GVK = schema.GroupVersionKind{ + Group: apixv1beta1.SchemeGroupVersion.Group, + Version: apixv1beta1.SchemeGroupVersion.Version, + Kind: "CustomResourceDefinition", + } +) + +var knownApplyUpdateGroups = func() map[string]struct{} { + return map[string]struct{}{ + clusterv2.GroupVersion.Group: {}, + } +}() + +// isApplyUpdate checks if object should be updated for apply operation +func isApplyUpdate(o runtime.Object) bool { + group := o.GetObjectKind().GroupVersionKind().Group + if _, ok := knownApplyUpdateGroups[group]; ok { + return true + } + return false +} + +// Options are the options for apply operation +type Options struct { + // if UseUpdate is set, then update is used instead of patch + UseUpdate bool + // if DontCreate is set, then object is not created if it is not present; + // it is only updated/patched when present + DontCreate bool +} + +// Option is the functional apply options +type Option func(*Options) + +// WithUseUpdate sets if update should be used instead of patch for apply +// operation +func WithUseUpdate(o runtime.Object) Option { + return func(opts *Options) { + opts.UseUpdate = isApplyUpdate(o) + } +} + +// WithForceUseUpdate sets if update should be used instead of patch for apply +// operation, irrespective of whether the object is of rafay domain or not +func WithForceUseUpdate() Option { + return func(opts *Options) { + opts.UseUpdate = true + } +} + +// WithDontCreate sets DontCreate flag +func WithDontCreate() Option { + return func(opts *Options) { + opts.DontCreate = true + } +} + +// Applier is the interface for applying patch to runtime objects +type Applier interface { + Apply(ctx context.Context, obj ctrlclient.Object, opts ...Option) error + ApplyStatus(ctx context.Context, obj ctrlclient.Object, statusObj interface{}) error + ctrlclient.Client +} + +type applier struct { + dynamic bool + ctrlclient.Client +} + +// NewApplier returns new applier +func NewApplier(client ctrlclient.Client) Applier { + return &applier{false, client} +} + +// NewDynamicApplier returns a new applier whose client is dynamically refreshed +// when new CRDs are installed +func NewDynamicApplier() (Applier, error) { + c, err := client.New() + if err != nil { + return nil, err + } + + return &applier{true, c}, nil +} + +func isCRD(gvk schema.GroupVersionKind) bool { + //applyLog.Info("is crd", "gvk", gvk) + switch gvk { + case crdv1beta1GVK: + return true + } + return false +} + +func (a *applier) Apply(ctx context.Context, obj ctrlclient.Object, opts ...Option) error { + var applyOpts = new(Options) + for _, f := range opts { + f(applyOpts) + } + + // added to preserve backward compatability with other code + if !applyOpts.UseUpdate { + applyOpts.UseUpdate = isApplyUpdate(obj) + } + + gvk := obj.GetObjectKind().GroupVersionKind() + log := applyLog.WithValues("gvk", gvk) + + var objectKey ctrlclient.ObjectKey + var current ctrlclient.Object + var err error + + if mo, ok := obj.(metav1.Object); ok { + + objectKey = ctrlclient.ObjectKey{ + Name: mo.GetName(), + Namespace: mo.GetNamespace(), + } + + } + + gvk, err = GetGVK(obj) + if err != nil { + return err + } + + current, err = util.NewObject(gvk) + + if err != nil { + err = fmt.Errorf("unable to create new object %s", err.Error()) + return err + } + + //refresh client before applying a unknow object + if !util.KnownObject(gvk) && a.dynamic { + c, err := client.New() + if err != nil { + log.Info("error in creating the refreshed client ", "err", err) + err = fmt.Errorf("unable to create new client for dynamic applier %s", err.Error()) + return err + } + a.Client = c + } + + return retry.RetryOnConflict(retry.DefaultRetry, func() error { + err := a.Get(ctx, objectKey, current) + if err != nil { + if apierrs.IsNotFound(err) { + // if don't create flag is set and object is not found + if applyOpts.DontCreate { + return err + } + + err = a.Create(ctx, obj) + if err != nil { + err = fmt.Errorf("unable to create step object %s", err.Error()) + return err + } + + if a.dynamic && isCRD(gvk) { + + // wait until the crds are sync + // TODO : what happens when you get an error ??? + err = a.pollCRDUntilEstablished(ctx, 180*time.Second, obj, objectKey) + if err != nil { + log.Info("error in polling ", "err", err) + return nil + } + + log.Info("crd created, refreshing client") + a.Client, err = client.New() + if err != nil { + log.Info("error in creating the refreshed client ", "err", err) + return err + } + log.Info("crd created, refreshed client") + } + return nil + } + err = fmt.Errorf("unable to get step object %s", err.Error()) + return err + } + + current.GetObjectKind().SetGroupVersionKind(gvk) + + if applyOpts.UseUpdate { + err = updateObject(current, obj) + if err != nil { + return err + } + err = a.Update(ctx, current) + if err != nil { + return err + } + } else { + err = a.Patch(ctx, obj, NewPatch(current)) + if err != nil { + err = fmt.Errorf("unable to patch step object %s", err.Error()) + return err + + } + } + + obj.GetObjectKind().SetGroupVersionKind(gvk) + + return nil + }) +} + +func (a *applier) pollCRDUntilEstablished(ctx context.Context, timeout time.Duration, obj ctrlclient.Object, objectKey types.NamespacedName) error { + return wait.PollImmediate(time.Second, timeout, func() (bool, error) { + + crd := &apixv1beta1.CustomResourceDefinition{} + err := scheme.Scheme.Convert(obj, crd, nil) + if err != nil { + return false, fmt.Errorf("unable to convert to CRD type: %v", err) + } + + err = a.Get(ctx, objectKey, obj) + if err != nil { + applyLog.Info("error in getting the object", "err", err) + } + + applyLog.Info("checking crd status ", "name", crd.Spec.Names, "crd status", crd.Status) + for _, cond := range crd.Status.Conditions { + switch cond.Type { + case apixv1beta1.Established: + if cond.Status == apixv1beta1.ConditionTrue { + return true, nil + } + case apixv1beta1.NamesAccepted: + if cond.Status == apixv1beta1.ConditionFalse { + return false, fmt.Errorf("naming conflict detected for CRD %s", crd.GetName()) + } + } + } + + return false, nil + }) +} + +func getGVKIfNotFound(obj runtime.Object) (schema.GroupVersionKind, error) { + currentGVK := obj.GetObjectKind().GroupVersionKind() + formedGVK := schema.GroupVersionKind{} + + kind := currentGVK.Kind + if len(kind) == 0 { + gvks, _, err := scheme.Scheme.ObjectKinds(obj) + if err != nil { + return formedGVK, err + } + kind = gvks[0].Kind + } + + var listMeta metav1.Common + objectMeta, err := meta.Accessor(obj) + if err != nil { + listMeta, err = meta.CommonAccessor(obj) + if err != nil { + return formedGVK, err + } + } else { + listMeta = objectMeta + } + + version := currentGVK.GroupVersion().String() + if len(version) == 0 { + selfLink := listMeta.GetSelfLink() + if len(selfLink) == 0 { + return formedGVK, ErrNoSelfLink + } + selfLinkURL, err := url.Parse(selfLink) + if err != nil { + return formedGVK, err + } + // example paths: ///* + parts := strings.Split(selfLinkURL.Path, "/") + if len(parts) < 3 { + return formedGVK, fmt.Errorf("unexpected self link format: '%v'; got version '%v'", selfLink, version) + } + version = parts[2] + } + + formedGVK.Kind = kind + formedGVK.Version = version + + return formedGVK, nil +} + +func (a *applier) ApplyStatus(ctx context.Context, obj ctrlclient.Object, statusObj interface{}) error { + var objectKey ctrlclient.ObjectKey + var original ctrlclient.Object + var err error + if mo, ok := obj.(metav1.Object); ok { + objectKey = ctrlclient.ObjectKey{ + Name: mo.GetName(), + Namespace: mo.GetNamespace(), + } + } + + gvk, err := GetGVK(obj) + if err != nil { + return err + } + + original, err = util.NewObject(gvk) + + if err != nil { + return err + } + + return retry.RetryOnConflict(retry.DefaultRetry, func() error { + err := a.Get(ctx, objectKey, original) + if err != nil { + return err + } + return a.Status().Patch(ctx, obj, NewStatus(original, statusObj)) + }) +} diff --git a/components/common/pkg/controller/apply/apply_test.go b/components/common/pkg/controller/apply/apply_test.go new file mode 100644 index 0000000..3c9411c --- /dev/null +++ b/components/common/pkg/controller/apply/apply_test.go @@ -0,0 +1,305 @@ +package apply + +import ( + "context" + "encoding/json" + "fmt" + "io/ioutil" + "os" + "testing" + + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + ctrlclient "sigs.k8s.io/controller-runtime/pkg/client" + + cruntime "github.com/RafaySystems/rcloud-base/components/common/pkg/controller/runtime" + clusterv2 "github.com/RafaySystems/rcloud-base/components/common/proto/types/controller" + + "sigs.k8s.io/yaml" +) + +func getObject(name string) ctrlclient.Object { + f, err := os.Open(fmt.Sprintf("testdata/%s", name)) + if err != nil { + panic(err) + } + + yb, err := ioutil.ReadAll(f) + if err != nil { + panic(err) + } + + jb, err := yaml.YAMLToJSON(yb) + if err != nil { + panic(err) + } + + var so clusterv2.StepObject + err = json.Unmarshal(jb, &so) + if err != nil { + panic(err) + } + + o, _, err := cruntime.ToUnstructuredObject(&so) + if err != nil { + panic(err) + } + + return o +} + +func TestCRDNSApply(t *testing.T) { + applier, err := NewDynamicApplier() + if err != nil { + t.Error(err) + return + } + + o3 := getObject("rafay-system-ns.yaml") + err = applier.Apply(context.TODO(), o3) + if err != nil { + t.Error(err) + return + } +} + +func TestApplier(t *testing.T) { + + applier, err := NewDynamicApplier() + if err != nil { + t.Error(err) + return + } + + cm1 := corev1.ConfigMap{ + TypeMeta: metav1.TypeMeta{ + APIVersion: "v1", + Kind: "ConfigMap", + }, + ObjectMeta: metav1.ObjectMeta{ + Namespace: "default", + Name: "test-cm", + }, + Data: map[string]string{ + "test1": "test1", + }, + } + + err = applier.Apply(context.TODO(), &cm1) + if err != nil { + t.Error(err) + return + } + + cm1 = corev1.ConfigMap{ + TypeMeta: metav1.TypeMeta{ + APIVersion: "v1", + Kind: "ConfigMap", + }, + ObjectMeta: metav1.ObjectMeta{ + Namespace: "default", + Name: "test-cm", + }, + Data: map[string]string{ + "test2": "test2", + }, + } + + err = applier.Apply(context.TODO(), &cm1) + if err != nil { + t.Error(err) + return + } + + s1 := corev1.Secret{ + TypeMeta: metav1.TypeMeta{ + APIVersion: "v1", + Kind: "Secret", + }, + ObjectMeta: metav1.ObjectMeta{ + Namespace: "default", + Name: "test-s-1", + }, + Data: map[string][]byte{ + "test1": []byte("test1"), + }, + } + + err = applier.Apply(context.TODO(), &s1) + if err != nil { + t.Error(err) + return + } + + s1 = corev1.Secret{ + TypeMeta: metav1.TypeMeta{ + APIVersion: "v1", + Kind: "Secret", + }, + ObjectMeta: metav1.ObjectMeta{ + Namespace: "default", + Name: "test-s-1", + }, + Data: map[string][]byte{ + "test2": []byte("test2"), + }, + } + + err = applier.Apply(context.TODO(), &s1) + if err != nil { + t.Error(err) + return + } + + o1 := getObject("crd1.yaml") + + err = applier.Apply(context.TODO(), o1) + if err != nil { + t.Error(err) + return + } + + o2 := getObject("crd1-modified.yaml") + err = applier.Apply(context.TODO(), o2) + if err != nil { + t.Error(err) + return + } + + o3 := getObject("cr1.yaml") + err = applier.Apply(context.TODO(), o3) + if err != nil { + t.Error(err) + return + } + + o4 := getObject("statefulset.yaml") + err = applier.Apply(context.TODO(), o4) + if err != nil { + t.Error(err) + return + } + + o5 := getObject("statefulset-patch.yaml") + err = applier.Apply(context.TODO(), o5) + if err != nil { + t.Error(err) + return + } + + // jb, _ := GetPreviousConfig(o4) + + // t.Log(string(jb)) + +} + +func TestApplyForPod(t *testing.T) { + applier, err := NewDynamicApplier() + if err != nil { + t.Error(err) + return + } + + o1 := getObject("pod1.yaml") + + err = applier.Apply(context.TODO(), o1) + if err != nil { + t.Error(err) + return + } + + o2 := getObject("pod2.yaml") + err = applier.Apply(context.TODO(), o2) + if err != nil { + t.Error(err) + return + } + +} + +func TestApplyDeployment(t *testing.T) { + applier, err := NewDynamicApplier() + if err != nil { + t.Error(err) + return + } + + o1 := getObject("deployment.yaml") + + err = applier.Apply(context.TODO(), o1) + if err != nil { + t.Error(err) + return + } + + o2 := getObject("deployment-patch.yaml") + err = applier.Apply(context.TODO(), o2) + if err != nil { + t.Error(err) + return + } + +} + +func TestServiceApply(t *testing.T) { + // applier, err := NewDynamicApplier() + // // if err != nil { + // // t.Error(err) + // // return + // // } + + // // o1 := getObject("service1.yaml") + + // // err = applier.Apply(context.TODO(), o1) + // // if err != nil { + // // t.Error(err) + // // return + // // } + + // o2 := getObject("service2-current.yaml") + // err = applier.Apply(context.TODO(), o2) + // if err != nil { + // t.Error(err) + // return + // } +} + +func TestCRDApply(t *testing.T) { + applier, err := NewDynamicApplier() + if err != nil { + t.Error(err) + return + } + + o1 := getObject("crd1.yaml") + + err = applier.Apply(context.TODO(), o1) + if err != nil { + t.Error(err) + return + } + + o2 := getObject("cr1.yaml") + err = applier.Apply(context.TODO(), o2) + if err != nil { + t.Error(err) + return + } +} + +func TestInvalidApply(t *testing.T) { + applier, err := NewDynamicApplier() + if err != nil { + t.Error(err) + return + } + + o1 := getObject("invalid-deployment.yaml") + + err = applier.Apply(context.TODO(), o1) + if err == nil { + t.Error("expected error") + return + } + t.Log(err.Error()) +} diff --git a/components/common/pkg/controller/apply/appy_bench_test.go b/components/common/pkg/controller/apply/appy_bench_test.go new file mode 100644 index 0000000..dadf891 --- /dev/null +++ b/components/common/pkg/controller/apply/appy_bench_test.go @@ -0,0 +1,46 @@ +package apply + +import ( + "context" + "fmt" + "testing" +) + +func BenchmarkLargeApply(b *testing.B) { + for n := 0; n < b.N; n++ { + largeApply() + } +} + +func largeApply() { + obj := getObject("prometheus.yaml") + + applier, err := NewDynamicApplier() + if err != nil { + fmt.Println(err) + return + } + + err = applier.Apply(context.TODO(), obj) + if err != nil { + fmt.Println(err) + return + } +} + +func TestLargeApply(t *testing.T) { + obj := getObject("prometheus.yaml") + + applier, err := NewDynamicApplier() + if err != nil { + t.Error(err) + return + } + + err = applier.Apply(context.TODO(), obj) + if err != nil { + t.Error(err) + return + } + +} diff --git a/components/common/pkg/controller/apply/patch.go b/components/common/pkg/controller/apply/patch.go new file mode 100644 index 0000000..9a33efb --- /dev/null +++ b/components/common/pkg/controller/apply/patch.go @@ -0,0 +1,127 @@ +package apply + +import ( + "bytes" + "fmt" + + "github.com/RafaySystems/rcloud-base/components/common/pkg/controller/scheme" + "github.com/RafaySystems/rcloud-base/components/common/pkg/controller/util" + sp "k8s.io/apimachinery/pkg/util/strategicpatch" + + "k8s.io/apimachinery/pkg/types" + "sigs.k8s.io/controller-runtime/pkg/client" + logf "sigs.k8s.io/controller-runtime/pkg/log" +) + +//var json = jsoniter.ConfigCompatibleWithStandardLibrary + +var ( + patchLog = logf.Log.WithName("cluster-v2-patch") +) + +type patch struct { + current client.Object +} + +var _ client.Patch = (*patch)(nil) + +func (p *patch) Data(o client.Object) ([]byte, error) { + var err error + var ret []byte + var current, modified, original []byte + + current, err = getBytes(p.current, false) + if err != nil { + err = fmt.Errorf("unable to serialize current object %s", err.Error()) + return nil, err + } + + gvk, err := util.GetGVK(current) + if err != nil { + return nil, fmt.Errorf("unable to get gvk of current object %s", err.Error()) + } + + original, err = GetOriginalConfig(p.current) + if err != nil { + err = fmt.Errorf("unable to serialize original object %s", err.Error()) + return nil, err + } + + modified, err = getBytes(o, false) + if err != nil { + err = fmt.Errorf("unable to serialize modified object %s", err.Error()) + return nil, err + } + + if util.IsStrategicMergePatch(*gvk) { + ret, err = util.CreateStrategicMergePatch(*gvk, original, current, modified) + } else { + ret, err = util.CreateJSONMergePatch(original, current, modified) + } + + if err != nil { + err = fmt.Errorf("unable to create patch %s", err.Error()) + return nil, err + } + + return ret, nil +} + +func (p *patch) Type() types.PatchType { + current, _ := getBytes(p.current, false) + + gvk, _ := util.GetGVK(current) + if util.IsStrategicMergePatch(*gvk) { + return types.StrategicMergePatchType + } + return types.MergePatchType +} + +// NewPatch prepres patch for current runtime Object +func NewPatch(current client.Object) client.Patch { + + return &patch{ + current: current, + } +} + +type patchStatus struct { + o client.Object + statusObj interface{} +} + +var _ client.Patch = (*patchStatus)(nil) + +func (p *patchStatus) Data(current client.Object) ([]byte, error) { + oBuf := new(bytes.Buffer) + err := scheme.Serializer.Encode(p.o, oBuf) + if err != nil { + return nil, err + } + + cBuf := new(bytes.Buffer) + err = scheme.Serializer.Encode(current, cBuf) + if err != nil { + return nil, err + } + + pb, err := sp.CreateTwoWayMergePatch(oBuf.Bytes(), cBuf.Bytes(), p.statusObj) + if err != nil { + return nil, err + } + + return sp.StrategicMergePatch(oBuf.Bytes(), pb, p.statusObj) + +} + +func (p *patchStatus) Type() types.PatchType { + return types.MergePatchType +} + +// NewStatus returns new path for status objects +func NewStatus(original client.Object, statusObj interface{}) client.Patch { + return &patchStatus{ + o: original, + statusObj: statusObj, + } +} diff --git a/components/common/pkg/controller/apply/patch_large_test.go b/components/common/pkg/controller/apply/patch_large_test.go new file mode 100644 index 0000000..b491fe5 --- /dev/null +++ b/components/common/pkg/controller/apply/patch_large_test.go @@ -0,0 +1,19 @@ +package apply + +import "testing" + +func largePatch() error { + obj := getObject("prometheus.yaml") + + _, err := NewPatch(obj).Data(obj) + return err +} + +func BenchmarkLargePatch(b *testing.B) { + for n := 0; n < b.N; n++ { + err := largePatch() + if err != nil { + + } + } +} diff --git a/components/common/pkg/controller/apply/patch_test.go b/components/common/pkg/controller/apply/patch_test.go new file mode 100644 index 0000000..c2382f8 --- /dev/null +++ b/components/common/pkg/controller/apply/patch_test.go @@ -0,0 +1,32 @@ +package apply + +import ( + "testing" +) + +func TestServicePatch(t *testing.T) { + s1 := getObject("service2-current.yaml") + s2 := getObject(("service2-modified.yaml")) + + p := NewPatch(s1) + b, err := p.Data(s2) + if err != nil { + t.Error(err) + return + } + t.Log(string(b)) + +} + +func TestServicePatch1(t *testing.T) { + current := getObject("service1-current.yaml") + modified := getObject(("service1-modified.yaml")) + + p := NewPatch(current) + b, err := p.Data(modified) + if err != nil { + t.Error(err) + return + } + t.Log(string(b)) +} diff --git a/components/common/pkg/controller/apply/testdata/cr1.yaml b/components/common/pkg/controller/apply/testdata/cr1.yaml new file mode 100644 index 0000000..739f19e --- /dev/null +++ b/components/common/pkg/controller/apply/testdata/cr1.yaml @@ -0,0 +1,8 @@ +apiVersion: "stable.example.com/v1" +kind: CronTab +metadata: + name: my-new-cron-object + namespace: default +spec: + cronSpec: "* * * * */5" + image: my-awesome-cron-image \ No newline at end of file diff --git a/components/common/pkg/controller/apply/testdata/crd1-modified.yaml b/components/common/pkg/controller/apply/testdata/crd1-modified.yaml new file mode 100644 index 0000000..dcd2c03 --- /dev/null +++ b/components/common/pkg/controller/apply/testdata/crd1-modified.yaml @@ -0,0 +1,43 @@ +# Deprecated in v1.16 in favor of apiextensions.k8s.io/v1 +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + # name must match the spec fields below, and be in the form: . + name: crontabs.stable.example.com +spec: + # group name to use for REST API: /apis// + group: stable.example.com + # list of versions supported by this CustomResourceDefinition + versions: + - name: v1 + # Each version can be enabled/disabled by Served flag. + served: true + # One and only one version must be marked as the storage version. + storage: true + # either Namespaced or Cluster + scope: Namespaced + names: + # plural name to be used in the URL: /apis/// + plural: crontabs + # singular name to be used as an alias on the CLI and for display + singular: crontab + # kind is normally the CamelCased singular type. Your resource manifests use this. + kind: CronTab + # shortNames allow shorter string to match your resource on the CLI + shortNames: + - ct + - ct4 + preserveUnknownFields: false + validation: + openAPIV3Schema: + type: object + properties: + spec: + type: object + properties: + cronSpec: + type: string + image: + type: string + replicas: + type: integer \ No newline at end of file diff --git a/components/common/pkg/controller/apply/testdata/crd1.yaml b/components/common/pkg/controller/apply/testdata/crd1.yaml new file mode 100644 index 0000000..b6cacd9 --- /dev/null +++ b/components/common/pkg/controller/apply/testdata/crd1.yaml @@ -0,0 +1,42 @@ +# Deprecated in v1.16 in favor of apiextensions.k8s.io/v1 +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + # name must match the spec fields below, and be in the form: . + name: crontabs.stable.example.com +spec: + # group name to use for REST API: /apis// + group: stable.example.com + # list of versions supported by this CustomResourceDefinition + versions: + - name: v1 + # Each version can be enabled/disabled by Served flag. + served: true + # One and only one version must be marked as the storage version. + storage: true + # either Namespaced or Cluster + scope: Namespaced + names: + # plural name to be used in the URL: /apis/// + plural: crontabs + # singular name to be used as an alias on the CLI and for display + singular: crontab + # kind is normally the CamelCased singular type. Your resource manifests use this. + kind: CronTab + # shortNames allow shorter string to match your resource on the CLI + shortNames: + - ct + preserveUnknownFields: false + validation: + openAPIV3Schema: + type: object + properties: + spec: + type: object + properties: + cronSpec: + type: string + image: + type: string + replicas: + type: integer \ No newline at end of file diff --git a/components/common/pkg/controller/apply/testdata/deployment-patch.yaml b/components/common/pkg/controller/apply/testdata/deployment-patch.yaml new file mode 100644 index 0000000..8cabf0c --- /dev/null +++ b/components/common/pkg/controller/apply/testdata/deployment-patch.yaml @@ -0,0 +1,24 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + namespace: default + name: nginx-deployment + labels: + app: nginx + annotations: + rafay.dev/original: '{"apiVersion":"apps/v1","kind":"Deployment","metadata":{"namespace":"default","name":"nginx-deployment","labels":{"app":"nginx"}},"spec":{"replicas":1,"selector":{"matchLabels":{"app":"nginx"}},"template":{"metadata":{"labels":{"app":"nginx"}},"spec":{"containers":[{"name":"nginx","image":"nginx:1.7.9","ports":[{"containerPort":80}]}]}}}}' +spec: + replicas: 1 + selector: + matchLabels: + app: nginx + template: + metadata: + labels: + app: nginx + spec: + containers: + - name: nginx + image: nginx:1.7.9 + ports: + - containerPort: 80 diff --git a/components/common/pkg/controller/apply/testdata/deployment.yaml b/components/common/pkg/controller/apply/testdata/deployment.yaml new file mode 100644 index 0000000..8bf15bc --- /dev/null +++ b/components/common/pkg/controller/apply/testdata/deployment.yaml @@ -0,0 +1,31 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + namespace: default + name: nginx-deployment + labels: + app: nginx + annotations: + rafay.dev/original: '{"apiVersion":"apps/v1","kind":"Deployment","metadata":{"namespace":"default","name":"nginx-deployment","labels":{"app":"nginx"}},"spec":{"replicas":1,"selector":{"matchLabels":{"app":"nginx"}},"template":{"metadata":{"labels":{"app":"nginx"}},"spec":{"containers":[{"name":"nginx","image":"nginx:1.7.9","ports":[{"containerPort":80}],"readinessProbe":{"httpGet":{"path":"/healthz","port":8080,"httpHeaders":[{"name":"X-Custom-Header","value":"Awesome"}]}}}]}}}}' +spec: + replicas: 1 + selector: + matchLabels: + app: nginx + template: + metadata: + labels: + app: nginx + spec: + containers: + - name: nginx + image: nginx:1.7.9 + ports: + - containerPort: 80 + readinessProbe: + httpGet: + path: /healthz + port: 8080 + httpHeaders: + - name: X-Custom-Header + value: Awesome \ No newline at end of file diff --git a/components/common/pkg/controller/apply/testdata/invalid-deployment.yaml b/components/common/pkg/controller/apply/testdata/invalid-deployment.yaml new file mode 100644 index 0000000..7e69786 --- /dev/null +++ b/components/common/pkg/controller/apply/testdata/invalid-deployment.yaml @@ -0,0 +1,31 @@ +apiVersion: apps/v1 +kind: Deployment11 +metadata: + namespace: default + name: nginx-deployment + labels: + app: nginx + annotations: + rafay.dev/original: '{"apiVersion":"apps/v1","kind":"Deployment","metadata":{"namespace":"default","name":"nginx-deployment","labels":{"app":"nginx"}},"spec":{"replicas":1,"selector":{"matchLabels":{"app":"nginx"}},"template":{"metadata":{"labels":{"app":"nginx"}},"spec":{"containers":[{"name":"nginx","image":"nginx:1.7.9","ports":[{"containerPort":80}],"readinessProbe":{"httpGet":{"path":"/healthz","port":8080,"httpHeaders":[{"name":"X-Custom-Header","value":"Awesome"}]}}}]}}}}' +spec: + replicas: 1 + selector: + matchLabels: + app: nginx + template: + metadata: + labels: + app: nginx + spec: + containers: + - name: nginx + image: nginx:1.7.9 + ports: + - containerPort: 80 + readinessProbe: + httpGet: + path: /healthz + port: 8080 + httpHeaders: + - name: X-Custom-Header + value: Awesome \ No newline at end of file diff --git a/components/common/pkg/controller/apply/testdata/pod1.yaml b/components/common/pkg/controller/apply/testdata/pod1.yaml new file mode 100644 index 0000000..5e84ef3 --- /dev/null +++ b/components/common/pkg/controller/apply/testdata/pod1.yaml @@ -0,0 +1,30 @@ +apiVersion: v1 +kind: Pod +metadata: + labels: + app: web + name: rss-site + namespace: default +spec: + containers: + - image: nginx + imagePullPolicy: IfNotPresent + name: front-end + ports: + - containerPort: 80 + protocol: TCP + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + - image: nickchase/rss-php-nginx:v1 + imagePullPolicy: IfNotPresent + name: rss-reader + ports: + - containerPort: 88 + protocol: TCP + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + dnsPolicy: ClusterFirst + enableServiceLinks: true + restartPolicy: Always + schedulerName: default-scheduler + terminationGracePeriodSeconds: 30 \ No newline at end of file diff --git a/components/common/pkg/controller/apply/testdata/pod2.yaml b/components/common/pkg/controller/apply/testdata/pod2.yaml new file mode 100644 index 0000000..47f5e03 --- /dev/null +++ b/components/common/pkg/controller/apply/testdata/pod2.yaml @@ -0,0 +1,30 @@ +apiVersion: v1 +kind: Pod +metadata: + labels: + app: web + name: rss-site + namespace: default +spec: + containers: + - image: nginx:1.17 + imagePullPolicy: IfNotPresent + name: front-end + ports: + - containerPort: 80 + protocol: TCP + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + - image: nickchase/rss-php-nginx:v1 + imagePullPolicy: IfNotPresent + name: rss-reader + ports: + - containerPort: 88 + protocol: TCP + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + dnsPolicy: ClusterFirst + enableServiceLinks: true + restartPolicy: Always + schedulerName: default-scheduler + terminationGracePeriodSeconds: 30 \ No newline at end of file diff --git a/components/common/pkg/controller/apply/testdata/prometheus.yaml b/components/common/pkg/controller/apply/testdata/prometheus.yaml new file mode 100644 index 0000000..6bf097b --- /dev/null +++ b/components/common/pkg/controller/apply/testdata/prometheus.yaml @@ -0,0 +1,9132 @@ +apiVersion: cluster.rafay.dev/v2 +kind: Task +metadata: + annotations: + rafay.dev/object-hash: 25dc4a1045d581e9cb506c8e8c840c3ea0e68ee1007d2a0e60b2fa109e7088c4 + rafay.dev/resource-hash: 508efe2a19717df6493adfa2dc65b9aef2e3db72316a954689da2c45346ddda6 + finalizers: + - cluster.rafay.dev.v2.predelete + labels: + rafay.dev/component: v1-prometheus + rafay.dev/global: "true" + rafay.dev/system: "true" + name: v1-prometheus + namespace: default +spec: + init: + - name: prometheus-k8s-prometheus-crd + object: + apiVersion: apiextensions.k8s.io/v1beta1 + kind: CustomResourceDefinition + metadata: + name: prometheuses.monitoring.coreos.com + spec: + group: monitoring.coreos.com + names: + kind: Prometheus + plural: prometheuses + scope: Namespaced + validation: + openAPIV3Schema: + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource + this object represents. Servers may infer this from the endpoint + the client submits requests to. Cannot be updated. In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds' + type: string + spec: + description: 'PrometheusSpec is a specification of the desired behavior + of the Prometheus cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#spec-and-status' + properties: + additionalAlertManagerConfigs: + description: SecretKeySelector selects a key of a Secret. + properties: + key: + description: The key of the secret to select from. Must be + a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + optional: + description: Specify whether the Secret or it's key must be + defined + type: boolean + required: + - key + additionalAlertRelabelConfigs: + description: SecretKeySelector selects a key of a Secret. + properties: + key: + description: The key of the secret to select from. Must be + a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + optional: + description: Specify whether the Secret or it's key must be + defined + type: boolean + required: + - key + additionalScrapeConfigs: + description: SecretKeySelector selects a key of a Secret. + properties: + key: + description: The key of the secret to select from. Must be + a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + optional: + description: Specify whether the Secret or it's key must be + defined + type: boolean + required: + - key + affinity: + description: Affinity is a group of affinity scheduling rules. + properties: + nodeAffinity: + description: Node affinity is a group of node affinity scheduling + rules. + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: The scheduler will prefer to schedule pods + to nodes that satisfy the affinity expressions specified + by this field, but it may choose a node that violates + one or more of the expressions. The node that is most + preferred is the one with the greatest sum of weights, + i.e. for each node that meets all of the scheduling + requirements (resource request, requiredDuringScheduling + affinity expressions, etc.), compute a sum by iterating + through the elements of this field and adding "weight" + to the sum if the node matches the corresponding matchExpressions; + the node(s) with the highest sum are the most preferred. + items: + description: An empty preferred scheduling term matches + all objects with implicit weight 0 (i.e. it's a no-op). + A null preferred scheduling term matches no objects + (i.e. is also a no-op). + properties: + preference: + description: A null or empty node selector term + matches no objects. The requirements of them are + ANDed. The TopologySelectorTerm type implements + a subset of the NodeSelectorTerm. + properties: + matchExpressions: + description: A list of node selector requirements + by node's labels. + items: + description: A node selector requirement is + a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: The label key that the selector + applies to. + type: string + operator: + description: Represents a key's relationship + to a set of values. Valid operators + are In, NotIn, Exists, DoesNotExist. + Gt, and Lt. + type: string + values: + description: An array of string values. + If the operator is In or NotIn, the + values array must be non-empty. If the + operator is Exists or DoesNotExist, + the values array must be empty. If the + operator is Gt or Lt, the values array + must have a single element, which will + be interpreted as an integer. This array + is replaced during a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: array + matchFields: + description: A list of node selector requirements + by node's fields. + items: + description: A node selector requirement is + a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: The label key that the selector + applies to. + type: string + operator: + description: Represents a key's relationship + to a set of values. Valid operators + are In, NotIn, Exists, DoesNotExist. + Gt, and Lt. + type: string + values: + description: An array of string values. + If the operator is In or NotIn, the + values array must be non-empty. If the + operator is Exists or DoesNotExist, + the values array must be empty. If the + operator is Gt or Lt, the values array + must have a single element, which will + be interpreted as an integer. This array + is replaced during a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: array + weight: + description: Weight associated with matching the + corresponding nodeSelectorTerm, in the range 1-100. + format: int32 + type: integer + required: + - weight + - preference + type: array + requiredDuringSchedulingIgnoredDuringExecution: + description: A node selector represents the union of the + results of one or more label queries over a set of nodes; + that is, it represents the OR of the selectors represented + by the node selector terms. + properties: + nodeSelectorTerms: + description: Required. A list of node selector terms. + The terms are ORed. + items: + description: A null or empty node selector term + matches no objects. The requirements of them are + ANDed. The TopologySelectorTerm type implements + a subset of the NodeSelectorTerm. + properties: + matchExpressions: + description: A list of node selector requirements + by node's labels. + items: + description: A node selector requirement is + a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: The label key that the selector + applies to. + type: string + operator: + description: Represents a key's relationship + to a set of values. Valid operators + are In, NotIn, Exists, DoesNotExist. + Gt, and Lt. + type: string + values: + description: An array of string values. + If the operator is In or NotIn, the + values array must be non-empty. If the + operator is Exists or DoesNotExist, + the values array must be empty. If the + operator is Gt or Lt, the values array + must have a single element, which will + be interpreted as an integer. This array + is replaced during a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: array + matchFields: + description: A list of node selector requirements + by node's fields. + items: + description: A node selector requirement is + a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: The label key that the selector + applies to. + type: string + operator: + description: Represents a key's relationship + to a set of values. Valid operators + are In, NotIn, Exists, DoesNotExist. + Gt, and Lt. + type: string + values: + description: An array of string values. + If the operator is In or NotIn, the + values array must be non-empty. If the + operator is Exists or DoesNotExist, + the values array must be empty. If the + operator is Gt or Lt, the values array + must have a single element, which will + be interpreted as an integer. This array + is replaced during a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: array + type: array + required: + - nodeSelectorTerms + podAffinity: + description: Pod affinity is a group of inter pod affinity + scheduling rules. + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: The scheduler will prefer to schedule pods + to nodes that satisfy the affinity expressions specified + by this field, but it may choose a node that violates + one or more of the expressions. The node that is most + preferred is the one with the greatest sum of weights, + i.e. for each node that meets all of the scheduling + requirements (resource request, requiredDuringScheduling + affinity expressions, etc.), compute a sum by iterating + through the elements of this field and adding "weight" + to the sum if the node has pods which matches the corresponding + podAffinityTerm; the node(s) with the highest sum are + the most preferred. + items: + description: The weights of all of the matched WeightedPodAffinityTerm + fields are added per-node to find the most preferred + node(s) + properties: + podAffinityTerm: + description: Defines a set of pods (namely those + matching the labelSelector relative to the given + namespace(s)) that this pod should be co-located + (affinity) or not co-located (anti-affinity) with, + where co-located is defined as running on a node + whose value of the label with key + matches that of any node on which a pod of the + set of pods is running + properties: + labelSelector: + description: A label selector is a label query + over a set of resources. The result of matchLabels + and matchExpressions are ANDed. An empty label + selector matches all objects. A null label + selector matches no objects. + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The requirements + are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key + that the selector applies to. + type: string + operator: + description: operator represents a + key's relationship to a set of values. + Valid operators are In, NotIn, Exists + and DoesNotExist. + type: string + values: + description: values is an array of + string values. If the operator is + In or NotIn, the values array must + be non-empty. If the operator is + Exists or DoesNotExist, the values + array must be empty. This array + is replaced during a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: array + matchLabels: + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + namespaces: + description: namespaces specifies which namespaces + the labelSelector applies to (matches against); + null or empty list means "this pod's namespace" + items: + type: string + type: array + topologyKey: + description: This pod should be co-located (affinity) + or not co-located (anti-affinity) with the + pods matching the labelSelector in the specified + namespaces, where co-located is defined as + running on a node whose value of the label + with key topologyKey matches that of any node + on which any of the selected pods is running. + Empty topologyKey is not allowed. + type: string + required: + - topologyKey + weight: + description: weight associated with matching the + corresponding podAffinityTerm, in the range 1-100. + format: int32 + type: integer + required: + - weight + - podAffinityTerm + type: array + requiredDuringSchedulingIgnoredDuringExecution: + description: If the affinity requirements specified by + this field are not met at scheduling time, the pod will + not be scheduled onto the node. If the affinity requirements + specified by this field cease to be met at some point + during pod execution (e.g. due to a pod label update), + the system may or may not try to eventually evict the + pod from its node. When there are multiple elements, + the lists of nodes corresponding to each podAffinityTerm + are intersected, i.e. all terms must be satisfied. + items: + description: Defines a set of pods (namely those matching + the labelSelector relative to the given namespace(s)) + that this pod should be co-located (affinity) or not + co-located (anti-affinity) with, where co-located + is defined as running on a node whose value of the + label with key matches that of any node + on which a pod of the set of pods is running + properties: + labelSelector: + description: A label selector is a label query over + a set of resources. The result of matchLabels + and matchExpressions are ANDed. An empty label + selector matches all objects. A null label selector + matches no objects. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: array + matchLabels: + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only "value". + The requirements are ANDed. + type: object + namespaces: + description: namespaces specifies which namespaces + the labelSelector applies to (matches against); + null or empty list means "this pod's namespace" + items: + type: string + type: array + topologyKey: + description: This pod should be co-located (affinity) + or not co-located (anti-affinity) with the pods + matching the labelSelector in the specified namespaces, + where co-located is defined as running on a node + whose value of the label with key topologyKey + matches that of any node on which any of the selected + pods is running. Empty topologyKey is not allowed. + type: string + required: + - topologyKey + type: array + podAntiAffinity: + description: Pod anti affinity is a group of inter pod anti + affinity scheduling rules. + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: The scheduler will prefer to schedule pods + to nodes that satisfy the anti-affinity expressions + specified by this field, but it may choose a node that + violates one or more of the expressions. The node that + is most preferred is the one with the greatest sum of + weights, i.e. for each node that meets all of the scheduling + requirements (resource request, requiredDuringScheduling + anti-affinity expressions, etc.), compute a sum by iterating + through the elements of this field and adding "weight" + to the sum if the node has pods which matches the corresponding + podAffinityTerm; the node(s) with the highest sum are + the most preferred. + items: + description: The weights of all of the matched WeightedPodAffinityTerm + fields are added per-node to find the most preferred + node(s) + properties: + podAffinityTerm: + description: Defines a set of pods (namely those + matching the labelSelector relative to the given + namespace(s)) that this pod should be co-located + (affinity) or not co-located (anti-affinity) with, + where co-located is defined as running on a node + whose value of the label with key + matches that of any node on which a pod of the + set of pods is running + properties: + labelSelector: + description: A label selector is a label query + over a set of resources. The result of matchLabels + and matchExpressions are ANDed. An empty label + selector matches all objects. A null label + selector matches no objects. + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The requirements + are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key + that the selector applies to. + type: string + operator: + description: operator represents a + key's relationship to a set of values. + Valid operators are In, NotIn, Exists + and DoesNotExist. + type: string + values: + description: values is an array of + string values. If the operator is + In or NotIn, the values array must + be non-empty. If the operator is + Exists or DoesNotExist, the values + array must be empty. This array + is replaced during a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: array + matchLabels: + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + namespaces: + description: namespaces specifies which namespaces + the labelSelector applies to (matches against); + null or empty list means "this pod's namespace" + items: + type: string + type: array + topologyKey: + description: This pod should be co-located (affinity) + or not co-located (anti-affinity) with the + pods matching the labelSelector in the specified + namespaces, where co-located is defined as + running on a node whose value of the label + with key topologyKey matches that of any node + on which any of the selected pods is running. + Empty topologyKey is not allowed. + type: string + required: + - topologyKey + weight: + description: weight associated with matching the + corresponding podAffinityTerm, in the range 1-100. + format: int32 + type: integer + required: + - weight + - podAffinityTerm + type: array + requiredDuringSchedulingIgnoredDuringExecution: + description: If the anti-affinity requirements specified + by this field are not met at scheduling time, the pod + will not be scheduled onto the node. If the anti-affinity + requirements specified by this field cease to be met + at some point during pod execution (e.g. due to a pod + label update), the system may or may not try to eventually + evict the pod from its node. When there are multiple + elements, the lists of nodes corresponding to each podAffinityTerm + are intersected, i.e. all terms must be satisfied. + items: + description: Defines a set of pods (namely those matching + the labelSelector relative to the given namespace(s)) + that this pod should be co-located (affinity) or not + co-located (anti-affinity) with, where co-located + is defined as running on a node whose value of the + label with key matches that of any node + on which a pod of the set of pods is running + properties: + labelSelector: + description: A label selector is a label query over + a set of resources. The result of matchLabels + and matchExpressions are ANDed. An empty label + selector matches all objects. A null label selector + matches no objects. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: array + matchLabels: + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only "value". + The requirements are ANDed. + type: object + namespaces: + description: namespaces specifies which namespaces + the labelSelector applies to (matches against); + null or empty list means "this pod's namespace" + items: + type: string + type: array + topologyKey: + description: This pod should be co-located (affinity) + or not co-located (anti-affinity) with the pods + matching the labelSelector in the specified namespaces, + where co-located is defined as running on a node + whose value of the label with key topologyKey + matches that of any node on which any of the selected + pods is running. Empty topologyKey is not allowed. + type: string + required: + - topologyKey + type: array + alerting: + description: AlertingSpec defines parameters for alerting configuration + of Prometheus servers. + properties: + alertmanagers: + description: AlertmanagerEndpoints Prometheus should fire + alerts against. + items: + description: AlertmanagerEndpoints defines a selection of + a single Endpoints object containing alertmanager IPs + to fire alerts against. + properties: + bearerTokenFile: + description: BearerTokenFile to read from filesystem + to use when authenticating to Alertmanager. + type: string + name: + description: Name of Endpoints object in Namespace. + type: string + namespace: + description: Namespace of Endpoints object. + type: string + pathPrefix: + description: Prefix for the HTTP path alerts are pushed + to. + type: string + port: + anyOf: + - type: string + - type: integer + scheme: + description: Scheme to use when firing alerts. + type: string + tlsConfig: + description: TLSConfig specifies TLS configuration parameters. + properties: + caFile: + description: The CA cert to use for the targets. + type: string + certFile: + description: The client cert file for the targets. + type: string + insecureSkipVerify: + description: Disable target certificate validation. + type: boolean + keyFile: + description: The client key file for the targets. + type: string + serverName: + description: Used to verify the hostname for the + targets. + type: string + required: + - namespace + - name + - port + type: array + required: + - alertmanagers + apiserverConfig: + description: 'APIServerConfig defines a host and auth methods + to access apiserver. More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#kubernetes_sd_config' + properties: + basicAuth: + description: 'BasicAuth allow an endpoint to authenticate + over basic authentication More info: https://prometheus.io/docs/operating/configuration/#endpoints' + properties: + password: + description: SecretKeySelector selects a key of a Secret. + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + optional: + description: Specify whether the Secret or it's key + must be defined + type: boolean + required: + - key + username: + description: SecretKeySelector selects a key of a Secret. + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + optional: + description: Specify whether the Secret or it's key + must be defined + type: boolean + required: + - key + bearerToken: + description: Bearer token for accessing apiserver. + type: string + bearerTokenFile: + description: File to read bearer token for accessing apiserver. + type: string + host: + description: Host of apiserver. A valid string consisting + of a hostname or IP followed by an optional port number + type: string + tlsConfig: + description: TLSConfig specifies TLS configuration parameters. + properties: + caFile: + description: The CA cert to use for the targets. + type: string + certFile: + description: The client cert file for the targets. + type: string + insecureSkipVerify: + description: Disable target certificate validation. + type: boolean + keyFile: + description: The client key file for the targets. + type: string + serverName: + description: Used to verify the hostname for the targets. + type: string + required: + - host + baseImage: + description: Base image to use for a Prometheus deployment. + type: string + configMaps: + description: ConfigMaps is a list of ConfigMaps in the same namespace + as the Prometheus object, which shall be mounted into the Prometheus + Pods. The ConfigMaps are mounted into /etc/prometheus/configmaps/. + items: + type: string + type: array + containers: + description: Containers allows injecting additional containers. + This is meant to allow adding an authentication proxy to a Prometheus + pod. + items: + description: A single application container that you want to + run within a pod. + properties: + args: + description: 'Arguments to the entrypoint. The docker image''s + CMD is used if this is not provided. Variable references + $(VAR_NAME) are expanded using the container''s environment. + If a variable cannot be resolved, the reference in the + input string will be unchanged. The $(VAR_NAME) syntax + can be escaped with a double $$, ie: $$(VAR_NAME). Escaped + references will never be expanded, regardless of whether + the variable exists or not. Cannot be updated. More info: + https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: + type: string + type: array + command: + description: 'Entrypoint array. Not executed within a shell. + The docker image''s ENTRYPOINT is used if this is not + provided. Variable references $(VAR_NAME) are expanded + using the container''s environment. If a variable cannot + be resolved, the reference in the input string will be + unchanged. The $(VAR_NAME) syntax can be escaped with + a double $$, ie: $$(VAR_NAME). Escaped references will + never be expanded, regardless of whether the variable + exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: + type: string + type: array + env: + description: List of environment variables to set in the + container. Cannot be updated. + items: + description: EnvVar represents an environment variable + present in a Container. + properties: + name: + description: Name of the environment variable. Must + be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are + expanded using the previous defined environment + variables in the container and any service environment + variables. If a variable cannot be resolved, the + reference in the input string will be unchanged. + The $(VAR_NAME) syntax can be escaped with a double + $$, ie: $$(VAR_NAME). Escaped references will never + be expanded, regardless of whether the variable + exists or not. Defaults to "".' + type: string + valueFrom: + description: EnvVarSource represents a source for + the value of an EnvVar. + properties: + configMapKeyRef: + description: Selects a key from a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + optional: + description: Specify whether the ConfigMap + or it's key must be defined + type: boolean + required: + - key + fieldRef: + description: ObjectFieldSelector selects an APIVersioned + field of an object. + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in + the specified API version. + type: string + required: + - fieldPath + resourceFieldRef: + description: ResourceFieldSelector represents + container resources (cpu, memory) and their + output format + properties: + containerName: + description: 'Container name: required for + volumes, optional for env vars' + type: string + resource: + description: 'Required: resource to select' + type: string + required: + - resource + secretKeyRef: + description: SecretKeySelector selects a key of + a Secret. + properties: + key: + description: The key of the secret to select + from. Must be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + optional: + description: Specify whether the Secret or + it's key must be defined + type: boolean + required: + - key + required: + - name + type: array + envFrom: + description: List of sources to populate environment variables + in the container. The keys defined within a source must + be a C_IDENTIFIER. All invalid keys will be reported as + an event when the container is starting. When a key exists + in multiple sources, the value associated with the last + source will take precedence. Values defined by an Env + with a duplicate key will take precedence. Cannot be updated. + items: + description: EnvFromSource represents the source of a + set of ConfigMaps + properties: + configMapRef: + description: |- + ConfigMapEnvSource selects a ConfigMap to populate the environment variables with. + + The contents of the target ConfigMap's Data field will represent the key-value pairs as environment variables. + properties: + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + optional: + description: Specify whether the ConfigMap must + be defined + type: boolean + prefix: + description: An optional identifier to prepend to + each key in the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: |- + SecretEnvSource selects a Secret to populate the environment variables with. + + The contents of the target Secret's Data field will represent the key-value pairs as environment variables. + properties: + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + optional: + description: Specify whether the Secret must be + defined + type: boolean + type: array + image: + description: 'Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images + This field is optional to allow higher level config management + to default or override container images in workload controllers + like Deployments and StatefulSets.' + type: string + imagePullPolicy: + description: 'Image pull policy. One of Always, Never, IfNotPresent. + Defaults to Always if :latest tag is specified, or IfNotPresent + otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images' + type: string + lifecycle: + description: Lifecycle describes actions that the management + system should take in response to container lifecycle + events. For the PostStart and PreStop lifecycle handlers, + management of the container blocks until the action is + complete, unless the container process fails, in which + case the handler is aborted. + properties: + postStart: + description: Handler defines a specific action that + should be taken + properties: + exec: + description: ExecAction describes a "run in container" + action. + properties: + command: + description: Command is the command line to + execute inside the container, the working + directory for the command is root ('/') in + the container's filesystem. The command is + simply exec'd, it is not run inside a shell, + so traditional shell instructions ('|', etc) + won't work. To use a shell, you need to explicitly + call out to that shell. Exit status of 0 is + treated as live/healthy and non-zero is unhealthy. + items: + type: string + type: array + httpGet: + description: HTTPGetAction describes an action based + on HTTP Get requests. + properties: + host: + description: Host name to connect to, defaults + to the pod IP. You probably want to set "Host" + in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. + HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom + header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: string + - type: integer + scheme: + description: Scheme to use for connecting to + the host. Defaults to HTTP. + type: string + required: + - port + tcpSocket: + description: TCPSocketAction describes an action + based on opening a socket + properties: + host: + description: 'Optional: Host name to connect + to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: string + - type: integer + required: + - port + preStop: + description: Handler defines a specific action that + should be taken + properties: + exec: + description: ExecAction describes a "run in container" + action. + properties: + command: + description: Command is the command line to + execute inside the container, the working + directory for the command is root ('/') in + the container's filesystem. The command is + simply exec'd, it is not run inside a shell, + so traditional shell instructions ('|', etc) + won't work. To use a shell, you need to explicitly + call out to that shell. Exit status of 0 is + treated as live/healthy and non-zero is unhealthy. + items: + type: string + type: array + httpGet: + description: HTTPGetAction describes an action based + on HTTP Get requests. + properties: + host: + description: Host name to connect to, defaults + to the pod IP. You probably want to set "Host" + in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. + HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom + header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: string + - type: integer + scheme: + description: Scheme to use for connecting to + the host. Defaults to HTTP. + type: string + required: + - port + tcpSocket: + description: TCPSocketAction describes an action + based on opening a socket + properties: + host: + description: 'Optional: Host name to connect + to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: string + - type: integer + required: + - port + livenessProbe: + description: Probe describes a health check to be performed + against a container to determine whether it is alive or + ready to receive traffic. + properties: + exec: + description: ExecAction describes a "run in container" + action. + properties: + command: + description: Command is the command line to execute + inside the container, the working directory for + the command is root ('/') in the container's + filesystem. The command is simply exec'd, it is + not run inside a shell, so traditional shell instructions + ('|', etc) won't work. To use a shell, you need + to explicitly call out to that shell. Exit status + of 0 is treated as live/healthy and non-zero is + unhealthy. + items: + type: string + type: array + failureThreshold: + description: Minimum consecutive failures for the probe + to be considered failed after having succeeded. Defaults + to 3. Minimum value is 1. + format: int32 + type: integer + httpGet: + description: HTTPGetAction describes an action based + on HTTP Get requests. + properties: + host: + description: Host name to connect to, defaults to + the pod IP. You probably want to set "Host" in + httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. + HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header + to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: string + - type: integer + scheme: + description: Scheme to use for connecting to the + host. Defaults to HTTP. + type: string + required: + - port + initialDelaySeconds: + description: 'Number of seconds after the container + has started before liveness probes are initiated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes for the probe + to be considered successful after having failed. Defaults + to 1. Must be 1 for liveness. Minimum value is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocketAction describes an action based + on opening a socket + properties: + host: + description: 'Optional: Host name to connect to, + defaults to the pod IP.' + type: string + port: + anyOf: + - type: string + - type: integer + required: + - port + timeoutSeconds: + description: 'Number of seconds after which the probe + times out. Defaults to 1 second. Minimum value is + 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + name: + description: Name of the container specified as a DNS_LABEL. + Each container in a pod must have a unique name (DNS_LABEL). + Cannot be updated. + type: string + ports: + description: List of ports to expose from the container. + Exposing a port here gives the system additional information + about the network connections a container uses, but is + primarily informational. Not specifying a port here DOES + NOT prevent that port from being exposed. Any port which + is listening on the default "0.0.0.0" address inside a + container will be accessible from the network. Cannot + be updated. + items: + description: ContainerPort represents a network port in + a single container. + properties: + containerPort: + description: Number of port to expose on the pod's + IP address. This must be a valid port number, 0 + < x < 65536. + format: int32 + type: integer + hostIP: + description: What host IP to bind the external port + to. + type: string + hostPort: + description: Number of port to expose on the host. + If specified, this must be a valid port number, + 0 < x < 65536. If HostNetwork is specified, this + must match ContainerPort. Most containers do not + need this. + format: int32 + type: integer + name: + description: If specified, this must be an IANA_SVC_NAME + and unique within the pod. Each named port in a + pod must have a unique name. Name for the port that + can be referred to by services. + type: string + protocol: + description: Protocol for port. Must be UDP, TCP, + or SCTP. Defaults to "TCP". + type: string + required: + - containerPort + type: array + readinessProbe: + description: Probe describes a health check to be performed + against a container to determine whether it is alive or + ready to receive traffic. + properties: + exec: + description: ExecAction describes a "run in container" + action. + properties: + command: + description: Command is the command line to execute + inside the container, the working directory for + the command is root ('/') in the container's + filesystem. The command is simply exec'd, it is + not run inside a shell, so traditional shell instructions + ('|', etc) won't work. To use a shell, you need + to explicitly call out to that shell. Exit status + of 0 is treated as live/healthy and non-zero is + unhealthy. + items: + type: string + type: array + failureThreshold: + description: Minimum consecutive failures for the probe + to be considered failed after having succeeded. Defaults + to 3. Minimum value is 1. + format: int32 + type: integer + httpGet: + description: HTTPGetAction describes an action based + on HTTP Get requests. + properties: + host: + description: Host name to connect to, defaults to + the pod IP. You probably want to set "Host" in + httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. + HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header + to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: string + - type: integer + scheme: + description: Scheme to use for connecting to the + host. Defaults to HTTP. + type: string + required: + - port + initialDelaySeconds: + description: 'Number of seconds after the container + has started before liveness probes are initiated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes for the probe + to be considered successful after having failed. Defaults + to 1. Must be 1 for liveness. Minimum value is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocketAction describes an action based + on opening a socket + properties: + host: + description: 'Optional: Host name to connect to, + defaults to the pod IP.' + type: string + port: + anyOf: + - type: string + - type: integer + required: + - port + timeoutSeconds: + description: 'Number of seconds after which the probe + times out. Defaults to 1 second. Minimum value is + 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + resources: + description: ResourceRequirements describes the compute + resource requirements. + properties: + limits: + description: 'Limits describes the maximum amount of + compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + type: object + requests: + description: 'Requests describes the minimum amount + of compute resources required. If Requests is omitted + for a container, it defaults to Limits if that is + explicitly specified, otherwise to an implementation-defined + value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + type: object + securityContext: + description: SecurityContext holds security configuration + that will be applied to a container. Some fields are present + in both SecurityContext and PodSecurityContext. When + both are set, the values in SecurityContext take precedence. + properties: + allowPrivilegeEscalation: + description: 'AllowPrivilegeEscalation controls whether + a process can gain more privileges than its parent + process. This bool directly controls if the no_new_privs + flag will be set on the container process. AllowPrivilegeEscalation + is true always when the container is: 1) run as Privileged + 2) has CAP_SYS_ADMIN' + type: boolean + capabilities: + description: Adds and removes POSIX capabilities from + running containers. + properties: + add: + description: Added capabilities + items: + type: string + type: array + drop: + description: Removed capabilities + items: + type: string + type: array + privileged: + description: Run container in privileged mode. Processes + in privileged containers are essentially equivalent + to root on the host. Defaults to false. + type: boolean + procMount: + description: procMount denotes the type of proc mount + to use for the containers. The default is DefaultProcMount + which uses the container runtime defaults for readonly + paths and masked paths. This requires the ProcMountType + feature flag to be enabled. + type: string + readOnlyRootFilesystem: + description: Whether this container has a read-only + root filesystem. Default is false. + type: boolean + runAsGroup: + description: The GID to run the entrypoint of the container + process. Uses runtime default if unset. May also be + set in PodSecurityContext. If set in both SecurityContext + and PodSecurityContext, the value specified in SecurityContext + takes precedence. + format: int64 + type: integer + runAsNonRoot: + description: Indicates that the container must run as + a non-root user. If true, the Kubelet will validate + the image at runtime to ensure that it does not run + as UID 0 (root) and fail to start the container if + it does. If unset or false, no such validation will + be performed. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. + type: boolean + runAsUser: + description: The UID to run the entrypoint of the container + process. Defaults to user specified in image metadata + if unspecified. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. + format: int64 + type: integer + seLinuxOptions: + description: SELinuxOptions are the labels to be applied + to the container + properties: + level: + description: Level is SELinux level label that applies + to the container. + type: string + role: + description: Role is a SELinux role label that applies + to the container. + type: string + type: + description: Type is a SELinux type label that applies + to the container. + type: string + user: + description: User is a SELinux user label that applies + to the container. + type: string + stdin: + description: Whether this container should allocate a buffer + for stdin in the container runtime. If this is not set, + reads from stdin in the container will always result in + EOF. Default is false. + type: boolean + stdinOnce: + description: Whether the container runtime should close + the stdin channel after it has been opened by a single + attach. When stdin is true the stdin stream will remain + open across multiple attach sessions. If stdinOnce is + set to true, stdin is opened on container start, is empty + until the first client attaches to stdin, and then remains + open and accepts data until the client disconnects, at + which time stdin is closed and remains closed until the + container is restarted. If this flag is false, a container + processes that reads from stdin will never receive an + EOF. Default is false + type: boolean + terminationMessagePath: + description: 'Optional: Path at which the file to which + the container''s termination message will be written is + mounted into the container''s filesystem. Message written + is intended to be brief final status, such as an assertion + failure message. Will be truncated by the node if greater + than 4096 bytes. The total message length across all containers + will be limited to 12kb. Defaults to /dev/termination-log. + Cannot be updated.' + type: string + terminationMessagePolicy: + description: Indicate how the termination message should + be populated. File will use the contents of terminationMessagePath + to populate the container status message on both success + and failure. FallbackToLogsOnError will use the last chunk + of container log output if the termination message file + is empty and the container exited with an error. The log + output is limited to 2048 bytes or 80 lines, whichever + is smaller. Defaults to File. Cannot be updated. + type: string + tty: + description: Whether this container should allocate a TTY + for itself, also requires 'stdin' to be true. Default + is false. + type: boolean + volumeDevices: + description: volumeDevices is the list of block devices + to be used by the container. This is an alpha feature + and may change in the future. + items: + description: volumeDevice describes a mapping of a raw + block device within a container. + properties: + devicePath: + description: devicePath is the path inside of the + container that the device will be mapped to. + type: string + name: + description: name must match the name of a persistentVolumeClaim + in the pod + type: string + required: + - name + - devicePath + type: array + volumeMounts: + description: Pod volumes to mount into the container's filesystem. + Cannot be updated. + items: + description: VolumeMount describes a mounting of a Volume + within a container. + properties: + mountPath: + description: Path within the container at which the + volume should be mounted. Must not contain ':'. + type: string + mountPropagation: + description: mountPropagation determines how mounts + are propagated from the host to container and the + other way around. When not set, MountPropagationNone + is used. This field is beta in 1.10. + type: string + name: + description: This must match the Name of a Volume. + type: string + readOnly: + description: Mounted read-only if true, read-write + otherwise (false or unspecified). Defaults to false. + type: boolean + subPath: + description: Path within the volume from which the + container's volume should be mounted. Defaults to + "" (volume's root). + type: string + required: + - name + - mountPath + type: array + workingDir: + description: Container's working directory. If not specified, + the container runtime's default will be used, which might + be configured in the container image. Cannot be updated. + type: string + required: + - name + type: array + evaluationInterval: + description: Interval between consecutive evaluations. + type: string + externalLabels: + description: The labels to add to any time series or alerts when + communicating with external systems (federation, remote storage, + Alertmanager). + type: object + externalUrl: + description: The external URL the Prometheus instances will be + available under. This is necessary to generate correct URLs. + This is necessary if Prometheus is not served from root of a + DNS name. + type: string + imagePullSecrets: + description: An optional list of references to secrets in the + same namespace to use for pulling prometheus and alertmanager + images from registries see http://kubernetes.io/docs/user-guide/images#specifying-imagepullsecrets-on-a-pod + items: + description: LocalObjectReference contains enough information + to let you locate the referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + type: array + listenLocal: + description: ListenLocal makes the Prometheus server listen on + loopback, so that it does not bind against the Pod IP. + type: boolean + logLevel: + description: Log level for Prometheus to be configured with. + type: string + nodeSelector: + description: Define which Nodes the Pods are scheduled on. + type: object + paused: + description: When a Prometheus deployment is paused, no actions + except for deletion will be performed on the underlying objects. + type: boolean + podMetadata: + description: ObjectMeta is metadata that all persisted resources + must have, which includes all objects users must create. + properties: + annotations: + description: 'Annotations is an unstructured key value map + stored with a resource that may be set by external tools + to store and retrieve arbitrary metadata. They are not queryable + and should be preserved when modifying objects. More info: + http://kubernetes.io/docs/user-guide/annotations' + type: object + clusterName: + description: The name of the cluster which the object belongs + to. This is used to distinguish resources with same name + and namespace in different clusters. This field is not set + anywhere right now and apiserver is going to ignore it if + set in create or update request. + type: string + creationTimestamp: + description: Time is a wrapper around time.Time which supports + correct marshaling to YAML and JSON. Wrappers are provided + for many of the factory methods that the time package offers. + format: date-time + type: string + deletionGracePeriodSeconds: + description: Number of seconds allowed for this object to + gracefully terminate before it will be removed from the + system. Only set when deletionTimestamp is also set. May + only be shortened. Read-only. + format: int64 + type: integer + deletionTimestamp: + description: Time is a wrapper around time.Time which supports + correct marshaling to YAML and JSON. Wrappers are provided + for many of the factory methods that the time package offers. + format: date-time + type: string + finalizers: + description: Must be empty before the object is deleted from + the registry. Each entry is an identifier for the responsible + component that will remove the entry from the list. If the + deletionTimestamp of the object is non-nil, entries in this + list can only be removed. + items: + type: string + type: array + generateName: + description: |- + GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server. + + If this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). + + Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency + type: string + generation: + description: A sequence number representing a specific generation + of the desired state. Populated by the system. Read-only. + format: int64 + type: integer + initializers: + description: Initializers tracks the progress of initialization. + properties: + pending: + description: Pending is a list of initializers that must + execute in order before this object is visible. When + the last pending initializer is removed, and no failing + result is set, the initializers struct will be set to + nil and the object is considered as initialized and + visible to all clients. + items: + description: Initializer is information about an initializer + that has not yet completed. + properties: + name: + description: name of the process that is responsible + for initializing this object. + type: string + required: + - name + type: array + result: + description: Status is a return value for calls that don't + return other objects. + properties: + apiVersion: + description: 'APIVersion defines the versioned schema + of this representation of an object. Servers should + convert recognized schemas to the latest internal + value, and may reject unrecognized values. More + info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources' + type: string + code: + description: Suggested HTTP return code for this status, + 0 if not set. + format: int32 + type: integer + details: + description: StatusDetails is a set of additional + properties that MAY be set by the server to provide + additional information about a response. The Reason + field of a Status object defines what attributes + will be set. Clients must ignore fields that do + not match the defined type of each attribute, and + should assume that any attribute may be empty, invalid, + or under defined. + properties: + causes: + description: The Causes array includes more details + associated with the StatusReason failure. Not + all StatusReasons may provide detailed causes. + items: + description: StatusCause provides more information + about an api.Status failure, including cases + when multiple errors are encountered. + properties: + field: + description: |- + The field of the resource that has caused this error, as named by its JSON serialization. May include dot and postfix notation for nested attributes. Arrays are zero-indexed. Fields may appear more than once in an array of causes due to fields having multiple errors. Optional. + + Examples: + "name" - the field "name" on the current resource + "items[0].name" - the field "name" on the first array entry in "items" + type: string + message: + description: A human-readable description + of the cause of the error. This field + may be presented as-is to a reader. + type: string + reason: + description: A machine-readable description + of the cause of the error. If this value + is empty there is no information available. + type: string + type: array + group: + description: The group attribute of the resource + associated with the status StatusReason. + type: string + kind: + description: 'The kind attribute of the resource + associated with the status StatusReason. On + some operations may differ from the requested + resource Kind. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds' + type: string + name: + description: The name attribute of the resource + associated with the status StatusReason (when + there is a single name which can be described). + type: string + retryAfterSeconds: + description: If specified, the time in seconds + before the operation should be retried. Some + errors may indicate the client must take an + alternate action - for those errors this field + may indicate how long to wait before taking + the alternate action. + format: int32 + type: integer + uid: + description: 'UID of the resource. (when there + is a single resource which can be described). + More info: http://kubernetes.io/docs/user-guide/identifiers#uids' + type: string + kind: + description: 'Kind is a string value representing + the REST resource this object represents. Servers + may infer this from the endpoint the client submits + requests to. Cannot be updated. In CamelCase. More + info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds' + type: string + message: + description: A human-readable description of the status + of this operation. + type: string + metadata: + description: ListMeta describes metadata that synthetic + resources must have, including lists and various + status objects. A resource may have only one of + {ObjectMeta, ListMeta}. + properties: + continue: + description: continue may be set if the user set + a limit on the number of items returned, and + indicates that the server has more data available. + The value is opaque and may be used to issue + another request to the endpoint that served + this list to retrieve the next set of available + objects. Continuing a consistent list may not + be possible if the server configuration has + changed or more than a few minutes have passed. + The resourceVersion field returned when using + this continue value will be identical to the + value in the first response, unless you have + received this token from an error message. + type: string + resourceVersion: + description: 'String that identifies the server''s + internal version of this object that can be + used by clients to determine when objects have + changed. Value must be treated as opaque by + clients and passed unmodified back to the server. + Populated by the system. Read-only. More info: + https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency' + type: string + selfLink: + description: selfLink is a URL representing this + object. Populated by the system. Read-only. + type: string + reason: + description: A machine-readable description of why + this operation is in the "Failure" status. If this + value is empty there is no information available. + A Reason clarifies an HTTP status code but does + not override it. + type: string + status: + description: 'Status of the operation. One of: "Success" + or "Failure". More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status' + type: string + required: + - pending + labels: + description: 'Map of string keys and values that can be used + to organize and categorize (scope and select) objects. May + match selectors of replication controllers and services. + More info: http://kubernetes.io/docs/user-guide/labels' + type: object + name: + description: 'Name must be unique within a namespace. Is required + when creating resources, although some resources may allow + a client to request the generation of an appropriate name + automatically. Name is primarily intended for creation idempotence + and configuration definition. Cannot be updated. More info: + http://kubernetes.io/docs/user-guide/identifiers#names' + type: string + namespace: + description: |- + Namespace defines the space within each name must be unique. An empty namespace is equivalent to the "default" namespace, but "default" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty. + + Must be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces + type: string + ownerReferences: + description: List of objects depended by this object. If ALL + objects in the list have been deleted, this object will + be garbage collected. If this object is managed by a controller, + then an entry in this list will point to this controller, + with the controller field set to true. There cannot be more + than one managing controller. + items: + description: OwnerReference contains enough information + to let you identify an owning object. Currently, an owning + object must be in the same namespace, so there is no namespace + field. + properties: + apiVersion: + description: API version of the referent. + type: string + blockOwnerDeletion: + description: If true, AND if the owner has the "foregroundDeletion" + finalizer, then the owner cannot be deleted from the + key-value store until this reference is removed. Defaults + to false. To set this field, a user needs "delete" + permission of the owner, otherwise 422 (Unprocessable + Entity) will be returned. + type: boolean + controller: + description: If true, this reference points to the managing + controller. + type: boolean + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names' + type: string + uid: + description: 'UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids' + type: string + required: + - apiVersion + - kind + - name + - uid + type: array + resourceVersion: + description: |- + An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources. + + Populated by the system. Read-only. Value must be treated as opaque by clients and . More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency + type: string + selfLink: + description: SelfLink is a URL representing this object. Populated + by the system. Read-only. + type: string + uid: + description: |- + UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations. + + Populated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids + type: string + priorityClassName: + description: Priority class assigned to the Pods + type: string + remoteRead: + description: If specified, the remote_read spec. This is an experimental + feature, it may change in any upcoming release in a breaking + way. + items: + description: RemoteReadSpec defines the remote_read configuration + for prometheus. + properties: + basicAuth: + description: 'BasicAuth allow an endpoint to authenticate + over basic authentication More info: https://prometheus.io/docs/operating/configuration/#endpoints' + properties: + password: + description: SecretKeySelector selects a key of a Secret. + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + optional: + description: Specify whether the Secret or it's + key must be defined + type: boolean + required: + - key + username: + description: SecretKeySelector selects a key of a Secret. + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + optional: + description: Specify whether the Secret or it's + key must be defined + type: boolean + required: + - key + bearerToken: + description: bearer token for remote read. + type: string + bearerTokenFile: + description: File to read bearer token for remote read. + type: string + proxyUrl: + description: Optional ProxyURL + type: string + readRecent: + description: Whether reads should be made for queries for + time ranges that the local storage should have complete + data for. + type: boolean + remoteTimeout: + description: Timeout for requests to the remote read endpoint. + type: string + requiredMatchers: + description: An optional list of equality matchers which + have to be present in a selector to query the remote read + endpoint. + type: object + tlsConfig: + description: TLSConfig specifies TLS configuration parameters. + properties: + caFile: + description: The CA cert to use for the targets. + type: string + certFile: + description: The client cert file for the targets. + type: string + insecureSkipVerify: + description: Disable target certificate validation. + type: boolean + keyFile: + description: The client key file for the targets. + type: string + serverName: + description: Used to verify the hostname for the targets. + type: string + url: + description: The URL of the endpoint to send samples to. + type: string + required: + - url + type: array + remoteWrite: + description: If specified, the remote_write spec. This is an experimental + feature, it may change in any upcoming release in a breaking + way. + items: + description: RemoteWriteSpec defines the remote_write configuration + for prometheus. + properties: + basicAuth: + description: 'BasicAuth allow an endpoint to authenticate + over basic authentication More info: https://prometheus.io/docs/operating/configuration/#endpoints' + properties: + password: + description: SecretKeySelector selects a key of a Secret. + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + optional: + description: Specify whether the Secret or it's + key must be defined + type: boolean + required: + - key + username: + description: SecretKeySelector selects a key of a Secret. + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + optional: + description: Specify whether the Secret or it's + key must be defined + type: boolean + required: + - key + bearerToken: + description: File to read bearer token for remote write. + type: string + bearerTokenFile: + description: File to read bearer token for remote write. + type: string + proxyUrl: + description: Optional ProxyURL + type: string + queueConfig: + description: QueueConfig allows the tuning of remote_write + queue_config parameters. This object is referenced in + the RemoteWriteSpec object. + properties: + batchSendDeadline: + description: BatchSendDeadline is the maximum time a + sample will wait in buffer. + type: string + capacity: + description: Capacity is the number of samples to buffer + per shard before we start dropping them. + format: int32 + type: integer + maxBackoff: + description: MaxBackoff is the maximum retry delay. + type: string + maxRetries: + description: MaxRetries is the maximum number of times + to retry a batch on recoverable errors. + format: int32 + type: integer + maxSamplesPerSend: + description: MaxSamplesPerSend is the maximum number + of samples per send. + format: int32 + type: integer + maxShards: + description: MaxShards is the maximum number of shards, + i.e. amount of concurrency. + format: int32 + type: integer + minBackoff: + description: MinBackoff is the initial retry delay. + Gets doubled for every retry. + type: string + remoteTimeout: + description: Timeout for requests to the remote write endpoint. + type: string + tlsConfig: + description: TLSConfig specifies TLS configuration parameters. + properties: + caFile: + description: The CA cert to use for the targets. + type: string + certFile: + description: The client cert file for the targets. + type: string + insecureSkipVerify: + description: Disable target certificate validation. + type: boolean + keyFile: + description: The client key file for the targets. + type: string + serverName: + description: Used to verify the hostname for the targets. + type: string + url: + description: The URL of the endpoint to send samples to. + type: string + writeRelabelConfigs: + description: The list of remote write relabel configurations. + items: + description: 'RelabelConfig allows dynamic rewriting of + the label set, being applied to samples before ingestion. + It defines ``-section of Prometheus + configuration. More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#metric_relabel_configs' + properties: + action: + description: Action to perform based on regex matching. + Default is 'replace' + type: string + modulus: + description: Modulus to take of the hash of the source + label values. + format: int64 + type: integer + regex: + description: Regular expression against which the + extracted value is matched. defailt is '(.*)' + type: string + replacement: + description: Replacement value against which a regex + replace is performed if the regular expression matches. + Regex capture groups are available. Default is '$1' + type: string + separator: + description: Separator placed between concatenated + source label values. default is ';'. + type: string + sourceLabels: + description: The source labels select values from + existing labels. Their content is concatenated using + the configured separator and matched against the + configured regular expression for the replace, keep, + and drop actions. + items: + type: string + type: array + targetLabel: + description: Label to which the resulting value is + written in a replace action. It is mandatory for + replace actions. Regex capture groups are available. + type: string + type: array + required: + - url + type: array + replicas: + description: Number of instances to deploy for a Prometheus deployment. + format: int32 + type: integer + resources: + description: ResourceRequirements describes the compute resource + requirements. + properties: + limits: + description: 'Limits describes the maximum amount of compute + resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + type: object + requests: + description: 'Requests describes the minimum amount of compute + resources required. If Requests is omitted for a container, + it defaults to Limits if that is explicitly specified, otherwise + to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + type: object + retention: + description: Time duration Prometheus shall retain data for. Default + is '24h', and must match the regular expression `[0-9]+(ms|s|m|h|d|w|y)` + (milliseconds seconds minutes hours days weeks years). + type: string + routePrefix: + description: The route prefix Prometheus registers HTTP handlers + for. This is useful, if using ExternalURL and a proxy is rewriting + HTTP routes of a request, and the actual ExternalURL is still + true, but the server serves requests under a different route + prefix. For example for use with `kubectl proxy`. + type: string + ruleNamespaceSelector: + description: A label selector is a label query over a set of resources. + The result of matchLabels and matchExpressions are ANDed. An + empty label selector matches all objects. A null label selector + matches no objects. + properties: + matchExpressions: + description: matchExpressions is a list of label selector + requirements. The requirements are ANDed. + items: + description: A label selector requirement is a selector + that contains values, a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key that the selector + applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are In, NotIn, + Exists and DoesNotExist. + type: string + values: + description: values is an array of string values. If + the operator is In or NotIn, the values array must + be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced + during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: array + matchLabels: + description: matchLabels is a map of {key,value} pairs. A + single {key,value} in the matchLabels map is equivalent + to an element of matchExpressions, whose key field is "key", + the operator is "In", and the values array contains only + "value". The requirements are ANDed. + type: object + ruleSelector: + description: A label selector is a label query over a set of resources. + The result of matchLabels and matchExpressions are ANDed. An + empty label selector matches all objects. A null label selector + matches no objects. + properties: + matchExpressions: + description: matchExpressions is a list of label selector + requirements. The requirements are ANDed. + items: + description: A label selector requirement is a selector + that contains values, a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key that the selector + applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are In, NotIn, + Exists and DoesNotExist. + type: string + values: + description: values is an array of string values. If + the operator is In or NotIn, the values array must + be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced + during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: array + matchLabels: + description: matchLabels is a map of {key,value} pairs. A + single {key,value} in the matchLabels map is equivalent + to an element of matchExpressions, whose key field is "key", + the operator is "In", and the values array contains only + "value". The requirements are ANDed. + type: object + scrapeInterval: + description: Interval between consecutive scrapes. + type: string + secrets: + description: Secrets is a list of Secrets in the same namespace + as the Prometheus object, which shall be mounted into the Prometheus + Pods. The Secrets are mounted into /etc/prometheus/secrets/. + items: + type: string + type: array + securityContext: + description: PodSecurityContext holds pod-level security attributes + and common container settings. Some fields are also present + in container.securityContext. Field values of container.securityContext + take precedence over field values of PodSecurityContext. + properties: + fsGroup: + description: |- + A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod: + + 1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw---- + + If unset, the Kubelet will not modify the ownership and permissions of any volume. + format: int64 + type: integer + runAsGroup: + description: The GID to run the entrypoint of the container + process. Uses runtime default if unset. May also be set + in SecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext + takes precedence for that container. + format: int64 + type: integer + runAsNonRoot: + description: Indicates that the container must run as a non-root + user. If true, the Kubelet will validate the image at runtime + to ensure that it does not run as UID 0 (root) and fail + to start the container if it does. If unset or false, no + such validation will be performed. May also be set in SecurityContext. If + set in both SecurityContext and PodSecurityContext, the + value specified in SecurityContext takes precedence. + type: boolean + runAsUser: + description: The UID to run the entrypoint of the container + process. Defaults to user specified in image metadata if + unspecified. May also be set in SecurityContext. If set + in both SecurityContext and PodSecurityContext, the value + specified in SecurityContext takes precedence for that container. + format: int64 + type: integer + seLinuxOptions: + description: SELinuxOptions are the labels to be applied to + the container + properties: + level: + description: Level is SELinux level label that applies + to the container. + type: string + role: + description: Role is a SELinux role label that applies + to the container. + type: string + type: + description: Type is a SELinux type label that applies + to the container. + type: string + user: + description: User is a SELinux user label that applies + to the container. + type: string + supplementalGroups: + description: A list of groups applied to the first process + run in each container, in addition to the container's primary + GID. If unspecified, no groups will be added to any container. + items: + format: int64 + type: integer + type: array + sysctls: + description: Sysctls hold a list of namespaced sysctls used + for the pod. Pods with unsupported sysctls (by the container + runtime) might fail to launch. + items: + description: Sysctl defines a kernel parameter to be set + properties: + name: + description: Name of a property to set + type: string + value: + description: Value of a property to set + type: string + required: + - name + - value + type: array + serviceAccountName: + description: ServiceAccountName is the name of the ServiceAccount + to use to run the Prometheus Pods. + type: string + serviceMonitorNamespaceSelector: + description: A label selector is a label query over a set of resources. + The result of matchLabels and matchExpressions are ANDed. An + empty label selector matches all objects. A null label selector + matches no objects. + properties: + matchExpressions: + description: matchExpressions is a list of label selector + requirements. The requirements are ANDed. + items: + description: A label selector requirement is a selector + that contains values, a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key that the selector + applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are In, NotIn, + Exists and DoesNotExist. + type: string + values: + description: values is an array of string values. If + the operator is In or NotIn, the values array must + be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced + during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: array + matchLabels: + description: matchLabels is a map of {key,value} pairs. A + single {key,value} in the matchLabels map is equivalent + to an element of matchExpressions, whose key field is "key", + the operator is "In", and the values array contains only + "value". The requirements are ANDed. + type: object + serviceMonitorSelector: + description: A label selector is a label query over a set of resources. + The result of matchLabels and matchExpressions are ANDed. An + empty label selector matches all objects. A null label selector + matches no objects. + properties: + matchExpressions: + description: matchExpressions is a list of label selector + requirements. The requirements are ANDed. + items: + description: A label selector requirement is a selector + that contains values, a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key that the selector + applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are In, NotIn, + Exists and DoesNotExist. + type: string + values: + description: values is an array of string values. If + the operator is In or NotIn, the values array must + be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced + during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: array + matchLabels: + description: matchLabels is a map of {key,value} pairs. A + single {key,value} in the matchLabels map is equivalent + to an element of matchExpressions, whose key field is "key", + the operator is "In", and the values array contains only + "value". The requirements are ANDed. + type: object + sha: + description: SHA of Prometheus container image to be deployed. + Defaults to the value of `version`. Similar to a tag, but the + SHA explicitly deploys an immutable container image. Version + and Tag are ignored if SHA is set. + type: string + storage: + description: StorageSpec defines the configured storage for a + group Prometheus servers. If neither `emptyDir` nor `volumeClaimTemplate` + is specified, then by default an [EmptyDir](https://kubernetes.io/docs/concepts/storage/volumes/#emptydir) + will be used. + properties: + emptyDir: + description: Represents an empty directory for a pod. Empty + directory volumes support ownership management and SELinux + relabeling. + properties: + medium: + description: 'What type of storage medium should back + this directory. The default is "" which means to use + the node''s default medium. Must be an empty string + (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + type: string + volumeClaimTemplate: + description: PersistentVolumeClaim is a user's request for + and claim to a persistent volume + properties: + apiVersion: + description: 'APIVersion defines the versioned schema + of this representation of an object. Servers should + convert recognized schemas to the latest internal value, + and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the + REST resource this object represents. Servers may infer + this from the endpoint the client submits requests to. + Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds' + type: string + metadata: + description: ObjectMeta is metadata that all persisted + resources must have, which includes all objects users + must create. + properties: + annotations: + description: 'Annotations is an unstructured key value + map stored with a resource that may be set by external + tools to store and retrieve arbitrary metadata. + They are not queryable and should be preserved when + modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations' + type: object + clusterName: + description: The name of the cluster which the object + belongs to. This is used to distinguish resources + with same name and namespace in different clusters. + This field is not set anywhere right now and apiserver + is going to ignore it if set in create or update + request. + type: string + creationTimestamp: + description: Time is a wrapper around time.Time which + supports correct marshaling to YAML and JSON. Wrappers + are provided for many of the factory methods that + the time package offers. + format: date-time + type: string + deletionGracePeriodSeconds: + description: Number of seconds allowed for this object + to gracefully terminate before it will be removed + from the system. Only set when deletionTimestamp + is also set. May only be shortened. Read-only. + format: int64 + type: integer + deletionTimestamp: + description: Time is a wrapper around time.Time which + supports correct marshaling to YAML and JSON. Wrappers + are provided for many of the factory methods that + the time package offers. + format: date-time + type: string + finalizers: + description: Must be empty before the object is deleted + from the registry. Each entry is an identifier for + the responsible component that will remove the entry + from the list. If the deletionTimestamp of the object + is non-nil, entries in this list can only be removed. + items: + type: string + type: array + generateName: + description: |- + GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server. + + If this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). + + Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency + type: string + generation: + description: A sequence number representing a specific + generation of the desired state. Populated by the + system. Read-only. + format: int64 + type: integer + initializers: + description: Initializers tracks the progress of initialization. + properties: + pending: + description: Pending is a list of initializers + that must execute in order before this object + is visible. When the last pending initializer + is removed, and no failing result is set, the + initializers struct will be set to nil and the + object is considered as initialized and visible + to all clients. + items: + description: Initializer is information about + an initializer that has not yet completed. + properties: + name: + description: name of the process that is + responsible for initializing this object. + type: string + required: + - name + type: array + result: + description: Status is a return value for calls + that don't return other objects. + properties: + apiVersion: + description: 'APIVersion defines the versioned + schema of this representation of an object. + Servers should convert recognized schemas + to the latest internal value, and may reject + unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources' + type: string + code: + description: Suggested HTTP return code for + this status, 0 if not set. + format: int32 + type: integer + details: + description: StatusDetails is a set of additional + properties that MAY be set by the server + to provide additional information about + a response. The Reason field of a Status + object defines what attributes will be set. + Clients must ignore fields that do not match + the defined type of each attribute, and + should assume that any attribute may be + empty, invalid, or under defined. + properties: + causes: + description: The Causes array includes + more details associated with the StatusReason + failure. Not all StatusReasons may provide + detailed causes. + items: + description: StatusCause provides more + information about an api.Status failure, + including cases when multiple errors + are encountered. + properties: + field: + description: |- + The field of the resource that has caused this error, as named by its JSON serialization. May include dot and postfix notation for nested attributes. Arrays are zero-indexed. Fields may appear more than once in an array of causes due to fields having multiple errors. Optional. + + Examples: + "name" - the field "name" on the current resource + "items[0].name" - the field "name" on the first array entry in "items" + type: string + message: + description: A human-readable description + of the cause of the error. This + field may be presented as-is to + a reader. + type: string + reason: + description: A machine-readable + description of the cause of the + error. If this value is empty + there is no information available. + type: string + type: array + group: + description: The group attribute of the + resource associated with the status + StatusReason. + type: string + kind: + description: 'The kind attribute of the + resource associated with the status + StatusReason. On some operations may + differ from the requested resource Kind. + More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds' + type: string + name: + description: The name attribute of the + resource associated with the status + StatusReason (when there is a single + name which can be described). + type: string + retryAfterSeconds: + description: If specified, the time in + seconds before the operation should + be retried. Some errors may indicate + the client must take an alternate action + - for those errors this field may indicate + how long to wait before taking the alternate + action. + format: int32 + type: integer + uid: + description: 'UID of the resource. (when + there is a single resource which can + be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids' + type: string + kind: + description: 'Kind is a string value representing + the REST resource this object represents. + Servers may infer this from the endpoint + the client submits requests to. Cannot be + updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds' + type: string + message: + description: A human-readable description + of the status of this operation. + type: string + metadata: + description: ListMeta describes metadata that + synthetic resources must have, including + lists and various status objects. A resource + may have only one of {ObjectMeta, ListMeta}. + properties: + continue: + description: continue may be set if the + user set a limit on the number of items + returned, and indicates that the server + has more data available. The value is + opaque and may be used to issue another + request to the endpoint that served + this list to retrieve the next set of + available objects. Continuing a consistent + list may not be possible if the server + configuration has changed or more than + a few minutes have passed. The resourceVersion + field returned when using this continue + value will be identical to the value + in the first response, unless you have + received this token from an error message. + type: string + resourceVersion: + description: 'String that identifies the + server''s internal version of this object + that can be used by clients to determine + when objects have changed. Value must + be treated as opaque by clients and + passed unmodified back to the server. + Populated by the system. Read-only. + More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency' + type: string + selfLink: + description: selfLink is a URL representing + this object. Populated by the system. + Read-only. + type: string + reason: + description: A machine-readable description + of why this operation is in the "Failure" + status. If this value is empty there is + no information available. A Reason clarifies + an HTTP status code but does not override + it. + type: string + status: + description: 'Status of the operation. One + of: "Success" or "Failure". More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status' + type: string + required: + - pending + labels: + description: 'Map of string keys and values that can + be used to organize and categorize (scope and select) + objects. May match selectors of replication controllers + and services. More info: http://kubernetes.io/docs/user-guide/labels' + type: object + name: + description: 'Name must be unique within a namespace. + Is required when creating resources, although some + resources may allow a client to request the generation + of an appropriate name automatically. Name is primarily + intended for creation idempotence and configuration + definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names' + type: string + namespace: + description: |- + Namespace defines the space within each name must be unique. An empty namespace is equivalent to the "default" namespace, but "default" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty. + + Must be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces + type: string + ownerReferences: + description: List of objects depended by this object. + If ALL objects in the list have been deleted, this + object will be garbage collected. If this object + is managed by a controller, then an entry in this + list will point to this controller, with the controller + field set to true. There cannot be more than one + managing controller. + items: + description: OwnerReference contains enough information + to let you identify an owning object. Currently, + an owning object must be in the same namespace, + so there is no namespace field. + properties: + apiVersion: + description: API version of the referent. + type: string + blockOwnerDeletion: + description: If true, AND if the owner has the + "foregroundDeletion" finalizer, then the owner + cannot be deleted from the key-value store + until this reference is removed. Defaults + to false. To set this field, a user needs + "delete" permission of the owner, otherwise + 422 (Unprocessable Entity) will be returned. + type: boolean + controller: + description: If true, this reference points + to the managing controller. + type: boolean + kind: + description: 'Kind of the referent. More info: + https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: + http://kubernetes.io/docs/user-guide/identifiers#names' + type: string + uid: + description: 'UID of the referent. More info: + http://kubernetes.io/docs/user-guide/identifiers#uids' + type: string + required: + - apiVersion + - kind + - name + - uid + type: array + resourceVersion: + description: |- + An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources. + + Populated by the system. Read-only. Value must be treated as opaque by clients and . More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency + type: string + selfLink: + description: SelfLink is a URL representing this object. + Populated by the system. Read-only. + type: string + uid: + description: |- + UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations. + + Populated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids + type: string + spec: + description: PersistentVolumeClaimSpec describes the common + attributes of storage devices and allows a Source for + provider-specific attributes + properties: + accessModes: + description: 'AccessModes contains the desired access + modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' + items: + type: string + type: array + dataSource: + description: TypedLocalObjectReference contains enough + information to let you locate the typed referenced + object inside the same namespace. + properties: + apiGroup: + description: APIGroup is the group for the resource + being referenced. If APIGroup is not specified, + the specified Kind must be in the core API group. + For any other third-party types, APIGroup is + required. + type: string + kind: + description: Kind is the type of resource being + referenced + type: string + name: + description: Name is the name of resource being + referenced + type: string + required: + - kind + - name + resources: + description: ResourceRequirements describes the compute + resource requirements. + properties: + limits: + description: 'Limits describes the maximum amount + of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + type: object + requests: + description: 'Requests describes the minimum amount + of compute resources required. If Requests is + omitted for a container, it defaults to Limits + if that is explicitly specified, otherwise to + an implementation-defined value. More info: + https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + type: object + selector: + description: A label selector is a label query over + a set of resources. The result of matchLabels and + matchExpressions are ANDed. An empty label selector + matches all objects. A null label selector matches + no objects. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement is + a selector that contains values, a key, and + an operator that relates the key and values. + properties: + key: + description: key is the label key that the + selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. If + the operator is Exists or DoesNotExist, + the values array must be empty. This array + is replaced during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: array + matchLabels: + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is "In", + and the values array contains only "value". + The requirements are ANDed. + type: object + storageClassName: + description: 'Name of the StorageClass required by + the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' + type: string + volumeMode: + description: volumeMode defines what type of volume + is required by the claim. Value of Filesystem is + implied when not included in claim spec. This is + an alpha feature and may change in the future. + type: string + volumeName: + description: VolumeName is the binding reference to + the PersistentVolume backing this claim. + type: string + status: + description: PersistentVolumeClaimStatus is the current + status of a persistent volume claim. + properties: + accessModes: + description: 'AccessModes contains the actual access + modes the volume backing the PVC has. More info: + https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' + items: + type: string + type: array + capacity: + description: Represents the actual resources of the + underlying volume. + type: object + conditions: + description: Current Condition of persistent volume + claim. If underlying persistent volume is being + resized then the Condition will be set to 'ResizeStarted'. + items: + description: PersistentVolumeClaimCondition contails + details about state of pvc + properties: + lastProbeTime: + description: Time is a wrapper around time.Time + which supports correct marshaling to YAML + and JSON. Wrappers are provided for many + of the factory methods that the time package + offers. + format: date-time + type: string + lastTransitionTime: + description: Time is a wrapper around time.Time + which supports correct marshaling to YAML + and JSON. Wrappers are provided for many + of the factory methods that the time package + offers. + format: date-time + type: string + message: + description: Human-readable message indicating + details about last transition. + type: string + reason: + description: Unique, this should be a short, + machine understandable string that gives the + reason for condition's last transition. If + it reports "ResizeStarted" that means the + underlying persistent volume is being resized. + type: string + status: + type: string + type: + type: string + required: + - type + - status + type: array + phase: + description: Phase represents the current phase of + PersistentVolumeClaim. + type: string + tag: + description: Tag of Prometheus container image to be deployed. + Defaults to the value of `version`. Version is ignored if Tag + is set. + type: string + thanos: + description: ThanosSpec defines parameters for a Prometheus server + within a Thanos deployment. + properties: + baseImage: + description: Thanos base image if other than default. + type: string + gcs: + description: ThanosGCSSpec defines parameters for use of Google + Cloud Storage (GCS) with Thanos. + properties: + bucket: + description: Google Cloud Storage bucket name for stored + blocks. If empty it won't store any block inside Google + Cloud Storage. + type: string + credentials: + description: SecretKeySelector selects a key of a Secret. + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + optional: + description: Specify whether the Secret or it's key + must be defined + type: boolean + required: + - key + peers: + description: Peers is a DNS name for Thanos to discover peers + through. + type: string + resources: + description: ResourceRequirements describes the compute resource + requirements. + properties: + limits: + description: 'Limits describes the maximum amount of compute + resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + type: object + requests: + description: 'Requests describes the minimum amount of + compute resources required. If Requests is omitted for + a container, it defaults to Limits if that is explicitly + specified, otherwise to an implementation-defined value. + More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + type: object + s3: + description: ThanosS3Spec defines parameters for of AWS Simple + Storage Service (S3) with Thanos. (S3 compatible services + apply as well) + properties: + accessKey: + description: SecretKeySelector selects a key of a Secret. + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + optional: + description: Specify whether the Secret or it's key + must be defined + type: boolean + required: + - key + bucket: + description: S3-Compatible API bucket name for stored + blocks. + type: string + encryptsse: + description: Whether to use Server Side Encryption + type: boolean + endpoint: + description: S3-Compatible API endpoint for stored blocks. + type: string + insecure: + description: Whether to use an insecure connection with + an S3-Compatible API. + type: boolean + secretKey: + description: SecretKeySelector selects a key of a Secret. + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + optional: + description: Specify whether the Secret or it's key + must be defined + type: boolean + required: + - key + signatureVersion2: + description: Whether to use S3 Signature Version 2; otherwise + Signature Version 4 will be used. + type: boolean + sha: + description: SHA of Thanos container image to be deployed. + Defaults to the value of `version`. Similar to a tag, but + the SHA explicitly deploys an immutable container image. + Version and Tag are ignored if SHA is set. + type: string + tag: + description: Tag of Thanos sidecar container image to be deployed. + Defaults to the value of `version`. Version is ignored if + Tag is set. + type: string + version: + description: Version describes the version of Thanos to use. + type: string + tolerations: + description: If specified, the pod's tolerations. + items: + description: The pod this Toleration is attached to tolerates + any taint that matches the triple using + the matching operator . + properties: + effect: + description: Effect indicates the taint effect to match. + Empty means match all taint effects. When specified, allowed + values are NoSchedule, PreferNoSchedule and NoExecute. + type: string + key: + description: Key is the taint key that the toleration applies + to. Empty means match all taint keys. If the key is empty, + operator must be Exists; this combination means to match + all values and all keys. + type: string + operator: + description: Operator represents a key's relationship to + the value. Valid operators are Exists and Equal. Defaults + to Equal. Exists is equivalent to wildcard for value, + so that a pod can tolerate all taints of a particular + category. + type: string + tolerationSeconds: + description: TolerationSeconds represents the period of + time the toleration (which must be of effect NoExecute, + otherwise this field is ignored) tolerates the taint. + By default, it is not set, which means tolerate the taint + forever (do not evict). Zero and negative values will + be treated as 0 (evict immediately) by the system. + format: int64 + type: integer + value: + description: Value is the taint value the toleration matches + to. If the operator is Exists, the value should be empty, + otherwise just a regular string. + type: string + type: array + version: + description: Version of Prometheus to be deployed. + type: string + status: + description: 'PrometheusStatus is the most recent observed status + of the Prometheus cluster. Read-only. Not included when requesting + from the apiserver, only from the Prometheus Operator API itself. + More info: https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#spec-and-status' + properties: + availableReplicas: + description: Total number of available pods (ready for at least + minReadySeconds) targeted by this Prometheus deployment. + format: int32 + type: integer + paused: + description: Represents whether any actions on the underlaying + managed objects are being performed. Only delete actions will + be performed. + type: boolean + replicas: + description: Total number of non-terminated pods targeted by this + Prometheus deployment (their labels match the selector). + format: int32 + type: integer + unavailableReplicas: + description: Total number of unavailable pods targeted by this + Prometheus deployment. + format: int32 + type: integer + updatedReplicas: + description: Total number of non-terminated pods targeted by this + Prometheus deployment that have the desired version spec. + format: int32 + type: integer + required: + - paused + - replicas + - updatedReplicas + - availableReplicas + - unavailableReplicas + version: v1 + - name: prometheus-k8s-prometheus-rules-crd + object: + apiVersion: apiextensions.k8s.io/v1beta1 + kind: CustomResourceDefinition + metadata: + name: prometheusrules.monitoring.coreos.com + spec: + group: monitoring.coreos.com + names: + kind: PrometheusRule + plural: prometheusrules + scope: Namespaced + validation: + openAPIV3Schema: + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource + this object represents. Servers may infer this from the endpoint + the client submits requests to. Cannot be updated. In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds' + type: string + metadata: + description: ObjectMeta is metadata that all persisted resources must + have, which includes all objects users must create. + properties: + annotations: + description: 'Annotations is an unstructured key value map stored + with a resource that may be set by external tools to store and + retrieve arbitrary metadata. They are not queryable and should + be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations' + type: object + clusterName: + description: The name of the cluster which the object belongs + to. This is used to distinguish resources with same name and + namespace in different clusters. This field is not set anywhere + right now and apiserver is going to ignore it if set in create + or update request. + type: string + creationTimestamp: + description: Time is a wrapper around time.Time which supports + correct marshaling to YAML and JSON. Wrappers are provided + for many of the factory methods that the time package offers. + format: date-time + type: string + deletionGracePeriodSeconds: + description: Number of seconds allowed for this object to gracefully + terminate before it will be removed from the system. Only set + when deletionTimestamp is also set. May only be shortened. Read-only. + format: int64 + type: integer + deletionTimestamp: + description: Time is a wrapper around time.Time which supports + correct marshaling to YAML and JSON. Wrappers are provided + for many of the factory methods that the time package offers. + format: date-time + type: string + finalizers: + description: Must be empty before the object is deleted from the + registry. Each entry is an identifier for the responsible component + that will remove the entry from the list. If the deletionTimestamp + of the object is non-nil, entries in this list can only be removed. + items: + type: string + type: array + generateName: + description: |- + GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server. + + If this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). + + Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency + type: string + generation: + description: A sequence number representing a specific generation + of the desired state. Populated by the system. Read-only. + format: int64 + type: integer + initializers: + description: Initializers tracks the progress of initialization. + properties: + pending: + description: Pending is a list of initializers that must execute + in order before this object is visible. When the last pending + initializer is removed, and no failing result is set, the + initializers struct will be set to nil and the object is + considered as initialized and visible to all clients. + items: + description: Initializer is information about an initializer + that has not yet completed. + properties: + name: + description: name of the process that is responsible + for initializing this object. + type: string + required: + - name + type: array + result: + description: Status is a return value for calls that don't + return other objects. + properties: + apiVersion: + description: 'APIVersion defines the versioned schema + of this representation of an object. Servers should + convert recognized schemas to the latest internal value, + and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources' + type: string + code: + description: Suggested HTTP return code for this status, + 0 if not set. + format: int32 + type: integer + details: + description: StatusDetails is a set of additional properties + that MAY be set by the server to provide additional + information about a response. The Reason field of a + Status object defines what attributes will be set. Clients + must ignore fields that do not match the defined type + of each attribute, and should assume that any attribute + may be empty, invalid, or under defined. + properties: + causes: + description: The Causes array includes more details + associated with the StatusReason failure. Not all + StatusReasons may provide detailed causes. + items: + description: StatusCause provides more information + about an api.Status failure, including cases when + multiple errors are encountered. + properties: + field: + description: |- + The field of the resource that has caused this error, as named by its JSON serialization. May include dot and postfix notation for nested attributes. Arrays are zero-indexed. Fields may appear more than once in an array of causes due to fields having multiple errors. Optional. + + Examples: + "name" - the field "name" on the current resource + "items[0].name" - the field "name" on the first array entry in "items" + type: string + message: + description: A human-readable description of + the cause of the error. This field may be + presented as-is to a reader. + type: string + reason: + description: A machine-readable description + of the cause of the error. If this value is + empty there is no information available. + type: string + type: array + group: + description: The group attribute of the resource associated + with the status StatusReason. + type: string + kind: + description: 'The kind attribute of the resource associated + with the status StatusReason. On some operations + may differ from the requested resource Kind. More + info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds' + type: string + name: + description: The name attribute of the resource associated + with the status StatusReason (when there is a single + name which can be described). + type: string + retryAfterSeconds: + description: If specified, the time in seconds before + the operation should be retried. Some errors may + indicate the client must take an alternate action + - for those errors this field may indicate how long + to wait before taking the alternate action. + format: int32 + type: integer + uid: + description: 'UID of the resource. (when there is + a single resource which can be described). More + info: http://kubernetes.io/docs/user-guide/identifiers#uids' + type: string + kind: + description: 'Kind is a string value representing the + REST resource this object represents. Servers may infer + this from the endpoint the client submits requests to. + Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds' + type: string + message: + description: A human-readable description of the status + of this operation. + type: string + metadata: + description: ListMeta describes metadata that synthetic + resources must have, including lists and various status + objects. A resource may have only one of {ObjectMeta, + ListMeta}. + properties: + continue: + description: continue may be set if the user set a + limit on the number of items returned, and indicates + that the server has more data available. The value + is opaque and may be used to issue another request + to the endpoint that served this list to retrieve + the next set of available objects. Continuing a + consistent list may not be possible if the server + configuration has changed or more than a few minutes + have passed. The resourceVersion field returned + when using this continue value will be identical + to the value in the first response, unless you have + received this token from an error message. + type: string + resourceVersion: + description: 'String that identifies the server''s + internal version of this object that can be used + by clients to determine when objects have changed. + Value must be treated as opaque by clients and passed + unmodified back to the server. Populated by the + system. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency' + type: string + selfLink: + description: selfLink is a URL representing this object. + Populated by the system. Read-only. + type: string + reason: + description: A machine-readable description of why this + operation is in the "Failure" status. If this value + is empty there is no information available. A Reason + clarifies an HTTP status code but does not override + it. + type: string + status: + description: 'Status of the operation. One of: "Success" + or "Failure". More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status' + type: string + required: + - pending + labels: + description: 'Map of string keys and values that can be used to + organize and categorize (scope and select) objects. May match + selectors of replication controllers and services. More info: + http://kubernetes.io/docs/user-guide/labels' + type: object + name: + description: 'Name must be unique within a namespace. Is required + when creating resources, although some resources may allow a + client to request the generation of an appropriate name automatically. + Name is primarily intended for creation idempotence and configuration + definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names' + type: string + namespace: + description: |- + Namespace defines the space within each name must be unique. An empty namespace is equivalent to the "default" namespace, but "default" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty. + + Must be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces + type: string + ownerReferences: + description: List of objects depended by this object. If ALL objects + in the list have been deleted, this object will be garbage collected. + If this object is managed by a controller, then an entry in + this list will point to this controller, with the controller + field set to true. There cannot be more than one managing controller. + items: + description: OwnerReference contains enough information to let + you identify an owning object. Currently, an owning object + must be in the same namespace, so there is no namespace field. + properties: + apiVersion: + description: API version of the referent. + type: string + blockOwnerDeletion: + description: If true, AND if the owner has the "foregroundDeletion" + finalizer, then the owner cannot be deleted from the key-value + store until this reference is removed. Defaults to false. + To set this field, a user needs "delete" permission of + the owner, otherwise 422 (Unprocessable Entity) will be + returned. + type: boolean + controller: + description: If true, this reference points to the managing + controller. + type: boolean + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names' + type: string + uid: + description: 'UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids' + type: string + required: + - apiVersion + - kind + - name + - uid + type: array + resourceVersion: + description: |- + An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources. + + Populated by the system. Read-only. Value must be treated as opaque by clients and . More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency + type: string + selfLink: + description: SelfLink is a URL representing this object. Populated + by the system. Read-only. + type: string + uid: + description: |- + UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations. + + Populated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids + type: string + spec: + description: PrometheusRuleSpec contains specification parameters + for a Rule. + properties: + groups: + description: Content of Prometheus rule file + items: + description: RuleGroup is a list of sequentially evaluated recording + and alerting rules. + properties: + interval: + type: string + name: + type: string + rules: + items: + description: Rule describes an alerting or recording rule. + properties: + alert: + type: string + annotations: + type: object + expr: + anyOf: + - type: string + - type: integer + for: + type: string + labels: + type: object + record: + type: string + required: + - expr + type: array + required: + - name + - rules + type: array + version: v1 + - name: alertmanager-crd + object: + apiVersion: apiextensions.k8s.io/v1beta1 + kind: CustomResourceDefinition + metadata: + name: alertmanagers.monitoring.coreos.com + spec: + group: monitoring.coreos.com + names: + kind: Alertmanager + plural: alertmanagers + scope: Namespaced + validation: + openAPIV3Schema: + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource + this object represents. Servers may infer this from the endpoint + the client submits requests to. Cannot be updated. In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds' + type: string + spec: + description: 'AlertmanagerSpec is a specification of the desired behavior + of the Alertmanager cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#spec-and-status' + properties: + additionalPeers: + description: AdditionalPeers allows injecting a set of additional + Alertmanagers to peer with to form a highly available cluster. + items: + type: string + type: array + affinity: + description: Affinity is a group of affinity scheduling rules. + properties: + nodeAffinity: + description: Node affinity is a group of node affinity scheduling + rules. + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: The scheduler will prefer to schedule pods + to nodes that satisfy the affinity expressions specified + by this field, but it may choose a node that violates + one or more of the expressions. The node that is most + preferred is the one with the greatest sum of weights, + i.e. for each node that meets all of the scheduling + requirements (resource request, requiredDuringScheduling + affinity expressions, etc.), compute a sum by iterating + through the elements of this field and adding "weight" + to the sum if the node matches the corresponding matchExpressions; + the node(s) with the highest sum are the most preferred. + items: + description: An empty preferred scheduling term matches + all objects with implicit weight 0 (i.e. it's a no-op). + A null preferred scheduling term matches no objects + (i.e. is also a no-op). + properties: + preference: + description: A null or empty node selector term + matches no objects. The requirements of them are + ANDed. The TopologySelectorTerm type implements + a subset of the NodeSelectorTerm. + properties: + matchExpressions: + description: A list of node selector requirements + by node's labels. + items: + description: A node selector requirement is + a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: The label key that the selector + applies to. + type: string + operator: + description: Represents a key's relationship + to a set of values. Valid operators + are In, NotIn, Exists, DoesNotExist. + Gt, and Lt. + type: string + values: + description: An array of string values. + If the operator is In or NotIn, the + values array must be non-empty. If the + operator is Exists or DoesNotExist, + the values array must be empty. If the + operator is Gt or Lt, the values array + must have a single element, which will + be interpreted as an integer. This array + is replaced during a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: array + matchFields: + description: A list of node selector requirements + by node's fields. + items: + description: A node selector requirement is + a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: The label key that the selector + applies to. + type: string + operator: + description: Represents a key's relationship + to a set of values. Valid operators + are In, NotIn, Exists, DoesNotExist. + Gt, and Lt. + type: string + values: + description: An array of string values. + If the operator is In or NotIn, the + values array must be non-empty. If the + operator is Exists or DoesNotExist, + the values array must be empty. If the + operator is Gt or Lt, the values array + must have a single element, which will + be interpreted as an integer. This array + is replaced during a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: array + weight: + description: Weight associated with matching the + corresponding nodeSelectorTerm, in the range 1-100. + format: int32 + type: integer + required: + - weight + - preference + type: array + requiredDuringSchedulingIgnoredDuringExecution: + description: A node selector represents the union of the + results of one or more label queries over a set of nodes; + that is, it represents the OR of the selectors represented + by the node selector terms. + properties: + nodeSelectorTerms: + description: Required. A list of node selector terms. + The terms are ORed. + items: + description: A null or empty node selector term + matches no objects. The requirements of them are + ANDed. The TopologySelectorTerm type implements + a subset of the NodeSelectorTerm. + properties: + matchExpressions: + description: A list of node selector requirements + by node's labels. + items: + description: A node selector requirement is + a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: The label key that the selector + applies to. + type: string + operator: + description: Represents a key's relationship + to a set of values. Valid operators + are In, NotIn, Exists, DoesNotExist. + Gt, and Lt. + type: string + values: + description: An array of string values. + If the operator is In or NotIn, the + values array must be non-empty. If the + operator is Exists or DoesNotExist, + the values array must be empty. If the + operator is Gt or Lt, the values array + must have a single element, which will + be interpreted as an integer. This array + is replaced during a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: array + matchFields: + description: A list of node selector requirements + by node's fields. + items: + description: A node selector requirement is + a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: The label key that the selector + applies to. + type: string + operator: + description: Represents a key's relationship + to a set of values. Valid operators + are In, NotIn, Exists, DoesNotExist. + Gt, and Lt. + type: string + values: + description: An array of string values. + If the operator is In or NotIn, the + values array must be non-empty. If the + operator is Exists or DoesNotExist, + the values array must be empty. If the + operator is Gt or Lt, the values array + must have a single element, which will + be interpreted as an integer. This array + is replaced during a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: array + type: array + required: + - nodeSelectorTerms + podAffinity: + description: Pod affinity is a group of inter pod affinity + scheduling rules. + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: The scheduler will prefer to schedule pods + to nodes that satisfy the affinity expressions specified + by this field, but it may choose a node that violates + one or more of the expressions. The node that is most + preferred is the one with the greatest sum of weights, + i.e. for each node that meets all of the scheduling + requirements (resource request, requiredDuringScheduling + affinity expressions, etc.), compute a sum by iterating + through the elements of this field and adding "weight" + to the sum if the node has pods which matches the corresponding + podAffinityTerm; the node(s) with the highest sum are + the most preferred. + items: + description: The weights of all of the matched WeightedPodAffinityTerm + fields are added per-node to find the most preferred + node(s) + properties: + podAffinityTerm: + description: Defines a set of pods (namely those + matching the labelSelector relative to the given + namespace(s)) that this pod should be co-located + (affinity) or not co-located (anti-affinity) with, + where co-located is defined as running on a node + whose value of the label with key + matches that of any node on which a pod of the + set of pods is running + properties: + labelSelector: + description: A label selector is a label query + over a set of resources. The result of matchLabels + and matchExpressions are ANDed. An empty label + selector matches all objects. A null label + selector matches no objects. + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The requirements + are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key + that the selector applies to. + type: string + operator: + description: operator represents a + key's relationship to a set of values. + Valid operators are In, NotIn, Exists + and DoesNotExist. + type: string + values: + description: values is an array of + string values. If the operator is + In or NotIn, the values array must + be non-empty. If the operator is + Exists or DoesNotExist, the values + array must be empty. This array + is replaced during a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: array + matchLabels: + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + namespaces: + description: namespaces specifies which namespaces + the labelSelector applies to (matches against); + null or empty list means "this pod's namespace" + items: + type: string + type: array + topologyKey: + description: This pod should be co-located (affinity) + or not co-located (anti-affinity) with the + pods matching the labelSelector in the specified + namespaces, where co-located is defined as + running on a node whose value of the label + with key topologyKey matches that of any node + on which any of the selected pods is running. + Empty topologyKey is not allowed. + type: string + required: + - topologyKey + weight: + description: weight associated with matching the + corresponding podAffinityTerm, in the range 1-100. + format: int32 + type: integer + required: + - weight + - podAffinityTerm + type: array + requiredDuringSchedulingIgnoredDuringExecution: + description: If the affinity requirements specified by + this field are not met at scheduling time, the pod will + not be scheduled onto the node. If the affinity requirements + specified by this field cease to be met at some point + during pod execution (e.g. due to a pod label update), + the system may or may not try to eventually evict the + pod from its node. When there are multiple elements, + the lists of nodes corresponding to each podAffinityTerm + are intersected, i.e. all terms must be satisfied. + items: + description: Defines a set of pods (namely those matching + the labelSelector relative to the given namespace(s)) + that this pod should be co-located (affinity) or not + co-located (anti-affinity) with, where co-located + is defined as running on a node whose value of the + label with key matches that of any node + on which a pod of the set of pods is running + properties: + labelSelector: + description: A label selector is a label query over + a set of resources. The result of matchLabels + and matchExpressions are ANDed. An empty label + selector matches all objects. A null label selector + matches no objects. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: array + matchLabels: + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only "value". + The requirements are ANDed. + type: object + namespaces: + description: namespaces specifies which namespaces + the labelSelector applies to (matches against); + null or empty list means "this pod's namespace" + items: + type: string + type: array + topologyKey: + description: This pod should be co-located (affinity) + or not co-located (anti-affinity) with the pods + matching the labelSelector in the specified namespaces, + where co-located is defined as running on a node + whose value of the label with key topologyKey + matches that of any node on which any of the selected + pods is running. Empty topologyKey is not allowed. + type: string + required: + - topologyKey + type: array + podAntiAffinity: + description: Pod anti affinity is a group of inter pod anti + affinity scheduling rules. + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: The scheduler will prefer to schedule pods + to nodes that satisfy the anti-affinity expressions + specified by this field, but it may choose a node that + violates one or more of the expressions. The node that + is most preferred is the one with the greatest sum of + weights, i.e. for each node that meets all of the scheduling + requirements (resource request, requiredDuringScheduling + anti-affinity expressions, etc.), compute a sum by iterating + through the elements of this field and adding "weight" + to the sum if the node has pods which matches the corresponding + podAffinityTerm; the node(s) with the highest sum are + the most preferred. + items: + description: The weights of all of the matched WeightedPodAffinityTerm + fields are added per-node to find the most preferred + node(s) + properties: + podAffinityTerm: + description: Defines a set of pods (namely those + matching the labelSelector relative to the given + namespace(s)) that this pod should be co-located + (affinity) or not co-located (anti-affinity) with, + where co-located is defined as running on a node + whose value of the label with key + matches that of any node on which a pod of the + set of pods is running + properties: + labelSelector: + description: A label selector is a label query + over a set of resources. The result of matchLabels + and matchExpressions are ANDed. An empty label + selector matches all objects. A null label + selector matches no objects. + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The requirements + are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key + that the selector applies to. + type: string + operator: + description: operator represents a + key's relationship to a set of values. + Valid operators are In, NotIn, Exists + and DoesNotExist. + type: string + values: + description: values is an array of + string values. If the operator is + In or NotIn, the values array must + be non-empty. If the operator is + Exists or DoesNotExist, the values + array must be empty. This array + is replaced during a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: array + matchLabels: + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + namespaces: + description: namespaces specifies which namespaces + the labelSelector applies to (matches against); + null or empty list means "this pod's namespace" + items: + type: string + type: array + topologyKey: + description: This pod should be co-located (affinity) + or not co-located (anti-affinity) with the + pods matching the labelSelector in the specified + namespaces, where co-located is defined as + running on a node whose value of the label + with key topologyKey matches that of any node + on which any of the selected pods is running. + Empty topologyKey is not allowed. + type: string + required: + - topologyKey + weight: + description: weight associated with matching the + corresponding podAffinityTerm, in the range 1-100. + format: int32 + type: integer + required: + - weight + - podAffinityTerm + type: array + requiredDuringSchedulingIgnoredDuringExecution: + description: If the anti-affinity requirements specified + by this field are not met at scheduling time, the pod + will not be scheduled onto the node. If the anti-affinity + requirements specified by this field cease to be met + at some point during pod execution (e.g. due to a pod + label update), the system may or may not try to eventually + evict the pod from its node. When there are multiple + elements, the lists of nodes corresponding to each podAffinityTerm + are intersected, i.e. all terms must be satisfied. + items: + description: Defines a set of pods (namely those matching + the labelSelector relative to the given namespace(s)) + that this pod should be co-located (affinity) or not + co-located (anti-affinity) with, where co-located + is defined as running on a node whose value of the + label with key matches that of any node + on which a pod of the set of pods is running + properties: + labelSelector: + description: A label selector is a label query over + a set of resources. The result of matchLabels + and matchExpressions are ANDed. An empty label + selector matches all objects. A null label selector + matches no objects. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: array + matchLabels: + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only "value". + The requirements are ANDed. + type: object + namespaces: + description: namespaces specifies which namespaces + the labelSelector applies to (matches against); + null or empty list means "this pod's namespace" + items: + type: string + type: array + topologyKey: + description: This pod should be co-located (affinity) + or not co-located (anti-affinity) with the pods + matching the labelSelector in the specified namespaces, + where co-located is defined as running on a node + whose value of the label with key topologyKey + matches that of any node on which any of the selected + pods is running. Empty topologyKey is not allowed. + type: string + required: + - topologyKey + type: array + baseImage: + description: Base image that is used to deploy pods, without tag. + type: string + configMaps: + description: ConfigMaps is a list of ConfigMaps in the same namespace + as the Alertmanager object, which shall be mounted into the + Alertmanager Pods. The ConfigMaps are mounted into /etc/alertmanager/configmaps/. + items: + type: string + type: array + containers: + description: Containers allows injecting additional containers. + This is meant to allow adding an authentication proxy to an + Alertmanager pod. + items: + description: A single application container that you want to + run within a pod. + properties: + args: + description: 'Arguments to the entrypoint. The docker image''s + CMD is used if this is not provided. Variable references + $(VAR_NAME) are expanded using the container''s environment. + If a variable cannot be resolved, the reference in the + input string will be unchanged. The $(VAR_NAME) syntax + can be escaped with a double $$, ie: $$(VAR_NAME). Escaped + references will never be expanded, regardless of whether + the variable exists or not. Cannot be updated. More info: + https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: + type: string + type: array + command: + description: 'Entrypoint array. Not executed within a shell. + The docker image''s ENTRYPOINT is used if this is not + provided. Variable references $(VAR_NAME) are expanded + using the container''s environment. If a variable cannot + be resolved, the reference in the input string will be + unchanged. The $(VAR_NAME) syntax can be escaped with + a double $$, ie: $$(VAR_NAME). Escaped references will + never be expanded, regardless of whether the variable + exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: + type: string + type: array + env: + description: List of environment variables to set in the + container. Cannot be updated. + items: + description: EnvVar represents an environment variable + present in a Container. + properties: + name: + description: Name of the environment variable. Must + be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are + expanded using the previous defined environment + variables in the container and any service environment + variables. If a variable cannot be resolved, the + reference in the input string will be unchanged. + The $(VAR_NAME) syntax can be escaped with a double + $$, ie: $$(VAR_NAME). Escaped references will never + be expanded, regardless of whether the variable + exists or not. Defaults to "".' + type: string + valueFrom: + description: EnvVarSource represents a source for + the value of an EnvVar. + properties: + configMapKeyRef: + description: Selects a key from a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + optional: + description: Specify whether the ConfigMap + or it's key must be defined + type: boolean + required: + - key + fieldRef: + description: ObjectFieldSelector selects an APIVersioned + field of an object. + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in + the specified API version. + type: string + required: + - fieldPath + resourceFieldRef: + description: ResourceFieldSelector represents + container resources (cpu, memory) and their + output format + properties: + containerName: + description: 'Container name: required for + volumes, optional for env vars' + type: string + resource: + description: 'Required: resource to select' + type: string + required: + - resource + secretKeyRef: + description: SecretKeySelector selects a key of + a Secret. + properties: + key: + description: The key of the secret to select + from. Must be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + optional: + description: Specify whether the Secret or + it's key must be defined + type: boolean + required: + - key + required: + - name + type: array + envFrom: + description: List of sources to populate environment variables + in the container. The keys defined within a source must + be a C_IDENTIFIER. All invalid keys will be reported as + an event when the container is starting. When a key exists + in multiple sources, the value associated with the last + source will take precedence. Values defined by an Env + with a duplicate key will take precedence. Cannot be updated. + items: + description: EnvFromSource represents the source of a + set of ConfigMaps + properties: + configMapRef: + description: |- + ConfigMapEnvSource selects a ConfigMap to populate the environment variables with. + + The contents of the target ConfigMap's Data field will represent the key-value pairs as environment variables. + properties: + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + optional: + description: Specify whether the ConfigMap must + be defined + type: boolean + prefix: + description: An optional identifier to prepend to + each key in the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: |- + SecretEnvSource selects a Secret to populate the environment variables with. + + The contents of the target Secret's Data field will represent the key-value pairs as environment variables. + properties: + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + optional: + description: Specify whether the Secret must be + defined + type: boolean + type: array + image: + description: 'Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images + This field is optional to allow higher level config management + to default or override container images in workload controllers + like Deployments and StatefulSets.' + type: string + imagePullPolicy: + description: 'Image pull policy. One of Always, Never, IfNotPresent. + Defaults to Always if :latest tag is specified, or IfNotPresent + otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images' + type: string + lifecycle: + description: Lifecycle describes actions that the management + system should take in response to container lifecycle + events. For the PostStart and PreStop lifecycle handlers, + management of the container blocks until the action is + complete, unless the container process fails, in which + case the handler is aborted. + properties: + postStart: + description: Handler defines a specific action that + should be taken + properties: + exec: + description: ExecAction describes a "run in container" + action. + properties: + command: + description: Command is the command line to + execute inside the container, the working + directory for the command is root ('/') in + the container's filesystem. The command is + simply exec'd, it is not run inside a shell, + so traditional shell instructions ('|', etc) + won't work. To use a shell, you need to explicitly + call out to that shell. Exit status of 0 is + treated as live/healthy and non-zero is unhealthy. + items: + type: string + type: array + httpGet: + description: HTTPGetAction describes an action based + on HTTP Get requests. + properties: + host: + description: Host name to connect to, defaults + to the pod IP. You probably want to set "Host" + in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. + HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom + header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: string + - type: integer + scheme: + description: Scheme to use for connecting to + the host. Defaults to HTTP. + type: string + required: + - port + tcpSocket: + description: TCPSocketAction describes an action + based on opening a socket + properties: + host: + description: 'Optional: Host name to connect + to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: string + - type: integer + required: + - port + preStop: + description: Handler defines a specific action that + should be taken + properties: + exec: + description: ExecAction describes a "run in container" + action. + properties: + command: + description: Command is the command line to + execute inside the container, the working + directory for the command is root ('/') in + the container's filesystem. The command is + simply exec'd, it is not run inside a shell, + so traditional shell instructions ('|', etc) + won't work. To use a shell, you need to explicitly + call out to that shell. Exit status of 0 is + treated as live/healthy and non-zero is unhealthy. + items: + type: string + type: array + httpGet: + description: HTTPGetAction describes an action based + on HTTP Get requests. + properties: + host: + description: Host name to connect to, defaults + to the pod IP. You probably want to set "Host" + in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. + HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom + header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: string + - type: integer + scheme: + description: Scheme to use for connecting to + the host. Defaults to HTTP. + type: string + required: + - port + tcpSocket: + description: TCPSocketAction describes an action + based on opening a socket + properties: + host: + description: 'Optional: Host name to connect + to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: string + - type: integer + required: + - port + livenessProbe: + description: Probe describes a health check to be performed + against a container to determine whether it is alive or + ready to receive traffic. + properties: + exec: + description: ExecAction describes a "run in container" + action. + properties: + command: + description: Command is the command line to execute + inside the container, the working directory for + the command is root ('/') in the container's + filesystem. The command is simply exec'd, it is + not run inside a shell, so traditional shell instructions + ('|', etc) won't work. To use a shell, you need + to explicitly call out to that shell. Exit status + of 0 is treated as live/healthy and non-zero is + unhealthy. + items: + type: string + type: array + failureThreshold: + description: Minimum consecutive failures for the probe + to be considered failed after having succeeded. Defaults + to 3. Minimum value is 1. + format: int32 + type: integer + httpGet: + description: HTTPGetAction describes an action based + on HTTP Get requests. + properties: + host: + description: Host name to connect to, defaults to + the pod IP. You probably want to set "Host" in + httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. + HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header + to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: string + - type: integer + scheme: + description: Scheme to use for connecting to the + host. Defaults to HTTP. + type: string + required: + - port + initialDelaySeconds: + description: 'Number of seconds after the container + has started before liveness probes are initiated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes for the probe + to be considered successful after having failed. Defaults + to 1. Must be 1 for liveness. Minimum value is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocketAction describes an action based + on opening a socket + properties: + host: + description: 'Optional: Host name to connect to, + defaults to the pod IP.' + type: string + port: + anyOf: + - type: string + - type: integer + required: + - port + timeoutSeconds: + description: 'Number of seconds after which the probe + times out. Defaults to 1 second. Minimum value is + 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + name: + description: Name of the container specified as a DNS_LABEL. + Each container in a pod must have a unique name (DNS_LABEL). + Cannot be updated. + type: string + ports: + description: List of ports to expose from the container. + Exposing a port here gives the system additional information + about the network connections a container uses, but is + primarily informational. Not specifying a port here DOES + NOT prevent that port from being exposed. Any port which + is listening on the default "0.0.0.0" address inside a + container will be accessible from the network. Cannot + be updated. + items: + description: ContainerPort represents a network port in + a single container. + properties: + containerPort: + description: Number of port to expose on the pod's + IP address. This must be a valid port number, 0 + < x < 65536. + format: int32 + type: integer + hostIP: + description: What host IP to bind the external port + to. + type: string + hostPort: + description: Number of port to expose on the host. + If specified, this must be a valid port number, + 0 < x < 65536. If HostNetwork is specified, this + must match ContainerPort. Most containers do not + need this. + format: int32 + type: integer + name: + description: If specified, this must be an IANA_SVC_NAME + and unique within the pod. Each named port in a + pod must have a unique name. Name for the port that + can be referred to by services. + type: string + protocol: + description: Protocol for port. Must be UDP, TCP, + or SCTP. Defaults to "TCP". + type: string + required: + - containerPort + type: array + readinessProbe: + description: Probe describes a health check to be performed + against a container to determine whether it is alive or + ready to receive traffic. + properties: + exec: + description: ExecAction describes a "run in container" + action. + properties: + command: + description: Command is the command line to execute + inside the container, the working directory for + the command is root ('/') in the container's + filesystem. The command is simply exec'd, it is + not run inside a shell, so traditional shell instructions + ('|', etc) won't work. To use a shell, you need + to explicitly call out to that shell. Exit status + of 0 is treated as live/healthy and non-zero is + unhealthy. + items: + type: string + type: array + failureThreshold: + description: Minimum consecutive failures for the probe + to be considered failed after having succeeded. Defaults + to 3. Minimum value is 1. + format: int32 + type: integer + httpGet: + description: HTTPGetAction describes an action based + on HTTP Get requests. + properties: + host: + description: Host name to connect to, defaults to + the pod IP. You probably want to set "Host" in + httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. + HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header + to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: string + - type: integer + scheme: + description: Scheme to use for connecting to the + host. Defaults to HTTP. + type: string + required: + - port + initialDelaySeconds: + description: 'Number of seconds after the container + has started before liveness probes are initiated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes for the probe + to be considered successful after having failed. Defaults + to 1. Must be 1 for liveness. Minimum value is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocketAction describes an action based + on opening a socket + properties: + host: + description: 'Optional: Host name to connect to, + defaults to the pod IP.' + type: string + port: + anyOf: + - type: string + - type: integer + required: + - port + timeoutSeconds: + description: 'Number of seconds after which the probe + times out. Defaults to 1 second. Minimum value is + 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + resources: + description: ResourceRequirements describes the compute + resource requirements. + properties: + limits: + description: 'Limits describes the maximum amount of + compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + type: object + requests: + description: 'Requests describes the minimum amount + of compute resources required. If Requests is omitted + for a container, it defaults to Limits if that is + explicitly specified, otherwise to an implementation-defined + value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + type: object + securityContext: + description: SecurityContext holds security configuration + that will be applied to a container. Some fields are present + in both SecurityContext and PodSecurityContext. When + both are set, the values in SecurityContext take precedence. + properties: + allowPrivilegeEscalation: + description: 'AllowPrivilegeEscalation controls whether + a process can gain more privileges than its parent + process. This bool directly controls if the no_new_privs + flag will be set on the container process. AllowPrivilegeEscalation + is true always when the container is: 1) run as Privileged + 2) has CAP_SYS_ADMIN' + type: boolean + capabilities: + description: Adds and removes POSIX capabilities from + running containers. + properties: + add: + description: Added capabilities + items: + type: string + type: array + drop: + description: Removed capabilities + items: + type: string + type: array + privileged: + description: Run container in privileged mode. Processes + in privileged containers are essentially equivalent + to root on the host. Defaults to false. + type: boolean + procMount: + description: procMount denotes the type of proc mount + to use for the containers. The default is DefaultProcMount + which uses the container runtime defaults for readonly + paths and masked paths. This requires the ProcMountType + feature flag to be enabled. + type: string + readOnlyRootFilesystem: + description: Whether this container has a read-only + root filesystem. Default is false. + type: boolean + runAsGroup: + description: The GID to run the entrypoint of the container + process. Uses runtime default if unset. May also be + set in PodSecurityContext. If set in both SecurityContext + and PodSecurityContext, the value specified in SecurityContext + takes precedence. + format: int64 + type: integer + runAsNonRoot: + description: Indicates that the container must run as + a non-root user. If true, the Kubelet will validate + the image at runtime to ensure that it does not run + as UID 0 (root) and fail to start the container if + it does. If unset or false, no such validation will + be performed. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. + type: boolean + runAsUser: + description: The UID to run the entrypoint of the container + process. Defaults to user specified in image metadata + if unspecified. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. + format: int64 + type: integer + seLinuxOptions: + description: SELinuxOptions are the labels to be applied + to the container + properties: + level: + description: Level is SELinux level label that applies + to the container. + type: string + role: + description: Role is a SELinux role label that applies + to the container. + type: string + type: + description: Type is a SELinux type label that applies + to the container. + type: string + user: + description: User is a SELinux user label that applies + to the container. + type: string + stdin: + description: Whether this container should allocate a buffer + for stdin in the container runtime. If this is not set, + reads from stdin in the container will always result in + EOF. Default is false. + type: boolean + stdinOnce: + description: Whether the container runtime should close + the stdin channel after it has been opened by a single + attach. When stdin is true the stdin stream will remain + open across multiple attach sessions. If stdinOnce is + set to true, stdin is opened on container start, is empty + until the first client attaches to stdin, and then remains + open and accepts data until the client disconnects, at + which time stdin is closed and remains closed until the + container is restarted. If this flag is false, a container + processes that reads from stdin will never receive an + EOF. Default is false + type: boolean + terminationMessagePath: + description: 'Optional: Path at which the file to which + the container''s termination message will be written is + mounted into the container''s filesystem. Message written + is intended to be brief final status, such as an assertion + failure message. Will be truncated by the node if greater + than 4096 bytes. The total message length across all containers + will be limited to 12kb. Defaults to /dev/termination-log. + Cannot be updated.' + type: string + terminationMessagePolicy: + description: Indicate how the termination message should + be populated. File will use the contents of terminationMessagePath + to populate the container status message on both success + and failure. FallbackToLogsOnError will use the last chunk + of container log output if the termination message file + is empty and the container exited with an error. The log + output is limited to 2048 bytes or 80 lines, whichever + is smaller. Defaults to File. Cannot be updated. + type: string + tty: + description: Whether this container should allocate a TTY + for itself, also requires 'stdin' to be true. Default + is false. + type: boolean + volumeDevices: + description: volumeDevices is the list of block devices + to be used by the container. This is an alpha feature + and may change in the future. + items: + description: volumeDevice describes a mapping of a raw + block device within a container. + properties: + devicePath: + description: devicePath is the path inside of the + container that the device will be mapped to. + type: string + name: + description: name must match the name of a persistentVolumeClaim + in the pod + type: string + required: + - name + - devicePath + type: array + volumeMounts: + description: Pod volumes to mount into the container's filesystem. + Cannot be updated. + items: + description: VolumeMount describes a mounting of a Volume + within a container. + properties: + mountPath: + description: Path within the container at which the + volume should be mounted. Must not contain ':'. + type: string + mountPropagation: + description: mountPropagation determines how mounts + are propagated from the host to container and the + other way around. When not set, MountPropagationNone + is used. This field is beta in 1.10. + type: string + name: + description: This must match the Name of a Volume. + type: string + readOnly: + description: Mounted read-only if true, read-write + otherwise (false or unspecified). Defaults to false. + type: boolean + subPath: + description: Path within the volume from which the + container's volume should be mounted. Defaults to + "" (volume's root). + type: string + required: + - name + - mountPath + type: array + workingDir: + description: Container's working directory. If not specified, + the container runtime's default will be used, which might + be configured in the container image. Cannot be updated. + type: string + required: + - name + type: array + externalUrl: + description: The external URL the Alertmanager instances will + be available under. This is necessary to generate correct URLs. + This is necessary if Alertmanager is not served from root of + a DNS name. + type: string + imagePullSecrets: + description: An optional list of references to secrets in the + same namespace to use for pulling prometheus and alertmanager + images from registries see http://kubernetes.io/docs/user-guide/images#specifying-imagepullsecrets-on-a-pod + items: + description: LocalObjectReference contains enough information + to let you locate the referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + type: array + listenLocal: + description: ListenLocal makes the Alertmanager server listen + on loopback, so that it does not bind against the Pod IP. Note + this is only for the Alertmanager UI, not the gossip communication. + type: boolean + logLevel: + description: Log level for Alertmanager to be configured with. + type: string + nodeSelector: + description: Define which Nodes the Pods are scheduled on. + type: object + paused: + description: If set to true all actions on the underlaying managed + objects are not goint to be performed, except for delete actions. + type: boolean + podMetadata: + description: ObjectMeta is metadata that all persisted resources + must have, which includes all objects users must create. + properties: + annotations: + description: 'Annotations is an unstructured key value map + stored with a resource that may be set by external tools + to store and retrieve arbitrary metadata. They are not queryable + and should be preserved when modifying objects. More info: + http://kubernetes.io/docs/user-guide/annotations' + type: object + clusterName: + description: The name of the cluster which the object belongs + to. This is used to distinguish resources with same name + and namespace in different clusters. This field is not set + anywhere right now and apiserver is going to ignore it if + set in create or update request. + type: string + creationTimestamp: + description: Time is a wrapper around time.Time which supports + correct marshaling to YAML and JSON. Wrappers are provided + for many of the factory methods that the time package offers. + format: date-time + type: string + deletionGracePeriodSeconds: + description: Number of seconds allowed for this object to + gracefully terminate before it will be removed from the + system. Only set when deletionTimestamp is also set. May + only be shortened. Read-only. + format: int64 + type: integer + deletionTimestamp: + description: Time is a wrapper around time.Time which supports + correct marshaling to YAML and JSON. Wrappers are provided + for many of the factory methods that the time package offers. + format: date-time + type: string + finalizers: + description: Must be empty before the object is deleted from + the registry. Each entry is an identifier for the responsible + component that will remove the entry from the list. If the + deletionTimestamp of the object is non-nil, entries in this + list can only be removed. + items: + type: string + type: array + generateName: + description: |- + GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server. + + If this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). + + Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency + type: string + generation: + description: A sequence number representing a specific generation + of the desired state. Populated by the system. Read-only. + format: int64 + type: integer + initializers: + description: Initializers tracks the progress of initialization. + properties: + pending: + description: Pending is a list of initializers that must + execute in order before this object is visible. When + the last pending initializer is removed, and no failing + result is set, the initializers struct will be set to + nil and the object is considered as initialized and + visible to all clients. + items: + description: Initializer is information about an initializer + that has not yet completed. + properties: + name: + description: name of the process that is responsible + for initializing this object. + type: string + required: + - name + type: array + result: + description: Status is a return value for calls that don't + return other objects. + properties: + apiVersion: + description: 'APIVersion defines the versioned schema + of this representation of an object. Servers should + convert recognized schemas to the latest internal + value, and may reject unrecognized values. More + info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources' + type: string + code: + description: Suggested HTTP return code for this status, + 0 if not set. + format: int32 + type: integer + details: + description: StatusDetails is a set of additional + properties that MAY be set by the server to provide + additional information about a response. The Reason + field of a Status object defines what attributes + will be set. Clients must ignore fields that do + not match the defined type of each attribute, and + should assume that any attribute may be empty, invalid, + or under defined. + properties: + causes: + description: The Causes array includes more details + associated with the StatusReason failure. Not + all StatusReasons may provide detailed causes. + items: + description: StatusCause provides more information + about an api.Status failure, including cases + when multiple errors are encountered. + properties: + field: + description: |- + The field of the resource that has caused this error, as named by its JSON serialization. May include dot and postfix notation for nested attributes. Arrays are zero-indexed. Fields may appear more than once in an array of causes due to fields having multiple errors. Optional. + + Examples: + "name" - the field "name" on the current resource + "items[0].name" - the field "name" on the first array entry in "items" + type: string + message: + description: A human-readable description + of the cause of the error. This field + may be presented as-is to a reader. + type: string + reason: + description: A machine-readable description + of the cause of the error. If this value + is empty there is no information available. + type: string + type: array + group: + description: The group attribute of the resource + associated with the status StatusReason. + type: string + kind: + description: 'The kind attribute of the resource + associated with the status StatusReason. On + some operations may differ from the requested + resource Kind. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds' + type: string + name: + description: The name attribute of the resource + associated with the status StatusReason (when + there is a single name which can be described). + type: string + retryAfterSeconds: + description: If specified, the time in seconds + before the operation should be retried. Some + errors may indicate the client must take an + alternate action - for those errors this field + may indicate how long to wait before taking + the alternate action. + format: int32 + type: integer + uid: + description: 'UID of the resource. (when there + is a single resource which can be described). + More info: http://kubernetes.io/docs/user-guide/identifiers#uids' + type: string + kind: + description: 'Kind is a string value representing + the REST resource this object represents. Servers + may infer this from the endpoint the client submits + requests to. Cannot be updated. In CamelCase. More + info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds' + type: string + message: + description: A human-readable description of the status + of this operation. + type: string + metadata: + description: ListMeta describes metadata that synthetic + resources must have, including lists and various + status objects. A resource may have only one of + {ObjectMeta, ListMeta}. + properties: + continue: + description: continue may be set if the user set + a limit on the number of items returned, and + indicates that the server has more data available. + The value is opaque and may be used to issue + another request to the endpoint that served + this list to retrieve the next set of available + objects. Continuing a consistent list may not + be possible if the server configuration has + changed or more than a few minutes have passed. + The resourceVersion field returned when using + this continue value will be identical to the + value in the first response, unless you have + received this token from an error message. + type: string + resourceVersion: + description: 'String that identifies the server''s + internal version of this object that can be + used by clients to determine when objects have + changed. Value must be treated as opaque by + clients and passed unmodified back to the server. + Populated by the system. Read-only. More info: + https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency' + type: string + selfLink: + description: selfLink is a URL representing this + object. Populated by the system. Read-only. + type: string + reason: + description: A machine-readable description of why + this operation is in the "Failure" status. If this + value is empty there is no information available. + A Reason clarifies an HTTP status code but does + not override it. + type: string + status: + description: 'Status of the operation. One of: "Success" + or "Failure". More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status' + type: string + required: + - pending + labels: + description: 'Map of string keys and values that can be used + to organize and categorize (scope and select) objects. May + match selectors of replication controllers and services. + More info: http://kubernetes.io/docs/user-guide/labels' + type: object + name: + description: 'Name must be unique within a namespace. Is required + when creating resources, although some resources may allow + a client to request the generation of an appropriate name + automatically. Name is primarily intended for creation idempotence + and configuration definition. Cannot be updated. More info: + http://kubernetes.io/docs/user-guide/identifiers#names' + type: string + namespace: + description: |- + Namespace defines the space within each name must be unique. An empty namespace is equivalent to the "default" namespace, but "default" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty. + + Must be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces + type: string + ownerReferences: + description: List of objects depended by this object. If ALL + objects in the list have been deleted, this object will + be garbage collected. If this object is managed by a controller, + then an entry in this list will point to this controller, + with the controller field set to true. There cannot be more + than one managing controller. + items: + description: OwnerReference contains enough information + to let you identify an owning object. Currently, an owning + object must be in the same namespace, so there is no namespace + field. + properties: + apiVersion: + description: API version of the referent. + type: string + blockOwnerDeletion: + description: If true, AND if the owner has the "foregroundDeletion" + finalizer, then the owner cannot be deleted from the + key-value store until this reference is removed. Defaults + to false. To set this field, a user needs "delete" + permission of the owner, otherwise 422 (Unprocessable + Entity) will be returned. + type: boolean + controller: + description: If true, this reference points to the managing + controller. + type: boolean + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names' + type: string + uid: + description: 'UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids' + type: string + required: + - apiVersion + - kind + - name + - uid + type: array + resourceVersion: + description: |- + An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources. + + Populated by the system. Read-only. Value must be treated as opaque by clients and . More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency + type: string + selfLink: + description: SelfLink is a URL representing this object. Populated + by the system. Read-only. + type: string + uid: + description: |- + UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations. + + Populated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids + type: string + priorityClassName: + description: Priority class assigned to the Pods + type: string + replicas: + description: Size is the expected size of the alertmanager cluster. + The controller will eventually make the size of the running + cluster equal to the expected size. + format: int32 + type: integer + resources: + description: ResourceRequirements describes the compute resource + requirements. + properties: + limits: + description: 'Limits describes the maximum amount of compute + resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + type: object + requests: + description: 'Requests describes the minimum amount of compute + resources required. If Requests is omitted for a container, + it defaults to Limits if that is explicitly specified, otherwise + to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + type: object + retention: + description: Time duration Alertmanager shall retain data for. + Default is '120h', and must match the regular expression `[0-9]+(ms|s|m|h)` + (milliseconds seconds minutes hours). + type: string + routePrefix: + description: The route prefix Alertmanager registers HTTP handlers + for. This is useful, if using ExternalURL and a proxy is rewriting + HTTP routes of a request, and the actual ExternalURL is still + true, but the server serves requests under a different route + prefix. For example for use with `kubectl proxy`. + type: string + secrets: + description: Secrets is a list of Secrets in the same namespace + as the Alertmanager object, which shall be mounted into the + Alertmanager Pods. The Secrets are mounted into /etc/alertmanager/secrets/. + items: + type: string + type: array + securityContext: + description: PodSecurityContext holds pod-level security attributes + and common container settings. Some fields are also present + in container.securityContext. Field values of container.securityContext + take precedence over field values of PodSecurityContext. + properties: + fsGroup: + description: |- + A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod: + + 1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw---- + + If unset, the Kubelet will not modify the ownership and permissions of any volume. + format: int64 + type: integer + runAsGroup: + description: The GID to run the entrypoint of the container + process. Uses runtime default if unset. May also be set + in SecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext + takes precedence for that container. + format: int64 + type: integer + runAsNonRoot: + description: Indicates that the container must run as a non-root + user. If true, the Kubelet will validate the image at runtime + to ensure that it does not run as UID 0 (root) and fail + to start the container if it does. If unset or false, no + such validation will be performed. May also be set in SecurityContext. If + set in both SecurityContext and PodSecurityContext, the + value specified in SecurityContext takes precedence. + type: boolean + runAsUser: + description: The UID to run the entrypoint of the container + process. Defaults to user specified in image metadata if + unspecified. May also be set in SecurityContext. If set + in both SecurityContext and PodSecurityContext, the value + specified in SecurityContext takes precedence for that container. + format: int64 + type: integer + seLinuxOptions: + description: SELinuxOptions are the labels to be applied to + the container + properties: + level: + description: Level is SELinux level label that applies + to the container. + type: string + role: + description: Role is a SELinux role label that applies + to the container. + type: string + type: + description: Type is a SELinux type label that applies + to the container. + type: string + user: + description: User is a SELinux user label that applies + to the container. + type: string + supplementalGroups: + description: A list of groups applied to the first process + run in each container, in addition to the container's primary + GID. If unspecified, no groups will be added to any container. + items: + format: int64 + type: integer + type: array + sysctls: + description: Sysctls hold a list of namespaced sysctls used + for the pod. Pods with unsupported sysctls (by the container + runtime) might fail to launch. + items: + description: Sysctl defines a kernel parameter to be set + properties: + name: + description: Name of a property to set + type: string + value: + description: Value of a property to set + type: string + required: + - name + - value + type: array + serviceAccountName: + description: ServiceAccountName is the name of the ServiceAccount + to use to run the Prometheus Pods. + type: string + sha: + description: SHA of Alertmanager container image to be deployed. + Defaults to the value of `version`. Similar to a tag, but the + SHA explicitly deploys an immutable container image. Version + and Tag are ignored if SHA is set. + type: string + storage: + description: StorageSpec defines the configured storage for a + group Prometheus servers. If neither `emptyDir` nor `volumeClaimTemplate` + is specified, then by default an [EmptyDir](https://kubernetes.io/docs/concepts/storage/volumes/#emptydir) + will be used. + properties: + emptyDir: + description: Represents an empty directory for a pod. Empty + directory volumes support ownership management and SELinux + relabeling. + properties: + medium: + description: 'What type of storage medium should back + this directory. The default is "" which means to use + the node''s default medium. Must be an empty string + (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + type: string + volumeClaimTemplate: + description: PersistentVolumeClaim is a user's request for + and claim to a persistent volume + properties: + apiVersion: + description: 'APIVersion defines the versioned schema + of this representation of an object. Servers should + convert recognized schemas to the latest internal value, + and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the + REST resource this object represents. Servers may infer + this from the endpoint the client submits requests to. + Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds' + type: string + metadata: + description: ObjectMeta is metadata that all persisted + resources must have, which includes all objects users + must create. + properties: + annotations: + description: 'Annotations is an unstructured key value + map stored with a resource that may be set by external + tools to store and retrieve arbitrary metadata. + They are not queryable and should be preserved when + modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations' + type: object + clusterName: + description: The name of the cluster which the object + belongs to. This is used to distinguish resources + with same name and namespace in different clusters. + This field is not set anywhere right now and apiserver + is going to ignore it if set in create or update + request. + type: string + creationTimestamp: + description: Time is a wrapper around time.Time which + supports correct marshaling to YAML and JSON. Wrappers + are provided for many of the factory methods that + the time package offers. + format: date-time + type: string + deletionGracePeriodSeconds: + description: Number of seconds allowed for this object + to gracefully terminate before it will be removed + from the system. Only set when deletionTimestamp + is also set. May only be shortened. Read-only. + format: int64 + type: integer + deletionTimestamp: + description: Time is a wrapper around time.Time which + supports correct marshaling to YAML and JSON. Wrappers + are provided for many of the factory methods that + the time package offers. + format: date-time + type: string + finalizers: + description: Must be empty before the object is deleted + from the registry. Each entry is an identifier for + the responsible component that will remove the entry + from the list. If the deletionTimestamp of the object + is non-nil, entries in this list can only be removed. + items: + type: string + type: array + generateName: + description: |- + GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server. + + If this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). + + Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency + type: string + generation: + description: A sequence number representing a specific + generation of the desired state. Populated by the + system. Read-only. + format: int64 + type: integer + initializers: + description: Initializers tracks the progress of initialization. + properties: + pending: + description: Pending is a list of initializers + that must execute in order before this object + is visible. When the last pending initializer + is removed, and no failing result is set, the + initializers struct will be set to nil and the + object is considered as initialized and visible + to all clients. + items: + description: Initializer is information about + an initializer that has not yet completed. + properties: + name: + description: name of the process that is + responsible for initializing this object. + type: string + required: + - name + type: array + result: + description: Status is a return value for calls + that don't return other objects. + properties: + apiVersion: + description: 'APIVersion defines the versioned + schema of this representation of an object. + Servers should convert recognized schemas + to the latest internal value, and may reject + unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources' + type: string + code: + description: Suggested HTTP return code for + this status, 0 if not set. + format: int32 + type: integer + details: + description: StatusDetails is a set of additional + properties that MAY be set by the server + to provide additional information about + a response. The Reason field of a Status + object defines what attributes will be set. + Clients must ignore fields that do not match + the defined type of each attribute, and + should assume that any attribute may be + empty, invalid, or under defined. + properties: + causes: + description: The Causes array includes + more details associated with the StatusReason + failure. Not all StatusReasons may provide + detailed causes. + items: + description: StatusCause provides more + information about an api.Status failure, + including cases when multiple errors + are encountered. + properties: + field: + description: |- + The field of the resource that has caused this error, as named by its JSON serialization. May include dot and postfix notation for nested attributes. Arrays are zero-indexed. Fields may appear more than once in an array of causes due to fields having multiple errors. Optional. + + Examples: + "name" - the field "name" on the current resource + "items[0].name" - the field "name" on the first array entry in "items" + type: string + message: + description: A human-readable description + of the cause of the error. This + field may be presented as-is to + a reader. + type: string + reason: + description: A machine-readable + description of the cause of the + error. If this value is empty + there is no information available. + type: string + type: array + group: + description: The group attribute of the + resource associated with the status + StatusReason. + type: string + kind: + description: 'The kind attribute of the + resource associated with the status + StatusReason. On some operations may + differ from the requested resource Kind. + More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds' + type: string + name: + description: The name attribute of the + resource associated with the status + StatusReason (when there is a single + name which can be described). + type: string + retryAfterSeconds: + description: If specified, the time in + seconds before the operation should + be retried. Some errors may indicate + the client must take an alternate action + - for those errors this field may indicate + how long to wait before taking the alternate + action. + format: int32 + type: integer + uid: + description: 'UID of the resource. (when + there is a single resource which can + be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids' + type: string + kind: + description: 'Kind is a string value representing + the REST resource this object represents. + Servers may infer this from the endpoint + the client submits requests to. Cannot be + updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds' + type: string + message: + description: A human-readable description + of the status of this operation. + type: string + metadata: + description: ListMeta describes metadata that + synthetic resources must have, including + lists and various status objects. A resource + may have only one of {ObjectMeta, ListMeta}. + properties: + continue: + description: continue may be set if the + user set a limit on the number of items + returned, and indicates that the server + has more data available. The value is + opaque and may be used to issue another + request to the endpoint that served + this list to retrieve the next set of + available objects. Continuing a consistent + list may not be possible if the server + configuration has changed or more than + a few minutes have passed. The resourceVersion + field returned when using this continue + value will be identical to the value + in the first response, unless you have + received this token from an error message. + type: string + resourceVersion: + description: 'String that identifies the + server''s internal version of this object + that can be used by clients to determine + when objects have changed. Value must + be treated as opaque by clients and + passed unmodified back to the server. + Populated by the system. Read-only. + More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency' + type: string + selfLink: + description: selfLink is a URL representing + this object. Populated by the system. + Read-only. + type: string + reason: + description: A machine-readable description + of why this operation is in the "Failure" + status. If this value is empty there is + no information available. A Reason clarifies + an HTTP status code but does not override + it. + type: string + status: + description: 'Status of the operation. One + of: "Success" or "Failure". More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status' + type: string + required: + - pending + labels: + description: 'Map of string keys and values that can + be used to organize and categorize (scope and select) + objects. May match selectors of replication controllers + and services. More info: http://kubernetes.io/docs/user-guide/labels' + type: object + name: + description: 'Name must be unique within a namespace. + Is required when creating resources, although some + resources may allow a client to request the generation + of an appropriate name automatically. Name is primarily + intended for creation idempotence and configuration + definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names' + type: string + namespace: + description: |- + Namespace defines the space within each name must be unique. An empty namespace is equivalent to the "default" namespace, but "default" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty. + + Must be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces + type: string + ownerReferences: + description: List of objects depended by this object. + If ALL objects in the list have been deleted, this + object will be garbage collected. If this object + is managed by a controller, then an entry in this + list will point to this controller, with the controller + field set to true. There cannot be more than one + managing controller. + items: + description: OwnerReference contains enough information + to let you identify an owning object. Currently, + an owning object must be in the same namespace, + so there is no namespace field. + properties: + apiVersion: + description: API version of the referent. + type: string + blockOwnerDeletion: + description: If true, AND if the owner has the + "foregroundDeletion" finalizer, then the owner + cannot be deleted from the key-value store + until this reference is removed. Defaults + to false. To set this field, a user needs + "delete" permission of the owner, otherwise + 422 (Unprocessable Entity) will be returned. + type: boolean + controller: + description: If true, this reference points + to the managing controller. + type: boolean + kind: + description: 'Kind of the referent. More info: + https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: + http://kubernetes.io/docs/user-guide/identifiers#names' + type: string + uid: + description: 'UID of the referent. More info: + http://kubernetes.io/docs/user-guide/identifiers#uids' + type: string + required: + - apiVersion + - kind + - name + - uid + type: array + resourceVersion: + description: |- + An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources. + + Populated by the system. Read-only. Value must be treated as opaque by clients and . More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency + type: string + selfLink: + description: SelfLink is a URL representing this object. + Populated by the system. Read-only. + type: string + uid: + description: |- + UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations. + + Populated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids + type: string + spec: + description: PersistentVolumeClaimSpec describes the common + attributes of storage devices and allows a Source for + provider-specific attributes + properties: + accessModes: + description: 'AccessModes contains the desired access + modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' + items: + type: string + type: array + dataSource: + description: TypedLocalObjectReference contains enough + information to let you locate the typed referenced + object inside the same namespace. + properties: + apiGroup: + description: APIGroup is the group for the resource + being referenced. If APIGroup is not specified, + the specified Kind must be in the core API group. + For any other third-party types, APIGroup is + required. + type: string + kind: + description: Kind is the type of resource being + referenced + type: string + name: + description: Name is the name of resource being + referenced + type: string + required: + - kind + - name + resources: + description: ResourceRequirements describes the compute + resource requirements. + properties: + limits: + description: 'Limits describes the maximum amount + of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + type: object + requests: + description: 'Requests describes the minimum amount + of compute resources required. If Requests is + omitted for a container, it defaults to Limits + if that is explicitly specified, otherwise to + an implementation-defined value. More info: + https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + type: object + selector: + description: A label selector is a label query over + a set of resources. The result of matchLabels and + matchExpressions are ANDed. An empty label selector + matches all objects. A null label selector matches + no objects. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement is + a selector that contains values, a key, and + an operator that relates the key and values. + properties: + key: + description: key is the label key that the + selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. If + the operator is Exists or DoesNotExist, + the values array must be empty. This array + is replaced during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: array + matchLabels: + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is "In", + and the values array contains only "value". + The requirements are ANDed. + type: object + storageClassName: + description: 'Name of the StorageClass required by + the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' + type: string + volumeMode: + description: volumeMode defines what type of volume + is required by the claim. Value of Filesystem is + implied when not included in claim spec. This is + an alpha feature and may change in the future. + type: string + volumeName: + description: VolumeName is the binding reference to + the PersistentVolume backing this claim. + type: string + status: + description: PersistentVolumeClaimStatus is the current + status of a persistent volume claim. + properties: + accessModes: + description: 'AccessModes contains the actual access + modes the volume backing the PVC has. More info: + https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' + items: + type: string + type: array + capacity: + description: Represents the actual resources of the + underlying volume. + type: object + conditions: + description: Current Condition of persistent volume + claim. If underlying persistent volume is being + resized then the Condition will be set to 'ResizeStarted'. + items: + description: PersistentVolumeClaimCondition contails + details about state of pvc + properties: + lastProbeTime: + description: Time is a wrapper around time.Time + which supports correct marshaling to YAML + and JSON. Wrappers are provided for many + of the factory methods that the time package + offers. + format: date-time + type: string + lastTransitionTime: + description: Time is a wrapper around time.Time + which supports correct marshaling to YAML + and JSON. Wrappers are provided for many + of the factory methods that the time package + offers. + format: date-time + type: string + message: + description: Human-readable message indicating + details about last transition. + type: string + reason: + description: Unique, this should be a short, + machine understandable string that gives the + reason for condition's last transition. If + it reports "ResizeStarted" that means the + underlying persistent volume is being resized. + type: string + status: + type: string + type: + type: string + required: + - type + - status + type: array + phase: + description: Phase represents the current phase of + PersistentVolumeClaim. + type: string + tag: + description: Tag of Alertmanager container image to be deployed. + Defaults to the value of `version`. Version is ignored if Tag + is set. + type: string + tolerations: + description: If specified, the pod's tolerations. + items: + description: The pod this Toleration is attached to tolerates + any taint that matches the triple using + the matching operator . + properties: + effect: + description: Effect indicates the taint effect to match. + Empty means match all taint effects. When specified, allowed + values are NoSchedule, PreferNoSchedule and NoExecute. + type: string + key: + description: Key is the taint key that the toleration applies + to. Empty means match all taint keys. If the key is empty, + operator must be Exists; this combination means to match + all values and all keys. + type: string + operator: + description: Operator represents a key's relationship to + the value. Valid operators are Exists and Equal. Defaults + to Equal. Exists is equivalent to wildcard for value, + so that a pod can tolerate all taints of a particular + category. + type: string + tolerationSeconds: + description: TolerationSeconds represents the period of + time the toleration (which must be of effect NoExecute, + otherwise this field is ignored) tolerates the taint. + By default, it is not set, which means tolerate the taint + forever (do not evict). Zero and negative values will + be treated as 0 (evict immediately) by the system. + format: int64 + type: integer + value: + description: Value is the taint value the toleration matches + to. If the operator is Exists, the value should be empty, + otherwise just a regular string. + type: string + type: array + version: + description: Version the cluster should be on. + type: string + status: + description: 'AlertmanagerStatus is the most recent observed status + of the Alertmanager cluster. Read-only. Not included when requesting + from the apiserver, only from the Prometheus Operator API itself. + More info: https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#spec-and-status' + properties: + availableReplicas: + description: Total number of available pods (ready for at least + minReadySeconds) targeted by this Alertmanager cluster. + format: int32 + type: integer + paused: + description: Represents whether any actions on the underlaying + managed objects are being performed. Only delete actions will + be performed. + type: boolean + replicas: + description: Total number of non-terminated pods targeted by this + Alertmanager cluster (their labels match the selector). + format: int32 + type: integer + unavailableReplicas: + description: Total number of unavailable pods targeted by this + Alertmanager cluster. + format: int32 + type: integer + updatedReplicas: + description: Total number of non-terminated pods targeted by this + Alertmanager cluster that have the desired version spec. + format: int32 + type: integer + required: + - paused + - replicas + - updatedReplicas + - availableReplicas + - unavailableReplicas + version: v1 + - name: prometheus-k8s-service-account + object: + apiVersion: v1 + kind: ServiceAccount + metadata: + name: prometheus-k8s + namespace: rafay-infra + - name: prometheus-k8s-clusterrole + object: + apiVersion: rbac.authorization.k8s.io/v1 + kind: ClusterRole + metadata: + name: prometheus-k8s + rules: + - apiGroups: + - "" + resources: + - nodes/metrics + verbs: + - get + - nonResourceURLs: + - /metrics + verbs: + - get + - name: prometheus-k8s-clusterrolebinding + object: + apiVersion: rbac.authorization.k8s.io/v1 + kind: ClusterRoleBinding + metadata: + name: prometheus-k8s + roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: prometheus-k8s + subjects: + - kind: ServiceAccount + name: prometheus-k8s + namespace: rafay-infra + - name: prometheus-k8s-roleconfig + object: + apiVersion: rbac.authorization.k8s.io/v1 + kind: Role + metadata: + name: prometheus-k8s-config + namespace: rafay-infra + rules: + - apiGroups: + - "" + resources: + - configmaps + verbs: + - get + - name: prometheus-k8s-role-default + object: + apiVersion: rbac.authorization.k8s.io/v1 + kind: Role + metadata: + name: prometheus-k8s + namespace: default + rules: + - apiGroups: + - "" + resources: + - nodes + - services + - endpoints + - pods + verbs: + - get + - list + - watch + - name: prometheus-k8s-role-kube-system + object: + apiVersion: rbac.authorization.k8s.io/v1 + kind: Role + metadata: + name: prometheus-k8s + namespace: kube-system + rules: + - apiGroups: + - "" + resources: + - nodes + - services + - endpoints + - pods + verbs: + - get + - list + - watch + - name: prometheus-k8s-role-rafay-infra + object: + apiVersion: rbac.authorization.k8s.io/v1 + kind: Role + metadata: + name: prometheus-k8s + namespace: rafay-infra + rules: + - apiGroups: + - "" + resources: + - nodes + - services + - endpoints + - pods + verbs: + - get + - list + - watch + - name: prometheus-k8s-rolebindingconfig + object: + apiVersion: rbac.authorization.k8s.io/v1 + kind: RoleBinding + metadata: + name: prometheus-k8s-config + namespace: rafay-infra + roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: prometheus-k8s-config + subjects: + - kind: ServiceAccount + name: prometheus-k8s + namespace: rafay-infra + - name: prometheus-k8s-rolebinding-default + object: + apiVersion: rbac.authorization.k8s.io/v1 + kind: RoleBinding + metadata: + name: prometheus-k8s + namespace: default + roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: prometheus-k8s + subjects: + - kind: ServiceAccount + name: prometheus-k8s + namespace: rafay-infra + - name: prometheus-k8s-rolebinding-kube-system + object: + apiVersion: rbac.authorization.k8s.io/v1 + kind: RoleBinding + metadata: + name: prometheus-k8s + namespace: kube-system + roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: prometheus-k8s + subjects: + - kind: ServiceAccount + name: prometheus-k8s + namespace: rafay-infra + - name: prometheus-k8s-rolebinding-rafay-infra + object: + apiVersion: rbac.authorization.k8s.io/v1 + kind: RoleBinding + metadata: + name: prometheus-k8s + namespace: rafay-infra + roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: prometheus-k8s + subjects: + - kind: ServiceAccount + name: prometheus-k8s + namespace: rafay-infra + - name: prometheus-operator-serviceaccount + object: + apiVersion: v1 + kind: ServiceAccount + metadata: + name: prometheus-operator + namespace: rafay-infra + - name: prometheus-operator-clusterrole + object: + apiVersion: rbac.authorization.k8s.io/v1 + kind: ClusterRole + metadata: + name: prometheus-operator + rules: + - apiGroups: + - apiextensions.k8s.io + resources: + - customresourcedefinitions + verbs: + - '*' + - apiGroups: + - monitoring.coreos.com + resources: + - alertmanagers + - prometheuses + - prometheuses/finalizers + - alertmanagers/finalizers + - servicemonitors + - prometheusrules + verbs: + - '*' + - apiGroups: + - apps + resources: + - statefulsets + verbs: + - '*' + - apiGroups: + - "" + resources: + - configmaps + - secrets + verbs: + - '*' + - apiGroups: + - "" + resources: + - pods + verbs: + - list + - delete + - apiGroups: + - "" + resources: + - services + - endpoints + verbs: + - get + - create + - update + - apiGroups: + - "" + resources: + - nodes + verbs: + - list + - watch + - apiGroups: + - "" + resources: + - namespaces + verbs: + - get + - list + - watch + - name: prometheus-operator-clusterrole-binding + object: + apiVersion: rbac.authorization.k8s.io/v1 + kind: ClusterRoleBinding + metadata: + name: prometheus-operator + roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: prometheus-operator + subjects: + - kind: ServiceAccount + name: prometheus-operator + namespace: rafay-infra + - name: prometheus-operator-servicemonitor + object: + apiVersion: monitoring.coreos.com/v1 + kind: ServiceMonitor + metadata: + labels: + k8s-app: prometheus-operator + name: prometheus-operator + namespace: rafay-infra + spec: + endpoints: + - honorLabels: true + port: http + selector: + matchLabels: + k8s-app: prometheus-operator + - name: alertmanager-service-account + object: + apiVersion: v1 + kind: ServiceAccount + metadata: + name: alertmanager-main + namespace: rafay-infra + - name: alertmanager-main-secret + object: + apiVersion: v1 + data: + alertmanager.yaml: Z2xvYmFsOgogICMgVGhlIHNtYXJ0aG9zdCBhbmQgU01UUCBzZW5kZXIgdXNlZCBmb3IgbWFpbCBub3RpZmljYXRpb25zLgogICNzbXRwX3NtYXJ0aG9zdDogJ2xvY2FsaG9zdDoyNScKICAjc210cF9mcm9tOiAnYWxlcnRtYW5hZ2VyQGV4YW1wbGUub3JnJwogICNzbXRwX2F1dGhfdXNlcm5hbWU6ICdhbGVydG1hbmFnZXInCiAgI3NtdHBfYXV0aF9wYXNzd29yZDogJ3Bhc3N3b3JkJwogICMgVGhlIGF1dGggdG9rZW4gZm9yIEhpcGNoYXQuCiAgI2hpcGNoYXRfYXV0aF90b2tlbjogJzEyMzQ1NTY3ODknCiAgIyBBbHRlcm5hdGl2ZSBob3N0IGZvciBIaXBjaGF0LgogICNoaXBjaGF0X2FwaV91cmw6ICdodHRwczovL2hpcGNoYXQuZm9vYmFyLm9yZy8nCiAgb3BzZ2VuaWVfYXBpX2tleTogJzEyN2FjYjUzLTIyYmItNDlkMC04Y2I4LWU5NGJiYjQ1YWZmMicKCgojIFRoZSBkaXJlY3RvcnkgZnJvbSB3aGljaCBub3RpZmljYXRpb24gdGVtcGxhdGVzIGFyZSByZWFkLgp0ZW1wbGF0ZXM6IAotICcvZXRjL2FsZXJ0bWFuYWdlci90ZW1wbGF0ZS8qLnRtcGwnCgojIFRoZSByb290IHJvdXRlIG9uIHdoaWNoIGVhY2ggaW5jb21pbmcgYWxlcnQgZW50ZXJzLgpyb3V0ZToKICAjIFRoZSBsYWJlbHMgYnkgd2hpY2ggaW5jb21pbmcgYWxlcnRzIGFyZSBncm91cGVkIHRvZ2V0aGVyLiBGb3IgZXhhbXBsZSwKICAjIG11bHRpcGxlIGFsZXJ0cyBjb21pbmcgaW4gZm9yIGNsdXN0ZXI9QSBhbmQgYWxlcnRuYW1lPUxhdGVuY3lIaWdoIHdvdWxkCiAgIyBiZSBiYXRjaGVkIGludG8gYSBzaW5nbGUgZ3JvdXAuCiAgIwogICMgVG8gYWdncmVnYXRlIGJ5IGFsbCBwb3NzaWJsZSBsYWJlbHMgdXNlICcuLi4nIGFzIHRoZSBzb2xlIGxhYmVsIG5hbWUuCiAgIyBUaGlzIGVmZmVjdGl2ZWx5IGRpc2FibGVzIGFnZ3JlZ2F0aW9uIGVudGlyZWx5LCBwYXNzaW5nIHRocm91Z2ggYWxsCiAgIyBhbGVydHMgYXMtaXMuIFRoaXMgaXMgdW5saWtlbHkgdG8gYmUgd2hhdCB5b3Ugd2FudCwgdW5sZXNzIHlvdSBoYXZlCiAgIyBhIHZlcnkgbG93IGFsZXJ0IHZvbHVtZSBvciB5b3VyIHVwc3RyZWFtIG5vdGlmaWNhdGlvbiBzeXN0ZW0gcGVyZm9ybXMKICAjIGl0cyBvd24gZ3JvdXBpbmcuIEV4YW1wbGU6IGdyb3VwX2J5OiBbLi4uXQogIGdyb3VwX2J5OiBbJ2FsZXJ0bmFtZScsICdyY19lZGdlaWQnLCAnc2VydmljZSddCgogICMgV2hlbiBhIG5ldyBncm91cCBvZiBhbGVydHMgaXMgY3JlYXRlZCBieSBhbiBpbmNvbWluZyBhbGVydCwgd2FpdCBhdAogICMgbGVhc3QgJ2dyb3VwX3dhaXQnIHRvIHNlbmQgdGhlIGluaXRpYWwgbm90aWZpY2F0aW9uLgogICMgVGhpcyB3YXkgZW5zdXJlcyB0aGF0IHlvdSBnZXQgbXVsdGlwbGUgYWxlcnRzIGZvciB0aGUgc2FtZSBncm91cCB0aGF0IHN0YXJ0CiAgIyBmaXJpbmcgc2hvcnRseSBhZnRlciBhbm90aGVyIGFyZSBiYXRjaGVkIHRvZ2V0aGVyIG9uIHRoZSBmaXJzdCAKICAjIG5vdGlmaWNhdGlvbi4KICBncm91cF93YWl0OiAzMHMKCiAgIyBXaGVuIHRoZSBmaXJzdCBub3RpZmljYXRpb24gd2FzIHNlbnQsIHdhaXQgJ2dyb3VwX2ludGVydmFsJyB0byBzZW5kIGEgYmF0Y2gKICAjIG9mIG5ldyBhbGVydHMgdGhhdCBzdGFydGVkIGZpcmluZyBmb3IgdGhhdCBncm91cC4KICBncm91cF9pbnRlcnZhbDogNW0KCiAgIyBJZiBhbiBhbGVydCBoYXMgc3VjY2Vzc2Z1bGx5IGJlZW4gc2VudCwgd2FpdCAncmVwZWF0X2ludGVydmFsJyB0bwogICMgcmVzZW5kIHRoZW0uCiAgcmVwZWF0X2ludGVydmFsOiAzaCAKCiAgIyBBIGRlZmF1bHQgcmVjZWl2ZXIKCiAgcmVjZWl2ZXI6IHRlYW0tb3BzLWdlbmllCgoKICAjIEFsbCB0aGUgYWJvdmUgYXR0cmlidXRlcyBhcmUgaW5oZXJpdGVkIGJ5IGFsbCBjaGlsZCByb3V0ZXMgYW5kIGNhbiAKICAjIG92ZXJ3cml0dGVuIG9uIGVhY2guCgogICMgVGhlIGNoaWxkIHJvdXRlIHRyZWVzLgogIHJvdXRlczoKICAjIFRoaXMgcm91dGVzIHBlcmZvcm1zIGEgcmVndWxhciBleHByZXNzaW9uIG1hdGNoIG9uIGFsZXJ0IGxhYmVscyB0bwogICMgY2F0Y2ggYWxlcnRzIHRoYXQgYXJlIHJlbGF0ZWQgdG8gYSBsaXN0IG9mIHNlcnZpY2VzLgogICMtIG1hdGNoX3JlOgogICMgICAgc2VydmljZTogXihmb28xfGZvbzJ8YmF6KSQKICAjICByZWNlaXZlcjogdGVhbS1YLW1haWxzCiAgIyAgIyBUaGUgc2VydmljZSBoYXMgYSBzdWItcm91dGUgZm9yIGNyaXRpY2FsIGFsZXJ0cywgYW55IGFsZXJ0cwogICMgICMgdGhhdCBkbyBub3QgbWF0Y2gsIGkuZS4gc2V2ZXJpdHkgIT0gY3JpdGljYWwsIGZhbGwtYmFjayB0byB0aGUKICAjICAjIHBhcmVudCBub2RlIGFuZCBhcmUgc2VudCB0byAndGVhbS1YLW1haWxzJwogICMgIHJvdXRlczoKICAjICAtIG1hdGNoOgogICMgICAgICBzZXZlcml0eTogY3JpdGljYWwKICAjICAgIHJlY2VpdmVyOiB0ZWFtLVgtcGFnZXIKICAjLSBtYXRjaDoKICAjICAgIHNlcnZpY2U6IGZpbGVzCiAgIyAgcmVjZWl2ZXI6IHRlYW0tWS1tYWlscwoKICAjICByb3V0ZXM6CiAgIyAgLSBtYXRjaDoKICAjICAgICAgc2V2ZXJpdHk6IGNyaXRpY2FsCiAgIyAgICByZWNlaXZlcjogdGVhbS1ZLXBhZ2VyCgogICMgVGhpcyByb3V0ZSBoYW5kbGVzIGFsbCBhbGVydHMgY29taW5nIGZyb20gYSBkYXRhYmFzZSBzZXJ2aWNlLiBJZiB0aGVyZSdzCiAgIyBubyB0ZWFtIHRvIGhhbmRsZSBpdCwgaXQgZGVmYXVsdHMgdG8gdGhlIERCIHRlYW0uCiAgIy0gbWF0Y2g6CiAgIyAgICBzZXJ2aWNlOiBkYXRhYmFzZQogICMgIHJlY2VpdmVyOiB0ZWFtLURCLXBhZ2VyCiAgICAjIEFsc28gZ3JvdXAgYWxlcnRzIGJ5IGFmZmVjdGVkIGRhdGFiYXNlLgogICMgIGdyb3VwX2J5OiBbYWxlcnRuYW1lLCBjbHVzdGVyLCBkYXRhYmFzZV0KICAjICByb3V0ZXM6CiAgIyAgLSBtYXRjaDoKICAjICAgICAgb3duZXI6IHRlYW0tWAogICMgICAgcmVjZWl2ZXI6IHRlYW0tWC1wYWdlcgogICMgICAgY29udGludWU6IHRydWUKICAjICAtIG1hdGNoOgogICMgICAgICBvd25lcjogdGVhbS1ZCiAgIyAgICByZWNlaXZlcjogdGVhbS1ZLXBhZ2VyCgogIC0gcmVjZWl2ZXI6ICdvcHNnZW5pZS1oZWFydGJlYXQnCiAgICBtYXRjaDoKICAgICAgYWxlcnRuYW1lOiBEZWFkTWFuc1N3aXRjaAogICAgZ3JvdXBfd2FpdDogMzBzCiAgICBncm91cF9pbnRlcnZhbDogMzBzCiAgICByZXBlYXRfaW50ZXJ2YWw6IDMwcwoKCiMgSW5oaWJpdGlvbiBydWxlcyBhbGxvdyB0byBtdXRlIGEgc2V0IG9mIGFsZXJ0cyBnaXZlbiB0aGF0IGFub3RoZXIgYWxlcnQgaXMKIyBmaXJpbmcuCiMgV2UgdXNlIHRoaXMgdG8gbXV0ZSBhbnkgd2FybmluZy1sZXZlbCBub3RpZmljYXRpb25zIGlmIHRoZSBzYW1lIGFsZXJ0IGlzIAojIGFscmVhZHkgY3JpdGljYWwuCmluaGliaXRfcnVsZXM6Ci0gc291cmNlX21hdGNoOgogICAgc2V2ZXJpdHk6ICdjcml0aWNhbCcKICB0YXJnZXRfbWF0Y2g6CiAgICBzZXZlcml0eTogJ3dhcm5pbmcnCiAgIyBBcHBseSBpbmhpYml0aW9uIGlmIHRoZSBhbGVydG5hbWUgaXMgdGhlIHNhbWUuCiAgZXF1YWw6IFsnYWxlcnRuYW1lJywgJ3JjX2VkZ2VpZCcsICdzZXJ2aWNlJ10KCgpyZWNlaXZlcnM6Ci0gbmFtZTogZGVhZG1hbnNzd2l0Y2gKCgoKLSBuYW1lOiAndGVhbS1vcHMtZ2VuaWUnCiAgb3BzZ2VuaWVfY29uZmlnczoKICAtIHNlbmRfcmVzb2x2ZWQ6IHRydWUKICAgIHRlYW1zOiBPcGVyYXRpb25zLVN0YWdpbmcKICAgIHRhZ3M6ICd7eyByYW5nZSAuQWxlcnRzIH19e3sgLkxhYmVscy5WYWx1ZXMgfCBqb2luICIsIiB9fXt7ZW5kfX0nCiAgICBwcmlvcml0eTogJ3t7IHJhbmdlIC5BbGVydHMgfX17eyBpZiBlcSAuTGFiZWxzLnNldmVyaXR5ICJjcml0aWNhbCJ9fVAxe3tlbHNlfX1QM3t7ZW5kfX17e2VuZH19JwoKLSBuYW1lOiAnb3BzZ2VuaWUtaGVhcnRiZWF0JwogIHdlYmhvb2tfY29uZmlnczoKICAtIHVybDogJ2h0dHBzOi8vYXBpLm9wc2dlbmllLmNvbS92Mi9oZWFydGJlYXRzL3Byb21ldGhldXMuZW1wOXoyOC5lYXN0LXVzMS5henVyZS5lZGdlLnN0YWdlLnJhZmF5LWVkZ2UubmV0LnN0YWdpbmcvcGluZz9hcGlLZXk9MTI3YWNiNTMtMjJiYi00OWQwLThjYjgtZTk0YmJiNDVhZmYyJwogICAgc2VuZF9yZXNvbHZlZDogdHJ1ZQoK + kind: Secret + metadata: + annotations: + rafay.dev/overridedBy: cluster/default-override-eks-london-1118 + name: alertmanager-main + namespace: rafay-infra + type: Opaque + - name: kube-state-metrics-service-account + object: + apiVersion: v1 + kind: ServiceAccount + metadata: + name: kube-state-metrics + namespace: rafay-infra + - name: kube-state-metrics-cluster-role + object: + apiVersion: rbac.authorization.k8s.io/v1 + kind: ClusterRole + metadata: + name: kube-state-metrics + rules: + - apiGroups: + - "" + resources: + - configmaps + - secrets + - nodes + - pods + - services + - resourcequotas + - replicationcontrollers + - limitranges + - persistentvolumeclaims + - persistentvolumes + - namespaces + - endpoints + verbs: + - list + - watch + - apiGroups: + - extensions + resources: + - daemonsets + - deployments + - replicasets + verbs: + - list + - watch + - apiGroups: + - apps + resources: + - statefulsets + - daemonsets + - deployments + - replicasets + verbs: + - list + - watch + - apiGroups: + - batch + resources: + - cronjobs + - jobs + verbs: + - list + - watch + - apiGroups: + - autoscaling + resources: + - horizontalpodautoscalers + verbs: + - list + - watch + - apiGroups: + - authentication.k8s.io + resources: + - tokenreviews + verbs: + - create + - apiGroups: + - authorization.k8s.io + resources: + - subjectaccessreviews + verbs: + - create + - name: kube-state-metrics-cluster-role-binding + object: + apiVersion: rbac.authorization.k8s.io/v1 + kind: ClusterRoleBinding + metadata: + name: kube-state-metrics + roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: kube-state-metrics + subjects: + - kind: ServiceAccount + name: kube-state-metrics + namespace: rafay-infra + - name: kube-state-metrics-role + object: + apiVersion: rbac.authorization.k8s.io/v1 + kind: Role + metadata: + name: kube-state-metrics + namespace: rafay-infra + rules: + - apiGroups: + - "" + resources: + - pods + verbs: + - get + - apiGroups: + - extensions + resourceNames: + - kube-state-metrics + resources: + - deployments + verbs: + - get + - update + - apiGroups: + - apps + resourceNames: + - kube-state-metrics + resources: + - deployments + verbs: + - get + - update + - name: kube-state-metrics-rolebinding + object: + apiVersion: rbac.authorization.k8s.io/v1 + kind: RoleBinding + metadata: + name: kube-state-metrics + namespace: rafay-infra + roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: kube-state-metrics + subjects: + - kind: ServiceAccount + name: kube-state-metrics + namespace: rafay-infra + - name: node-exporter-serviceaccount + object: + apiVersion: v1 + kind: ServiceAccount + metadata: + name: node-exporter + namespace: rafay-infra + - name: node-exporter-cluster-role + object: + apiVersion: rbac.authorization.k8s.io/v1 + kind: ClusterRole + metadata: + name: node-exporter + rules: + - apiGroups: + - authentication.k8s.io + resources: + - tokenreviews + verbs: + - create + - apiGroups: + - authorization.k8s.io + resources: + - subjectaccessreviews + verbs: + - create + - name: node-exporter-cluster-role-binding + object: + apiVersion: rbac.authorization.k8s.io/v1 + kind: ClusterRoleBinding + metadata: + name: node-exporter + roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: node-exporter + subjects: + - kind: ServiceAccount + name: node-exporter + namespace: rafay-infra + - name: prometheus-adapter-service-account + object: + apiVersion: v1 + kind: ServiceAccount + metadata: + name: prometheus-adapter + namespace: rafay-infra + - name: prometheus-adapter-cluster-role + object: + apiVersion: rbac.authorization.k8s.io/v1 + kind: ClusterRole + metadata: + name: prometheus-adapter + rules: + - apiGroups: + - "" + resources: + - nodes + - namespaces + - pods + - services + verbs: + - get + - list + - watch + - name: prometheus-adapter-cluster-role-binding + object: + apiVersion: rbac.authorization.k8s.io/v1 + kind: ClusterRoleBinding + metadata: + name: prometheus-adapter + namespace: rafay-infra + roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: prometheus-adapter + subjects: + - kind: ServiceAccount + name: prometheus-adapter + namespace: rafay-infra + - name: prometheus-adapter-cluster-role-binding-delegator + object: + apiVersion: rbac.authorization.k8s.io/v1 + kind: ClusterRoleBinding + metadata: + name: resource-metrics:system:auth-delegator + roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: system:auth-delegator + subjects: + - kind: ServiceAccount + name: prometheus-adapter + namespace: rafay-infra + - name: prometheus-adapter-cluster-role-server-resources + object: + apiVersion: rbac.authorization.k8s.io/v1 + kind: ClusterRole + metadata: + name: resource-metrics-server-resources + rules: + - apiGroups: + - custom.metrics.k8s.io + resources: + - '*' + verbs: + - '*' + - name: prometheus-adapter-configmap + object: + apiVersion: v1 + data: + config.yaml: | + resourceRules: + cpu: + containerQuery: sum(rate(container_cpu_usage_seconds_total{<<.LabelMatchers>>}[1m])) by (<<.GroupBy>>) + nodeQuery: sum(rate(container_cpu_usage_seconds_total{<<.LabelMatchers>>, id='/'}[1m])) by (<<.GroupBy>>) + resources: + overrides: + node: + resource: node + namespace: + resource: namespace + pod_name: + resource: pod + containerLabel: container_name + memory: + containerQuery: sum(container_memory_working_set_bytes{<<.LabelMatchers>>}) by (<<.GroupBy>>) + nodeQuery: sum(container_memory_working_set_bytes{<<.LabelMatchers>>,id='/'}) by (<<.GroupBy>>) + resources: + overrides: + node: + resource: node + namespace: + resource: namespace + pod_name: + resource: pod + containerLabel: container_name + window: 1m + kind: ConfigMap + metadata: + name: adapter-config + namespace: rafay-infra + - name: prometheus-adapter-role-binding-auth-reader + object: + apiVersion: rbac.authorization.k8s.io/v1 + kind: RoleBinding + metadata: + name: resource-metrics-auth-reader + namespace: kube-system + roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: extension-apiserver-authentication-reader + subjects: + - kind: ServiceAccount + name: prometheus-adapter + namespace: rafay-infra + - name: prometheus-k8s-edge-creds-configmap + object: + apiVersion: v1 + data: + ca.crt: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUZtekNDQTRPZ0F3SUJBZ0lVVkVPcmZYNzlOYk04QlViOHhUbnR0eGFxWWljd0RRWUpLb1pJaHZjTkFRRU4KQlFBd1pERUxNQWtHQTFVRUJoTUNWVk14Q3pBSkJnTlZCQWdUQWtOQk1SSXdFQVlEVlFRSEV3bFRkVzV1ZVhaaApiR1V4R3pBWkJnTlZCQW9URWxKaFptRjVJRk41YzNSbGJYTWdTVzVqTGpFWE1CVUdBMVVFQXd3T2NtRm1ZWGxmCmFXNW1jbUZmWTJFd0hoY05NVGd3TWpFMk1EQXhNakF3V2hjTk1qTXdNakUxTURBeE1qQXdXakJrTVFzd0NRWUQKVlFRR0V3SlZVekVMTUFrR0ExVUVDQk1DUTBFeEVqQVFCZ05WQkFjVENWTjFibTU1ZG1Gc1pURWJNQmtHQTFVRQpDaE1TVW1GbVlYa2dVM2x6ZEdWdGN5QkpibU11TVJjd0ZRWURWUVFEREE1eVlXWmhlVjlwYm1aeVlWOWpZVENDCkFpSXdEUVlKS29aSWh2Y05BUUVCQlFBRGdnSVBBRENDQWdvQ2dnSUJBTHdQdk9UME5JanBLV0YraWVieVlYakUKUkMwcGpvYmRUTmVHSndzQmlvbmQwMVR4NmxxbEtFS1k3Z1dpQUo2YUxETm5LY0FyR3lqa3N4UGl3MUZtVWRYZwo5YnVreDNkRWJLcU5ZV3p3dmFsSEUwZVZzeEZ1SlBoZkVBYmxLYWN2NDVRYTJrWHBDUXhJMWdURFFicW1SK2pGCkFqaENHbWRhZmJJTVNaS1F1VnphNEN0MnR6eHM1RUxBQjByK1NDajVkSXU5YUpsYld6cTh0ejRZc042VHpDMDEKcDV1UlVORTlQSDM1UVQ0bXRMSk54dFlrZVEvL1pOcGNXelRxM3dvNFQ2ZkZSNnRJcys1WXRrTWhCRW5ybDR2awo5ank3L3QyZUQ3aDllSnRKTXRKb3pGR1hFNG0ydDhnOEc0eEVRSEZNK1ZyMlZpcVB0YnVraks3ekxERURGUkhFCnZnNmxWM2hPTEphRWRLY05WUGgrdXlkQmpYbHdSdHVHZE5sYlhhdGh2cDlicksvcEI0bldZckV1NnJUaFFVMnoKVVN4SHNkLzRoQU1yZUlIL1lQQnUzeDVRaCtRL3NTTEc3dGUwR1ZUdCt2c0JjTkN5cGhlQksxUmZOMi9rNWVxQwpHVW9GZjNsVU1VcE1BemFGdTF5ZTU4blAwU2RyQkdmM2IzVU80eW8rUU44Wk5ZdUVHZUJLKzdDZU9PSzhrbkVlCjZvT29JcDE0SDVQYy9PTUFYUlNvNUR3cUhxNUJqa2IyOVRINzUwVk5KQmtORVVyWkhORUJaQmh0V1NhcjZ5TGwKYWt3TXJOS3FJR3BFdUVXQk1kSmMvdUlJYWIzK29wSnZXQnVtcWFGcUpnK0JrL2NUSTh3NEM4YVpiWkFVckk2TwplUENZZkFSM242QTBwOFlsb0k3SkFnTUJBQUdqUlRCRE1BNEdBMVVkRHdFQi93UUVBd0lCQmpBU0JnTlZIUk1CCkFmOEVDREFHQVFIL0FnRUNNQjBHQTFVZERnUVdCQlRWdkxpUWs4a0dHTkxTS25VN0g1anRmd0lKMlRBTkJna3EKaGtpRzl3MEJBUTBGQUFPQ0FnRUFuVmlIRks4ZGZiNWhuaGNobVB5YU9xM3I3VWUvQTlsTkQ4cXdneGIwYVNTeAozRm5yQnJXMEVZckN2ajNXTkFqVG5NUnhjVkc5RlNXVm1sRVBodVBSTkQwcitIUWpKNGJBTGRkL09yU2JLOWFDCm14cnpacitMaXFrbmo3YlQxVGZmSDJEZUlQdGl5d1l1eEw0T2VjV0hXT29YaGVmWXgrVUViSmJNMnpVeXd0bGsKRUpXT3RSZGZGM2x4c0JJemx1L3cxYXl1eGhTLzdzcFVVbG1kUHBUZUhMUkM2K3NRM1lreC8zT1dJWm9hRWdpNwpzM2xCajdGYmpLaldVNDczKytrN1dOOGFERDRMRnIvZGdsNjQ3ZGVBdEJGU2IvYUJqVVkyK1BPYU1sK2xVZTF6CjVWR2x1T0lNTDU3TXhWR0lOdXJpekxwZldZcG5ydkNjRzRQd1d2a2N1RGt1K29EbTF4OTNsaHkyM1ZwUGh3Rk0KMUtYZldhVklGeXBjSFRxZW8rS3R4OUpuNjF2RGd5amFqQ0RmODA0WVMwaTRmZVQ1VzZ4cmdBMEQxRmxHL2NxUgpqUXRHRHIrMUpLbDR1VWl0bzNtTU80T1gzVktRSnhCbUoxa2pOZGZkTXNCcjg2aDNRbG5KYnNBU0ZiVFZtS21zCjVWS3RBV1cwTkV3bUFsWG0rQXZtSE9aMXd0ZlJiR2V3dXVpaDNmTDhISGdQbEUrZmtaUjVwWUVtVFd3UmZ3KysKNC9pVGNEWGg3MkNhVUZ6cWlwUmNUdGJhcHZvZjRobGpuZi8rWEx3Q0RLUWN5UVN4ZEdhaEtqT3NGNW40dTdnZgpmaWZBa1g0VExqV0g1Q2liSXBQNUw1TDdXSVhpUjI0N3paWnpYOE4ySEdCMHZnQ1A1Y1Nsb0Vyb1U5V2xVamM9Ci0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K + client.crt: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUdoRENDQkd5Z0F3SUJBZ0lRVVdtOWVPZjFPbXY0VS9meTQ5bk0rVEFOQmdrcWhraUc5dzBCQVFzRkFEQmsKTVFzd0NRWURWUVFHRXdKVlV6RUxNQWtHQTFVRUNCTUNRMEV4RWpBUUJnTlZCQWNUQ1ZOMWJtNTVkbUZzWlRFYgpNQmtHQTFVRUNoTVNVbUZtWVhrZ1UzbHpkR1Z0Y3lCSmJtTXVNUmN3RlFZRFZRUUREQTV5WVdaaGVWOXBibVp5CllWOWpZVEFlRncweE9URXhNVGd5TVRBM01ESmFGdzB5TkRFeU1Ua3lNVEEzTURKYU1JSGpNUXN3Q1FZRFZRUUcKRXdKVlV6RUxNQWtHQTFVRUNCTUNRMEV4RWpBUUJnTlZCQWNUQ1ZOMWJtNTVkbUZzWlRFNk1EZ0dBMVVFQ2hNeApaekk1Ykc5bE1pNXdjbWwyWVhSbExuQnJkbmQyTW00dVpXUm5aUzV6ZEdGblpTNXlZV1poZVMxbFpHZGxMbTVsCmRERXJNQ2tHQTFVRUN4TWlkMjl5YTJ4dllXUXVZMjl5WlM1emRHRm5aUzV5WVdaaGVTMWxaR2RsTG01bGRERksKTUVnR0ExVUVBeE5CZDI5eWEyeHZZV1F0WTJ4cFpXNTBMbWN5T1d4dlpUSXVjSEpwZG1GMFpTNXdhM1ozZGpKdQpMbVZrWjJVdWMzUmhaMlV1Y21GbVlYa3RaV1JuWlM1dVpYUXdnZ0lpTUEwR0NTcUdTSWIzRFFFQkFRVUFBNElDCkR3QXdnZ0lLQW9JQ0FRRDJmb2syTVZxeEprQ25vYzRTQ1l1RnQ3MXZoWkFJVmJ5YVNTMVNnUkxxYWFxOS9FdmEKYWJSVkVxL3NsT2dDSkhOWjRlQkx3TnhJbWtEMGNISWlUTGp3cGlhWCtiV1MxNTExcFNnS1YzWUVGKzYwYUxBOApGdDladjNCZUZOY0llZHlPQ2YzMGpsV1g4ajQ4eU9RSXV0Q2lFWlVuWUp5WlliQlZBczRBTUViT3A4Y2ZTeGZVCkRmMXdrVEs5MTVwSm5VY3p4TnNrbDdndnRQTmpPc1F2SmkzV2QyU3RSS0czaWNxVEtNUUYwTGpoOWM4cS9STmsKUExUQnpBSVg4emdZYnJVU2xKSVMraHBtVXVQLys5RnhrUHRHdFp2dnNXamlVclFCQ0I4WkpoTmRzeWpVWnJkNAprM05zYW1oL1FTdjltRzJDQW9zYU8rTFAzc0haUnh0TGhMZERlaGlrc3p0NWo3K0krRTVZNEw5bm1PbE1HUG1yCjhBNUIvVWF5RTBQYzl6VlFHSDlnL1V5MVhVZEdhaTlGSmEvOE9SMndtVHJ5dHR5QythZnUveXh4VWdyRWxtVVQKZ1RYNmRLb08yakJHRFNqVGVidlMyNDZKcE1sODJPKzdFTzFSOFlNakxHNktzT3lnQ24zK0J1UkdDNUphY1J1NQo5Sm4zZHM3Q0szOGFkNTdLUWYwYkIxdWhyN2xqODY0SU8xZURoWkw3UGpCOEdtb2VSVGU4M0pkTktnajZJWFNXCnRSenZ1QUFlUjhlT2N4eUlmbnFZYjlGajF5emJlY2RDM2J6OEsxZE5RQnU1YmdtMGVqejZBTytkNlJ3bzh0WkUKWjdrc0JXUWJIeXF0Y1JGb3g1RllDOEpYR1g2QTZ4N0JBSVdNY2NoUlZiVzJ4ZVpoTEVsbi9EQXdtUUlEQVFBQgpvNEd4TUlHdU1BNEdBMVVkRHdFQi93UUVBd0lGb0RBZEJnTlZIU1VFRmpBVUJnZ3JCZ0VGQlFjREFnWUlLd1lCCkJRVUhBd0V3RGdZRFZSME9CQWNFQlFFQ0F3UUZNQjhHQTFVZEl3UVlNQmFBRk5XOHVKQ1R5UVlZMHRJcWRUc2YKbU8xL0FnblpNRXdHQTFVZEVRUkZNRU9DUVhkdmNtdHNiMkZrTFdOc2FXVnVkQzVuTWpsc2IyVXlMbkJ5YVhaaApkR1V1Y0d0MmQzWXliaTVsWkdkbExuTjBZV2RsTG5KaFptRjVMV1ZrWjJVdWJtVjBNQTBHQ1NxR1NJYjNEUUVCCkN3VUFBNElDQVFBUVo3WS9xSUttRFRQUnYxS1BrTHRvQ2VLbmZIN2FBL1ppM05LTzBsOFRCK052cWN3dUhnL04KdXVBNjhmbjlMdXNFZkNJelNBV0Zid3M5Rm5mYmgvZHFMU3R6V1VmeXphYVprY2N6OVMvZ0ZkTjlrKzBPV3ZBNQo5bDUrcXo4YXZsNWhiM3I2TVJKdTV3WUx4a0NCcUFSOElkb0VvcjlZRkRXTXhDR2ozUFNkVTBybHJ4aWRQWU5zClBadnovMml2anJtRFI4Nk9GcjZKbjVkRVR6U3pOTVUxaGlVbldLUzlTSzgyNnVCbHJYZmdOYmhXVGdwLzc5STQKL1RBMnNRQlBZbGs1ejJFWnliMG9taVB0YlhORE9ERjI2L1JFN2JjeWJZRnB4NFB1K1psSC9EUnFSbjNOaGx5eQpJTDl3VmFXeTJRR0dQUFNwOVFmZzlHYVNkaEtoSnllTElGeEJySDBEbW1uR0FaczZwZHR0NWhMZzhmQ0syYnJzCkhtOExRanFITk5XSTFUUHkvS0VRaXhFQzI3b3ErWGRFY2NHWnZjUjVIUUF6eDgramJmOW9hVm0rb256dlF5MHIKeXZtR216V2JXSzdrS3d6V1pockRWb0NlN2pQQ3graUF4bGZ2OVdoMjIwMlljdW5WYUs0M2M5Tnl4WkZTRVE4RwpyK3J3RHpuODFJV1NiUG9FZTlHK3dCZUFGNk5wWUlVRCtWdjY0cERlRS9ZMFR2OFBGdkJyMXd1ZG1uaTBMOFVoCmZJVjI3aXhMOXh3eWRNMUZjdWsrWGprVGphTHd6NmRnUHl6UUw4UkpnSFZ3N3RnZW5weXR3amhTRjU5NjlvNDcKVlR4dXhxV2NxT2NpMWRoMWl0em9VYzJEWmJXOTdtNWxsb0JlOGlFVDFIdjlLSjd2eStGb1Z3PT0KLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo= + client.key: LS0tLS1CRUdJTiBSU0EgUFJJVkFURSBLRVktLS0tLQpNSUlKS0FJQkFBS0NBZ0VBOW42Sk5qRmFzU1pBcDZIT0VnbUxoYmU5YjRXUUNGVzhta2t0VW9FUzZtbXF2ZnhMCjJtbTBWUkt2N0pUb0FpUnpXZUhnUzhEY1NKcEE5SEJ5SWt5NDhLWW1sL20xa3RlZGRhVW9DbGQyQkJmdXRHaXcKUEJiZldiOXdYaFRYQ0huY2pnbjk5STVWbC9JK1BNamtDTHJRb2hHVkoyQ2NtV0d3VlFMT0FEQkd6cWZISDBzWAoxQTM5Y0pFeXZkZWFTWjFITThUYkpKZTRMN1R6WXpyRUx5WXQxbmRrclVTaHQ0bktreWpFQmRDNDRmWFBLdjBUClpEeTB3Y3dDRi9NNEdHNjFFcFNTRXZvYVpsTGovL3ZSY1pEN1JyV2I3N0ZvNGxLMEFRZ2ZHU1lUWGJNbzFHYTMKZUpOemJHcG9mMEVyL1podGdnS0xHanZpejk3QjJVY2JTNFMzUTNvWXBMTTdlWSsvaVBoT1dPQy9aNWpwVEJqNQpxL0FPUWYxR3NoTkQzUGMxVUJoL1lQMU10VjFIUm1vdlJTV3YvRGtkc0prNjhyYmNndm1uN3Y4c2NWSUt4SlpsCkU0RTErblNxRHRvd1JnMG8wM203MHR1T2lhVEpmTmp2dXhEdFVmR0RJeXh1aXJEc29BcDkvZ2JrUmd1U1duRWIKdWZTWjkzYk93aXQvR25lZXlrSDlHd2Rib2ErNVkvT3VDRHRYZzRXUyt6NHdmQnBxSGtVM3ZOeVhUU29JK2lGMApsclVjNzdnQUhrZkhqbk1jaUg1Nm1HL1JZOWNzMjNuSFF0MjgvQ3RYVFVBYnVXNEp0SG84K2dEdm5la2NLUExXClJHZTVMQVZrR3g4cXJYRVJhTWVSV0F2Q1Z4bCtnT3Nld1FDRmpISElVVlcxdHNYbVlTeEpaL3d3TUprQ0F3RUEKQVFLQ0FnQk1nMVNtTE1YQkRXV3VZeXhyTHVsUE5ZeW83R1djSUxqdGoxOXhKNzJ1WStSckdzQ1U2SkRnZzI5MgpXWFozQzhkK2svMmlwaGY2dFY4S1FVazhXbUpoMk1GTUZXZ0dUOFdCdWlWbXFHVnF1ZDhQd3h0Slc3UXkwSmpaCnExQmdRaXR6TDZqVDI4YTM1cXJwQlZhN1d2bmVCT1V1bHUrbE1NeWlacjk1RVlNNUxKMURtblNvRHp1blVIclcKc1BFa2ZweVdkam1yN3lodUxwWUtMRGl2aGdOZWVpc1hHYUcxTGlGaWNwbitVQjdEalNDa2NIQXZnaVI5cjR6SwowR1dPTi9jZThGMHpaTTBERENIWDJOdlhpN0JqNzRXYTdvL25DTkwxS3djME1EeDhybHN6S3pzeVExcmx3VlgwCmdrOWNaWTlBZHZla3lnZ0tqRlBSMVIrazNtcGYvTGNpREhDUXA3MVhaemNjZm5RbmMwVmpDUG1Zc1RKTHdtU2MKQzJwbGpzN2hzUnR4S0RFYWlNRURHSmZXODRZeVFWMFV2WnNEM0N2djdvVTArWmVrNEFUTE1XRSttbEtoN01qTgptMUMzTFlrOHdGaExwRkNDaVVhc043azMzQ3czQThIb2Jhbi92dld2VEgvTXkxVEpQeHBpYm5HUGkxN0EreGhKCnZrSW1ra3pzYTRJZDQ0VTRRU3g1a0pDcVczMldWaG41YnNLcWRWcGZtazF6bmFzN2g3a1JzZUs5dEcwZGMwajAKdjJtV3puYlloVDRmcFhKUkFiV1lkZ3g2NjNsUzdwR1pxVkJYZ1FnU0doYk5UZ3FTWElJQkhsVnVWWW1md2pMcgpSOUNmTC8wYWY1YldOeHdlSUhTdTVMTFU1UldCdTJLQ01WRU9jb21KUGVabmFtZkNjUUtDQVFFQS9NREI1Y09pCnR0MFdMZnFIQ0RGcUVjamtjZmNFUXdyWlM0dWsvaURkZ0dTK0VXd2FKeG1FazRnWGNTUFJ3OW1RTmtFdDZ6OWMKMU1iVHRDeFF6MVMzSFNBWFRObmJPbW4wT1VGK3FWWDBjSkFDNENzb28wSW01dHhrYkQvbHkwYURrdVNoOHZqeApHMy9PQjJadEFDZTh5Y3NHV0RkQ3dHTHphVTNlZUNjbno3aVVTTzFoU01EaEY0cXhNeUVtdUwwd2VFY1ZXTTZkCm56b2FXMjlENm8xUHBJcGd2TlZNaFRWeHc1cGVEV1E0ZEZnR3BoVGJhekVtRzZKOWJJOGh2Y1RXUDZMVUNGUloKNU1SdUJRaTZMQW8xTGVSWjhsaDU2UVZHOHhCN2QrbmlrWGhyUGc1ZzlzK21TMm4rb2lUTWJoVHBqYTEyK293aAoyVUM3RkV4SmVJTEtWUUtDQVFFQStha3lBQSszYnVuSWZvT0s1dHJPTGtqSW54eTFXNEYzRzJoeGFub2hrSTV5ClpDSTE5MGZPa2dFdFJDK0pDUFFpelV5Q0pIZEZBSlFuaFNUK3FPVU1VcDZhVlZSblFqMFFueERsbkZyOFlEbXoKTWlYUUUvcUFtQ0liT2REc0VkZHhEdWwwTGhjcHY2TzhCbk5tOUt1OTJQNnF3UXJZK0ttdHNIMkxTakVEdWhiNgpZYUVVbUNWWVFRcFZVR2puV09aSTQwbGNwTWxWWFIwTkxlTlQveTNHK0RlTExHcHcvcUI3SkxQNVI3WGZjRjZRCkhWbkNkYmh2VUYyME9GSWc4d1A4RjUzNFdDaHBmNGtxU3R3S3R6eWN4MHRSbTkrNXE1ZE13VUEyZW1SSG8wMmEKNFl2YUlGVWZBcEkxT2pHRkJ1T1I1MXgxcU9FVEhIRW1mMGkvQS9JWk5RS0NBUUJUeGlmK1dkdWl0S0RYV0lSTgpLT081UlZiQ2wxY29TWDVBVmVhMy9IaXVSN1hmM0c3R3F1U1FhYmtyWE8zMzlqS2dhUFlwVlBVVjZWamVEUm96CnZpWjdWdG1pTlVzK2owUE5mbkhXK3BCc2hxOE5VZ0RFSy9iczZmdTNEVzdDODNwRXc5Y1J5NFZPMGd1ZDFFc28KbEFNMDkwQUJHVC9jdUc5cFpjL3BEMEZZemhzSUdQWDN3VVphSVRRZWVFeDNTdTIzMEFlNVNiSmd4a2RhS3dUZAp4enl3a3RVQmdjazlGYnZCVTNiOUJVelk4eHd4REJTMThMSnEwbTZ6L3JUMlN6bWdHZjRoVEtRRytUeG1Hc0JxClBHL242Qm9RQTFkVTd0VFhWNDAwNzZhVEJOQzIzdGt3dFI2dlBGQ1R1Wkt3b2VuUGRjRkx4Z3FxRVpSd1krQ3UKT3R1SkFvSUJBUUNrMHZvcXBqV2hLUUR2M1dKZnBNY0lNWThaMUxjNjBVOVVMZkRxcmZUbzNkSlJuM0JuYitYRgo2TGI4MURFeFV4U0MyMmIwTWpYQSt3N1lUU00vVi9CNXZ6SCs4YmsyTnVCNVU0dHpYWEpQQ09qd1M1eURCQmZQCjJIeUhBQkpLZVNTd0JwcG9MMnlsazdCM3hjcUw3N0pueDBIdUxuNHVOTDl4eklDZ0c1bnRTbXhFOWphRmQrbzcKRGxwaXVzODVsdGM2RHQzMkFPRzFsbzl6NHlnNlNQdWFOZmxRK25qYzhoQTZuQU1RUDlkaTlWdEp0VSszcm1yMgo4TlloZEw5Q0VUaG1VeWw0OGowc01OOVdDczJjU1l6cjJpTG51SjE0MW11YkRneXBZdmtVckJCN3BYdjlhcFVOCmVuOWZpdi9iRzNUZy9ON0Uvc3RDTk1XSXRQcyszSitkQW9JQkFBWEgvZTdKVGdwdGpUYWRhL25LZS8vYTdJb1gKOEpsNm1DQjVxRTY0bmVyM1pxODkvYmlUd25MVjVCakZSeEh4WHhPeEtmYnIwTGRraXIyUHZRbEt6ZnJtbi85NApQRksyeDRESVliSkJINFZEQlZRblN5M0s2WEtSMnoyUnJpZHBnVDhKQjkydGIvNTFZK21hZXFHVjU5b0VoNEcrCjlRYUtRc0R0Ry8vZWdOdDlyVEl6d1VDakF2dU00TW9XWnJTd3NRUXQ3czVJd0lhMGpKVGZZRjhya3djWGxiWGEKTXBtU2VQaEQwSXM5MDROZVBoZ3ZYS2RPQTh6QWtPR3k2TmtMekZDbnFVSkNlV0dZZ0pXMWtONUFqa3JabHFxcQpML1MrMGRSeHdhQ3RKNzVoN0l0SUNnQlh5WUp4TUk4QkxWdWdRSEc0RlV0VmdjNEt3UldOa2VJaGwrbz0KLS0tLS1FTkQgUlNBIFBSSVZBVEUgS0VZLS0tLS0K + kind: Secret + metadata: + annotations: + rafay.dev/overridedBy: cluster/default-override-eks-london-1118 + name: edge-creds + namespace: rafay-infra + type: Opaque + tasklet: + metadata: + creationTimestamp: null + finalizers: + - cluster.rafay.dev.v2.predelete + name: v1-prometheus + namespace: rafay-infra + spec: + init: + - name: prometheus-k8s-prometheus + object: + apiVersion: monitoring.coreos.com/v1 + kind: Prometheus + metadata: + annotations: + rafay.dev/overridedBy: cluster/default-override-eks-london-1118 + labels: + prometheus: k8s + name: k8s + namespace: rafay-infra + spec: + alerting: + alertmanagers: + - name: alertmanager-main + namespace: rafay-infra + port: web + baseImage: quay.io/prometheus/prometheus + evaluationInterval: 1m + externalLabels: + deployment_env: staging + rc_edgeid: g29loe2.private.pkvwv2n.edge.stage.rafay-edge.net + externalUrl: https://prometheusrelay.ops.stage.rafay-edge.net + nodeSelector: + beta.kubernetes.io/os: linux + priorityClassName: rafay-cluster-critical + remoteWrite: + - queueConfig: + batchSendDeadline: 10s + capacity: 2000 + maxBackoff: 5m + maxRetries: 15 + maxSamplesPerSend: 1000 + maxShards: 100 + minBackoff: 30s + minShards: 1 + remoteTimeout: 60s + tlsConfig: + caFile: /etc/prometheus/secrets/edge-creds/ca.crt + certFile: /etc/prometheus/secrets/edge-creds/client.crt + keyFile: /etc/prometheus/secrets/edge-creds/client.key + serverName: influxdb01.core.stage.rafay-edge.net + url: https://influxdb01.core.stage.rafay-edge.net/api/v1/prom/write?db=monitoringdb&rp=shortterm&u=prometheus_svc&p=Rafay!98 + writeRelabelConfigs: + - action: keep + regex: rcloud.*|kube_daemonset_metadata_generation|kube_deployment_metadata_generation|node_cpu_seconds_total|kube_pod_container_status_running|kube_pod_container_resource_requests_cpu_cores|kube_pod_container_resource_limits_cpu_cores|node:node_num_cpu:sum|:node_memory_MemFreeCachedBuffers_bytes:sum|:node_memory_MemTotal_bytes:sum|node_memory_MemTotal_bytes|kube_pod_container_resource_requests_memory_bytes|kube_pod_container_resource_limits_memory_bytes|amespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate|namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate|container_memory_rss|namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate|node:node_cpu_utilisation:avg1m|node:node_cpu_saturation_load1:|kube_pod_info|node:node_memory_utilisation:|node:node_memory_utilisation:ratio|node:node_memory_swap_io_bytes:sum_rate|node:node_disk_utilisation:avg_irate|:kube_pod_info_node_count:|node:node_disk_saturation:avg_irate|node:node_net_utilisation:sum_irate|node:node_net_saturation:sum_irate|node_filesystem_size_bytes|node_filesystem_avail_bytes|node_namespace_pod:kube_pod_info:|node_load1|node_load5|node_load15|node_memory_MemFree_bytes|node_memory_Buffers_bytes|node_memory_Cached_bytes|node_disk_read_bytes_total|node_disk_written_bytes_total|node_disk_io_time_seconds_total|node:node_filesystem_usage:|node_network_receive_bytes_total|node_network_transmit_bytes_total|container_memory_usage_bytes|kube_pod_container_resource_requests_memory_bytes|container_cpu_usage_seconds_total|container_network_receive_bytes_total|container_network_transmit_bytes_total|kube_statefulset_replicas|kube_statefulset_status_replicas|kube_statefulset_status_replicas_ready|kube_statefulset_status_replicas_current|kube_statefulset_status_replicas_updated|node_boot_time_seconds|kube_node_info|kube_pod_container_info|kube_statefulset_metadata_generation|kube_statefulset_status_observed_generation|kubelet_volume_stats_capacity_bytes|kubelet_volume_stats_available_bytes|kubelet_volume_stats_used_bytes|kube_node_status_condition|fluentd_input_status_num_records_total|fluentd_output_status_buffer_queue_length|fluentd_output_status_num_errors|fluentd_output_status_emit_count|fluentd_output_status_buffer_queue_length|fluentd_output_status_retry_count|fluentd_output_status_rollback_count|fluentd_output_status_buffer_total_bytes|fluentd_output_status_num_records_total + replacement: $1 + sourceLabels: + - __name__ + replicas: 1 + resources: + limits: + cpu: 400m + memory: 3Gi + requests: + cpu: 200m + memory: 600Mi + retention: 3h + ruleSelector: + matchLabels: + prometheus: k8s + role: alert-rules + scrapeInterval: 1m + secrets: + - edge-creds + securityContext: + fsGroup: 2002 + serviceAccountName: prometheus-k8s + serviceMonitorNamespaceSelector: + matchNames: + - rafay-infra + serviceMonitorSelector: + matchExpressions: + - key: k8s-app + operator: Exists + storage: + volumeClaimTemplate: + metadata: + name: data + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 15Gi + version: v2.7.1 + - name: prometheus-k8s-servicemonitor + object: + apiVersion: monitoring.coreos.com/v1 + kind: ServiceMonitor + metadata: + labels: + k8s-app: prometheus + name: prometheus + namespace: rafay-infra + spec: + endpoints: + - interval: 30s + port: web + selector: + matchLabels: + prometheus: k8s + - name: alertmanager-servicemonitor + object: + apiVersion: monitoring.coreos.com/v1 + kind: ServiceMonitor + metadata: + labels: + k8s-app: alertmanager + name: alertmanager + namespace: rafay-infra + spec: + endpoints: + - interval: 30s + metricRelabelings: + - action: keep + regex: alertmanager_config_hash|alertmanager_config_last_reload_successful|alertmanager_cluster_members + sourceLabels: + - __name__ + port: web + selector: + matchLabels: + alertmanager: main + - name: alertmanager-alertmanager + object: + apiVersion: monitoring.coreos.com/v1 + kind: Alertmanager + metadata: + labels: + alertmanager: main + name: main + namespace: rafay-infra + spec: + baseImage: quay.io/prometheus/alertmanager + nodeSelector: + beta.kubernetes.io/os: linux + replicas: 1 + securityContext: + fsGroup: 2000 + runAsNonRoot: true + runAsUser: 1000 + serviceAccountName: alertmanager-main + version: v0.15.3 + - name: kube-state-metrics-servicemonitor + object: + apiVersion: monitoring.coreos.com/v1 + kind: ServiceMonitor + metadata: + labels: + k8s-app: kube-state-metrics + name: kube-state-metrics + namespace: rafay-infra + spec: + endpoints: + - bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token + honorLabels: true + interval: 30s + port: https-main + scheme: https + scrapeTimeout: 30s + tlsConfig: + insecureSkipVerify: true + - bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token + interval: 30s + port: https-self + scheme: https + tlsConfig: + insecureSkipVerify: true + jobLabel: k8s-app + selector: + matchLabels: + k8s-app: kube-state-metrics + - name: node-exporter-servicemonitor + object: + apiVersion: monitoring.coreos.com/v1 + kind: ServiceMonitor + metadata: + labels: + k8s-app: node-exporter + name: node-exporter + namespace: rafay-infra + spec: + endpoints: + - bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token + interval: 30s + port: https + scheme: https + tlsConfig: + insecureSkipVerify: true + jobLabel: k8s-app + selector: + matchLabels: + k8s-app: node-exporter + - name: prometheus-adapter-api-service + object: + apiVersion: apiregistration.k8s.io/v1beta1 + kind: APIService + metadata: + name: v1beta1.custom.metrics.k8s.io + namespace: rafay-infra + spec: + group: custom.metrics.k8s.io + groupPriorityMinimum: 100 + insecureSkipTLSVerify: true + service: + name: prometheus-adapter + namespace: rafay-infra + version: v1beta1 + versionPriority: 5 + - name: kube-control-manager-service + object: + apiVersion: v1 + kind: Service + metadata: + labels: + k8s-app: kube-controller-manager + name: kube-controller-manager-prometheus-discovery + namespace: kube-system + spec: + clusterIP: None + ports: + - name: http-metrics + port: 10252 + protocol: TCP + targetPort: 10252 + selector: + component: kube-controller-manager + type: ClusterIP + - name: prometheus-k8s-service + object: + apiVersion: v1 + kind: Service + metadata: + labels: + prometheus: k8s + name: prometheus-k8s + namespace: rafay-infra + spec: + ports: + - name: web + port: 9090 + targetPort: web + selector: + app: prometheus + prometheus: k8s + - name: prometheus-operator-service + object: + apiVersion: v1 + kind: Service + metadata: + labels: + k8s-app: prometheus-operator + name: prometheus-operator + namespace: rafay-infra + spec: + clusterIP: None + ports: + - name: http + port: 8080 + targetPort: http + selector: + k8s-app: prometheus-operator + - name: alertmanager-service + object: + apiVersion: v1 + kind: Service + metadata: + labels: + alertmanager: main + name: alertmanager-main + namespace: rafay-infra + spec: + ports: + - name: web + nodePort: 30903 + port: 9093 + targetPort: web + selector: + alertmanager: main + app: alertmanager + type: NodePort + - name: kube-state-metrics-service + object: + apiVersion: v1 + kind: Service + metadata: + labels: + k8s-app: kube-state-metrics + name: kube-state-metrics + namespace: rafay-infra + spec: + clusterIP: None + ports: + - name: https-main + port: 8443 + targetPort: https-main + - name: https-self + port: 9443 + targetPort: https-self + selector: + app: kube-state-metrics + - name: node-exporter-service + object: + apiVersion: v1 + kind: Service + metadata: + labels: + k8s-app: node-exporter + name: node-exporter + namespace: rafay-infra + spec: + clusterIP: None + ports: + - name: https + port: 9100 + targetPort: https + selector: + app: node-exporter + - name: prometheus-adapter-service + object: + apiVersion: v1 + kind: Service + metadata: + labels: + name: prometheus-adapter + name: prometheus-adapter + namespace: rafay-infra + spec: + ports: + - name: https + port: 443 + targetPort: 6443 + selector: + name: prometheus-adapter + - name: kubelet-servicemonitor + object: + apiVersion: monitoring.coreos.com/v1 + kind: ServiceMonitor + metadata: + labels: + k8s-app: kubelet + name: kubelet + namespace: rafay-infra + spec: + endpoints: + - bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token + honorLabels: true + interval: 30s + metricRelabelings: + - action: keep + regex: kubelet_volume_stats_capacity_bytes|kubelet_volume_stats_available_bytes|kubelet_volume_stats_used_bytes + sourceLabels: + - __name__ + port: https-metrics + scheme: https + tlsConfig: + insecureSkipVerify: true + - bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token + honorLabels: true + interval: 30s + metricRelabelings: + - action: keep + regex: container_memory_rss|container_memory_usage_bytes|container_cpu_usage_seconds_total|container_network_receive_bytes_total|container_network_transmit_bytes_total|container_cpu_cfs_throttled_periods_total|kubelet_volume_stats_capacity_bytes + sourceLabels: + - __name__ + - action: labeldrop + regex: id|interface + path: /metrics/cadvisor + port: https-metrics + scheme: https + tlsConfig: + insecureSkipVerify: true + jobLabel: k8s-app + namespaceSelector: + matchNames: + - kube-system + selector: + matchLabels: + k8s-app: kubelet + - name: fluentd-servicemonitor + object: + apiVersion: monitoring.coreos.com/v1 + kind: ServiceMonitor + metadata: + labels: + k8s-app: fluentd + name: fluentd + namespace: rafay-infra + spec: + endpoints: + - interval: 1m + metricRelabelings: + - action: labeldrop + regex: plugin_id + path: /metrics + port: prometheus + jobLabel: component + namespaceSelector: + matchNames: + - logging + - rcloud-infra + selector: + matchExpressions: + - key: app + operator: In + values: + - log-router + - fluentd-aggregator + - fluentd-customer-aggregator + - name: apiserver-servicemonitor + object: + apiVersion: monitoring.coreos.com/v1 + kind: ServiceMonitor + metadata: + labels: + k8s-app: apiserver + name: kube-apiserver + namespace: rafay-infra + spec: + endpoints: + - bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token + interval: 30s + metricRelabelings: + - action: drop + regex: etcd_(debugging|disk|request|server).* + sourceLabels: + - __name__ + port: https + scheme: https + tlsConfig: + caFile: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt + serverName: kubernetes + jobLabel: component + namespaceSelector: + matchNames: + - default + selector: + matchLabels: + component: apiserver + provider: kubernetes + - name: coredns-servicemonitor + object: + apiVersion: monitoring.coreos.com/v1 + kind: ServiceMonitor + metadata: + labels: + k8s-app: coredns + name: coredns + namespace: rafay-infra + spec: + endpoints: + - bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token + interval: 15s + port: metrics + namespaceSelector: + matchNames: + - kube-system + selector: + matchLabels: + k8s-app: kube-dns + - name: kube-control-manager-servicemonitor + object: + apiVersion: monitoring.coreos.com/v1 + kind: ServiceMonitor + metadata: + labels: + k8s-app: kube-controller-manager + name: kube-controller-manager + namespace: rafay-infra + spec: + endpoints: + - interval: 30s + metricRelabelings: + - action: drop + regex: etcd_(debugging|disk|request|server).* + sourceLabels: + - __name__ + port: http-metrics + jobLabel: k8s-app + namespaceSelector: + matchNames: + - kube-system + selector: + matchLabels: + k8s-app: kube-controller-manager + - name: kube-scheduler-service-monitor + object: + apiVersion: monitoring.coreos.com/v1 + kind: ServiceMonitor + metadata: + labels: + k8s-app: kube-scheduler + name: kube-scheduler + namespace: rafay-infra + spec: + endpoints: + - interval: 30s + port: http-metrics + jobLabel: k8s-app + namespaceSelector: + matchNames: + - kube-system + selector: + matchLabels: + k8s-app: kube-scheduler + install: + - name: prometheus-operator-deployment + object: + apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + k8s-app: prometheus-operator + name: prometheus-operator + namespace: rafay-infra + spec: + replicas: 1 + selector: + matchLabels: + k8s-app: prometheus-operator + template: + metadata: + labels: + k8s-app: prometheus-operator + spec: + containers: + - args: + - --kubelet-service=kube-system/kubelet + - --logtostderr=true + - --config-reloader-image=quay.io/coreos/configmap-reload:v0.0.1 + - --prometheus-config-reloader=quay.io/coreos/prometheus-config-reloader:v0.29.0 + image: quay.io/coreos/prometheus-operator:v0.29.0 + name: prometheus-operator + ports: + - containerPort: 8080 + name: http + resources: + limits: + cpu: 200m + memory: 200Mi + requests: + cpu: 100m + memory: 100Mi + securityContext: + readOnlyRootFilesystem: true + nodeSelector: + beta.kubernetes.io/os: linux + securityContext: + runAsNonRoot: true + runAsUser: 65534 + serviceAccountName: prometheus-operator + - name: kube-state-metrics-deployment + object: + apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: kube-state-metrics + name: kube-state-metrics + namespace: rafay-infra + spec: + replicas: 1 + selector: + matchLabels: + app: kube-state-metrics + template: + metadata: + labels: + app: kube-state-metrics + spec: + containers: + - args: + - --secure-listen-address=:8443 + - --upstream=http://127.0.0.1:8081/ + image: quay.io/coreos/kube-rbac-proxy:v0.4.0 + name: kube-rbac-proxy-main + ports: + - containerPort: 8443 + name: https-main + resources: + limits: + cpu: 20m + memory: 40Mi + requests: + cpu: 10m + memory: 20Mi + - args: + - --secure-listen-address=:9443 + - --upstream=http://127.0.0.1:8082/ + image: quay.io/coreos/kube-rbac-proxy:v0.4.0 + name: kube-rbac-proxy-self + ports: + - containerPort: 9443 + name: https-self + resources: + limits: + cpu: 20m + memory: 40Mi + requests: + cpu: 10m + memory: 20Mi + - args: + - --host=127.0.0.1 + - --port=8081 + - --telemetry-host=127.0.0.1 + - --telemetry-port=8082 + image: quay.io/coreos/kube-state-metrics:v1.4.0 + name: kube-state-metrics + resources: + limits: + cpu: 100m + memory: 150Mi + requests: + cpu: 100m + memory: 150Mi + - command: + - /pod_nanny + - --container=kube-state-metrics + - --cpu=100m + - --extra-cpu=2m + - --memory=150Mi + - --extra-memory=30Mi + - --threshold=5 + - --deployment=kube-state-metrics + env: + - name: MY_POD_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.name + - name: MY_POD_NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + image: quay.io/coreos/addon-resizer:1.0 + name: addon-resizer + resources: + limits: + cpu: 50m + memory: 30Mi + requests: + cpu: 10m + memory: 30Mi + nodeSelector: + beta.kubernetes.io/os: linux + securityContext: + runAsNonRoot: true + runAsUser: 65534 + serviceAccountName: kube-state-metrics + - name: node-exporter-deamonset + object: + apiVersion: apps/v1 + kind: DaemonSet + metadata: + labels: + app: node-exporter + name: node-exporter + namespace: rafay-infra + spec: + selector: + matchLabels: + app: node-exporter + template: + metadata: + labels: + app: node-exporter + spec: + containers: + - args: + - --web.listen-address=127.0.0.1:9100 + - --path.procfs=/host/proc + - --path.sysfs=/host/sys + - --collector.filesystem.ignored-mount-points=^/(dev|proc|sys|var/lib/docker/.+)($|/) + - --collector.filesystem.ignored-fs-types=^(autofs|binfmt_misc|cgroup|configfs|debugfs|devpts|devtmpfs|fusectl|hugetlbfs|mqueue|overlay|proc|procfs|pstore|rpc_pipefs|securityfs|sysfs|tracefs)$ + image: quay.io/prometheus/node-exporter:v0.16.0 + name: node-exporter + resources: + limits: + cpu: 250m + memory: 180Mi + requests: + cpu: 102m + memory: 180Mi + volumeMounts: + - mountPath: /host/proc + name: proc + - mountPath: /host/sys + name: sys + - mountPath: /host/root + mountPropagation: HostToContainer + name: root + readOnly: true + - args: + - --secure-listen-address=$(IP):9100 + - --upstream=http://127.0.0.1:9100/ + env: + - name: IP + valueFrom: + fieldRef: + fieldPath: status.podIP + image: quay.io/coreos/kube-rbac-proxy:v0.4.0 + name: kube-rbac-proxy + ports: + - containerPort: 9100 + hostPort: 9100 + name: https + resources: + limits: + cpu: 20m + memory: 40Mi + requests: + cpu: 10m + memory: 20Mi + hostNetwork: true + hostPID: true + nodeSelector: + beta.kubernetes.io/os: linux + securityContext: + runAsNonRoot: true + runAsUser: 65534 + serviceAccountName: node-exporter + tolerations: + - effect: NoSchedule + key: node-role.kubernetes.io/master + volumes: + - hostPath: + path: /proc + name: proc + - hostPath: + path: /sys + name: sys + - hostPath: + path: / + name: root + - name: prometheus-adapter-deployment + object: + apiVersion: apps/v1 + kind: Deployment + metadata: + name: prometheus-adapter + namespace: rafay-infra + spec: + replicas: 1 + selector: + matchLabels: + name: prometheus-adapter + template: + metadata: + labels: + name: prometheus-adapter + spec: + containers: + - args: + - --cert-dir=/var/run/serving-cert + - --config=/etc/adapter/config.yaml + - --logtostderr=true + - --metrics-relist-interval=1m + - --prometheus-url=http://prometheus-k8s.monitoring.svc:9090/ + - --secure-port=6443 + - --v=4 + image: registry.dev.rafay-edge.net:5000/rafay/k8s-prometheus-adapter-amd64:v1.0.4 + name: prometheus-adapter + ports: + - containerPort: 6443 + volumeMounts: + - mountPath: /tmp + name: tmpfs + - mountPath: /var/run/serving-cert + name: volume-serving-cert + - mountPath: /etc/adapter + name: config + serviceAccountName: prometheus-adapter + volumes: + - name: tmpfs + - name: volume-serving-cert + - configMap: + name: adapter-config + name: config + postInstall: + - name: prometheus-k8s-rules + object: + apiVersion: monitoring.coreos.com/v1 + kind: PrometheusRule + metadata: + labels: + prometheus: k8s + role: alert-rules + name: prometheus-k8s-rules + namespace: rafay-infra + spec: + groups: + - name: k8s.rules + rules: + - expr: | + sum(rate(container_cpu_usage_seconds_total{job="kubelet", image!="", container_name!=""}[5m])) by (namespace) + record: namespace:container_cpu_usage_seconds_total:sum_rate + - expr: | + sum by (namespace, pod_name, container_name) ( + rate(container_cpu_usage_seconds_total{job="kubelet", image!="", container_name!=""}[5m]) + ) + record: namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate + - expr: | + sum(container_memory_usage_bytes{job="kubelet", image!="", container_name!=""}) by (namespace) + record: namespace:container_memory_usage_bytes:sum + - expr: | + sum by (namespace, label_name) ( + sum(rate(container_cpu_usage_seconds_total{job="kubelet", image!="", container_name!=""}[5m])) by (namespace, pod_name) + * on (namespace, pod_name) group_left(label_name) + label_replace(kube_pod_labels{job="kube-state-metrics"}, "pod_name", "$1", "pod", "(.*)") + ) + record: namespace_name:container_cpu_usage_seconds_total:sum_rate + - expr: | + sum by (namespace, label_name) ( + sum(container_memory_usage_bytes{job="kubelet",image!="", container_name!=""}) by (pod_name, namespace) + * on (namespace, pod_name) group_left(label_name) + label_replace(kube_pod_labels{job="kube-state-metrics"}, "pod_name", "$1", "pod", "(.*)") + ) + record: namespace_name:container_memory_usage_bytes:sum + - expr: | + sum by (namespace, label_name) ( + sum(kube_pod_container_resource_requests_memory_bytes{job="kube-state-metrics"}) by (namespace, pod) + * on (namespace, pod) group_left(label_name) + label_replace(kube_pod_labels{job="kube-state-metrics"}, "pod_name", "$1", "pod", "(.*)") + ) + record: namespace_name:kube_pod_container_resource_requests_memory_bytes:sum + - expr: | + sum by (namespace, label_name) ( + sum(kube_pod_container_resource_requests_cpu_cores{job="kube-state-metrics"} and on(pod) kube_pod_status_scheduled{condition="true"}) by (namespace, pod) + * on (namespace, pod) group_left(label_name) + label_replace(kube_pod_labels{job="kube-state-metrics"}, "pod_name", "$1", "pod", "(.*)") + ) + record: namespace_name:kube_pod_container_resource_requests_cpu_cores:sum + - name: kube-scheduler.rules + rules: + - expr: | + histogram_quantile(0.99, sum(rate(scheduler_e2e_scheduling_latency_microseconds_bucket{job="kube-scheduler"}[5m])) without(instance, pod)) / 1e+06 + labels: + quantile: "0.99" + record: cluster_quantile:scheduler_e2e_scheduling_latency:histogram_quantile + - expr: | + histogram_quantile(0.99, sum(rate(scheduler_scheduling_algorithm_latency_microseconds_bucket{job="kube-scheduler"}[5m])) without(instance, pod)) / 1e+06 + labels: + quantile: "0.99" + record: cluster_quantile:scheduler_scheduling_algorithm_latency:histogram_quantile + - expr: | + histogram_quantile(0.99, sum(rate(scheduler_binding_latency_microseconds_bucket{job="kube-scheduler"}[5m])) without(instance, pod)) / 1e+06 + labels: + quantile: "0.99" + record: cluster_quantile:scheduler_binding_latency:histogram_quantile + - expr: | + histogram_quantile(0.9, sum(rate(scheduler_e2e_scheduling_latency_microseconds_bucket{job="kube-scheduler"}[5m])) without(instance, pod)) / 1e+06 + labels: + quantile: "0.9" + record: cluster_quantile:scheduler_e2e_scheduling_latency:histogram_quantile + - expr: | + histogram_quantile(0.9, sum(rate(scheduler_scheduling_algorithm_latency_microseconds_bucket{job="kube-scheduler"}[5m])) without(instance, pod)) / 1e+06 + labels: + quantile: "0.9" + record: cluster_quantile:scheduler_scheduling_algorithm_latency:histogram_quantile + - expr: | + histogram_quantile(0.9, sum(rate(scheduler_binding_latency_microseconds_bucket{job="kube-scheduler"}[5m])) without(instance, pod)) / 1e+06 + labels: + quantile: "0.9" + record: cluster_quantile:scheduler_binding_latency:histogram_quantile + - expr: | + histogram_quantile(0.5, sum(rate(scheduler_e2e_scheduling_latency_microseconds_bucket{job="kube-scheduler"}[5m])) without(instance, pod)) / 1e+06 + labels: + quantile: "0.5" + record: cluster_quantile:scheduler_e2e_scheduling_latency:histogram_quantile + - expr: | + histogram_quantile(0.5, sum(rate(scheduler_scheduling_algorithm_latency_microseconds_bucket{job="kube-scheduler"}[5m])) without(instance, pod)) / 1e+06 + labels: + quantile: "0.5" + record: cluster_quantile:scheduler_scheduling_algorithm_latency:histogram_quantile + - expr: | + histogram_quantile(0.5, sum(rate(scheduler_binding_latency_microseconds_bucket{job="kube-scheduler"}[5m])) without(instance, pod)) / 1e+06 + labels: + quantile: "0.5" + record: cluster_quantile:scheduler_binding_latency:histogram_quantile + - name: kube-apiserver.rules + rules: + - expr: | + histogram_quantile(0.99, sum(rate(apiserver_request_latencies_bucket{job="apiserver"}[5m])) without(instance, pod)) / 1e+06 + labels: + quantile: "0.99" + record: cluster_quantile:apiserver_request_latencies:histogram_quantile + - expr: | + histogram_quantile(0.9, sum(rate(apiserver_request_latencies_bucket{job="apiserver"}[5m])) without(instance, pod)) / 1e+06 + labels: + quantile: "0.9" + record: cluster_quantile:apiserver_request_latencies:histogram_quantile + - expr: | + histogram_quantile(0.5, sum(rate(apiserver_request_latencies_bucket{job="apiserver"}[5m])) without(instance, pod)) / 1e+06 + labels: + quantile: "0.5" + record: cluster_quantile:apiserver_request_latencies:histogram_quantile + - name: node.rules + rules: + - expr: sum(min(kube_pod_info) by (node)) + record: ':kube_pod_info_node_count:' + - expr: | + max(label_replace(kube_pod_info{job="kube-state-metrics"}, "pod", "$1", "pod", "(.*)")) by (node, namespace, pod) + record: 'node_namespace_pod:kube_pod_info:' + - expr: | + count by (node) (sum by (node, cpu) ( + node_cpu_seconds_total{job="node-exporter"} + * on (namespace, pod) group_left(node) + node_namespace_pod:kube_pod_info: + )) + record: node:node_num_cpu:sum + - expr: | + 1 - avg(rate(node_cpu_seconds_total{job="node-exporter",mode="idle"}[1m])) + record: :node_cpu_utilisation:avg1m + - expr: | + 1 - avg by (node) ( + rate(node_cpu_seconds_total{job="node-exporter",mode="idle"}[1m]) + * on (namespace, pod) group_left(node) + node_namespace_pod:kube_pod_info:) + record: node:node_cpu_utilisation:avg1m + - expr: | + sum(node_load1{job="node-exporter"}) + / + sum(node:node_num_cpu:sum) + record: ':node_cpu_saturation_load1:' + - expr: | + sum by (node) ( + node_load1{job="node-exporter"} + * on (namespace, pod) group_left(node) + node_namespace_pod:kube_pod_info: + ) + / + node:node_num_cpu:sum + record: 'node:node_cpu_saturation_load1:' + - expr: | + 1 - + sum(node_memory_MemFree_bytes{job="node-exporter"} + node_memory_Cached_bytes{job="node-exporter"} + node_memory_Buffers_bytes{job="node-exporter"}) + / + sum(node_memory_MemTotal_bytes{job="node-exporter"}) + record: ':node_memory_utilisation:' + - expr: | + sum(node_memory_MemFree_bytes{job="node-exporter"} + node_memory_Cached_bytes{job="node-exporter"} + node_memory_Buffers_bytes{job="node-exporter"}) + record: :node_memory_MemFreeCachedBuffers_bytes:sum + - expr: | + sum(node_memory_MemTotal_bytes{job="node-exporter"}) + record: :node_memory_MemTotal_bytes:sum + - expr: | + sum by (node) ( + (node_memory_MemFree_bytes{job="node-exporter"} + node_memory_Cached_bytes{job="node-exporter"} + node_memory_Buffers_bytes{job="node-exporter"}) + * on (namespace, pod) group_left(node) + node_namespace_pod:kube_pod_info: + ) + record: node:node_memory_bytes_available:sum + - expr: | + sum by (node) ( + node_memory_MemTotal_bytes{job="node-exporter"} + * on (namespace, pod) group_left(node) + node_namespace_pod:kube_pod_info: + ) + record: node:node_memory_bytes_total:sum + - expr: | + (node:node_memory_bytes_total:sum - node:node_memory_bytes_available:sum) + / + scalar(sum(node:node_memory_bytes_total:sum)) + record: node:node_memory_utilisation:ratio + - expr: | + 1e3 * sum( + (rate(node_vmstat_pgpgin{job="node-exporter"}[1m]) + + rate(node_vmstat_pgpgout{job="node-exporter"}[1m])) + ) + record: :node_memory_swap_io_bytes:sum_rate + - expr: | + 1 - + sum by (node) ( + (node_memory_MemFree_bytes{job="node-exporter"} + node_memory_Cached_bytes{job="node-exporter"} + node_memory_Buffers_bytes{job="node-exporter"}) + * on (namespace, pod) group_left(node) + node_namespace_pod:kube_pod_info: + ) + / + sum by (node) ( + node_memory_MemTotal_bytes{job="node-exporter"} + * on (namespace, pod) group_left(node) + node_namespace_pod:kube_pod_info: + ) + record: 'node:node_memory_utilisation:' + - expr: | + 1 - (node:node_memory_bytes_available:sum / node:node_memory_bytes_total:sum) + record: 'node:node_memory_utilisation_2:' + - expr: | + 1e3 * sum by (node) ( + (rate(node_vmstat_pgpgin{job="node-exporter"}[1m]) + + rate(node_vmstat_pgpgout{job="node-exporter"}[1m])) + * on (namespace, pod) group_left(node) + node_namespace_pod:kube_pod_info: + ) + record: node:node_memory_swap_io_bytes:sum_rate + - expr: | + avg(irate(node_disk_io_time_seconds_total{job="node-exporter",device=~"nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+"}[1m])) + record: :node_disk_utilisation:avg_irate + - expr: | + avg by (node) ( + irate(node_disk_io_time_seconds_total{job="node-exporter",device=~"nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+"}[1m]) + * on (namespace, pod) group_left(node) + node_namespace_pod:kube_pod_info: + ) + record: node:node_disk_utilisation:avg_irate + - expr: | + avg(irate(node_disk_io_time_weighted_seconds_total{job="node-exporter",device=~"nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+"}[1m])) + record: :node_disk_saturation:avg_irate + - expr: | + avg by (node) ( + irate(node_disk_io_time_weighted_seconds_total{job="node-exporter",device=~"nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+"}[1m]) + * on (namespace, pod) group_left(node) + node_namespace_pod:kube_pod_info: + ) + record: node:node_disk_saturation:avg_irate + - expr: | + max by (namespace, pod, device) ((node_filesystem_size_bytes{fstype=~"ext[234]|btrfs|xfs|zfs"} + - node_filesystem_avail_bytes{fstype=~"ext[234]|btrfs|xfs|zfs"}) + / node_filesystem_size_bytes{fstype=~"ext[234]|btrfs|xfs|zfs"}) + record: 'node:node_filesystem_usage:' + - expr: | + max by (namespace, pod, device) (node_filesystem_avail_bytes{fstype=~"ext[234]|btrfs|xfs|zfs"} / node_filesystem_size_bytes{fstype=~"ext[234]|btrfs|xfs|zfs"}) + record: 'node:node_filesystem_avail:' + - expr: | + sum(irate(node_network_receive_bytes_total{job="node-exporter",device!~"veth.+"}[1m])) + + sum(irate(node_network_transmit_bytes_total{job="node-exporter",device!~"veth.+"}[1m])) + record: :node_net_utilisation:sum_irate + - expr: | + sum by (node) ( + (irate(node_network_receive_bytes_total{job="node-exporter",device!~"veth.+"}[1m]) + + irate(node_network_transmit_bytes_total{job="node-exporter",device!~"veth.+"}[1m])) + * on (namespace, pod) group_left(node) + node_namespace_pod:kube_pod_info: + ) + record: node:node_net_utilisation:sum_irate + - expr: | + sum(irate(node_network_receive_drop_total{job="node-exporter",device!~"veth.+"}[1m])) + + sum(irate(node_network_transmit_drop_total{job="node-exporter",device!~"veth.+"}[1m])) + record: :node_net_saturation:sum_irate + - expr: | + sum by (node) ( + (irate(node_network_receive_drop_total{job="node-exporter",device!~"veth.+"}[1m]) + + irate(node_network_transmit_drop_total{job="node-exporter",device!~"veth.+"}[1m])) + * on (namespace, pod) group_left(node) + node_namespace_pod:kube_pod_info: + ) + record: node:node_net_saturation:sum_irate + - name: kube-prometheus-node-recording.rules + rules: + - expr: sum(rate(node_cpu{mode!="idle",mode!="iowait"}[3m])) BY (instance) + record: instance:node_cpu:rate:sum + - expr: sum((node_filesystem_size{mountpoint="/"} - node_filesystem_free{mountpoint="/"})) + BY (instance) + record: instance:node_filesystem_usage:sum + - expr: sum(rate(node_network_receive_bytes[3m])) BY (instance) + record: instance:node_network_receive_bytes:rate:sum + - expr: sum(rate(node_network_transmit_bytes[3m])) BY (instance) + record: instance:node_network_transmit_bytes:rate:sum + - expr: sum(rate(node_cpu{mode!="idle",mode!="iowait"}[5m])) WITHOUT + (cpu, mode) / ON(instance) GROUP_LEFT() count(sum(node_cpu) BY (instance, + cpu)) BY (instance) + record: instance:node_cpu:ratio + - expr: sum(rate(node_cpu{mode!="idle",mode!="iowait"}[5m])) + record: cluster:node_cpu:sum_rate5m + - expr: cluster:node_cpu:rate5m / count(sum(node_cpu) BY (instance, + cpu)) + record: cluster:node_cpu:ratio + - name: kubernetes-absent + rules: + - alert: CoreDNSDown + annotations: + message: CoreDNS has disappeared from Prometheus target discovery. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-corednsdown + expr: | + absent(up{job="kube-dns-prometheus-discovery"} == 1) + for: 15m + labels: + severity: critical + - alert: KubeAPIDown + annotations: + message: KubeAPI has disappeared from Prometheus target discovery. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubeapidown + expr: | + absent(up{job="apiserver"} == 1) + for: 15m + labels: + severity: critical + - alert: KubeControllerManagerDown + annotations: + message: KubeControllerManager has disappeared from Prometheus target + discovery. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubecontrollermanagerdown + expr: | + absent(up{job="kube-controller-manager"} == 1) + for: 15m + labels: + severity: critical + - alert: KubeSchedulerDown + annotations: + message: KubeScheduler has disappeared from Prometheus target discovery. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubeschedulerdown + expr: | + absent(up{job="kube-scheduler"} == 1) + for: 15m + labels: + severity: critical + - alert: KubeStateMetricsDown + annotations: + message: KubeStateMetrics has disappeared from Prometheus target + discovery. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubestatemetricsdown + expr: | + absent(up{job="kube-state-metrics"} == 1) + for: 15m + labels: + severity: critical + - alert: KubeletDown + annotations: + message: Kubelet has disappeared from Prometheus target discovery. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubeletdown + expr: | + absent(up{job="kubelet"} == 1) + for: 15m + labels: + severity: critical + - alert: NodeExporterDown + annotations: + message: NodeExporter has disappeared from Prometheus target discovery. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-nodeexporterdown + expr: | + absent(up{job="node-exporter"} == 1) + for: 15m + labels: + severity: critical + - alert: PrometheusDown + annotations: + message: Prometheus has disappeared from Prometheus target discovery. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-prometheusdown + expr: | + absent(up{job="prometheus-k8s"} == 1) + for: 15m + labels: + severity: critical + - alert: PrometheusOperatorDown + annotations: + message: PrometheusOperator has disappeared from Prometheus target + discovery. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-prometheusoperatordown + expr: | + absent(up{job="prometheus-operator"} == 1) + for: 15m + labels: + severity: critical + - name: kubernetes-apps + rules: + - alert: KubePodCrashLooping + annotations: + message: Pod {{ $labels.namespace }}/{{ $labels.pod }} ({{ $labels.container + }}) is restarting {{ printf "%.2f" $value }} times / 5 minutes. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubepodcrashlooping + expr: | + rate(kube_pod_container_status_restarts_total{job="kube-state-metrics"}[15m]) * 60 * 5 > 0 + for: 1h + labels: + severity: critical + - alert: KubePodNotReady + annotations: + message: Pod {{ $labels.namespace }}/{{ $labels.pod }} has been + in a non-ready state for longer than an hour. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubepodnotready + expr: | + sum by (namespace, pod) (kube_pod_status_phase{job="kube-state-metrics", phase=~"Pending|Unknown"}) > 0 + for: 1h + labels: + severity: critical + - alert: KubeDeploymentGenerationMismatch + annotations: + message: Deployment generation for {{ $labels.namespace }}/{{ $labels.deployment + }} does not match, this indicates that the Deployment has failed + but has not been rolled back. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubedeploymentgenerationmismatch + expr: | + kube_deployment_status_observed_generation{job="kube-state-metrics"} + != + kube_deployment_metadata_generation{job="kube-state-metrics"} + for: 15m + labels: + severity: critical + - alert: KubeDeploymentReplicasMismatch + annotations: + message: Deployment {{ $labels.namespace }}/{{ $labels.deployment + }} has not matched the expected number of replicas for longer + than an hour. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubedeploymentreplicasmismatch + expr: | + kube_deployment_spec_replicas{job="kube-state-metrics"} + != + kube_deployment_status_replicas_available{job="kube-state-metrics"} + for: 1h + labels: + severity: critical + - alert: KubeStatefulSetReplicasMismatch + annotations: + message: StatefulSet {{ $labels.namespace }}/{{ $labels.statefulset + }} has not matched the expected number of replicas for longer + than 15 minutes. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubestatefulsetreplicasmismatch + expr: | + kube_statefulset_status_replicas_ready{job="kube-state-metrics"} + != + kube_statefulset_status_replicas{job="kube-state-metrics"} + for: 15m + labels: + severity: critical + - alert: KubeStatefulSetGenerationMismatch + annotations: + message: StatefulSet generation for {{ $labels.namespace }}/{{ $labels.statefulset + }} does not match, this indicates that the StatefulSet has failed + but has not been rolled back. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubestatefulsetgenerationmismatch + expr: | + kube_statefulset_status_observed_generation{job="kube-state-metrics"} + != + kube_statefulset_metadata_generation{job="kube-state-metrics"} + for: 15m + labels: + severity: critical + - alert: KubeStatefulSetUpdateNotRolledOut + annotations: + message: StatefulSet {{ $labels.namespace }}/{{ $labels.statefulset + }} update has not been rolled out. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubestatefulsetupdatenotrolledout + expr: | + max without (revision) ( + kube_statefulset_status_current_revision{job="kube-state-metrics"} + unless + kube_statefulset_status_update_revision{job="kube-state-metrics"} + ) + * + ( + kube_statefulset_replicas{job="kube-state-metrics"} + != + kube_statefulset_status_replicas_updated{job="kube-state-metrics"} + ) + for: 15m + labels: + severity: critical + - alert: KubeDaemonSetRolloutStuck + annotations: + message: Only {{ $value }}% of the desired Pods of DaemonSet {{ + $labels.namespace }}/{{ $labels.daemonset }} are scheduled and + ready. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubedaemonsetrolloutstuck + expr: | + kube_daemonset_status_number_ready{job="kube-state-metrics"} + / + kube_daemonset_status_desired_number_scheduled{job="kube-state-metrics"} * 100 < 100 + for: 15m + labels: + severity: critical + - alert: KubeDaemonSetNotScheduled + annotations: + message: '{{ $value }} Pods of DaemonSet {{ $labels.namespace }}/{{ + $labels.daemonset }} are not scheduled.' + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubedaemonsetnotscheduled + expr: | + kube_daemonset_status_desired_number_scheduled{job="kube-state-metrics"} + - + kube_daemonset_status_current_number_scheduled{job="kube-state-metrics"} > 0 + for: 10m + labels: + severity: warning + - alert: KubeDaemonSetMisScheduled + annotations: + message: '{{ $value }} Pods of DaemonSet {{ $labels.namespace }}/{{ + $labels.daemonset }} are running where they are not supposed to + run.' + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubedaemonsetmisscheduled + expr: | + kube_daemonset_status_number_misscheduled{job="kube-state-metrics"} > 0 + for: 10m + labels: + severity: warning + - alert: KubeCronJobRunning + annotations: + message: CronJob {{ $labels.namespace }}/{{ $labels.cronjob }} is + taking more than 1h to complete. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubecronjobrunning + expr: | + time() - kube_cronjob_next_schedule_time{job="kube-state-metrics"} > 3600 + for: 1h + labels: + severity: warning + - alert: KubeJobCompletion + annotations: + message: Job {{ $labels.namespace }}/{{ $labels.job_name }} is taking + more than one hour to complete. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubejobcompletion + expr: | + kube_job_spec_completions{job="kube-state-metrics"} - kube_job_status_succeeded{job="kube-state-metrics"} > 0 + for: 1h + labels: + severity: warning + - alert: KubeJobFailed + annotations: + message: Job {{ $labels.namespace }}/{{ $labels.job_name }} failed + to complete. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubejobfailed + expr: | + kube_job_status_failed{job="kube-state-metrics"} > 0 + for: 1h + labels: + severity: warning + - name: kubernetes-resources + rules: + - alert: KubeCPUOvercommit + annotations: + message: Cluster has overcommitted CPU resource requests for Pods + and cannot tolerate node failure. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubecpuovercommit + expr: | + sum(namespace_name:kube_pod_container_resource_requests_cpu_cores:sum) + / + sum(node:node_num_cpu:sum) + > + (count(node:node_num_cpu:sum)-1) / count(node:node_num_cpu:sum) + for: 5m + labels: + severity: warning + - alert: KubeMemOvercommit + annotations: + message: Cluster has overcommitted memory resource requests for + Pods and cannot tolerate node failure. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubememovercommit + expr: | + sum(namespace_name:kube_pod_container_resource_requests_memory_bytes:sum) + / + sum(node_memory_MemTotal_bytes) + > + (count(node:node_num_cpu:sum)-1) + / + count(node:node_num_cpu:sum) + for: 5m + labels: + severity: warning + - alert: KubeCPUOvercommit + annotations: + message: Cluster has overcommitted CPU resource requests for Namespaces. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubecpuovercommit + expr: | + sum(kube_resourcequota{job="kube-state-metrics", type="hard", resource="requests.cpu"}) + / + sum(node:node_num_cpu:sum) + > 1.5 + for: 5m + labels: + severity: warning + - alert: KubeMemOvercommit + annotations: + message: Cluster has overcommitted memory resource requests for + Namespaces. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubememovercommit + expr: | + sum(kube_resourcequota{job="kube-state-metrics", type="hard", resource="requests.memory"}) + / + sum(node_memory_MemTotal_bytes{job="node-exporter"}) + > 1.5 + for: 5m + labels: + severity: warning + - alert: KubeQuotaExceeded + annotations: + message: Namespace {{ $labels.namespace }} is using {{ printf "%0.0f" + $value }}% of its {{ $labels.resource }} quota. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubequotaexceeded + expr: | + 100 * kube_resourcequota{job="kube-state-metrics", type="used"} + / ignoring(instance, job, type) + (kube_resourcequota{job="kube-state-metrics", type="hard"} > 0) + > 90 + for: 15m + labels: + severity: warning + - alert: CPUThrottlingHigh + annotations: + message: '{{ printf "%0.0f" $value }}% throttling of CPU in namespace + {{ $labels.namespace }} for container {{ $labels.container_name + }} in pod {{ $labels.pod_name }}.' + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-cputhrottlinghigh + expr: "100 * sum(increase(container_cpu_cfs_throttled_periods_total{}[5m])) + by (container_name, pod_name, namespace) \n / \nsum(increase(container_cpu_cfs_periods_total{}[5m])) + by (container_name, pod_name, namespace)\n > 50 \n" + for: 15m + labels: + severity: warning + - name: kubernetes-storage + rules: + - alert: KubePersistentVolumeUsageCritical + annotations: + message: The PersistentVolume claimed by {{ $labels.persistentvolumeclaim + }} in Namespace {{ $labels.namespace }} is only {{ printf "%0.2f" + $value }}% free. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubepersistentvolumeusagecritical + expr: | + 100 * kubelet_volume_stats_available_bytes{job="kubelet"} + / + kubelet_volume_stats_capacity_bytes{job="kubelet"} + < 3 + for: 1m + labels: + severity: critical + - alert: KubePersistentVolumeFullInFourDays + annotations: + message: Based on recent sampling, the PersistentVolume claimed + by {{ $labels.persistentvolumeclaim }} in Namespace {{ $labels.namespace + }} is expected to fill up within four days. Currently {{ printf + "%0.2f" $value }}% is available. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubepersistentvolumefullinfourdays + expr: | + 100 * ( + kubelet_volume_stats_available_bytes{job="kubelet"} + / + kubelet_volume_stats_capacity_bytes{job="kubelet"} + ) < 15 + and + predict_linear(kubelet_volume_stats_available_bytes{job="kubelet"}[6h], 4 * 24 * 3600) < 0 + for: 5m + labels: + severity: critical + - alert: KubePersistentVolumeErrors + annotations: + message: The persistent volume {{ $labels.persistentvolume }} has + status {{ $labels.phase }}. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubepersistentvolumeerrors + expr: | + kube_persistentvolume_status_phase{phase=~"Failed|Pending",job="kube-state-metrics"} > 0 + for: 5m + labels: + severity: critical + - name: kubernetes-system + rules: + - alert: KubeNodeNotReady + annotations: + message: '{{ $labels.node }} has been unready for more than an hour.' + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubenodenotready + expr: | + kube_node_status_condition{job="kube-state-metrics",condition="Ready",status="true"} == 0 + for: 1h + labels: + severity: warning + - alert: KubeVersionMismatch + annotations: + message: There are {{ $value }} different versions of Kubernetes + components running. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubeversionmismatch + expr: | + count(count(kubernetes_build_info{job!="kube-dns-prometheus-discovery"}) by (gitVersion)) > 1 + for: 1h + labels: + severity: warning + - alert: KubeClientErrors + annotations: + message: Kubernetes API server client '{{ $labels.job }}/{{ $labels.instance + }}' is experiencing {{ printf "%0.0f" $value }}% errors.' + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubeclienterrors + expr: | + (sum(rate(rest_client_requests_total{code!~"2..|404"}[5m])) by (instance, job) + / + sum(rate(rest_client_requests_total[5m])) by (instance, job)) + * 100 > 1 + for: 15m + labels: + severity: warning + - alert: KubeClientErrors + annotations: + message: Kubernetes API server client '{{ $labels.job }}/{{ $labels.instance + }}' is experiencing {{ printf "%0.0f" $value }} errors / second. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubeclienterrors + expr: | + sum(rate(ksm_scrape_error_total{job="kube-state-metrics"}[5m])) by (instance, job) > 0.1 + for: 15m + labels: + severity: warning + - alert: KubeletTooManyPods + annotations: + message: Kubelet {{ $labels.instance }} is running {{ $value }} + Pods, close to the limit of 110. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubelettoomanypods + expr: | + kubelet_running_pod_count{job="kubelet"} > 110 * 0.9 + for: 15m + labels: + severity: warning + - alert: KubeAPILatencyHigh + annotations: + message: The API server has a 99th percentile latency of {{ $value + }} seconds for {{ $labels.verb }} {{ $labels.resource }}. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubeapilatencyhigh + expr: | + cluster_quantile:apiserver_request_latencies:histogram_quantile{job="apiserver",quantile="0.99",subresource!="log",verb!~"^(?:LIST|WATCH|WATCHLIST|PROXY|CONNECT)$"} > 1 + for: 10m + labels: + severity: warning + - alert: KubeAPILatencyHigh + annotations: + message: The API server has a 99th percentile latency of {{ $value + }} seconds for {{ $labels.verb }} {{ $labels.resource }}. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubeapilatencyhigh + expr: | + cluster_quantile:apiserver_request_latencies:histogram_quantile{job="apiserver",quantile="0.99",subresource!="log",verb!~"^(?:LIST|WATCH|WATCHLIST|PROXY|CONNECT)$"} > 4 + for: 10m + labels: + severity: critical + - alert: KubeAPIErrorsHigh + annotations: + message: API server is returning errors for {{ $value }}% of requests. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubeapierrorshigh + expr: | + sum(rate(apiserver_request_count{job="apiserver",code=~"^(?:5..)$"}[5m])) without(instance, pod) + / + sum(rate(apiserver_request_count{job="apiserver"}[5m])) without(instance, pod) * 100 > 10 + for: 10m + labels: + severity: critical + - alert: KubeAPIErrorsHigh + annotations: + message: API server is returning errors for {{ $value }}% of requests. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubeapierrorshigh + expr: | + sum(rate(apiserver_request_count{job="apiserver",code=~"^(?:5..)$"}[5m])) without(instance, pod) + / + sum(rate(apiserver_request_count{job="apiserver"}[5m])) without(instance, pod) * 100 > 5 + for: 10m + labels: + severity: warning + - alert: KubeClientCertificateExpiration + annotations: + message: Kubernetes API certificate is expiring in less than 7 days. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubeclientcertificateexpiration + expr: | + histogram_quantile(0.01, sum by (job, le) (rate(apiserver_client_certificate_expiration_seconds_bucket{job="apiserver"}[5m]))) < 604800 + labels: + severity: warning + - alert: KubeClientCertificateExpiration + annotations: + message: Kubernetes API certificate is expiring in less than 24 + hours. + runbook_url: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubeclientcertificateexpiration + expr: | + histogram_quantile(0.01, sum by (job, le) (rate(apiserver_client_certificate_expiration_seconds_bucket{job="apiserver"}[5m]))) < 86400 + labels: + severity: critical + - name: general.rules + rules: + - alert: TargetDown + annotations: + message: '{{ $value }}% of the {{ $labels.job }} targets are down.' + expr: 100 * (count(up == 0) BY (job) / count(up) BY (job)) > 10 + for: 10m + labels: + severity: warning + - alert: DeadMansSwitch + annotations: + message: This is a DeadMansSwitch meant to ensure that the entire + alerting pipeline is functional. + expr: vector(1) + labels: + severity: none + - name: kube-prometheus-node-alerting.rules + rules: + - alert: NodeDiskRunningFull + annotations: + message: Device {{ $labels.device }} of node-exporter {{ $labels.namespace + }}/{{ $labels.pod }} will be full within the next 24 hours. + expr: | + (node:node_filesystem_usage: > 0.85) and (predict_linear(node:node_filesystem_avail:[6h], 3600 * 24) < 0) + for: 30m + labels: + severity: warning + - alert: NodeDiskRunningFull + annotations: + message: Device {{ $labels.device }} of node-exporter {{ $labels.namespace + }}/{{ $labels.pod }} will be full within the next 2 hours. + expr: | + (node:node_filesystem_usage: > 0.85) and (predict_linear(node:node_filesystem_avail:[30m], 3600 * 2) < 0) + for: 10m + labels: + severity: critical + - name: prometheus.rules + rules: + - alert: PrometheusConfigReloadFailed + annotations: + description: Reloading Prometheus' configuration has failed for + {{$labels.namespace}}/{{$labels.pod}} + summary: Reloading Prometheus' configuration failed + expr: | + prometheus_config_last_reload_successful{job="prometheus-k8s"} == 0 + for: 10m + labels: + severity: warning + - alert: PrometheusNotificationQueueRunningFull + annotations: + description: Prometheus' alert notification queue is running full + for {{$labels.namespace}}/{{ $labels.pod}} + summary: Prometheus' alert notification queue is running full + expr: | + predict_linear(prometheus_notifications_queue_length{job="prometheus-k8s"}[5m], 60 * 30) > prometheus_notifications_queue_capacity{job="prometheus-k8s"} + for: 10m + labels: + severity: warning + - alert: PrometheusErrorSendingAlerts + annotations: + description: Errors while sending alerts from Prometheus {{$labels.namespace}}/{{ + $labels.pod}} to Alertmanager {{$labels.Alertmanager}} + summary: Errors while sending alert from Prometheus + expr: | + rate(prometheus_notifications_errors_total{job="prometheus-k8s"}[5m]) / rate(prometheus_notifications_sent_total{job="prometheus-k8s"}[5m]) > 0.01 + for: 10m + labels: + severity: warning + - alert: PrometheusErrorSendingAlerts + annotations: + description: Errors while sending alerts from Prometheus {{$labels.namespace}}/{{ + $labels.pod}} to Alertmanager {{$labels.Alertmanager}} + summary: Errors while sending alerts from Prometheus + expr: | + rate(prometheus_notifications_errors_total{job="prometheus-k8s"}[5m]) / rate(prometheus_notifications_sent_total{job="prometheus-k8s"}[5m]) > 0.03 + for: 10m + labels: + severity: critical + - alert: PrometheusNotConnectedToAlertmanagers + annotations: + description: Prometheus {{ $labels.namespace }}/{{ $labels.pod}} + is not connected to any Alertmanagers + summary: Prometheus is not connected to any Alertmanagers + expr: | + prometheus_notifications_alertmanagers_discovered{job="prometheus-k8s"} < 1 + for: 10m + labels: + severity: warning + - alert: PrometheusTSDBReloadsFailing + annotations: + description: '{{$labels.job}} at {{$labels.instance}} had {{$value + | humanize}} reload failures over the last four hours.' + summary: Prometheus has issues reloading data blocks from disk + expr: | + increase(prometheus_tsdb_reloads_failures_total{job="prometheus-k8s"}[2h]) > 0 + for: 12h + labels: + severity: warning + - alert: PrometheusTSDBCompactionsFailing + annotations: + description: '{{$labels.job}} at {{$labels.instance}} had {{$value + | humanize}} compaction failures over the last four hours.' + summary: Prometheus has issues compacting sample blocks + expr: | + increase(prometheus_tsdb_compactions_failed_total{job="prometheus-k8s"}[2h]) > 0 + for: 12h + labels: + severity: warning + - alert: PrometheusTSDBWALCorruptions + annotations: + description: '{{$labels.job}} at {{$labels.instance}} has a corrupted + write-ahead log (WAL).' + summary: Prometheus write-ahead log is corrupted + expr: | + tsdb_wal_corruptions_total{job="prometheus-k8s"} > 0 + for: 4h + labels: + severity: warning + - alert: PrometheusNotIngestingSamples + annotations: + description: Prometheus {{ $labels.namespace }}/{{ $labels.pod}} + isn't ingesting samples. + summary: Prometheus isn't ingesting samples + expr: | + rate(prometheus_tsdb_head_samples_appended_total{job="prometheus-k8s"}[5m]) <= 0 + for: 10m + labels: + severity: warning + - alert: PrometheusTargetScrapesDuplicate + annotations: + description: '{{$labels.namespace}}/{{$labels.pod}} has many samples + rejected due to duplicate timestamps but different values' + summary: Prometheus has many samples rejected + expr: | + increase(prometheus_target_scrapes_sample_duplicate_timestamp_total{job="prometheus-k8s"}[5m]) > 0 + for: 10m + labels: + severity: warning + - name: prometheus-operator + rules: + - alert: PrometheusOperatorReconcileErrors + annotations: + message: Errors while reconciling {{ $labels.controller }} in {{ + $labels.namespace }} Namespace. + expr: | + rate(prometheus_operator_reconcile_errors_total{job="prometheus-operator"}[5m]) > 0.1 + for: 10m + labels: + severity: warning + - alert: PrometheusOperatorNodeLookupErrors + annotations: + message: Errors while reconciling Prometheus in {{ $labels.namespace + }} Namespace. + expr: | + rate(prometheus_operator_node_address_lookup_errors_total{job="prometheus-operator"}[5m]) > 0.1 + for: 10m + labels: + severity: warning + - name: prometheus-k8s-custom-rules + object: + apiVersion: monitoring.coreos.com/v1 + kind: PrometheusRule + metadata: + labels: + prometheus: k8s + role: alert-rules + name: custom-prometheus-k8s-rules + namespace: rafay-infra + spec: + groups: + - name: custom.rules + rules: + - expr: sum (label_replace(rate(container_memory_usage_bytes{container_name!="POD",image!="",name=~"^k8s_.*"}[1m]), + "container", "$1", "container_name", "(.*)")) by (container, pod_name, + namespace) / on (namespace,pod_name, container) group_left label_replace(kube_pod_container_resource_limits_memory_bytes, + "pod_name", "$1", "pod", "(.*)") * on (pod_name) group_left(label_rep_organization, + label_rep_partner, label_rep_workload, pod) label_replace(kube_pod_labels, + "pod_name", "$1", "pod", "(.*)") * 100 + record: hpa_memory_usage_perc + - expr: sum(label_replace(rate(container_cpu_usage_seconds_total{ container_name!="POD",image!="",name=~"^k8s_.*"}[1m]), + "container", "$1", "container_name", "(.*)")) by (container, pod_name, + namespace) / on (namespace, pod_name, container) group_left label_replace(kube_pod_container_resource_limits_cpu_cores{}, + "pod_name", "$1", "pod", "(.*)")* on (pod_name) group_left(label_rep_organization, + label_rep_partner, label_rep_workload, pod) label_replace(kube_pod_labels, + "pod_name", "$1", "pod", "(.*)")* 100 + record: hpa_cpu_usage_perc + - expr: sum by (pod_name, container_name, label_rep_organization, label_rep_partner, + label_rep_workload) ( sum(rate(container_cpu_usage_seconds_total{image!="",container_name!="POD"}[1m])) + by (pod_name, container_name) * on (pod_name) group_left(label_rep_organization, + label_rep_partner, label_rep_workload, pod) label_replace(kube_pod_labels, + "pod_name", "$1", "pod", "(.*)") ) + record: rcloud:container:container_cpu_usage_seconds_total:sum + - expr: sum by (pod_name, container, label_rep_organization, label_rep_partner, + label_rep_workload) ( sum(label_replace(rate(container_cpu_usage_seconds_total{container_name!="POD",image!="",name=~"^k8s_.*"}[5m]), + "container", "$1", "container_name", "(.*)")) by (container, pod_name) + / on (pod_name, container) group_left label_replace(kube_pod_container_resource_limits_cpu_cores{}, + "pod_name", "$1", "pod", "(.*)") * on (pod_name) group_left(label_rep_organization, + label_rep_partner, label_rep_workload, pod) label_replace(kube_pod_labels, + "pod_name", "$1", "pod", "(.*)") ) * 100 + record: rcloud:pod:container_cpu_usage_percent + - expr: sum by (pod_name, container_name, label_rep_organization, label_rep_partner, + label_rep_workload) ( sum by(pod_name, container_name) (container_memory_usage_bytes{ + container_name!="POD"}) * on (pod_name) group_left(label_rep_organization, + label_rep_partner, label_rep_workload, pod) label_replace(kube_pod_labels, + "pod_name", "$1", "pod", "(.*)") ) + record: rcloud:pod:container_memory_usage_bytes:sum + - expr: sum by (pod_name, container, label_rep_organization, label_rep_partner, + label_rep_workload) ( sum(label_replace(container_memory_usage_bytes{container_name!="POD",image!="",name=~"^k8s_.*"}, + "container", "$1", "container_name", "(.*)")) by (pod_name, container) + / on (pod_name, container) group_left label_replace(kube_pod_container_resource_limits_memory_bytes{}, + "pod_name", "$1", "pod", "(.*)") * on (pod_name) group_left(label_rep_organization, + label_rep_partner, label_rep_workload, pod) label_replace(kube_pod_labels, + "pod_name", "$1", "pod", "(.*)") ) * 100 + record: rcloud:pod:container_memory_usage_percent + - expr: sum by (pod_name, namespace, container, instance, label_rep_organization, + label_rep_partner, label_rep_workload) ( (kube_pod_container_status_running{}) + * on (pod) group_left(label_rep_organization, label_rep_partner, + label_rep_workload, pod_name) label_replace(kube_pod_labels, "pod_name", + "$1", "pod", "(.*)") ) + record: rcloud:pod:kube_pod_container_status_running + - expr: sum by (pod_name, namespace, label_rep_organization, label_rep_partner, + label_rep_workload) ( (sum(rate(container_network_transmit_bytes_total{}[3m])) + BY (namespace, pod_name) + sum(rate(container_network_receive_bytes_total{}[3m])) + BY (namespace, pod_name)) * on (pod_name) group_left(label_rep_organization, + label_rep_partner, label_rep_workload, pod) label_replace(kube_pod_labels, + "pod_name", "$1", "pod", "(.*)") ) + record: rcloud:deployment:container_network_throughput_bytes_total:sum3m + - expr: sort_desc(sum by (pod_name, label_rep_organization, label_rep_partner, + label_rep_workload) ( sum by (pod_name) (rate(container_network_receive_bytes_total{}[1m])) + * on (pod_name) group_left(label_rep_organization, label_rep_partner, + label_rep_workload, pod) label_replace(kube_pod_labels, "pod_name", + "$1", "pod", "(.*)") )) + record: rcloud:container:container_network_receive_bytes_total:sum + - expr: sum by (pod_name, label_rep_organization, label_rep_partner, + label_rep_workload) ( sum by (pod_name) (rate(container_network_transmit_bytes_total{}[1m])) + * on (pod_name) group_left(label_rep_organization, label_rep_partner, + label_rep_workload, pod) label_replace(kube_pod_labels, "pod_name", + "$1", "pod", "(.*)") ) + record: rcloud:container:container_network_transmit_bytes_total:sum + - expr: sum by (pod_name, namespace, phase, label_rep_organization, + label_rep_partner, label_rep_workload) ( (kube_pod_status_phase{}) + * on (pod) group_left(label_rep_organization, label_rep_partner, + label_rep_workload, pod_name) label_replace(kube_pod_labels, "pod_name", + "$1", "pod", "(.*)") ) + record: rcloud:pod:kube_pod_status_phase + - expr: sum by (pod_name, namespace, condition, label_rep_organization, + label_rep_partner, label_rep_workload) ( (kube_pod_status_ready{}) + * on (pod) group_left(label_rep_organization, label_rep_partner, + label_rep_workload, pod_name) label_replace(kube_pod_labels, "pod_name", + "$1", "pod", "(.*)") ) + record: rcloud:pod:kube_pod_status_ready + - expr: sum by (pod_name, namespace, container, image, instance, label_rep_organization, + label_rep_partner, label_rep_workload) ( (kube_pod_container_info{}) + * on (pod) group_left(label_rep_organization, label_rep_partner, + label_rep_workload, pod_name) label_replace(kube_pod_labels, "pod_name", + "$1", "pod", "(.*)") ) + record: rcloud:pod:kube_pod_container_info + - expr: sum by (pod_name, namespace, container,reason, instance, label_rep_organization, + label_rep_partner, label_rep_workload) ( (kube_pod_container_status_waiting_reason{}) + * on (pod) group_left(label_rep_organization, label_rep_partner, + label_rep_workload, pod_name) label_replace(kube_pod_labels, "pod_name", + "$1", "pod", "(.*)") ) + record: rcloud:pod:kube_pod_container_status_waiting_reason + - expr: sum by (pod_name, namespace, container, instance, label_rep_organization, + label_rep_partner, label_rep_workload) ( (kube_pod_container_status_restarts_total{}) + * on (pod) group_left(label_rep_organization, label_rep_partner, + label_rep_workload, pod_name) label_replace(kube_pod_labels, "pod_name", + "$1", "pod", "(.*)") ) + record: rcloud:pod:kube_pod_container_status_restarts_total + - expr: sum by (pod_name, namespace, node, container, instance, label_rep_organization, + label_rep_partner, label_rep_workload) ( (kube_pod_container_resource_limits_cpu_cores{}) + * on (pod) group_left(label_rep_organization, label_rep_partner, + label_rep_workload, pod_name) label_replace(kube_pod_labels, "pod_name", + "$1", "pod", "(.*)") ) + record: rcloud:pod:kube_pod_container_resource_limits_cpu_cores + - expr: sum by (pod_name, namespace, node, container, instance, label_rep_organization, + label_rep_partner, label_rep_workload) ( (kube_pod_container_resource_limits_memory_bytes{}) + * on (pod) group_left(label_rep_organization, label_rep_partner, + label_rep_workload, pod_name) label_replace(kube_pod_labels, "pod_name", + "$1", "pod", "(.*)") ) + record: rcloud:pod:kube_pod_container_resource_limits_memory_bytes +status: + conditions: + - lastUpdateTime: "2019-11-18T21:09:50Z" + reason: all steps complete + status: Complete + type: TaskInit + - lastUpdateTime: "2019-11-18T21:09:53Z" + reason: namespace created + status: Complete + type: TaskletCreate + - lastUpdateTime: "2019-11-18T21:11:42Z" + reason: tasklet complete + status: Complete + type: TaskReady + init: + - jobReason: not configured + jobState: StepJobComplete + name: prometheus-k8s-prometheus-crd + objectReason: object type *v1beta1.CustomResourceDefinition not handled + objectRef: + apiVersion: apiextensions.k8s.io/v1beta1 + kind: CustomResourceDefinition + name: prometheuses.monitoring.coreos.com + resourceVersion: "4207" + uid: b1843d52-0a47-11ea-be30-0aed3d6c8d42 + objectState: StepObjectComplete + reason: complete + state: StepComplete + - jobReason: not configured + jobState: StepJobComplete + name: prometheus-k8s-prometheus-rules-crd + objectReason: object type *v1beta1.CustomResourceDefinition not handled + objectRef: + apiVersion: apiextensions.k8s.io/v1beta1 + kind: CustomResourceDefinition + name: prometheusrules.monitoring.coreos.com + resourceVersion: "4262" + uid: b28f3a1d-0a47-11ea-be30-0aed3d6c8d42 + objectState: StepObjectComplete + reason: complete + state: StepComplete + - jobReason: not configured + jobState: StepJobComplete + name: alertmanager-crd + objectReason: object type *v1beta1.CustomResourceDefinition not handled + objectRef: + apiVersion: apiextensions.k8s.io/v1beta1 + kind: CustomResourceDefinition + name: alertmanagers.monitoring.coreos.com + resourceVersion: "4338" + uid: be81eb5c-0a47-11ea-8c3a-0219fcc74e7c + objectState: StepObjectComplete + reason: complete + state: StepComplete + - jobReason: not configured + jobState: StepJobComplete + name: prometheus-k8s-service-account + objectReason: object type *v1.ServiceAccount not handled + objectRef: + apiVersion: v1 + kind: ServiceAccount + name: prometheus-k8s + namespace: rafay-infra + resourceVersion: "4345" + uid: bfca15e3-0a47-11ea-8c3a-0219fcc74e7c + objectState: StepObjectComplete + reason: complete + state: StepComplete + - jobReason: not configured + jobState: StepJobComplete + name: prometheus-k8s-clusterrole + objectReason: object type *v1.ClusterRole not handled + objectRef: + apiVersion: rbac.authorization.k8s.io/v1 + kind: ClusterRole + name: prometheus-k8s + resourceVersion: "4346" + uid: bfcb903b-0a47-11ea-8c3a-0219fcc74e7c + objectState: StepObjectComplete + reason: complete + state: StepComplete + - jobReason: not configured + jobState: StepJobComplete + name: prometheus-k8s-clusterrolebinding + objectReason: object type *v1.ClusterRoleBinding not handled + objectRef: + apiVersion: rbac.authorization.k8s.io/v1 + kind: ClusterRoleBinding + name: prometheus-k8s + resourceVersion: "4350" + uid: bfd06590-0a47-11ea-8c3a-0219fcc74e7c + objectState: StepObjectComplete + reason: complete + state: StepComplete + - jobReason: not configured + jobState: StepJobComplete + name: prometheus-k8s-roleconfig + objectReason: object type *v1.Role not handled + objectRef: + apiVersion: rbac.authorization.k8s.io/v1 + kind: Role + name: prometheus-k8s-config + namespace: rafay-infra + resourceVersion: "4351" + uid: bfd1918a-0a47-11ea-8c3a-0219fcc74e7c + objectState: StepObjectComplete + reason: complete + state: StepComplete + - jobReason: not configured + jobState: StepJobComplete + name: prometheus-k8s-role-default + objectReason: object type *v1.Role not handled + objectRef: + apiVersion: rbac.authorization.k8s.io/v1 + kind: Role + name: prometheus-k8s + namespace: default + resourceVersion: "4352" + uid: bfe00568-0a47-11ea-8c3a-0219fcc74e7c + objectState: StepObjectComplete + reason: complete + state: StepComplete + - jobReason: not configured + jobState: StepJobComplete + name: prometheus-k8s-role-kube-system + objectReason: object type *v1.Role not handled + objectRef: + apiVersion: rbac.authorization.k8s.io/v1 + kind: Role + name: prometheus-k8s + namespace: kube-system + resourceVersion: "4353" + uid: bfe1734d-0a47-11ea-8c3a-0219fcc74e7c + objectState: StepObjectComplete + reason: complete + state: StepComplete + - jobReason: not configured + jobState: StepJobComplete + name: prometheus-k8s-role-rafay-infra + objectReason: object type *v1.Role not handled + objectRef: + apiVersion: rbac.authorization.k8s.io/v1 + kind: Role + name: prometheus-k8s + namespace: rafay-infra + resourceVersion: "4354" + uid: bfe3792f-0a47-11ea-8c3a-0219fcc74e7c + objectState: StepObjectComplete + reason: complete + state: StepComplete + - jobReason: not configured + jobState: StepJobComplete + name: prometheus-k8s-rolebindingconfig + objectReason: object type *v1.RoleBinding not handled + objectRef: + apiVersion: rbac.authorization.k8s.io/v1 + kind: RoleBinding + name: prometheus-k8s-config + namespace: rafay-infra + resourceVersion: "4355" + uid: bfe4dbec-0a47-11ea-8c3a-0219fcc74e7c + objectState: StepObjectComplete + reason: complete + state: StepComplete + - jobReason: not configured + jobState: StepJobComplete + name: prometheus-k8s-rolebinding-default + objectReason: object type *v1.RoleBinding not handled + objectRef: + apiVersion: rbac.authorization.k8s.io/v1 + kind: RoleBinding + name: prometheus-k8s + namespace: default + resourceVersion: "4356" + uid: bfe6555b-0a47-11ea-8c3a-0219fcc74e7c + objectState: StepObjectComplete + reason: complete + state: StepComplete + - jobReason: not configured + jobState: StepJobComplete + name: prometheus-k8s-rolebinding-kube-system + objectReason: object type *v1.RoleBinding not handled + objectRef: + apiVersion: rbac.authorization.k8s.io/v1 + kind: RoleBinding + name: prometheus-k8s + namespace: kube-system + resourceVersion: "4358" + uid: bfef8fa1-0a47-11ea-8c3a-0219fcc74e7c + objectState: StepObjectComplete + reason: complete + state: StepComplete + - jobReason: not configured + jobState: StepJobComplete + name: prometheus-k8s-rolebinding-rafay-infra + objectReason: object type *v1.RoleBinding not handled + objectRef: + apiVersion: rbac.authorization.k8s.io/v1 + kind: RoleBinding + name: prometheus-k8s + namespace: rafay-infra + resourceVersion: "4359" + uid: bff0fd0d-0a47-11ea-8c3a-0219fcc74e7c + objectState: StepObjectComplete + reason: complete + state: StepComplete + - jobReason: not configured + jobState: StepJobComplete + name: prometheus-operator-serviceaccount + objectReason: object type *v1.ServiceAccount not handled + objectRef: + apiVersion: v1 + kind: ServiceAccount + name: prometheus-operator + namespace: rafay-infra + resourceVersion: "4360" + uid: bff248c3-0a47-11ea-8c3a-0219fcc74e7c + objectState: StepObjectComplete + reason: complete + state: StepComplete + - jobReason: not configured + jobState: StepJobComplete + name: prometheus-operator-clusterrole + objectReason: object type *v1.ClusterRole not handled + objectRef: + apiVersion: rbac.authorization.k8s.io/v1 + kind: ClusterRole + name: prometheus-operator + resourceVersion: "4361" + uid: bff3a3ad-0a47-11ea-8c3a-0219fcc74e7c + objectState: StepObjectComplete + reason: complete + state: StepComplete + - jobReason: not configured + jobState: StepJobComplete + name: prometheus-operator-clusterrole-binding + objectReason: object type *v1.ClusterRoleBinding not handled + objectRef: + apiVersion: rbac.authorization.k8s.io/v1 + kind: ClusterRoleBinding + name: prometheus-operator + resourceVersion: "4364" + uid: bff4fa8d-0a47-11ea-8c3a-0219fcc74e7c + objectState: StepObjectComplete + reason: complete + state: StepComplete + - jobReason: not configured + jobState: StepJobComplete + name: prometheus-operator-servicemonitor + objectReason: object type *unstructured.Unstructured not handled + objectRef: + apiVersion: monitoring.coreos.com/v1 + kind: ServiceMonitor + name: prometheus-operator + namespace: rafay-infra + resourceVersion: "4365" + uid: bff65354-0a47-11ea-8c3a-0219fcc74e7c + objectState: StepObjectComplete + reason: complete + state: StepComplete + - jobReason: not configured + jobState: StepJobComplete + name: alertmanager-service-account + objectReason: object type *v1.ServiceAccount not handled + objectRef: + apiVersion: v1 + kind: ServiceAccount + name: alertmanager-main + namespace: rafay-infra + resourceVersion: "4366" + uid: bff799f4-0a47-11ea-8c3a-0219fcc74e7c + objectState: StepObjectComplete + reason: complete + state: StepComplete + - jobReason: not configured + jobState: StepJobComplete + name: alertmanager-main-secret + objectReason: object type *v1.Secret not handled + objectRef: + apiVersion: v1 + kind: Secret + name: alertmanager-main + namespace: rafay-infra + resourceVersion: "4367" + uid: bff8f244-0a47-11ea-8c3a-0219fcc74e7c + objectState: StepObjectComplete + reason: complete + state: StepComplete + - jobReason: not configured + jobState: StepJobComplete + name: kube-state-metrics-service-account + objectReason: object type *v1.ServiceAccount not handled + objectRef: + apiVersion: v1 + kind: ServiceAccount + name: kube-state-metrics + namespace: rafay-infra + resourceVersion: "4370" + uid: bffeb3cb-0a47-11ea-8c3a-0219fcc74e7c + objectState: StepObjectComplete + reason: complete + state: StepComplete + - jobReason: not configured + jobState: StepJobComplete + name: kube-state-metrics-cluster-role + objectReason: object type *v1.ClusterRole not handled + objectRef: + apiVersion: rbac.authorization.k8s.io/v1 + kind: ClusterRole + name: kube-state-metrics + resourceVersion: "4371" + uid: bffffcdc-0a47-11ea-8c3a-0219fcc74e7c + objectState: StepObjectComplete + reason: complete + state: StepComplete + - jobReason: not configured + jobState: StepJobComplete + name: kube-state-metrics-cluster-role-binding + objectReason: object type *v1.ClusterRoleBinding not handled + objectRef: + apiVersion: rbac.authorization.k8s.io/v1 + kind: ClusterRoleBinding + name: kube-state-metrics + resourceVersion: "4374" + uid: c001740f-0a47-11ea-8c3a-0219fcc74e7c + objectState: StepObjectComplete + reason: complete + state: StepComplete + - jobReason: not configured + jobState: StepJobComplete + name: kube-state-metrics-role + objectReason: object type *v1.Role not handled + objectRef: + apiVersion: rbac.authorization.k8s.io/v1 + kind: Role + name: kube-state-metrics + namespace: rafay-infra + resourceVersion: "4375" + uid: c0027a33-0a47-11ea-8c3a-0219fcc74e7c + objectState: StepObjectComplete + reason: complete + state: StepComplete + - jobReason: not configured + jobState: StepJobComplete + name: kube-state-metrics-rolebinding + objectReason: object type *v1.RoleBinding not handled + objectRef: + apiVersion: rbac.authorization.k8s.io/v1 + kind: RoleBinding + name: kube-state-metrics + namespace: rafay-infra + resourceVersion: "4376" + uid: c00399d7-0a47-11ea-8c3a-0219fcc74e7c + objectState: StepObjectComplete + reason: complete + state: StepComplete + - jobReason: not configured + jobState: StepJobComplete + name: node-exporter-serviceaccount + objectReason: object type *v1.ServiceAccount not handled + objectRef: + apiVersion: v1 + kind: ServiceAccount + name: node-exporter + namespace: rafay-infra + resourceVersion: "4377" + uid: c0050866-0a47-11ea-8c3a-0219fcc74e7c + objectState: StepObjectComplete + reason: complete + state: StepComplete + - jobReason: not configured + jobState: StepJobComplete + name: node-exporter-cluster-role + objectReason: object type *v1.ClusterRole not handled + objectRef: + apiVersion: rbac.authorization.k8s.io/v1 + kind: ClusterRole + name: node-exporter + resourceVersion: "4378" + uid: c0065120-0a47-11ea-8c3a-0219fcc74e7c + objectState: StepObjectComplete + reason: complete + state: StepComplete + - jobReason: not configured + jobState: StepJobComplete + name: node-exporter-cluster-role-binding + objectReason: object type *v1.ClusterRoleBinding not handled + objectRef: + apiVersion: rbac.authorization.k8s.io/v1 + kind: ClusterRoleBinding + name: node-exporter + resourceVersion: "4381" + uid: c00e0171-0a47-11ea-8c3a-0219fcc74e7c + objectState: StepObjectComplete + reason: complete + state: StepComplete + - jobReason: not configured + jobState: StepJobComplete + name: prometheus-adapter-service-account + objectReason: object type *v1.ServiceAccount not handled + objectRef: + apiVersion: v1 + kind: ServiceAccount + name: prometheus-adapter + namespace: rafay-infra + resourceVersion: "4382" + uid: c00f3ed8-0a47-11ea-8c3a-0219fcc74e7c + objectState: StepObjectComplete + reason: complete + state: StepComplete + - jobReason: not configured + jobState: StepJobComplete + name: prometheus-adapter-cluster-role + objectReason: object type *v1.ClusterRole not handled + objectRef: + apiVersion: rbac.authorization.k8s.io/v1 + kind: ClusterRole + name: prometheus-adapter + resourceVersion: "4383" + uid: c0107e0b-0a47-11ea-8c3a-0219fcc74e7c + objectState: StepObjectComplete + reason: complete + state: StepComplete + - jobReason: not configured + jobState: StepJobComplete + name: prometheus-adapter-cluster-role-binding + objectReason: object type *v1.ClusterRoleBinding not handled + objectRef: + apiVersion: rbac.authorization.k8s.io/v1 + kind: ClusterRoleBinding + name: prometheus-adapter + namespace: rafay-infra + resourceVersion: "4386" + uid: c011c005-0a47-11ea-8c3a-0219fcc74e7c + objectState: StepObjectComplete + reason: complete + state: StepComplete + - jobReason: not configured + jobState: StepJobComplete + name: prometheus-adapter-cluster-role-binding-delegator + objectReason: object type *v1.ClusterRoleBinding not handled + objectRef: + apiVersion: rbac.authorization.k8s.io/v1 + kind: ClusterRoleBinding + name: resource-metrics:system:auth-delegator + resourceVersion: "4387" + uid: c012f52b-0a47-11ea-8c3a-0219fcc74e7c + objectState: StepObjectComplete + reason: complete + state: StepComplete + - jobReason: not configured + jobState: StepJobComplete + name: prometheus-adapter-cluster-role-server-resources + objectReason: object type *v1.ClusterRole not handled + objectRef: + apiVersion: rbac.authorization.k8s.io/v1 + kind: ClusterRole + name: resource-metrics-server-resources + resourceVersion: "4388" + uid: c0143b9e-0a47-11ea-8c3a-0219fcc74e7c + objectState: StepObjectComplete + reason: complete + state: StepComplete + - jobReason: not configured + jobState: StepJobComplete + name: prometheus-adapter-configmap + objectReason: object type *v1.ConfigMap not handled + objectRef: + apiVersion: v1 + kind: ConfigMap + name: adapter-config + namespace: rafay-infra + resourceVersion: "4389" + uid: c01581ce-0a47-11ea-8c3a-0219fcc74e7c + objectState: StepObjectComplete + reason: complete + state: StepComplete + - jobReason: not configured + jobState: StepJobComplete + name: prometheus-adapter-role-binding-auth-reader + objectReason: object type *v1.RoleBinding not handled + objectRef: + apiVersion: rbac.authorization.k8s.io/v1 + kind: RoleBinding + name: resource-metrics-auth-reader + namespace: kube-system + resourceVersion: "4390" + uid: c01d5364-0a47-11ea-8c3a-0219fcc74e7c + objectState: StepObjectComplete + reason: complete + state: StepComplete + - jobReason: not configured + jobState: StepJobComplete + name: prometheus-k8s-edge-creds-configmap + objectReason: object type *v1.Secret not handled + objectRef: + apiVersion: v1 + kind: Secret + name: edge-creds + namespace: rafay-infra + resourceVersion: "4391" + uid: c01ebd57-0a47-11ea-8c3a-0219fcc74e7c + objectState: StepObjectComplete + reason: complete + state: StepComplete + observedGeneration: 1 + taskletRef: + apiVersion: cluster.rafay.dev/v2 + kind: Tasklet + name: v1-prometheus + namespace: rafay-infra + resourceVersion: "4456" + uid: c3930f90-0a47-11ea-8c3a-0219fcc74e7c diff --git a/components/common/pkg/controller/apply/testdata/rafay-system-ns.yaml b/components/common/pkg/controller/apply/testdata/rafay-system-ns.yaml new file mode 100644 index 0000000..79714e7 --- /dev/null +++ b/components/common/pkg/controller/apply/testdata/rafay-system-ns.yaml @@ -0,0 +1,499 @@ +apiVersion: cluster.rafay.dev/v2 +kind: Namespace +metadata: + annotations: + rafay.dev/object-hash: avinash-test + label-1: test + rafay.dev/pruned: "null" + rafay.dev/random: jcoVQsZEXH + rafay.dev/resource-hash: 4fc5c12346ea0fb4ac19cca416fbaffb3c77a0ace763c2ad37510c0cca274af1 + rep-drift-action: deny + creationTimestamp: "2021-09-15T05:00:18Z" + finalizers: + - cluster.rafay.dev.v2.predelete + generation: 1 + labels: + rafay.dev/global: "true" + rafay.dev/modified-sa: "true" + rafay.dev/psp: rafay-privileged-psp + rafay.dev/system: "true" + rep-drift-reconcillation: enabled + managedFields: + - apiVersion: cluster.rafay.dev/v2 + fieldsType: FieldsV1 + fieldsV1: + f:spec: + f:init: {} + f:namespaceMeta: {} + f:status: + .: {} + f:conditions: {} + f:init: {} + f:namespaceRef: {} + f:observedGeneration: {} + f:postCreate: {} + manager: manager + operation: Update + time: "2021-09-15T05:00:18Z" + - apiVersion: cluster.rafay.dev/v2 + fieldsType: FieldsV1 + fieldsV1: + f:metadata: + f:annotations: + .: {} + f:rafay.dev/object-hash: {} + f:rafay.dev/pruned: {} + f:rafay.dev/random: {} + f:rafay.dev/resource-hash: {} + f:rep-drift-action: {} + f:finalizers: + .: {} + v:"cluster.rafay.dev.v2.predelete": {} + f:labels: + .: {} + f:rafay.dev/global: {} + f:rafay.dev/modified-sa: {} + f:rafay.dev/psp: {} + f:rafay.dev/system: {} + f:rep-drift-reconcillation: {} + f:spec: + .: {} + f:postCreate: {} + manager: rafay-connector + operation: Update + time: "2021-09-15T05:00:18Z" + name: rafay-system + namespace: default + resourceVersion: "1272" + uid: e4550a5c-a2ef-4277-8283-0f4e3478970c +spec: + init: + - name: create-manager-cluster-role + object: + apiVersion: rbac.authorization.k8s.io/v1 + kind: ClusterRole + metadata: + annotations: + rafay.dev/original: '{"kind":"ClusterRole","rules":[{"verbs":["*"],"apiGroups":["*"],"resources":["*"]},{"verbs":["*"],"nonResourceURLs":["*"]},{"verbs":["create","delete","get","list","patch","update","watch"],"apiGroups":["cluster.rafay.dev"],"resources":["namespaces"]},{"verbs":["get","patch","update"],"apiGroups":["cluster.rafay.dev"],"resources":["namespaces/status"]},{"verbs":["create","delete","get","list","patch","update","watch"],"apiGroups":["cluster.rafay.dev"],"resources":["tasklets"]},{"verbs":["get","patch","update"],"apiGroups":["cluster.rafay.dev"],"resources":["tasklets/status"]},{"verbs":["create","delete","get","list","patch","update","watch"],"apiGroups":["cluster.rafay.dev"],"resources":["tasks"]},{"verbs":["get","patch","update"],"apiGroups":["cluster.rafay.dev"],"resources":["tasks/status"]}],"metadata":{"name":"rafay:manager","creationTimestamp":null,"labels":{"rep-drift-reconcillation":"enabled"},"annotations":{"rep-drift-action":"deny"}},"apiVersion":"rbac.authorization.k8s.io/v1"}' + rep-drift-action: deny + creationTimestamp: null + labels: + rep-drift-reconcillation: enabled + name: rafay:manager + rules: + - apiGroups: + - '*' + resources: + - '*' + verbs: + - '*' + - nonResourceURLs: + - '*' + verbs: + - '*' + - apiGroups: + - cluster.rafay.dev + resources: + - namespaces + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - cluster.rafay.dev + resources: + - namespaces/status + verbs: + - get + - patch + - update + - apiGroups: + - cluster.rafay.dev + resources: + - tasklets + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - cluster.rafay.dev + resources: + - tasklets/status + verbs: + - get + - patch + - update + - apiGroups: + - cluster.rafay.dev + resources: + - tasks + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - cluster.rafay.dev + resources: + - tasks/status + verbs: + - get + - patch + - update + - name: create-proxy-cluster-role + object: + apiVersion: rbac.authorization.k8s.io/v1 + kind: ClusterRole + metadata: + annotations: + rafay.dev/original: '{"kind":"ClusterRole","rules":[{"verbs":["create"],"apiGroups":["authentication.k8s.io"],"resources":["tokenreviews"]},{"verbs":["create"],"apiGroups":["authorization.k8s.io"],"resources":["subjectaccessreviews"]}],"metadata":{"name":"rafay:proxy-role","labels":{"rep-drift-reconcillation":"enabled"},"annotations":{"rep-drift-action":"deny"}},"apiVersion":"rbac.authorization.k8s.io/v1"}' + rep-drift-action: deny + labels: + rep-drift-reconcillation: enabled + name: rafay:proxy-role + rules: + - apiGroups: + - authentication.k8s.io + resources: + - tokenreviews + verbs: + - create + - apiGroups: + - authorization.k8s.io + resources: + - subjectaccessreviews + verbs: + - create + namespaceMeta: + annotations: + rep-drift-action: deny + role: rafay-system + creationTimestamp: null + labels: + control-plane: controller-manager + rafay.dev/global: "true" + rafay.dev/modified-sa: "true" + rafay.dev/psp: rafay-privileged-psp + rafay.dev/system: "true" + rep-drift-reconcillation: enabled + role: rafay-system + name: rafay-system + postCreate: + - name: create-system-sa-serviceaccount + object: + apiVersion: v1 + kind: ServiceAccount + metadata: + annotations: + rafay.dev/original: '{"kind":"ServiceAccount","metadata":{"name":"system-sa","namespace":"rafay-system","labels":{"rep-drift-reconcillation":"enabled"},"annotations":{"rep-drift-action":"deny"}},"apiVersion":"v1"}' + rep-drift-action: deny + labels: + rep-drift-reconcillation: enabled + name: system-sa + namespace: rafay-system + - name: create-leader-election-role + object: + apiVersion: rbac.authorization.k8s.io/v1 + kind: Role + metadata: + annotations: + rafay.dev/original: '{"kind":"Role","rules":[{"verbs":["get","list","watch","create","update","patch","delete"],"apiGroups":[""],"resources":["configmaps"]},{"verbs":["get","update","patch"],"apiGroups":[""],"resources":["configmaps/status"]},{"verbs":["create"],"apiGroups":[""],"resources":["events"]}],"metadata":{"name":"rafay:leader-election-role","namespace":"rafay-system","labels":{"rep-drift-reconcillation":"enabled"},"annotations":{"rep-drift-action":"deny"}},"apiVersion":"rbac.authorization.k8s.io/v1"}' + rep-drift-action: deny + labels: + rep-drift-reconcillation: enabled + name: rafay:leader-election-role + namespace: rafay-system + rules: + - apiGroups: + - "" + resources: + - configmaps + verbs: + - get + - list + - watch + - create + - update + - patch + - delete + - apiGroups: + - "" + resources: + - configmaps/status + verbs: + - get + - update + - patch + - apiGroups: + - "" + resources: + - events + verbs: + - create + - name: create-leaderelection-role-binding + object: + apiVersion: rbac.authorization.k8s.io/v1 + kind: RoleBinding + metadata: + annotations: + rafay.dev/original: '{"kind":"RoleBinding","roleRef":{"kind":"Role","name":"rafay:leader-election-role","apiGroup":"rbac.authorization.k8s.io"},"metadata":{"name":"rafay:leader-election-rolebinding","namespace":"rafay-system","labels":{"rep-drift-reconcillation":"enabled"},"annotations":{"rep-drift-action":"deny"}},"subjects":[{"kind":"ServiceAccount","name":"system-sa","namespace":"rafay-system"},{"kind":"ServiceAccount","name":"default","namespace":"rafay-system"}],"apiVersion":"rbac.authorization.k8s.io/v1"}' + rep-drift-action: deny + labels: + rep-drift-reconcillation: enabled + name: rafay:leader-election-rolebinding + namespace: rafay-system + roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: rafay:leader-election-role + subjects: + - kind: ServiceAccount + name: system-sa + namespace: rafay-system + - kind: ServiceAccount + name: default + namespace: rafay-system + - name: create-manager-role-binding + object: + apiVersion: rbac.authorization.k8s.io/v1 + kind: ClusterRoleBinding + metadata: + annotations: + rafay.dev/original: '{"kind":"ClusterRoleBinding","roleRef":{"kind":"ClusterRole","name":"rafay:manager","apiGroup":"rbac.authorization.k8s.io"},"metadata":{"name":"rafay:rafay-system:manager-rolebinding","labels":{"rep-drift-reconcillation":"enabled"},"annotations":{"rep-drift-action":"deny"}},"subjects":[{"kind":"ServiceAccount","name":"system-sa","namespace":"rafay-system"},{"kind":"ServiceAccount","name":"default","namespace":"rafay-system"}],"apiVersion":"rbac.authorization.k8s.io/v1"}' + rep-drift-action: deny + labels: + rep-drift-reconcillation: enabled + name: rafay:rafay-system:manager-rolebinding + roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: rafay:manager + subjects: + - kind: ServiceAccount + name: system-sa + namespace: rafay-system + - kind: ServiceAccount + name: default + namespace: rafay-system + - name: create-proxy-role-binding + object: + apiVersion: rbac.authorization.k8s.io/v1 + kind: ClusterRoleBinding + metadata: + annotations: + rafay.dev/original: '{"kind":"ClusterRoleBinding","roleRef":{"kind":"ClusterRole","name":"rafay:proxy-role","apiGroup":"rbac.authorization.k8s.io"},"metadata":{"name":"rafay:rafay-system:proxy-rolebinding","labels":{"rep-drift-reconcillation":"enabled"},"annotations":{"rep-drift-action":"deny"}},"subjects":[{"kind":"ServiceAccount","name":"system-sa","namespace":"rafay-system"},{"kind":"ServiceAccount","name":"default","namespace":"rafay-system"}],"apiVersion":"rbac.authorization.k8s.io/v1"}' + rep-drift-action: deny + labels: + rep-drift-reconcillation: enabled + name: rafay:rafay-system:proxy-rolebinding + roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: rafay:proxy-role + subjects: + - kind: ServiceAccount + name: system-sa + namespace: rafay-system + - kind: ServiceAccount + name: default + namespace: rafay-system + - name: create-access-log-configmap_v2_1 + object: + apiVersion: v1 + data: + fluent.conf: | + + @type forward + require_ack_response true + ack_response_timeout 190 + + @type memory + flush_mode interval + retry_type exponential_backoff + flush_thread_count 2 + flush_interval 60s + retry_forever false + retry_max_interval 1h + retry_timeout 32h + retry_max_times 17 + retry_randomize true + chunk_limit_size 5M + queue_limit_length 8 + overflow_action block + + + host log-aggregator.rafay-infra.svc.cluster.local + port 24224 + + + kind: ConfigMap + metadata: + annotations: + rafay.dev/original: '{"data":{"fluent.conf":"\n @type + forward\n require_ack_response true\n ack_response_timeout 190\n \n @type + memory\n flush_mode interval\n retry_type exponential_backoff\n flush_thread_count + 2\n flush_interval 60s\n retry_forever false\n retry_max_interval + 1h\n retry_timeout 32h\n retry_max_times 17\n retry_randomize + true\n chunk_limit_size 5M\n queue_limit_length 8\n overflow_action + block\n \n \n host log-aggregator.rafay-infra.svc.cluster.local\n port + 24224\n \n\n"},"kind":"ConfigMap","metadata":{"name":"rafay-ingress-log-config","labels":{"logger":"rafay-logger","rep-drift-reconcillation":"enabled"},"namespace":"rafay-system","annotations":{"rep-drift-action":"deny"}},"apiVersion":"v1"}' + rep-drift-action: deny + labels: + logger: rafay-logger + rep-drift-reconcillation: enabled + name: rafay-ingress-log-config + namespace: rafay-system +status: + conditions: + - lastUpdateTime: "2021-09-15T05:00:18Z" + reason: all steps complete + status: Complete + type: NamespaceInit + - lastUpdateTime: "2021-09-15T05:00:18Z" + reason: namespace created + status: Complete + type: NamespaceCreate + - lastUpdateTime: "2021-09-15T05:00:18Z" + reason: all steps complete + status: Complete + type: NamespacePostCreate + - lastUpdateTime: "2021-09-15T05:00:18Z" + reason: all steps complete + status: Complete + type: NamespaceReady + init: + - jobReason: not configured + jobState: StepJobComplete + name: create-manager-cluster-role + objectReason: object type *v1.ClusterRole not handled + objectRef: + apiVersion: rbac.authorization.k8s.io/v1 + kind: ClusterRole + name: rafay:manager + resourceVersion: "1258" + uid: 855e1d07-8a75-47be-9e98-d03810f634a6 + objectSpecHash: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 + objectState: StepObjectComplete + reason: complete + state: StepComplete + - jobReason: not configured + jobState: StepJobComplete + name: create-proxy-cluster-role + objectReason: object type *v1.ClusterRole not handled + objectRef: + apiVersion: rbac.authorization.k8s.io/v1 + kind: ClusterRole + name: rafay:proxy-role + resourceVersion: "1259" + uid: abf1cc60-8f9a-4fad-be5d-5551fc6c236a + objectSpecHash: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 + objectState: StepObjectComplete + reason: complete + state: StepComplete + namespaceRef: + apiVersion: v1 + kind: Namespace + name: rafay-system + resourceVersion: "1262" + uid: 574a3611-2ab8-436f-999a-f463360e5d3d + observedGeneration: 1 + postCreate: + - jobReason: not configured + jobState: StepJobComplete + name: create-system-sa-serviceaccount + objectReason: object type *v1.ServiceAccount not handled + objectRef: + apiVersion: v1 + kind: ServiceAccount + name: system-sa + namespace: rafay-system + resourceVersion: "1265" + uid: f1981c17-775d-4138-8633-776ad49fb586 + objectSpecHash: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 + objectState: StepObjectComplete + reason: complete + state: StepComplete + - jobReason: not configured + jobState: StepJobComplete + name: create-leader-election-role + objectReason: object type *v1.Role not handled + objectRef: + apiVersion: rbac.authorization.k8s.io/v1 + kind: Role + name: rafay:leader-election-role + namespace: rafay-system + resourceVersion: "1266" + uid: 3afaf464-0b94-4116-9bcc-93a4978174c6 + objectSpecHash: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 + objectState: StepObjectComplete + reason: complete + state: StepComplete + - jobReason: not configured + jobState: StepJobComplete + name: create-leaderelection-role-binding + objectReason: object type *v1.RoleBinding not handled + objectRef: + apiVersion: rbac.authorization.k8s.io/v1 + kind: RoleBinding + name: rafay:leader-election-rolebinding + namespace: rafay-system + resourceVersion: "1267" + uid: 12551dfd-7143-4e83-a0a6-0c4ab1e1d4fe + objectSpecHash: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 + objectState: StepObjectComplete + reason: complete + state: StepComplete + - jobReason: not configured + jobState: StepJobComplete + name: create-manager-role-binding + objectReason: object type *v1.ClusterRoleBinding not handled + objectRef: + apiVersion: rbac.authorization.k8s.io/v1 + kind: ClusterRoleBinding + name: rafay:rafay-system:manager-rolebinding + resourceVersion: "1268" + uid: 2fe8a87a-d571-4997-b22e-a6da5bdcbe49 + objectSpecHash: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 + objectState: StepObjectComplete + reason: complete + state: StepComplete + - jobReason: not configured + jobState: StepJobComplete + name: create-proxy-role-binding + objectReason: object type *v1.ClusterRoleBinding not handled + objectRef: + apiVersion: rbac.authorization.k8s.io/v1 + kind: ClusterRoleBinding + name: rafay:rafay-system:proxy-rolebinding + resourceVersion: "1269" + uid: 7f3c4c02-cd90-40c0-8663-5f156c50e6c3 + objectSpecHash: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 + objectState: StepObjectComplete + reason: complete + state: StepComplete + - jobReason: not configured + jobState: StepJobComplete + name: create-access-log-configmap_v2_1 + objectReason: object type *v1.ConfigMap not handled + objectRef: + apiVersion: v1 + kind: ConfigMap + name: rafay-ingress-log-config + namespace: rafay-system + resourceVersion: "1270" + uid: e86e3ea0-a3b2-4187-b552-c18e5f6ca30f + objectSpecHash: d26d566c010b3b8a7dde8ef1a406a961c8839d60951b08cbd8d34c1c885c6cd2 + objectState: StepObjectComplete + reason: complete + state: StepComplete \ No newline at end of file diff --git a/components/common/pkg/controller/apply/testdata/service1-current.yaml b/components/common/pkg/controller/apply/testdata/service1-current.yaml new file mode 100644 index 0000000..affbd0d --- /dev/null +++ b/components/common/pkg/controller/apply/testdata/service1-current.yaml @@ -0,0 +1,55 @@ +apiVersion: v1 +kind: Service +metadata: + annotations: + rafay.dev/original: '{"kind": "Service", "spec": {"type": "ClusterIP", "ports": + [{"name": "log-aggregator-tcp", "port": 8888, "nodePort": null, "protocol": + "TCP", "targetPort": 8888}, {"name": "log-aggregator-udp", "port": 5140, "nodePort": + null, "protocol": "UDP", "targetPort": 5140}, {"name": "log-aggregator-fwd", + "port": 24224, "nodePort": null, "protocol": "TCP", "targetPort": 24224}, {"name": + "prometheus", "port": 24231, "nodePort": null, "protocol": "TCP", "targetPort": + 24231}], "selector": {"app": "log-aggregator"}}, "metadata": {"name": "log-aggregator", + "namespace": "rafay-infra", "annotations": {"rafay.dev/previous": "{\"kind\": + \"Service\", \"spec\": {\"type\": \"ClusterIP\", \"ports\": [{\"name\": \"log-aggregator-tcp\", + \"port\": 8888, \"protocol\": \"TCP\", \"targetPort\": 8888}, {\"name\": \"log-aggregator-udp\", + \"port\": 5140, \"protocol\": \"UDP\", \"targetPort\": 5140}, {\"name\": \"log-aggregator-fwd\", + \"port\": 24224, \"protocol\": \"TCP\", \"targetPort\": 24224}, {\"name\": \"prometheus\", + \"port\": 24231, \"protocol\": \"TCP\", \"targetPort\": 24231}], \"selector\": + {\"app\": \"log-aggregator\"}}, \"metadata\": {\"name\": \"log-aggregator\", + \"namespace\": \"rafay-infra\"}, \"apiVersion\": \"v1\"}"}}, "apiVersion": "v1"}' + creationTimestamp: "2020-02-12T21:49:41Z" + name: log-aggregator + namespace: default + resourceVersion: "341295" + selfLink: /api/v1/namespaces/default/services/log-aggregator + uid: 0c1409f9-eed0-4f1d-9c29-128540ee6db4 +spec: + clusterIP: 10.43.88.175 + externalTrafficPolicy: Cluster + ports: + - name: log-aggregator-tcp + nodePort: 31285 + port: 8888 + protocol: TCP + targetPort: 8888 + - name: log-aggregator-udp + nodePort: 32198 + port: 5140 + protocol: UDP + targetPort: 5140 + - name: log-aggregator-fwd + nodePort: 30669 + port: 24224 + protocol: TCP + targetPort: 24224 + - name: prometheus + nodePort: 30320 + port: 24231 + protocol: TCP + targetPort: 24231 + selector: + app: log-aggregator + sessionAffinity: None + type: NodePort +status: + loadBalancer: {} \ No newline at end of file diff --git a/components/common/pkg/controller/apply/testdata/service1-modified.yaml b/components/common/pkg/controller/apply/testdata/service1-modified.yaml new file mode 100644 index 0000000..954eacf --- /dev/null +++ b/components/common/pkg/controller/apply/testdata/service1-modified.yaml @@ -0,0 +1,48 @@ +apiVersion: v1 +kind: Service +metadata: + name: log-aggregator + namespace: default +spec: + ports: + - name: log-aggregator-tcp + nodePort: 0 + port: 8888 + protocol: TCP + targetPort: 8888 + - name: log-aggregator-udp + nodePort: 0 + port: 5140 + protocol: UDP + targetPort: 5140 + - name: log-aggregator-fwd + nodePort: 0 + port: 24224 + protocol: TCP + targetPort: 24224 + - name: prometheus + nodePort: 0 + port: 24231 + protocol: TCP + targetPort: 24231 + selector: + app: log-aggregator + + + + + + + + + + + + + + + + + + + diff --git a/components/common/pkg/controller/apply/testdata/service2-current.yaml b/components/common/pkg/controller/apply/testdata/service2-current.yaml new file mode 100644 index 0000000..9ca35fc --- /dev/null +++ b/components/common/pkg/controller/apply/testdata/service2-current.yaml @@ -0,0 +1,30 @@ +apiVersion: v1 +kind: Service +metadata: + annotations: + rafay.dev/original: | + {"apiVersion":"v1","kind":"Service","metadata":{"annotations":{"service.beta.kubernetes.io/aws-load-balancer-internal":"0.0.0.0/0"},"name":"device-manager-service","namespace":"default"},"spec":{"ports":[{"name":"grpc","port":55050}],"selector":{"app":"device-manager-service"},"type":"LoadBalancer"}} + service.beta.kubernetes.io/aws-load-balancer-internal: 0.0.0.0/0 + creationTimestamp: "2020-02-12T23:52:46Z" + name: device-manager-service + namespace: default + resourceVersion: "346679" + selfLink: /api/v1/namespaces/default/services/device-manager-service + uid: a8125b03-c881-4940-95be-fa3fd1e9555b +spec: + clusterIP: 10.43.163.228 + externalTrafficPolicy: Cluster + ports: + - name: grpc + nodePort: 31963 + port: 55050 + protocol: TCP + targetPort: 55050 + selector: + app: device-manager-service + sessionAffinity: None + type: LoadBalancer +status: + loadBalancer: + ingress: + - ip: 172.18.0.2 \ No newline at end of file diff --git a/components/common/pkg/controller/apply/testdata/service2-modified.yaml b/components/common/pkg/controller/apply/testdata/service2-modified.yaml new file mode 100644 index 0000000..d30cb87 --- /dev/null +++ b/components/common/pkg/controller/apply/testdata/service2-modified.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + name: device-manager-service + namespace: default +spec: + ports: + - name: grpc + port: 55050 + nodePort: 0 + selector: + app: device-manager-service + #type: ClusterIP + diff --git a/components/common/pkg/controller/apply/testdata/statefulset-patch.yaml b/components/common/pkg/controller/apply/testdata/statefulset-patch.yaml new file mode 100644 index 0000000..3088ee8 --- /dev/null +++ b/components/common/pkg/controller/apply/testdata/statefulset-patch.yaml @@ -0,0 +1,34 @@ +apiVersion: apps/v1 +kind: StatefulSet +metadata: + annotations: + rafay.dev/overridedBy: global/global-override + name: rafay-connector + namespace: default +spec: + replicas: 1 + selector: + matchLabels: + app: rafay-connector + serviceName: "connector" + template: + metadata: + labels: + app: rafay-connector + spec: + containers: + - image: rafaysystems/rafay-connector:latest + imagePullPolicy: Always + name: connector + resources: {} + volumeMounts: + - mountPath: /etc/config + name: connector-config + priorityClassName: rafay-cluster-critical + terminationGracePeriodSeconds: 10 + volumes: + - configMap: + name: connector-config + name: connector-config +status: + replicas: 0 \ No newline at end of file diff --git a/components/common/pkg/controller/apply/testdata/statefulset.yaml b/components/common/pkg/controller/apply/testdata/statefulset.yaml new file mode 100644 index 0000000..c720cba --- /dev/null +++ b/components/common/pkg/controller/apply/testdata/statefulset.yaml @@ -0,0 +1,56 @@ +apiVersion: apps/v1 +kind: StatefulSet +metadata: + annotations: + kubectl.kubernetes.io/last-applied-configuration: | + {"apiVersion":"apps/v1","kind":"StatefulSet","metadata":{"annotations":{},"name":"rafay-connector","namespace":"rafay-system"},"spec":{"replicas":1,"selector":{"matchLabels":{"app":"rafay-connector"}},"serviceName":"connector","template":{"metadata":{"labels":{"app":"rafay-connector"}},"spec":{"containers":[{"image":"rafaysystems/rafay-connector:latest","name":"connector","volumeMounts":[{"mountPath":"/etc/config","name":"connector-config"}]}],"priorityClassName":"rafay-cluster-critical","terminationGracePeriodSeconds":10,"volumes":[{"configMap":{"name":"connector-config"},"name":"connector-config"}]}}}} + name: rafay-connector + namespace: default +spec: + podManagementPolicy: OrderedReady + replicas: 1 + revisionHistoryLimit: 10 + selector: + matchLabels: + app: rafay-connector + serviceName: connector + template: + metadata: + creationTimestamp: null + labels: + app: rafay-connector + spec: + containers: + - image: rafaysystems/rafay-connector:latest + imagePullPolicy: Always + name: connector + resources: {} + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + volumeMounts: + - mountPath: /etc/config + name: connector-config + dnsPolicy: ClusterFirst + priorityClassName: rafay-cluster-critical + restartPolicy: Always + schedulerName: default-scheduler + securityContext: {} + terminationGracePeriodSeconds: 10 + volumes: + - configMap: + defaultMode: 420 + name: connector-config + name: connector-config + updateStrategy: + rollingUpdate: + partition: 0 + type: RollingUpdate +status: + collisionCount: 0 + currentReplicas: 1 + currentRevision: rafay-connector-568bcd85cb + observedGeneration: 1 + readyReplicas: 1 + replicas: 1 + updateRevision: rafay-connector-568bcd85cb + updatedReplicas: 1 \ No newline at end of file diff --git a/components/common/pkg/controller/apply/util.go b/components/common/pkg/controller/apply/util.go new file mode 100644 index 0000000..9ccb0be --- /dev/null +++ b/components/common/pkg/controller/apply/util.go @@ -0,0 +1,117 @@ +package apply + +import ( + "errors" + "fmt" + "reflect" + + v1 "k8s.io/api/core/v1" + + "github.com/RafaySystems/rcloud-base/components/common/pkg/controller/scheme" + clusterv2 "github.com/RafaySystems/rcloud-base/components/common/proto/types/controller" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + + cruntime "github.com/RafaySystems/rcloud-base/components/common/pkg/controller/runtime" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +// Errors that could be returned by Apply. +var ( + ErrNilObject = errors.New("can't reference a nil object") + ErrNoSelfLink = errors.New("selfLink was empty, can't make reference") +) + +var ( + // ErrNoPreviousConfig is returned when no previous configuration is found in the annotations + ErrNoPreviousConfig = errors.New("last applied configuration not found") +) + +var ( + emptyGVK = schema.GroupVersionKind{} +) + +func getBytes(o runtime.Object, withOriginal bool) ([]byte, error) { + do := o.DeepCopyObject() + if !withOriginal { + if mo, ok := do.(metav1.Object); ok { + annotations := mo.GetAnnotations() + if annotations != nil { + delete(annotations, clusterv2.OrignalConfig) + } + mo.SetAnnotations(annotations) + } + } + return runtime.Encode(unstructured.UnstructuredJSONScheme, o) + +} + +// GetOriginalConfig returns previous config of the object +func GetOriginalConfig(o runtime.Object) ([]byte, error) { + if mo, ok := o.(metav1.Object); ok { + annotations := mo.GetAnnotations() + if annotations != nil { + if v, ok := annotations[clusterv2.OrignalConfig]; ok { + return []byte(v), nil + } + } + } + return nil, nil +} + +// GetGVK returns group version kind of a runtime object +func GetGVK(obj runtime.Object) (schema.GroupVersionKind, error) { + gvks, _, err := scheme.Scheme.ObjectKinds(obj) + if err != nil { + return emptyGVK, err + } + return gvks[0], nil +} + +// updateObject updates current object with modified object +func updateObject(current, modified runtime.Object) error { + if reflect.TypeOf(current) != reflect.TypeOf(modified) { + current = cruntime.ToStructuredObject(current) + modified = cruntime.ToStructuredObject(modified) + + //return fmt.Errorf("current %T and modified %T of different types", current, modified) + } + + switch current.(type) { + case *clusterv2.Task: + c := current.(*clusterv2.Task) + m := modified.(*clusterv2.Task) + c.ObjectMeta.Labels = m.ObjectMeta.Labels + c.ObjectMeta.Annotations = m.ObjectMeta.Annotations + c.ObjectMeta.Finalizers = m.ObjectMeta.Finalizers + c.Spec = m.Spec + + case *clusterv2.Tasklet: + c := current.(*clusterv2.Tasklet) + m := modified.(*clusterv2.Tasklet) + c.ObjectMeta.Labels = m.ObjectMeta.Labels + c.ObjectMeta.Annotations = m.ObjectMeta.Annotations + c.ObjectMeta.Finalizers = m.ObjectMeta.Finalizers + c.Spec = m.Spec + case *clusterv2.Namespace: + c := current.(*clusterv2.Namespace) + m := modified.(*clusterv2.Namespace) + c.ObjectMeta.Labels = m.ObjectMeta.Labels + c.ObjectMeta.Annotations = m.ObjectMeta.Annotations + c.ObjectMeta.Finalizers = m.ObjectMeta.Finalizers + c.Spec = m.Spec + case *v1.Node: + c := current.(*v1.Node) + m := modified.(*v1.Node) + c.Labels = m.Labels + c.Annotations = m.Annotations + c.Finalizers = m.Finalizers + c.Spec.Unschedulable = m.Spec.Unschedulable + c.Spec.Taints = m.Spec.Taints + default: + return fmt.Errorf("unhandled type for update %T", current) + } + + return nil +} diff --git a/components/common/pkg/controller/apply/util_test.go b/components/common/pkg/controller/apply/util_test.go new file mode 100644 index 0000000..e55dd11 --- /dev/null +++ b/components/common/pkg/controller/apply/util_test.go @@ -0,0 +1,18 @@ +package apply + +import ( + "testing" + + clusterv2 "github.com/RafaySystems/rcloud-base/components/common/proto/types/controller" +) + +func TestGetGVK(t *testing.T) { + ns := clusterv2.Namespace{} + + gvk, err := GetGVK(&ns) + if err != nil { + t.Error(err) + return + } + t.Log(gvk) +} diff --git a/components/common/pkg/controller/client/client.go b/components/common/pkg/controller/client/client.go new file mode 100644 index 0000000..1fc5994 --- /dev/null +++ b/components/common/pkg/controller/client/client.go @@ -0,0 +1,31 @@ +package client + +import ( + "time" + + "github.com/RafaySystems/rcloud-base/components/common/pkg/controller/scheme" + "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/client/apiutil" + "sigs.k8s.io/controller-runtime/pkg/client/config" +) + +var ( + defaultResyncInterval = time.Second * 30 +) + +// New returns new kubernetes client +func New() (client.Client, error) { + + config, err := config.GetConfig() + if err != nil { + return nil, err + } + + mapper, err := apiutil.NewDynamicRESTMapper(config) + if err != nil { + return nil, err + } + + return client.New(config, client.Options{Scheme: scheme.Scheme, Mapper: mapper}) + +} diff --git a/components/common/pkg/controller/client/client_test.go b/components/common/pkg/controller/client/client_test.go new file mode 100644 index 0000000..02c006a --- /dev/null +++ b/components/common/pkg/controller/client/client_test.go @@ -0,0 +1,15 @@ +package client + +import ( + "testing" +) + +func BenchmarkCreateClient(b *testing.B) { + // run the Fib function b.N times + for n := 0; n < b.N; n++ { + _, err := New() + if err != nil { + b.Error(err) + } + } +} diff --git a/components/common/pkg/controller/runtime/object.go b/components/common/pkg/controller/runtime/object.go new file mode 100644 index 0000000..7b8741e --- /dev/null +++ b/components/common/pkg/controller/runtime/object.go @@ -0,0 +1,218 @@ +package runtime + +import ( + "bytes" + "errors" + + "github.com/RafaySystems/rcloud-base/components/common/pkg/controller/scheme" + apiv2 "github.com/RafaySystems/rcloud-base/components/common/proto/types/controller" + rbacv1 "k8s.io/api/rbac/v1" + apixv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + + "github.com/RafaySystems/rcloud-base/components/common/pkg/controller/util" +) + +var ( + // ErrInvalidObject is returned for invalid object + ErrInvalidObject = errors.New("object interface not implemented") +) + +// FromObject creates step object from runtime object +func FromObject(ro runtime.Object) (*apiv2.StepObject, error) { + + var so apiv2.StepObject + var err error + + bb := new(bytes.Buffer) + err = scheme.Serializer.Encode(ro, bb) + if err != nil { + return nil, err + } + + // use step object accessor to get object gvk + // so.SetGroupVersionKind(ro.GetObjectKind().GroupVersionKind()) + // if mo, ok := ro.(metav1.Object); ok { + // so.Name = mo.GetName() + // } + so.Raw = bb.Bytes() + + // so.Raw, err = util.CleanPatch(so.Raw) + // if err != nil { + // return nil, err + // } + + return &so, nil +} + +// SetNamespace sets namespace for runtime object +func SetNamespace(ro runtime.Object, namespace string) error { + + switch ro.(type) { + case *apixv1beta1.CustomResourceDefinition: + case *rbacv1.ClusterRole: + case *rbacv1.ClusterRoleBinding: + crb := ro.(*rbacv1.ClusterRoleBinding) + for i := range crb.Subjects { + if crb.Subjects[i].Kind == rbacv1.ServiceAccountKind && + crb.Subjects[i].Namespace == "" { + crb.Subjects[i].Namespace = namespace + } + } + case *rbacv1.RoleBinding: + rb := ro.(*rbacv1.RoleBinding) + if rb.Namespace == "" { + rb.Namespace = namespace + } + for i := range rb.Subjects { + if rb.Subjects[i].Kind == rbacv1.ServiceAccountKind && + rb.Subjects[i].Namespace == "" { + rb.Subjects[i].Namespace = namespace + } + } + case *rbacv1.Role: + rb := ro.(*rbacv1.Role) + if rb.Namespace == "" { + rb.Namespace = namespace + } + default: + if mo, ok := ro.(metav1.Object); ok { + mo.SetNamespace(namespace) + return nil + } + return ErrInvalidObject + + } + return nil +} + +// ToObject converts step object to runtime object +func ToObject(so *apiv2.StepObject) (o runtime.Object, gvk *schema.GroupVersionKind, err error) { + + accessor, err := so.Accessor() + if err != nil { + return + } + + eGVK, err := accessor.GroupVersionKind() + if err != nil { + return + } + + if scheme.Scheme.Recognizes(eGVK) { + o, gvk, err = scheme.Serializer.Decode(so.Raw, nil, nil) + } else { + o, gvk, err = scheme.Serializer.Decode(so.Raw, nil, &unstructured.Unstructured{}) + } + + return o, gvk, err +} + +// ToStructuredObject converts unstructured object to structured object +func ToStructuredObject(obj runtime.Object) runtime.Object { + + if _, ok := obj.(*unstructured.Unstructured); ok { + bb := new(bytes.Buffer) + err := scheme.Serializer.Encode(obj, bb) + if err != nil { + return obj + } + + o, _, err := scheme.Serializer.Decode(bb.Bytes(), nil, nil) + if err != nil { + return obj + } + return o + + } + + return obj +} + +// ToUnstructuredObject converts step object to unstructured object, +// this is useful for preserving original json serialized input in step object. +// Note: while patching k8s resources, we should preserve the user input, as +// patching can remove fields; which are represented as null values in the patch +func ToUnstructuredObject(so *apiv2.StepObject) (*unstructured.Unstructured, *schema.GroupVersionKind, error) { + var o runtime.Object + var err error + var gvk *schema.GroupVersionKind + + o, gvk, err = scheme.Serializer.Decode(so.Raw, nil, &unstructured.Unstructured{}) + + return o.(*unstructured.Unstructured), gvk, err +} + +// PatchMeta is the metadata to be added while patching +type PatchMeta struct { + Annotations map[string]string +} + +// PatchOption is the functional patch option +type PatchOption func(*PatchMeta) + +// AddAnnotations adds annotations to object +func AddAnnotations(annotations map[string]string) PatchOption { + return func(m *PatchMeta) { + m.Annotations = annotations + } +} + +// Patch patches the step object with give step object +func Patch(input *apiv2.StepObject, with *apiv2.StepObject, opts ...PatchOption) error { + pm := &PatchMeta{} + for _, opt := range opts { + opt(pm) + } + accessor, err := input.Accessor() + if err != nil { + return err + } + gvk, err := accessor.GroupVersionKind() + if err != nil { + return err + } + + if util.IsStrategicMergePatch(gvk) { + pb, err := util.CreateStrategicMergePatch(gvk, nil, input.Raw, with.Raw) + if err != nil { + return err + } + + fb, err := util.ApplyStrategicMergePatch(gvk, input.Raw, pb) + if err != nil { + return err + } + + input.Raw = fb + } else { + pb, err := util.CreateJSONMergePatch(nil, input.Raw, with.Raw) + if err != nil { + return err + } + + fb, err := util.ApplyJSONMergePatch(input.Raw, pb) + if err != nil { + return err + } + + input.Raw = fb + + } + + if pm.Annotations != nil { + accessor, err := input.Accessor() + if err != nil { + return err + } + + accessor.SetAnnotations(pm.Annotations) + input.Raw = accessor.Bytes() + } + + return nil +} diff --git a/components/common/pkg/controller/runtime/object_test.go b/components/common/pkg/controller/runtime/object_test.go new file mode 100644 index 0000000..89de760 --- /dev/null +++ b/components/common/pkg/controller/runtime/object_test.go @@ -0,0 +1,220 @@ +package runtime + +import ( + "encoding/json" + "io/ioutil" + "os" + "reflect" + "testing" + + apiv2 "github.com/RafaySystems/rcloud-base/components/common/proto/types/controller" + appsv1 "k8s.io/api/apps/v1" + "sigs.k8s.io/yaml" +) + +func loadStepObject(path string) (*apiv2.StepObject, error) { + f, err := os.Open(path) + if err != nil { + return nil, err + } + yb, err := ioutil.ReadAll(f) + if err != nil { + return nil, err + } + + jb, err := yaml.YAMLToJSON(yb) + if err != nil { + return nil, err + } + + var so apiv2.StepObject + err = json.Unmarshal(jb, &so) + if err != nil { + return nil, err + } + return &so, nil +} + +func TestConfigMap(t *testing.T) { + so, err := loadStepObject("./testdata/configmap.yaml") + if err != nil { + t.Error(err) + return + } + + accessor, err := so.Accessor() + if err != nil { + t.Error(err) + return + } + + apiVersion, err := accessor.APIVersion() + if err != nil { + t.Error(err) + return + } + kind, err := accessor.Kind() + if err != nil { + t.Error(err) + return + } + name, err := accessor.Name() + if err != nil { + t.Error(err) + return + } + + if apiVersion != "v1" && kind != "ConfigMap" { + t.Error("expected ", "v1/ConfigMap") + return + } + + if name != "example-config" { + t.Error("expected name example-config, got", so.Name) + } + + _, _, err = ToObject(so) + if err != nil { + t.Error(err) + return + } + +} + +func TestUnstructured(t *testing.T) { + so, err := loadStepObject("./testdata/unstructured1.yaml") + if err != nil { + t.Error(err) + return + } + + _, _, err = ToObject(so) + if err != nil { + t.Error(err) + return + } + +} + +func TestStructuredPatch(t *testing.T) { + so, err := loadStepObject("./testdata/deployment1.yaml") + if err != nil { + t.Error(err) + return + } + + with, err := loadStepObject("./testdata/deployment2.yaml") + if err != nil { + t.Error(err) + return + } + + err = Patch(so, with, AddAnnotations(map[string]string{"test": "test2"})) + if err != nil { + t.Error(err) + return + } + + t.Log(string(so.Raw)) + + ro, _, err := ToObject(so) + if err != nil { + t.Error(err) + return + } + + if d, ok := ro.(*appsv1.Deployment); ok { + if *d.Spec.Replicas != 2 { + t.Error("expected 2 replicas") + return + } + if !reflect.DeepEqual(d.Annotations, map[string]string{"test": "test2"}) { + t.Error("expected test: test2 got ", d.Annotations) + return + } + containers := d.Spec.Template.Spec.Containers + if len(containers) != 2 { + t.Error("expected 2 containers") + return + } + if containers[0].Name != "side-car" { + t.Error("expected side car container") + return + } + if containers[1].Name != "nginx" { + t.Error("expected nginx container") + return + } + if containers[1].Image != "nginx:1.7.10" { + t.Error("expected nginx image nginx:1.7.10") + return + } + } else { + t.Error("exptected appsv1.Deployment got, ", reflect.TypeOf(ro)) + } + +} + +func TestUnstructuredPatch(t *testing.T) { + so, err := loadStepObject("./testdata/unstructured1.yaml") + if err != nil { + t.Error(err) + return + } + + with, err := loadStepObject("./testdata/unstructured2.yaml") + if err != nil { + t.Error(err) + return + } + + err = Patch(so, with) + if err != nil { + t.Error(err) + return + } + +} + +func TestPartialPath(t *testing.T) { + // so, err := loadStepObject("./testdata/etcd.yaml") + // if err != nil { + // t.Error(err) + // return + // } + + // with, err := loadStepObject("./testdata/etcd-patch.yaml") + // if err != nil { + // t.Error(err) + // return + // } + + // err = Patch(so, with, AddAnnotations(map[string]string{"test": "test"})) + // if err != nil { + // t.Error(err) + // return + // } + + //t.Log(string(so.Raw)) + + so1, err := loadStepObject("./testdata/statefulset.yaml") + if err != nil { + t.Error(err) + return + } + + with1, err := loadStepObject("./testdata/statefulset-patch.yaml") + if err != nil { + t.Error(err) + return + } + + err = Patch(so1, with1, AddAnnotations(map[string]string{"test": "test"})) + if err != nil { + t.Error(err) + return + } + + t.Log(string(so1.Raw)) + +} diff --git a/components/common/pkg/controller/runtime/testdata/configmap.yaml b/components/common/pkg/controller/runtime/testdata/configmap.yaml new file mode 100644 index 0000000..626ff2f --- /dev/null +++ b/components/common/pkg/controller/runtime/testdata/configmap.yaml @@ -0,0 +1,12 @@ +kind: ConfigMap +apiVersion: v1 +metadata: + name: example-config + namespace: default +data: + example.property.1: helloss + example.property.2: world + example.property.file: |- + property.1=value-1 + property.2=value-2 + property.3=value-3 \ No newline at end of file diff --git a/components/common/pkg/controller/runtime/testdata/crd.yaml b/components/common/pkg/controller/runtime/testdata/crd.yaml new file mode 100644 index 0000000..a7ae31e --- /dev/null +++ b/components/common/pkg/controller/runtime/testdata/crd.yaml @@ -0,0 +1,17 @@ +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: crontabs.stable.example.com +spec: + group: stable.example.com + versions: + - name: v1 + served: true + storage: true + scope: Namespaced + names: + plural: crontabs + singular: crontab + kind: CronTab + shortNames: + - ct \ No newline at end of file diff --git a/components/common/pkg/controller/runtime/testdata/daemonset.yaml b/components/common/pkg/controller/runtime/testdata/daemonset.yaml new file mode 100644 index 0000000..e69de29 diff --git a/components/common/pkg/controller/runtime/testdata/deployment1.yaml b/components/common/pkg/controller/runtime/testdata/deployment1.yaml new file mode 100644 index 0000000..37d416c --- /dev/null +++ b/components/common/pkg/controller/runtime/testdata/deployment1.yaml @@ -0,0 +1,21 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: nginx-deployment + labels: + app: nginx +spec: + replicas: 3 + selector: + matchLabels: + app: nginx + template: + metadata: + labels: + app: nginx + spec: + containers: + - name: nginx + image: nginx:1.7.9 + ports: + - containerPort: 80 \ No newline at end of file diff --git a/components/common/pkg/controller/runtime/testdata/deployment2.yaml b/components/common/pkg/controller/runtime/testdata/deployment2.yaml new file mode 100644 index 0000000..f7c1c43 --- /dev/null +++ b/components/common/pkg/controller/runtime/testdata/deployment2.yaml @@ -0,0 +1,25 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: nginx-deployment + labels: + app: nginx + annotations: + test: test1 +spec: + replicas: 2 + selector: + matchLabels: + app: nginx + template: + metadata: + labels: + app: nginx + spec: + containers: + - name: side-car + image: sidecar:latest + - name: nginx + image: nginx:1.7.10 + ports: + - containerPort: 80 \ No newline at end of file diff --git a/components/common/pkg/controller/runtime/testdata/etcd-patch.yaml b/components/common/pkg/controller/runtime/testdata/etcd-patch.yaml new file mode 100644 index 0000000..b57750a --- /dev/null +++ b/components/common/pkg/controller/runtime/testdata/etcd-patch.yaml @@ -0,0 +1,10 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: etcd0 +spec: + template: + spec: + containers: + - name: etcd0 + image: quay.io/coreos/etcd:v3.4 \ No newline at end of file diff --git a/components/common/pkg/controller/runtime/testdata/etcd.yaml b/components/common/pkg/controller/runtime/testdata/etcd.yaml new file mode 100644 index 0000000..5a77272 --- /dev/null +++ b/components/common/pkg/controller/runtime/testdata/etcd.yaml @@ -0,0 +1,64 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: etcd0 + etcd_node: etcd0 + name: etcd0 +spec: + replicas: 1 + selector: + matchLabels: + app: etcd0 + etcd_node: etcd0 + template: + metadata: + labels: + app: etcd0 + etcd_node: etcd0 + spec: + containers: + - command: + - /usr/local/bin/etcd + - --name + - etcd0 + - --initial-advertise-peer-urls + - http://etcd0:2380 + - --listen-peer-urls + - http://0.0.0.0:2380 + - --listen-client-urls + - http://0.0.0.0:2379 + - --advertise-client-urls + - http://etcd0:2379 + - --initial-cluster + - etcd0=http://etcd0:2380 + - --initial-cluster-state + - new + env: + - name: ETCDCTL_API + value: "3" + image: quay.io/coreos/etcd:v3.3 + name: etcd0 + ports: + - containerPort: 2379 + name: client + protocol: TCP + - containerPort: 2380 + name: server + protocol: TCP + resources: + limits: + cpu: 100m + memory: 256Mi + requests: + cpu: 100m + memory: 256Mi + volumeMounts: + - mountPath: /etcd0.etcd + name: etcd-storage + hostname: etcd0 + priorityClassName: rafay-cluster-critical + volumes: + - name: etcd-storage + persistentVolumeClaim: + claimName: etcd-pv-claim diff --git a/components/common/pkg/controller/runtime/testdata/job.yaml b/components/common/pkg/controller/runtime/testdata/job.yaml new file mode 100644 index 0000000..e69de29 diff --git a/components/common/pkg/controller/runtime/testdata/secret.yaml b/components/common/pkg/controller/runtime/testdata/secret.yaml new file mode 100644 index 0000000..721bffd --- /dev/null +++ b/components/common/pkg/controller/runtime/testdata/secret.yaml @@ -0,0 +1,8 @@ +apiVersion: v1 +kind: Secret +metadata: + name: mysecret +type: Opaque +data: + username: YWRtaW4= + password: MWYyZDFlMmU2N2Rm \ No newline at end of file diff --git a/components/common/pkg/controller/runtime/testdata/statefulset-patch.yaml b/components/common/pkg/controller/runtime/testdata/statefulset-patch.yaml new file mode 100644 index 0000000..f7b23c7 --- /dev/null +++ b/components/common/pkg/controller/runtime/testdata/statefulset-patch.yaml @@ -0,0 +1,15 @@ +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: rafay-connector +spec: + template: + spec: + containers: + - name: connector + image: rafaysystems/rafay-connector:latest-1 + imagePullSecrets: + - name: rcloud-registry-creds + command: + - test1 + - "" \ No newline at end of file diff --git a/components/common/pkg/controller/runtime/testdata/statefulset.yaml b/components/common/pkg/controller/runtime/testdata/statefulset.yaml new file mode 100644 index 0000000..cf94cb4 --- /dev/null +++ b/components/common/pkg/controller/runtime/testdata/statefulset.yaml @@ -0,0 +1,29 @@ +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: rafay-connector + namespace: rafay-system +spec: + selector: + matchLabels: + app: rafay-connector + serviceName: "connector" + replicas: 1 + template: + metadata: + labels: + app: rafay-connector + spec: + priorityClassName: rafay-cluster-critical + terminationGracePeriodSeconds: 10 + containers: + - name: connector + image: rafaysystems/rafay-connector:latest + imagePullPolicy: Always + volumeMounts: + - name: connector-config + mountPath: /etc/config + volumes: + - name: connector-config + configMap: + name: connector-config \ No newline at end of file diff --git a/components/common/pkg/controller/runtime/testdata/unstructured1.yaml b/components/common/pkg/controller/runtime/testdata/unstructured1.yaml new file mode 100644 index 0000000..e3df22e --- /dev/null +++ b/components/common/pkg/controller/runtime/testdata/unstructured1.yaml @@ -0,0 +1,7 @@ +apiVersion: "stable.example.com/v1" +kind: CronTab +metadata: + name: my-new-cron-object +spec: + cronSpec: "* * * * */5" + image: my-awesome-cron-image \ No newline at end of file diff --git a/components/common/pkg/controller/runtime/testdata/unstructured2.yaml b/components/common/pkg/controller/runtime/testdata/unstructured2.yaml new file mode 100644 index 0000000..13f808e --- /dev/null +++ b/components/common/pkg/controller/runtime/testdata/unstructured2.yaml @@ -0,0 +1,7 @@ +apiVersion: "stable.example.com/v1" +kind: CronTab +metadata: + name: my-new-cron-object +spec: + cronSpec: "* * * * */5" + image: my-awesome-cron-image2 \ No newline at end of file diff --git a/components/common/pkg/controller/scheme/scheme.go b/components/common/pkg/controller/scheme/scheme.go new file mode 100644 index 0000000..525b1cd --- /dev/null +++ b/components/common/pkg/controller/scheme/scheme.go @@ -0,0 +1,46 @@ +package scheme + +import ( + "sync" + + apiv2 "github.com/RafaySystems/rcloud-base/components/common/proto/types/controller" + // DO NOT UPDATE + // API Extensions v1 is not available in k8s v1.14.x + apixv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" + "k8s.io/apimachinery/pkg/runtime" + kjson "k8s.io/apimachinery/pkg/runtime/serializer/json" + clientgoscheme "k8s.io/client-go/kubernetes/scheme" +) + +type addToScheme func(s *runtime.Scheme) error + +var ( + // Scheme is the runtime scheme + Scheme *runtime.Scheme + + // Serializer is the JSON serializer for handling runtime objects + Serializer runtime.Serializer +) + +func init() { + + var once sync.Once + + once.Do(func() { + Scheme = runtime.NewScheme() + + for _, f := range []addToScheme{ + clientgoscheme.AddToScheme, + apixv1beta1.AddToScheme, + apiv2.AddToScheme, + } { + err := f(Scheme) + if err != nil { + panic(err) + } + } + + Serializer = kjson.NewSerializer(kjson.DefaultMetaFactory, Scheme, Scheme, false) + }) + +} diff --git a/components/common/pkg/controller/step/state.go b/components/common/pkg/controller/step/state.go new file mode 100644 index 0000000..0e51921 --- /dev/null +++ b/components/common/pkg/controller/step/state.go @@ -0,0 +1,231 @@ +package step + +import ( + "fmt" + + clusterv2 "github.com/RafaySystems/rcloud-base/components/common/proto/types/controller" + appsv1 "k8s.io/api/apps/v1" + batchv1 "k8s.io/api/batch/v1" + corev1 "k8s.io/api/core/v1" + exv1beta1 "k8s.io/api/extensions/v1beta1" + "k8s.io/apimachinery/pkg/runtime" +) + +func getExV1Beta1DeploymentState(d *exv1beta1.Deployment) (state clusterv2.StepObjectState, reason string) { + var available bool + var progressing bool = true + var replicasFailure bool + var progressMessage, availableMessage, replicaFailureMessage string + + for _, condition := range d.Status.Conditions { + if condition.Type == exv1beta1.DeploymentAvailable { + if condition.Status == corev1.ConditionTrue { + available = true + } + availableMessage = condition.Message + } + if condition.Type == exv1beta1.DeploymentProgressing { + if condition.Status != corev1.ConditionTrue { + progressing = false + } + progressMessage = condition.Message + } + if condition.Type == exv1beta1.DeploymentReplicaFailure { + if condition.Status == corev1.ConditionTrue { + replicasFailure = true + replicaFailureMessage = condition.Message + } + + } + } + + switch { + case available && d.Status.UnavailableReplicas == 0: + state = clusterv2.StepObjectComplete + reason = availableMessage + return + case !progressing || replicasFailure: + state = clusterv2.StepObjectFailed + if !progressing { + reason = progressMessage + } else { + reason = replicaFailureMessage + } + + return + default: + state = clusterv2.StepObjectCreated + reason = progressMessage + return + } + +} + +func getAppsV1DeploymentState(d *appsv1.Deployment) (state clusterv2.StepObjectState, reason string) { + + var available bool + var progressing bool = true + var replicasFailure bool + var progressMessage, availableMessage, replicaFailureMessage string + + for _, condition := range d.Status.Conditions { + if condition.Type == appsv1.DeploymentAvailable { + if condition.Status == corev1.ConditionTrue { + available = true + } + availableMessage = condition.Message + + } + if condition.Type == appsv1.DeploymentProgressing { + if condition.Status != corev1.ConditionTrue { + progressing = false + } + progressMessage = condition.Message + + } + if condition.Type == appsv1.DeploymentReplicaFailure { + if condition.Status == corev1.ConditionTrue { + replicasFailure = true + replicaFailureMessage = condition.Message + } + + } + } + + switch { + case available && d.Status.UnavailableReplicas == 0: + state = clusterv2.StepObjectComplete + reason = availableMessage + return + case !progressing || replicasFailure: + state = clusterv2.StepObjectFailed + if !progressing { + reason = progressMessage + } else { + reason = replicaFailureMessage + } + + return + default: + state = clusterv2.StepObjectCreated + reason = progressMessage + return + + } + +} + +func getStatefulSetState(s *appsv1.StatefulSet) (state clusterv2.StepObjectState, reason string) { + + if s.Status.ReadyReplicas == *s.Spec.Replicas { + state = clusterv2.StepObjectComplete + reason = "all required replicas ready" + return + } + // for _, condition := range s.Status.Conditions { + // if condition.Type + // } + + state = clusterv2.StepObjectCreated + reason = "in progress" + return +} + +func getDaemonSetState(ds *appsv1.DaemonSet) (state clusterv2.StepObjectState, reason string) { + if ds.Status.DesiredNumberScheduled == ds.Status.NumberReady { + state = clusterv2.StepObjectComplete + reason = "all required replicas ready" + return + } + + state = clusterv2.StepObjectCreated + reason = "in progress" + return +} + +func getJobState(j *batchv1.Job) (state clusterv2.StepObjectState, reason string) { + for _, condition := range j.Status.Conditions { + if condition.Type == batchv1.JobComplete { + if condition.Status == corev1.ConditionTrue { + state = clusterv2.StepObjectComplete + reason = condition.Message + return + } + } + if condition.Type == batchv1.JobFailed { + if condition.Status == corev1.ConditionTrue { + state = clusterv2.StepObjectFailed + reason = condition.Message + return + } + } + } + state = clusterv2.StepObjectCreated + reason = "not completed" + return +} + +func getPersistentVolumeClaimState(pvc *corev1.PersistentVolumeClaim) (state clusterv2.StepObjectState, reason string) { + if pvc.Status.Phase == corev1.ClaimBound { + state = clusterv2.StepObjectComplete + reason = "claim bound" + return + } + + state = clusterv2.StepObjectCreated + reason = "in progress" + return +} + +// ObjectState returns the object state of runtime object +func ObjectState(o runtime.Object) (state clusterv2.StepObjectState, reason string) { + switch o.(type) { + case *exv1beta1.Deployment: + d := o.(*exv1beta1.Deployment) + state, reason = getExV1Beta1DeploymentState(d) + case *appsv1.Deployment: + d := o.(*appsv1.Deployment) + state, reason = getAppsV1DeploymentState(d) + case *appsv1.StatefulSet: + s := o.(*appsv1.StatefulSet) + state, reason = getStatefulSetState(s) + case *appsv1.DaemonSet: + ds := o.(*appsv1.DaemonSet) + state, reason = getDaemonSetState(ds) + case *batchv1.Job: + j := o.(*batchv1.Job) + state, reason = getJobState(j) + // case *corev1.PersistentVolumeClaim: + // pvc := o.(*corev1.PersistentVolumeClaim) + // state, reason = getPersistentVolumeClaimState(pvc) + default: + state = clusterv2.StepObjectComplete + reason = fmt.Sprintf("object type %T not handled", o) + } + + return +} + +// JobState returns the job state +func JobState(o runtime.Object) (state clusterv2.StepJobState, reason string) { + j := o.(*batchv1.Job) + for _, condition := range j.Status.Conditions { + if condition.Type == batchv1.JobComplete { + if condition.Status == corev1.ConditionTrue { + state = clusterv2.StepJobComplete + reason = condition.Message + return + } + } + if condition.Type == batchv1.JobFailed { + if condition.Status == corev1.ConditionTrue { + state = clusterv2.StepJobFailed + reason = condition.Message + return + } + } + } + state = clusterv2.StepJobCreated + reason = "not completed" + return +} diff --git a/components/common/pkg/controller/step/step.go b/components/common/pkg/controller/step/step.go new file mode 100644 index 0000000..0dcd865 --- /dev/null +++ b/components/common/pkg/controller/step/step.go @@ -0,0 +1,307 @@ +package step + +import ( + "context" + + "github.com/RafaySystems/rcloud-base/components/common/pkg/controller/apply" + cr "github.com/RafaySystems/rcloud-base/components/common/pkg/controller/runtime" + "github.com/RafaySystems/rcloud-base/components/common/pkg/controller/scheme" + "github.com/RafaySystems/rcloud-base/components/common/pkg/controller/util" + hash "github.com/RafaySystems/rcloud-base/components/common/pkg/hasher" + clusterv2 "github.com/RafaySystems/rcloud-base/components/common/proto/types/controller" + corev1 "k8s.io/api/core/v1" + apierrs "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/types" + ref "k8s.io/client-go/tools/reference" + "sigs.k8s.io/controller-runtime/pkg/client" + logf "sigs.k8s.io/controller-runtime/pkg/log" +) + +var ( + stepLog = logf.Log.WithName("cluster-v2-step") + ma = meta.NewAccessor() +) + +// Handler is the interface for working with steps +type Handler interface { + // Handle executes the step + Handle(ctx context.Context, owner metav1.Object, step clusterv2.StepTemplate) (status clusterv2.StepStatus) + // Status returns new status for current status + HandleStatus(ctx context.Context, owner metav1.Object, original clusterv2.StepStatus) (current clusterv2.StepStatus) + // Delete deletes a given step + HandleDelete(ctx context.Context, owner metav1.Object, stage clusterv2.StageSpec) error +} + +type handler struct { + apply.Applier +} + +// NewHandler returns object handler that handles step object +func NewHandler(a apply.Applier) Handler { + return &handler{a} +} + +var _ Handler = (*handler)(nil) + +func (h *handler) getObject(ctx context.Context, ref *corev1.ObjectReference) (o client.Object, err error) { + gvk := schema.FromAPIVersionAndKind(ref.APIVersion, ref.Kind) + nn := types.NamespacedName{ + Namespace: ref.Namespace, + Name: ref.Name, + } + if o, err = util.NewObject(gvk); err != nil { + return + } + + err = h.Get(ctx, nn, o) + return +} + +func (h *handler) getObjectState(ctx context.Context, original clusterv2.StepStatus) (state clusterv2.StepObjectState, reason string, err error) { + if original.ObjectRef == nil { + state = clusterv2.StepObjectState(original.ObjectState) + reason = original.ObjectReason + return + } + + var o runtime.Object + o, err = h.getObject(ctx, original.ObjectRef) + if err != nil { + return + } + + state, reason = ObjectState(o) + + return +} + +func (h *handler) getJobState(ctx context.Context, ref *corev1.ObjectReference) (state clusterv2.StepJobState, reason string, err error) { + if ref == nil { + state = clusterv2.StepJobComplete + reason = "not configured" + return + } + + var o runtime.Object + o, err = h.getObject(ctx, ref) + if err != nil { + return + } + + state, reason = JobState(o) + + return +} + +func (h *handler) HandleStatus(ctx context.Context, owner metav1.Object, original clusterv2.StepStatus) (current clusterv2.StepStatus) { + log := stepLog.WithValues("owner", types.NamespacedName{ + Namespace: owner.GetNamespace(), + Name: owner.GetName(), + }, "step", original.Name) + + jobRef := original.JobRef + + var objectState clusterv2.StepObjectState + var objectReason string + var jobState clusterv2.StepJobState + var jobReason string + var err error + + current = *original.DeepCopy() + + if objectState, objectReason, err = h.getObjectState(ctx, original); err != nil { + log.Info("unable to get object state", "error", err) + return original + } + + if jobState, jobReason, err = h.getJobState(ctx, jobRef); err != nil { + log.Info("unable to get job state", "error", err) + return original + } + + log.Info("step", "objectState", objectState, "objectReason", objectReason, "jobState", jobState, "jobReason", jobReason) + + current.ObjectState = string(objectState) + current.ObjectReason = objectReason + current.JobState = string(jobState) + current.JobReason = jobReason + + if objectState == clusterv2.StepObjectComplete && jobState == clusterv2.StepJobComplete { + current.State = string(clusterv2.StepComplete) + current.Reason = "complete" + return + } + + if objectState == clusterv2.StepObjectFailed { + current.State = string(clusterv2.StepFailed) + current.Reason = objectReason + return + } + + if jobState == clusterv2.StepJobFailed { + current.State = string(clusterv2.StepFailed) + current.Reason = jobReason + return + } + + return +} + +func (h *handler) deleteStep(ctx context.Context, owner metav1.Object, step clusterv2.StepTemplate) error { + log := stepLog.WithValues("owner", types.NamespacedName{ + Namespace: owner.GetNamespace(), + Name: owner.GetName(), + }, "step", step.Name) + + log.Info("deleting step", "name", step.Name) + + if step.Object != nil { + log.Info("step object configured for step", "gvk", step.Object.TypeMeta.GroupVersionKind()) + o, _, err := cr.ToUnstructuredObject(step.Object) + if err != nil { + return err + } + var objectKey client.ObjectKey + var existing client.Object + + objectKey = client.ObjectKey{ + Name: o.GetName(), + Namespace: o.GetNamespace(), + } + + existing, err = util.NewObject(o.GetObjectKind().GroupVersionKind()) + + if err != nil { + return err + } + + err = h.Get(ctx, objectKey, existing) + if err != nil { + if apierrs.IsNotFound(err) { + return nil + } + return err + } + + if eo, ok := existing.(metav1.Object); ok { + if !util.OwnsObject(owner, eo) { + return nil + } + log.Info("deleting object", "name", step.Name) + err = h.Delete(ctx, existing, client.PropagationPolicy(metav1.DeletePropagationBackground)) + if err != nil { + return err + } + + } + + } + + if step.JobTemplate != nil { + log.Info("step job configured for step") + } + + return nil +} + +func (h *handler) HandleDelete(ctx context.Context, owner metav1.Object, stage clusterv2.StageSpec) error { + log := stepLog.WithValues("owner", types.NamespacedName{ + Namespace: owner.GetNamespace(), + Name: owner.GetName(), + }) + + for _, step := range stage { + log.Info("deleting step", "name", step.Name) + err := h.deleteStep(ctx, owner, step) + if err != nil { + log.Info("unable to delete step", "name", step.Name, "error", err) + return err + } + + } + + return nil +} + +func (h *handler) Handle(ctx context.Context, owner metav1.Object, step clusterv2.StepTemplate) (status clusterv2.StepStatus) { + log := stepLog.WithValues("owner", types.NamespacedName{ + Namespace: owner.GetNamespace(), + Name: owner.GetName(), + }, "step", step.Name) + + status = clusterv2.StepStatus{ + Name: step.Name, + } + // handle step object + if step.Object != nil { + accessor, err := step.Object.Accessor() + if err != nil { + log.Error(err, "unable to get step object accessor") + status.ObjectState = string(clusterv2.StepObjectFailed) + status.ObjectReason = err.Error() + status.State = string(clusterv2.StepFailed) + status.Reason = err.Error() + return + } + gvk, err := accessor.GroupVersionKind() + if err != nil { + log.Error(err, "unable to get step object gvk") + status.ObjectState = string(clusterv2.StepObjectFailed) + status.ObjectReason = err.Error() + status.State = string(clusterv2.StepFailed) + status.Reason = err.Error() + return + } + log.Info("step object configured for step", "gvk", gvk) + o, _, err := cr.ToUnstructuredObject(step.Object) + if err != nil { + log.Error(err, "unable to convert step object") + status.ObjectState = string(clusterv2.StepObjectFailed) + status.ObjectReason = err.Error() + status.State = string(clusterv2.StepFailed) + status.Reason = err.Error() + return + } + + err = util.SetOwnerReference(owner, o) + if err != nil { + log.Error(err, "unable to set controller reference") + status.ObjectState = string(clusterv2.StepObjectFailed) + status.ObjectReason = err.Error() + status.State = string(clusterv2.StepFailed) + status.Reason = err.Error() + return + } + + err = h.Apply(ctx, o) + if err != nil { + log.Error(err, "unable to patch step object", "name", step.Name) + status.ObjectState = string(clusterv2.StepObjectFailed) + status.ObjectReason = err.Error() + status.State = string(clusterv2.StepFailed) + status.Reason = err.Error() + return + } + + objRef, _ := ref.GetReference(scheme.Scheme, o) + status.ObjectState = string(clusterv2.StepObjectCreated) + status.ObjectReason = "created" + status.ObjectRef = objRef + hash, _ := hash.GetHash(o) + status.ObjectSpecHash = hash + } + + // handle step job + if step.JobTemplate != nil { + log.Info("step job configured for step") + } + + status.State = string(clusterv2.StepExecuted) + + return + +} diff --git a/components/common/pkg/controller/step/util.go b/components/common/pkg/controller/step/util.go new file mode 100644 index 0000000..5ba108e --- /dev/null +++ b/components/common/pkg/controller/step/util.go @@ -0,0 +1,12 @@ +package step + +import ( + apierrs "k8s.io/apimachinery/pkg/api/errors" +) + +func isHardFailure(err error) { + switch { + case apierrs.IsBadRequest(err), apierrs.IsInvalid(err): + + } +} diff --git a/components/common/pkg/controller/util/gvk.go b/components/common/pkg/controller/util/gvk.go new file mode 100644 index 0000000..d06c11d --- /dev/null +++ b/components/common/pkg/controller/util/gvk.go @@ -0,0 +1,15 @@ +package util + +import ( + "k8s.io/apimachinery/pkg/runtime/schema" + kjson "k8s.io/apimachinery/pkg/runtime/serializer/json" +) + +var ( + dmf = kjson.DefaultMetaFactory +) + +// GetGVK returns GroupVersionKind of json serialized k8s object +func GetGVK(b []byte) (*schema.GroupVersionKind, error) { + return dmf.Interpret(b) +} diff --git a/components/common/pkg/controller/util/object.go b/components/common/pkg/controller/util/object.go new file mode 100644 index 0000000..cc1167a --- /dev/null +++ b/components/common/pkg/controller/util/object.go @@ -0,0 +1,21 @@ +package util + +import ( + "github.com/RafaySystems/rcloud-base/components/common/pkg/controller/scheme" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/client" +) + +// NewObject returns new object of given GVK +func NewObject(gvk schema.GroupVersionKind) (o client.Object, err error) { + return &unstructured.Unstructured{Object: map[string]interface{}{ + "kind": gvk.Kind, + "apiVersion": gvk.GroupVersion().String(), + }}, nil +} + +// KnownObject returns true if the object GVK is in scheme +func KnownObject(gvk schema.GroupVersionKind) bool { + return scheme.Scheme.Recognizes(gvk) +} diff --git a/components/common/pkg/controller/util/owner.go b/components/common/pkg/controller/util/owner.go new file mode 100644 index 0000000..4657ee4 --- /dev/null +++ b/components/common/pkg/controller/util/owner.go @@ -0,0 +1,114 @@ +package util + +import ( + "encoding/json" + "fmt" + + "github.com/RafaySystems/rcloud-base/components/common/pkg/controller/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/client/apiutil" + + clusterv2 "github.com/RafaySystems/rcloud-base/components/common/proto/types/controller" + ctrlutil "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" +) + +// OwnsObject checks if the object is owned by the owner +func OwnsObject(owner, object metav1.Object) bool { + ownerRef, err := newOwnerRef(owner) + if err != nil { + return false + } + + if existingRef, ok := object.GetAnnotations()[clusterv2.OwnerRef]; ok { + var ref metav1.OwnerReference + err := json.Unmarshal([]byte(existingRef), &ref) + if err != nil { + return false + } + + if referSameObject(ref, *ownerRef) { + return true + } + } + + return false +} + +// Returns true if a and b point to the same object +func referSameObject(a, b metav1.OwnerReference) bool { + aGV, err := schema.ParseGroupVersion(a.APIVersion) + if err != nil { + return false + } + + bGV, err := schema.ParseGroupVersion(b.APIVersion) + if err != nil { + return false + } + + return aGV == bGV && a.Kind == b.Kind && a.Name == b.Name +} + +func newAlreadyOwnedError(Object metav1.Object, Owner metav1.OwnerReference) *ctrlutil.AlreadyOwnedError { + return &ctrlutil.AlreadyOwnedError{ + Object: Object, + Owner: Owner, + } +} + +func newOwnerRef(owner metav1.Object) (*metav1.OwnerReference, error) { + ro, ok := owner.(runtime.Object) + if !ok { + return nil, fmt.Errorf("%T is not a runtime.Object, cannot call SetControllerReference", owner) + } + + gvk, err := apiutil.GVKForObject(ro, scheme.Scheme) + if err != nil { + return nil, err + } + + // Create a new ref + ref := metav1.NewControllerRef(owner, schema.GroupVersionKind{Group: gvk.Group, Version: gvk.Version, Kind: gvk.Kind}) + return ref, nil +} + +// SetOwnerReference sets owner reference for objects controlled +// by rafay cluster controllers +func SetOwnerReference(owner, object metav1.Object) error { + + // Create a new ref + currentRef, err := newOwnerRef(owner) + if err != nil { + return err + } + + if existingRef, ok := object.GetAnnotations()[clusterv2.OwnerRef]; ok { + var ref metav1.OwnerReference + err := json.Unmarshal([]byte(existingRef), &ref) + if err != nil { + return err + } + + if !referSameObject(ref, *currentRef) { + return newAlreadyOwnedError(object, ref) + } + } + + ref, err := json.Marshal(currentRef) + if err != nil { + return err + } + + annotations := object.GetAnnotations() + + if annotations == nil { + annotations = map[string]string{} + } + + annotations[clusterv2.OwnerRef] = string(ref) + object.SetAnnotations(annotations) + + return nil +} diff --git a/components/common/pkg/controller/util/owner_test.go b/components/common/pkg/controller/util/owner_test.go new file mode 100644 index 0000000..c6588cf --- /dev/null +++ b/components/common/pkg/controller/util/owner_test.go @@ -0,0 +1,33 @@ +package util + +import ( + "testing" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +func loadMetaV1Object(path string) metav1.Object { + ro := loadRuntimeObject(path) + mo, ok := ro.(metav1.Object) + if !ok { + panic(path) + } + return mo +} + +func TestSetOwnerReference(t *testing.T) { + srv1 := loadMetaV1Object("testdata/service_with_owner.yaml") + owner1 := loadMetaV1Object("testdata/owner1.yaml") + owner2 := loadMetaV1Object("testdata/owner2.yaml") + + err := SetOwnerReference(owner1, srv1) + if err != nil { + t.Error("did not expect error", err) + return + } + + err = SetOwnerReference(owner2, srv1) + if err == nil { + t.Error("expected error") + } +} diff --git a/components/common/pkg/controller/util/patch.go b/components/common/pkg/controller/util/patch.go new file mode 100644 index 0000000..6f13452 --- /dev/null +++ b/components/common/pkg/controller/util/patch.go @@ -0,0 +1,95 @@ +package util + +import ( + "fmt" + + clusterv2 "github.com/RafaySystems/rcloud-base/components/common/proto/types/controller" + apixv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" + + "github.com/RafaySystems/rcloud-base/components/common/pkg/controller/scheme" + jp "github.com/evanphx/json-patch" + "k8s.io/apimachinery/pkg/runtime/schema" + jmp "k8s.io/apimachinery/pkg/util/jsonmergepatch" + mp "k8s.io/apimachinery/pkg/util/mergepatch" + sp "k8s.io/apimachinery/pkg/util/strategicpatch" +) + +var knownMergePatchGroups = func() map[string]struct{} { + return map[string]struct{}{ + clusterv2.GroupVersion.Group: {}, + apixv1.GroupName: {}, + } +}() + +func isKnowMergePatchGroup(gvk schema.GroupVersionKind) bool { + if _, ok := knownMergePatchGroups[gvk.Group]; ok { + return true + } + return false +} + +// IsStrategicMergePatch returns true if gvk is present in the registerd scheme +func IsStrategicMergePatch(gvk schema.GroupVersionKind) bool { + return scheme.Scheme.Recognizes(gvk) && !isKnowMergePatchGroup(gvk) +} + +// CreateStrategicMergePatch creates strategic merge patch for original and modified +func CreateStrategicMergePatch(gvk schema.GroupVersionKind, original, current, modified []byte) ([]byte, error) { + obj, err := scheme.Scheme.New(gvk) + if err != nil { + return nil, fmt.Errorf("unable to create new k8s object %s", err) + } + + var patchMeta sp.PatchMetaFromStruct + patchMeta, err = sp.NewPatchMetaFromStruct(obj) + if err != nil { + err = fmt.Errorf("unable to lookup patch meta %s", err.Error()) + return nil, err + } + + ret, err := sp.CreateThreeWayMergePatch(original, modified, current, patchMeta, true, + mp.RequireKeyUnchanged("apiVersion"), + mp.RequireKeyUnchanged("kind"), + mp.RequireMetadataKeyUnchanged("name")) + + if err != nil { + err = fmt.Errorf("unable to create strategic merge patch %s", err.Error()) + } + + return ret, err +} + +// ApplyStrategicMergePatch applies strategic merge patch on orginal +func ApplyStrategicMergePatch(gvk schema.GroupVersionKind, original, patch []byte) ([]byte, error) { + obj, err := scheme.Scheme.New(gvk) + if err != nil { + return nil, fmt.Errorf("unable to create new k8s object %s", err) + } + + fb, err := sp.StrategicMergePatch(original, patch, obj) + if err != nil { + return nil, fmt.Errorf("unable to strategic merge patch %s", err.Error()) + } + return fb, nil +} + +// CreateJSONMergePatch creates JSON merge patch between original, current and modified +func CreateJSONMergePatch(original, current, modified []byte) ([]byte, error) { + ret, err := jmp.CreateThreeWayJSONMergePatch(original, modified, current, + mp.RequireKeyUnchanged("apiVersion"), + mp.RequireKeyUnchanged("kind"), + mp.RequireMetadataKeyUnchanged("name")) + if err != nil { + err = fmt.Errorf("unable to create json merge patch %s", err.Error()) + } + return ret, err +} + +// ApplyJSONMergePatch applies JSON merge patch onto the original document +func ApplyJSONMergePatch(original, patch []byte) ([]byte, error) { + fb, err := jp.MergePatch(original, patch) + if err != nil { + return nil, fmt.Errorf("unable to json merge patch %s", err.Error()) + } + return fb, nil +} diff --git a/components/common/pkg/controller/util/patch_test.go b/components/common/pkg/controller/util/patch_test.go new file mode 100644 index 0000000..0702513 --- /dev/null +++ b/components/common/pkg/controller/util/patch_test.go @@ -0,0 +1,43 @@ +package util + +import ( + "encoding/json" + "io/ioutil" + "os" + + "github.com/RafaySystems/rcloud-base/components/common/pkg/controller/scheme" + + apiv2 "github.com/RafaySystems/rcloud-base/components/common/proto/types/controller" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/apimachinery/pkg/runtime" + "sigs.k8s.io/yaml" +) + +func loadRuntimeObject(path string) runtime.Object { + f, err := os.Open(path) + if err != nil { + panic(err) + } + yb, err := ioutil.ReadAll(f) + if err != nil { + panic(err) + } + + jb, err := yaml.YAMLToJSON(yb) + if err != nil { + panic(err) + } + + var so apiv2.StepObject + err = json.Unmarshal(jb, &so) + if err != nil { + panic(err) + } + + o, _, err := scheme.Serializer.Decode(so.Raw, nil, &unstructured.Unstructured{}) + if err != nil { + panic(err) + } + + return o +} diff --git a/components/common/pkg/controller/util/step.go b/components/common/pkg/controller/util/step.go new file mode 100644 index 0000000..4c74a51 --- /dev/null +++ b/components/common/pkg/controller/util/step.go @@ -0,0 +1,46 @@ +package util + +import ( + clusterv2 "github.com/RafaySystems/rcloud-base/components/common/proto/types/controller" +) + +const ( + crdKind = "CustomResourceDefinition" + clusterRoleKind = "ClusterRole" + clusterRoleBindingKind = "ClusterRoleBinding" + roleBindingKind = "RoleBinding" + roleKind = "Role" +) + +// SetNamespace is a utility function setting namespace for a step objects +// it preserves namespace if already set for selective resources +func SetNamespace(so *clusterv2.StepObject, namespace string) error { + accessor, err := so.Accessor() + if err != nil { + return err + } + + kind, err := accessor.Kind() + if err != nil { + return err + } + + switch kind { + case crdKind, clusterRoleKind, clusterRoleBindingKind: + case roleKind, roleBindingKind: + ens, err := accessor.Namespace() + if err != nil { + return err + } + if ens == "" { + accessor.SetNamespace(namespace) + } + default: + accessor.SetNamespace(namespace) + } + + accessor.ResetAutoFields() + so.Raw = accessor.Bytes() + + return nil +} diff --git a/components/common/pkg/controller/util/string.go b/components/common/pkg/controller/util/string.go new file mode 100644 index 0000000..7564290 --- /dev/null +++ b/components/common/pkg/controller/util/string.go @@ -0,0 +1,22 @@ +package util + +// ContainsString checks if string exists in slice +func ContainsString(slice []string, s string) bool { + for _, item := range slice { + if item == s { + return true + } + } + return false +} + +// RemoveString removes string from slick +func RemoveString(slice []string, s string) (result []string) { + for _, item := range slice { + if item == s { + continue + } + result = append(result, item) + } + return +} diff --git a/components/common/pkg/controller/util/testdata/kong.yaml b/components/common/pkg/controller/util/testdata/kong.yaml new file mode 100644 index 0000000..38158b3 --- /dev/null +++ b/components/common/pkg/controller/util/testdata/kong.yaml @@ -0,0 +1,12 @@ +apiVersion: configuration.konghq.com/v1 +kind: KongIngress +metadata: + name: results-onfido +proxy: + protocol: http + path: /v3/onf +route: + strip_path: false + protocols: + - https + - "" \ No newline at end of file diff --git a/components/common/pkg/controller/util/testdata/owner1.yaml b/components/common/pkg/controller/util/testdata/owner1.yaml new file mode 100644 index 0000000..5684624 --- /dev/null +++ b/components/common/pkg/controller/util/testdata/owner1.yaml @@ -0,0 +1,693 @@ +apiVersion: cluster.rafay.dev/v2 +kind: Tasklet +metadata: + annotations: + rafay.dev/ownerRef: '{"apiVersion":"cluster.rafay.dev/v2","kind":"Task","name":"wordpress-demo","uid":"b0e6d87f-4d21-11ea-b8ec-0ec508a9a2df","controller":true,"blockOwnerDeletion":true}' + creationTimestamp: "2020-02-11T22:56:08Z" + generation: 1 + name: wordpress-demo + namespace: wordpress + resourceVersion: "11710944" + selfLink: /apis/cluster.rafay.dev/v2/namespaces/wordpress/tasklets/wordpress-demo + uid: b0e210f3-4d21-11ea-b8ec-0ec508a9a2df +spec: + init: + - name: step-secret-wordpress-demo + object: + apiVersion: v1 + data: + wordpress-password: ZGVtbyEyMzQ= + kind: Secret + metadata: + labels: + app: wordpress-demo + chart: wordpress-7.5.4 + heritage: Tiller + release: wordpress-demo + name: wordpress-demo + namespace: wordpress + type: Opaque + - name: step-configmap-wordpress-demo-mariadb + object: + apiVersion: v1 + data: + my.cnf: |- + [mysqld] + skip-name-resolve + explicit_defaults_for_timestamp + basedir=/opt/bitnami/mariadb + plugin_dir=/opt/bitnami/mariadb/plugin + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + tmpdir=/opt/bitnami/mariadb/tmp + max_allowed_packet=16M + bind-address=0.0.0.0 + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + log-error=/opt/bitnami/mariadb/logs/mysqld.log + character-set-server=UTF8 + collation-server=utf8_general_ci + + [client] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + default-character-set=UTF8 + plugin_dir=/opt/bitnami/mariadb/plugin + + [manager] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + kind: ConfigMap + metadata: + labels: + app: mariadb + chart: mariadb-6.13.0 + component: master + heritage: Tiller + release: wordpress-demo + name: wordpress-demo-mariadb + namespace: wordpress + - name: step-secret-wordpress-stage-tls + object: + apiVersion: v1 + data: + tls.crt: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUd1VENDQmFHZ0F3SUJBZ0lJSXdNMXY0RUFUUDh3RFFZSktvWklodmNOQVFFTEJRQXdnYlF4Q3pBSkJnTlYKQkFZVEFsVlRNUkF3RGdZRFZRUUlFd2RCY21sNmIyNWhNUk13RVFZRFZRUUhFd3BUWTI5MGRITmtZV3hsTVJvdwpHQVlEVlFRS0V4RkhiMFJoWkdSNUxtTnZiU3dnU1c1akxqRXRNQ3NHQTFVRUN4TWthSFIwY0RvdkwyTmxjblJ6CkxtZHZaR0ZrWkhrdVkyOXRMM0psY0c5emFYUnZjbmt2TVRNd01RWURWUVFERXlwSGJ5QkVZV1JrZVNCVFpXTjEKY21VZ1EyVnlkR2xtYVdOaGRHVWdRWFYwYUc5eWFYUjVJQzBnUnpJd0hoY05NVGt3T0RFNE1ESXpOREl3V2hjTgpNakV3T0RFNE1ESXpOREl3V2pBL01TRXdId1lEVlFRTEV4aEViMjFoYVc0Z1EyOXVkSEp2YkNCV1lXeHBaR0YwClpXUXhHakFZQmdOVkJBTU1FU291YzNSaFoyVXVjbUZtWVhrdVpHVjJNSUlCSWpBTkJna3Foa2lHOXcwQkFRRUYKQUFPQ0FROEFNSUlCQ2dLQ0FRRUF0L1FsU21HMnFRR2pORENrcHB6eFFOSXdpY1d1aWtycjF3T3FSSjN5c0tvQgp3TnB4NElOK3NMR3F5cVN5Vm9WcmFXYVIzdWJNMnd5dFhtVFBMdWNIL1pTTGhNNEJqYm9XRmk1VTJISm53emNMCkFLTGxSU2VYZDZzMVByaFdYVUM5MHRCaXc4cWxSQXRoUlg0M1RJK0pINXA3a1UzSWhhc1VSaXliZVlFeERKVEkKRWcxRFZjR2hWU3hkQk5pQzJ0UWlRWE5wS214andERERUT3hPZ3JuclJWeDFPN1NuU0dPV1pwNVZEbTdycUpUbQo4QjRiTk53TTg5UWdEanNnUTh5TENDOEZhZjVHc2hybDI0ZnZBeDhEQkptMlhBVFU0dlRDalI4U2g3RXhiTXc1CjAxYWZLdWtOazl6R0dLY25mSWdjTUtZcVFhTWlpdGVZYndhSjdjRTlOUUlEQVFBQm80SURRVENDQXowd0RBWUQKVlIwVEFRSC9CQUl3QURBZEJnTlZIU1VFRmpBVUJnZ3JCZ0VGQlFjREFRWUlLd1lCQlFVSEF3SXdEZ1lEVlIwUApBUUgvQkFRREFnV2dNRGdHQTFVZEh3UXhNQzh3TGFBcm9DbUdKMmgwZEhBNkx5OWpjbXd1WjI5a1lXUmtlUzVqCmIyMHZaMlJwWnpKek1TMHhNekkyTG1OeWJEQmRCZ05WSFNBRVZqQlVNRWdHQzJDR1NBR0cvVzBCQnhjQk1Ea3cKTndZSUt3WUJCUVVIQWdFV0syaDBkSEE2THk5alpYSjBhV1pwWTJGMFpYTXVaMjlrWVdSa2VTNWpiMjB2Y21WdwpiM05wZEc5eWVTOHdDQVlHWjRFTUFRSUJNSFlHQ0NzR0FRVUZCd0VCQkdvd2FEQWtCZ2dyQmdFRkJRY3dBWVlZCmFIUjBjRG92TDI5amMzQXVaMjlrWVdSa2VTNWpiMjB2TUVBR0NDc0dBUVVGQnpBQ2hqUm9kSFJ3T2k4dlkyVnkKZEdsbWFXTmhkR1Z6TG1kdlpHRmtaSGt1WTI5dEwzSmxjRzl6YVhSdmNua3ZaMlJwWnpJdVkzSjBNQjhHQTFVZApJd1FZTUJhQUZFREN2U2VPekRTRE1LSXoxL3Rzcy9DMExJRE9NQzBHQTFVZEVRUW1NQ1NDRVNvdWMzUmhaMlV1CmNtRm1ZWGt1WkdWMmdnOXpkR0ZuWlM1eVlXWmhlUzVrWlhZd0hRWURWUjBPQkJZRUZDOWZmNTR1VmRQYVVEN2kKNUlySmI0c1l4dEF6TUlJQmZBWUtLd1lCQkFIV2VRSUVBZ1NDQVd3RWdnRm9BV1lBZGdDa3VRbVF0QmhZRkllNwpFNkxNWjNBS1BEV1lCUGtiMzdqamQ4ME95QTNjRUFBQUFXeWlrMTRtQUFBRUF3QkhNRVVDSUFzZWRoRWhnVk5HCitkZ3B4TklnMy9JQyt1cVZxTDNldE9WUWdOZXVSWGNMQWlFQXZUR1RJMEpTYnZrMy9LazVvMU1sMzVMMDVleWIKajNkN204ZjN2SVFxWDlJQWRRRHVTNzIzZGM1Z3V1RkNhUityNFo1bW93OStYN0J5MklNQXhIdUplcWo5eXdBQQpBV3lpazJNL0FBQUVBd0JHTUVRQ0lCY0hXRE5nWXJTaTRDS0U5dlVyc002T2ZZK3NlN0hPeFVxWWpVZG5TRk81CkFpQiszRkJFaDBFUWV0TGJvdHJJcWVRNVJrNHBpV2N3V3lvVlFnRkJCMHMweHdCMUFFU1VaUzZ3N3M2dnhFQUgKMktqK0tNRGE1b0srMk1zeHRUL1RNNWExdG9Hb0FBQUJiS0tUYUR3QUFBUURBRVl3UkFJZ1BYZFpvd3REZERhMQpvbkZ4cWJEL2tJUkQ2RlFKcVNrUHdKR0pLSkg1cXdNQ0lGUzcwandyZ0FRMldUemxsemo2SXRLdmRPRkgyaHFJCmhib3FCRVh1MzJQZU1BMEdDU3FHU0liM0RRRUJDd1VBQTRJQkFRQ2MzVStncU5FRVduRUZQbnlYODJHK0gxTS8KK1JmVVc2VVFBclhQcHBVLzIvL3NWV2dDSTBIaWRzTWk1NUcvNUgxNExsL1ZqRnNhYmVEVHY1UUNaYitVUFg3SwpjcXRlYUMxa0x1UG9zLy8wZjFtQnhHdWJZTWJjUmYwSnlTK3R2VEpoSXNGdytWOC9Na0JFeVQ5WjJPMW5kV1I3CkNNa3pvRUV1bVZkem82elBPLzFVME8vUWp6L3RxbThXWWdteGc3ejBJM0hOaHpxOG5DNyttcVBoRDRIMDN2MHcKMFZYaExBNWpBbkZQUUNZN2NPTHNPNy9xOFB0THJUcll6WUU0QVdOL3RBNDdjV2hvYTMreDBqNndmQ2xtWUg5SAowa2U2ZTdqclI1Q2I5VUYwc3lIL2xVdXAwZlI2SmtNNDQwaS9EN1lqTHN5VEYraGI1YmlHendJQnVSTEsKLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQotLS0tLUJFR0lOIENFUlRJRklDQVRFLS0tLS0KTUlJRTBEQ0NBN2lnQXdJQkFnSUJCekFOQmdrcWhraUc5dzBCQVFzRkFEQ0JnekVMTUFrR0ExVUVCaE1DVlZNeApFREFPQmdOVkJBZ1RCMEZ5YVhwdmJtRXhFekFSQmdOVkJBY1RDbE5qYjNSMGMyUmhiR1V4R2pBWUJnTlZCQW9UCkVVZHZSR0ZrWkhrdVkyOXRMQ0JKYm1NdU1URXdMd1lEVlFRREV5aEhieUJFWVdSa2VTQlNiMjkwSUVObGNuUnAKWm1sallYUmxJRUYxZEdodmNtbDBlU0F0SUVjeU1CNFhEVEV4TURVd016QTNNREF3TUZvWERUTXhNRFV3TXpBMwpNREF3TUZvd2diUXhDekFKQmdOVkJBWVRBbFZUTVJBd0RnWURWUVFJRXdkQmNtbDZiMjVoTVJNd0VRWURWUVFICkV3cFRZMjkwZEhOa1lXeGxNUm93R0FZRFZRUUtFeEZIYjBSaFpHUjVMbU52YlN3Z1NXNWpMakV0TUNzR0ExVUUKQ3hNa2FIUjBjRG92TDJObGNuUnpMbWR2WkdGa1pIa3VZMjl0TDNKbGNHOXphWFJ2Y25rdk1UTXdNUVlEVlFRRApFeXBIYnlCRVlXUmtlU0JUWldOMWNtVWdRMlZ5ZEdsbWFXTmhkR1VnUVhWMGFHOXlhWFI1SUMwZ1J6SXdnZ0VpCk1BMEdDU3FHU0liM0RRRUJBUVVBQTRJQkR3QXdnZ0VLQW9JQkFRQzU0TXNRMUs5MnZkU1RZdXN3WkxpQkNHekQKQk5saUY0NHYvejVsejQvT1l1WThVaHphRmtWTFZhdDRhMk9EWXBET0QybHNtY2dhRkl0TXpFVXo2b2pjbnFPdgpLLzZBWVoxNVY4VFBMdlEvTUR4ZFIveWFGcnpETjVaQlVZNFJTMVQ0S0w3UWpMN3dNRGdlODdBbStHWkhZMjNlCmNTWkhqemhIVTlGR0hiVGozQURxUmF5OXZISFpxbThBMjl2Tk1EcDVUMTlNUi9nZDcxdkN4SjFnTzdHeVE1SFkKcEROTzZyUFdKMCt0SllxbHh2VFYwS2F1ZEFWa1Y0aTFSRlhVTFNvNlB2aTR2ZWt5Q2dLVVpNUVdPbER4U3E3bgplVE92RENBSGYramZCRG5DYVFKc1kxTDZkOEVieUhTSHlMbVRHRkJVTlV0cFRydzcwMGt1SDl6QjBsTDdBZ01CCkFBR2pnZ0VhTUlJQkZqQVBCZ05WSFJNQkFmOEVCVEFEQVFIL01BNEdBMVVkRHdFQi93UUVBd0lCQmpBZEJnTlYKSFE0RUZnUVVRTUs5SjQ3TU5JTXdvalBYKzJ5ejhMUXNnTTR3SHdZRFZSMGpCQmd3Rm9BVU9wcUZCeEJuS0xidgo5cjBGUVc0Z3daVGFEOTR3TkFZSUt3WUJCUVVIQVFFRUtEQW1NQ1FHQ0NzR0FRVUZCekFCaGhob2RIUndPaTh2CmIyTnpjQzVuYjJSaFpHUjVMbU52YlM4d05RWURWUjBmQkM0d0xEQXFvQ2lnSm9Za2FIUjBjRG92TDJOeWJDNW4KYjJSaFpHUjVMbU52YlM5blpISnZiM1F0WnpJdVkzSnNNRVlHQTFVZElBUS9NRDB3T3dZRVZSMGdBREF6TURFRwpDQ3NHQVFVRkJ3SUJGaVZvZEhSd2N6b3ZMMk5sY25SekxtZHZaR0ZrWkhrdVkyOXRMM0psY0c5emFYUnZjbmt2Ck1BMEdDU3FHU0liM0RRRUJDd1VBQTRJQkFRQUlmbXlURU1nNHVKYXBrRXYvb1Y5UEJPOXNQcHlJQnNsUWo2WnoKOTFjeEc3Njg1Qy9iK0xyVFcrQzA1K1o1WWc0TW90ZHFZM014dGZXb1NLUTdDQzJpWFpEWHRId2xUeEZXTU1TMgpSSjE3TEozbFh1YnZER0dxditRcUcrNkVucmlEZmNGRHprU25FM0FOa1IvMHlCT3RnMkRaMkhLb2N5UWV0YXdpCkRzb1hpV0pZUkJ1cmlTVUJBQS9OeEJ0aTIxRzAwdzlSS3B2MHZIUDhkczQycE0zWjJDenFycHYxS3JLUTBVMTEKR0lvL2lrR1FJMzFiUy82a0ExaWJSckxEWUdDRCtIMVFRYzdDb1pERHUrOENMOUlWVk81RUZka0tycWVLTSsyeApMWFkySnR3RTY1LzNZUjhWM0lkdjdrYVdLSzJoSm4wS0NhY3VCS09OdlBpOEJEQUIKLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQotLS0tLUJFR0lOIENFUlRJRklDQVRFLS0tLS0KTUlJRWZUQ0NBMldnQXdJQkFnSURHK2NWTUEwR0NTcUdTSWIzRFFFQkN3VUFNR014Q3pBSkJnTlZCQVlUQWxWVApNU0V3SHdZRFZRUUtFeGhVYUdVZ1IyOGdSR0ZrWkhrZ1IzSnZkWEFzSUVsdVl5NHhNVEF2QmdOVkJBc1RLRWR2CklFUmhaR1I1SUVOc1lYTnpJRElnUTJWeWRHbG1hV05oZEdsdmJpQkJkWFJvYjNKcGRIa3dIaGNOTVRRd01UQXgKTURjd01EQXdXaGNOTXpFd05UTXdNRGN3TURBd1dqQ0JnekVMTUFrR0ExVUVCaE1DVlZNeEVEQU9CZ05WQkFnVApCMEZ5YVhwdmJtRXhFekFSQmdOVkJBY1RDbE5qYjNSMGMyUmhiR1V4R2pBWUJnTlZCQW9URVVkdlJHRmtaSGt1ClkyOXRMQ0JKYm1NdU1URXdMd1lEVlFRREV5aEhieUJFWVdSa2VTQlNiMjkwSUVObGNuUnBabWxqWVhSbElFRjEKZEdodmNtbDBlU0F0SUVjeU1JSUJJakFOQmdrcWhraUc5dzBCQVFFRkFBT0NBUThBTUlJQkNnS0NBUUVBdjNGaQpDUEg2V1RUM0c4a1lvL2VBU1ZqcElvTVRwc1VnUXdFN2hQSG1oVW1mSityMmhCdE9vTFRiY0pqSE1nR3hCVDRIClR1NzArazh2V1RBaTU2c1pWbXZpZ0FmODh4WjFnRGxSZStYNU5iWjBUcW1OZ2hQa3RqK3BBNFA2b3I2S0ZXcC8KM2d2RHRoa1VCY3JxdzZnRWxEdEdmRElOOHdCbUlzaU5hVzAyakJFWXQ5T3lIR0MwT1BvQ2pNN1QzVVlIM2dvKwo2MTE4eUh6N3NDdFRwSkppYVZFbEJXRWFSSUdNTEtsRGxpUGZyRHFCbWc0cHhSeXA2VjBldHA2ZU1BbzV6dkdJCmdQdExYY3d5N0lWaVF5VTBBbFluQVpHME8zQXFQMjZ4Nkp5SUFYMmYxUG5iVTIxZ25iOHM1MWlydUY5Ry9NN0UKR3dNOENldEpNVnhwUnJQZ1J3SURBUUFCbzRJQkZ6Q0NBUk13RHdZRFZSMFRBUUgvQkFVd0F3RUIvekFPQmdOVgpIUThCQWY4RUJBTUNBUVl3SFFZRFZSME9CQllFRkRxYWhRY1FaeWkyNy9hOUJVRnVJTUdVMmcvZU1COEdBMVVkCkl3UVlNQmFBRk5MRXNOS1IxRXdSY2JOaHl6MmgvdDJvYXRUak1EUUdDQ3NHQVFVRkJ3RUJCQ2d3SmpBa0JnZ3IKQmdFRkJRY3dBWVlZYUhSMGNEb3ZMMjlqYzNBdVoyOWtZV1JrZVM1amIyMHZNRElHQTFVZEh3UXJNQ2t3SjZBbApvQ09HSVdoMGRIQTZMeTlqY213dVoyOWtZV1JrZVM1amIyMHZaMlJ5YjI5MExtTnliREJHQmdOVkhTQUVQekE5Ck1Ec0dCRlVkSUFBd016QXhCZ2dyQmdFRkJRY0NBUllsYUhSMGNITTZMeTlqWlhKMGN5NW5iMlJoWkdSNUxtTnYKYlM5eVpYQnZjMmwwYjNKNUx6QU5CZ2txaGtpRzl3MEJBUXNGQUFPQ0FRRUFXUXRUdlpLR0VhY2tlKzFiTWM4ZApIMnh3eGJodXZrNjc5cjZYVU9Fd2Y3b29YR0tVd3VOK00vZjdRbmFGMjVVY2pDSllkUWtNaUdWbk9Rb1dDY1dnCk9KZWt4U09UUDdRWXBnRUdSSkhqcDJrbnRGb2xmenEzTXMzZGhQOHFPQ2t6cE4xbnNvWCtvWWdnSEZDSnlOd3EKOWtJRE4wem1pTi9WcnlUeXNjUGZ6TFhzNEpsZXQwbFVJRHlVR0F6SEhGSVlTYVJ0NGJOWUM4blk3Tm11SERLTwpLSEFONHY2bUY1NkVENzFYY0xOYTZSK2dobE83NzN6L2FRdmdTTU8za3d2SUNsVEVyRjBVWnpkc3lxVXZNUWczCnFtNXZqTHliNGxkZEpJR3ZsNWVjaEsxc3JEZE1adk5oa1JFZzVMNHduM3FrS1FtdzRUUmZaSGNZUUZIZmpEQ20Kcnc9PQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCi0tLS0tQkVHSU4gQ0VSVElGSUNBVEUtLS0tLQpNSUlFQURDQ0F1aWdBd0lCQWdJQkFEQU5CZ2txaGtpRzl3MEJBUVVGQURCak1Rc3dDUVlEVlFRR0V3SlZVekVoCk1COEdBMVVFQ2hNWVZHaGxJRWR2SUVSaFpHUjVJRWR5YjNWd0xDQkpibU11TVRFd0x3WURWUVFMRXloSGJ5QkUKWVdSa2VTQkRiR0Z6Y3lBeUlFTmxjblJwWm1sallYUnBiMjRnUVhWMGFHOXlhWFI1TUI0WERUQTBNRFl5T1RFMwpNRFl5TUZvWERUTTBNRFl5T1RFM01EWXlNRm93WXpFTE1Ba0dBMVVFQmhNQ1ZWTXhJVEFmQmdOVkJBb1RHRlJvClpTQkhieUJFWVdSa2VTQkhjbTkxY0N3Z1NXNWpMakV4TUM4R0ExVUVDeE1vUjI4Z1JHRmtaSGtnUTJ4aGMzTWcKTWlCRFpYSjBhV1pwWTJGMGFXOXVJRUYxZEdodmNtbDBlVENDQVNBd0RRWUpLb1pJaHZjTkFRRUJCUUFEZ2dFTgpBRENDQVFnQ2dnRUJBTjZkMStwWEdFbWhXK3ZYWDBpRzZyN2QvK1R2Wnh6MFpXaXpWM0dnWG5lNzdadEo2WENBClBWWVlZd2h2MnZMTTBEOS9BbFFpVkJEWXNvSFV3SFU5UzMvSGQ4TStlS3NhQTdVZ2F5OXFLN0hGaUg3RXV4NncKd2RoRkoyK3FOMWozaHliWDJDMzJxUmUzSDNJMlRxWVhQMldZa3RzcWJsMmkvb2pnQzk1LzVZMFY0ZXZMT3RYaQpFcUlUTGRpT3IxOFNQYUFJQlFpMlhLVmxPQVJGbVI2allHQjB4VUdsY21JYllzVWZiMThhUXI0Q1VXV29yaU1ZCmF2eDRBNmxOZjRERCtxdGEvS0ZBcE1vWkZ2Nnl5TzllY3czdWQ3MmE5bm1ZdkxFSFo2SVZEZDJnV01aRWV3bysKWWloZnVrRUhVMWpQRVg0NGRNWDQvN1Zwa0krRWRPcVhHNjhDQVFPamdjQXdnYjB3SFFZRFZSME9CQllFRk5MRQpzTktSMUV3UmNiTmh5ejJoL3Qyb2F0VGpNSUdOQmdOVkhTTUVnWVV3Z1lLQUZOTEVzTktSMUV3UmNiTmh5ejJoCi90Mm9hdFRqb1dla1pUQmpNUXN3Q1FZRFZRUUdFd0pWVXpFaE1COEdBMVVFQ2hNWVZHaGxJRWR2SUVSaFpHUjUKSUVkeWIzVndMQ0JKYm1NdU1URXdMd1lEVlFRTEV5aEhieUJFWVdSa2VTQkRiR0Z6Y3lBeUlFTmxjblJwWm1sagpZWFJwYjI0Z1FYVjBhRzl5YVhSNWdnRUFNQXdHQTFVZEV3UUZNQU1CQWY4d0RRWUpLb1pJaHZjTkFRRUZCUUFECmdnRUJBREpMODdMS1BwSDhFc2FoQjR5T2Q2QXpCaFJja0I0WTl3aW1QUW9aK1llQUVXNXA1SllYTVA4MGtXTnkKT083TUhBR2pIWlFvcERIMmVzUlUxL2JsTVZnRG9zek9ZdHVVUlhPMXYwWEpKTFhWZ2dLdEkzbHBqYmkyVGM3UApUTW96SStnY2lLcWRpMEZ1RnNrZzVZbWV6VHZhY1BkK21TWWdGRlFscTI1emhlYWJJWjBLYklJT3FQakNEUG9RCkhteVc3NGNOeEE5aGk2M3VneXVWK0k2U2hISTU2eURxZysyRHpaZHVDTHpyVGlhMmN5dmswL1pNL2laeDRtRVIKZEVyL1Z4cUhEM1ZJTHM5UmFSZWdBaEpobGRYUlFMSVFUTzdFckJCRHBxV2VDdFdWWXBvTno0aUN4VElNNUN1ZgpSZVlObnlpY3Nia3FXbGV0TncrdkhYL2J2Wjg9Ci0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0= + tls.key: LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0tLS0tCk1JSUV2UUlCQURBTkJna3Foa2lHOXcwQkFRRUZBQVNDQktjd2dnU2pBZ0VBQW9JQkFRQzM5Q1ZLWWJhcEFhTTAKTUtTbW5QRkEwakNKeGE2S1N1dlhBNnBFbmZLd3FnSEEybkhnZzM2d3NhcktwTEpXaFd0cFpwSGU1c3piREsxZQpaTTh1NXdmOWxJdUV6Z0dOdWhZV0xsVFljbWZETndzQW91VkZKNWQzcXpVK3VGWmRRTDNTMEdMRHlxVkVDMkZGCmZqZE1qNGtmbW51UlRjaUZxeFJHTEp0NWdURU1sTWdTRFVOVndhRlZMRjBFMklMYTFDSkJjMmtxYkdQQU1NTk0KN0U2Q3VldEZYSFU3dEtkSVk1Wm1ubFVPYnV1b2xPYndIaHMwM0F6ejFDQU9PeUJEeklzSUx3VnAva2F5R3VYYgpoKzhESHdNRW1iWmNCTlRpOU1LTkh4S0hzVEZzekRuVFZwOHE2UTJUM01ZWXB5ZDhpQnd3cGlwQm95S0sxNWh2CkJvbnR3VDAxQWdNQkFBRUNnZ0VBZDZQU25RM3dQdnRScWgvNDltUWNoSXd3QldzTW1lVWdmamRrQmp5MEd6SjIKOFhjaG1XUHNnZjhMbGNDSVBMMkpub09YVytIQVdyZGtDb0NHUDNzRE4ybmxVL3FvQ0FWL1YrM0tRUHduZ0UvTQpXQjJaLytCQUl4UzNESlBYbDg4RHBwamhvM1dwQnhoZnExTHJwRisyVDFlcUJsY1FrOTh3MEhNeXExUGJFdEtXCjdxcWZyeHl1WGZFc05ha21tY1M3NmFaUjNjOUNKSUxtOFVDcDZuU29DUENvNkdRVE9CTkpJajZKcFFXWEN4eG0KazNwdkptRlVYUFNYLzVyT0JGNVdYRlJzSHNXNkR3ejZhNk0zc3NyQWNxSEpkd0xUb1JQS2Z3dkF3ajJkNzlWcgorZERjZkQ5ZXhuK1JUTW9MRVozak9ZcTlLeDE2aHN2a3RHcFhYTmcrQVFLQmdRRGVqMy9rSnJzZ1FlMGFncmtrCkJZNmlsZStyRTdaWS9kR0J3RGhOcHJhTjROaWN2MzJRUTdSRjArK3dwV3loZXdFV3hmQVhSZCtZSUY0UjZtK3MKZkJqdFNFWnBPWDY1S2tUcFNiNTlUNmU0Y1pmQ3hTVVdZLzhzeVUrWVVvT3JVSlQ1QldsRFU3Sllsd3Bud1cyMAplb0hxQVBISkx0enI0S1psTVhCM1hqcVUvd0tCZ1FEVGw2OGNoOWNNUVM4Ti83QWRGZmpnUVpweXVYMjY0WG9ZCkczVE5GOHNpTmoyV211TlNDMTliQTZVblJZM1lUTW0yZ2dGcE5zUmVLRnMyOUpnL1VRdDZ6WDFRN1ZEa3FUd3QKQzlmV3FYVVB4M1p4aEx2dXRuVlN4TlI1dlVKNHhLYnhKVE9STVA0S1NTSExEQnJ3aVJUZW9sd0d6YzgyY21yNwpIbHhZRjAvcHl3S0JnUUNSUmFXN0xMVFVWM1FHNi9FaFhDZEFaUkl0M3c0VmhJZnVZNlBjdThkSlVNelRkQUxuCjJlbWY4cmp2MnVyUGROUy9JckNXNEZzVWwzd1B3YkRuSzVHeHdJMkZQYXhEL1IxQ0VZcXZqUUR6V2VJdmxqT2gKSytCeVFXMGRCaTgvOGJkcjNHWmJOaFNoMHVWTjJHcGRkZUc2OXFiY0pTUzdLc1l5STFVLzlWZlR6UUtCZ0RUNAp1VzhrRnROTGtsTW4ydGc5UXZRcG1GZjJWaUt1QmhuNDdiSFdyaFVmalNXaUd4elVHZ2c0RG1XWmhSeE1oUWM2CjNzMlBWM1BYR0piV2Z6TUN3Q1A3UTg4NXlsR2tpSnNpWnVPbnd0V3pjdFNTalZZQ3ViYUI3a3VYOVFjMC9ESk0KeE84cFc4QUpkUHRYU1h0RVprUWlVM1drbXFhZjJHYUx3RVNSZVlFbkFvR0FPQmJHcWpiNSs2MlR3Y2RNV3lLcQpmT095VUFZc2JRTVo1UUs0YUM2eUxTQm5OS0ZvNTMvQkkzZFpFS1ZxbFhYY0RIQlRPaGdOR1RaVHdCdlpyY1N2CmphUDNBZ01NY1dpaGNGN2QraisyQTk3L0F4L2MzV1dpVnlFcytScVRoL01mK1hMem5aaHFPN3E0d1I0MHZIL1MKSzZmV0FTSTN6MTlpeVZ2VllPYkJsYXM9Ci0tLS0tRU5EIFBSSVZBVEUgS0VZLS0tLS0= + kind: Secret + metadata: + labels: + app: wordpress-demo + chart: wordpress-7.5.4 + heritage: Tiller + release: wordpress-demo + name: wordpress-stage-tls + namespace: wordpress + type: kubernetes.io/tls + - name: step-service-wordpress-demo + object: + apiVersion: v1 + kind: Service + metadata: + labels: + app: wordpress-demo + chart: wordpress-7.5.4 + heritage: Tiller + release: wordpress-demo + name: wordpress-demo + namespace: wordpress + spec: + ports: + - name: http + port: 80 + protocol: TCP + targetPort: http + - name: https + port: 443 + protocol: TCP + targetPort: https + - name: metrics + port: 9117 + protocol: TCP + targetPort: metrics + selector: + app: wordpress-demo + sessionAffinity: None + type: ClusterIP + - name: step-configmap-wordpress-demo-mariadb-tests + object: + apiVersion: v1 + data: + run.sh: |- + @test "Testing MariaDB is accessible" { + mysql -h wordpress-demo-mariadb -uroot -p$MARIADB_ROOT_PASSWORD -e 'show databases;' + } + kind: ConfigMap + metadata: + name: wordpress-demo-mariadb-tests + namespace: wordpress + - name: step-service-wordpress-demo-mariadb + object: + apiVersion: v1 + kind: Service + metadata: + labels: + app: mariadb + chart: mariadb-6.13.0 + component: master + heritage: Tiller + release: wordpress-demo + name: wordpress-demo-mariadb + namespace: wordpress + spec: + ports: + - name: mysql + port: 3306 + protocol: TCP + targetPort: mysql + selector: + app: mariadb + component: master + release: wordpress-demo + sessionAffinity: None + type: ClusterIP + - name: step-persistentvolumeclaim-wordpress-demo + object: + apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + labels: + app: wordpress-demo + chart: wordpress-7.5.4 + heritage: Tiller + release: wordpress-demo + name: wordpress-demo + namespace: wordpress + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 10Gi + volumeMode: Filesystem + - name: step-secret-wordpress-demo-mariadb + object: + apiVersion: v1 + data: + mariadb-password: ZGVtbyEyMzQ= + mariadb-root-password: RFNiVHhpOXViUg== + kind: Secret + metadata: + labels: + app: mariadb + chart: mariadb-6.13.0 + heritage: Tiller + release: wordpress-demo + name: wordpress-demo-mariadb + namespace: wordpress + type: Opaque + install: + - name: step-statefulset-wordpress-demo-mariadb + object: + apiVersion: apps/v1 + kind: StatefulSet + metadata: + labels: + app: mariadb + chart: mariadb-6.13.0 + component: master + heritage: Tiller + release: wordpress-demo + name: wordpress-demo-mariadb + namespace: wordpress + spec: + podManagementPolicy: OrderedReady + replicas: 1 + revisionHistoryLimit: 10 + selector: + matchLabels: + app: mariadb + component: master + release: wordpress-demo + serviceName: wordpress-demo-mariadb + template: + metadata: + creationTimestamp: null + labels: + app: mariadb + chart: mariadb-6.13.0 + component: master + release: wordpress-demo + rep-organization: pkvwv2n + rep-partner: rx28oml + rep-project: 0lk5wke + rep-workload: wordpress-demo + spec: + affinity: + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - podAffinityTerm: + labelSelector: + matchLabels: + app: mariadb + release: wordpress-demo + topologyKey: kubernetes.io/hostname + weight: 1 + containers: + - env: + - name: MARIADB_ROOT_PASSWORD + valueFrom: + secretKeyRef: + key: mariadb-root-password + name: wordpress-demo-mariadb + - name: MARIADB_USER + value: bn_wordpress + - name: MARIADB_PASSWORD + valueFrom: + secretKeyRef: + key: mariadb-password + name: wordpress-demo-mariadb + - name: MARIADB_DATABASE + value: bitnami_wordpress + image: docker.io/bitnami/mariadb:10.3.18-debian-9-r36 + imagePullPolicy: IfNotPresent + livenessProbe: + exec: + command: + - sh + - -c + - exec mysqladmin status -uroot -p$MARIADB_ROOT_PASSWORD + failureThreshold: 3 + initialDelaySeconds: 120 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 1 + name: mariadb + ports: + - containerPort: 3306 + name: mysql + protocol: TCP + readinessProbe: + exec: + command: + - sh + - -c + - exec mysqladmin status -uroot -p$MARIADB_ROOT_PASSWORD + failureThreshold: 3 + initialDelaySeconds: 30 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 1 + resources: {} + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + volumeMounts: + - mountPath: /bitnami/mariadb + name: data + - mountPath: /opt/bitnami/mariadb/conf/my.cnf + name: config + subPath: my.cnf + dnsPolicy: ClusterFirst + restartPolicy: Always + schedulerName: default-scheduler + securityContext: + fsGroup: 1001 + runAsUser: 1001 + serviceAccount: default + serviceAccountName: default + terminationGracePeriodSeconds: 30 + volumes: + - configMap: + defaultMode: 420 + name: wordpress-demo-mariadb + name: config + updateStrategy: + type: RollingUpdate + volumeClaimTemplates: + - metadata: + creationTimestamp: null + labels: + app: mariadb + component: master + heritage: Tiller + release: wordpress-demo + name: data + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 8Gi + volumeMode: Filesystem + status: + phase: Pending + - name: step-deployment-wordpress-demo + object: + apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: wordpress-demo + chart: wordpress-7.5.4 + heritage: Tiller + release: wordpress-demo + name: wordpress-demo + namespace: wordpress + spec: + progressDeadlineSeconds: 600 + replicas: 1 + revisionHistoryLimit: 10 + selector: + matchLabels: + app: wordpress-demo + release: wordpress-demo + strategy: + rollingUpdate: + maxSurge: 25% + maxUnavailable: 25% + type: RollingUpdate + template: + metadata: + annotations: + prometheus.io/port: "9117" + prometheus.io/scrape: "true" + creationTimestamp: null + labels: + app: wordpress-demo + chart: wordpress-7.5.4 + release: wordpress-demo + rep-organization: pkvwv2n + rep-partner: rx28oml + rep-project: 0lk5wke + rep-workload: wordpress-demo + spec: + containers: + - env: + - name: ALLOW_EMPTY_PASSWORD + value: "yes" + - name: MARIADB_HOST + value: wordpress-demo-mariadb + - name: MARIADB_PORT_NUMBER + value: "3306" + - name: WORDPRESS_DATABASE_NAME + value: bitnami_wordpress + - name: WORDPRESS_DATABASE_USER + value: bn_wordpress + - name: WORDPRESS_DATABASE_PASSWORD + valueFrom: + secretKeyRef: + key: mariadb-password + name: wordpress-demo-mariadb + - name: WORDPRESS_USERNAME + value: user + - name: WORDPRESS_PASSWORD + valueFrom: + secretKeyRef: + key: wordpress-password + name: wordpress-demo + - name: WORDPRESS_EMAIL + value: user@example.com + - name: WORDPRESS_FIRST_NAME + value: Rafay + - name: WORDPRESS_LAST_NAME + value: Demo + - name: WORDPRESS_HTACCESS_OVERRIDE_NONE + value: "yes" + - name: WORDPRESS_BLOG_NAME + value: User's Blog! + - name: WORDPRESS_SKIP_INSTALL + value: "no" + - name: WORDPRESS_TABLE_PREFIX + value: wp_ + - name: WORDPRESS_SCHEME + value: http + image: docker.io/bitnami/wordpress:5.2.4-debian-9-r0 + imagePullPolicy: IfNotPresent + livenessProbe: + failureThreshold: 6 + httpGet: + path: /wp-login.php + port: http + scheme: HTTP + initialDelaySeconds: 120 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 5 + name: wordpress + ports: + - containerPort: 80 + name: http + protocol: TCP + - containerPort: 443 + name: https + protocol: TCP + readinessProbe: + failureThreshold: 6 + httpGet: + path: /wp-login.php + port: http + scheme: HTTP + initialDelaySeconds: 30 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 5 + resources: + requests: + cpu: 300m + memory: 512Mi + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + volumeMounts: + - mountPath: /bitnami/wordpress + name: wordpress-data + subPath: wordpress + - command: + - /bin/apache_exporter + - -scrape_uri + - http://status.localhost:80/server-status/?auto + image: docker.io/bitnami/apache-exporter:0.7.0-debian-9-r86 + imagePullPolicy: IfNotPresent + livenessProbe: + failureThreshold: 3 + httpGet: + path: /metrics + port: metrics + scheme: HTTP + initialDelaySeconds: 15 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 5 + name: metrics + ports: + - containerPort: 9117 + name: metrics + protocol: TCP + readinessProbe: + failureThreshold: 3 + httpGet: + path: /metrics + port: metrics + scheme: HTTP + initialDelaySeconds: 5 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 1 + resources: {} + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + dnsPolicy: ClusterFirst + hostAliases: + - hostnames: + - status.localhost + ip: 127.0.0.1 + restartPolicy: Always + schedulerName: default-scheduler + securityContext: {} + terminationGracePeriodSeconds: 30 + volumes: + - name: wordpress-data + persistentVolumeClaim: + claimName: wordpress-demo + postInstall: + - name: step-ingress-wordpress-demo + object: + apiVersion: extensions/v1beta1 + kind: Ingress + metadata: + annotations: + kubernetes.io/ingress.class: nginx + labels: + app: wordpress-demo + chart: wordpress-7.5.4 + heritage: Tiller + release: wordpress-demo + name: wordpress-demo + namespace: wordpress + spec: + rules: + - host: wordpress.stage.rafay.dev + http: + paths: + - backend: + serviceName: wordpress-demo + servicePort: http + path: / + tls: + - hosts: + - wordpress.stage.rafay.dev + secretName: wordpress-stage-tls +status: + conditions: + - lastUpdateTime: "2020-02-11T22:56:11Z" + reason: all steps complete + status: Complete + type: TaskletInit + - lastUpdateTime: "2020-02-11T22:57:11Z" + reason: all steps complete + status: Complete + type: TaskletInstall + - lastUpdateTime: "2020-02-11T22:57:12Z" + reason: all steps complete + status: Complete + type: TaskletPostInstall + - lastUpdateTime: "2020-02-11T22:57:12Z" + reason: all steps complete + status: Complete + type: TaskletReady + init: + - jobReason: not configured + jobState: StepJobComplete + name: step-secret-wordpress-demo + objectReason: object type *v1.Secret not handled + objectRef: + apiVersion: v1 + kind: Secret + name: wordpress-demo + namespace: wordpress + resourceVersion: "11710670" + uid: b0bcd771-4d21-11ea-b8ec-0ec508a9a2df + objectState: StepObjectComplete + reason: complete + state: StepComplete + - jobReason: not configured + jobState: StepJobComplete + name: step-configmap-wordpress-demo-mariadb + objectReason: object type *v1.ConfigMap not handled + objectRef: + apiVersion: v1 + kind: ConfigMap + name: wordpress-demo-mariadb + namespace: wordpress + resourceVersion: "11710673" + uid: b0c0235a-4d21-11ea-b8ec-0ec508a9a2df + objectState: StepObjectComplete + reason: complete + state: StepComplete + - jobReason: not configured + jobState: StepJobComplete + name: step-secret-wordpress-stage-tls + objectReason: object type *v1.Secret not handled + objectRef: + apiVersion: v1 + kind: Secret + name: wordpress-stage-tls + namespace: wordpress + resourceVersion: "11710674" + uid: b0bde7c5-4d21-11ea-b8ec-0ec508a9a2df + objectState: StepObjectComplete + reason: complete + state: StepComplete + - jobReason: not configured + jobState: StepJobComplete + name: step-service-wordpress-demo + objectReason: object type *v1.Service not handled + objectRef: + apiVersion: v1 + kind: Service + name: wordpress-demo + namespace: wordpress + resourceVersion: "11710676" + uid: b0dfc0f8-4d21-11ea-b8ec-0ec508a9a2df + objectState: StepObjectComplete + reason: complete + state: StepComplete + - jobReason: not configured + jobState: StepJobComplete + name: step-configmap-wordpress-demo-mariadb-tests + objectReason: object type *v1.ConfigMap not handled + objectRef: + apiVersion: v1 + kind: ConfigMap + name: wordpress-demo-mariadb-tests + namespace: wordpress + resourceVersion: "11710679" + uid: b0bf4fd3-4d21-11ea-b8ec-0ec508a9a2df + objectState: StepObjectComplete + reason: complete + state: StepComplete + - jobReason: not configured + jobState: StepJobComplete + name: step-service-wordpress-demo-mariadb + objectReason: object type *v1.Service not handled + objectRef: + apiVersion: v1 + kind: Service + name: wordpress-demo-mariadb + namespace: wordpress + resourceVersion: "11710680" + uid: b0dd754b-4d21-11ea-b8ec-0ec508a9a2df + objectState: StepObjectComplete + reason: complete + state: StepComplete + - jobReason: not configured + jobState: StepJobComplete + name: step-persistentvolumeclaim-wordpress-demo + objectReason: object type *v1.PersistentVolumeClaim not handled + objectRef: + apiVersion: v1 + kind: PersistentVolumeClaim + name: wordpress-demo + namespace: wordpress + resourceVersion: "11710681" + uid: b0b86039-4d21-11ea-b8ec-0ec508a9a2df + objectState: StepObjectComplete + reason: complete + state: StepComplete + - jobReason: not configured + jobState: StepJobComplete + name: step-secret-wordpress-demo-mariadb + objectReason: object type *v1.Secret not handled + objectRef: + apiVersion: v1 + kind: Secret + name: wordpress-demo-mariadb + namespace: wordpress + resourceVersion: "11710683" + uid: b0bbf054-4d21-11ea-b8ec-0ec508a9a2df + objectState: StepObjectComplete + reason: complete + state: StepComplete + install: + - jobReason: not configured + jobState: StepJobComplete + name: step-statefulset-wordpress-demo-mariadb + objectReason: all required replicas ready + objectRef: + apiVersion: apps/v1 + kind: StatefulSet + name: wordpress-demo-mariadb + namespace: wordpress + resourceVersion: "11710698" + uid: b0e0c886-4d21-11ea-b8ec-0ec508a9a2df + objectState: StepObjectComplete + reason: complete + state: StepComplete + - jobReason: not configured + jobState: StepJobComplete + name: step-deployment-wordpress-demo + objectReason: all required replicas ready + objectRef: + apiVersion: apps/v1 + kind: Deployment + name: wordpress-demo + namespace: wordpress + resourceVersion: "11710699" + uid: b0d08335-4d21-11ea-b8ec-0ec508a9a2df + objectState: StepObjectComplete + reason: complete + state: StepComplete + observedGeneration: 1 + postInstall: + - jobReason: not configured + jobState: StepJobComplete + name: step-ingress-wordpress-demo + objectReason: object type *v1beta1.Ingress not handled + objectRef: + apiVersion: extensions/v1beta1 + kind: Ingress + name: wordpress-demo + namespace: wordpress + resourceVersion: "11710937" + uid: b0d5513f-4d21-11ea-b8ec-0ec508a9a2df + objectState: StepObjectComplete + reason: complete + state: StepComplete \ No newline at end of file diff --git a/components/common/pkg/controller/util/testdata/owner2.yaml b/components/common/pkg/controller/util/testdata/owner2.yaml new file mode 100644 index 0000000..7ac1054 --- /dev/null +++ b/components/common/pkg/controller/util/testdata/owner2.yaml @@ -0,0 +1,693 @@ +apiVersion: cluster.rafay.dev/v2 +kind: Tasklet +metadata: + annotations: + rafay.dev/ownerRef: '{"apiVersion":"cluster.rafay.dev/v2","kind":"Task","name":"wordpress-demo","uid":"b0e6d87f-4d21-11ea-b8ec-0ec508a9a2df","controller":true,"blockOwnerDeletion":true}' + creationTimestamp: "2020-02-11T22:56:08Z" + generation: 1 + name: wordpress-demo-1 + namespace: wordpress + resourceVersion: "11710944" + selfLink: /apis/cluster.rafay.dev/v2/namespaces/wordpress/tasklets/wordpress-demo + uid: b0e210f3-4d21-11ea-b8ec-0ec508a9a2df +spec: + init: + - name: step-secret-wordpress-demo + object: + apiVersion: v1 + data: + wordpress-password: ZGVtbyEyMzQ= + kind: Secret + metadata: + labels: + app: wordpress-demo + chart: wordpress-7.5.4 + heritage: Tiller + release: wordpress-demo + name: wordpress-demo + namespace: wordpress + type: Opaque + - name: step-configmap-wordpress-demo-mariadb + object: + apiVersion: v1 + data: + my.cnf: |- + [mysqld] + skip-name-resolve + explicit_defaults_for_timestamp + basedir=/opt/bitnami/mariadb + plugin_dir=/opt/bitnami/mariadb/plugin + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + tmpdir=/opt/bitnami/mariadb/tmp + max_allowed_packet=16M + bind-address=0.0.0.0 + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + log-error=/opt/bitnami/mariadb/logs/mysqld.log + character-set-server=UTF8 + collation-server=utf8_general_ci + + [client] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + default-character-set=UTF8 + plugin_dir=/opt/bitnami/mariadb/plugin + + [manager] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + kind: ConfigMap + metadata: + labels: + app: mariadb + chart: mariadb-6.13.0 + component: master + heritage: Tiller + release: wordpress-demo + name: wordpress-demo-mariadb + namespace: wordpress + - name: step-secret-wordpress-stage-tls + object: + apiVersion: v1 + data: + tls.crt: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUd1VENDQmFHZ0F3SUJBZ0lJSXdNMXY0RUFUUDh3RFFZSktvWklodmNOQVFFTEJRQXdnYlF4Q3pBSkJnTlYKQkFZVEFsVlRNUkF3RGdZRFZRUUlFd2RCY21sNmIyNWhNUk13RVFZRFZRUUhFd3BUWTI5MGRITmtZV3hsTVJvdwpHQVlEVlFRS0V4RkhiMFJoWkdSNUxtTnZiU3dnU1c1akxqRXRNQ3NHQTFVRUN4TWthSFIwY0RvdkwyTmxjblJ6CkxtZHZaR0ZrWkhrdVkyOXRMM0psY0c5emFYUnZjbmt2TVRNd01RWURWUVFERXlwSGJ5QkVZV1JrZVNCVFpXTjEKY21VZ1EyVnlkR2xtYVdOaGRHVWdRWFYwYUc5eWFYUjVJQzBnUnpJd0hoY05NVGt3T0RFNE1ESXpOREl3V2hjTgpNakV3T0RFNE1ESXpOREl3V2pBL01TRXdId1lEVlFRTEV4aEViMjFoYVc0Z1EyOXVkSEp2YkNCV1lXeHBaR0YwClpXUXhHakFZQmdOVkJBTU1FU291YzNSaFoyVXVjbUZtWVhrdVpHVjJNSUlCSWpBTkJna3Foa2lHOXcwQkFRRUYKQUFPQ0FROEFNSUlCQ2dLQ0FRRUF0L1FsU21HMnFRR2pORENrcHB6eFFOSXdpY1d1aWtycjF3T3FSSjN5c0tvQgp3TnB4NElOK3NMR3F5cVN5Vm9WcmFXYVIzdWJNMnd5dFhtVFBMdWNIL1pTTGhNNEJqYm9XRmk1VTJISm53emNMCkFLTGxSU2VYZDZzMVByaFdYVUM5MHRCaXc4cWxSQXRoUlg0M1RJK0pINXA3a1UzSWhhc1VSaXliZVlFeERKVEkKRWcxRFZjR2hWU3hkQk5pQzJ0UWlRWE5wS214andERERUT3hPZ3JuclJWeDFPN1NuU0dPV1pwNVZEbTdycUpUbQo4QjRiTk53TTg5UWdEanNnUTh5TENDOEZhZjVHc2hybDI0ZnZBeDhEQkptMlhBVFU0dlRDalI4U2g3RXhiTXc1CjAxYWZLdWtOazl6R0dLY25mSWdjTUtZcVFhTWlpdGVZYndhSjdjRTlOUUlEQVFBQm80SURRVENDQXowd0RBWUQKVlIwVEFRSC9CQUl3QURBZEJnTlZIU1VFRmpBVUJnZ3JCZ0VGQlFjREFRWUlLd1lCQlFVSEF3SXdEZ1lEVlIwUApBUUgvQkFRREFnV2dNRGdHQTFVZEh3UXhNQzh3TGFBcm9DbUdKMmgwZEhBNkx5OWpjbXd1WjI5a1lXUmtlUzVqCmIyMHZaMlJwWnpKek1TMHhNekkyTG1OeWJEQmRCZ05WSFNBRVZqQlVNRWdHQzJDR1NBR0cvVzBCQnhjQk1Ea3cKTndZSUt3WUJCUVVIQWdFV0syaDBkSEE2THk5alpYSjBhV1pwWTJGMFpYTXVaMjlrWVdSa2VTNWpiMjB2Y21WdwpiM05wZEc5eWVTOHdDQVlHWjRFTUFRSUJNSFlHQ0NzR0FRVUZCd0VCQkdvd2FEQWtCZ2dyQmdFRkJRY3dBWVlZCmFIUjBjRG92TDI5amMzQXVaMjlrWVdSa2VTNWpiMjB2TUVBR0NDc0dBUVVGQnpBQ2hqUm9kSFJ3T2k4dlkyVnkKZEdsbWFXTmhkR1Z6TG1kdlpHRmtaSGt1WTI5dEwzSmxjRzl6YVhSdmNua3ZaMlJwWnpJdVkzSjBNQjhHQTFVZApJd1FZTUJhQUZFREN2U2VPekRTRE1LSXoxL3Rzcy9DMExJRE9NQzBHQTFVZEVRUW1NQ1NDRVNvdWMzUmhaMlV1CmNtRm1ZWGt1WkdWMmdnOXpkR0ZuWlM1eVlXWmhlUzVrWlhZd0hRWURWUjBPQkJZRUZDOWZmNTR1VmRQYVVEN2kKNUlySmI0c1l4dEF6TUlJQmZBWUtLd1lCQkFIV2VRSUVBZ1NDQVd3RWdnRm9BV1lBZGdDa3VRbVF0QmhZRkllNwpFNkxNWjNBS1BEV1lCUGtiMzdqamQ4ME95QTNjRUFBQUFXeWlrMTRtQUFBRUF3QkhNRVVDSUFzZWRoRWhnVk5HCitkZ3B4TklnMy9JQyt1cVZxTDNldE9WUWdOZXVSWGNMQWlFQXZUR1RJMEpTYnZrMy9LazVvMU1sMzVMMDVleWIKajNkN204ZjN2SVFxWDlJQWRRRHVTNzIzZGM1Z3V1RkNhUityNFo1bW93OStYN0J5MklNQXhIdUplcWo5eXdBQQpBV3lpazJNL0FBQUVBd0JHTUVRQ0lCY0hXRE5nWXJTaTRDS0U5dlVyc002T2ZZK3NlN0hPeFVxWWpVZG5TRk81CkFpQiszRkJFaDBFUWV0TGJvdHJJcWVRNVJrNHBpV2N3V3lvVlFnRkJCMHMweHdCMUFFU1VaUzZ3N3M2dnhFQUgKMktqK0tNRGE1b0srMk1zeHRUL1RNNWExdG9Hb0FBQUJiS0tUYUR3QUFBUURBRVl3UkFJZ1BYZFpvd3REZERhMQpvbkZ4cWJEL2tJUkQ2RlFKcVNrUHdKR0pLSkg1cXdNQ0lGUzcwandyZ0FRMldUemxsemo2SXRLdmRPRkgyaHFJCmhib3FCRVh1MzJQZU1BMEdDU3FHU0liM0RRRUJDd1VBQTRJQkFRQ2MzVStncU5FRVduRUZQbnlYODJHK0gxTS8KK1JmVVc2VVFBclhQcHBVLzIvL3NWV2dDSTBIaWRzTWk1NUcvNUgxNExsL1ZqRnNhYmVEVHY1UUNaYitVUFg3SwpjcXRlYUMxa0x1UG9zLy8wZjFtQnhHdWJZTWJjUmYwSnlTK3R2VEpoSXNGdytWOC9Na0JFeVQ5WjJPMW5kV1I3CkNNa3pvRUV1bVZkem82elBPLzFVME8vUWp6L3RxbThXWWdteGc3ejBJM0hOaHpxOG5DNyttcVBoRDRIMDN2MHcKMFZYaExBNWpBbkZQUUNZN2NPTHNPNy9xOFB0THJUcll6WUU0QVdOL3RBNDdjV2hvYTMreDBqNndmQ2xtWUg5SAowa2U2ZTdqclI1Q2I5VUYwc3lIL2xVdXAwZlI2SmtNNDQwaS9EN1lqTHN5VEYraGI1YmlHendJQnVSTEsKLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQotLS0tLUJFR0lOIENFUlRJRklDQVRFLS0tLS0KTUlJRTBEQ0NBN2lnQXdJQkFnSUJCekFOQmdrcWhraUc5dzBCQVFzRkFEQ0JnekVMTUFrR0ExVUVCaE1DVlZNeApFREFPQmdOVkJBZ1RCMEZ5YVhwdmJtRXhFekFSQmdOVkJBY1RDbE5qYjNSMGMyUmhiR1V4R2pBWUJnTlZCQW9UCkVVZHZSR0ZrWkhrdVkyOXRMQ0JKYm1NdU1URXdMd1lEVlFRREV5aEhieUJFWVdSa2VTQlNiMjkwSUVObGNuUnAKWm1sallYUmxJRUYxZEdodmNtbDBlU0F0SUVjeU1CNFhEVEV4TURVd016QTNNREF3TUZvWERUTXhNRFV3TXpBMwpNREF3TUZvd2diUXhDekFKQmdOVkJBWVRBbFZUTVJBd0RnWURWUVFJRXdkQmNtbDZiMjVoTVJNd0VRWURWUVFICkV3cFRZMjkwZEhOa1lXeGxNUm93R0FZRFZRUUtFeEZIYjBSaFpHUjVMbU52YlN3Z1NXNWpMakV0TUNzR0ExVUUKQ3hNa2FIUjBjRG92TDJObGNuUnpMbWR2WkdGa1pIa3VZMjl0TDNKbGNHOXphWFJ2Y25rdk1UTXdNUVlEVlFRRApFeXBIYnlCRVlXUmtlU0JUWldOMWNtVWdRMlZ5ZEdsbWFXTmhkR1VnUVhWMGFHOXlhWFI1SUMwZ1J6SXdnZ0VpCk1BMEdDU3FHU0liM0RRRUJBUVVBQTRJQkR3QXdnZ0VLQW9JQkFRQzU0TXNRMUs5MnZkU1RZdXN3WkxpQkNHekQKQk5saUY0NHYvejVsejQvT1l1WThVaHphRmtWTFZhdDRhMk9EWXBET0QybHNtY2dhRkl0TXpFVXo2b2pjbnFPdgpLLzZBWVoxNVY4VFBMdlEvTUR4ZFIveWFGcnpETjVaQlVZNFJTMVQ0S0w3UWpMN3dNRGdlODdBbStHWkhZMjNlCmNTWkhqemhIVTlGR0hiVGozQURxUmF5OXZISFpxbThBMjl2Tk1EcDVUMTlNUi9nZDcxdkN4SjFnTzdHeVE1SFkKcEROTzZyUFdKMCt0SllxbHh2VFYwS2F1ZEFWa1Y0aTFSRlhVTFNvNlB2aTR2ZWt5Q2dLVVpNUVdPbER4U3E3bgplVE92RENBSGYramZCRG5DYVFKc1kxTDZkOEVieUhTSHlMbVRHRkJVTlV0cFRydzcwMGt1SDl6QjBsTDdBZ01CCkFBR2pnZ0VhTUlJQkZqQVBCZ05WSFJNQkFmOEVCVEFEQVFIL01BNEdBMVVkRHdFQi93UUVBd0lCQmpBZEJnTlYKSFE0RUZnUVVRTUs5SjQ3TU5JTXdvalBYKzJ5ejhMUXNnTTR3SHdZRFZSMGpCQmd3Rm9BVU9wcUZCeEJuS0xidgo5cjBGUVc0Z3daVGFEOTR3TkFZSUt3WUJCUVVIQVFFRUtEQW1NQ1FHQ0NzR0FRVUZCekFCaGhob2RIUndPaTh2CmIyTnpjQzVuYjJSaFpHUjVMbU52YlM4d05RWURWUjBmQkM0d0xEQXFvQ2lnSm9Za2FIUjBjRG92TDJOeWJDNW4KYjJSaFpHUjVMbU52YlM5blpISnZiM1F0WnpJdVkzSnNNRVlHQTFVZElBUS9NRDB3T3dZRVZSMGdBREF6TURFRwpDQ3NHQVFVRkJ3SUJGaVZvZEhSd2N6b3ZMMk5sY25SekxtZHZaR0ZrWkhrdVkyOXRMM0psY0c5emFYUnZjbmt2Ck1BMEdDU3FHU0liM0RRRUJDd1VBQTRJQkFRQUlmbXlURU1nNHVKYXBrRXYvb1Y5UEJPOXNQcHlJQnNsUWo2WnoKOTFjeEc3Njg1Qy9iK0xyVFcrQzA1K1o1WWc0TW90ZHFZM014dGZXb1NLUTdDQzJpWFpEWHRId2xUeEZXTU1TMgpSSjE3TEozbFh1YnZER0dxditRcUcrNkVucmlEZmNGRHprU25FM0FOa1IvMHlCT3RnMkRaMkhLb2N5UWV0YXdpCkRzb1hpV0pZUkJ1cmlTVUJBQS9OeEJ0aTIxRzAwdzlSS3B2MHZIUDhkczQycE0zWjJDenFycHYxS3JLUTBVMTEKR0lvL2lrR1FJMzFiUy82a0ExaWJSckxEWUdDRCtIMVFRYzdDb1pERHUrOENMOUlWVk81RUZka0tycWVLTSsyeApMWFkySnR3RTY1LzNZUjhWM0lkdjdrYVdLSzJoSm4wS0NhY3VCS09OdlBpOEJEQUIKLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQotLS0tLUJFR0lOIENFUlRJRklDQVRFLS0tLS0KTUlJRWZUQ0NBMldnQXdJQkFnSURHK2NWTUEwR0NTcUdTSWIzRFFFQkN3VUFNR014Q3pBSkJnTlZCQVlUQWxWVApNU0V3SHdZRFZRUUtFeGhVYUdVZ1IyOGdSR0ZrWkhrZ1IzSnZkWEFzSUVsdVl5NHhNVEF2QmdOVkJBc1RLRWR2CklFUmhaR1I1SUVOc1lYTnpJRElnUTJWeWRHbG1hV05oZEdsdmJpQkJkWFJvYjNKcGRIa3dIaGNOTVRRd01UQXgKTURjd01EQXdXaGNOTXpFd05UTXdNRGN3TURBd1dqQ0JnekVMTUFrR0ExVUVCaE1DVlZNeEVEQU9CZ05WQkFnVApCMEZ5YVhwdmJtRXhFekFSQmdOVkJBY1RDbE5qYjNSMGMyUmhiR1V4R2pBWUJnTlZCQW9URVVkdlJHRmtaSGt1ClkyOXRMQ0JKYm1NdU1URXdMd1lEVlFRREV5aEhieUJFWVdSa2VTQlNiMjkwSUVObGNuUnBabWxqWVhSbElFRjEKZEdodmNtbDBlU0F0SUVjeU1JSUJJakFOQmdrcWhraUc5dzBCQVFFRkFBT0NBUThBTUlJQkNnS0NBUUVBdjNGaQpDUEg2V1RUM0c4a1lvL2VBU1ZqcElvTVRwc1VnUXdFN2hQSG1oVW1mSityMmhCdE9vTFRiY0pqSE1nR3hCVDRIClR1NzArazh2V1RBaTU2c1pWbXZpZ0FmODh4WjFnRGxSZStYNU5iWjBUcW1OZ2hQa3RqK3BBNFA2b3I2S0ZXcC8KM2d2RHRoa1VCY3JxdzZnRWxEdEdmRElOOHdCbUlzaU5hVzAyakJFWXQ5T3lIR0MwT1BvQ2pNN1QzVVlIM2dvKwo2MTE4eUh6N3NDdFRwSkppYVZFbEJXRWFSSUdNTEtsRGxpUGZyRHFCbWc0cHhSeXA2VjBldHA2ZU1BbzV6dkdJCmdQdExYY3d5N0lWaVF5VTBBbFluQVpHME8zQXFQMjZ4Nkp5SUFYMmYxUG5iVTIxZ25iOHM1MWlydUY5Ry9NN0UKR3dNOENldEpNVnhwUnJQZ1J3SURBUUFCbzRJQkZ6Q0NBUk13RHdZRFZSMFRBUUgvQkFVd0F3RUIvekFPQmdOVgpIUThCQWY4RUJBTUNBUVl3SFFZRFZSME9CQllFRkRxYWhRY1FaeWkyNy9hOUJVRnVJTUdVMmcvZU1COEdBMVVkCkl3UVlNQmFBRk5MRXNOS1IxRXdSY2JOaHl6MmgvdDJvYXRUak1EUUdDQ3NHQVFVRkJ3RUJCQ2d3SmpBa0JnZ3IKQmdFRkJRY3dBWVlZYUhSMGNEb3ZMMjlqYzNBdVoyOWtZV1JrZVM1amIyMHZNRElHQTFVZEh3UXJNQ2t3SjZBbApvQ09HSVdoMGRIQTZMeTlqY213dVoyOWtZV1JrZVM1amIyMHZaMlJ5YjI5MExtTnliREJHQmdOVkhTQUVQekE5Ck1Ec0dCRlVkSUFBd016QXhCZ2dyQmdFRkJRY0NBUllsYUhSMGNITTZMeTlqWlhKMGN5NW5iMlJoWkdSNUxtTnYKYlM5eVpYQnZjMmwwYjNKNUx6QU5CZ2txaGtpRzl3MEJBUXNGQUFPQ0FRRUFXUXRUdlpLR0VhY2tlKzFiTWM4ZApIMnh3eGJodXZrNjc5cjZYVU9Fd2Y3b29YR0tVd3VOK00vZjdRbmFGMjVVY2pDSllkUWtNaUdWbk9Rb1dDY1dnCk9KZWt4U09UUDdRWXBnRUdSSkhqcDJrbnRGb2xmenEzTXMzZGhQOHFPQ2t6cE4xbnNvWCtvWWdnSEZDSnlOd3EKOWtJRE4wem1pTi9WcnlUeXNjUGZ6TFhzNEpsZXQwbFVJRHlVR0F6SEhGSVlTYVJ0NGJOWUM4blk3Tm11SERLTwpLSEFONHY2bUY1NkVENzFYY0xOYTZSK2dobE83NzN6L2FRdmdTTU8za3d2SUNsVEVyRjBVWnpkc3lxVXZNUWczCnFtNXZqTHliNGxkZEpJR3ZsNWVjaEsxc3JEZE1adk5oa1JFZzVMNHduM3FrS1FtdzRUUmZaSGNZUUZIZmpEQ20Kcnc9PQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCi0tLS0tQkVHSU4gQ0VSVElGSUNBVEUtLS0tLQpNSUlFQURDQ0F1aWdBd0lCQWdJQkFEQU5CZ2txaGtpRzl3MEJBUVVGQURCak1Rc3dDUVlEVlFRR0V3SlZVekVoCk1COEdBMVVFQ2hNWVZHaGxJRWR2SUVSaFpHUjVJRWR5YjNWd0xDQkpibU11TVRFd0x3WURWUVFMRXloSGJ5QkUKWVdSa2VTQkRiR0Z6Y3lBeUlFTmxjblJwWm1sallYUnBiMjRnUVhWMGFHOXlhWFI1TUI0WERUQTBNRFl5T1RFMwpNRFl5TUZvWERUTTBNRFl5T1RFM01EWXlNRm93WXpFTE1Ba0dBMVVFQmhNQ1ZWTXhJVEFmQmdOVkJBb1RHRlJvClpTQkhieUJFWVdSa2VTQkhjbTkxY0N3Z1NXNWpMakV4TUM4R0ExVUVDeE1vUjI4Z1JHRmtaSGtnUTJ4aGMzTWcKTWlCRFpYSjBhV1pwWTJGMGFXOXVJRUYxZEdodmNtbDBlVENDQVNBd0RRWUpLb1pJaHZjTkFRRUJCUUFEZ2dFTgpBRENDQVFnQ2dnRUJBTjZkMStwWEdFbWhXK3ZYWDBpRzZyN2QvK1R2Wnh6MFpXaXpWM0dnWG5lNzdadEo2WENBClBWWVlZd2h2MnZMTTBEOS9BbFFpVkJEWXNvSFV3SFU5UzMvSGQ4TStlS3NhQTdVZ2F5OXFLN0hGaUg3RXV4NncKd2RoRkoyK3FOMWozaHliWDJDMzJxUmUzSDNJMlRxWVhQMldZa3RzcWJsMmkvb2pnQzk1LzVZMFY0ZXZMT3RYaQpFcUlUTGRpT3IxOFNQYUFJQlFpMlhLVmxPQVJGbVI2allHQjB4VUdsY21JYllzVWZiMThhUXI0Q1VXV29yaU1ZCmF2eDRBNmxOZjRERCtxdGEvS0ZBcE1vWkZ2Nnl5TzllY3czdWQ3MmE5bm1ZdkxFSFo2SVZEZDJnV01aRWV3bysKWWloZnVrRUhVMWpQRVg0NGRNWDQvN1Zwa0krRWRPcVhHNjhDQVFPamdjQXdnYjB3SFFZRFZSME9CQllFRk5MRQpzTktSMUV3UmNiTmh5ejJoL3Qyb2F0VGpNSUdOQmdOVkhTTUVnWVV3Z1lLQUZOTEVzTktSMUV3UmNiTmh5ejJoCi90Mm9hdFRqb1dla1pUQmpNUXN3Q1FZRFZRUUdFd0pWVXpFaE1COEdBMVVFQ2hNWVZHaGxJRWR2SUVSaFpHUjUKSUVkeWIzVndMQ0JKYm1NdU1URXdMd1lEVlFRTEV5aEhieUJFWVdSa2VTQkRiR0Z6Y3lBeUlFTmxjblJwWm1sagpZWFJwYjI0Z1FYVjBhRzl5YVhSNWdnRUFNQXdHQTFVZEV3UUZNQU1CQWY4d0RRWUpLb1pJaHZjTkFRRUZCUUFECmdnRUJBREpMODdMS1BwSDhFc2FoQjR5T2Q2QXpCaFJja0I0WTl3aW1QUW9aK1llQUVXNXA1SllYTVA4MGtXTnkKT083TUhBR2pIWlFvcERIMmVzUlUxL2JsTVZnRG9zek9ZdHVVUlhPMXYwWEpKTFhWZ2dLdEkzbHBqYmkyVGM3UApUTW96SStnY2lLcWRpMEZ1RnNrZzVZbWV6VHZhY1BkK21TWWdGRlFscTI1emhlYWJJWjBLYklJT3FQakNEUG9RCkhteVc3NGNOeEE5aGk2M3VneXVWK0k2U2hISTU2eURxZysyRHpaZHVDTHpyVGlhMmN5dmswL1pNL2laeDRtRVIKZEVyL1Z4cUhEM1ZJTHM5UmFSZWdBaEpobGRYUlFMSVFUTzdFckJCRHBxV2VDdFdWWXBvTno0aUN4VElNNUN1ZgpSZVlObnlpY3Nia3FXbGV0TncrdkhYL2J2Wjg9Ci0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0= + tls.key: LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0tLS0tCk1JSUV2UUlCQURBTkJna3Foa2lHOXcwQkFRRUZBQVNDQktjd2dnU2pBZ0VBQW9JQkFRQzM5Q1ZLWWJhcEFhTTAKTUtTbW5QRkEwakNKeGE2S1N1dlhBNnBFbmZLd3FnSEEybkhnZzM2d3NhcktwTEpXaFd0cFpwSGU1c3piREsxZQpaTTh1NXdmOWxJdUV6Z0dOdWhZV0xsVFljbWZETndzQW91VkZKNWQzcXpVK3VGWmRRTDNTMEdMRHlxVkVDMkZGCmZqZE1qNGtmbW51UlRjaUZxeFJHTEp0NWdURU1sTWdTRFVOVndhRlZMRjBFMklMYTFDSkJjMmtxYkdQQU1NTk0KN0U2Q3VldEZYSFU3dEtkSVk1Wm1ubFVPYnV1b2xPYndIaHMwM0F6ejFDQU9PeUJEeklzSUx3VnAva2F5R3VYYgpoKzhESHdNRW1iWmNCTlRpOU1LTkh4S0hzVEZzekRuVFZwOHE2UTJUM01ZWXB5ZDhpQnd3cGlwQm95S0sxNWh2CkJvbnR3VDAxQWdNQkFBRUNnZ0VBZDZQU25RM3dQdnRScWgvNDltUWNoSXd3QldzTW1lVWdmamRrQmp5MEd6SjIKOFhjaG1XUHNnZjhMbGNDSVBMMkpub09YVytIQVdyZGtDb0NHUDNzRE4ybmxVL3FvQ0FWL1YrM0tRUHduZ0UvTQpXQjJaLytCQUl4UzNESlBYbDg4RHBwamhvM1dwQnhoZnExTHJwRisyVDFlcUJsY1FrOTh3MEhNeXExUGJFdEtXCjdxcWZyeHl1WGZFc05ha21tY1M3NmFaUjNjOUNKSUxtOFVDcDZuU29DUENvNkdRVE9CTkpJajZKcFFXWEN4eG0KazNwdkptRlVYUFNYLzVyT0JGNVdYRlJzSHNXNkR3ejZhNk0zc3NyQWNxSEpkd0xUb1JQS2Z3dkF3ajJkNzlWcgorZERjZkQ5ZXhuK1JUTW9MRVozak9ZcTlLeDE2aHN2a3RHcFhYTmcrQVFLQmdRRGVqMy9rSnJzZ1FlMGFncmtrCkJZNmlsZStyRTdaWS9kR0J3RGhOcHJhTjROaWN2MzJRUTdSRjArK3dwV3loZXdFV3hmQVhSZCtZSUY0UjZtK3MKZkJqdFNFWnBPWDY1S2tUcFNiNTlUNmU0Y1pmQ3hTVVdZLzhzeVUrWVVvT3JVSlQ1QldsRFU3Sllsd3Bud1cyMAplb0hxQVBISkx0enI0S1psTVhCM1hqcVUvd0tCZ1FEVGw2OGNoOWNNUVM4Ti83QWRGZmpnUVpweXVYMjY0WG9ZCkczVE5GOHNpTmoyV211TlNDMTliQTZVblJZM1lUTW0yZ2dGcE5zUmVLRnMyOUpnL1VRdDZ6WDFRN1ZEa3FUd3QKQzlmV3FYVVB4M1p4aEx2dXRuVlN4TlI1dlVKNHhLYnhKVE9STVA0S1NTSExEQnJ3aVJUZW9sd0d6YzgyY21yNwpIbHhZRjAvcHl3S0JnUUNSUmFXN0xMVFVWM1FHNi9FaFhDZEFaUkl0M3c0VmhJZnVZNlBjdThkSlVNelRkQUxuCjJlbWY4cmp2MnVyUGROUy9JckNXNEZzVWwzd1B3YkRuSzVHeHdJMkZQYXhEL1IxQ0VZcXZqUUR6V2VJdmxqT2gKSytCeVFXMGRCaTgvOGJkcjNHWmJOaFNoMHVWTjJHcGRkZUc2OXFiY0pTUzdLc1l5STFVLzlWZlR6UUtCZ0RUNAp1VzhrRnROTGtsTW4ydGc5UXZRcG1GZjJWaUt1QmhuNDdiSFdyaFVmalNXaUd4elVHZ2c0RG1XWmhSeE1oUWM2CjNzMlBWM1BYR0piV2Z6TUN3Q1A3UTg4NXlsR2tpSnNpWnVPbnd0V3pjdFNTalZZQ3ViYUI3a3VYOVFjMC9ESk0KeE84cFc4QUpkUHRYU1h0RVprUWlVM1drbXFhZjJHYUx3RVNSZVlFbkFvR0FPQmJHcWpiNSs2MlR3Y2RNV3lLcQpmT095VUFZc2JRTVo1UUs0YUM2eUxTQm5OS0ZvNTMvQkkzZFpFS1ZxbFhYY0RIQlRPaGdOR1RaVHdCdlpyY1N2CmphUDNBZ01NY1dpaGNGN2QraisyQTk3L0F4L2MzV1dpVnlFcytScVRoL01mK1hMem5aaHFPN3E0d1I0MHZIL1MKSzZmV0FTSTN6MTlpeVZ2VllPYkJsYXM9Ci0tLS0tRU5EIFBSSVZBVEUgS0VZLS0tLS0= + kind: Secret + metadata: + labels: + app: wordpress-demo + chart: wordpress-7.5.4 + heritage: Tiller + release: wordpress-demo + name: wordpress-stage-tls + namespace: wordpress + type: kubernetes.io/tls + - name: step-service-wordpress-demo + object: + apiVersion: v1 + kind: Service + metadata: + labels: + app: wordpress-demo + chart: wordpress-7.5.4 + heritage: Tiller + release: wordpress-demo + name: wordpress-demo + namespace: wordpress + spec: + ports: + - name: http + port: 80 + protocol: TCP + targetPort: http + - name: https + port: 443 + protocol: TCP + targetPort: https + - name: metrics + port: 9117 + protocol: TCP + targetPort: metrics + selector: + app: wordpress-demo + sessionAffinity: None + type: ClusterIP + - name: step-configmap-wordpress-demo-mariadb-tests + object: + apiVersion: v1 + data: + run.sh: |- + @test "Testing MariaDB is accessible" { + mysql -h wordpress-demo-mariadb -uroot -p$MARIADB_ROOT_PASSWORD -e 'show databases;' + } + kind: ConfigMap + metadata: + name: wordpress-demo-mariadb-tests + namespace: wordpress + - name: step-service-wordpress-demo-mariadb + object: + apiVersion: v1 + kind: Service + metadata: + labels: + app: mariadb + chart: mariadb-6.13.0 + component: master + heritage: Tiller + release: wordpress-demo + name: wordpress-demo-mariadb + namespace: wordpress + spec: + ports: + - name: mysql + port: 3306 + protocol: TCP + targetPort: mysql + selector: + app: mariadb + component: master + release: wordpress-demo + sessionAffinity: None + type: ClusterIP + - name: step-persistentvolumeclaim-wordpress-demo + object: + apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + labels: + app: wordpress-demo + chart: wordpress-7.5.4 + heritage: Tiller + release: wordpress-demo + name: wordpress-demo + namespace: wordpress + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 10Gi + volumeMode: Filesystem + - name: step-secret-wordpress-demo-mariadb + object: + apiVersion: v1 + data: + mariadb-password: ZGVtbyEyMzQ= + mariadb-root-password: RFNiVHhpOXViUg== + kind: Secret + metadata: + labels: + app: mariadb + chart: mariadb-6.13.0 + heritage: Tiller + release: wordpress-demo + name: wordpress-demo-mariadb + namespace: wordpress + type: Opaque + install: + - name: step-statefulset-wordpress-demo-mariadb + object: + apiVersion: apps/v1 + kind: StatefulSet + metadata: + labels: + app: mariadb + chart: mariadb-6.13.0 + component: master + heritage: Tiller + release: wordpress-demo + name: wordpress-demo-mariadb + namespace: wordpress + spec: + podManagementPolicy: OrderedReady + replicas: 1 + revisionHistoryLimit: 10 + selector: + matchLabels: + app: mariadb + component: master + release: wordpress-demo + serviceName: wordpress-demo-mariadb + template: + metadata: + creationTimestamp: null + labels: + app: mariadb + chart: mariadb-6.13.0 + component: master + release: wordpress-demo + rep-organization: pkvwv2n + rep-partner: rx28oml + rep-project: 0lk5wke + rep-workload: wordpress-demo + spec: + affinity: + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - podAffinityTerm: + labelSelector: + matchLabels: + app: mariadb + release: wordpress-demo + topologyKey: kubernetes.io/hostname + weight: 1 + containers: + - env: + - name: MARIADB_ROOT_PASSWORD + valueFrom: + secretKeyRef: + key: mariadb-root-password + name: wordpress-demo-mariadb + - name: MARIADB_USER + value: bn_wordpress + - name: MARIADB_PASSWORD + valueFrom: + secretKeyRef: + key: mariadb-password + name: wordpress-demo-mariadb + - name: MARIADB_DATABASE + value: bitnami_wordpress + image: docker.io/bitnami/mariadb:10.3.18-debian-9-r36 + imagePullPolicy: IfNotPresent + livenessProbe: + exec: + command: + - sh + - -c + - exec mysqladmin status -uroot -p$MARIADB_ROOT_PASSWORD + failureThreshold: 3 + initialDelaySeconds: 120 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 1 + name: mariadb + ports: + - containerPort: 3306 + name: mysql + protocol: TCP + readinessProbe: + exec: + command: + - sh + - -c + - exec mysqladmin status -uroot -p$MARIADB_ROOT_PASSWORD + failureThreshold: 3 + initialDelaySeconds: 30 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 1 + resources: {} + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + volumeMounts: + - mountPath: /bitnami/mariadb + name: data + - mountPath: /opt/bitnami/mariadb/conf/my.cnf + name: config + subPath: my.cnf + dnsPolicy: ClusterFirst + restartPolicy: Always + schedulerName: default-scheduler + securityContext: + fsGroup: 1001 + runAsUser: 1001 + serviceAccount: default + serviceAccountName: default + terminationGracePeriodSeconds: 30 + volumes: + - configMap: + defaultMode: 420 + name: wordpress-demo-mariadb + name: config + updateStrategy: + type: RollingUpdate + volumeClaimTemplates: + - metadata: + creationTimestamp: null + labels: + app: mariadb + component: master + heritage: Tiller + release: wordpress-demo + name: data + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 8Gi + volumeMode: Filesystem + status: + phase: Pending + - name: step-deployment-wordpress-demo + object: + apiVersion: apps/v1 + kind: Deployment + metadata: + labels: + app: wordpress-demo + chart: wordpress-7.5.4 + heritage: Tiller + release: wordpress-demo + name: wordpress-demo + namespace: wordpress + spec: + progressDeadlineSeconds: 600 + replicas: 1 + revisionHistoryLimit: 10 + selector: + matchLabels: + app: wordpress-demo + release: wordpress-demo + strategy: + rollingUpdate: + maxSurge: 25% + maxUnavailable: 25% + type: RollingUpdate + template: + metadata: + annotations: + prometheus.io/port: "9117" + prometheus.io/scrape: "true" + creationTimestamp: null + labels: + app: wordpress-demo + chart: wordpress-7.5.4 + release: wordpress-demo + rep-organization: pkvwv2n + rep-partner: rx28oml + rep-project: 0lk5wke + rep-workload: wordpress-demo + spec: + containers: + - env: + - name: ALLOW_EMPTY_PASSWORD + value: "yes" + - name: MARIADB_HOST + value: wordpress-demo-mariadb + - name: MARIADB_PORT_NUMBER + value: "3306" + - name: WORDPRESS_DATABASE_NAME + value: bitnami_wordpress + - name: WORDPRESS_DATABASE_USER + value: bn_wordpress + - name: WORDPRESS_DATABASE_PASSWORD + valueFrom: + secretKeyRef: + key: mariadb-password + name: wordpress-demo-mariadb + - name: WORDPRESS_USERNAME + value: user + - name: WORDPRESS_PASSWORD + valueFrom: + secretKeyRef: + key: wordpress-password + name: wordpress-demo + - name: WORDPRESS_EMAIL + value: user@example.com + - name: WORDPRESS_FIRST_NAME + value: Rafay + - name: WORDPRESS_LAST_NAME + value: Demo + - name: WORDPRESS_HTACCESS_OVERRIDE_NONE + value: "yes" + - name: WORDPRESS_BLOG_NAME + value: User's Blog! + - name: WORDPRESS_SKIP_INSTALL + value: "no" + - name: WORDPRESS_TABLE_PREFIX + value: wp_ + - name: WORDPRESS_SCHEME + value: http + image: docker.io/bitnami/wordpress:5.2.4-debian-9-r0 + imagePullPolicy: IfNotPresent + livenessProbe: + failureThreshold: 6 + httpGet: + path: /wp-login.php + port: http + scheme: HTTP + initialDelaySeconds: 120 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 5 + name: wordpress + ports: + - containerPort: 80 + name: http + protocol: TCP + - containerPort: 443 + name: https + protocol: TCP + readinessProbe: + failureThreshold: 6 + httpGet: + path: /wp-login.php + port: http + scheme: HTTP + initialDelaySeconds: 30 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 5 + resources: + requests: + cpu: 300m + memory: 512Mi + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + volumeMounts: + - mountPath: /bitnami/wordpress + name: wordpress-data + subPath: wordpress + - command: + - /bin/apache_exporter + - -scrape_uri + - http://status.localhost:80/server-status/?auto + image: docker.io/bitnami/apache-exporter:0.7.0-debian-9-r86 + imagePullPolicy: IfNotPresent + livenessProbe: + failureThreshold: 3 + httpGet: + path: /metrics + port: metrics + scheme: HTTP + initialDelaySeconds: 15 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 5 + name: metrics + ports: + - containerPort: 9117 + name: metrics + protocol: TCP + readinessProbe: + failureThreshold: 3 + httpGet: + path: /metrics + port: metrics + scheme: HTTP + initialDelaySeconds: 5 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 1 + resources: {} + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + dnsPolicy: ClusterFirst + hostAliases: + - hostnames: + - status.localhost + ip: 127.0.0.1 + restartPolicy: Always + schedulerName: default-scheduler + securityContext: {} + terminationGracePeriodSeconds: 30 + volumes: + - name: wordpress-data + persistentVolumeClaim: + claimName: wordpress-demo + postInstall: + - name: step-ingress-wordpress-demo + object: + apiVersion: extensions/v1beta1 + kind: Ingress + metadata: + annotations: + kubernetes.io/ingress.class: nginx + labels: + app: wordpress-demo + chart: wordpress-7.5.4 + heritage: Tiller + release: wordpress-demo + name: wordpress-demo + namespace: wordpress + spec: + rules: + - host: wordpress.stage.rafay.dev + http: + paths: + - backend: + serviceName: wordpress-demo + servicePort: http + path: / + tls: + - hosts: + - wordpress.stage.rafay.dev + secretName: wordpress-stage-tls +status: + conditions: + - lastUpdateTime: "2020-02-11T22:56:11Z" + reason: all steps complete + status: Complete + type: TaskletInit + - lastUpdateTime: "2020-02-11T22:57:11Z" + reason: all steps complete + status: Complete + type: TaskletInstall + - lastUpdateTime: "2020-02-11T22:57:12Z" + reason: all steps complete + status: Complete + type: TaskletPostInstall + - lastUpdateTime: "2020-02-11T22:57:12Z" + reason: all steps complete + status: Complete + type: TaskletReady + init: + - jobReason: not configured + jobState: StepJobComplete + name: step-secret-wordpress-demo + objectReason: object type *v1.Secret not handled + objectRef: + apiVersion: v1 + kind: Secret + name: wordpress-demo + namespace: wordpress + resourceVersion: "11710670" + uid: b0bcd771-4d21-11ea-b8ec-0ec508a9a2df + objectState: StepObjectComplete + reason: complete + state: StepComplete + - jobReason: not configured + jobState: StepJobComplete + name: step-configmap-wordpress-demo-mariadb + objectReason: object type *v1.ConfigMap not handled + objectRef: + apiVersion: v1 + kind: ConfigMap + name: wordpress-demo-mariadb + namespace: wordpress + resourceVersion: "11710673" + uid: b0c0235a-4d21-11ea-b8ec-0ec508a9a2df + objectState: StepObjectComplete + reason: complete + state: StepComplete + - jobReason: not configured + jobState: StepJobComplete + name: step-secret-wordpress-stage-tls + objectReason: object type *v1.Secret not handled + objectRef: + apiVersion: v1 + kind: Secret + name: wordpress-stage-tls + namespace: wordpress + resourceVersion: "11710674" + uid: b0bde7c5-4d21-11ea-b8ec-0ec508a9a2df + objectState: StepObjectComplete + reason: complete + state: StepComplete + - jobReason: not configured + jobState: StepJobComplete + name: step-service-wordpress-demo + objectReason: object type *v1.Service not handled + objectRef: + apiVersion: v1 + kind: Service + name: wordpress-demo + namespace: wordpress + resourceVersion: "11710676" + uid: b0dfc0f8-4d21-11ea-b8ec-0ec508a9a2df + objectState: StepObjectComplete + reason: complete + state: StepComplete + - jobReason: not configured + jobState: StepJobComplete + name: step-configmap-wordpress-demo-mariadb-tests + objectReason: object type *v1.ConfigMap not handled + objectRef: + apiVersion: v1 + kind: ConfigMap + name: wordpress-demo-mariadb-tests + namespace: wordpress + resourceVersion: "11710679" + uid: b0bf4fd3-4d21-11ea-b8ec-0ec508a9a2df + objectState: StepObjectComplete + reason: complete + state: StepComplete + - jobReason: not configured + jobState: StepJobComplete + name: step-service-wordpress-demo-mariadb + objectReason: object type *v1.Service not handled + objectRef: + apiVersion: v1 + kind: Service + name: wordpress-demo-mariadb + namespace: wordpress + resourceVersion: "11710680" + uid: b0dd754b-4d21-11ea-b8ec-0ec508a9a2df + objectState: StepObjectComplete + reason: complete + state: StepComplete + - jobReason: not configured + jobState: StepJobComplete + name: step-persistentvolumeclaim-wordpress-demo + objectReason: object type *v1.PersistentVolumeClaim not handled + objectRef: + apiVersion: v1 + kind: PersistentVolumeClaim + name: wordpress-demo + namespace: wordpress + resourceVersion: "11710681" + uid: b0b86039-4d21-11ea-b8ec-0ec508a9a2df + objectState: StepObjectComplete + reason: complete + state: StepComplete + - jobReason: not configured + jobState: StepJobComplete + name: step-secret-wordpress-demo-mariadb + objectReason: object type *v1.Secret not handled + objectRef: + apiVersion: v1 + kind: Secret + name: wordpress-demo-mariadb + namespace: wordpress + resourceVersion: "11710683" + uid: b0bbf054-4d21-11ea-b8ec-0ec508a9a2df + objectState: StepObjectComplete + reason: complete + state: StepComplete + install: + - jobReason: not configured + jobState: StepJobComplete + name: step-statefulset-wordpress-demo-mariadb + objectReason: all required replicas ready + objectRef: + apiVersion: apps/v1 + kind: StatefulSet + name: wordpress-demo-mariadb + namespace: wordpress + resourceVersion: "11710698" + uid: b0e0c886-4d21-11ea-b8ec-0ec508a9a2df + objectState: StepObjectComplete + reason: complete + state: StepComplete + - jobReason: not configured + jobState: StepJobComplete + name: step-deployment-wordpress-demo + objectReason: all required replicas ready + objectRef: + apiVersion: apps/v1 + kind: Deployment + name: wordpress-demo + namespace: wordpress + resourceVersion: "11710699" + uid: b0d08335-4d21-11ea-b8ec-0ec508a9a2df + objectState: StepObjectComplete + reason: complete + state: StepComplete + observedGeneration: 1 + postInstall: + - jobReason: not configured + jobState: StepJobComplete + name: step-ingress-wordpress-demo + objectReason: object type *v1beta1.Ingress not handled + objectRef: + apiVersion: extensions/v1beta1 + kind: Ingress + name: wordpress-demo + namespace: wordpress + resourceVersion: "11710937" + uid: b0d5513f-4d21-11ea-b8ec-0ec508a9a2df + objectState: StepObjectComplete + reason: complete + state: StepComplete \ No newline at end of file diff --git a/components/common/pkg/controller/util/testdata/service_with_owner.yaml b/components/common/pkg/controller/util/testdata/service_with_owner.yaml new file mode 100644 index 0000000..bf7ad18 --- /dev/null +++ b/components/common/pkg/controller/util/testdata/service_with_owner.yaml @@ -0,0 +1,39 @@ +apiVersion: v1 +kind: Service +metadata: + annotations: + rafay.dev/ownerRef: '{"apiVersion":"cluster.rafay.dev/v2","kind":"Tasklet","name":"wordpress-demo","uid":"b0e210f3-4d21-11ea-b8ec-0ec508a9a2df","controller":true,"blockOwnerDeletion":true}' + creationTimestamp: "2020-02-11T22:56:08Z" + labels: + app: wordpress-demo + chart: wordpress-7.5.4 + heritage: Tiller + release: wordpress-demo + velero.io/backup-name: wordpress1 + velero.io/restore-name: wordpress1 + name: wordpress-demo + namespace: wordpress + resourceVersion: "11710676" + selfLink: /api/v1/namespaces/wordpress/services/wordpress-demo + uid: b0dfc0f8-4d21-11ea-b8ec-0ec508a9a2df +spec: + clusterIP: 10.100.74.72 + ports: + - name: http + port: 80 + protocol: TCP + targetPort: http + - name: https + port: 443 + protocol: TCP + targetPort: https + - name: metrics + port: 9117 + protocol: TCP + targetPort: metrics + selector: + app: wordpress-demo + sessionAffinity: None + type: ClusterIP +status: + loadBalancer: {} \ No newline at end of file diff --git a/components/common/pkg/controller/util/testdata/service_without_owner.yaml b/components/common/pkg/controller/util/testdata/service_without_owner.yaml new file mode 100644 index 0000000..42f9c21 --- /dev/null +++ b/components/common/pkg/controller/util/testdata/service_without_owner.yaml @@ -0,0 +1,38 @@ +apiVersion: v1 +kind: Service +metadata: + annotations: + creationTimestamp: "2020-02-11T22:56:08Z" + labels: + app: wordpress-demo + chart: wordpress-7.5.4 + heritage: Tiller + release: wordpress-demo + velero.io/backup-name: wordpress1 + velero.io/restore-name: wordpress1 + name: wordpress-demo + namespace: wordpress + resourceVersion: "11710676" + selfLink: /api/v1/namespaces/wordpress/services/wordpress-demo + uid: b0dfc0f8-4d21-11ea-b8ec-0ec508a9a2df +spec: + clusterIP: 10.100.74.72 + ports: + - name: http + port: 80 + protocol: TCP + targetPort: http + - name: https + port: 443 + protocol: TCP + targetPort: https + - name: metrics + port: 9117 + protocol: TCP + targetPort: metrics + selector: + app: wordpress-demo + sessionAffinity: None + type: ClusterIP +status: + loadBalancer: {} \ No newline at end of file diff --git a/components/common/pkg/converter/import.go b/components/common/pkg/converter/import.go new file mode 100644 index 0000000..93cb4ff --- /dev/null +++ b/components/common/pkg/converter/import.go @@ -0,0 +1,406 @@ +package converter + +import ( + "errors" + "fmt" + "strings" + + runtimeutil "github.com/RafaySystems/rcloud-base/components/common/pkg/controller/runtime" + "github.com/RafaySystems/rcloud-base/components/common/pkg/hasher" + + "github.com/RafaySystems/rcloud-base/components/common/pkg/log" + typesv2 "github.com/RafaySystems/rcloud-base/components/common/proto/types/config" + controllerv2 "github.com/RafaySystems/rcloud-base/components/common/proto/types/controller" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + kjson "k8s.io/apimachinery/pkg/runtime/serializer/json" + k8sapijson "sigs.k8s.io/kustomize/pseudo/k8s/apimachinery/pkg/runtime/serializer/json" + "sigs.k8s.io/yaml" +) + +const ( + delimiter = "---" + ingressAnnotationConfigSnippetKey = "nginx.ingress.kubernetes.io/configuration-snippet" +) + +var ( + // ErrInvalidObject is retuned for invalid object + ErrInvalidObject = errors.New("object does not support object interface") + json = k8sapijson.CaseSensitiveJsonIterator() + dmf = kjson.DefaultMetaFactory +) + +var _log = log.GetLogger() + +// FromJSON converts data in JSON format into namespace and taskset +func FromJSON(name, data string) (ns *typesv2.Namespace, placement *typesv2.Placement, err error) { + sresources := strings.Split(data, delimiter) + + var resources [][]byte + + for _, sresource := range sresources { + resources = append(resources, []byte(sresource)) + } + + return fromResources(name, resources) +} + +// FromYAML converts the data in YAML format into namespace and taskset +func FromYAML(name, data string) (ns *typesv2.Namespace, placement *typesv2.Placement, err error) { + resources, err := getResourcesArrayFromYAML(data) + if err != nil { + return + } + return fromResources(name, resources) +} + +func getResourcesArrayFromYAML(data string) ([][]byte, error) { + sresources := strings.Split(data, delimiter) + var resources [][]byte + for _, sresource := range sresources { + if strings.TrimSpace(sresource) == "" { + continue + } + var b []byte + b, err := yaml.YAMLToJSONStrict([]byte(sresource)) + if err != nil { + return nil, err + } + resources = append(resources, b) + } + return resources, nil +} + +func fromResources(name string, resources [][]byte) (ns *typesv2.Namespace, placement *typesv2.Placement, err error) { + var remaining [][]byte + + ns = &typesv2.Namespace{} + placement = &typesv2.Placement{} + + remaining, err = ToNamespace(resources, ns, "", "", "") + if err != nil { + return + } + + remaining, err = ToPlacement(resources, name, placement, "", "", "") + if err != nil { + return + } + + if len(remaining) > 0 { + } + + return +} + +// ToNamespace converts data to namespace +func ToNamespace(resources [][]byte, ns *typesv2.Namespace, orgID, partnerID, projectID string) (remaining [][]byte, err error) { + ns.ApiVersion = typesv2.ConfigGroup + ns.Kind = typesv2.NamespaceKind + + for _, resource := range resources { + gvk, err := dmf.Interpret(resource) + if err != nil { + return nil, err + } + + o, err := toRuntimeObject(*gvk, resource) + if err != nil { + return nil, err + } + + switch { + case IsNamespaceGVK(*gvk): + if mo, ok := o.(metav1.Object); ok { + ns.Metadata.Name = mo.GetName() + ns.Metadata.Labels = mo.GetLabels() + ns.Metadata.Annotations = mo.GetAnnotations() + } else { + return nil, ErrInvalidObject + } + ns.Spec.ObjectMeta.Name = ns.Metadata.Name + ns.Spec.ObjectMeta.Labels = ns.Metadata.Labels + ns.Spec.ObjectMeta.Annotations = ns.Metadata.Annotations + ns.Metadata.Organization = orgID + ns.Metadata.Partner = partnerID + ns.Metadata.Project = projectID + case IsNamespacePostCreate(*gvk): + var st controllerv2.StepTemplate + st, err = toStepTemplate(o) + if err != nil { + return nil, err + } + + ns.Spec.Spec.PostCreate = append(ns.Spec.Spec.PostCreate, &st) + + default: + remaining = append(remaining, resource) + } + + } + return +} + +// ToPlacement converts data to placement +func ToPlacement(resources [][]byte, name string, placement *typesv2.Placement, orgID, partnerID, projectID string) (remaining [][]byte, err error) { + for _, resource := range resources { + gvk, err := dmf.Interpret(resource) + if err != nil { + return nil, err + } + switch { + case IsPlacementGVK(*gvk): + json.Unmarshal(resource, placement) + if placement.Spec.ClusterSelector == "" || placement.Spec.PlacementType != typesv2.PlacementType_ClusterSelector { + return nil, fmt.Errorf("placement spec is missing type and selector") + } + if placement.Metadata.Name == "" { + placement.Metadata.Name = name + } + placement.ApiVersion = typesv2.ConfigGroup + placement.Kind = typesv2.PlacementKind + placement.Metadata.Organization = orgID + placement.Metadata.Partner = partnerID + placement.Metadata.Project = projectID + default: + remaining = append(remaining, resource) + } + } + return +} + +func getIngressAnnotations(name string, orgID, partnerID string) map[string]string { + orgHash, err := hasher.HashFromHex(orgID) + if err != nil { + orgHash = "unknown" + } + partnerHash, err := hasher.HashFromHex(partnerID) + if err != nil { + partnerHash = "unknown" + } + return map[string]string{ + ingressAnnotationConfigSnippetKey: fmt.Sprintf("set $workload_name \"%s\";set $orgId \"%s\";set $partnerId \"%s\";", name, orgHash, partnerHash), + } +} + +func addIngressAnnotations(annotations map[string]string, name string, orgId, partnerId string) { + if _, ok := annotations[ingressAnnotationConfigSnippetKey]; !ok { + orgHash, err := hasher.HashFromHex(orgId) + if err != nil { + orgHash = "unknown" + } + partnerHash, err := hasher.HashFromHex(partnerId) + if err != nil { + partnerHash = "unknown" + } + annotations[ingressAnnotationConfigSnippetKey] = fmt.Sprintf("set $workload_name \"%s\";set $orgId \"%s\";set $partnerId \"%s\";", + name, orgHash, partnerHash) + } +} + +func isLoggingEnabled(annotations map[string]string) bool { + if _, ok := annotations[typesv2.LogEndpoint]; ok { + return true + } + return false +} + +func addDebugLabels(stepTemplate *controllerv2.StepTemplate, debugLabels []byte) error { + + if stepTemplate.Object != nil { + accessor, err := stepTemplate.Object.Accessor() + if err != nil { + return err + } + kind, err := accessor.Kind() + if err != nil { + return err + } + _log.Infow("addDebugLabels", "kind", kind) + switch strings.ToLower(kind) { + case "pod": + accessor.SetRaw(debugLabels, "metadata", "labels") + case "deployment", "replicationcontroller", "replicaset", "statefulset", "daemonset", "job": + accessor.SetRaw(debugLabels, "spec", "template", "metadata", "labels") + case "cronjob": + accessor.SetRaw(debugLabels, "spec", "jobTemplate", "spec", "template", "metadata", "labels") + default: + _log.Warnw("Unknown Install component in TaskSet. Debug is not possible.", "Kind:", kind) + return nil + } + + stepTemplate.Object.Raw = accessor.Bytes() + + } + + return nil +} + +func getDebugLabelsMap(orgID, partnerID, projectID string, name string, isSystemWorkload bool) (map[string]string, error) { + orgHashID, err := hasher.HashFromHex(orgID) + if err != nil { + err = fmt.Errorf("failed to convert Org ID %d %s", orgID, err.Error()) + return nil, err + } + partnerHashID, err := hasher.HashFromHex(partnerID) + if err != nil { + err = fmt.Errorf("failed to convert Partner ID %d %s", partnerID, err.Error()) + return nil, err + } + projectHashID, err := hasher.HashFromHex(projectID) + if err != nil { + err = fmt.Errorf("failed to convert ProjectID ID %d %s", orgID, err.Error()) + return nil, err + } + + labels := make(map[string]string) + labels["rep-organization"] = orgHashID + labels["rep-partner"] = partnerHashID + labels["rep-project"] = projectHashID + if isSystemWorkload { + labels["rep-addon"] = name + } else { + labels["rep-workload"] = name + } + + return labels, nil +} + +func resourceToStepTemplate(resource []byte) (sts []controllerv2.StepTemplate, err error) { + + so := &controllerv2.StepObject{Raw: resource} + var accessor controllerv2.Accessor + var gvk schema.GroupVersionKind + + accessor, err = so.Accessor() + if err != nil { + return + } + + gvk, err = accessor.GroupVersionKind() + if err != nil { + return + } + + if IsListGVK(gvk) { + var ro runtime.Object + ro, _, err = runtimeutil.ToObject(so) + if err != nil { + return + } + if list, ok := ro.(*corev1.List); ok { + for _, item := range list.Items { + + var lso = &controllerv2.StepObject{Raw: item.Raw} + var la controllerv2.Accessor + var ln string + var lgvk schema.GroupVersionKind + la, err = lso.Accessor() + if err != nil { + return + } + ln, err = la.Name() + if err != nil { + return + } + lgvk, err = la.GroupVersionKind() + if err != nil { + return + } + var st controllerv2.StepTemplate + st.Name = strings.ToLower(fmt.Sprintf("step-%s-%s", lgvk.Kind, ln)) + st.Object = lso + sts = append(sts, st) + } + } + } else { + var name string + var st controllerv2.StepTemplate + + name, err = accessor.Name() + if err != nil { + return + } + + accessor.ResetAutoFields() + + so.Raw = accessor.Bytes() + + st.Name = strings.ToLower(fmt.Sprintf("step-%s-%s", gvk.Kind, name)) + st.Object = so + sts = append(sts, st) + } + + return +} + +// toRuntimeObject converts JSON bytes into runtime object of +// latest version +func toRuntimeObject(gvk schema.GroupVersionKind, b []byte) (runtime.Object, error) { + var sa controllerv2.StepObject + + err := json.Unmarshal(b, &sa) + if err != nil { + return nil, err + } + + ro, _, err := runtimeutil.ToObject(&sa) + if err != nil { + return nil, err + } + + return ro, nil + +} + +func toStepTemplate(o runtime.Object) (controllerv2.StepTemplate, error) { + so, err := runtimeutil.FromObject(o) + if err != nil { + return controllerv2.StepTemplate{}, err + } + return stepObjectToStepTemplate(*so) +} + +func stepObjectToStepTemplate(so controllerv2.StepObject) (controllerv2.StepTemplate, error) { + var st controllerv2.StepTemplate + + accessor, err := so.Accessor() + if err != nil { + return st, err + } + + gvk, err := accessor.GroupVersionKind() + if err != nil { + return st, err + } + + name, err := accessor.Name() + if err != nil { + return st, err + } + + st.Name = strings.ToLower(fmt.Sprintf("step-%s-%s", gvk.Kind, name)) + st.Object = &so + + return st, nil +} + +// tryConvert attempts to convert the given object to the provided versions in order. This function assumes +// the object is in internal version. +func tryConvert(converter runtime.ObjectConvertor, object runtime.Object, versions ...schema.GroupVersion) (runtime.Object, error) { + var last error + for _, version := range versions { + if version.Empty() { + return object, nil + } + obj, err := converter.ConvertToVersion(object, version) + if err != nil { + last = err + continue + } + return obj, nil + } + return nil, last +} diff --git a/components/common/pkg/converter/phase.go b/components/common/pkg/converter/phase.go new file mode 100644 index 0000000..d2f160c --- /dev/null +++ b/components/common/pkg/converter/phase.go @@ -0,0 +1,144 @@ +package converter + +import ( + "k8s.io/apimachinery/pkg/runtime/schema" +) + +var ( + // namespace gvk + namespaceGVK = schema.GroupVersionKind{Version: "v1", Kind: "Namespace"} + placementGVK = schema.GroupVersionKind{Group: "config.rafay.dev", Version: "v2", Kind: "Placement"} + + // namespace post install gvks + limitRangeGVK = schema.GroupVersionKind{Version: "v1", Kind: "LimitRange"} + resourceQuotaGVK = schema.GroupVersionKind{Version: "v1", Kind: "ResourceQuota"} + + // task init gvks + serviceAccountGVK = schema.GroupVersionKind{Version: "v1", Kind: "ServiceAccount"} +) + +// IsListGVK checks if gvk is of List Kind +func IsListGVK(gvk schema.GroupVersionKind) bool { + switch gvk.Group { + case "": + switch gvk.Kind { + case "List": + return true + } + } + return false +} + +// IsTaskInitGVK checks if given gvk should go into init phase +// of a Task +func IsTaskInitGVK(gvk schema.GroupVersionKind) bool { + switch gvk.Group { + case "rbac.authorization.k8s.io", "scheduling.k8s.io", + "apiextensions.k8s.io", "policy", + "admissionregistration.k8s.io", "storage.k8s.io", + "cert-manager.io": + return true + } + + switch gvk { + case serviceAccountGVK: + return true + } + + return false +} + +// IsTaskletInitGVK checks if given gvk should go into init phase of a +// Tasklet +func IsTaskletInitGVK(gvk schema.GroupVersionKind) bool { + switch gvk.Group { + case "": + switch gvk.Kind { + case "Pod": + default: + return true + } + case "networking.k8s.io": + return true + } + return false +} + +// IsTaskletInstallGVK checks if given gvk should go into install phase of +// a Tasklet +func IsTaskletInstallGVK(gvk schema.GroupVersionKind) bool { + switch gvk.Group { + case "apps", "batch": + return true + case "extensions": + switch gvk.Kind { + case "Deployment", "DaemonSet": + return true + } + case "": + switch gvk.Kind { + case "Pod": + return true + } + } + return false +} + +// IsTaskletPostInstallGVK checks if given gvk should go into post install phase +// of a TaskSet +func IsTaskletPostInstallGVK(gvk schema.GroupVersionKind) bool { + switch gvk.Group { + case "autoscaling": + return true + case "extensions": + switch gvk.Kind { + case "NetworkPolicy", "Ingress": + return true + } + } + return false +} + +// IsNamespaceGVK checks if given gvk is namespace +func IsNamespaceGVK(gvk schema.GroupVersionKind) bool { + switch gvk { + case namespaceGVK: + return true + } + return false +} + +// IsNamespacePostCreate checks if given gvk should go into namespace post install +func IsNamespacePostCreate(gvk schema.GroupVersionKind) bool { + // switch gvk { + // case limitRangeGVK, resourceQuotaGVK: + // return true + // } + return false +} + +// IsPlacementGVK checks gvk is placement +func IsPlacementGVK(gvk schema.GroupVersionKind) bool { + switch gvk { + case placementGVK: + return true + } + return false +} + +// IsPlacementGVK checks gvk is placement +func IsIngressGVK(gvk schema.GroupVersionKind) bool { + switch gvk.Group { + case "networking.k8s.io": + switch gvk.Kind { + case "Ingress": + return true + } + case "extensions": + switch gvk.Kind { + case "Ingress": + return true + } + } + return false +} diff --git a/components/common/pkg/converter/util.go b/components/common/pkg/converter/util.go index 7ad90b9..8261ca8 100644 --- a/components/common/pkg/converter/util.go +++ b/components/common/pkg/converter/util.go @@ -1,19 +1,19 @@ package converter import ( - "encoding/json" + gojson "encoding/json" - "github.com/RafaySystems/rcloud-base/components/common/pkg/log" + apiv2 "github.com/RafaySystems/rcloud-base/components/common/proto/types/controller" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" ) -var _log = log.GetLogger() - -func ConvertToJsonRawMessage(data interface{}) json.RawMessage { +func ConvertToJsonRawMessage(data interface{}) gojson.RawMessage { bytes, err := json.Marshal(data) if err != nil { _log.Errorw("failed to marshal", "err", err, "data", data) } - return json.RawMessage(bytes) + return gojson.RawMessage(bytes) } func ConvertToObject(data []byte, dest interface{}) interface{} { @@ -23,3 +23,18 @@ func ConvertToObject(data []byte, dest interface{}) interface{} { } return dest } + +// ToRuntimeObject converts JSON bytes into runtime object of latest version +func ToRuntimeObject(gvk schema.GroupVersionKind, b []byte) (runtime.Object, error) { + return toRuntimeObject(gvk, b) +} + +// ToStepTemplate converts runtime.Object to StepTemplate +func ToStepTemplate(o runtime.Object) (apiv2.StepTemplate, error) { + return toStepTemplate(o) +} + +// ToStepTemplate converts runtime.Object to StepTemplate +func StepObjectToStepTemplate(so apiv2.StepObject) (apiv2.StepTemplate, error) { + return stepObjectToStepTemplate(so) +} diff --git a/components/common/pkg/event/event.go b/components/common/pkg/event/event.go new file mode 100644 index 0000000..da149ae --- /dev/null +++ b/components/common/pkg/event/event.go @@ -0,0 +1,54 @@ +package event + +import ( + "github.com/segmentio/encoding/json" +) + +// ResourceEventType is type of resource event +type ResourceEventType int + +// Resource event types +const ( + EventTypeNotSet ResourceEventType = iota + ResourceCreate + ResourceUpdate + ResourceDelete + ResourceUpdateStatus +) + +// Resource represents an event generated when resource changes +// it should be looked as an parameter to the event handler callback +type Resource struct { + PartnerID string `json:"pa,omitempty"` + OrganizationID string `json:"or,omitempty"` + ProjectID string `json:"pr,omitempty"` + ID string `json:"id,omitempty"` + Name string `json:"n,omitempty"` + EventType ResourceEventType `json:"t,omitempty"` +} + +// Key is the key for this event which can be used as a cache key etc +func (sr Resource) Key() string { + b, _ := json.Marshal(&sr) + return string(b) +} + +// Handler is the interface for notifying resource changes +type Handler interface { + OnChange(r Resource) +} + +// HandlerFuncs is a utility for creating event handler with functions +type HandlerFuncs struct { + OnChangeFunc func(r Resource) + NameFunc func() string +} + +// OnChange is the callback for notifying when resource is changed +func (f HandlerFuncs) OnChange(r Resource) { + if f.OnChangeFunc != nil { + f.OnChangeFunc(r) + } +} + +var _ Handler = (*HandlerFuncs)(nil) diff --git a/components/common/pkg/event/queue.go b/components/common/pkg/event/queue.go new file mode 100644 index 0000000..5ff92d8 --- /dev/null +++ b/components/common/pkg/event/queue.go @@ -0,0 +1,116 @@ +package event + +import ( + "sync" + + "github.com/RafaySystems/rcloud-base/components/common/pkg/log" +) + +const ( + // internalBufferSize is size of the buffer that couple in and out chan + defaultBufferSize = 100 + // defaultIOBufferSize is a proxy for max parallelism while reading from + // out chan + + defaultIOBufferSize = 10 +) + +var ( + _log = log.GetLogger() +) + +// uniqueQueue is the containing type for set-style / unique queues +type uniqueQueue struct { + in <-chan Resource + out chan<- Resource + inBuffer map[Resource]struct{} + exists sync.Map + buffer chan Resource +} + +// NewUniqueQueue returns a queue for events which ensures that events in the queue are unique +// it takes optional arguments ioSize and bufSize +// ioSize is the size of in and out buffered channels +// bufSize is the size of internal buffer in the queue +func NewUniqueQueue(stop <-chan struct{}, size ...int) (inChan chan<- Resource, outChan <-chan Resource) { + + if len(size) > 2 { + panic("more than 2 args supplied for size") + } + + ioSize := defaultIOBufferSize + bufSize := defaultBufferSize + + if len(size) >= 1 { + if size[0] > 0 { + ioSize = size[0] + } + } + + if len(size) > 1 { + if size[1] > 0 { + bufSize = size[1] + } + } + + in := make(chan Resource, ioSize) + out := make(chan Resource, ioSize) + buffer := make(chan Resource, bufSize) + + queue := &uniqueQueue{in: in, out: out, buffer: buffer} + + go queue.run(stop) + + return in, out +} + +func (q *uniqueQueue) run(stop <-chan struct{}) { + + var _wg sync.WaitGroup + _wg.Add(2) + + go func(wg *sync.WaitGroup) { + defer wg.Done() + pushLoop: + for { + select { + case <-stop: + break pushLoop + case item := <-q.in: + + if _, ok := q.exists.Load(item); ok { + continue + } + + q.buffer <- item + q.exists.Store(item, struct{}{}) + + } + } + }(&_wg) + + go func(wg *sync.WaitGroup) { + defer wg.Done() + popLoop: + for { + select { + case <-stop: + break popLoop + // messages can be dropped when the system is unable to + // dequeue as fast as + case item := <-q.buffer: + select { + case q.out <- item: + default: + _log.Infow("unable to dequeu, dropping") + } + + q.exists.Delete(item) + } + } + }(&_wg) + + _wg.Wait() + close(q.buffer) + +} diff --git a/components/common/pkg/event/queue_test.go b/components/common/pkg/event/queue_test.go new file mode 100644 index 0000000..d9dbcff --- /dev/null +++ b/components/common/pkg/event/queue_test.go @@ -0,0 +1,104 @@ +package event + +import ( + "sync" + "sync/atomic" + "testing" + "time" +) + +func TestUniqueScopedResourceQueue(t *testing.T) { + stop := make(chan struct{}) + + numCon := 5 + bufSize := 100 + in, out := NewUniqueQueue(stop, numCon, bufSize) + + var gen1, gen2, gen3 int + var con1, con2, con3 int32 + + var wg sync.WaitGroup + wg.Add(numCon + 3) + + go func(_wg *sync.WaitGroup) { + defer _wg.Done() + genLoop: + for { + select { + case <-stop: + break genLoop + default: + in <- Resource{ID: "rx28oml"} + gen1++ + time.Sleep(time.Millisecond * 2) + } + } + //t.Log("exited gen1") + }(&wg) + + go func(_wg *sync.WaitGroup) { + defer _wg.Done() + genLoop: + for { + select { + case <-stop: + break genLoop + default: + in <- Resource{ID: "4qkolkn"} + gen2++ + time.Sleep(time.Millisecond * 2) + } + } + //t.Log("exited gen2") + }(&wg) + + go func(_wg *sync.WaitGroup) { + defer _wg.Done() + genLoop: + for { + select { + case <-stop: + break genLoop + default: + in <- Resource{ID: "7w2lnkp"} + gen3++ + time.Sleep(time.Millisecond * 2) + } + } + //t.Log("exited gen3") + }(&wg) + + for i := 0; i < numCon; i++ { + go func(idx int, _wg *sync.WaitGroup) { + defer _wg.Done() + + conLoop: + for { + select { + case <-stop: + break conLoop + case item := <-out: + switch item.ID { + case "rx28oml": + atomic.AddInt32(&con1, 1) + case "4qkolkn": + atomic.AddInt32(&con2, 1) + case "7w2lnkp": + atomic.AddInt32(&con3, 1) + default: + t.Log("unexpeced id", item.ID) + } + time.Sleep(time.Millisecond * 1) + } + } + //t.Log("exited ", idx) + }(i, &wg) + } + + time.Sleep(time.Second * 5) + close(stop) + wg.Wait() + + t.Log("gen1", gen1, "con1", con1, "gen2", gen2, "con2", con2, "gen3", gen3, "con3", con3) + +} diff --git a/components/common/pkg/event/rate_limiting.go b/components/common/pkg/event/rate_limiting.go new file mode 100644 index 0000000..a178d0c --- /dev/null +++ b/components/common/pkg/event/rate_limiting.go @@ -0,0 +1,100 @@ +package event + +import ( + "encoding/json" + "time" + + "k8s.io/client-go/util/workqueue" +) + +type rateLimitingQueue struct { + q workqueue.RateLimitingInterface + in <-chan Resource + out chan<- Resource +} + +func resourceToKey(r Resource) string { + b, _ := json.Marshal(r) + return string(b) +} + +func keyToResource(k string) Resource { + var r Resource + json.Unmarshal([]byte(k), &r) + return r +} + +// NewRateLimitngQueue returns new rate limiting resource event queue +func NewRateLimitngQueue(numWorkers int, stop <-chan struct{}) (inChan chan<- Resource, outChan <-chan Resource) { + in := make(chan Resource, numWorkers) + out := make(chan Resource, numWorkers) + + q := workqueue.NewRateLimitingQueue(workqueue.NewItemExponentialFailureRateLimiter( + time.Millisecond*10, + time.Millisecond*50, + )) + + //q := workqueue.NewRateLimitingQueue(workqueue.DefaultControllerRateLimiter()) + + rq := &rateLimitingQueue{ + q: q, + in: in, + out: out, + } + + go rq.run(stop) + return in, out +} + +func (rq *rateLimitingQueue) run(stop <-chan struct{}) { + + go func() { + enqueueLoop: + for { + select { + case <-stop: + break enqueueLoop + case r := <-rq.in: + key := resourceToKey(r) + //rq.q.Add(key) + rq.q.Add(key) + _log.Debugw("enqueued", "key", key, "len", rq.q.Len()) + + } + } + + }() + + go func() { + _log.Debugw("running dequeue") + for { + _log.Debugw("queue len", "len", rq.q.Len()) + key, shutdown := rq.q.Get() + if shutdown { + break + } + _log.Debugw("got item", "item", key) + + r := keyToResource(key.(string)) + + rq.q.Forget(key) + rq.q.Done(key) + _log.Debugw("dequeued", "resource", r) + + select { + case rq.out <- r: + default: + _log.Debugw("unable to dequeue adding back to queue", "resource", r) + rq.q.Add(key) + } + } + }() + + go func() { + <-stop + rq.q.ShutDown() + + }() + + return +} diff --git a/components/common/pkg/event/rate_limiting_test.go b/components/common/pkg/event/rate_limiting_test.go new file mode 100644 index 0000000..4f43a1f --- /dev/null +++ b/components/common/pkg/event/rate_limiting_test.go @@ -0,0 +1,103 @@ +package event + +import ( + "sync" + "sync/atomic" + "testing" + "time" +) + +func TestRateLimitingResourceQueue(t *testing.T) { + stop := make(chan struct{}) + + numWorkers := 5 + in, out := NewRateLimitngQueue(numWorkers, stop) + + var gen1, gen2, gen3 int + var con1, con2, con3 int32 + + var wg sync.WaitGroup + wg.Add(numWorkers + 3) + + go func(_wg *sync.WaitGroup) { + defer _wg.Done() + genLoop: + for { + select { + case <-stop: + break genLoop + default: + in <- Resource{ID: "rx28oml"} + gen1++ + time.Sleep(time.Millisecond * 1) + } + } + //t.Log("exited gen1") + }(&wg) + + go func(_wg *sync.WaitGroup) { + defer _wg.Done() + genLoop: + for { + select { + case <-stop: + break genLoop + default: + in <- Resource{ID: "4qkolkn"} + gen2++ + time.Sleep(time.Millisecond * 1) + } + } + //t.Log("exited gen2") + }(&wg) + + go func(_wg *sync.WaitGroup) { + defer _wg.Done() + genLoop: + for { + select { + case <-stop: + break genLoop + default: + in <- Resource{ID: "7w2lnkp"} + gen3++ + time.Sleep(time.Millisecond * 1) + } + } + //t.Log("exited gen3") + }(&wg) + + for i := 0; i < numWorkers; i++ { + go func(idx int, _wg *sync.WaitGroup) { + defer _wg.Done() + + conLoop: + for { + select { + case <-stop: + break conLoop + case item := <-out: + switch item.ID { + case "rx28oml": + atomic.AddInt32(&con1, 1) + case "4qkolkn": + atomic.AddInt32(&con2, 1) + case "7w2lnkp": + atomic.AddInt32(&con3, 1) + default: + t.Log("unexpeced id", item.ID) + } + time.Sleep(time.Millisecond * 1000) + } + } + //t.Log("exited ", idx) + }(i, &wg) + } + + time.Sleep(time.Second * 10) + close(stop) + wg.Wait() + + t.Log("gen1", gen1, "con1", con1, "gen2", gen2, "con2", con2, "gen3", gen3, "con3", con3) + +} diff --git a/components/common/pkg/gateway/json_test.go b/components/common/pkg/gateway/json_test.go index e7bbe5e..54fce47 100644 --- a/components/common/pkg/gateway/json_test.go +++ b/components/common/pkg/gateway/json_test.go @@ -3,20 +3,18 @@ package gateway_test import ( "bytes" "testing" - "time" "github.com/RafaySystems/rcloud-base/components/common/pkg/gateway" "github.com/RafaySystems/rcloud-base/components/common/pkg/gateway/testdata" + "google.golang.org/protobuf/types/known/timestamppb" ) func TestRafayJSONMarshaller(t *testing.T) { m := gateway.NewRafayJSON() - now := time.Now() - t1 := testdata.TestYAML{ Name: "test", - Time: &now, + Time: timestamppb.Now(), Labels: map[string]string{"l1": "l2"}, } diff --git a/components/common/pkg/gateway/util.go b/components/common/pkg/gateway/util.go new file mode 100644 index 0000000..f39d98e --- /dev/null +++ b/components/common/pkg/gateway/util.go @@ -0,0 +1,19 @@ +package gateway + +import ( + "context" + + "google.golang.org/grpc/metadata" +) + +// IsGatewayRequest returns true if the request is originated from +// Rafay Gateway +func IsGatewayRequest(ctx context.Context) bool { + if md, ok := metadata.FromIncomingContext(ctx); ok { + if vals := md.Get(GatewayRequest); vals != nil { + return true + } + return false + } + return false +} diff --git a/components/common/pkg/gateway/yaml_test.go b/components/common/pkg/gateway/yaml_test.go index 13d4fb1..e036bb7 100644 --- a/components/common/pkg/gateway/yaml_test.go +++ b/components/common/pkg/gateway/yaml_test.go @@ -3,20 +3,18 @@ package gateway_test import ( "bytes" "testing" - "time" "github.com/RafaySystems/rcloud-base/components/common/pkg/gateway" "github.com/RafaySystems/rcloud-base/components/common/pkg/gateway/testdata" + "google.golang.org/protobuf/types/known/timestamppb" ) func TestYamlMarshaller(t *testing.T) { m := gateway.NewRafayYAML() - now := time.Now() - t1 := testdata.TestYAML{ Name: "test", - Time: &now, + Time: timestamppb.Now(), Labels: map[string]string{"l1": "l2"}, } diff --git a/components/common/pkg/hasher/hash.go b/components/common/pkg/hasher/hash.go index 6e0441d..64c0cf5 100644 --- a/components/common/pkg/hasher/hash.go +++ b/components/common/pkg/hasher/hash.go @@ -4,9 +4,11 @@ import ( "bytes" "crypto/sha256" "fmt" + "sort" jsoniter "github.com/json-iterator/go" "github.com/speps/go-hashids" + v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" k8sapijson "sigs.k8s.io/kustomize/pseudo/k8s/apimachinery/pkg/runtime/serializer/json" ) @@ -48,6 +50,24 @@ func HashFromInt64(id int64) (string, error) { return stringHash, nil } +// HashFromHex returns new Hash for uuid string +func HashFromHex(id string) (string, error) { + stringHash, err := hd.EncodeHex(id) + if err != nil { + return "", err + } + return stringHash, nil +} + +// HashFromHex returns new Hash for uuid string +func IDFromHash(hash string) (string, error) { + id, err := hd.DecodeHex(hash) + if err != nil { + return "", err + } + return id, nil +} + var json = k8sapijson.CaseSensitiveJsonIterator() // GetHash returns the hash of spec/data for a kubernetes style object @@ -95,3 +115,34 @@ func Add(o metav1.Object) error { return nil } + +// Node Hash should take Labels into the hash calculation since it can be +// set from either side: From core or from cluster +func GetNodeHashFrom(labels map[string]string, taints []v1.Taint, unscheduleable bool) (string, error) { + //add sorted labels + labelsKeys := make([]string, 0) + for k, _ := range labels { + labelsKeys = append(labelsKeys, k) + } + sort.Strings(labelsKeys) + finalLabelsAsString := "" + for _, k := range labelsKeys { + finalLabelsAsString += fmt.Sprintf("%s:%s,", k, labels[k]) + } + //add sorted taints + taintKeys := make([]string, 0) + taintMap := make(map[string]v1.Taint) + for _, taint := range taints { + taintKeys = append(taintKeys, taint.Key) + taintMap[taint.Key] = taint + } + sort.Strings(taintKeys) + finalTaintsAsString := "" + for _, k := range taintKeys { + finalTaintsAsString += fmt.Sprintf("%s:%s:%s,", k, taintMap[k].Value, taintMap[k].Effect) + } + finalHashString := fmt.Sprintf("labels:%s,taints:%s,unschedulable:%v", finalLabelsAsString, finalTaintsAsString, unscheduleable) + h := sha256.New() + h.Write([]byte(finalHashString)) + return fmt.Sprintf("%x", h.Sum(nil)), nil +} diff --git a/components/common/pkg/leaderelection/config.go b/components/common/pkg/leaderelection/config.go new file mode 100644 index 0000000..3f67948 --- /dev/null +++ b/components/common/pkg/leaderelection/config.go @@ -0,0 +1,31 @@ +package leaderelection + +import ( + "sigs.k8s.io/controller-runtime/pkg/client/config" +) + +// aliasing controller runtime config package + +var ( + // GetConfigOrDie creates a *rest.Config for talking to a Kubernetes apiserver. + // If --kubeconfig is set, will use the kubeconfig file at that location. Otherwise will assume running + // in cluster and use the cluster provided kubeconfig. + // + // Will log an error and exit if there is an error creating the rest.Config. + GetConfigOrDie = config.GetConfigOrDie + + // GetConfig creates a *rest.Config for talking to a Kubernetes apiserver. + // If --kubeconfig is set, will use the kubeconfig file at that location. Otherwise will assume running + // in cluster and use the cluster provided kubeconfig. + // + // Config precedence + // + // * --kubeconfig flag pointing at a file + // + // * KUBECONFIG environment variable pointing at a file + // + // * In-cluster config if running in cluster + // + // * $HOME/.kube/config if exists + GetConfig = config.GetConfig +) diff --git a/components/common/pkg/leaderelection/const.go b/components/common/pkg/leaderelection/const.go new file mode 100644 index 0000000..ec334b3 --- /dev/null +++ b/components/common/pkg/leaderelection/const.go @@ -0,0 +1,30 @@ +package leaderelection + +import ( + "time" +) + +const ( + // LeaseDuration is the duration that non-leader candidates will + // wait to force acquire leadership. This is measured against time of + // last observed ack. + // + // A client needs to wait a full LeaseDuration without observing a change to + // the record before it can attempt to take over. When all clients are + // shutdown and a new set of clients are started with different names against + // the same leader record, they must wait the full LeaseDuration before + // attempting to acquire the lease. Thus LeaseDuration should be as short as + // possible (within your tolerance for clock skew rate) to avoid a possible + // long waits in the scenario. + // + LeaseDuration = 15 * time.Second + // RenewDeadline is the duration that the acting master will retry + // refreshing leadership before giving up. + // + RenewDeadline = 10 * time.Second + + // RetryPeriod is the duration the LeaderElector clients should wait + // between tries of actions. + // + RetryPeriod = 2 * time.Second +) diff --git a/components/common/pkg/leaderelection/election.go b/components/common/pkg/leaderelection/election.go new file mode 100644 index 0000000..ccb7bbf --- /dev/null +++ b/components/common/pkg/leaderelection/election.go @@ -0,0 +1,51 @@ +package leaderelection + +import ( + "context" + + log "github.com/RafaySystems/rcloud-base/components/common/pkg/log" + le "k8s.io/client-go/tools/leaderelection" + rl "k8s.io/client-go/tools/leaderelection/resourcelock" +) + +var ( + _log = log.GetLogger() +) + +// Run runs leader election and calls onStarted when runner becomes leader +func Run(lock rl.Interface, onStarted func(stop <-chan struct{}), stop <-chan struct{}) error { + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + _log.Infow("starting leader election", "for", lock.Describe(), "id", lock.Identity()) + elector, err := le.NewLeaderElector(le.LeaderElectionConfig{ + Lock: lock, + ReleaseOnCancel: true, + LeaseDuration: LeaseDuration, + RenewDeadline: RenewDeadline, + RetryPeriod: RetryPeriod, + Callbacks: le.LeaderCallbacks{ + OnStartedLeading: func(_ context.Context) { + _log.Infow("started leading", "for", lock.Describe(), "id", lock.Identity()) + onStarted(stop) + }, + OnStoppedLeading: func() { + _log.Infow("stopped leading", "for", lock.Describe(), "id", lock.Identity()) + }, + OnNewLeader: func(identity string) { + _log.Infow("new leader", "for", lock.Describe(), "id", identity) + }, + }, + }) + + if err != nil { + return err + } + + go elector.Run(ctx) + _log.Infow("started leader election", "for", lock.Describe(), "id", lock.Identity()) + + <-stop + + return nil + +} diff --git a/components/common/pkg/leaderelection/election_test.go b/components/common/pkg/leaderelection/election_test.go new file mode 100644 index 0000000..786e6ca --- /dev/null +++ b/components/common/pkg/leaderelection/election_test.go @@ -0,0 +1,114 @@ +package leaderelection + +import ( + "fmt" + "testing" + "time" +) + +func TestLeaderElectionRun(t *testing.T) { + lock1, err := NewLock("test-lock", "default", "client-1") + if err != nil { + t.Error(err) + return + } + lock2, err := NewLock("test-lock", "default", "client-2") + if err != nil { + t.Error(err) + return + } + stop1 := make(chan struct{}) + stop2 := make(chan struct{}) + + go func() { + Run(lock1, func(stop <-chan struct{}) { + fmt.Println(lock1.Identity(), " became leader") + loop: + for { + select { + case <-stop: + fmt.Println("stopping ", lock1.Identity()) + break loop + } + } + }, stop1) + }() + + go func() { + Run(lock2, func(stop <-chan struct{}) { + fmt.Println(lock2.Identity(), " became leader") + loop: + for { + select { + case <-stop: + fmt.Println("stopping ", lock2.Identity()) + break loop + } + } + }, stop2) + }() + + go func() { + time.Sleep(time.Second * 20) + close(stop1) + }() + + go func() { + time.Sleep(time.Second * 20) + close(stop2) + }() + + <-stop1 + <-stop2 + + time.Sleep(time.Second * 1) +} + +func TestLeaderElectionConfigMapRun(t *testing.T) { + lock1, err := NewConfigMapLock("test-lock", "default", "client-1") + if err != nil { + t.Error(err) + return + } + lock2, err := NewConfigMapLock("test-lock", "default", "client-2") + if err != nil { + t.Error(err) + return + } + stop1 := make(chan struct{}) + stop2 := make(chan struct{}) + + go func() { + Run(lock1, func(stop <-chan struct{}) { + fmt.Println(lock1.Identity(), " became leader") + loop: + for { + select { + case <-stop: + fmt.Println("stopping ", lock1.Identity()) + break loop + } + } + }, stop1) + }() + go func() { + Run(lock2, func(stop <-chan struct{}) { + fmt.Println(lock2.Identity(), " became leader") + loop: + for { + select { + case <-stop: + fmt.Println("stopping ", lock2.Identity()) + break loop + } + } + }, stop2) + }() + + time.Sleep(time.Second * 20) + close(stop2) + + time.Sleep(time.Second * 20) + close(stop1) + +} diff --git a/components/common/pkg/leaderelection/lock.go b/components/common/pkg/leaderelection/lock.go new file mode 100644 index 0000000..c49e296 --- /dev/null +++ b/components/common/pkg/leaderelection/lock.go @@ -0,0 +1,50 @@ +package leaderelection + +import ( + clientset "k8s.io/client-go/kubernetes" + rl "k8s.io/client-go/tools/leaderelection/resourcelock" +) + +// NewLock returns new resource lock +func NewLock(lockName, lockNamespace, id string) (rl.Interface, error) { + + config, err := GetConfig() + if err != nil { + return nil, err + } + + client, err := clientset.NewForConfig(config) + if err != nil { + return nil, err + } + + return rl.New(rl.LeasesResourceLock, + lockNamespace, + lockName, + client.CoreV1(), + client.CoordinationV1(), + rl.ResourceLockConfig{Identity: id}, + ) +} + +// NewConfigMapLock returns new lock backed by ConfigMap +func NewConfigMapLock(lockName, lockNamespace, id string) (rl.Interface, error) { + config, err := GetConfig() + if err != nil { + return nil, err + } + + client, err := clientset.NewForConfig(config) + if err != nil { + return nil, err + } + + return rl.New(rl.ConfigMapsResourceLock, + lockNamespace, + lockName, + client.CoreV1(), + nil, + rl.ResourceLockConfig{Identity: id}, + ) + +} diff --git a/components/common/pkg/match/match.go b/components/common/pkg/match/match.go index 57d288e..2e80f3d 100644 --- a/components/common/pkg/match/match.go +++ b/components/common/pkg/match/match.go @@ -24,36 +24,36 @@ func New(opts ...query.Option) (Matcher, error) { } return &matcher{ - partnerID: options.PartnerID, - organizationID: options.OrganizationID, - projectID: options.ProjectID, - selector: selector, - name: options.Name, + partner: options.Partner, + organization: options.Organization, + project: options.Project, + selector: selector, + name: options.Name, }, nil } type matcher struct { - partnerID string - organizationID string - projectID string - selector labels.Selector - name string + partner string + organization string + project string + selector labels.Selector + name string } var _ Matcher = (*matcher)(nil) func (m *matcher) Match(meta commonv3.Metadata) bool { - if meta.GetPartner() != m.partnerID { + if meta.GetPartner() != m.partner { return false } - if meta.GetOrganization() != m.organizationID { + if meta.GetOrganization() != m.organization { return false } - if meta.GetProject() != m.projectID { + if meta.GetProject() != m.project { return false } diff --git a/components/common/pkg/models/group.go b/components/common/pkg/models/group.go new file mode 100644 index 0000000..2733be1 --- /dev/null +++ b/components/common/pkg/models/group.go @@ -0,0 +1,22 @@ +package models + +import ( + "time" + + "github.com/google/uuid" + "github.com/uptrace/bun" +) + +type Group struct { + bun.BaseModel `bun:"table:authsrv_group,alias:group"` + + ID uuid.UUID `bun:"id,type:uuid,pk,default:uuid_generate_v4()"` + Name string `bun:"name,notnull"` + Description string `bun:"description,notnull"` + CreatedAt time.Time `bun:"created_at,notnull,default:current_timestamp"` + ModifiedAt time.Time `bun:"modified_at,notnull,default:current_timestamp"` + Trash bool `bun:"trash,notnull,default:false"` + OrganizationId uuid.UUID `bun:"organization_id,type:uuid"` + PartnerId uuid.UUID `bun:"partner_id,type:uuid"` + Type string `bun:"type,notnull"` +} diff --git a/components/common/pkg/models/groupaccount.go b/components/common/pkg/models/groupaccount.go new file mode 100644 index 0000000..b484474 --- /dev/null +++ b/components/common/pkg/models/groupaccount.go @@ -0,0 +1,22 @@ +package models + +import ( + "time" + + "github.com/google/uuid" + "github.com/uptrace/bun" +) + +type GroupAccount struct { + bun.BaseModel `bun:"table:authsrv_groupaccount,alias:groupaccount"` + + ID uuid.UUID `bun:"id,type:uuid,pk,default:uuid_generate_v4()"` + Name string `bun:"name,notnull"` + Description string `bun:"description,notnull"` + CreatedAt time.Time `bun:"created_at,notnull,default:current_timestamp"` + ModifiedAt time.Time `bun:"modified_at,notnull,default:current_timestamp"` + Trash bool `bun:"trash,notnull,default:false"` + AccountId uuid.UUID `bun:"account_id,type:uuid"` + GroupId uuid.UUID `bun:"group_id,type:uuid"` + Active bool `bun:"active,notnull"` +} diff --git a/components/common/pkg/persistence/provider/pg/entity_dao.go b/components/common/pkg/persistence/provider/pg/entity_dao.go index d310da9..b5c7ef6 100644 --- a/components/common/pkg/persistence/provider/pg/entity_dao.go +++ b/components/common/pkg/persistence/provider/pg/entity_dao.go @@ -232,6 +232,7 @@ func (dao *entityDAO) List(ctx context.Context, partnerId uuid.NullUUID, organiz if organizationId.Valid { sq = sq.Where("organization_id = ?", organizationId) } + sq.Where("trash = false") err := sq.Scan(ctx) return entities, err } @@ -248,6 +249,7 @@ func (dao *entityDAO) ListByProject(ctx context.Context, partnerId uuid.NullUUID if projectId.Valid { sq = sq.Where("project_id = ?", projectId) } + sq.Where("trash = false") err := sq.Scan(ctx) return err } diff --git a/components/common/pkg/query/options.go b/components/common/pkg/query/options.go index 39aff07..3bc659d 100644 --- a/components/common/pkg/query/options.go +++ b/components/common/pkg/query/options.go @@ -1,6 +1,11 @@ package query import ( + "errors" + "fmt" + "time" + + "github.com/RafaySystems/rcloud-base/components/common/pkg/random" commonv3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/commonpb/v3" "github.com/uptrace/bun" ) @@ -21,9 +26,36 @@ const ( ) const ( + nameWithAliasQ = "?TableAlias.name = ?" + idWithAliasQ = "?TableAlias.id = ?" partnerIDWithAliasQ = "?TableAlias.partner_id = ?" organizationIDWithAliasQ = "?TableAlias.organization_id = ?" projectIDwithAliasQ = "?TableAlias.project_id = ?" + + nameQ = "name = ?" + deletedAtQ = "deleted_at = ?" + modifiedAtQ = "modified_at = ?" + displayNameQ = "display_name = ?" + labelsQ = "labels = ?" + annotationsQ = "annotations = ?" + idQ = "id = ?" +) + +const ( + scopeOrganization = "organization" + scopePartner = "partner" + scopeProject = "project" + scopeProjects = "projects" + scopeUser = "user" + scopeCluster = "cluster" + scopeSSOUser = "ssouser" +) + +var ( + // ErrNoName is returned when name is not set in query option + // trying to build query for get/update/delete + ErrNoName = errors.New("name not set in options") + ErrNoNameOrID = errors.New("neither name nor id is set in options") ) // Option is the functional query option signature @@ -36,9 +68,9 @@ func WithMeta(o *commonv3.Metadata) Option { return func(opts *commonv3.QueryOptions) { opts.Name = o.GetName() opts.ID = o.GetId() - opts.PartnerID = o.GetPartner() - opts.OrganizationID = o.GetOrganization() - opts.ProjectID = o.GetProject() + opts.Partner = o.GetPartner() + opts.Organization = o.GetOrganization() + opts.Project = o.GetProject() opts.DisplayName = o.GetName() opts.Labels = o.GetLabels() opts.Annotations = o.GetAnnotations() @@ -54,6 +86,28 @@ func WithOptions(in *commonv3.QueryOptions) Option { } } +// WithIgnoreScopeDefault ignores default values for scope when building queries +func WithIgnoreScopeDefault() Option { + return func(opts *commonv3.QueryOptions) { + opts.IgnoreScopeDefault = true + } +} + +// WithExtended sets extended in query options +func WithExtended() Option { + return func(opts *commonv3.QueryOptions) { + opts.Extended = true + } +} + +// WithGlobalScope should be used to query resources in global scope +// partnerID, orgID, projectID = 0, 0, 0 +func WithGlobalScope() Option { + return func(opts *commonv3.QueryOptions) { + opts.GlobalScope = true + } +} + func getLimit(opts *commonv3.QueryOptions) int64 { // if limit is < 0 send all records if opts.Limit == 0 { @@ -102,12 +156,33 @@ func Select(q *bun.SelectQuery, opts *commonv3.QueryOptions) (*bun.SelectQuery, return q, nil } +// GetAccountID returns account ID from QueryOptions +func GetAccountID(opts *commonv3.QueryOptions) (string, error) { + switch { + case opts.GlobalScope: + return "", nil + default: + return opts.Account, nil + + } +} + +// GetOrganizationID returns organization id from QueryOptions +func GetOrganizationID(opts *commonv3.QueryOptions) (string, error) { + switch { + case opts.GlobalScope: + return "", nil + default: + return opts.Organization, nil + } +} + func setRequestMeta(q *bun.SelectQuery, opts *commonv3.QueryOptions) (*bun.SelectQuery, error) { var err error for _, f := range []setOption{ - setPartnerID, - setOrganizationID, - setProjectID, + setPartner, + setOrganization, + setProject, } { q, err = f(q, opts) if err != nil { @@ -119,41 +194,149 @@ func setRequestMeta(q *bun.SelectQuery, opts *commonv3.QueryOptions) (*bun.Selec } -func setProjectID(q *bun.SelectQuery, opts *commonv3.QueryOptions) (*bun.SelectQuery, error) { - id := opts.ProjectID +func setProject(q *bun.SelectQuery, opts *commonv3.QueryOptions) (*bun.SelectQuery, error) { + id := opts.Project - if !opts.GlobalScope && opts.IgnoreScopeDefault && id != "" { - return q, nil + if !opts.GlobalScope && id != "" { + q = q.Where(projectIDwithAliasQ, id) } - q = q.Where(projectIDwithAliasQ, id) - return q, nil } -func setOrganizationID(q *bun.SelectQuery, opts *commonv3.QueryOptions) (*bun.SelectQuery, error) { +func setOrganization(q *bun.SelectQuery, opts *commonv3.QueryOptions) (*bun.SelectQuery, error) { - id := opts.OrganizationID + id := opts.Organization - if !opts.GlobalScope && opts.IgnoreScopeDefault && id != "" { - return q, nil + if !opts.GlobalScope && id != "" { + q = q.Where(organizationIDWithAliasQ, id) } - q = q.Where(organizationIDWithAliasQ, id) - return q, nil } -func setPartnerID(q *bun.SelectQuery, opts *commonv3.QueryOptions) (*bun.SelectQuery, error) { - id := opts.PartnerID +func setPartner(q *bun.SelectQuery, opts *commonv3.QueryOptions) (*bun.SelectQuery, error) { + id := opts.Partner // global scope takes precedence over ignore scope default - if !opts.GlobalScope && opts.IgnoreScopeDefault && id != "" { - return q, nil + if !opts.GlobalScope && id != "" { + q = q.Where(partnerIDWithAliasQ, id) } - q = q.Where(partnerIDWithAliasQ, id) - return q, nil } + +// WithName sets name in query options +func WithName(name string) Option { + return func(opts *commonv3.QueryOptions) { + opts.Name = name + } +} + +// WithSelector sets selector in query options +func WithSelector(selector string) Option { + return func(opts *commonv3.QueryOptions) { + opts.Selector = selector + } +} + +// WithDeleted sets deleted in query options +func WithDeleted() Option { + return func(opts *commonv3.QueryOptions) { + opts.Deleted = true + } +} + +// WithPartnerID sets partner id in query options +func WithPartnerID(partnerID string) Option { + return func(opts *commonv3.QueryOptions) { + opts.Partner = partnerID + } +} + +// WithOrganizationID sets organization id in query options +func WithOrganizationID(organizationID string) Option { + return func(opts *commonv3.QueryOptions) { + opts.Organization = organizationID + } +} + +// WithProjectID sets project id in query options +func WithProjectID(projectID string) Option { + return func(opts *commonv3.QueryOptions) { + opts.Project = projectID + } +} + +// GetClusterID returns cluster ID from QueryOptions +func GetClusterID(opts *commonv3.QueryOptions) (string, error) { + switch { + case opts.GlobalScope: + return "", nil + default: + return opts.ClusterID, nil + + } +} + +// Get builds query for getting resource +func Get(q *bun.SelectQuery, opts *commonv3.QueryOptions) (*bun.SelectQuery, error) { + + var err error + if !opts.GlobalScope { + q, err = setRequestMeta(q, opts) + } + + if err != nil { + return nil, err + } + + if opts.Name == "" && opts.ID == "" { + return nil, ErrNoNameOrID + } + + if opts.Name != "" { + q = q.Where(nameWithAliasQ, opts.Name) + } else if opts.ID != "" { + q = q.Where(idWithAliasQ, opts.ID) + } + + return q, nil +} + +// Update builds query for updating resource +func Update(uq *bun.UpdateQuery, opts *commonv3.QueryOptions) (*bun.UpdateQuery, error) { + + uq = uq.Set(modifiedAtQ, time.Now()) + if opts.DisplayName != "" { + uq = uq.Set(displayNameQ, opts.DisplayName) + } + if opts.Labels != nil { + uq = uq.Set(labelsQ, opts.Labels) + } + if opts.Annotations != nil { + uq = uq.Set(annotationsQ, opts.Annotations) + } + + return uq, nil +} + +// Delete builds query for deleting resource +func Delete(q *bun.SelectQuery, opts *commonv3.QueryOptions) (*bun.UpdateQuery, error) { + var err error + q, err = Get(q, opts) + if err != nil { + return nil, err + } + + uq := q.NewUpdate() + if opts.Deleted { + uq = uq.Set(nameQ, fmt.Sprintf("%s-%s", opts.Name, random.NewRandomString(10))) + } + now := time.Now() + + uq = uq.Set(deletedAtQ, &now) + + return uq, nil +} diff --git a/components/common/pkg/query/selector.go b/components/common/pkg/query/selector.go index 4ac4393..976a8bc 100644 --- a/components/common/pkg/query/selector.go +++ b/components/common/pkg/query/selector.go @@ -86,12 +86,14 @@ func FilterLabels(q *bun.SelectQuery, opts *commonv3.QueryOptions) (*bun.SelectQ key := reqs[i].Key() q = q.Where( clause, + bun.Safe("?"), key, ) case selection.DoesNotExist: key := reqs[i].Key() q = q.Where( clause, + bun.Safe("?"), key, ) default: diff --git a/components/common/pkg/random/string.go b/components/common/pkg/random/string.go new file mode 100644 index 0000000..d053b12 --- /dev/null +++ b/components/common/pkg/random/string.go @@ -0,0 +1,42 @@ +package random + +import ( + "math/rand" + "strings" + "time" +) + +var ( + _src = rand.NewSource(time.Now().UnixNano()) +) + +const ( + letterBytes = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" + letterIdxBits = 6 // 6 bits to represent a letter index + letterIdxMask = 1<= 0; { + if remain == 0 { + cache, remain = _src.Int63(), letterIdxMax + } + if idx := int(cache & letterIdxMask); idx < len(letterBytes) { + b[i] = letterBytes[idx] + i-- + } + cache >>= letterIdxBits + remain-- + } + + return string(b) +} + +func NewLowerRandomString(n int) string { + s := NewRandomString(n) + return strings.ToLower(s) +} diff --git a/components/common/pkg/sentry/cryptoutil/ca.go b/components/common/pkg/sentry/cryptoutil/ca.go new file mode 100644 index 0000000..2609690 --- /dev/null +++ b/components/common/pkg/sentry/cryptoutil/ca.go @@ -0,0 +1,53 @@ +package cryptoutil + +import ( + "crypto/ecdsa" + "crypto/rand" + "crypto/x509" + "crypto/x509/pkix" + "math/big" + "time" +) + +func getSerialNumber() *big.Int { + serialNumberLimit := new(big.Int).Lsh(big.NewInt(1), 128) + serialNumber, _ := rand.Int(rand.Reader, serialNumberLimit) + + return serialNumber +} + +// GenerateCA Generates PEM encoded CA Certificate and Private key +// PasswordFunc should return non zero value to encrypt the PEM encoded private key +func GenerateCA(subject pkix.Name, f PasswordFunc) (cert, key []byte, err error) { + var caCert *x509.Certificate + var privKey *ecdsa.PrivateKey + + caCert = &x509.Certificate{ + SerialNumber: getSerialNumber(), + Subject: subject, + NotBefore: time.Now(), + NotAfter: time.Now().AddDate(10, 0, 0), + IsCA: true, + ExtKeyUsage: []x509.ExtKeyUsage{x509.ExtKeyUsageClientAuth, x509.ExtKeyUsageServerAuth}, + KeyUsage: x509.KeyUsageDigitalSignature | x509.KeyUsageCertSign, + BasicConstraintsValid: true, + } + + privKey, err = GenerateECDSAPrivateKey() + if err != nil { + return + } + + var caBytes []byte + + caBytes, err = x509.CreateCertificate(rand.Reader, caCert, caCert, &privKey.PublicKey, privKey) + if err != nil { + return + } + + cert = EncodeCert(caBytes) + + key, err = EncodePrivateKey(privKey, f) + + return +} diff --git a/components/common/pkg/sentry/cryptoutil/ca_test.go b/components/common/pkg/sentry/cryptoutil/ca_test.go new file mode 100644 index 0000000..bdb0a0e --- /dev/null +++ b/components/common/pkg/sentry/cryptoutil/ca_test.go @@ -0,0 +1,22 @@ +package cryptoutil + +import ( + "crypto/x509/pkix" + "testing" +) + +func TestGenerateCA(t *testing.T) { + cert, key, err := GenerateCA(pkix.Name{ + CommonName: "Rafay Sentry Bootstrap CA", + Organization: []string{"Rafay Systems"}, + Country: []string{"USA"}, + Province: []string{"California"}, + Locality: []string{"Sunnyvale"}, + }, NoPassword) + if err != nil { + t.Error(err) + return + } + t.Log(string(cert)) + t.Log(string(key)) +} diff --git a/components/common/pkg/sentry/cryptoutil/cert.go b/components/common/pkg/sentry/cryptoutil/cert.go new file mode 100644 index 0000000..fce2d46 --- /dev/null +++ b/components/common/pkg/sentry/cryptoutil/cert.go @@ -0,0 +1,37 @@ +package cryptoutil + +import ( + "crypto/x509" + "encoding/pem" + "errors" +) + +const ( + certType = "CERTIFICATE" +) + +// EncodeCert encodes the DER encoded cert to PEM +func EncodeCert(cert []byte) []byte { + return pem.EncodeToMemory(&pem.Block{ + Type: certType, + Bytes: cert, + }) +} + +// DecodeCert decodes PEM encoded cert +func DecodeCert(cert []byte) (c *x509.Certificate, err error) { + var p *pem.Block + p, err = decodePEM(cert) + if err != nil { + return + } + + if p.Type != certType { + err = errors.New("invalid pem type") + return + } + + c, err = x509.ParseCertificate(p.Bytes) + + return +} diff --git a/components/common/pkg/sentry/cryptoutil/cert_test.go b/components/common/pkg/sentry/cryptoutil/cert_test.go new file mode 100644 index 0000000..b6e72ca --- /dev/null +++ b/components/common/pkg/sentry/cryptoutil/cert_test.go @@ -0,0 +1,42 @@ +package cryptoutil + +import ( + "crypto/x509" + "crypto/x509/pkix" + "testing" +) + +func TestVerifyCertHostname(t *testing.T) { + cert := &x509.Certificate{ + Subject: pkix.Name{ + CommonName: "---", + }, + DNSNames: []string{ + "peering.sentry.rafay.local", + "peering.sentry.rafay.local", + "rafay-sentry", + "rafay-sentry.rafay-system", + "rafay-sentry.rafay-system.cluster.local", + }, + } + err := cert.VerifyHostname("peering.sentry.rafay.local") + if err != nil { + t.Error(err) + return + } + err = cert.VerifyHostname("rafay-sentry.rafay-system") + if err != nil { + t.Error(err) + return + } + err = cert.VerifyHostname("rafay-sentry") + if err != nil { + t.Error(err) + return + } + err = cert.VerifyHostname("rafay-sentry.rafay-system.cluster.local") + if err != nil { + t.Error(err) + return + } +} diff --git a/components/common/pkg/sentry/cryptoutil/common.go b/components/common/pkg/sentry/cryptoutil/common.go new file mode 100644 index 0000000..04b81ac --- /dev/null +++ b/components/common/pkg/sentry/cryptoutil/common.go @@ -0,0 +1,14 @@ +package cryptoutil + +import ( + "encoding/pem" + "fmt" +) + +func decodePEM(pemBytes []byte) (*pem.Block, error) { + p, _ := pem.Decode(pemBytes) + if p == nil { + return nil, fmt.Errorf("invalid pem block") + } + return p, nil +} diff --git a/components/common/pkg/sentry/cryptoutil/csr.go b/components/common/pkg/sentry/cryptoutil/csr.go new file mode 100644 index 0000000..7a5ea2b --- /dev/null +++ b/components/common/pkg/sentry/cryptoutil/csr.go @@ -0,0 +1,63 @@ +package cryptoutil + +import ( + "crypto" + "crypto/ecdsa" + "crypto/rand" + "crypto/x509" + "crypto/x509/pkix" + "encoding/pem" + "errors" + "fmt" +) + +const ( + csrType = "CERTIFICATE REQUEST" +) + +// EncodeCSR encodes DER encoded CSR to PEM +func EncodeCSR(csr []byte) []byte { + return pem.EncodeToMemory(&pem.Block{Type: csrType, Bytes: csr}) +} + +// DecodeCSR decodes PEM encoded CSR +func DecodeCSR(csr []byte) (cr *x509.CertificateRequest, err error) { + var p *pem.Block + p, err = decodePEM(csr) + if err != nil { + return nil, err + } + + if p.Type != csrType { + err = errors.New("invalid type") + return + } + + cr, err = x509.ParseCertificateRequest(p.Bytes) + if err != nil { + return + } + + return +} + +// CreateCSR creates csr for commonName +func CreateCSR(subject pkix.Name, privKey crypto.PrivateKey) ([]byte, error) { + req := &x509.CertificateRequest{ + Subject: subject, + } + switch privKey.(type) { + case *ecdsa.PrivateKey: + req.SignatureAlgorithm = x509.ECDSAWithSHA256 + default: + return nil, fmt.Errorf("unsupported private keys %T", privKey) + } + + b, err := x509.CreateCertificateRequest(rand.Reader, req, privKey) + if err != nil { + return nil, err + } + + return EncodeCSR(b), nil + +} diff --git a/components/common/pkg/sentry/cryptoutil/csr_test.go b/components/common/pkg/sentry/cryptoutil/csr_test.go new file mode 100644 index 0000000..354e2c6 --- /dev/null +++ b/components/common/pkg/sentry/cryptoutil/csr_test.go @@ -0,0 +1,21 @@ +package cryptoutil + +import ( + "crypto/x509/pkix" + "testing" +) + +func TestCreateCSR(t *testing.T) { + privKey, err := GenerateECDSAPrivateKey() + if err != nil { + t.Error(err) + return + } + + csr, err := CreateCSR(pkix.Name{CommonName: "test-token"}, privKey) + if err != nil { + t.Error(err) + return + } + t.Log(string(csr)) +} diff --git a/components/common/pkg/sentry/cryptoutil/key.go b/components/common/pkg/sentry/cryptoutil/key.go new file mode 100644 index 0000000..a4c2209 --- /dev/null +++ b/components/common/pkg/sentry/cryptoutil/key.go @@ -0,0 +1,141 @@ +package cryptoutil + +import ( + "crypto" + "crypto/ecdsa" + "crypto/elliptic" + "crypto/rand" + "crypto/rsa" + "crypto/x509" + "encoding/pem" + "fmt" +) + +const ( + ecKeyType = "EC PRIVATE KEY" + rsaKeyType = "RSA PRIVATE KEY" +) + +// PasswordFunc is the signature for passing password while +// PEM encoding/decoding private keys +type PasswordFunc func() ([]byte, error) + +// NoPassword should be used when the private key need not be encrypted +var NoPassword = func() ([]byte, error) { + return nil, nil +} + +// EncodePrivateKey PEM encodes private key +// when password is not empty private key is encrypted with password +func EncodePrivateKey(privKey crypto.PrivateKey, f PasswordFunc) ([]byte, error) { + password, err := f() + if err != nil { + return nil, fmt.Errorf("unable to get password %s", err.Error()) + } + + switch privKey.(type) { + case *ecdsa.PrivateKey: + ecPrivKey := privKey.(*ecdsa.PrivateKey) + b, err := x509.MarshalECPrivateKey(ecPrivKey) + if err != nil { + return nil, err + } + + var p *pem.Block + + if len(password) == 0 { + p = &pem.Block{ + Type: ecKeyType, + Bytes: b, + } + } else { + p, err = x509.EncryptPEMBlock(rand.Reader, ecKeyType, b, password, x509.PEMCipherAES256) + if err != nil { + return nil, err + } + } + return pem.EncodeToMemory(p), nil + case *rsa.PrivateKey: + rsaPrivKey := privKey.(*rsa.PrivateKey) + b := x509.MarshalPKCS1PrivateKey(rsaPrivKey) + + var p *pem.Block + + if len(password) == 0 { + p = &pem.Block{ + Type: rsaKeyType, + Bytes: b, + } + } else { + p, err = x509.EncryptPEMBlock(rand.Reader, rsaKeyType, b, password, x509.PEMCipherAES256) + if err != nil { + return nil, err + } + } + return pem.EncodeToMemory(p), nil + default: + return nil, fmt.Errorf("unsupported private key %T", privKey) + + } + +} + +// DecodePrivateKey decodes PEM encoded private key +// when PasswordFunc is provied private key is decrypted with password +func DecodePrivateKey(privKey []byte, f PasswordFunc) (crypto.PrivateKey, error) { + p, err := decodePEM(privKey) + if err != nil { + return nil, err + } + + password, err := f() + if err != nil { + return nil, err + } + + var b []byte + + switch { + case x509.IsEncryptedPEMBlock(p): + b, err = x509.DecryptPEMBlock(p, password) + if err != nil { + fmt.Print("DecryptPEMBlock here is the error", err.Error()) + return nil, err + } + default: + b = p.Bytes + } + + fmt.Print("p.Type", p.Type) + + switch p.Type { + case ecKeyType: + return x509.ParseECPrivateKey(b) + case rsaKeyType: + return x509.ParsePKCS1PrivateKey(b) + default: + return nil, fmt.Errorf("type %s is not suported", p.Type) + } + +} + +// DecryptPrivateKeyAsPem returns a decrypted private key in PEM encoding +func DecryptPrivateKeyAsPem(privKey []byte, f PasswordFunc) ([]byte, error) { + pk, err := DecodePrivateKey(privKey, f) + if err != nil { + return nil, err + } + + return EncodePrivateKey(pk, NoPassword) +} + +// GenerateECDSAPrivateKey generates new ECDSA private key +func GenerateECDSAPrivateKey() (*ecdsa.PrivateKey, error) { + ecKey, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader) + if err != nil { + return nil, err + } + + return ecKey, err + +} diff --git a/components/common/pkg/sentry/cryptoutil/key_test.go b/components/common/pkg/sentry/cryptoutil/key_test.go new file mode 100644 index 0000000..d02bb0f --- /dev/null +++ b/components/common/pkg/sentry/cryptoutil/key_test.go @@ -0,0 +1,36 @@ +package cryptoutil + +import ( + "reflect" + "testing" +) + +func TestEncryptDecryptPrivateKey(t *testing.T) { + privKey, err := GenerateECDSAPrivateKey() + + if err != nil { + t.Error(err) + return + } + + pf := func() ([]byte, error) { + return []byte(`pass123`), nil + } + + enc, err := EncodePrivateKey(privKey, pf) + if err != nil { + t.Error(err) + return + } + + privKey1, err := DecodePrivateKey(enc, pf) + if err != nil { + t.Error(err) + return + } + + if !reflect.DeepEqual(privKey1, privKey) { + t.Error("expected same key") + } + +} diff --git a/components/common/pkg/sentry/cryptoutil/signer.go b/components/common/pkg/sentry/cryptoutil/signer.go new file mode 100644 index 0000000..acf79f5 --- /dev/null +++ b/components/common/pkg/sentry/cryptoutil/signer.go @@ -0,0 +1,204 @@ +package cryptoutil + +import ( + "crypto" + "crypto/rand" + "crypto/x509" + "crypto/x509/pkix" + "fmt" + "net" + "strings" + "time" +) + +const ( + defaultCertValidity = time.Hour * 24 * 365 * 10 +) + +// Signer is the interface for signing pem encoded CSR +type Signer interface { + Sign(csr []byte) ([]byte, error) +} + +// Options is the options used to construct signer +type options struct { + IsClient bool + IsServer bool + CAKeyDecrypt PasswordFunc + CSRSubjectValidate []SubjectValidateFunc + CertValidity time.Duration + AltNames []string + IPAddress []string +} + +// Option is the functional arg for setting options +type Option func(*options) + +// WithClient is used to sign client certs +func WithClient() Option { + return func(o *options) { + o.IsClient = true + } +} + +// WithServer is used to sign server certs +func WithServer() Option { + return func(o *options) { + o.IsServer = true + } +} + +// WithCAKeyDecrypt passes the password function to decrypt ca key +func WithCAKeyDecrypt(pf PasswordFunc) Option { + return func(o *options) { + o.CAKeyDecrypt = pf + } +} + +// WithCSRSubjectValidate is used to validate subject of CSR +func WithCSRSubjectValidate(svf SubjectValidateFunc) Option { + return func(o *options) { + o.CSRSubjectValidate = append(o.CSRSubjectValidate, svf) + } +} + +// WithCertValidity makes the issued certificate expire after the duration +func WithCertValidity(d time.Duration) Option { + return func(o *options) { + o.CertValidity = d + } +} + +// WithAltName adds subject alt name to the signed certificate +func WithAltName(dns string) Option { + return func(o *options) { + o.AltNames = append(o.AltNames, dns) + } +} + +// WithIPAddress adds ip address to the signed certificate +func WithIPAddress(ip string) Option { + return func(o *options) { + o.IPAddress = append(o.IPAddress, ip) + } +} + +type signer struct { + ca *x509.Certificate + key crypto.PrivateKey + opts *options +} + +func (s *signer) Sign(csr []byte) ([]byte, error) { + cr, err := DecodeCSR(csr) + if err != nil { + return nil, err + } + + for _, svf := range s.opts.CSRSubjectValidate { + if err = svf(cr.Subject); err != nil { + return nil, err + } + } + template := &x509.Certificate{ + SerialNumber: getSerialNumber(), + Issuer: s.ca.Subject, + Subject: cr.Subject, + NotBefore: time.Now(), + NotAfter: time.Now().Add(s.opts.CertValidity), + //ExtKeyUsage: []x509.ExtKeyUsage{x509.ExtKeyUsageClientAuth}, + KeyUsage: x509.KeyUsageDigitalSignature | x509.KeyUsageKeyEncipherment, + } + + if s.opts.IsClient { + template.ExtKeyUsage = append(template.ExtKeyUsage, x509.ExtKeyUsageClientAuth) + } + if s.opts.IsServer { + template.ExtKeyUsage = append(template.ExtKeyUsage, x509.ExtKeyUsageServerAuth) + } + + for _, altName := range s.opts.AltNames { + template.DNSNames = append(template.DNSNames, altName) + } + + for _, altIP := range s.opts.IPAddress { + ip := net.ParseIP(altIP) + if ip == nil { + return nil, fmt.Errorf("invalid ip address %s", altIP) + } + template.IPAddresses = append(template.IPAddresses, ip) + } + + // sign the certificate + b, err := x509.CreateCertificate(rand.Reader, template, s.ca, cr.PublicKey, s.key) + if err != nil { + err = fmt.Errorf("unable to create certificate %s", err.Error()) + return nil, err + } + + return EncodeCert(b), nil +} + +// SubjectValidateFunc validates the subject of CSR before signing the request +type SubjectValidateFunc func(subject pkix.Name) error + +// NoSubjectValidate ignores subject validation of CSR +var NoSubjectValidate = func(subject pkix.Name) error { + return nil +} + +// CNShouldBe validates if CommonName of CSR is same as the passed CN +var CNShouldBe = func(cn string) SubjectValidateFunc { + return func(subject pkix.Name) error { + if subject.CommonName != cn { + return fmt.Errorf("expected CN %s got %s", cn, subject.CommonName) + } + return nil + } +} + +// CNShouldBeStar validates if CommonName of CSR is same as the passed CN *.domain +var CNShouldBeStar = func(cn string) SubjectValidateFunc { + return func(subject pkix.Name) error { + if subject.CommonName[0] != '*' && subject.CommonName != cn { + return fmt.Errorf("expected CN %s got %s", cn, subject.CommonName) + } + + sfx := subject.CommonName[1:] + if !strings.HasSuffix(cn, sfx) { + return fmt.Errorf("expected CN %s got %s", cn, subject.CommonName) + } + + return nil + } +} + +// NewSigner return a CSR signer for given PEM encoded CA cert and key +func NewSigner(cert, key []byte, opts ...Option) (Signer, error) { + + signerOpts := &options{} + for _, opt := range opts { + opt(signerOpts) + } + + if signerOpts.CAKeyDecrypt == nil { + signerOpts.CAKeyDecrypt = NoPassword + } + + // if cert validit + if signerOpts.CertValidity == 0 { + signerOpts.CertValidity = defaultCertValidity + } + + ca, err := DecodeCert(cert) + if err != nil { + return nil, err + } + + privKey, err := DecodePrivateKey(key, signerOpts.CAKeyDecrypt) + if err != nil { + return nil, err + } + + return &signer{ca, privKey, signerOpts}, nil +} diff --git a/components/common/pkg/sentry/cryptoutil/signer_test.go b/components/common/pkg/sentry/cryptoutil/signer_test.go new file mode 100644 index 0000000..34ba1f4 --- /dev/null +++ b/components/common/pkg/sentry/cryptoutil/signer_test.go @@ -0,0 +1,50 @@ +package cryptoutil + +import ( + "crypto/x509/pkix" + "testing" +) + +func TestSigner(t *testing.T) { + certBytes, keyBytes, err := GenerateCA(pkix.Name{ + CommonName: "Rafay Sentry Bootstrap CA", + Organization: []string{"Rafay Systems"}, + Country: []string{"USA"}, + Province: []string{"California"}, + Locality: []string{"Sunnyvale"}, + }, NoPassword) + if err != nil { + t.Error(err) + return + } + + signer, err := NewSigner(certBytes, keyBytes) + if err != nil { + t.Error(err) + return + } + + privKey, err := GenerateECDSAPrivateKey() + if err != nil { + t.Error(err) + return + } + + csr, err := CreateCSR(pkix.Name{ + CommonName: "test-token", + }, privKey) + + if err != nil { + t.Error(err) + return + } + + signed, err := signer.Sign(csr) + if err != nil { + t.Error(err) + return + } + + t.Log(string(signed)) + +} diff --git a/components/common/pkg/sentry/peering/peering.go b/components/common/pkg/sentry/peering/peering.go new file mode 100644 index 0000000..23edb86 --- /dev/null +++ b/components/common/pkg/sentry/peering/peering.go @@ -0,0 +1,325 @@ +package peering + +import ( + "context" + "math/rand" + "regexp" + "time" + + "github.com/RafaySystems/rcloud-base/components/common/pkg/log" + sentryrpc "github.com/RafaySystems/rcloud-base/components/common/proto/rpc/sentry" + "github.com/dgraph-io/ristretto" +) + +var ( + _log = log.GetLogger() +) + +//RelayClusterConnectionInfo relay conn info +type RelayClusterConnectionInfo struct { + Relayuuid string + Relayip string +} + +type OnEvict = func(item *ristretto.Item) + +// InitPeerCache initialize the cache to store dialin cluster-connection +// information of peers. When a dialin miss happens look into this cache +// to find the peer IP address to forward the user connection. +func InitPeerCache(evict OnEvict) (*ristretto.Cache, error) { + return ristretto.NewCache(&ristretto.Config{ + NumCounters: 1e7, // Num keys to track frequency of (10M). + MaxCost: 1 << 30, // Maximum cost of cache (1GB). + BufferItems: 64, // Number of keys per Get buffer. + OnEvict: evict, + }) +} + +// InsertPeerCache inserts the value to cache +func InsertPeerCache(cache *ristretto.Cache, expiry time.Duration, key, value interface{}) bool { + return cache.SetWithTTL(key, value, 100, expiry) +} + +// GetPeerCache get value from cache and if more than 1 +// rnadomly select the peer +func GetPeerCache(cache *ristretto.Cache, key interface{}) (string, bool) { + value, found := cache.Get(key) + if found { + if value == nil { + return "", false + } + cacheItems := value.([]RelayClusterConnectionInfo) + cnt := len(cacheItems) + if cnt > 1 { + rand.Seed(time.Now().UnixNano()) + min := 0 + max := cnt - 1 + indx := rand.Intn(max-min+1) + min + return cacheItems[indx].Relayip, found + } + return cacheItems[0].Relayip, found + } + return "", found +} + +// sends periodic heartbeats to core service +func helloRPCSend(ctx context.Context, stream sentryrpc.RelayPeerService_RelayPeerHelloRPCClient, interval time.Duration, relayUUID string, ip func() string) { + _log.Infow("send first hello") + msg := &sentryrpc.PeerHelloRequest{ + Relayuuid: relayUUID, + Relayip: ip(), + } + // send first hello message + err := stream.Send(msg) + if err != nil { + _log.Errorw("failed to send hello message", "error", err) + return + } + + tick := time.NewTicker(interval) + defer tick.Stop() + +helloRPCSendLoop: + for { + select { + case <-ctx.Done(): + stream.CloseSend() + break helloRPCSendLoop + case <-tick.C: + err := stream.Send(msg) + if err != nil { + _log.Errorw("failed to send hello message", err) + break helloRPCSendLoop + } + } + } + _log.Debugw("Exit: helloRPCSendLoop") +} + +//ClientHelloRPC will handle periodic heartbeat messages between relay and the core service. +func ClientHelloRPC(ctx context.Context, stream sentryrpc.RelayPeerService_RelayPeerHelloRPCClient, interval time.Duration, relayUUID string, ip func() string) { + + go helloRPCSend(ctx, stream, interval, relayUUID, ip) + + for { + in, err := stream.Recv() + if err != nil { + _log.Errorw("helloRPC stream recv error", err) + stream.CloseSend() + break + } + _log.Debugw("recvd hello resp from service", + "serviceip", in.GetServiceip(), + "serviceuuid", in.GetServiceuuid(), + ) + } + + _log.Debugw("stopping helloRPC routine") +} + +//send loop of probe rpc. recvs clustersni from PeerProbeChanel and sends to core service +func probeRPCSend(ctx context.Context, stream sentryrpc.RelayPeerService_RelayPeerProbeRPCClient, relayUUID string, peerProbeChanel chan string) { +probeRPCSendLoop: + for { + select { + case clustersni := <-peerProbeChanel: + _log.Debugw("probeRPCSend", "clustersni", clustersni) + msg := &sentryrpc.PeerProbeRequest{ + Relayuuid: relayUUID, + Clustersni: clustersni, + } + err := stream.Send(msg) + if err != nil { + _log.Errorw( + "failed to send probe message for ", + "clustersni", clustersni, + "error", err, + ) + stream.CloseSend() + break probeRPCSendLoop + } + case <-ctx.Done(): + stream.CloseSend() + break probeRPCSendLoop + } + + } + _log.Debugw("exit: probeRPCSendLoop") +} + +// ClientProbeRPC will manage the probes. +// When a relay neeed to probe for connections for a cluster +// it will add a probe message to probe channel. The probe rpc +// will send that message to probe core service. When a probe response +// get inserted to peerCache. +func ClientProbeRPC(ctx context.Context, stream sentryrpc.RelayPeerService_RelayPeerProbeRPCClient, pcache *ristretto.Cache, relayUUID string, expiry time.Duration, peerProbeChanel chan string, ip func() string) { + //send message with empty cluster sni to init the chanl + msg := &sentryrpc.PeerProbeRequest{ + Relayuuid: relayUUID, + Clustersni: "", + } + + err := stream.Send(msg) + if err != nil { + stream.CloseSend() + return + } + _log.Debugw("probeRPC send first", "msg", msg) + + go probeRPCSend(ctx, stream, relayUUID, peerProbeChanel) + + //probe response recv loop will process the response + //and push it into peer cache + for { + resp, err := stream.Recv() + if err != nil { + stream.CloseSend() + break + } + + clustersni := resp.GetClustersni() + items := resp.GetItems() + if clustersni != "" && items != nil && len(items) > 0 { + cachevalue := []RelayClusterConnectionInfo{} + //prepare cachevalue + for _, item := range items { + matched, err := regexp.Match(relayUUID, []byte(item.Relayuuid)) + if err == nil && matched { + _log.Errorw("skip duplicate probe resp", + "relayuuid", relayUUID, + "recvd-relayuuid", item.Relayuuid, + ) + //uuid is same as this relay skip this entry + continue + } + + ipAddr := ip() + if ipAddr != "" && ipAddr == item.Relayip { + _log.Errorw("skip duplicate probe resp", "ip address", item.Relayip) + //ip is same as this relay skip this entry + continue + } + + v := RelayClusterConnectionInfo{item.Relayuuid, item.Relayip} + cachevalue = append(cachevalue, v) + } + + _log.Infow( + "cache probeRPC response", + "key", clustersni, + "value", cachevalue, + ) + //insert to peer cache + if !InsertPeerCache(pcache, expiry, clustersni, cachevalue) { + _log.Errorw( + "failed cache probeRPC response", + "key", clustersni, + "value", cachevalue, + ) + } + } else { + _log.Errorw( + "prob response with empty items for ", clustersni, + ) + } + } + + _log.Debug( + "stopping probeRPC routine", + ) +} + +// ClientSurveyRPC will handle the survey RPC. +// When a relay neeed to probe for connections for a cluster +// it will message to probe core service. The service then sends +// survey to all the connected relays (survey-request). +// On survey request, the relay will lookup its local-dialin-map +// and reply to core if connection from the given cluster is available. +func ClientSurveyRPC(ctx context.Context, stream sentryrpc.RelayPeerService_RelayPeerSurveyRPCClient, relayUUID string, ip func() string, dialinlookup func(string) int) { + var relayIP string + + relayIP = ip() + + //Send a empty clustersni meesage to init the channel + msg := &sentryrpc.PeerSurveyResponse{ + Relayuuid: relayUUID, + Relayip: relayIP, + Clustersni: "", + } + + err := stream.Send(msg) + if err != nil { + stream.CloseSend() + return + } + + _log.Debugw("surveyRPC send first", "msg", msg) + go func() { + surveyRPCStremWatch: + for { + select { + case <-ctx.Done(): + stream.CloseSend() + break surveyRPCStremWatch + } + } + }() + + //survey request recv loop will process the survey requests + for { + + surveyReq, err := stream.Recv() + if err != nil { + stream.CloseSend() + break + } + + clustersni := surveyReq.GetClustersni() + if clustersni == "" { + _log.Errorw( + "prob response with empty items for ", + "clustersni", clustersni, + ) + continue + } + + //lookup the local dialin table for connections\ + cnt := dialinlookup(clustersni) + _log.Infow( + "survey lookup", + "key", clustersni, + "count", cnt, + ) + + if relayIP == "" { + _log.Errorw( + "survey failed to get relay ip", + "key", clustersni, + ) + continue + } + + if cnt > 0 { + msg := &sentryrpc.PeerSurveyResponse{ + Relayuuid: relayUUID, + Relayip: relayIP, + Clustersni: clustersni, + } + err = stream.Send(msg) + if err != nil { + _log.Errorw( + "survey send response failed", + "key", clustersni, + "error", err, + ) + stream.CloseSend() + break + } + } + + } + + _log.Debug( + "stopping probeRPC routine", + ) +} diff --git a/components/common/pkg/sentry/peering/util.go b/components/common/pkg/sentry/peering/util.go new file mode 100644 index 0000000..09ac74c --- /dev/null +++ b/components/common/pkg/sentry/peering/util.go @@ -0,0 +1,47 @@ +package peering + +import ( + "crypto/tls" + "crypto/x509" + "io/ioutil" + "net" +) + +//ClientTLSConfig sets tls config +func ClientTLSConfig(tlsCrt string, tlsKey string, rootCA string, addr string) (*tls.Config, error) { + + cert, err := tls.LoadX509KeyPair(tlsCrt, tlsKey) + if err != nil { + return nil, err + } + + var roots *x509.CertPool + if rootCA != "" { + roots = x509.NewCertPool() + rootPEM, err := ioutil.ReadFile(rootCA) + if err != nil { + return nil, err + } + if ok := roots.AppendCertsFromPEM(rootPEM); !ok { + return nil, err + } + } + + host, _, err := net.SplitHostPort(addr) + if err != nil { + return nil, err + } + + return &tls.Config{ + ServerName: host, + Certificates: []tls.Certificate{cert}, + InsecureSkipVerify: roots == nil, + RootCAs: roots, + SessionTicketsDisabled: true, + MinVersion: tls.VersionTLS12, + CipherSuites: []uint16{ + tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, + tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256}, + PreferServerCipherSuites: true, + }, nil +} diff --git a/components/common/pkg/sentry/register/register.go b/components/common/pkg/sentry/register/register.go new file mode 100644 index 0000000..54d4e8c --- /dev/null +++ b/components/common/pkg/sentry/register/register.go @@ -0,0 +1,317 @@ +package register + +import ( + "context" + "crypto/x509" + "crypto/x509/pkix" + "encoding/base64" + "fmt" + "net/http" + "os" + "strings" + + "github.com/RafaySystems/rcloud-base/components/common/pkg/sentry/cryptoutil" + sentryrpc "github.com/RafaySystems/rcloud-base/components/common/proto/rpc/sentry" + commonv3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/commonpb/v3" + "github.com/RafaySystems/rcloud-base/components/common/proto/types/sentry" + "github.com/pkg/errors" + "github.com/rs/xid" + + bootstrapclientv2 "github.com/RafaySystems/rcloud-base/components/common/api/def/clients/sentry/client" + bootstrapapiv2 "github.com/RafaySystems/rcloud-base/components/common/api/def/clients/sentry/client/bootstrap" + + "github.com/RafaySystems/rcloud-base/components/common/pkg/log" + "github.com/RafaySystems/rcloud-base/components/common/pkg/sentry/util" +) + +var ( + _log = log.GetLogger() +) + +const ( + schemeHTTP = "http" + schemeHTTPS = "https" + schemeGRPC = "grpc" + + modeServer = "server" + modeClient = "client" +) + +// Config is the config used for client registration +type Config struct { + // TemplateToken is token of the template the client is registering to + TemplateToken string + // Scheme is the scheme for talking to the registration endpoint + // accepted schemes http/https/grpc + + // TemplateName is the name of the boostrap template + // it can be passed instead of template token to + // auto register servers + TemplateName string + + Scheme string + + Mode string + + // Addr is the address of the registation endpoint + Addr string + + // ClientID is the unique client identifier + // it can be supplied or generated by the client + // to perform auto registration + ClientID string + + // ClientIP is the ip at which client is reachable + ClientIP string + + // Name of the client + // can be part of the supplied client config or + // generated by the client to perform auto registration + Name string + + // PEM encoded private key used to generate + // CSR for client registration + // If not set private key is generated before registation + // which can be accessed from config + PrivateKey []byte + + // CSR is the certificate signing request + // this is auto generated based on the PrivateKey and Token + CSR []byte + + // Certificate is the certificate signed certificate + // returned by bootstrap service after successful registration + Certificate []byte + + // CACertificate is the CA Certificate of the Issuer returned by + // the bootstrap service after successful registration + CACertificate []byte + + // ServerHost is the host the server + ServerHost string + + // ServerPort is port the registered server should listen on + // it is returned after registration + ServerPort int +} + +func registerHTTP(ctx context.Context, config *Config) error { + + tc := &bootstrapclientv2.TransportConfig{ + Host: config.Addr, + BasePath: "/", + Schemes: []string{config.Scheme}, + } + + bc := bootstrapclientv2.NewHTTPClientWithConfig(nil, tc) + + transport := http.DefaultTransport.(*http.Transport).Clone() + + if bootstrapCA := os.Getenv("BOOTSTRAP_CA_CERT"); strings.TrimSpace(bootstrapCA) != "" { + _log.Infow("using rootCA for bootstrap") + rootCAs := x509.NewCertPool() + decodedCA, err := base64.StdEncoding.DecodeString(bootstrapCA) + if err != nil { + err = errors.Wrap(err, "unable to decode bootstrap CA") + return err + } + if ok := rootCAs.AppendCertsFromPEM(decodedCA); !ok { + err = errors.New("unable to append bootstrap CA to cert pool") + return err + } + transport.TLSClientConfig.RootCAs = rootCAs + } else if insecure := os.Getenv("ALLOW_INSECURE_BOOTSTRAP"); strings.TrimSpace(insecure) == "true" { + _log.Infow("using InsecureSkipVerify for bootstrap") + transport.TLSClientConfig.InsecureSkipVerify = true + } + + httpClient := &http.Client{ + Transport: transport, + } + + resp, err := bc.Bootstrap.BootstrapRegisterBootstrapAgent(&bootstrapapiv2.BootstrapRegisterBootstrapAgentParams{ + Context: ctx, + TemplateToken: fmt.Sprintf("template/%s", config.TemplateToken), + Body: bootstrapapiv2.BootstrapRegisterBootstrapAgentBody{ + Token: config.ClientID, + Csr: config.CSR, + IPAddress: config.ClientIP, + Name: config.Name, + }, + HTTPClient: httpClient, + }, nil) + + if err != nil { + fmt.Println(err) + return err + } + + config.Certificate = resp.Payload.Certificate + config.CACertificate = resp.Payload.CaCertificate + + return nil +} + +func registerGRPC(ctx context.Context, config *Config) error { + sp := sentryrpc.NewSentryPool(config.Addr, 1) + + spc, err := sp.NewClient(ctx) + if err != nil { + return err + } + + // if mode is server + // fetch host from template + if config.Mode == modeServer { + template, err := spc.GetBootstrapAgentTemplate(ctx, &sentry.BootstrapAgentTemplate{ + Metadata: &commonv3.Metadata{ + Name: config.TemplateName, + }, + }) + if err != nil { + return err + } + + // Only for external services + for _, host := range template.Spec.Hosts { + if host.Type == sentry.BootstrapTemplateHostType_HostTypeExternal { + config.ServerHost, config.ServerPort = util.ParseAddr(host.Host) + } + } + + privKey, err := cryptoutil.DecodePrivateKey(config.PrivateKey, cryptoutil.NoPassword) + if err != nil { + return err + } + + csr, err := cryptoutil.CreateCSR(pkix.Name{ + CommonName: template.Metadata.Description, + Country: []string{"USA"}, + Organization: []string{"Rafay Systems Inc"}, + OrganizationalUnit: []string{template.Metadata.Description}, + Province: []string{"California"}, + Locality: []string{"Sunnyvale"}, + }, privKey) + if err != nil { + return err + } + + config.CSR = csr + } + + if config.TemplateToken == "" { + config.TemplateToken = "template/-" + } + + resp, err := spc.RegisterBootstrapAgent(ctx, &sentryrpc.RegisterAgentRequest{ + TemplateToken: config.TemplateToken, + TemplateName: config.TemplateName, + Csr: config.CSR, + Name: config.Name, + IpAddress: config.ClientIP, + Token: config.ClientID, + }) + if err != nil { + return err + } + + config.CACertificate = resp.CaCertificate + config.Certificate = resp.Certificate + + return nil +} + +func prepareConfig(config *Config) error { + if config.Addr == "" { + return fmt.Errorf("empty registration Addr not allowed") + } + + switch config.Scheme { + case schemeHTTP, schemeHTTPS, schemeGRPC: + case "": + default: + return fmt.Errorf("invalid scheme %s", config.Scheme) + } + + if config.Scheme == "" && strings.HasPrefix(config.Addr, "localhost") { + config.Scheme = schemeHTTP + } + + if config.Scheme == "" && strings.Index(config.Addr, "rafay.local") > 0 { + config.Scheme = schemeHTTP + } + + if config.Scheme == "" { + return fmt.Errorf("empty Schema not allowed") + } + + switch config.Mode { + case modeServer, modeClient: + case "": + default: + return fmt.Errorf("invalid mode %s", config.Mode) + } + + if config.Mode == "" { + config.Mode = modeClient + } + + if config.TemplateToken == "" && config.Mode == modeClient { + return fmt.Errorf("TemplateToken cannot be empty") + } + + if config.PrivateKey == nil { + privKey, err := cryptoutil.GenerateECDSAPrivateKey() + if err != nil { + return err + } + + key, err := cryptoutil.EncodePrivateKey(privKey, cryptoutil.NoPassword) + if err != nil { + return err + } + + config.PrivateKey = key + + } + + if config.ClientID == "" { + config.ClientID = xid.New().String() + } + + // for server csr is generated from host of the template + if config.CSR == nil && config.Mode == modeClient { + privKey, err := cryptoutil.DecodePrivateKey(config.PrivateKey, cryptoutil.NoPassword) + if err != nil { + return err + } + + csr, err := cryptoutil.CreateCSR(pkix.Name{ + CommonName: config.ClientID, + OrganizationalUnit: []string{config.TemplateToken}, + }, privKey) + if err != nil { + return err + } + + config.CSR = csr + } + + return nil +} + +// Register registers in bootstrap service +func Register(ctx context.Context, config *Config) error { + err := prepareConfig(config) + if err != nil { + return err + } + + switch config.Scheme { + case schemeHTTP, schemeHTTPS: + err = registerHTTP(ctx, config) + case schemeGRPC: + err = registerGRPC(ctx, config) + } + return err +} diff --git a/components/common/pkg/sentry/register/register_test.go b/components/common/pkg/sentry/register/register_test.go new file mode 100644 index 0000000..a1761b9 --- /dev/null +++ b/components/common/pkg/sentry/register/register_test.go @@ -0,0 +1,7 @@ +package register_test + +import "testing" + +func TestRegister(t *testing.T) { + +} diff --git a/components/common/pkg/sentry/util/addr.go b/components/common/pkg/sentry/util/addr.go new file mode 100644 index 0000000..e14d377 --- /dev/null +++ b/components/common/pkg/sentry/util/addr.go @@ -0,0 +1,17 @@ +package util + +import ( + "strconv" + "strings" +) + +// ParseAddr parses addr into host and port +func ParseAddr(addr string) (host string, port int) { + idx := strings.Index(addr, ":") + if idx >= 0 { + host = addr[0:idx] + p, _ := strconv.ParseInt(addr[idx+1:], 10, 64) + port = int(p) + } + return +} diff --git a/components/common/pkg/sentry/util/util.go b/components/common/pkg/sentry/util/util.go new file mode 100644 index 0000000..a6bd692 --- /dev/null +++ b/components/common/pkg/sentry/util/util.go @@ -0,0 +1,113 @@ +package util + +import ( + "fmt" + "strconv" + "strings" +) + +func getAlterString(v int) string { + s := strconv.Itoa(v) + return "-" + s +} + +func stripCtlFromBytes(inputStr string) string { + str := strings.ToLower(inputStr) + runes := []rune(str) + var ret string + for i := 0; i < len(runes); i++ { + ascii := int(runes[i]) + if ascii < 48 || (ascii > 57) && (ascii < 97) || (ascii > 122) { + ret = ret + getAlterString(ascii) + } else { + s := rune(ascii) + ret = ret + string(s) + } + } + return ret +} + +// SanitizeUsername sanitizes username as a k8s name +func SanitizeUsername(username string) (name string) { + name = strings.ToLower(username) + name = stripCtlFromBytes(name) + if len(name) > 253 { + name = string([]rune(name)[:253]) + } + return +} + +const ( + templatePrefix = "template/" + templatePrefixLen = len(templatePrefix) + clusterPrefix = "cluster/" + clusterPrefixLen = len(clusterPrefix) + userPrefix = "user/" + userPrefixLen = len(userPrefix) + organizationPrefix = "organization/" + organizationPrefixLen = len(organizationPrefix) +) + +// GetTemplateScope returns template scope from url +func GetTemplateScope(templateScope string) (scope string, err error) { + if strings.HasPrefix(templateScope, templatePrefix) { + scope = templateScope[templatePrefixLen:] + return + } + err = fmt.Errorf("invalid template scope %s", templateScope) + + return +} + +// ToTemplateScope converts scope into template scope +func ToTemplateScope(scope string) string { + return fmt.Sprintf("%s%s", templatePrefix, scope) +} + +// GetClusterScope returns cluster scope from url +func GetClusterScope(clusterScope string) (scope string, err error) { + if strings.HasPrefix(clusterScope, clusterPrefix) { + scope = clusterScope[clusterPrefixLen:] + return + } + err = fmt.Errorf("invalid template scope %s", clusterScope) + + return +} + +// ToClusterScope converts scope into cluster scope +func ToClusterScope(scope string) string { + return fmt.Sprintf("%s%s", clusterPrefix, scope) +} + +// GetUserScope returns user scope from url +func GetUserScope(userScope string) (scope string, err error) { + if strings.HasPrefix(userScope, userPrefix) { + scope = userScope[userPrefixLen:] + return + } + err = fmt.Errorf("invalid template scope %s", userScope) + + return +} + +// ToUserScope converts scope into user scope +func ToUserScope(scope string) string { + return fmt.Sprintf("%s%s", userPrefix, scope) +} + +// GetOrganizationScope returns organization scope from url +func GetOrganizationScope(organizationScope string) (scope string, err error) { + if strings.HasPrefix(organizationScope, organizationPrefix) { + scope = organizationScope[organizationPrefixLen:] + return + } + err = fmt.Errorf("invalid template scope %s", organizationScope) + + return +} + +// ToOrganizationScope converts scope into organization scope +func ToOrganizationScope(scope string) string { + return fmt.Sprintf("%s%s", organizationPrefix, scope) +} diff --git a/components/common/proto/rpc/config/internal.go b/components/common/proto/rpc/config/internal.go index b06129b..a7c35f6 100644 --- a/components/common/proto/rpc/config/internal.go +++ b/components/common/proto/rpc/config/internal.go @@ -12,10 +12,12 @@ import ( type ConfigClient interface { Unhealthy() Close() error + OverrideClient } type configClient struct { *grpcpool.ClientConn + *overrideClient } var _ ConfigClient = (*configClient)(nil) @@ -50,5 +52,6 @@ func (p *configPool) NewClient(ctx context.Context) (ConfigClient, error) { } return &configClient{ cc, + &overrideClient{cc: cc}, }, nil } diff --git a/components/common/proto/rpc/config/override.pb.go b/components/common/proto/rpc/config/override.pb.go new file mode 100644 index 0000000..13fcccb --- /dev/null +++ b/components/common/proto/rpc/config/override.pb.go @@ -0,0 +1,1178 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc (unknown) +// source: proto/rpc/config/override.proto + +package config + +import ( + v3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/commonpb/v3" + config "github.com/RafaySystems/rcloud-base/components/common/proto/types/config" + _ "github.com/gogo/protobuf/gogoproto" + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type DeleteOverrideResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *DeleteOverrideResponse) Reset() { + *x = DeleteOverrideResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_rpc_config_override_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteOverrideResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteOverrideResponse) ProtoMessage() {} + +func (x *DeleteOverrideResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_rpc_config_override_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteOverrideResponse.ProtoReflect.Descriptor instead. +func (*DeleteOverrideResponse) Descriptor() ([]byte, []int) { + return file_proto_rpc_config_override_proto_rawDescGZIP(), []int{0} +} + +type ApplyOverrideRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Selector string `protobuf:"bytes,1,opt,name=selector,proto3" json:"selector,omitempty"` + Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` + PartnerID int64 `protobuf:"zigzag64,3,opt,name=partnerID,proto3" json:"partnerID,omitempty"` + OrganizationID int64 `protobuf:"zigzag64,4,opt,name=organizationID,proto3" json:"organizationID,omitempty"` + ProjectID int64 `protobuf:"zigzag64,5,opt,name=projectID,proto3" json:"projectID,omitempty"` + Namespace *config.NamespaceTemplate `protobuf:"bytes,7,opt,name=namespace,proto3" json:"namespace,omitempty"` + SetNamespace bool `protobuf:"varint,8,opt,name=setNamespace,proto3" json:"setNamespace,omitempty"` + AtleastOne bool `protobuf:"varint,9,opt,name=atleastOne,proto3" json:"atleastOne,omitempty"` +} + +func (x *ApplyOverrideRequest) Reset() { + *x = ApplyOverrideRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_rpc_config_override_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ApplyOverrideRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ApplyOverrideRequest) ProtoMessage() {} + +func (x *ApplyOverrideRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_rpc_config_override_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ApplyOverrideRequest.ProtoReflect.Descriptor instead. +func (*ApplyOverrideRequest) Descriptor() ([]byte, []int) { + return file_proto_rpc_config_override_proto_rawDescGZIP(), []int{1} +} + +func (x *ApplyOverrideRequest) GetSelector() string { + if x != nil { + return x.Selector + } + return "" +} + +func (x *ApplyOverrideRequest) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *ApplyOverrideRequest) GetPartnerID() int64 { + if x != nil { + return x.PartnerID + } + return 0 +} + +func (x *ApplyOverrideRequest) GetOrganizationID() int64 { + if x != nil { + return x.OrganizationID + } + return 0 +} + +func (x *ApplyOverrideRequest) GetProjectID() int64 { + if x != nil { + return x.ProjectID + } + return 0 +} + +func (x *ApplyOverrideRequest) GetNamespace() *config.NamespaceTemplate { + if x != nil { + return x.Namespace + } + return nil +} + +func (x *ApplyOverrideRequest) GetSetNamespace() bool { + if x != nil { + return x.SetNamespace + } + return false +} + +func (x *ApplyOverrideRequest) GetAtleastOne() bool { + if x != nil { + return x.AtleastOne + } + return false +} + +type ApplyOverrideResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace *config.NamespaceTemplate `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` +} + +func (x *ApplyOverrideResponse) Reset() { + *x = ApplyOverrideResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_rpc_config_override_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ApplyOverrideResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ApplyOverrideResponse) ProtoMessage() {} + +func (x *ApplyOverrideResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_rpc_config_override_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ApplyOverrideResponse.ProtoReflect.Descriptor instead. +func (*ApplyOverrideResponse) Descriptor() ([]byte, []int) { + return file_proto_rpc_config_override_proto_rawDescGZIP(), []int{2} +} + +func (x *ApplyOverrideResponse) GetNamespace() *config.NamespaceTemplate { + if x != nil { + return x.Namespace + } + return nil +} + +type ProxyConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + HttpProxy string `protobuf:"bytes,1,opt,name=httpProxy,proto3" json:"httpProxy,omitempty"` + HttpsProxy string `protobuf:"bytes,2,opt,name=httpsProxy,proto3" json:"httpsProxy,omitempty"` + NoProxy string `protobuf:"bytes,3,opt,name=noProxy,proto3" json:"noProxy,omitempty"` + ProxyAuth string `protobuf:"bytes,4,opt,name=proxyAuth,proto3" json:"proxyAuth,omitempty"` + AllowInsecureBootstrap bool `protobuf:"varint,5,opt,name=allowInsecureBootstrap,proto3" json:"allowInsecureBootstrap,omitempty"` + Enabled bool `protobuf:"varint,6,opt,name=enabled,proto3" json:"enabled,omitempty"` + BootstrapCA string `protobuf:"bytes,7,opt,name=bootstrapCA,proto3" json:"bootstrapCA,omitempty"` +} + +func (x *ProxyConfig) Reset() { + *x = ProxyConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_rpc_config_override_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ProxyConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ProxyConfig) ProtoMessage() {} + +func (x *ProxyConfig) ProtoReflect() protoreflect.Message { + mi := &file_proto_rpc_config_override_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ProxyConfig.ProtoReflect.Descriptor instead. +func (*ProxyConfig) Descriptor() ([]byte, []int) { + return file_proto_rpc_config_override_proto_rawDescGZIP(), []int{3} +} + +func (x *ProxyConfig) GetHttpProxy() string { + if x != nil { + return x.HttpProxy + } + return "" +} + +func (x *ProxyConfig) GetHttpsProxy() string { + if x != nil { + return x.HttpsProxy + } + return "" +} + +func (x *ProxyConfig) GetNoProxy() string { + if x != nil { + return x.NoProxy + } + return "" +} + +func (x *ProxyConfig) GetProxyAuth() string { + if x != nil { + return x.ProxyAuth + } + return "" +} + +func (x *ProxyConfig) GetAllowInsecureBootstrap() bool { + if x != nil { + return x.AllowInsecureBootstrap + } + return false +} + +func (x *ProxyConfig) GetEnabled() bool { + if x != nil { + return x.Enabled + } + return false +} + +func (x *ProxyConfig) GetBootstrapCA() string { + if x != nil { + return x.BootstrapCA + } + return "" +} + +type AddDefaultOverridesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ClusterName string `protobuf:"bytes,1,opt,name=clusterName,proto3" json:"clusterName,omitempty"` + PartnerID int64 `protobuf:"zigzag64,2,opt,name=partnerID,proto3" json:"partnerID,omitempty"` + OrganizationID int64 `protobuf:"zigzag64,3,opt,name=organizationID,proto3" json:"organizationID,omitempty"` + ProjectID int64 `protobuf:"zigzag64,4,opt,name=projectID,proto3" json:"projectID,omitempty"` + PullSecret string `protobuf:"bytes,5,opt,name=pullSecret,proto3" json:"pullSecret,omitempty"` + ControlAddr string `protobuf:"bytes,6,opt,name=controlAddr,proto3" json:"controlAddr,omitempty"` + ApiAddr string `protobuf:"bytes,7,opt,name=apiAddr,proto3" json:"apiAddr,omitempty"` + Token string `protobuf:"bytes,8,opt,name=token,proto3" json:"token,omitempty"` + V1EdgeMetadata string `protobuf:"bytes,9,opt,name=v1EdgeMetadata,proto3" json:"v1EdgeMetadata,omitempty"` + V1CACert string `protobuf:"bytes,10,opt,name=v1CACert,proto3" json:"v1CACert,omitempty"` + V1WorkloadClientCert string `protobuf:"bytes,11,opt,name=v1WorkloadClientCert,proto3" json:"v1WorkloadClientCert,omitempty"` + V1WorkloadClientKey string `protobuf:"bytes,12,opt,name=v1WorkloadClientKey,proto3" json:"v1WorkloadClientKey,omitempty"` + V1PostgresPassword string `protobuf:"bytes,13,opt,name=v1PostgresPassword,proto3" json:"v1PostgresPassword,omitempty"` + V1CryptoEdgeCert string `protobuf:"bytes,14,opt,name=v1CryptoEdgeCert,proto3" json:"v1CryptoEdgeCert,omitempty"` + V1CryptoEdgeKey string `protobuf:"bytes,15,opt,name=v1CryptoEdgeKey,proto3" json:"v1CryptoEdgeKey,omitempty"` + V1CrypotKMIKey string `protobuf:"bytes,16,opt,name=v1CrypotKMIKey,proto3" json:"v1CrypotKMIKey,omitempty"` + V1EdgeID string `protobuf:"bytes,17,opt,name=v1EdgeID,proto3" json:"v1EdgeID,omitempty"` + V1DebugCert string `protobuf:"bytes,18,opt,name=v1DebugCert,proto3" json:"v1DebugCert,omitempty"` + V1DebugKey string `protobuf:"bytes,19,opt,name=v1DebugKey,proto3" json:"v1DebugKey,omitempty"` + V1ConfigEdgeCert string `protobuf:"bytes,20,opt,name=v1ConfigEdgeCert,proto3" json:"v1ConfigEdgeCert,omitempty"` + V1ConfigEdgeKey string `protobuf:"bytes,21,opt,name=v1ConfigEdgeKey,proto3" json:"v1ConfigEdgeKey,omitempty"` + V1EdgeClientCert string `protobuf:"bytes,22,opt,name=v1EdgeClientCert,proto3" json:"v1EdgeClientCert,omitempty"` + V1EdgeClientKey string `protobuf:"bytes,23,opt,name=v1EdgeClientKey,proto3" json:"v1EdgeClientKey,omitempty"` + V1FluentdAggregatorAddr string `protobuf:"bytes,24,opt,name=v1FluentdAggregatorAddr,proto3" json:"v1FluentdAggregatorAddr,omitempty"` + V1AlertManagerYaml string `protobuf:"bytes,25,opt,name=v1AlertManagerYaml,proto3" json:"v1AlertManagerYaml,omitempty"` + V1DeploymentEnv string `protobuf:"bytes,26,opt,name=v1DeploymentEnv,proto3" json:"v1DeploymentEnv,omitempty"` + V1InfluxDBFQDN string `protobuf:"bytes,27,opt,name=v1InfluxDBFQDN,proto3" json:"v1InfluxDBFQDN,omitempty"` + V1InfluxDBPassword string `protobuf:"bytes,28,opt,name=v1InfluxDBPassword,proto3" json:"v1InfluxDBPassword,omitempty"` + V1PromethuesRelayFQDN string `protobuf:"bytes,29,opt,name=v1PromethuesRelayFQDN,proto3" json:"v1PromethuesRelayFQDN,omitempty"` + V1EdgeDisplayName string `protobuf:"bytes,30,opt,name=v1EdgeDisplayName,proto3" json:"v1EdgeDisplayName,omitempty"` + OrganizationHash string `protobuf:"bytes,31,opt,name=organizationHash,proto3" json:"organizationHash,omitempty"` + PartnerHash string `protobuf:"bytes,32,opt,name=partnerHash,proto3" json:"partnerHash,omitempty"` + OrgDisplayName string `protobuf:"bytes,33,opt,name=orgDisplayName,proto3" json:"orgDisplayName,omitempty"` + PartnerDisplayName string `protobuf:"bytes,34,opt,name=partnerDisplayName,proto3" json:"partnerDisplayName,omitempty"` + V2EventFrmwkCert string `protobuf:"bytes,35,opt,name=v2EventFrmwkCert,proto3" json:"v2EventFrmwkCert,omitempty"` + V2EventFrmwkKey string `protobuf:"bytes,36,opt,name=v2EventFrmwkKey,proto3" json:"v2EventFrmwkKey,omitempty"` + V2EventFrameworkFQDN string `protobuf:"bytes,37,opt,name=V2EventFrameworkFQDN,proto3" json:"V2EventFrameworkFQDN,omitempty"` + ProxyConfig *ProxyConfig `protobuf:"bytes,38,opt,name=proxyConfig,proto3" json:"proxyConfig,omitempty"` + ConnectorPodSpecOverride string `protobuf:"bytes,39,opt,name=connectorPodSpecOverride,proto3" json:"connectorPodSpecOverride,omitempty"` + ConnectorContainerSpecOverride string `protobuf:"bytes,40,opt,name=connectorContainerSpecOverride,proto3" json:"connectorContainerSpecOverride,omitempty"` + IngressControllerOverride string `protobuf:"bytes,41,opt,name=ingressControllerOverride,proto3" json:"ingressControllerOverride,omitempty"` + ClusterType string `protobuf:"bytes,42,opt,name=clusterType,proto3" json:"clusterType,omitempty"` + CniProvider string `protobuf:"bytes,43,opt,name=cniProvider,proto3" json:"cniProvider,omitempty"` +} + +func (x *AddDefaultOverridesRequest) Reset() { + *x = AddDefaultOverridesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_rpc_config_override_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AddDefaultOverridesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddDefaultOverridesRequest) ProtoMessage() {} + +func (x *AddDefaultOverridesRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_rpc_config_override_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AddDefaultOverridesRequest.ProtoReflect.Descriptor instead. +func (*AddDefaultOverridesRequest) Descriptor() ([]byte, []int) { + return file_proto_rpc_config_override_proto_rawDescGZIP(), []int{4} +} + +func (x *AddDefaultOverridesRequest) GetClusterName() string { + if x != nil { + return x.ClusterName + } + return "" +} + +func (x *AddDefaultOverridesRequest) GetPartnerID() int64 { + if x != nil { + return x.PartnerID + } + return 0 +} + +func (x *AddDefaultOverridesRequest) GetOrganizationID() int64 { + if x != nil { + return x.OrganizationID + } + return 0 +} + +func (x *AddDefaultOverridesRequest) GetProjectID() int64 { + if x != nil { + return x.ProjectID + } + return 0 +} + +func (x *AddDefaultOverridesRequest) GetPullSecret() string { + if x != nil { + return x.PullSecret + } + return "" +} + +func (x *AddDefaultOverridesRequest) GetControlAddr() string { + if x != nil { + return x.ControlAddr + } + return "" +} + +func (x *AddDefaultOverridesRequest) GetApiAddr() string { + if x != nil { + return x.ApiAddr + } + return "" +} + +func (x *AddDefaultOverridesRequest) GetToken() string { + if x != nil { + return x.Token + } + return "" +} + +func (x *AddDefaultOverridesRequest) GetV1EdgeMetadata() string { + if x != nil { + return x.V1EdgeMetadata + } + return "" +} + +func (x *AddDefaultOverridesRequest) GetV1CACert() string { + if x != nil { + return x.V1CACert + } + return "" +} + +func (x *AddDefaultOverridesRequest) GetV1WorkloadClientCert() string { + if x != nil { + return x.V1WorkloadClientCert + } + return "" +} + +func (x *AddDefaultOverridesRequest) GetV1WorkloadClientKey() string { + if x != nil { + return x.V1WorkloadClientKey + } + return "" +} + +func (x *AddDefaultOverridesRequest) GetV1PostgresPassword() string { + if x != nil { + return x.V1PostgresPassword + } + return "" +} + +func (x *AddDefaultOverridesRequest) GetV1CryptoEdgeCert() string { + if x != nil { + return x.V1CryptoEdgeCert + } + return "" +} + +func (x *AddDefaultOverridesRequest) GetV1CryptoEdgeKey() string { + if x != nil { + return x.V1CryptoEdgeKey + } + return "" +} + +func (x *AddDefaultOverridesRequest) GetV1CrypotKMIKey() string { + if x != nil { + return x.V1CrypotKMIKey + } + return "" +} + +func (x *AddDefaultOverridesRequest) GetV1EdgeID() string { + if x != nil { + return x.V1EdgeID + } + return "" +} + +func (x *AddDefaultOverridesRequest) GetV1DebugCert() string { + if x != nil { + return x.V1DebugCert + } + return "" +} + +func (x *AddDefaultOverridesRequest) GetV1DebugKey() string { + if x != nil { + return x.V1DebugKey + } + return "" +} + +func (x *AddDefaultOverridesRequest) GetV1ConfigEdgeCert() string { + if x != nil { + return x.V1ConfigEdgeCert + } + return "" +} + +func (x *AddDefaultOverridesRequest) GetV1ConfigEdgeKey() string { + if x != nil { + return x.V1ConfigEdgeKey + } + return "" +} + +func (x *AddDefaultOverridesRequest) GetV1EdgeClientCert() string { + if x != nil { + return x.V1EdgeClientCert + } + return "" +} + +func (x *AddDefaultOverridesRequest) GetV1EdgeClientKey() string { + if x != nil { + return x.V1EdgeClientKey + } + return "" +} + +func (x *AddDefaultOverridesRequest) GetV1FluentdAggregatorAddr() string { + if x != nil { + return x.V1FluentdAggregatorAddr + } + return "" +} + +func (x *AddDefaultOverridesRequest) GetV1AlertManagerYaml() string { + if x != nil { + return x.V1AlertManagerYaml + } + return "" +} + +func (x *AddDefaultOverridesRequest) GetV1DeploymentEnv() string { + if x != nil { + return x.V1DeploymentEnv + } + return "" +} + +func (x *AddDefaultOverridesRequest) GetV1InfluxDBFQDN() string { + if x != nil { + return x.V1InfluxDBFQDN + } + return "" +} + +func (x *AddDefaultOverridesRequest) GetV1InfluxDBPassword() string { + if x != nil { + return x.V1InfluxDBPassword + } + return "" +} + +func (x *AddDefaultOverridesRequest) GetV1PromethuesRelayFQDN() string { + if x != nil { + return x.V1PromethuesRelayFQDN + } + return "" +} + +func (x *AddDefaultOverridesRequest) GetV1EdgeDisplayName() string { + if x != nil { + return x.V1EdgeDisplayName + } + return "" +} + +func (x *AddDefaultOverridesRequest) GetOrganizationHash() string { + if x != nil { + return x.OrganizationHash + } + return "" +} + +func (x *AddDefaultOverridesRequest) GetPartnerHash() string { + if x != nil { + return x.PartnerHash + } + return "" +} + +func (x *AddDefaultOverridesRequest) GetOrgDisplayName() string { + if x != nil { + return x.OrgDisplayName + } + return "" +} + +func (x *AddDefaultOverridesRequest) GetPartnerDisplayName() string { + if x != nil { + return x.PartnerDisplayName + } + return "" +} + +func (x *AddDefaultOverridesRequest) GetV2EventFrmwkCert() string { + if x != nil { + return x.V2EventFrmwkCert + } + return "" +} + +func (x *AddDefaultOverridesRequest) GetV2EventFrmwkKey() string { + if x != nil { + return x.V2EventFrmwkKey + } + return "" +} + +func (x *AddDefaultOverridesRequest) GetV2EventFrameworkFQDN() string { + if x != nil { + return x.V2EventFrameworkFQDN + } + return "" +} + +func (x *AddDefaultOverridesRequest) GetProxyConfig() *ProxyConfig { + if x != nil { + return x.ProxyConfig + } + return nil +} + +func (x *AddDefaultOverridesRequest) GetConnectorPodSpecOverride() string { + if x != nil { + return x.ConnectorPodSpecOverride + } + return "" +} + +func (x *AddDefaultOverridesRequest) GetConnectorContainerSpecOverride() string { + if x != nil { + return x.ConnectorContainerSpecOverride + } + return "" +} + +func (x *AddDefaultOverridesRequest) GetIngressControllerOverride() string { + if x != nil { + return x.IngressControllerOverride + } + return "" +} + +func (x *AddDefaultOverridesRequest) GetClusterType() string { + if x != nil { + return x.ClusterType + } + return "" +} + +func (x *AddDefaultOverridesRequest) GetCniProvider() string { + if x != nil { + return x.CniProvider + } + return "" +} + +type AddDefaultOverridesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *AddDefaultOverridesResponse) Reset() { + *x = AddDefaultOverridesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_rpc_config_override_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AddDefaultOverridesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddDefaultOverridesResponse) ProtoMessage() {} + +func (x *AddDefaultOverridesResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_rpc_config_override_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AddDefaultOverridesResponse.ProtoReflect.Descriptor instead. +func (*AddDefaultOverridesResponse) Descriptor() ([]byte, []int) { + return file_proto_rpc_config_override_proto_rawDescGZIP(), []int{5} +} + +var File_proto_rpc_config_override_proto protoreflect.FileDescriptor + +var file_proto_rpc_config_override_proto_rawDesc = []byte{ + 0x0a, 0x1f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2f, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x14, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x72, 0x70, 0x63, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, + 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x70, + 0x62, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x22, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, + 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x18, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0xb7, 0x02, 0x0a, 0x14, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x4f, 0x76, 0x65, 0x72, + 0x72, 0x69, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x73, + 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, + 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x70, + 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x12, 0x52, 0x09, + 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x49, 0x44, 0x12, 0x26, 0x0a, 0x0e, 0x6f, 0x72, 0x67, + 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x12, 0x52, 0x0e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, + 0x44, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x44, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x12, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x44, 0x12, + 0x47, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x4e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x09, 0x6e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x65, 0x74, 0x4e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, + 0x73, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1e, 0x0a, 0x0a, + 0x61, 0x74, 0x6c, 0x65, 0x61, 0x73, 0x74, 0x4f, 0x6e, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x0a, 0x61, 0x74, 0x6c, 0x65, 0x61, 0x73, 0x74, 0x4f, 0x6e, 0x65, 0x22, 0x60, 0x0a, 0x15, + 0x41, 0x70, 0x70, 0x6c, 0x79, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, + 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, + 0x61, 0x74, 0x65, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0xf7, + 0x01, 0x0a, 0x0b, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1c, + 0x0a, 0x09, 0x68, 0x74, 0x74, 0x70, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x68, 0x74, 0x74, 0x70, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x12, 0x1e, 0x0a, 0x0a, + 0x68, 0x74, 0x74, 0x70, 0x73, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0a, 0x68, 0x74, 0x74, 0x70, 0x73, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x12, 0x18, 0x0a, 0x07, + 0x6e, 0x6f, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, + 0x6f, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x41, + 0x75, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x41, 0x75, 0x74, 0x68, 0x12, 0x36, 0x0a, 0x16, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x49, 0x6e, 0x73, + 0x65, 0x63, 0x75, 0x72, 0x65, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x16, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x49, 0x6e, 0x73, 0x65, 0x63, + 0x75, 0x72, 0x65, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x12, 0x18, 0x0a, 0x07, + 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, + 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, + 0x72, 0x61, 0x70, 0x43, 0x41, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x62, 0x6f, 0x6f, + 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x43, 0x41, 0x22, 0xc1, 0x0e, 0x0a, 0x1a, 0x41, 0x64, 0x64, + 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x61, 0x72, + 0x74, 0x6e, 0x65, 0x72, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x12, 0x52, 0x09, 0x70, 0x61, + 0x72, 0x74, 0x6e, 0x65, 0x72, 0x49, 0x44, 0x12, 0x26, 0x0a, 0x0e, 0x6f, 0x72, 0x67, 0x61, 0x6e, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x12, 0x52, + 0x0e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, + 0x1c, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x44, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x12, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x44, 0x12, 0x1e, 0x0a, + 0x0a, 0x70, 0x75, 0x6c, 0x6c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0a, 0x70, 0x75, 0x6c, 0x6c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x20, 0x0a, + 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x12, + 0x18, 0x0a, 0x07, 0x61, 0x70, 0x69, 0x41, 0x64, 0x64, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x61, 0x70, 0x69, 0x41, 0x64, 0x64, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, + 0x65, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, + 0x26, 0x0a, 0x0e, 0x76, 0x31, 0x45, 0x64, 0x67, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x76, 0x31, 0x45, 0x64, 0x67, 0x65, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1a, 0x0a, 0x08, 0x76, 0x31, 0x43, 0x41, 0x43, + 0x65, 0x72, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x76, 0x31, 0x43, 0x41, 0x43, + 0x65, 0x72, 0x74, 0x12, 0x32, 0x0a, 0x14, 0x76, 0x31, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, + 0x64, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x65, 0x72, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x14, 0x76, 0x31, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x43, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x43, 0x65, 0x72, 0x74, 0x12, 0x30, 0x0a, 0x13, 0x76, 0x31, 0x57, 0x6f, 0x72, + 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4b, 0x65, 0x79, 0x18, 0x0c, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x76, 0x31, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, + 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4b, 0x65, 0x79, 0x12, 0x2e, 0x0a, 0x12, 0x76, 0x31, 0x50, + 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, + 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x76, 0x31, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, + 0x73, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x2a, 0x0a, 0x10, 0x76, 0x31, 0x43, + 0x72, 0x79, 0x70, 0x74, 0x6f, 0x45, 0x64, 0x67, 0x65, 0x43, 0x65, 0x72, 0x74, 0x18, 0x0e, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x10, 0x76, 0x31, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x45, 0x64, 0x67, + 0x65, 0x43, 0x65, 0x72, 0x74, 0x12, 0x28, 0x0a, 0x0f, 0x76, 0x31, 0x43, 0x72, 0x79, 0x70, 0x74, + 0x6f, 0x45, 0x64, 0x67, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, + 0x76, 0x31, 0x43, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x45, 0x64, 0x67, 0x65, 0x4b, 0x65, 0x79, 0x12, + 0x26, 0x0a, 0x0e, 0x76, 0x31, 0x43, 0x72, 0x79, 0x70, 0x6f, 0x74, 0x4b, 0x4d, 0x49, 0x4b, 0x65, + 0x79, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x76, 0x31, 0x43, 0x72, 0x79, 0x70, 0x6f, + 0x74, 0x4b, 0x4d, 0x49, 0x4b, 0x65, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x76, 0x31, 0x45, 0x64, 0x67, + 0x65, 0x49, 0x44, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x76, 0x31, 0x45, 0x64, 0x67, + 0x65, 0x49, 0x44, 0x12, 0x20, 0x0a, 0x0b, 0x76, 0x31, 0x44, 0x65, 0x62, 0x75, 0x67, 0x43, 0x65, + 0x72, 0x74, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x76, 0x31, 0x44, 0x65, 0x62, 0x75, + 0x67, 0x43, 0x65, 0x72, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x76, 0x31, 0x44, 0x65, 0x62, 0x75, 0x67, + 0x4b, 0x65, 0x79, 0x18, 0x13, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x76, 0x31, 0x44, 0x65, 0x62, + 0x75, 0x67, 0x4b, 0x65, 0x79, 0x12, 0x2a, 0x0a, 0x10, 0x76, 0x31, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x45, 0x64, 0x67, 0x65, 0x43, 0x65, 0x72, 0x74, 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x10, 0x76, 0x31, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x64, 0x67, 0x65, 0x43, 0x65, 0x72, + 0x74, 0x12, 0x28, 0x0a, 0x0f, 0x76, 0x31, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x64, 0x67, + 0x65, 0x4b, 0x65, 0x79, 0x18, 0x15, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x76, 0x31, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x45, 0x64, 0x67, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x2a, 0x0a, 0x10, 0x76, + 0x31, 0x45, 0x64, 0x67, 0x65, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x65, 0x72, 0x74, 0x18, + 0x16, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x76, 0x31, 0x45, 0x64, 0x67, 0x65, 0x43, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x43, 0x65, 0x72, 0x74, 0x12, 0x28, 0x0a, 0x0f, 0x76, 0x31, 0x45, 0x64, 0x67, + 0x65, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4b, 0x65, 0x79, 0x18, 0x17, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0f, 0x76, 0x31, 0x45, 0x64, 0x67, 0x65, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4b, 0x65, + 0x79, 0x12, 0x38, 0x0a, 0x17, 0x76, 0x31, 0x46, 0x6c, 0x75, 0x65, 0x6e, 0x74, 0x64, 0x41, 0x67, + 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x18, 0x18, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x17, 0x76, 0x31, 0x46, 0x6c, 0x75, 0x65, 0x6e, 0x74, 0x64, 0x41, 0x67, 0x67, + 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x12, 0x2e, 0x0a, 0x12, 0x76, + 0x31, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x59, 0x61, 0x6d, + 0x6c, 0x18, 0x19, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x76, 0x31, 0x41, 0x6c, 0x65, 0x72, 0x74, + 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x59, 0x61, 0x6d, 0x6c, 0x12, 0x28, 0x0a, 0x0f, 0x76, + 0x31, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x45, 0x6e, 0x76, 0x18, 0x1a, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x76, 0x31, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, + 0x6e, 0x74, 0x45, 0x6e, 0x76, 0x12, 0x26, 0x0a, 0x0e, 0x76, 0x31, 0x49, 0x6e, 0x66, 0x6c, 0x75, + 0x78, 0x44, 0x42, 0x46, 0x51, 0x44, 0x4e, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x76, + 0x31, 0x49, 0x6e, 0x66, 0x6c, 0x75, 0x78, 0x44, 0x42, 0x46, 0x51, 0x44, 0x4e, 0x12, 0x2e, 0x0a, + 0x12, 0x76, 0x31, 0x49, 0x6e, 0x66, 0x6c, 0x75, 0x78, 0x44, 0x42, 0x50, 0x61, 0x73, 0x73, 0x77, + 0x6f, 0x72, 0x64, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x76, 0x31, 0x49, 0x6e, 0x66, + 0x6c, 0x75, 0x78, 0x44, 0x42, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x34, 0x0a, + 0x15, 0x76, 0x31, 0x50, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x75, 0x65, 0x73, 0x52, 0x65, 0x6c, + 0x61, 0x79, 0x46, 0x51, 0x44, 0x4e, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x76, 0x31, + 0x50, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x75, 0x65, 0x73, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x46, + 0x51, 0x44, 0x4e, 0x12, 0x2c, 0x0a, 0x11, 0x76, 0x31, 0x45, 0x64, 0x67, 0x65, 0x44, 0x69, 0x73, + 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, + 0x76, 0x31, 0x45, 0x64, 0x67, 0x65, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, + 0x65, 0x12, 0x2a, 0x0a, 0x10, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x48, 0x61, 0x73, 0x68, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x6f, 0x72, 0x67, + 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x61, 0x73, 0x68, 0x12, 0x20, 0x0a, + 0x0b, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x48, 0x61, 0x73, 0x68, 0x18, 0x20, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x48, 0x61, 0x73, 0x68, 0x12, + 0x26, 0x0a, 0x0e, 0x6f, 0x72, 0x67, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, + 0x65, 0x18, 0x21, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x72, 0x67, 0x44, 0x69, 0x73, 0x70, + 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x12, 0x70, 0x61, 0x72, 0x74, 0x6e, + 0x65, 0x72, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x22, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x12, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x44, 0x69, 0x73, 0x70, + 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2a, 0x0a, 0x10, 0x76, 0x32, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x46, 0x72, 0x6d, 0x77, 0x6b, 0x43, 0x65, 0x72, 0x74, 0x18, 0x23, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x10, 0x76, 0x32, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x46, 0x72, 0x6d, 0x77, 0x6b, 0x43, + 0x65, 0x72, 0x74, 0x12, 0x28, 0x0a, 0x0f, 0x76, 0x32, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x46, 0x72, + 0x6d, 0x77, 0x6b, 0x4b, 0x65, 0x79, 0x18, 0x24, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x76, 0x32, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x46, 0x72, 0x6d, 0x77, 0x6b, 0x4b, 0x65, 0x79, 0x12, 0x32, 0x0a, + 0x14, 0x56, 0x32, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x77, 0x6f, 0x72, + 0x6b, 0x46, 0x51, 0x44, 0x4e, 0x18, 0x25, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x56, 0x32, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x77, 0x6f, 0x72, 0x6b, 0x46, 0x51, 0x44, + 0x4e, 0x12, 0x43, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x18, 0x26, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, + 0x65, 0x76, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x72, + 0x6f, 0x78, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x3a, 0x0a, 0x18, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x6f, 0x72, 0x50, 0x6f, 0x64, 0x53, 0x70, 0x65, 0x63, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, + 0x64, 0x65, 0x18, 0x27, 0x20, 0x01, 0x28, 0x09, 0x52, 0x18, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x6f, 0x72, 0x50, 0x6f, 0x64, 0x53, 0x70, 0x65, 0x63, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, + 0x64, 0x65, 0x12, 0x46, 0x0a, 0x1e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x43, + 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x4f, 0x76, 0x65, 0x72, + 0x72, 0x69, 0x64, 0x65, 0x18, 0x28, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1e, 0x63, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x53, 0x70, + 0x65, 0x63, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, 0x3c, 0x0a, 0x19, 0x69, 0x6e, + 0x67, 0x72, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x4f, + 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x18, 0x29, 0x20, 0x01, 0x28, 0x09, 0x52, 0x19, 0x69, + 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, + 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x18, 0x2a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6e, + 0x69, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x2b, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x63, 0x6e, 0x69, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x22, 0x1d, 0x0a, 0x1b, + 0x41, 0x64, 0x64, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, + 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xd0, 0x09, 0x0a, 0x08, + 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, 0xcb, 0x01, 0x0a, 0x0e, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, 0x20, 0x2e, 0x72, 0x61, + 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x1a, 0x20, 0x2e, + 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x22, + 0x75, 0x92, 0x41, 0x39, 0x4a, 0x37, 0x0a, 0x03, 0x32, 0x30, 0x31, 0x12, 0x30, 0x0a, 0x2e, 0x52, + 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x74, 0x61, 0x73, + 0x6b, 0x73, 0x65, 0x74, 0x20, 0x69, 0x73, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, + 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x66, 0x75, 0x6c, 0x6c, 0x79, 0x2e, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x33, 0x22, 0x2e, 0x2f, 0x76, 0x32, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x6f, 0x76, 0x65, 0x72, 0x72, + 0x69, 0x64, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x99, 0x01, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x4f, 0x76, + 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, 0x20, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, + 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x1a, 0x20, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, + 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x22, 0x46, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x40, 0x12, 0x3e, 0x2f, 0x76, 0x32, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, + 0x64, 0x65, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6e, 0x61, 0x6d, + 0x65, 0x7d, 0x12, 0x8f, 0x01, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, + 0x64, 0x65, 0x73, 0x12, 0x27, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x24, 0x2e, 0x72, + 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x4c, 0x69, + 0x73, 0x74, 0x22, 0x30, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2a, 0x12, 0x28, 0x2f, 0x76, 0x32, 0x2f, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x7b, 0x75, 0x72, 0x6c, 0x53, 0x63, 0x6f, 0x70, 0x65, + 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x2a, 0x7d, 0x2f, 0x6f, 0x76, 0x65, 0x72, + 0x72, 0x69, 0x64, 0x65, 0x12, 0x9f, 0x01, 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, + 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, 0x20, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, + 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x1a, 0x20, 0x2e, 0x72, 0x61, 0x66, 0x61, + 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x22, 0x49, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x43, 0x1a, 0x3e, 0x2f, 0x76, 0x32, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x6f, 0x76, 0x65, 0x72, 0x72, + 0x69, 0x64, 0x65, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6e, 0x61, + 0x6d, 0x65, 0x7d, 0x3a, 0x01, 0x2a, 0x12, 0xe7, 0x01, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, 0x20, 0x2e, 0x72, 0x61, 0x66, 0x61, + 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x1a, 0x2c, 0x2e, 0x72, 0x61, + 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, + 0x70, 0x63, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x84, 0x01, 0x92, 0x41, 0x3b, 0x4a, + 0x39, 0x0a, 0x03, 0x32, 0x30, 0x34, 0x12, 0x32, 0x0a, 0x30, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, + 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x20, 0x69, 0x73, 0x20, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x20, 0x73, 0x75, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x66, 0x75, 0x6c, 0x6c, 0x79, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x40, + 0x2a, 0x3e, 0x2f, 0x76, 0x32, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x70, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, + 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, + 0x12, 0x8e, 0x01, 0x0a, 0x0d, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, + 0x64, 0x65, 0x12, 0x2a, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x4f, + 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, + 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x4f, 0x76, 0x65, 0x72, 0x72, + 0x69, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x1e, 0x22, 0x19, 0x2f, 0x76, 0x32, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, + 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x3a, 0x01, + 0x2a, 0x12, 0xaa, 0x01, 0x0a, 0x13, 0x41, 0x64, 0x64, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, + 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x73, 0x12, 0x30, 0x2e, 0x72, 0x61, 0x66, 0x61, + 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x70, 0x63, + 0x2e, 0x41, 0x64, 0x64, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x4f, 0x76, 0x65, 0x72, 0x72, + 0x69, 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x72, 0x61, + 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, + 0x70, 0x63, 0x2e, 0x41, 0x64, 0x64, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x4f, 0x76, 0x65, + 0x72, 0x72, 0x69, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x22, 0x23, 0x2f, 0x76, 0x32, 0x2f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2f, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x64, 0x65, 0x66, 0x61, + 0x75, 0x6c, 0x74, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x3a, 0x01, 0x2a, 0x42, 0xd8, + 0x04, 0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x70, 0x63, 0x42, 0x0d, 0x4f, 0x76, 0x65, + 0x72, 0x72, 0x69, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x61, 0x66, 0x61, 0x79, 0x53, 0x79, + 0x73, 0x74, 0x65, 0x6d, 0x73, 0x2f, 0x72, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x62, 0x61, 0x73, + 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0xa2, 0x02, 0x04, 0x52, 0x44, 0x43, 0x52, 0xaa, 0x02, 0x14, 0x52, 0x61, + 0x66, 0x61, 0x79, 0x2e, 0x44, 0x65, 0x76, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x52, + 0x70, 0x63, 0xca, 0x02, 0x14, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5c, 0x52, 0x70, 0x63, 0xe2, 0x02, 0x20, 0x52, 0x61, 0x66, 0x61, + 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5c, 0x52, 0x70, 0x63, + 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x17, 0x52, + 0x61, 0x66, 0x61, 0x79, 0x3a, 0x3a, 0x44, 0x65, 0x76, 0x3a, 0x3a, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x3a, 0x3a, 0x52, 0x70, 0x63, 0x92, 0x41, 0xdb, 0x02, 0x12, 0x24, 0x0a, 0x10, 0x4f, 0x76, + 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x20, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x22, 0x0b, + 0x0a, 0x09, 0x52, 0x61, 0x66, 0x61, 0x79, 0x20, 0x44, 0x65, 0x76, 0x32, 0x03, 0x32, 0x2e, 0x30, + 0x2a, 0x01, 0x02, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2f, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x79, 0x61, 0x6d, 0x6c, 0x52, 0x50, 0x0a, 0x03, 0x34, + 0x30, 0x33, 0x12, 0x49, 0x0a, 0x47, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, + 0x68, 0x65, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x64, 0x6f, 0x65, + 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x20, + 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x52, 0x3b, 0x0a, + 0x03, 0x34, 0x30, 0x34, 0x12, 0x34, 0x0a, 0x2a, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, + 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x65, 0x78, 0x69, 0x73, + 0x74, 0x2e, 0x12, 0x06, 0x0a, 0x04, 0x9a, 0x02, 0x01, 0x07, 0x5a, 0x38, 0x0a, 0x25, 0x0a, 0x0a, + 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x41, 0x75, 0x74, 0x68, 0x12, 0x17, 0x08, 0x02, 0x1a, 0x11, + 0x58, 0x2d, 0x52, 0x41, 0x46, 0x41, 0x59, 0x2d, 0x41, 0x50, 0x49, 0x2d, 0x4b, 0x45, 0x59, 0x49, + 0x44, 0x20, 0x02, 0x0a, 0x0f, 0x0a, 0x09, 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, 0x68, + 0x12, 0x02, 0x08, 0x01, 0x62, 0x1f, 0x0a, 0x0e, 0x0a, 0x0a, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, + 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0x0a, 0x0d, 0x0a, 0x09, 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, + 0x75, 0x74, 0x68, 0x12, 0x00, 0xc8, 0xe2, 0x1e, 0x01, 0xd0, 0xe2, 0x1e, 0x01, 0xe0, 0xe2, 0x1e, + 0x01, 0xc0, 0xe3, 0x1e, 0x01, 0xc8, 0xe3, 0x1e, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_proto_rpc_config_override_proto_rawDescOnce sync.Once + file_proto_rpc_config_override_proto_rawDescData = file_proto_rpc_config_override_proto_rawDesc +) + +func file_proto_rpc_config_override_proto_rawDescGZIP() []byte { + file_proto_rpc_config_override_proto_rawDescOnce.Do(func() { + file_proto_rpc_config_override_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_rpc_config_override_proto_rawDescData) + }) + return file_proto_rpc_config_override_proto_rawDescData +} + +var file_proto_rpc_config_override_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_proto_rpc_config_override_proto_goTypes = []interface{}{ + (*DeleteOverrideResponse)(nil), // 0: rafay.dev.config.rpc.DeleteOverrideResponse + (*ApplyOverrideRequest)(nil), // 1: rafay.dev.config.rpc.ApplyOverrideRequest + (*ApplyOverrideResponse)(nil), // 2: rafay.dev.config.rpc.ApplyOverrideResponse + (*ProxyConfig)(nil), // 3: rafay.dev.config.rpc.ProxyConfig + (*AddDefaultOverridesRequest)(nil), // 4: rafay.dev.config.rpc.AddDefaultOverridesRequest + (*AddDefaultOverridesResponse)(nil), // 5: rafay.dev.config.rpc.AddDefaultOverridesResponse + (*config.NamespaceTemplate)(nil), // 6: rafay.dev.types.config.NamespaceTemplate + (*config.Override)(nil), // 7: rafay.dev.types.config.Override + (*v3.QueryOptions)(nil), // 8: rafay.dev.types.common.v3.QueryOptions + (*config.OverrideList)(nil), // 9: rafay.dev.types.config.OverrideList +} +var file_proto_rpc_config_override_proto_depIdxs = []int32{ + 6, // 0: rafay.dev.config.rpc.ApplyOverrideRequest.namespace:type_name -> rafay.dev.types.config.NamespaceTemplate + 6, // 1: rafay.dev.config.rpc.ApplyOverrideResponse.namespace:type_name -> rafay.dev.types.config.NamespaceTemplate + 3, // 2: rafay.dev.config.rpc.AddDefaultOverridesRequest.proxyConfig:type_name -> rafay.dev.config.rpc.ProxyConfig + 7, // 3: rafay.dev.config.rpc.Override.CreateOverride:input_type -> rafay.dev.types.config.Override + 7, // 4: rafay.dev.config.rpc.Override.GetOverride:input_type -> rafay.dev.types.config.Override + 8, // 5: rafay.dev.config.rpc.Override.GetOverrides:input_type -> rafay.dev.types.common.v3.QueryOptions + 7, // 6: rafay.dev.config.rpc.Override.UpdateOverride:input_type -> rafay.dev.types.config.Override + 7, // 7: rafay.dev.config.rpc.Override.DeleteOverride:input_type -> rafay.dev.types.config.Override + 1, // 8: rafay.dev.config.rpc.Override.ApplyOverride:input_type -> rafay.dev.config.rpc.ApplyOverrideRequest + 4, // 9: rafay.dev.config.rpc.Override.AddDefaultOverrides:input_type -> rafay.dev.config.rpc.AddDefaultOverridesRequest + 7, // 10: rafay.dev.config.rpc.Override.CreateOverride:output_type -> rafay.dev.types.config.Override + 7, // 11: rafay.dev.config.rpc.Override.GetOverride:output_type -> rafay.dev.types.config.Override + 9, // 12: rafay.dev.config.rpc.Override.GetOverrides:output_type -> rafay.dev.types.config.OverrideList + 7, // 13: rafay.dev.config.rpc.Override.UpdateOverride:output_type -> rafay.dev.types.config.Override + 0, // 14: rafay.dev.config.rpc.Override.DeleteOverride:output_type -> rafay.dev.config.rpc.DeleteOverrideResponse + 2, // 15: rafay.dev.config.rpc.Override.ApplyOverride:output_type -> rafay.dev.config.rpc.ApplyOverrideResponse + 5, // 16: rafay.dev.config.rpc.Override.AddDefaultOverrides:output_type -> rafay.dev.config.rpc.AddDefaultOverridesResponse + 10, // [10:17] is the sub-list for method output_type + 3, // [3:10] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_proto_rpc_config_override_proto_init() } +func file_proto_rpc_config_override_proto_init() { + if File_proto_rpc_config_override_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_proto_rpc_config_override_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteOverrideResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_rpc_config_override_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ApplyOverrideRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_rpc_config_override_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ApplyOverrideResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_rpc_config_override_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ProxyConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_rpc_config_override_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AddDefaultOverridesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_rpc_config_override_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AddDefaultOverridesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_proto_rpc_config_override_proto_rawDesc, + NumEnums: 0, + NumMessages: 6, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_proto_rpc_config_override_proto_goTypes, + DependencyIndexes: file_proto_rpc_config_override_proto_depIdxs, + MessageInfos: file_proto_rpc_config_override_proto_msgTypes, + }.Build() + File_proto_rpc_config_override_proto = out.File + file_proto_rpc_config_override_proto_rawDesc = nil + file_proto_rpc_config_override_proto_goTypes = nil + file_proto_rpc_config_override_proto_depIdxs = nil +} diff --git a/components/common/proto/rpc/config/override.pb.gw.go b/components/common/proto/rpc/config/override.pb.gw.go new file mode 100644 index 0000000..f0f5aad --- /dev/null +++ b/components/common/proto/rpc/config/override.pb.gw.go @@ -0,0 +1,891 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: proto/rpc/config/override.proto + +/* +Package config is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package config + +import ( + "context" + "io" + "net/http" + + "github.com/RafaySystems/rcloud-base/components/common/proto/types/commonpb/v3" + "github.com/RafaySystems/rcloud-base/components/common/proto/types/config" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + +func request_Override_CreateOverride_0(ctx context.Context, marshaler runtime.Marshaler, client OverrideClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq config.Override + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["metadata.project"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.project") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.project", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.project", err) + } + + msg, err := client.CreateOverride(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Override_CreateOverride_0(ctx context.Context, marshaler runtime.Marshaler, server OverrideServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq config.Override + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["metadata.project"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.project") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.project", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.project", err) + } + + msg, err := server.CreateOverride(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Override_GetOverride_0 = &utilities.DoubleArray{Encoding: map[string]int{"metadata": 0, "project": 1, "name": 2}, Base: []int{1, 1, 1, 2, 0, 0}, Check: []int{0, 1, 2, 2, 3, 4}} +) + +func request_Override_GetOverride_0(ctx context.Context, marshaler runtime.Marshaler, client OverrideClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq config.Override + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["metadata.project"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.project") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.project", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.project", err) + } + + val, ok = pathParams["metadata.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.name", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Override_GetOverride_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetOverride(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Override_GetOverride_0(ctx context.Context, marshaler runtime.Marshaler, server OverrideServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq config.Override + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["metadata.project"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.project") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.project", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.project", err) + } + + val, ok = pathParams["metadata.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.name", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Override_GetOverride_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetOverride(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Override_GetOverrides_0 = &utilities.DoubleArray{Encoding: map[string]int{"urlScope": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_Override_GetOverrides_0(ctx context.Context, marshaler runtime.Marshaler, client OverrideClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq commonv3.QueryOptions + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["urlScope"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "urlScope") + } + + protoReq.UrlScope, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "urlScope", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Override_GetOverrides_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetOverrides(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Override_GetOverrides_0(ctx context.Context, marshaler runtime.Marshaler, server OverrideServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq commonv3.QueryOptions + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["urlScope"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "urlScope") + } + + protoReq.UrlScope, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "urlScope", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Override_GetOverrides_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetOverrides(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Override_UpdateOverride_0(ctx context.Context, marshaler runtime.Marshaler, client OverrideClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq config.Override + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["metadata.project"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.project") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.project", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.project", err) + } + + val, ok = pathParams["metadata.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.name", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.name", err) + } + + msg, err := client.UpdateOverride(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Override_UpdateOverride_0(ctx context.Context, marshaler runtime.Marshaler, server OverrideServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq config.Override + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["metadata.project"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.project") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.project", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.project", err) + } + + val, ok = pathParams["metadata.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.name", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.name", err) + } + + msg, err := server.UpdateOverride(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Override_DeleteOverride_0 = &utilities.DoubleArray{Encoding: map[string]int{"metadata": 0, "project": 1, "name": 2}, Base: []int{1, 1, 1, 2, 0, 0}, Check: []int{0, 1, 2, 2, 3, 4}} +) + +func request_Override_DeleteOverride_0(ctx context.Context, marshaler runtime.Marshaler, client OverrideClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq config.Override + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["metadata.project"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.project") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.project", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.project", err) + } + + val, ok = pathParams["metadata.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.name", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Override_DeleteOverride_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.DeleteOverride(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Override_DeleteOverride_0(ctx context.Context, marshaler runtime.Marshaler, server OverrideServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq config.Override + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["metadata.project"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.project") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.project", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.project", err) + } + + val, ok = pathParams["metadata.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.name", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Override_DeleteOverride_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.DeleteOverride(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Override_ApplyOverride_0(ctx context.Context, marshaler runtime.Marshaler, client OverrideClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ApplyOverrideRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.ApplyOverride(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Override_ApplyOverride_0(ctx context.Context, marshaler runtime.Marshaler, server OverrideServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ApplyOverrideRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ApplyOverride(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Override_AddDefaultOverrides_0(ctx context.Context, marshaler runtime.Marshaler, client OverrideClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq AddDefaultOverridesRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.AddDefaultOverrides(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Override_AddDefaultOverrides_0(ctx context.Context, marshaler runtime.Marshaler, server OverrideServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq AddDefaultOverridesRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.AddDefaultOverrides(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterOverrideHandlerServer registers the http handlers for service Override to "mux". +// UnaryRPC :call OverrideServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterOverrideHandlerFromEndpoint instead. +func RegisterOverrideHandlerServer(ctx context.Context, mux *runtime.ServeMux, server OverrideServer) error { + + mux.Handle("POST", pattern_Override_CreateOverride_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.config.rpc.Override/CreateOverride", runtime.WithHTTPPathPattern("/v2/config/project/{metadata.project}/override")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Override_CreateOverride_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Override_CreateOverride_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Override_GetOverride_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.config.rpc.Override/GetOverride", runtime.WithHTTPPathPattern("/v2/config/project/{metadata.project}/override/{metadata.name}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Override_GetOverride_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Override_GetOverride_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Override_GetOverrides_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.config.rpc.Override/GetOverrides", runtime.WithHTTPPathPattern("/v2/config/{urlScope=project/*}/override")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Override_GetOverrides_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Override_GetOverrides_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_Override_UpdateOverride_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.config.rpc.Override/UpdateOverride", runtime.WithHTTPPathPattern("/v2/config/project/{metadata.project}/override/{metadata.name}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Override_UpdateOverride_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Override_UpdateOverride_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("DELETE", pattern_Override_DeleteOverride_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.config.rpc.Override/DeleteOverride", runtime.WithHTTPPathPattern("/v2/config/project/{metadata.project}/override/{metadata.name}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Override_DeleteOverride_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Override_DeleteOverride_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Override_ApplyOverride_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.config.rpc.Override/ApplyOverride", runtime.WithHTTPPathPattern("/v2/config/override/apply")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Override_ApplyOverride_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Override_ApplyOverride_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Override_AddDefaultOverrides_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.config.rpc.Override/AddDefaultOverrides", runtime.WithHTTPPathPattern("/v2/config/override/default/cluster")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Override_AddDefaultOverrides_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Override_AddDefaultOverrides_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterOverrideHandlerFromEndpoint is same as RegisterOverrideHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterOverrideHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterOverrideHandler(ctx, mux, conn) +} + +// RegisterOverrideHandler registers the http handlers for service Override to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterOverrideHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterOverrideHandlerClient(ctx, mux, NewOverrideClient(conn)) +} + +// RegisterOverrideHandlerClient registers the http handlers for service Override +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "OverrideClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "OverrideClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "OverrideClient" to call the correct interceptors. +func RegisterOverrideHandlerClient(ctx context.Context, mux *runtime.ServeMux, client OverrideClient) error { + + mux.Handle("POST", pattern_Override_CreateOverride_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.config.rpc.Override/CreateOverride", runtime.WithHTTPPathPattern("/v2/config/project/{metadata.project}/override")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Override_CreateOverride_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Override_CreateOverride_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Override_GetOverride_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.config.rpc.Override/GetOverride", runtime.WithHTTPPathPattern("/v2/config/project/{metadata.project}/override/{metadata.name}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Override_GetOverride_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Override_GetOverride_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Override_GetOverrides_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.config.rpc.Override/GetOverrides", runtime.WithHTTPPathPattern("/v2/config/{urlScope=project/*}/override")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Override_GetOverrides_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Override_GetOverrides_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_Override_UpdateOverride_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.config.rpc.Override/UpdateOverride", runtime.WithHTTPPathPattern("/v2/config/project/{metadata.project}/override/{metadata.name}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Override_UpdateOverride_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Override_UpdateOverride_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("DELETE", pattern_Override_DeleteOverride_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.config.rpc.Override/DeleteOverride", runtime.WithHTTPPathPattern("/v2/config/project/{metadata.project}/override/{metadata.name}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Override_DeleteOverride_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Override_DeleteOverride_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Override_ApplyOverride_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.config.rpc.Override/ApplyOverride", runtime.WithHTTPPathPattern("/v2/config/override/apply")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Override_ApplyOverride_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Override_ApplyOverride_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Override_AddDefaultOverrides_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.config.rpc.Override/AddDefaultOverrides", runtime.WithHTTPPathPattern("/v2/config/override/default/cluster")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Override_AddDefaultOverrides_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Override_AddDefaultOverrides_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Override_CreateOverride_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"v2", "config", "project", "metadata.project", "override"}, "")) + + pattern_Override_GetOverride_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"v2", "config", "project", "metadata.project", "override", "metadata.name"}, "")) + + pattern_Override_GetOverrides_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3, 2, 4}, []string{"v2", "config", "project", "urlScope", "override"}, "")) + + pattern_Override_UpdateOverride_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"v2", "config", "project", "metadata.project", "override", "metadata.name"}, "")) + + pattern_Override_DeleteOverride_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"v2", "config", "project", "metadata.project", "override", "metadata.name"}, "")) + + pattern_Override_ApplyOverride_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v2", "config", "override", "apply"}, "")) + + pattern_Override_AddDefaultOverrides_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"v2", "config", "override", "default", "cluster"}, "")) +) + +var ( + forward_Override_CreateOverride_0 = runtime.ForwardResponseMessage + + forward_Override_GetOverride_0 = runtime.ForwardResponseMessage + + forward_Override_GetOverrides_0 = runtime.ForwardResponseMessage + + forward_Override_UpdateOverride_0 = runtime.ForwardResponseMessage + + forward_Override_DeleteOverride_0 = runtime.ForwardResponseMessage + + forward_Override_ApplyOverride_0 = runtime.ForwardResponseMessage + + forward_Override_AddDefaultOverrides_0 = runtime.ForwardResponseMessage +) diff --git a/components/common/proto/rpc/config/override.proto b/components/common/proto/rpc/config/override.proto new file mode 100644 index 0000000..df5b1a2 --- /dev/null +++ b/components/common/proto/rpc/config/override.proto @@ -0,0 +1,212 @@ +syntax = "proto3"; +package rafay.dev.config.rpc; + +import "google/api/annotations.proto"; +import "gogoproto/gogo.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; +import "proto/types/commonpb/v3/common.proto"; +import "proto/types/config/namespace.proto"; +import "proto/types/config/override.proto"; + +// Enable custom Marshal method. +option (gogoproto.marshaler_all) = true; +// Enable custom Unmarshal method. +option (gogoproto.unmarshaler_all) = true; +// Enable custom Size method (Required by Marshal and Unmarshal). +option (gogoproto.sizer_all) = true; +// Enable registration with golang/protobuf for the grpc-gateway. +option (gogoproto.goproto_registration) = true; +// Enable generation of XXX_MessageName methods for grpc-go/status. +option (gogoproto.messagename_all) = true; + +option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { + info: { + title: "Override Service" + version: "2.0" + contact: { name: "Rafay Dev" } + } + schemes: HTTPS + consumes: "application/json" + consumes: "application/yaml" + produces: "application/json" + produces: "application/yaml" + security_definitions: { + security: { + key: "BasicAuth" + value: { type: TYPE_BASIC } + } + security: { + key: "ApiKeyAuth" + value: { type: TYPE_API_KEY in: IN_HEADER name: "X-RAFAY-API-KEYID" } + } + } + security: { + security_requirement: { + key: "BasicAuth" + value: {} + } + security_requirement: { + key: "ApiKeyAuth" + value: {} + } + } + responses: { + key: "403" + value: { + description: "Returned when the user does not have permission to access the resource." + } + } + responses: { + key: "404" + value: { + description: "Returned when the resource does not exist." + schema: { json_schema: { type: STRING } } + } + } +}; + +message DeleteOverrideResponse {} + +message ApplyOverrideRequest { + string selector = 1; + string type = 2; + sint64 partnerID = 3; + sint64 organizationID = 4; + sint64 projectID = 5; + rafay.dev.types.config.NamespaceTemplate namespace = 7; + bool setNamespace = 8; + bool atleastOne = 9; +} + +message ApplyOverrideResponse { + rafay.dev.types.config.NamespaceTemplate namespace = 2; +} + +message ProxyConfig { + string httpProxy = 1; + string httpsProxy = 2; + string noProxy = 3; + string proxyAuth = 4; + bool allowInsecureBootstrap = 5; + bool enabled = 6; + string bootstrapCA = 7; +} + +message AddDefaultOverridesRequest { + string clusterName = 1; + sint64 partnerID = 2; + sint64 organizationID = 3; + sint64 projectID = 4; + string pullSecret = 5; + string controlAddr = 6; + string apiAddr = 7; + string token = 8; + string v1EdgeMetadata = 9; + string v1CACert = 10; + string v1WorkloadClientCert = 11; + string v1WorkloadClientKey = 12; + string v1PostgresPassword = 13; + string v1CryptoEdgeCert = 14; + string v1CryptoEdgeKey = 15; + string v1CrypotKMIKey = 16; + string v1EdgeID = 17; + string v1DebugCert = 18; + string v1DebugKey = 19; + string v1ConfigEdgeCert = 20; + string v1ConfigEdgeKey = 21; + string v1EdgeClientCert = 22; + string v1EdgeClientKey = 23; + string v1FluentdAggregatorAddr = 24; + string v1AlertManagerYaml = 25; + string v1DeploymentEnv = 26; + string v1InfluxDBFQDN = 27; + string v1InfluxDBPassword = 28; + string v1PromethuesRelayFQDN = 29; + string v1EdgeDisplayName = 30; + string organizationHash = 31; + string partnerHash = 32; + string orgDisplayName = 33; + string partnerDisplayName = 34; + string v2EventFrmwkCert = 35; + string v2EventFrmwkKey = 36; + string V2EventFrameworkFQDN = 37; + ProxyConfig proxyConfig = 38; + string connectorPodSpecOverride = 39; + string connectorContainerSpecOverride = 40; + string ingressControllerOverride = 41; + string clusterType = 42; + string cniProvider = 43; +} + +message AddDefaultOverridesResponse {} + +service Override { + rpc CreateOverride(rafay.dev.types.config.Override) + returns (rafay.dev.types.config.Override) { + option (google.api.http) = { + post: "/v2/config/project/{metadata.project}/override" + body: "*" + }; + + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + responses: { + key: "201" + value: { description: "Returned when taskset is created successfully." } + } + }; + }; + + rpc GetOverride(rafay.dev.types.config.Override) + returns (rafay.dev.types.config.Override) { + option (google.api.http) = { + get: "/v2/config/project/{metadata.project}/override/{metadata.name}" + }; + }; + + rpc GetOverrides(rafay.dev.types.common.v3.QueryOptions) + returns (rafay.dev.types.config.OverrideList) { + option (google.api.http) = { + get: "/v2/config/{urlScope=project/*}/override" + }; + }; + + rpc UpdateOverride(rafay.dev.types.config.Override) + returns (rafay.dev.types.config.Override) { + option (google.api.http) = { + put: "/v2/config/project/{metadata.project}/override/{metadata.name}" + body: "*" + }; + }; + + rpc DeleteOverride(rafay.dev.types.config.Override) + returns (DeleteOverrideResponse) { + option (google.api.http) = { + delete: "/v2/config/project/{metadata.project}/override/{metadata.name}" + }; + + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + responses: { + key: "204" + value: { + description: "Returned when namespace is deleted successfully." + } + } + }; + }; + + rpc ApplyOverride(ApplyOverrideRequest) returns (ApplyOverrideResponse) { + option (google.api.http) = { + post: "/v2/config/override/apply" + body: "*" + }; + }; + + rpc AddDefaultOverrides(AddDefaultOverridesRequest) + returns (AddDefaultOverridesResponse) { + option (google.api.http) = { + post: "/v2/config/override/default/cluster" + body: "*" + }; + }; + +} \ No newline at end of file diff --git a/components/common/proto/rpc/config/override_grpc.pb.go b/components/common/proto/rpc/config/override_grpc.pb.go new file mode 100644 index 0000000..2668990 --- /dev/null +++ b/components/common/proto/rpc/config/override_grpc.pb.go @@ -0,0 +1,321 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.2.0 +// - protoc (unknown) +// source: proto/rpc/config/override.proto + +package config + +import ( + context "context" + v3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/commonpb/v3" + config "github.com/RafaySystems/rcloud-base/components/common/proto/types/config" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// OverrideClient is the client API for Override service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type OverrideClient interface { + CreateOverride(ctx context.Context, in *config.Override, opts ...grpc.CallOption) (*config.Override, error) + GetOverride(ctx context.Context, in *config.Override, opts ...grpc.CallOption) (*config.Override, error) + GetOverrides(ctx context.Context, in *v3.QueryOptions, opts ...grpc.CallOption) (*config.OverrideList, error) + UpdateOverride(ctx context.Context, in *config.Override, opts ...grpc.CallOption) (*config.Override, error) + DeleteOverride(ctx context.Context, in *config.Override, opts ...grpc.CallOption) (*DeleteOverrideResponse, error) + ApplyOverride(ctx context.Context, in *ApplyOverrideRequest, opts ...grpc.CallOption) (*ApplyOverrideResponse, error) + AddDefaultOverrides(ctx context.Context, in *AddDefaultOverridesRequest, opts ...grpc.CallOption) (*AddDefaultOverridesResponse, error) +} + +type overrideClient struct { + cc grpc.ClientConnInterface +} + +func NewOverrideClient(cc grpc.ClientConnInterface) OverrideClient { + return &overrideClient{cc} +} + +func (c *overrideClient) CreateOverride(ctx context.Context, in *config.Override, opts ...grpc.CallOption) (*config.Override, error) { + out := new(config.Override) + err := c.cc.Invoke(ctx, "/rafay.dev.config.rpc.Override/CreateOverride", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *overrideClient) GetOverride(ctx context.Context, in *config.Override, opts ...grpc.CallOption) (*config.Override, error) { + out := new(config.Override) + err := c.cc.Invoke(ctx, "/rafay.dev.config.rpc.Override/GetOverride", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *overrideClient) GetOverrides(ctx context.Context, in *v3.QueryOptions, opts ...grpc.CallOption) (*config.OverrideList, error) { + out := new(config.OverrideList) + err := c.cc.Invoke(ctx, "/rafay.dev.config.rpc.Override/GetOverrides", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *overrideClient) UpdateOverride(ctx context.Context, in *config.Override, opts ...grpc.CallOption) (*config.Override, error) { + out := new(config.Override) + err := c.cc.Invoke(ctx, "/rafay.dev.config.rpc.Override/UpdateOverride", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *overrideClient) DeleteOverride(ctx context.Context, in *config.Override, opts ...grpc.CallOption) (*DeleteOverrideResponse, error) { + out := new(DeleteOverrideResponse) + err := c.cc.Invoke(ctx, "/rafay.dev.config.rpc.Override/DeleteOverride", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *overrideClient) ApplyOverride(ctx context.Context, in *ApplyOverrideRequest, opts ...grpc.CallOption) (*ApplyOverrideResponse, error) { + out := new(ApplyOverrideResponse) + err := c.cc.Invoke(ctx, "/rafay.dev.config.rpc.Override/ApplyOverride", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *overrideClient) AddDefaultOverrides(ctx context.Context, in *AddDefaultOverridesRequest, opts ...grpc.CallOption) (*AddDefaultOverridesResponse, error) { + out := new(AddDefaultOverridesResponse) + err := c.cc.Invoke(ctx, "/rafay.dev.config.rpc.Override/AddDefaultOverrides", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// OverrideServer is the server API for Override service. +// All implementations should embed UnimplementedOverrideServer +// for forward compatibility +type OverrideServer interface { + CreateOverride(context.Context, *config.Override) (*config.Override, error) + GetOverride(context.Context, *config.Override) (*config.Override, error) + GetOverrides(context.Context, *v3.QueryOptions) (*config.OverrideList, error) + UpdateOverride(context.Context, *config.Override) (*config.Override, error) + DeleteOverride(context.Context, *config.Override) (*DeleteOverrideResponse, error) + ApplyOverride(context.Context, *ApplyOverrideRequest) (*ApplyOverrideResponse, error) + AddDefaultOverrides(context.Context, *AddDefaultOverridesRequest) (*AddDefaultOverridesResponse, error) +} + +// UnimplementedOverrideServer should be embedded to have forward compatible implementations. +type UnimplementedOverrideServer struct { +} + +func (UnimplementedOverrideServer) CreateOverride(context.Context, *config.Override) (*config.Override, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateOverride not implemented") +} +func (UnimplementedOverrideServer) GetOverride(context.Context, *config.Override) (*config.Override, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetOverride not implemented") +} +func (UnimplementedOverrideServer) GetOverrides(context.Context, *v3.QueryOptions) (*config.OverrideList, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetOverrides not implemented") +} +func (UnimplementedOverrideServer) UpdateOverride(context.Context, *config.Override) (*config.Override, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateOverride not implemented") +} +func (UnimplementedOverrideServer) DeleteOverride(context.Context, *config.Override) (*DeleteOverrideResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteOverride not implemented") +} +func (UnimplementedOverrideServer) ApplyOverride(context.Context, *ApplyOverrideRequest) (*ApplyOverrideResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ApplyOverride not implemented") +} +func (UnimplementedOverrideServer) AddDefaultOverrides(context.Context, *AddDefaultOverridesRequest) (*AddDefaultOverridesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AddDefaultOverrides not implemented") +} + +// UnsafeOverrideServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to OverrideServer will +// result in compilation errors. +type UnsafeOverrideServer interface { + mustEmbedUnimplementedOverrideServer() +} + +func RegisterOverrideServer(s grpc.ServiceRegistrar, srv OverrideServer) { + s.RegisterService(&Override_ServiceDesc, srv) +} + +func _Override_CreateOverride_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(config.Override) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OverrideServer).CreateOverride(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rafay.dev.config.rpc.Override/CreateOverride", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OverrideServer).CreateOverride(ctx, req.(*config.Override)) + } + return interceptor(ctx, in, info, handler) +} + +func _Override_GetOverride_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(config.Override) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OverrideServer).GetOverride(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rafay.dev.config.rpc.Override/GetOverride", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OverrideServer).GetOverride(ctx, req.(*config.Override)) + } + return interceptor(ctx, in, info, handler) +} + +func _Override_GetOverrides_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v3.QueryOptions) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OverrideServer).GetOverrides(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rafay.dev.config.rpc.Override/GetOverrides", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OverrideServer).GetOverrides(ctx, req.(*v3.QueryOptions)) + } + return interceptor(ctx, in, info, handler) +} + +func _Override_UpdateOverride_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(config.Override) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OverrideServer).UpdateOverride(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rafay.dev.config.rpc.Override/UpdateOverride", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OverrideServer).UpdateOverride(ctx, req.(*config.Override)) + } + return interceptor(ctx, in, info, handler) +} + +func _Override_DeleteOverride_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(config.Override) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OverrideServer).DeleteOverride(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rafay.dev.config.rpc.Override/DeleteOverride", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OverrideServer).DeleteOverride(ctx, req.(*config.Override)) + } + return interceptor(ctx, in, info, handler) +} + +func _Override_ApplyOverride_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ApplyOverrideRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OverrideServer).ApplyOverride(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rafay.dev.config.rpc.Override/ApplyOverride", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OverrideServer).ApplyOverride(ctx, req.(*ApplyOverrideRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Override_AddDefaultOverrides_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AddDefaultOverridesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OverrideServer).AddDefaultOverrides(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rafay.dev.config.rpc.Override/AddDefaultOverrides", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OverrideServer).AddDefaultOverrides(ctx, req.(*AddDefaultOverridesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Override_ServiceDesc is the grpc.ServiceDesc for Override service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Override_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "rafay.dev.config.rpc.Override", + HandlerType: (*OverrideServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateOverride", + Handler: _Override_CreateOverride_Handler, + }, + { + MethodName: "GetOverride", + Handler: _Override_GetOverride_Handler, + }, + { + MethodName: "GetOverrides", + Handler: _Override_GetOverrides_Handler, + }, + { + MethodName: "UpdateOverride", + Handler: _Override_UpdateOverride_Handler, + }, + { + MethodName: "DeleteOverride", + Handler: _Override_DeleteOverride_Handler, + }, + { + MethodName: "ApplyOverride", + Handler: _Override_ApplyOverride_Handler, + }, + { + MethodName: "AddDefaultOverrides", + Handler: _Override_AddDefaultOverrides_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "proto/rpc/config/override.proto", +} diff --git a/components/common/proto/rpc/scheduler/cluster.pb.go b/components/common/proto/rpc/scheduler/cluster.pb.go new file mode 100644 index 0000000..d56bb1d --- /dev/null +++ b/components/common/proto/rpc/scheduler/cluster.pb.go @@ -0,0 +1,444 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc (unknown) +// source: proto/rpc/scheduler/cluster.proto + +package scheduler + +import ( + v31 "github.com/RafaySystems/rcloud-base/components/common/proto/types/commonpb/v3" + v3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/infrapb/v3" + _ "github.com/gogo/protobuf/gogoproto" + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type RegisterClusterRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` + SigningRequest []byte `protobuf:"bytes,2,opt,name=signingRequest,proto3" json:"signingRequest,omitempty"` +} + +func (x *RegisterClusterRequest) Reset() { + *x = RegisterClusterRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_rpc_scheduler_cluster_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RegisterClusterRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RegisterClusterRequest) ProtoMessage() {} + +func (x *RegisterClusterRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_rpc_scheduler_cluster_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RegisterClusterRequest.ProtoReflect.Descriptor instead. +func (*RegisterClusterRequest) Descriptor() ([]byte, []int) { + return file_proto_rpc_scheduler_cluster_proto_rawDescGZIP(), []int{0} +} + +func (x *RegisterClusterRequest) GetToken() string { + if x != nil { + return x.Token + } + return "" +} + +func (x *RegisterClusterRequest) GetSigningRequest() []byte { + if x != nil { + return x.SigningRequest + } + return nil +} + +type RegisterClusterResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Certificate []byte `protobuf:"bytes,1,opt,name=certificate,proto3" json:"certificate,omitempty"` + CaCertificate []byte `protobuf:"bytes,2,opt,name=caCertificate,proto3" json:"caCertificate,omitempty"` +} + +func (x *RegisterClusterResponse) Reset() { + *x = RegisterClusterResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_rpc_scheduler_cluster_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RegisterClusterResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RegisterClusterResponse) ProtoMessage() {} + +func (x *RegisterClusterResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_rpc_scheduler_cluster_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RegisterClusterResponse.ProtoReflect.Descriptor instead. +func (*RegisterClusterResponse) Descriptor() ([]byte, []int) { + return file_proto_rpc_scheduler_cluster_proto_rawDescGZIP(), []int{1} +} + +func (x *RegisterClusterResponse) GetCertificate() []byte { + if x != nil { + return x.Certificate + } + return nil +} + +func (x *RegisterClusterResponse) GetCaCertificate() []byte { + if x != nil { + return x.CaCertificate + } + return nil +} + +type DeleteClusterResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *DeleteClusterResponse) Reset() { + *x = DeleteClusterResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_rpc_scheduler_cluster_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteClusterResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteClusterResponse) ProtoMessage() {} + +func (x *DeleteClusterResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_rpc_scheduler_cluster_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteClusterResponse.ProtoReflect.Descriptor instead. +func (*DeleteClusterResponse) Descriptor() ([]byte, []int) { + return file_proto_rpc_scheduler_cluster_proto_rawDescGZIP(), []int{2} +} + +var File_proto_rpc_scheduler_cluster_proto protoreflect.FileDescriptor + +var file_proto_rpc_scheduler_cluster_proto_rawDesc = []byte{ + 0x0a, 0x21, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x73, 0x63, 0x68, 0x65, + 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x17, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, + 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x72, 0x70, 0x63, 0x1a, 0x1c, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, + 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x24, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x69, 0x6e, + 0x66, 0x72, 0x61, 0x70, 0x62, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, + 0x70, 0x65, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x70, 0x62, 0x2f, 0x76, 0x33, 0x2f, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x56, 0x0a, 0x16, + 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x26, 0x0a, 0x0e, + 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0e, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x22, 0x61, 0x0a, 0x17, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, + 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x20, 0x0a, 0x0b, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, + 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x63, 0x61, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, + 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x63, 0x61, 0x43, 0x65, 0x72, 0x74, + 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x22, 0x17, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x32, 0x85, 0x0b, 0x0a, 0x07, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0xc7, 0x01, 0x0a, + 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x21, + 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x1a, 0x21, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x22, 0x70, 0x92, 0x41, 0x36, 0x4a, 0x34, 0x0a, 0x03, 0x32, 0x30, 0x31, + 0x12, 0x2d, 0x0a, 0x2b, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, + 0x6e, 0x20, 0x65, 0x64, 0x67, 0x65, 0x20, 0x69, 0x73, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x64, 0x20, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x66, 0x75, 0x6c, 0x6c, 0x79, 0x2e, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x22, 0x2c, 0x2f, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2f, 0x76, 0x33, + 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x63, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x3a, 0x01, 0x2a, 0x12, 0x8a, 0x01, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, 0x27, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, + 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x76, 0x33, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, + 0x25, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x12, 0x23, + 0x2f, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x63, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x12, 0x98, 0x01, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x12, 0x21, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x1a, 0x21, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, + 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2e, 0x76, 0x33, + 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x22, 0x44, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3e, + 0x12, 0x3c, 0x2f, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x7b, + 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x12, 0x9e, + 0x01, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x12, 0x21, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x1a, 0x21, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x22, 0x47, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x41, 0x1a, 0x3c, + 0x2f, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x7b, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x3a, 0x01, 0x2a, 0x12, + 0xe5, 0x01, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x12, 0x21, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x1a, 0x2e, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, + 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x80, 0x01, 0x92, 0x41, 0x39, 0x4a, 0x37, 0x0a, 0x03, 0x32, 0x30, + 0x34, 0x12, 0x30, 0x0a, 0x2e, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, + 0x65, 0x6e, 0x20, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x69, 0x73, 0x20, 0x64, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x64, 0x20, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x66, 0x75, 0x6c, + 0x6c, 0x79, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3e, 0x2a, 0x3c, 0x2f, 0x69, 0x6e, 0x66, 0x72, + 0x61, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x7b, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, + 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x12, 0xa5, 0x01, 0x0a, 0x0f, 0x52, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x65, 0x72, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x2f, 0x2e, 0x72, 0x61, + 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, + 0x72, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x72, + 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, + 0x65, 0x72, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x22, 0x24, 0x2f, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2f, 0x76, + 0x33, 0x2f, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2f, 0x63, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x3a, 0x01, 0x2a, 0x12, + 0xa8, 0x01, 0x0a, 0x0f, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x43, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x12, 0x21, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x1a, 0x23, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, + 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x42, 0x6f, 0x64, 0x79, 0x22, 0x4d, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x47, 0x12, 0x45, 0x2f, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2f, 0x76, 0x33, 0x2f, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x2e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6e, 0x61, 0x6d, 0x65, + 0x7d, 0x2f, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0xab, 0x01, 0x0a, 0x13, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x12, 0x21, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x1a, 0x21, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, + 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2e, 0x76, 0x33, + 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x22, 0x4e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x48, + 0x1a, 0x43, 0x2f, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x7b, + 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x3a, 0x01, 0x2a, 0x42, 0xe8, 0x04, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, + 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, + 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x72, 0x70, 0x63, 0x42, 0x0c, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x49, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x61, 0x66, 0x61, 0x79, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, + 0x73, 0x2f, 0x72, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x63, 0x6f, + 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, + 0x6c, 0x65, 0x72, 0xa2, 0x02, 0x04, 0x52, 0x44, 0x53, 0x52, 0xaa, 0x02, 0x17, 0x52, 0x61, 0x66, + 0x61, 0x79, 0x2e, 0x44, 0x65, 0x76, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, + 0x2e, 0x52, 0x70, 0x63, 0xca, 0x02, 0x17, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, + 0x5c, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x5c, 0x52, 0x70, 0x63, 0xe2, 0x02, + 0x23, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x53, 0x63, 0x68, 0x65, 0x64, + 0x75, 0x6c, 0x65, 0x72, 0x5c, 0x52, 0x70, 0x63, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1a, 0x52, 0x61, 0x66, 0x61, 0x79, 0x3a, 0x3a, 0x44, 0x65, + 0x76, 0x3a, 0x3a, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x3a, 0x3a, 0x52, 0x70, + 0x63, 0x92, 0x41, 0xda, 0x02, 0x12, 0x23, 0x0a, 0x0f, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x20, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x22, 0x0b, 0x0a, 0x09, 0x52, 0x61, 0x66, 0x61, + 0x79, 0x20, 0x44, 0x65, 0x76, 0x32, 0x03, 0x33, 0x2e, 0x30, 0x2a, 0x01, 0x02, 0x32, 0x10, 0x61, + 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x32, + 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x79, 0x61, 0x6d, + 0x6c, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, + 0x73, 0x6f, 0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2f, 0x79, 0x61, 0x6d, 0x6c, 0x52, 0x50, 0x0a, 0x03, 0x34, 0x30, 0x33, 0x12, 0x49, 0x0a, 0x47, + 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x74, 0x68, + 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, + 0x68, 0x61, 0x76, 0x65, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x20, + 0x74, 0x6f, 0x20, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x52, 0x3b, 0x0a, 0x03, 0x34, 0x30, 0x34, 0x12, 0x34, + 0x0a, 0x2a, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, + 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x64, 0x6f, 0x65, + 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x65, 0x78, 0x69, 0x73, 0x74, 0x2e, 0x12, 0x06, 0x0a, 0x04, + 0x9a, 0x02, 0x01, 0x07, 0x5a, 0x38, 0x0a, 0x25, 0x0a, 0x0a, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, + 0x41, 0x75, 0x74, 0x68, 0x12, 0x17, 0x08, 0x02, 0x1a, 0x11, 0x58, 0x2d, 0x52, 0x41, 0x46, 0x41, + 0x59, 0x2d, 0x41, 0x50, 0x49, 0x2d, 0x4b, 0x45, 0x59, 0x49, 0x44, 0x20, 0x02, 0x0a, 0x0f, 0x0a, + 0x09, 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, 0x68, 0x12, 0x02, 0x08, 0x01, 0x62, 0x1f, + 0x0a, 0x0e, 0x0a, 0x0a, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, + 0x0a, 0x0d, 0x0a, 0x09, 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0xc8, + 0xe2, 0x1e, 0x01, 0xd0, 0xe2, 0x1e, 0x01, 0xe0, 0xe2, 0x1e, 0x01, 0xc0, 0xe3, 0x1e, 0x01, 0xc8, + 0xe3, 0x1e, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_proto_rpc_scheduler_cluster_proto_rawDescOnce sync.Once + file_proto_rpc_scheduler_cluster_proto_rawDescData = file_proto_rpc_scheduler_cluster_proto_rawDesc +) + +func file_proto_rpc_scheduler_cluster_proto_rawDescGZIP() []byte { + file_proto_rpc_scheduler_cluster_proto_rawDescOnce.Do(func() { + file_proto_rpc_scheduler_cluster_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_rpc_scheduler_cluster_proto_rawDescData) + }) + return file_proto_rpc_scheduler_cluster_proto_rawDescData +} + +var file_proto_rpc_scheduler_cluster_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_proto_rpc_scheduler_cluster_proto_goTypes = []interface{}{ + (*RegisterClusterRequest)(nil), // 0: rafay.dev.scheduler.rpc.RegisterClusterRequest + (*RegisterClusterResponse)(nil), // 1: rafay.dev.scheduler.rpc.RegisterClusterResponse + (*DeleteClusterResponse)(nil), // 2: rafay.dev.scheduler.rpc.DeleteClusterResponse + (*v3.Cluster)(nil), // 3: rafay.dev.types.infra.v3.Cluster + (*v31.QueryOptions)(nil), // 4: rafay.dev.types.common.v3.QueryOptions + (*v3.ClusterList)(nil), // 5: rafay.dev.types.infra.v3.ClusterList + (*v31.HttpBody)(nil), // 6: rafay.dev.types.common.v3.HttpBody +} +var file_proto_rpc_scheduler_cluster_proto_depIdxs = []int32{ + 3, // 0: rafay.dev.scheduler.rpc.Cluster.CreateCluster:input_type -> rafay.dev.types.infra.v3.Cluster + 4, // 1: rafay.dev.scheduler.rpc.Cluster.GetClusters:input_type -> rafay.dev.types.common.v3.QueryOptions + 3, // 2: rafay.dev.scheduler.rpc.Cluster.GetCluster:input_type -> rafay.dev.types.infra.v3.Cluster + 3, // 3: rafay.dev.scheduler.rpc.Cluster.UpdateCluster:input_type -> rafay.dev.types.infra.v3.Cluster + 3, // 4: rafay.dev.scheduler.rpc.Cluster.DeleteCluster:input_type -> rafay.dev.types.infra.v3.Cluster + 0, // 5: rafay.dev.scheduler.rpc.Cluster.RegisterCluster:input_type -> rafay.dev.scheduler.rpc.RegisterClusterRequest + 3, // 6: rafay.dev.scheduler.rpc.Cluster.DownloadCluster:input_type -> rafay.dev.types.infra.v3.Cluster + 3, // 7: rafay.dev.scheduler.rpc.Cluster.UpdateClusterStatus:input_type -> rafay.dev.types.infra.v3.Cluster + 3, // 8: rafay.dev.scheduler.rpc.Cluster.CreateCluster:output_type -> rafay.dev.types.infra.v3.Cluster + 5, // 9: rafay.dev.scheduler.rpc.Cluster.GetClusters:output_type -> rafay.dev.types.infra.v3.ClusterList + 3, // 10: rafay.dev.scheduler.rpc.Cluster.GetCluster:output_type -> rafay.dev.types.infra.v3.Cluster + 3, // 11: rafay.dev.scheduler.rpc.Cluster.UpdateCluster:output_type -> rafay.dev.types.infra.v3.Cluster + 2, // 12: rafay.dev.scheduler.rpc.Cluster.DeleteCluster:output_type -> rafay.dev.scheduler.rpc.DeleteClusterResponse + 1, // 13: rafay.dev.scheduler.rpc.Cluster.RegisterCluster:output_type -> rafay.dev.scheduler.rpc.RegisterClusterResponse + 6, // 14: rafay.dev.scheduler.rpc.Cluster.DownloadCluster:output_type -> rafay.dev.types.common.v3.HttpBody + 3, // 15: rafay.dev.scheduler.rpc.Cluster.UpdateClusterStatus:output_type -> rafay.dev.types.infra.v3.Cluster + 8, // [8:16] is the sub-list for method output_type + 0, // [0:8] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_proto_rpc_scheduler_cluster_proto_init() } +func file_proto_rpc_scheduler_cluster_proto_init() { + if File_proto_rpc_scheduler_cluster_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_proto_rpc_scheduler_cluster_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RegisterClusterRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_rpc_scheduler_cluster_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RegisterClusterResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_rpc_scheduler_cluster_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteClusterResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_proto_rpc_scheduler_cluster_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_proto_rpc_scheduler_cluster_proto_goTypes, + DependencyIndexes: file_proto_rpc_scheduler_cluster_proto_depIdxs, + MessageInfos: file_proto_rpc_scheduler_cluster_proto_msgTypes, + }.Build() + File_proto_rpc_scheduler_cluster_proto = out.File + file_proto_rpc_scheduler_cluster_proto_rawDesc = nil + file_proto_rpc_scheduler_cluster_proto_goTypes = nil + file_proto_rpc_scheduler_cluster_proto_depIdxs = nil +} diff --git a/components/cluster-scheduler/proto/rpc/v3/cluster.pb.gw.go b/components/common/proto/rpc/scheduler/cluster.pb.gw.go similarity index 81% rename from components/cluster-scheduler/proto/rpc/v3/cluster.pb.gw.go rename to components/common/proto/rpc/scheduler/cluster.pb.gw.go index 5dc6f96..eee0249 100644 --- a/components/cluster-scheduler/proto/rpc/v3/cluster.pb.gw.go +++ b/components/common/proto/rpc/scheduler/cluster.pb.gw.go @@ -1,12 +1,12 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: proto/rpc/v3/cluster.proto +// source: proto/rpc/scheduler/cluster.proto /* -Package rpcv3 is a reverse proxy. +Package scheduler is a reverse proxy. It translates gRPC into RESTful JSON APIs. */ -package rpcv3 +package scheduler import ( "context" @@ -102,7 +102,7 @@ func local_request_Cluster_CreateCluster_0(ctx context.Context, marshaler runtim } var ( - filter_Cluster_GetClusters_0 = &utilities.DoubleArray{Encoding: map[string]int{"projectID": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} + filter_Cluster_GetClusters_0 = &utilities.DoubleArray{Encoding: map[string]int{"project": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} ) func request_Cluster_GetClusters_0(ctx context.Context, marshaler runtime.Marshaler, client ClusterClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -116,14 +116,14 @@ func request_Cluster_GetClusters_0(ctx context.Context, marshaler runtime.Marsha _ = err ) - val, ok = pathParams["projectID"] + val, ok = pathParams["project"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "projectID") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "project") } - protoReq.ProjectID, err = runtime.String(val) + protoReq.Project, err = runtime.String(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "projectID", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "project", err) } if err := req.ParseForm(); err != nil { @@ -149,14 +149,14 @@ func local_request_Cluster_GetClusters_0(ctx context.Context, marshaler runtime. _ = err ) - val, ok = pathParams["projectID"] + val, ok = pathParams["project"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "projectID") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "project") } - protoReq.ProjectID, err = runtime.String(val) + protoReq.Project, err = runtime.String(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "projectID", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "project", err) } if err := req.ParseForm(); err != nil { @@ -563,6 +563,94 @@ func local_request_Cluster_DownloadCluster_0(ctx context.Context, marshaler runt } +func request_Cluster_UpdateClusterStatus_0(ctx context.Context, marshaler runtime.Marshaler, client ClusterClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq infrav3.Cluster + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["metadata.project"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.project") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.project", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.project", err) + } + + val, ok = pathParams["metadata.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.name", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.name", err) + } + + msg, err := client.UpdateClusterStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Cluster_UpdateClusterStatus_0(ctx context.Context, marshaler runtime.Marshaler, server ClusterServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq infrav3.Cluster + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["metadata.project"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.project") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.project", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.project", err) + } + + val, ok = pathParams["metadata.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.name", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.name", err) + } + + msg, err := server.UpdateClusterStatus(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterClusterHandlerServer registers the http handlers for service Cluster to "mux". // UnaryRPC :call ClusterServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -575,7 +663,7 @@ func RegisterClusterHandlerServer(ctx context.Context, mux *runtime.ServeMux, se var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Cluster/CreateCluster", runtime.WithHTTPPathPattern("/infra/v3/project/{metadata.project}/cluster")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.scheduler.rpc.Cluster/CreateCluster", runtime.WithHTTPPathPattern("/infra/v3/project/{metadata.project}/cluster")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -598,7 +686,7 @@ func RegisterClusterHandlerServer(ctx context.Context, mux *runtime.ServeMux, se var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Cluster/GetClusters", runtime.WithHTTPPathPattern("/infra/v3/project/{projectID}/cluster")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.scheduler.rpc.Cluster/GetClusters", runtime.WithHTTPPathPattern("/infra/v3/project/{project}/cluster")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -621,7 +709,7 @@ func RegisterClusterHandlerServer(ctx context.Context, mux *runtime.ServeMux, se var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Cluster/GetCluster", runtime.WithHTTPPathPattern("/infra/v3/project/{metadata.project}/cluster/{metadata.name}")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.scheduler.rpc.Cluster/GetCluster", runtime.WithHTTPPathPattern("/infra/v3/project/{metadata.project}/cluster/{metadata.name}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -644,7 +732,7 @@ func RegisterClusterHandlerServer(ctx context.Context, mux *runtime.ServeMux, se var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Cluster/UpdateCluster", runtime.WithHTTPPathPattern("/infra/v3/project/{metadata.project}/cluster/{metadata.name}")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.scheduler.rpc.Cluster/UpdateCluster", runtime.WithHTTPPathPattern("/infra/v3/project/{metadata.project}/cluster/{metadata.name}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -667,7 +755,7 @@ func RegisterClusterHandlerServer(ctx context.Context, mux *runtime.ServeMux, se var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Cluster/DeleteCluster", runtime.WithHTTPPathPattern("/infra/v3/project/{metadata.project}/cluster/{metadata.name}")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.scheduler.rpc.Cluster/DeleteCluster", runtime.WithHTTPPathPattern("/infra/v3/project/{metadata.project}/cluster/{metadata.name}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -690,7 +778,7 @@ func RegisterClusterHandlerServer(ctx context.Context, mux *runtime.ServeMux, se var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Cluster/RegisterCluster", runtime.WithHTTPPathPattern("/infra/v3/scheduler/cluster/register")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.scheduler.rpc.Cluster/RegisterCluster", runtime.WithHTTPPathPattern("/infra/v3/scheduler/cluster/register")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -713,7 +801,7 @@ func RegisterClusterHandlerServer(ctx context.Context, mux *runtime.ServeMux, se var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.rpc.v3.Cluster/DownloadCluster", runtime.WithHTTPPathPattern("/infra/v3/project/{metadata.project}/cluster/{metadata.name}/download")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.scheduler.rpc.Cluster/DownloadCluster", runtime.WithHTTPPathPattern("/infra/v3/project/{metadata.project}/cluster/{metadata.name}/download")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -730,6 +818,29 @@ func RegisterClusterHandlerServer(ctx context.Context, mux *runtime.ServeMux, se }) + mux.Handle("PUT", pattern_Cluster_UpdateClusterStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.scheduler.rpc.Cluster/UpdateClusterStatus", runtime.WithHTTPPathPattern("/infra/v3/project/{metadata.project}/cluster/{metadata.name}/status")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Cluster_UpdateClusterStatus_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Cluster_UpdateClusterStatus_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -775,7 +886,7 @@ func RegisterClusterHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Cluster/CreateCluster", runtime.WithHTTPPathPattern("/infra/v3/project/{metadata.project}/cluster")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.scheduler.rpc.Cluster/CreateCluster", runtime.WithHTTPPathPattern("/infra/v3/project/{metadata.project}/cluster")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -795,7 +906,7 @@ func RegisterClusterHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Cluster/GetClusters", runtime.WithHTTPPathPattern("/infra/v3/project/{projectID}/cluster")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.scheduler.rpc.Cluster/GetClusters", runtime.WithHTTPPathPattern("/infra/v3/project/{project}/cluster")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -815,7 +926,7 @@ func RegisterClusterHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Cluster/GetCluster", runtime.WithHTTPPathPattern("/infra/v3/project/{metadata.project}/cluster/{metadata.name}")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.scheduler.rpc.Cluster/GetCluster", runtime.WithHTTPPathPattern("/infra/v3/project/{metadata.project}/cluster/{metadata.name}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -835,7 +946,7 @@ func RegisterClusterHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Cluster/UpdateCluster", runtime.WithHTTPPathPattern("/infra/v3/project/{metadata.project}/cluster/{metadata.name}")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.scheduler.rpc.Cluster/UpdateCluster", runtime.WithHTTPPathPattern("/infra/v3/project/{metadata.project}/cluster/{metadata.name}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -855,7 +966,7 @@ func RegisterClusterHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Cluster/DeleteCluster", runtime.WithHTTPPathPattern("/infra/v3/project/{metadata.project}/cluster/{metadata.name}")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.scheduler.rpc.Cluster/DeleteCluster", runtime.WithHTTPPathPattern("/infra/v3/project/{metadata.project}/cluster/{metadata.name}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -875,7 +986,7 @@ func RegisterClusterHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Cluster/RegisterCluster", runtime.WithHTTPPathPattern("/infra/v3/scheduler/cluster/register")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.scheduler.rpc.Cluster/RegisterCluster", runtime.WithHTTPPathPattern("/infra/v3/scheduler/cluster/register")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -895,7 +1006,7 @@ func RegisterClusterHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.rpc.v3.Cluster/DownloadCluster", runtime.WithHTTPPathPattern("/infra/v3/project/{metadata.project}/cluster/{metadata.name}/download")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.scheduler.rpc.Cluster/DownloadCluster", runtime.WithHTTPPathPattern("/infra/v3/project/{metadata.project}/cluster/{metadata.name}/download")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -911,13 +1022,33 @@ func RegisterClusterHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl }) + mux.Handle("PUT", pattern_Cluster_UpdateClusterStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.scheduler.rpc.Cluster/UpdateClusterStatus", runtime.WithHTTPPathPattern("/infra/v3/project/{metadata.project}/cluster/{metadata.name}/status")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Cluster_UpdateClusterStatus_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Cluster_UpdateClusterStatus_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } var ( pattern_Cluster_CreateCluster_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"infra", "v3", "project", "metadata.project", "cluster"}, "")) - pattern_Cluster_GetClusters_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"infra", "v3", "project", "projectID", "cluster"}, "")) + pattern_Cluster_GetClusters_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"infra", "v3", "project", "cluster"}, "")) pattern_Cluster_GetCluster_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"infra", "v3", "project", "metadata.project", "cluster", "metadata.name"}, "")) @@ -928,6 +1059,8 @@ var ( pattern_Cluster_RegisterCluster_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"infra", "v3", "scheduler", "cluster", "register"}, "")) pattern_Cluster_DownloadCluster_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"infra", "v3", "project", "metadata.project", "cluster", "metadata.name", "download"}, "")) + + pattern_Cluster_UpdateClusterStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"infra", "v3", "project", "metadata.project", "cluster", "metadata.name", "status"}, "")) ) var ( @@ -944,4 +1077,6 @@ var ( forward_Cluster_RegisterCluster_0 = runtime.ForwardResponseMessage forward_Cluster_DownloadCluster_0 = runtime.ForwardResponseMessage + + forward_Cluster_UpdateClusterStatus_0 = runtime.ForwardResponseMessage ) diff --git a/components/cluster-scheduler/proto/rpc/v3/cluster.proto b/components/common/proto/rpc/scheduler/cluster.proto similarity index 92% rename from components/cluster-scheduler/proto/rpc/v3/cluster.proto rename to components/common/proto/rpc/scheduler/cluster.proto index b7c6940..37306b1 100644 --- a/components/cluster-scheduler/proto/rpc/v3/cluster.proto +++ b/components/common/proto/rpc/scheduler/cluster.proto @@ -1,5 +1,5 @@ syntax = "proto3"; -package rafay.dev.rpc.v3; +package rafay.dev.scheduler.rpc; import "google/api/annotations.proto"; import "gogoproto/gogo.proto"; @@ -98,7 +98,7 @@ service Cluster { rpc GetClusters(rafay.dev.types.common.v3.QueryOptions) returns (rafay.dev.types.infra.v3.ClusterList) { option (google.api.http) = { - get : "/infra/v3/project/{projectID}/cluster" + get : "/infra/v3/project/{project}/cluster" }; }; @@ -147,5 +147,13 @@ service Cluster { get : "/infra/v3/project/{metadata.project}/cluster/{metadata.name}/download" }; }; + + rpc UpdateClusterStatus(rafay.dev.types.infra.v3.Cluster) + returns (rafay.dev.types.infra.v3.Cluster) { + option (google.api.http) = { + put : "/infra/v3/project/{metadata.project}/cluster/{metadata.name}/status" + body : "*" + }; + }; } \ No newline at end of file diff --git a/components/cluster-scheduler/proto/rpc/v3/cluster_grpc.pb.go b/components/common/proto/rpc/scheduler/cluster_grpc.pb.go similarity index 80% rename from components/cluster-scheduler/proto/rpc/v3/cluster_grpc.pb.go rename to components/common/proto/rpc/scheduler/cluster_grpc.pb.go index 1afc526..4e1c4fb 100644 --- a/components/cluster-scheduler/proto/rpc/v3/cluster_grpc.pb.go +++ b/components/common/proto/rpc/scheduler/cluster_grpc.pb.go @@ -2,9 +2,9 @@ // versions: // - protoc-gen-go-grpc v1.2.0 // - protoc (unknown) -// source: proto/rpc/v3/cluster.proto +// source: proto/rpc/scheduler/cluster.proto -package rpcv3 +package scheduler import ( context "context" @@ -31,6 +31,7 @@ type ClusterClient interface { DeleteCluster(ctx context.Context, in *v3.Cluster, opts ...grpc.CallOption) (*DeleteClusterResponse, error) RegisterCluster(ctx context.Context, in *RegisterClusterRequest, opts ...grpc.CallOption) (*RegisterClusterResponse, error) DownloadCluster(ctx context.Context, in *v3.Cluster, opts ...grpc.CallOption) (*v31.HttpBody, error) + UpdateClusterStatus(ctx context.Context, in *v3.Cluster, opts ...grpc.CallOption) (*v3.Cluster, error) } type clusterClient struct { @@ -43,7 +44,7 @@ func NewClusterClient(cc grpc.ClientConnInterface) ClusterClient { func (c *clusterClient) CreateCluster(ctx context.Context, in *v3.Cluster, opts ...grpc.CallOption) (*v3.Cluster, error) { out := new(v3.Cluster) - err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.Cluster/CreateCluster", in, out, opts...) + err := c.cc.Invoke(ctx, "/rafay.dev.scheduler.rpc.Cluster/CreateCluster", in, out, opts...) if err != nil { return nil, err } @@ -52,7 +53,7 @@ func (c *clusterClient) CreateCluster(ctx context.Context, in *v3.Cluster, opts func (c *clusterClient) GetClusters(ctx context.Context, in *v31.QueryOptions, opts ...grpc.CallOption) (*v3.ClusterList, error) { out := new(v3.ClusterList) - err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.Cluster/GetClusters", in, out, opts...) + err := c.cc.Invoke(ctx, "/rafay.dev.scheduler.rpc.Cluster/GetClusters", in, out, opts...) if err != nil { return nil, err } @@ -61,7 +62,7 @@ func (c *clusterClient) GetClusters(ctx context.Context, in *v31.QueryOptions, o func (c *clusterClient) GetCluster(ctx context.Context, in *v3.Cluster, opts ...grpc.CallOption) (*v3.Cluster, error) { out := new(v3.Cluster) - err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.Cluster/GetCluster", in, out, opts...) + err := c.cc.Invoke(ctx, "/rafay.dev.scheduler.rpc.Cluster/GetCluster", in, out, opts...) if err != nil { return nil, err } @@ -70,7 +71,7 @@ func (c *clusterClient) GetCluster(ctx context.Context, in *v3.Cluster, opts ... func (c *clusterClient) UpdateCluster(ctx context.Context, in *v3.Cluster, opts ...grpc.CallOption) (*v3.Cluster, error) { out := new(v3.Cluster) - err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.Cluster/UpdateCluster", in, out, opts...) + err := c.cc.Invoke(ctx, "/rafay.dev.scheduler.rpc.Cluster/UpdateCluster", in, out, opts...) if err != nil { return nil, err } @@ -79,7 +80,7 @@ func (c *clusterClient) UpdateCluster(ctx context.Context, in *v3.Cluster, opts func (c *clusterClient) DeleteCluster(ctx context.Context, in *v3.Cluster, opts ...grpc.CallOption) (*DeleteClusterResponse, error) { out := new(DeleteClusterResponse) - err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.Cluster/DeleteCluster", in, out, opts...) + err := c.cc.Invoke(ctx, "/rafay.dev.scheduler.rpc.Cluster/DeleteCluster", in, out, opts...) if err != nil { return nil, err } @@ -88,7 +89,7 @@ func (c *clusterClient) DeleteCluster(ctx context.Context, in *v3.Cluster, opts func (c *clusterClient) RegisterCluster(ctx context.Context, in *RegisterClusterRequest, opts ...grpc.CallOption) (*RegisterClusterResponse, error) { out := new(RegisterClusterResponse) - err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.Cluster/RegisterCluster", in, out, opts...) + err := c.cc.Invoke(ctx, "/rafay.dev.scheduler.rpc.Cluster/RegisterCluster", in, out, opts...) if err != nil { return nil, err } @@ -97,7 +98,16 @@ func (c *clusterClient) RegisterCluster(ctx context.Context, in *RegisterCluster func (c *clusterClient) DownloadCluster(ctx context.Context, in *v3.Cluster, opts ...grpc.CallOption) (*v31.HttpBody, error) { out := new(v31.HttpBody) - err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.Cluster/DownloadCluster", in, out, opts...) + err := c.cc.Invoke(ctx, "/rafay.dev.scheduler.rpc.Cluster/DownloadCluster", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *clusterClient) UpdateClusterStatus(ctx context.Context, in *v3.Cluster, opts ...grpc.CallOption) (*v3.Cluster, error) { + out := new(v3.Cluster) + err := c.cc.Invoke(ctx, "/rafay.dev.scheduler.rpc.Cluster/UpdateClusterStatus", in, out, opts...) if err != nil { return nil, err } @@ -115,6 +125,7 @@ type ClusterServer interface { DeleteCluster(context.Context, *v3.Cluster) (*DeleteClusterResponse, error) RegisterCluster(context.Context, *RegisterClusterRequest) (*RegisterClusterResponse, error) DownloadCluster(context.Context, *v3.Cluster) (*v31.HttpBody, error) + UpdateClusterStatus(context.Context, *v3.Cluster) (*v3.Cluster, error) } // UnimplementedClusterServer should be embedded to have forward compatible implementations. @@ -142,6 +153,9 @@ func (UnimplementedClusterServer) RegisterCluster(context.Context, *RegisterClus func (UnimplementedClusterServer) DownloadCluster(context.Context, *v3.Cluster) (*v31.HttpBody, error) { return nil, status.Errorf(codes.Unimplemented, "method DownloadCluster not implemented") } +func (UnimplementedClusterServer) UpdateClusterStatus(context.Context, *v3.Cluster) (*v3.Cluster, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateClusterStatus not implemented") +} // UnsafeClusterServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to ClusterServer will @@ -164,7 +178,7 @@ func _Cluster_CreateCluster_Handler(srv interface{}, ctx context.Context, dec fu } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/rafay.dev.rpc.v3.Cluster/CreateCluster", + FullMethod: "/rafay.dev.scheduler.rpc.Cluster/CreateCluster", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ClusterServer).CreateCluster(ctx, req.(*v3.Cluster)) @@ -182,7 +196,7 @@ func _Cluster_GetClusters_Handler(srv interface{}, ctx context.Context, dec func } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/rafay.dev.rpc.v3.Cluster/GetClusters", + FullMethod: "/rafay.dev.scheduler.rpc.Cluster/GetClusters", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ClusterServer).GetClusters(ctx, req.(*v31.QueryOptions)) @@ -200,7 +214,7 @@ func _Cluster_GetCluster_Handler(srv interface{}, ctx context.Context, dec func( } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/rafay.dev.rpc.v3.Cluster/GetCluster", + FullMethod: "/rafay.dev.scheduler.rpc.Cluster/GetCluster", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ClusterServer).GetCluster(ctx, req.(*v3.Cluster)) @@ -218,7 +232,7 @@ func _Cluster_UpdateCluster_Handler(srv interface{}, ctx context.Context, dec fu } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/rafay.dev.rpc.v3.Cluster/UpdateCluster", + FullMethod: "/rafay.dev.scheduler.rpc.Cluster/UpdateCluster", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ClusterServer).UpdateCluster(ctx, req.(*v3.Cluster)) @@ -236,7 +250,7 @@ func _Cluster_DeleteCluster_Handler(srv interface{}, ctx context.Context, dec fu } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/rafay.dev.rpc.v3.Cluster/DeleteCluster", + FullMethod: "/rafay.dev.scheduler.rpc.Cluster/DeleteCluster", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ClusterServer).DeleteCluster(ctx, req.(*v3.Cluster)) @@ -254,7 +268,7 @@ func _Cluster_RegisterCluster_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/rafay.dev.rpc.v3.Cluster/RegisterCluster", + FullMethod: "/rafay.dev.scheduler.rpc.Cluster/RegisterCluster", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ClusterServer).RegisterCluster(ctx, req.(*RegisterClusterRequest)) @@ -272,7 +286,7 @@ func _Cluster_DownloadCluster_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/rafay.dev.rpc.v3.Cluster/DownloadCluster", + FullMethod: "/rafay.dev.scheduler.rpc.Cluster/DownloadCluster", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ClusterServer).DownloadCluster(ctx, req.(*v3.Cluster)) @@ -280,11 +294,29 @@ func _Cluster_DownloadCluster_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } +func _Cluster_UpdateClusterStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v3.Cluster) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ClusterServer).UpdateClusterStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rafay.dev.scheduler.rpc.Cluster/UpdateClusterStatus", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ClusterServer).UpdateClusterStatus(ctx, req.(*v3.Cluster)) + } + return interceptor(ctx, in, info, handler) +} + // Cluster_ServiceDesc is the grpc.ServiceDesc for Cluster service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var Cluster_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "rafay.dev.rpc.v3.Cluster", + ServiceName: "rafay.dev.scheduler.rpc.Cluster", HandlerType: (*ClusterServer)(nil), Methods: []grpc.MethodDesc{ { @@ -315,7 +347,11 @@ var Cluster_ServiceDesc = grpc.ServiceDesc{ MethodName: "DownloadCluster", Handler: _Cluster_DownloadCluster_Handler, }, + { + MethodName: "UpdateClusterStatus", + Handler: _Cluster_UpdateClusterStatus_Handler, + }, }, Streams: []grpc.StreamDesc{}, - Metadata: "proto/rpc/v3/cluster.proto", + Metadata: "proto/rpc/scheduler/cluster.proto", } diff --git a/components/common/proto/rpc/scheduler/internal.go b/components/common/proto/rpc/scheduler/internal.go new file mode 100644 index 0000000..723d976 --- /dev/null +++ b/components/common/proto/rpc/scheduler/internal.go @@ -0,0 +1,57 @@ +package scheduler + +import ( + "context" + + "github.com/RafaySystems/rcloud-base/components/common/pkg/pool" + grpcpool "github.com/processout/grpc-go-pool" +) + +// SchedulerClient is the interface for accessing all the RPCs +// exposed by Cluster Scheduler +type SchedulerClient interface { + Unhealthy() + Close() error + ClusterClient +} + +type schedulerClient struct { + *grpcpool.ClientConn + *clusterClient +} + +var _ SchedulerClient = (*schedulerClient)(nil) + +// SchedulerPool maintains pool of grpc connections to scheduler service +type SchedulerPool interface { + Close() + NewClient(ctx context.Context) (SchedulerClient, error) +} + +// NewSchedulerPool new scheduler pool +func NewSchedulerPool(addr string, maxConn int) SchedulerPool { + return &schedulerPool{ + GRPCPool: pool.NewGRPCPool(addr, maxConn, nil), + } +} + +type schedulerPool struct { + *pool.GRPCPool +} + +func (p *schedulerPool) Close() { + if p.GRPCPool != nil { + p.GRPCPool.Close() + } +} + +func (p *schedulerPool) NewClient(ctx context.Context) (SchedulerClient, error) { + cc, err := p.GetConnection(ctx) + if err != nil { + return nil, err + } + return &schedulerClient{ + cc, + &clusterClient{cc.ClientConn}, + }, nil +} diff --git a/components/common/proto/rpc/sentry/audit_info.pb.go b/components/common/proto/rpc/sentry/audit_info.pb.go new file mode 100644 index 0000000..146811a --- /dev/null +++ b/components/common/proto/rpc/sentry/audit_info.pb.go @@ -0,0 +1,466 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc (unknown) +// source: proto/rpc/sentry/audit_info.proto + +package sentry + +import ( + _ "github.com/RafaySystems/rcloud-base/components/common/proto/types/commonpb/v3" + _ "github.com/RafaySystems/rcloud-base/components/common/proto/types/sentry" + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type LookupUserRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UserCN string `protobuf:"bytes,1,opt,name=userCN,proto3" json:"userCN,omitempty"` +} + +func (x *LookupUserRequest) Reset() { + *x = LookupUserRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_rpc_sentry_audit_info_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LookupUserRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LookupUserRequest) ProtoMessage() {} + +func (x *LookupUserRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_rpc_sentry_audit_info_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LookupUserRequest.ProtoReflect.Descriptor instead. +func (*LookupUserRequest) Descriptor() ([]byte, []int) { + return file_proto_rpc_sentry_audit_info_proto_rawDescGZIP(), []int{0} +} + +func (x *LookupUserRequest) GetUserCN() string { + if x != nil { + return x.UserCN + } + return "" +} + +type LookupUserResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UserName string `protobuf:"bytes,1,opt,name=userName,proto3" json:"userName,omitempty"` + AccountID string `protobuf:"bytes,2,opt,name=accountID,proto3" json:"accountID,omitempty"` + IsSSO string `protobuf:"bytes,3,opt,name=isSSO,proto3" json:"isSSO,omitempty"` + OrganizationID string `protobuf:"bytes,4,opt,name=organizationID,proto3" json:"organizationID,omitempty"` + PartnerID string `protobuf:"bytes,5,opt,name=partnerID,proto3" json:"partnerID,omitempty"` + SessionType string `protobuf:"bytes,6,opt,name=sessionType,proto3" json:"sessionType,omitempty"` +} + +func (x *LookupUserResponse) Reset() { + *x = LookupUserResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_rpc_sentry_audit_info_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LookupUserResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LookupUserResponse) ProtoMessage() {} + +func (x *LookupUserResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_rpc_sentry_audit_info_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LookupUserResponse.ProtoReflect.Descriptor instead. +func (*LookupUserResponse) Descriptor() ([]byte, []int) { + return file_proto_rpc_sentry_audit_info_proto_rawDescGZIP(), []int{1} +} + +func (x *LookupUserResponse) GetUserName() string { + if x != nil { + return x.UserName + } + return "" +} + +func (x *LookupUserResponse) GetAccountID() string { + if x != nil { + return x.AccountID + } + return "" +} + +func (x *LookupUserResponse) GetIsSSO() string { + if x != nil { + return x.IsSSO + } + return "" +} + +func (x *LookupUserResponse) GetOrganizationID() string { + if x != nil { + return x.OrganizationID + } + return "" +} + +func (x *LookupUserResponse) GetPartnerID() string { + if x != nil { + return x.PartnerID + } + return "" +} + +func (x *LookupUserResponse) GetSessionType() string { + if x != nil { + return x.SessionType + } + return "" +} + +type LookupClusterRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ClusterSNI string `protobuf:"bytes,1,opt,name=clusterSNI,proto3" json:"clusterSNI,omitempty"` +} + +func (x *LookupClusterRequest) Reset() { + *x = LookupClusterRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_rpc_sentry_audit_info_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LookupClusterRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LookupClusterRequest) ProtoMessage() {} + +func (x *LookupClusterRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_rpc_sentry_audit_info_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LookupClusterRequest.ProtoReflect.Descriptor instead. +func (*LookupClusterRequest) Descriptor() ([]byte, []int) { + return file_proto_rpc_sentry_audit_info_proto_rawDescGZIP(), []int{2} +} + +func (x *LookupClusterRequest) GetClusterSNI() string { + if x != nil { + return x.ClusterSNI + } + return "" +} + +type LookupClusterResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + DisplayName string `protobuf:"bytes,2,opt,name=displayName,proto3" json:"displayName,omitempty"` +} + +func (x *LookupClusterResponse) Reset() { + *x = LookupClusterResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_rpc_sentry_audit_info_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LookupClusterResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LookupClusterResponse) ProtoMessage() {} + +func (x *LookupClusterResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_rpc_sentry_audit_info_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LookupClusterResponse.ProtoReflect.Descriptor instead. +func (*LookupClusterResponse) Descriptor() ([]byte, []int) { + return file_proto_rpc_sentry_audit_info_proto_rawDescGZIP(), []int{3} +} + +func (x *LookupClusterResponse) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *LookupClusterResponse) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +var File_proto_rpc_sentry_audit_info_proto protoreflect.FileDescriptor + +var file_proto_rpc_sentry_audit_info_proto_rawDesc = []byte{ + 0x0a, 0x21, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x73, 0x65, 0x6e, 0x74, + 0x72, 0x79, 0x2f, 0x61, 0x75, 0x64, 0x69, 0x74, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, + 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x72, 0x70, 0x63, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, + 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x70, 0x62, 0x2f, 0x76, 0x33, + 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x73, 0x65, 0x6e, 0x74, 0x72, + 0x79, 0x2f, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x2b, + 0x0a, 0x11, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x43, 0x4e, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x43, 0x4e, 0x22, 0xcc, 0x01, 0x0a, 0x12, + 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1c, + 0x0a, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x44, 0x12, 0x14, 0x0a, 0x05, + 0x69, 0x73, 0x53, 0x53, 0x4f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x73, 0x53, + 0x53, 0x4f, 0x12, 0x26, 0x0a, 0x0e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x72, 0x67, 0x61, + 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x61, + 0x72, 0x74, 0x6e, 0x65, 0x72, 0x49, 0x44, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, + 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x49, 0x44, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x65, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, + 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x22, 0x36, 0x0a, 0x14, 0x4c, 0x6f, + 0x6f, 0x6b, 0x75, 0x70, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x4e, 0x49, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, + 0x4e, 0x49, 0x22, 0x4d, 0x0a, 0x15, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x43, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x20, 0x0a, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, + 0x65, 0x32, 0xa8, 0x02, 0x0a, 0x10, 0x41, 0x75, 0x64, 0x69, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x72, + 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x82, 0x01, 0x0a, 0x0a, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, + 0x70, 0x55, 0x73, 0x65, 0x72, 0x12, 0x27, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, + 0x76, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f, 0x6f, + 0x6b, 0x75, 0x70, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, + 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, + 0x79, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x55, 0x73, 0x65, 0x72, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, + 0x12, 0x19, 0x2f, 0x76, 0x32, 0x2f, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2f, 0x61, 0x75, 0x64, + 0x69, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x12, 0x8e, 0x01, 0x0a, 0x0d, + 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x2a, 0x2e, + 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, + 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x43, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x72, 0x61, 0x66, 0x61, + 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x72, 0x70, 0x63, + 0x2e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x12, 0x1c, + 0x2f, 0x76, 0x32, 0x2f, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2f, 0x61, 0x75, 0x64, 0x69, 0x74, + 0x49, 0x6e, 0x66, 0x6f, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x42, 0xd5, 0x04, 0x0a, + 0x18, 0x63, 0x6f, 0x6d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, + 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x72, 0x70, 0x63, 0x42, 0x0e, 0x41, 0x75, 0x64, 0x69, 0x74, + 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x61, 0x66, 0x61, 0x79, 0x53, 0x79, 0x73, + 0x74, 0x65, 0x6d, 0x73, 0x2f, 0x72, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x62, 0x61, 0x73, 0x65, + 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x73, 0x65, 0x6e, + 0x74, 0x72, 0x79, 0xa2, 0x02, 0x04, 0x52, 0x44, 0x53, 0x52, 0xaa, 0x02, 0x14, 0x52, 0x61, 0x66, + 0x61, 0x79, 0x2e, 0x44, 0x65, 0x76, 0x2e, 0x53, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x52, 0x70, + 0x63, 0xca, 0x02, 0x14, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x53, 0x65, + 0x6e, 0x74, 0x72, 0x79, 0x5c, 0x52, 0x70, 0x63, 0xe2, 0x02, 0x20, 0x52, 0x61, 0x66, 0x61, 0x79, + 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x53, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x5c, 0x52, 0x70, 0x63, 0x5c, + 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x17, 0x52, 0x61, + 0x66, 0x61, 0x79, 0x3a, 0x3a, 0x44, 0x65, 0x76, 0x3a, 0x3a, 0x53, 0x65, 0x6e, 0x74, 0x72, 0x79, + 0x3a, 0x3a, 0x52, 0x70, 0x63, 0x92, 0x41, 0xeb, 0x02, 0x12, 0x34, 0x0a, 0x20, 0x53, 0x65, 0x6e, + 0x74, 0x72, 0x79, 0x20, 0x41, 0x75, 0x64, 0x69, 0x74, 0x20, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x22, 0x0b, 0x0a, + 0x09, 0x52, 0x61, 0x66, 0x61, 0x79, 0x20, 0x44, 0x65, 0x76, 0x32, 0x03, 0x32, 0x2e, 0x30, 0x2a, + 0x01, 0x02, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, + 0x6a, 0x73, 0x6f, 0x6e, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2f, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x79, 0x61, 0x6d, 0x6c, 0x52, 0x50, 0x0a, 0x03, 0x34, 0x30, + 0x33, 0x12, 0x49, 0x0a, 0x47, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, + 0x65, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x64, 0x6f, 0x65, 0x73, + 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x20, 0x74, + 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x52, 0x3b, 0x0a, 0x03, + 0x34, 0x30, 0x34, 0x12, 0x34, 0x0a, 0x2a, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, + 0x77, 0x68, 0x65, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x65, 0x78, 0x69, 0x73, 0x74, + 0x2e, 0x12, 0x06, 0x0a, 0x04, 0x9a, 0x02, 0x01, 0x07, 0x5a, 0x38, 0x0a, 0x25, 0x0a, 0x0a, 0x41, + 0x70, 0x69, 0x4b, 0x65, 0x79, 0x41, 0x75, 0x74, 0x68, 0x12, 0x17, 0x08, 0x02, 0x1a, 0x11, 0x58, + 0x2d, 0x52, 0x41, 0x46, 0x41, 0x59, 0x2d, 0x41, 0x50, 0x49, 0x2d, 0x4b, 0x45, 0x59, 0x49, 0x44, + 0x20, 0x02, 0x0a, 0x0f, 0x0a, 0x09, 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, 0x68, 0x12, + 0x02, 0x08, 0x01, 0x62, 0x1f, 0x0a, 0x0e, 0x0a, 0x0a, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x41, + 0x75, 0x74, 0x68, 0x12, 0x00, 0x0a, 0x0d, 0x0a, 0x09, 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, + 0x74, 0x68, 0x12, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_proto_rpc_sentry_audit_info_proto_rawDescOnce sync.Once + file_proto_rpc_sentry_audit_info_proto_rawDescData = file_proto_rpc_sentry_audit_info_proto_rawDesc +) + +func file_proto_rpc_sentry_audit_info_proto_rawDescGZIP() []byte { + file_proto_rpc_sentry_audit_info_proto_rawDescOnce.Do(func() { + file_proto_rpc_sentry_audit_info_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_rpc_sentry_audit_info_proto_rawDescData) + }) + return file_proto_rpc_sentry_audit_info_proto_rawDescData +} + +var file_proto_rpc_sentry_audit_info_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_proto_rpc_sentry_audit_info_proto_goTypes = []interface{}{ + (*LookupUserRequest)(nil), // 0: rafay.dev.sentry.rpc.LookupUserRequest + (*LookupUserResponse)(nil), // 1: rafay.dev.sentry.rpc.LookupUserResponse + (*LookupClusterRequest)(nil), // 2: rafay.dev.sentry.rpc.LookupClusterRequest + (*LookupClusterResponse)(nil), // 3: rafay.dev.sentry.rpc.LookupClusterResponse +} +var file_proto_rpc_sentry_audit_info_proto_depIdxs = []int32{ + 0, // 0: rafay.dev.sentry.rpc.AuditInformation.LookupUser:input_type -> rafay.dev.sentry.rpc.LookupUserRequest + 2, // 1: rafay.dev.sentry.rpc.AuditInformation.LookupCluster:input_type -> rafay.dev.sentry.rpc.LookupClusterRequest + 1, // 2: rafay.dev.sentry.rpc.AuditInformation.LookupUser:output_type -> rafay.dev.sentry.rpc.LookupUserResponse + 3, // 3: rafay.dev.sentry.rpc.AuditInformation.LookupCluster:output_type -> rafay.dev.sentry.rpc.LookupClusterResponse + 2, // [2:4] is the sub-list for method output_type + 0, // [0:2] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_proto_rpc_sentry_audit_info_proto_init() } +func file_proto_rpc_sentry_audit_info_proto_init() { + if File_proto_rpc_sentry_audit_info_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_proto_rpc_sentry_audit_info_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LookupUserRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_rpc_sentry_audit_info_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LookupUserResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_rpc_sentry_audit_info_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LookupClusterRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_rpc_sentry_audit_info_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LookupClusterResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_proto_rpc_sentry_audit_info_proto_rawDesc, + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_proto_rpc_sentry_audit_info_proto_goTypes, + DependencyIndexes: file_proto_rpc_sentry_audit_info_proto_depIdxs, + MessageInfos: file_proto_rpc_sentry_audit_info_proto_msgTypes, + }.Build() + File_proto_rpc_sentry_audit_info_proto = out.File + file_proto_rpc_sentry_audit_info_proto_rawDesc = nil + file_proto_rpc_sentry_audit_info_proto_goTypes = nil + file_proto_rpc_sentry_audit_info_proto_depIdxs = nil +} diff --git a/components/common/proto/rpc/sentry/audit_info.pb.gw.go b/components/common/proto/rpc/sentry/audit_info.pb.gw.go new file mode 100644 index 0000000..e9254c7 --- /dev/null +++ b/components/common/proto/rpc/sentry/audit_info.pb.gw.go @@ -0,0 +1,252 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: proto/rpc/sentry/audit_info.proto + +/* +Package sentry is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package sentry + +import ( + "context" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + +var ( + filter_AuditInformation_LookupUser_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_AuditInformation_LookupUser_0(ctx context.Context, marshaler runtime.Marshaler, client AuditInformationClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq LookupUserRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_AuditInformation_LookupUser_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.LookupUser(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_AuditInformation_LookupUser_0(ctx context.Context, marshaler runtime.Marshaler, server AuditInformationServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq LookupUserRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_AuditInformation_LookupUser_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.LookupUser(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_AuditInformation_LookupCluster_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_AuditInformation_LookupCluster_0(ctx context.Context, marshaler runtime.Marshaler, client AuditInformationClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq LookupClusterRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_AuditInformation_LookupCluster_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.LookupCluster(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_AuditInformation_LookupCluster_0(ctx context.Context, marshaler runtime.Marshaler, server AuditInformationServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq LookupClusterRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_AuditInformation_LookupCluster_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.LookupCluster(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterAuditInformationHandlerServer registers the http handlers for service AuditInformation to "mux". +// UnaryRPC :call AuditInformationServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterAuditInformationHandlerFromEndpoint instead. +func RegisterAuditInformationHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AuditInformationServer) error { + + mux.Handle("GET", pattern_AuditInformation_LookupUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.sentry.rpc.AuditInformation/LookupUser", runtime.WithHTTPPathPattern("/v2/sentry/auditInfo/user")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_AuditInformation_LookupUser_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_AuditInformation_LookupUser_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_AuditInformation_LookupCluster_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.sentry.rpc.AuditInformation/LookupCluster", runtime.WithHTTPPathPattern("/v2/sentry/auditInfo/cluster")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_AuditInformation_LookupCluster_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_AuditInformation_LookupCluster_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterAuditInformationHandlerFromEndpoint is same as RegisterAuditInformationHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterAuditInformationHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterAuditInformationHandler(ctx, mux, conn) +} + +// RegisterAuditInformationHandler registers the http handlers for service AuditInformation to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterAuditInformationHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterAuditInformationHandlerClient(ctx, mux, NewAuditInformationClient(conn)) +} + +// RegisterAuditInformationHandlerClient registers the http handlers for service AuditInformation +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AuditInformationClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AuditInformationClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "AuditInformationClient" to call the correct interceptors. +func RegisterAuditInformationHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AuditInformationClient) error { + + mux.Handle("GET", pattern_AuditInformation_LookupUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.sentry.rpc.AuditInformation/LookupUser", runtime.WithHTTPPathPattern("/v2/sentry/auditInfo/user")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_AuditInformation_LookupUser_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_AuditInformation_LookupUser_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_AuditInformation_LookupCluster_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.sentry.rpc.AuditInformation/LookupCluster", runtime.WithHTTPPathPattern("/v2/sentry/auditInfo/cluster")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_AuditInformation_LookupCluster_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_AuditInformation_LookupCluster_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_AuditInformation_LookupUser_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v2", "sentry", "auditInfo", "user"}, "")) + + pattern_AuditInformation_LookupCluster_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v2", "sentry", "auditInfo", "cluster"}, "")) +) + +var ( + forward_AuditInformation_LookupUser_0 = runtime.ForwardResponseMessage + + forward_AuditInformation_LookupCluster_0 = runtime.ForwardResponseMessage +) diff --git a/components/common/proto/rpc/sentry/audit_info.proto b/components/common/proto/rpc/sentry/audit_info.proto new file mode 100644 index 0000000..881a031 --- /dev/null +++ b/components/common/proto/rpc/sentry/audit_info.proto @@ -0,0 +1,94 @@ +syntax = "proto3"; +package rafay.dev.sentry.rpc; + +import "google/api/annotations.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; +import "proto/types/commonpb/v3/common.proto"; +import "proto/types/sentry/sentry.proto"; + +option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { + info : { + title : "Sentry Audit Information Service" + version : "2.0" + contact : {name : "Rafay Dev"} + } + schemes : HTTPS + consumes : "application/json" + consumes : "application/yaml" + produces : "application/json" + produces : "application/yaml" + security_definitions : { + security : { + key : "BasicAuth" + value : {type : TYPE_BASIC} + } + security : { + key : "ApiKeyAuth" + value : {type : TYPE_API_KEY in : IN_HEADER name : "X-RAFAY-API-KEYID"} + } + } + security : { + security_requirement : { + key : "BasicAuth" + value : {} + } + security_requirement : { + key : "ApiKeyAuth" + value : {} + } + } + responses : { + key : "403" + value : { + description : "Returned when the user does not have permission to access " + "the resource." + } + } + responses : { + key : "404" + value : { + description : "Returned when the resource does not exist." + schema : {json_schema : {type : STRING}} + } + } +}; + +message LookupUserRequest { + string userCN = 1; +} + +message LookupUserResponse { + string userName = 1; + string accountID = 2; + string isSSO = 3; + string organizationID = 4; + string partnerID = 5; + string sessionType = 6; +} + +message LookupClusterRequest { + string clusterSNI = 1; +} + +message LookupClusterResponse { + string name = 1; + string displayName = 2; +} + +service AuditInformation { + + rpc LookupUser(LookupUserRequest) + returns (LookupUserResponse) { + option (google.api.http) = { + get : "/v2/sentry/auditInfo/user" + }; + }; + + rpc LookupCluster(LookupClusterRequest) + returns (LookupClusterResponse) { + option (google.api.http) = { + get : "/v2/sentry/auditInfo/cluster" + }; + }; + } + \ No newline at end of file diff --git a/components/common/proto/rpc/sentry/audit_info_grpc.pb.go b/components/common/proto/rpc/sentry/audit_info_grpc.pb.go new file mode 100644 index 0000000..e7bf3e8 --- /dev/null +++ b/components/common/proto/rpc/sentry/audit_info_grpc.pb.go @@ -0,0 +1,139 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.2.0 +// - protoc (unknown) +// source: proto/rpc/sentry/audit_info.proto + +package sentry + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// AuditInformationClient is the client API for AuditInformation service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type AuditInformationClient interface { + LookupUser(ctx context.Context, in *LookupUserRequest, opts ...grpc.CallOption) (*LookupUserResponse, error) + LookupCluster(ctx context.Context, in *LookupClusterRequest, opts ...grpc.CallOption) (*LookupClusterResponse, error) +} + +type auditInformationClient struct { + cc grpc.ClientConnInterface +} + +func NewAuditInformationClient(cc grpc.ClientConnInterface) AuditInformationClient { + return &auditInformationClient{cc} +} + +func (c *auditInformationClient) LookupUser(ctx context.Context, in *LookupUserRequest, opts ...grpc.CallOption) (*LookupUserResponse, error) { + out := new(LookupUserResponse) + err := c.cc.Invoke(ctx, "/rafay.dev.sentry.rpc.AuditInformation/LookupUser", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *auditInformationClient) LookupCluster(ctx context.Context, in *LookupClusterRequest, opts ...grpc.CallOption) (*LookupClusterResponse, error) { + out := new(LookupClusterResponse) + err := c.cc.Invoke(ctx, "/rafay.dev.sentry.rpc.AuditInformation/LookupCluster", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// AuditInformationServer is the server API for AuditInformation service. +// All implementations should embed UnimplementedAuditInformationServer +// for forward compatibility +type AuditInformationServer interface { + LookupUser(context.Context, *LookupUserRequest) (*LookupUserResponse, error) + LookupCluster(context.Context, *LookupClusterRequest) (*LookupClusterResponse, error) +} + +// UnimplementedAuditInformationServer should be embedded to have forward compatible implementations. +type UnimplementedAuditInformationServer struct { +} + +func (UnimplementedAuditInformationServer) LookupUser(context.Context, *LookupUserRequest) (*LookupUserResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method LookupUser not implemented") +} +func (UnimplementedAuditInformationServer) LookupCluster(context.Context, *LookupClusterRequest) (*LookupClusterResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method LookupCluster not implemented") +} + +// UnsafeAuditInformationServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to AuditInformationServer will +// result in compilation errors. +type UnsafeAuditInformationServer interface { + mustEmbedUnimplementedAuditInformationServer() +} + +func RegisterAuditInformationServer(s grpc.ServiceRegistrar, srv AuditInformationServer) { + s.RegisterService(&AuditInformation_ServiceDesc, srv) +} + +func _AuditInformation_LookupUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(LookupUserRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuditInformationServer).LookupUser(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rafay.dev.sentry.rpc.AuditInformation/LookupUser", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuditInformationServer).LookupUser(ctx, req.(*LookupUserRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AuditInformation_LookupCluster_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(LookupClusterRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuditInformationServer).LookupCluster(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rafay.dev.sentry.rpc.AuditInformation/LookupCluster", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuditInformationServer).LookupCluster(ctx, req.(*LookupClusterRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// AuditInformation_ServiceDesc is the grpc.ServiceDesc for AuditInformation service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var AuditInformation_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "rafay.dev.sentry.rpc.AuditInformation", + HandlerType: (*AuditInformationServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "LookupUser", + Handler: _AuditInformation_LookupUser_Handler, + }, + { + MethodName: "LookupCluster", + Handler: _AuditInformation_LookupCluster_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "proto/rpc/sentry/audit_info.proto", +} diff --git a/components/common/proto/rpc/sentry/bootstrap.pb.go b/components/common/proto/rpc/sentry/bootstrap.pb.go new file mode 100644 index 0000000..277ad80 --- /dev/null +++ b/components/common/proto/rpc/sentry/bootstrap.pb.go @@ -0,0 +1,821 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc (unknown) +// source: proto/rpc/sentry/bootstrap.proto + +package sentry + +import ( + v3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/commonpb/v3" + sentry "github.com/RafaySystems/rcloud-base/components/common/proto/types/sentry" + _ "github.com/gogo/protobuf/gogoproto" + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type RegisterAgentRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TemplateToken string `protobuf:"bytes,1,opt,name=templateToken,proto3" json:"templateToken,omitempty"` + TemplateName string `protobuf:"bytes,2,opt,name=templateName,proto3" json:"templateName,omitempty"` + Token string `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"` + Csr []byte `protobuf:"bytes,4,opt,name=csr,proto3" json:"csr,omitempty"` + IpAddress string `protobuf:"bytes,5,opt,name=ipAddress,proto3" json:"ipAddress,omitempty"` + Name string `protobuf:"bytes,6,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *RegisterAgentRequest) Reset() { + *x = RegisterAgentRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_rpc_sentry_bootstrap_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RegisterAgentRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RegisterAgentRequest) ProtoMessage() {} + +func (x *RegisterAgentRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_rpc_sentry_bootstrap_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RegisterAgentRequest.ProtoReflect.Descriptor instead. +func (*RegisterAgentRequest) Descriptor() ([]byte, []int) { + return file_proto_rpc_sentry_bootstrap_proto_rawDescGZIP(), []int{0} +} + +func (x *RegisterAgentRequest) GetTemplateToken() string { + if x != nil { + return x.TemplateToken + } + return "" +} + +func (x *RegisterAgentRequest) GetTemplateName() string { + if x != nil { + return x.TemplateName + } + return "" +} + +func (x *RegisterAgentRequest) GetToken() string { + if x != nil { + return x.Token + } + return "" +} + +func (x *RegisterAgentRequest) GetCsr() []byte { + if x != nil { + return x.Csr + } + return nil +} + +func (x *RegisterAgentRequest) GetIpAddress() string { + if x != nil { + return x.IpAddress + } + return "" +} + +func (x *RegisterAgentRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type RegisterAgentResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Certificate []byte `protobuf:"bytes,1,opt,name=certificate,proto3" json:"certificate,omitempty"` + CaCertificate []byte `protobuf:"bytes,2,opt,name=caCertificate,proto3" json:"caCertificate,omitempty"` +} + +func (x *RegisterAgentResponse) Reset() { + *x = RegisterAgentResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_rpc_sentry_bootstrap_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RegisterAgentResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RegisterAgentResponse) ProtoMessage() {} + +func (x *RegisterAgentResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_rpc_sentry_bootstrap_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RegisterAgentResponse.ProtoReflect.Descriptor instead. +func (*RegisterAgentResponse) Descriptor() ([]byte, []int) { + return file_proto_rpc_sentry_bootstrap_proto_rawDescGZIP(), []int{1} +} + +func (x *RegisterAgentResponse) GetCertificate() []byte { + if x != nil { + return x.Certificate + } + return nil +} + +func (x *RegisterAgentResponse) GetCaCertificate() []byte { + if x != nil { + return x.CaCertificate + } + return nil +} + +type GetBootstrapAgentsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Opts *v3.QueryOptions `protobuf:"bytes,1,opt,name=opts,proto3" json:"opts,omitempty"` + TemplateScope string `protobuf:"bytes,2,opt,name=templateScope,proto3" json:"templateScope,omitempty"` +} + +func (x *GetBootstrapAgentsRequest) Reset() { + *x = GetBootstrapAgentsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_rpc_sentry_bootstrap_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetBootstrapAgentsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetBootstrapAgentsRequest) ProtoMessage() {} + +func (x *GetBootstrapAgentsRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_rpc_sentry_bootstrap_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetBootstrapAgentsRequest.ProtoReflect.Descriptor instead. +func (*GetBootstrapAgentsRequest) Descriptor() ([]byte, []int) { + return file_proto_rpc_sentry_bootstrap_proto_rawDescGZIP(), []int{2} +} + +func (x *GetBootstrapAgentsRequest) GetOpts() *v3.QueryOptions { + if x != nil { + return x.Opts + } + return nil +} + +func (x *GetBootstrapAgentsRequest) GetTemplateScope() string { + if x != nil { + return x.TemplateScope + } + return "" +} + +type DeleteBootstrapAgentResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *DeleteBootstrapAgentResponse) Reset() { + *x = DeleteBootstrapAgentResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_rpc_sentry_bootstrap_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteBootstrapAgentResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteBootstrapAgentResponse) ProtoMessage() {} + +func (x *DeleteBootstrapAgentResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_rpc_sentry_bootstrap_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteBootstrapAgentResponse.ProtoReflect.Descriptor instead. +func (*DeleteBootstrapAgentResponse) Descriptor() ([]byte, []int) { + return file_proto_rpc_sentry_bootstrap_proto_rawDescGZIP(), []int{3} +} + +type DeleteRelayNetworkResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *DeleteRelayNetworkResponse) Reset() { + *x = DeleteRelayNetworkResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_rpc_sentry_bootstrap_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteRelayNetworkResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteRelayNetworkResponse) ProtoMessage() {} + +func (x *DeleteRelayNetworkResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_rpc_sentry_bootstrap_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteRelayNetworkResponse.ProtoReflect.Descriptor instead. +func (*DeleteRelayNetworkResponse) Descriptor() ([]byte, []int) { + return file_proto_rpc_sentry_bootstrap_proto_rawDescGZIP(), []int{4} +} + +type GetRelayNetworksRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Opts *v3.QueryOptions `protobuf:"bytes,1,opt,name=opts,proto3" json:"opts,omitempty"` +} + +func (x *GetRelayNetworksRequest) Reset() { + *x = GetRelayNetworksRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_rpc_sentry_bootstrap_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetRelayNetworksRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetRelayNetworksRequest) ProtoMessage() {} + +func (x *GetRelayNetworksRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_rpc_sentry_bootstrap_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetRelayNetworksRequest.ProtoReflect.Descriptor instead. +func (*GetRelayNetworksRequest) Descriptor() ([]byte, []int) { + return file_proto_rpc_sentry_bootstrap_proto_rawDescGZIP(), []int{5} +} + +func (x *GetRelayNetworksRequest) GetOpts() *v3.QueryOptions { + if x != nil { + return x.Opts + } + return nil +} + +type RelayAgentDownloadRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metadata *v3.Metadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + ClusterScope string `protobuf:"bytes,2,opt,name=clusterScope,proto3" json:"clusterScope,omitempty"` +} + +func (x *RelayAgentDownloadRequest) Reset() { + *x = RelayAgentDownloadRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_rpc_sentry_bootstrap_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RelayAgentDownloadRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RelayAgentDownloadRequest) ProtoMessage() {} + +func (x *RelayAgentDownloadRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_rpc_sentry_bootstrap_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RelayAgentDownloadRequest.ProtoReflect.Descriptor instead. +func (*RelayAgentDownloadRequest) Descriptor() ([]byte, []int) { + return file_proto_rpc_sentry_bootstrap_proto_rawDescGZIP(), []int{6} +} + +func (x *RelayAgentDownloadRequest) GetMetadata() *v3.Metadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *RelayAgentDownloadRequest) GetClusterScope() string { + if x != nil { + return x.ClusterScope + } + return "" +} + +var File_proto_rpc_sentry_bootstrap_proto protoreflect.FileDescriptor + +var file_proto_rpc_sentry_bootstrap_proto_rawDesc = []byte{ + 0x0a, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x73, 0x65, 0x6e, 0x74, + 0x72, 0x79, 0x2f, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x14, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, 0x65, + 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x72, 0x70, 0x63, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, + 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x70, 0x62, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, + 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2f, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x22, 0xba, 0x01, 0x0a, 0x14, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, + 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x0d, + 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0d, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x12, 0x22, 0x0a, 0x0c, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4e, 0x61, + 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, + 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x10, 0x0a, 0x03, + 0x63, 0x73, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x63, 0x73, 0x72, 0x12, 0x1c, + 0x0a, 0x09, 0x69, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x69, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x22, 0x5f, 0x0a, 0x15, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x41, 0x67, 0x65, 0x6e, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x65, 0x72, + 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, + 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x63, + 0x61, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x0d, 0x63, 0x61, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, + 0x65, 0x22, 0x88, 0x01, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, + 0x61, 0x70, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x45, 0x0a, 0x04, 0x6f, 0x70, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, + 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0xd0, 0xde, 0x1f, 0x01, + 0x52, 0x04, 0x6f, 0x70, 0x74, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, + 0x74, 0x65, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x74, + 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x22, 0x1e, 0x0a, 0x1c, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x41, + 0x67, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, 0x0a, 0x1a, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x4e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x60, 0x0a, 0x17, 0x47, 0x65, + 0x74, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x45, 0x0a, 0x04, 0x6f, 0x70, 0x74, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x08, 0xc8, 0xde, + 0x1f, 0x00, 0xd0, 0xde, 0x1f, 0x01, 0x52, 0x04, 0x6f, 0x70, 0x74, 0x73, 0x22, 0xb1, 0x01, 0x0a, + 0x19, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x44, 0x6f, 0x77, 0x6e, 0x6c, + 0x6f, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x70, 0x0a, 0x08, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x72, + 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x42, 0x2f, 0x92, 0x41, 0x24, 0x2a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x32, 0x18, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, + 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0xc8, 0xde, 0x1f, 0x00, 0xd0, 0xde, + 0x1f, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x22, 0x0a, 0x0c, + 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x63, 0x6f, 0x70, 0x65, + 0x32, 0xef, 0x10, 0x0a, 0x09, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x12, 0x9c, + 0x01, 0x0a, 0x13, 0x50, 0x61, 0x74, 0x63, 0x68, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, + 0x70, 0x49, 0x6e, 0x66, 0x72, 0x61, 0x12, 0x26, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, + 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, + 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x49, 0x6e, 0x66, 0x72, 0x61, 0x1a, 0x26, + 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, + 0x70, 0x49, 0x6e, 0x66, 0x72, 0x61, 0x22, 0x35, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x1a, 0x2a, + 0x2f, 0x76, 0x32, 0x2f, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2f, 0x62, 0x6f, 0x6f, 0x74, 0x73, + 0x74, 0x72, 0x61, 0x70, 0x2f, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x3a, 0x01, 0x2a, 0x12, 0x97, 0x01, + 0x0a, 0x11, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x49, 0x6e, + 0x66, 0x72, 0x61, 0x12, 0x26, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x42, 0x6f, 0x6f, + 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x49, 0x6e, 0x66, 0x72, 0x61, 0x1a, 0x26, 0x2e, 0x72, 0x61, + 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x65, + 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x49, 0x6e, + 0x66, 0x72, 0x61, 0x22, 0x32, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c, 0x12, 0x2a, 0x2f, 0x76, 0x32, + 0x2f, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2f, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, + 0x70, 0x2f, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x12, 0xb7, 0x01, 0x0a, 0x1b, 0x50, 0x61, 0x74, 0x63, + 0x68, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x54, + 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x2e, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, + 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, + 0x2e, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x54, + 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x1a, 0x2e, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, + 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, + 0x2e, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x54, + 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x22, 0x38, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x32, 0x1a, + 0x2d, 0x2f, 0x76, 0x32, 0x2f, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2f, 0x62, 0x6f, 0x6f, 0x74, + 0x73, 0x74, 0x72, 0x61, 0x70, 0x2f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2f, 0x7b, + 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x3a, 0x01, + 0x2a, 0x12, 0xb2, 0x01, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, + 0x61, 0x70, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, + 0x2e, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, + 0x61, 0x70, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x1a, + 0x2e, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, + 0x61, 0x70, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x22, + 0x35, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x12, 0x2d, 0x2f, 0x76, 0x32, 0x2f, 0x73, 0x65, 0x6e, + 0x74, 0x72, 0x79, 0x2f, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2f, 0x74, 0x65, + 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x12, 0xa0, 0x01, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x42, 0x6f, + 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x54, 0x65, 0x6d, 0x70, + 0x6c, 0x61, 0x74, 0x65, 0x73, 0x12, 0x27, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, + 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, + 0x33, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x32, + 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, + 0x70, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4c, 0x69, + 0x73, 0x74, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x12, 0x1d, 0x2f, 0x76, 0x32, 0x2f, + 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2f, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, + 0x2f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0xb6, 0x01, 0x0a, 0x16, 0x52, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x41, + 0x67, 0x65, 0x6e, 0x74, 0x12, 0x2a, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, + 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x65, 0x72, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2b, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, 0x65, 0x6e, + 0x74, 0x72, 0x79, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, + 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x43, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x3d, 0x22, 0x38, 0x2f, 0x76, 0x32, 0x2f, 0x73, 0x65, 0x6e, 0x74, 0x72, + 0x79, 0x2f, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2f, 0x7b, 0x74, 0x65, 0x6d, + 0x70, 0x6c, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x3d, 0x74, 0x65, 0x6d, 0x70, 0x6c, + 0x61, 0x74, 0x65, 0x2f, 0x2a, 0x7d, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x3a, + 0x01, 0x2a, 0x12, 0xbf, 0x01, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, + 0x72, 0x61, 0x70, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x26, + 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, + 0x70, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x1a, 0x23, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, + 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x42, 0x6f, 0x64, 0x79, 0x22, 0x57, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x51, 0x12, 0x4f, 0x2f, 0x76, 0x32, 0x2f, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2f, + 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2f, 0x7b, 0x73, 0x70, 0x65, 0x63, 0x2e, + 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x66, 0x3d, 0x74, 0x65, 0x6d, 0x70, + 0x6c, 0x61, 0x74, 0x65, 0x2f, 0x2a, 0x7d, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2f, 0x7b, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x12, 0xab, 0x01, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, + 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x12, 0x26, 0x2e, + 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, + 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, + 0x41, 0x67, 0x65, 0x6e, 0x74, 0x1a, 0x26, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, + 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x42, + 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x22, 0x43, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x3d, 0x22, 0x38, 0x2f, 0x76, 0x32, 0x2f, 0x73, 0x65, 0x6e, 0x74, 0x72, + 0x79, 0x2f, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2f, 0x7b, 0x73, 0x70, 0x65, + 0x63, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x66, 0x3d, 0x74, 0x65, + 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2f, 0x2a, 0x7d, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x3a, + 0x01, 0x2a, 0x12, 0xb5, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, + 0x72, 0x61, 0x70, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x12, 0x26, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, + 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, + 0x79, 0x2e, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x41, 0x67, 0x65, 0x6e, 0x74, + 0x1a, 0x26, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, + 0x72, 0x61, 0x70, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x22, 0x50, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4a, + 0x12, 0x48, 0x2f, 0x76, 0x32, 0x2f, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2f, 0x62, 0x6f, 0x6f, + 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2f, 0x7b, 0x73, 0x70, 0x65, 0x63, 0x2e, 0x74, 0x65, 0x6d, + 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x66, 0x3d, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, + 0x65, 0x2f, 0x2a, 0x7d, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x12, 0xb0, 0x01, 0x0a, 0x12, 0x47, + 0x65, 0x74, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x41, 0x67, 0x65, 0x6e, 0x74, + 0x73, 0x12, 0x2f, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, 0x65, + 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6f, 0x74, + 0x73, 0x74, 0x72, 0x61, 0x70, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x42, 0x6f, 0x6f, 0x74, + 0x73, 0x74, 0x72, 0x61, 0x70, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x3d, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x37, 0x12, 0x35, 0x2f, 0x76, 0x32, 0x2f, 0x73, 0x65, 0x6e, 0x74, + 0x72, 0x79, 0x2f, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2f, 0x7b, 0x74, 0x65, + 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x3d, 0x74, 0x65, 0x6d, 0x70, + 0x6c, 0x61, 0x74, 0x65, 0x2f, 0x2a, 0x7d, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x12, 0xc4, 0x01, + 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, + 0x70, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x12, 0x26, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, + 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, + 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x1a, 0x32, + 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, + 0x79, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x74, + 0x73, 0x74, 0x72, 0x61, 0x70, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x50, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4a, 0x2a, 0x48, 0x2f, 0x76, 0x32, 0x2f, + 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2f, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, + 0x2f, 0x7b, 0x73, 0x70, 0x65, 0x63, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, + 0x65, 0x66, 0x3d, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2f, 0x2a, 0x7d, 0x2f, 0x61, + 0x67, 0x65, 0x6e, 0x74, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6e, + 0x61, 0x6d, 0x65, 0x7d, 0x12, 0xbb, 0x01, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, + 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x12, 0x26, 0x2e, + 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, + 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, + 0x41, 0x67, 0x65, 0x6e, 0x74, 0x1a, 0x26, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, + 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x42, + 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x22, 0x53, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x4d, 0x1a, 0x48, 0x2f, 0x76, 0x32, 0x2f, 0x73, 0x65, 0x6e, 0x74, 0x72, + 0x79, 0x2f, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x2f, 0x7b, 0x73, 0x70, 0x65, + 0x63, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x66, 0x3d, 0x74, 0x65, + 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2f, 0x2a, 0x7d, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2f, + 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x3a, + 0x01, 0x2a, 0x42, 0x86, 0x05, 0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, + 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x72, 0x70, 0x63, 0x42, + 0x0e, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x61, + 0x66, 0x61, 0x79, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x2f, 0x72, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2d, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, + 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, + 0x70, 0x63, 0x2f, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0xa2, 0x02, 0x04, 0x52, 0x44, 0x53, 0x52, + 0xaa, 0x02, 0x14, 0x52, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x44, 0x65, 0x76, 0x2e, 0x53, 0x65, 0x6e, + 0x74, 0x72, 0x79, 0x2e, 0x52, 0x70, 0x63, 0xca, 0x02, 0x14, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, + 0x44, 0x65, 0x76, 0x5c, 0x53, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x5c, 0x52, 0x70, 0x63, 0xe2, 0x02, + 0x20, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x53, 0x65, 0x6e, 0x74, 0x72, + 0x79, 0x5c, 0x52, 0x70, 0x63, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0xea, 0x02, 0x17, 0x52, 0x61, 0x66, 0x61, 0x79, 0x3a, 0x3a, 0x44, 0x65, 0x76, 0x3a, 0x3a, + 0x53, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x3a, 0x3a, 0x52, 0x70, 0x63, 0x92, 0x41, 0x88, 0x03, 0x12, + 0x2c, 0x0a, 0x18, 0x53, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x20, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, + 0x72, 0x61, 0x70, 0x20, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x22, 0x0b, 0x0a, 0x09, 0x52, + 0x61, 0x66, 0x61, 0x79, 0x20, 0x44, 0x65, 0x76, 0x32, 0x03, 0x32, 0x2e, 0x30, 0x2a, 0x01, 0x02, + 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, + 0x6f, 0x6e, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, + 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2f, 0x79, 0x61, 0x6d, 0x6c, 0x52, 0x50, 0x0a, 0x03, 0x34, 0x30, 0x33, 0x12, + 0x49, 0x0a, 0x47, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, + 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, + 0x6f, 0x74, 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x65, + 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x52, 0x33, 0x0a, 0x03, 0x34, 0x30, + 0x34, 0x12, 0x2c, 0x0a, 0x2a, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, + 0x65, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, + 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x65, 0x78, 0x69, 0x73, 0x74, 0x2e, 0x52, + 0x2b, 0x0a, 0x03, 0x35, 0x30, 0x30, 0x12, 0x24, 0x0a, 0x22, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, + 0x65, 0x64, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x20, + 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5a, 0x38, 0x0a, 0x25, + 0x0a, 0x0a, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x41, 0x75, 0x74, 0x68, 0x12, 0x17, 0x08, 0x02, + 0x1a, 0x11, 0x58, 0x2d, 0x52, 0x41, 0x46, 0x41, 0x59, 0x2d, 0x41, 0x50, 0x49, 0x2d, 0x4b, 0x45, + 0x59, 0x49, 0x44, 0x20, 0x02, 0x0a, 0x0f, 0x0a, 0x09, 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, + 0x74, 0x68, 0x12, 0x02, 0x08, 0x01, 0x62, 0x1f, 0x0a, 0x0e, 0x0a, 0x0a, 0x41, 0x70, 0x69, 0x4b, + 0x65, 0x79, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0x0a, 0x0d, 0x0a, 0x09, 0x42, 0x61, 0x73, 0x69, + 0x63, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0xc8, 0xe2, 0x1e, 0x01, 0xd0, 0xe2, 0x1e, 0x01, 0xe0, + 0xe2, 0x1e, 0x01, 0xc0, 0xe3, 0x1e, 0x01, 0xc8, 0xe3, 0x1e, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_proto_rpc_sentry_bootstrap_proto_rawDescOnce sync.Once + file_proto_rpc_sentry_bootstrap_proto_rawDescData = file_proto_rpc_sentry_bootstrap_proto_rawDesc +) + +func file_proto_rpc_sentry_bootstrap_proto_rawDescGZIP() []byte { + file_proto_rpc_sentry_bootstrap_proto_rawDescOnce.Do(func() { + file_proto_rpc_sentry_bootstrap_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_rpc_sentry_bootstrap_proto_rawDescData) + }) + return file_proto_rpc_sentry_bootstrap_proto_rawDescData +} + +var file_proto_rpc_sentry_bootstrap_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_proto_rpc_sentry_bootstrap_proto_goTypes = []interface{}{ + (*RegisterAgentRequest)(nil), // 0: rafay.dev.sentry.rpc.RegisterAgentRequest + (*RegisterAgentResponse)(nil), // 1: rafay.dev.sentry.rpc.RegisterAgentResponse + (*GetBootstrapAgentsRequest)(nil), // 2: rafay.dev.sentry.rpc.GetBootstrapAgentsRequest + (*DeleteBootstrapAgentResponse)(nil), // 3: rafay.dev.sentry.rpc.DeleteBootstrapAgentResponse + (*DeleteRelayNetworkResponse)(nil), // 4: rafay.dev.sentry.rpc.DeleteRelayNetworkResponse + (*GetRelayNetworksRequest)(nil), // 5: rafay.dev.sentry.rpc.GetRelayNetworksRequest + (*RelayAgentDownloadRequest)(nil), // 6: rafay.dev.sentry.rpc.RelayAgentDownloadRequest + (*v3.QueryOptions)(nil), // 7: rafay.dev.types.common.v3.QueryOptions + (*v3.Metadata)(nil), // 8: rafay.dev.types.common.v3.Metadata + (*sentry.BootstrapInfra)(nil), // 9: rafay.dev.types.sentry.BootstrapInfra + (*sentry.BootstrapAgentTemplate)(nil), // 10: rafay.dev.types.sentry.BootstrapAgentTemplate + (*sentry.BootstrapAgent)(nil), // 11: rafay.dev.types.sentry.BootstrapAgent + (*sentry.BootstrapAgentTemplateList)(nil), // 12: rafay.dev.types.sentry.BootstrapAgentTemplateList + (*v3.HttpBody)(nil), // 13: rafay.dev.types.common.v3.HttpBody + (*sentry.BootstrapAgentList)(nil), // 14: rafay.dev.types.sentry.BootstrapAgentList +} +var file_proto_rpc_sentry_bootstrap_proto_depIdxs = []int32{ + 7, // 0: rafay.dev.sentry.rpc.GetBootstrapAgentsRequest.opts:type_name -> rafay.dev.types.common.v3.QueryOptions + 7, // 1: rafay.dev.sentry.rpc.GetRelayNetworksRequest.opts:type_name -> rafay.dev.types.common.v3.QueryOptions + 8, // 2: rafay.dev.sentry.rpc.RelayAgentDownloadRequest.metadata:type_name -> rafay.dev.types.common.v3.Metadata + 9, // 3: rafay.dev.sentry.rpc.Bootstrap.PatchBootstrapInfra:input_type -> rafay.dev.types.sentry.BootstrapInfra + 9, // 4: rafay.dev.sentry.rpc.Bootstrap.GetBootstrapInfra:input_type -> rafay.dev.types.sentry.BootstrapInfra + 10, // 5: rafay.dev.sentry.rpc.Bootstrap.PatchBootstrapAgentTemplate:input_type -> rafay.dev.types.sentry.BootstrapAgentTemplate + 10, // 6: rafay.dev.sentry.rpc.Bootstrap.GetBootstrapAgentTemplate:input_type -> rafay.dev.types.sentry.BootstrapAgentTemplate + 7, // 7: rafay.dev.sentry.rpc.Bootstrap.GetBootstrapAgentTemplates:input_type -> rafay.dev.types.common.v3.QueryOptions + 0, // 8: rafay.dev.sentry.rpc.Bootstrap.RegisterBootstrapAgent:input_type -> rafay.dev.sentry.rpc.RegisterAgentRequest + 11, // 9: rafay.dev.sentry.rpc.Bootstrap.GetBootstrapAgentConfig:input_type -> rafay.dev.types.sentry.BootstrapAgent + 11, // 10: rafay.dev.sentry.rpc.Bootstrap.CreateBootstrapAgent:input_type -> rafay.dev.types.sentry.BootstrapAgent + 11, // 11: rafay.dev.sentry.rpc.Bootstrap.GetBootstrapAgent:input_type -> rafay.dev.types.sentry.BootstrapAgent + 2, // 12: rafay.dev.sentry.rpc.Bootstrap.GetBootstrapAgents:input_type -> rafay.dev.sentry.rpc.GetBootstrapAgentsRequest + 11, // 13: rafay.dev.sentry.rpc.Bootstrap.DeleteBootstrapAgent:input_type -> rafay.dev.types.sentry.BootstrapAgent + 11, // 14: rafay.dev.sentry.rpc.Bootstrap.UpdateBootstrapAgent:input_type -> rafay.dev.types.sentry.BootstrapAgent + 9, // 15: rafay.dev.sentry.rpc.Bootstrap.PatchBootstrapInfra:output_type -> rafay.dev.types.sentry.BootstrapInfra + 9, // 16: rafay.dev.sentry.rpc.Bootstrap.GetBootstrapInfra:output_type -> rafay.dev.types.sentry.BootstrapInfra + 10, // 17: rafay.dev.sentry.rpc.Bootstrap.PatchBootstrapAgentTemplate:output_type -> rafay.dev.types.sentry.BootstrapAgentTemplate + 10, // 18: rafay.dev.sentry.rpc.Bootstrap.GetBootstrapAgentTemplate:output_type -> rafay.dev.types.sentry.BootstrapAgentTemplate + 12, // 19: rafay.dev.sentry.rpc.Bootstrap.GetBootstrapAgentTemplates:output_type -> rafay.dev.types.sentry.BootstrapAgentTemplateList + 1, // 20: rafay.dev.sentry.rpc.Bootstrap.RegisterBootstrapAgent:output_type -> rafay.dev.sentry.rpc.RegisterAgentResponse + 13, // 21: rafay.dev.sentry.rpc.Bootstrap.GetBootstrapAgentConfig:output_type -> rafay.dev.types.common.v3.HttpBody + 11, // 22: rafay.dev.sentry.rpc.Bootstrap.CreateBootstrapAgent:output_type -> rafay.dev.types.sentry.BootstrapAgent + 11, // 23: rafay.dev.sentry.rpc.Bootstrap.GetBootstrapAgent:output_type -> rafay.dev.types.sentry.BootstrapAgent + 14, // 24: rafay.dev.sentry.rpc.Bootstrap.GetBootstrapAgents:output_type -> rafay.dev.types.sentry.BootstrapAgentList + 3, // 25: rafay.dev.sentry.rpc.Bootstrap.DeleteBootstrapAgent:output_type -> rafay.dev.sentry.rpc.DeleteBootstrapAgentResponse + 11, // 26: rafay.dev.sentry.rpc.Bootstrap.UpdateBootstrapAgent:output_type -> rafay.dev.types.sentry.BootstrapAgent + 15, // [15:27] is the sub-list for method output_type + 3, // [3:15] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_proto_rpc_sentry_bootstrap_proto_init() } +func file_proto_rpc_sentry_bootstrap_proto_init() { + if File_proto_rpc_sentry_bootstrap_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_proto_rpc_sentry_bootstrap_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RegisterAgentRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_rpc_sentry_bootstrap_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RegisterAgentResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_rpc_sentry_bootstrap_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetBootstrapAgentsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_rpc_sentry_bootstrap_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteBootstrapAgentResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_rpc_sentry_bootstrap_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteRelayNetworkResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_rpc_sentry_bootstrap_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetRelayNetworksRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_rpc_sentry_bootstrap_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RelayAgentDownloadRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_proto_rpc_sentry_bootstrap_proto_rawDesc, + NumEnums: 0, + NumMessages: 7, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_proto_rpc_sentry_bootstrap_proto_goTypes, + DependencyIndexes: file_proto_rpc_sentry_bootstrap_proto_depIdxs, + MessageInfos: file_proto_rpc_sentry_bootstrap_proto_msgTypes, + }.Build() + File_proto_rpc_sentry_bootstrap_proto = out.File + file_proto_rpc_sentry_bootstrap_proto_rawDesc = nil + file_proto_rpc_sentry_bootstrap_proto_goTypes = nil + file_proto_rpc_sentry_bootstrap_proto_depIdxs = nil +} diff --git a/components/common/proto/rpc/sentry/bootstrap.pb.gw.go b/components/common/proto/rpc/sentry/bootstrap.pb.gw.go new file mode 100644 index 0000000..b49a139 --- /dev/null +++ b/components/common/proto/rpc/sentry/bootstrap.pb.gw.go @@ -0,0 +1,1528 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: proto/rpc/sentry/bootstrap.proto + +/* +Package sentry is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package sentry + +import ( + "context" + "io" + "net/http" + + "github.com/RafaySystems/rcloud-base/components/common/proto/types/commonpb/v3" + sentry_0 "github.com/RafaySystems/rcloud-base/components/common/proto/types/sentry" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + +func request_Bootstrap_PatchBootstrapInfra_0(ctx context.Context, marshaler runtime.Marshaler, client BootstrapClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq sentry_0.BootstrapInfra + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["metadata.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.name", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.name", err) + } + + msg, err := client.PatchBootstrapInfra(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Bootstrap_PatchBootstrapInfra_0(ctx context.Context, marshaler runtime.Marshaler, server BootstrapServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq sentry_0.BootstrapInfra + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["metadata.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.name", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.name", err) + } + + msg, err := server.PatchBootstrapInfra(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Bootstrap_GetBootstrapInfra_0 = &utilities.DoubleArray{Encoding: map[string]int{"metadata": 0, "name": 1}, Base: []int{1, 1, 1, 0}, Check: []int{0, 1, 2, 3}} +) + +func request_Bootstrap_GetBootstrapInfra_0(ctx context.Context, marshaler runtime.Marshaler, client BootstrapClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq sentry_0.BootstrapInfra + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["metadata.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.name", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Bootstrap_GetBootstrapInfra_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetBootstrapInfra(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Bootstrap_GetBootstrapInfra_0(ctx context.Context, marshaler runtime.Marshaler, server BootstrapServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq sentry_0.BootstrapInfra + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["metadata.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.name", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Bootstrap_GetBootstrapInfra_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetBootstrapInfra(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Bootstrap_PatchBootstrapAgentTemplate_0(ctx context.Context, marshaler runtime.Marshaler, client BootstrapClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq sentry_0.BootstrapAgentTemplate + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["metadata.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.name", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.name", err) + } + + msg, err := client.PatchBootstrapAgentTemplate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Bootstrap_PatchBootstrapAgentTemplate_0(ctx context.Context, marshaler runtime.Marshaler, server BootstrapServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq sentry_0.BootstrapAgentTemplate + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["metadata.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.name", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.name", err) + } + + msg, err := server.PatchBootstrapAgentTemplate(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Bootstrap_GetBootstrapAgentTemplate_0 = &utilities.DoubleArray{Encoding: map[string]int{"metadata": 0, "name": 1}, Base: []int{1, 1, 1, 0}, Check: []int{0, 1, 2, 3}} +) + +func request_Bootstrap_GetBootstrapAgentTemplate_0(ctx context.Context, marshaler runtime.Marshaler, client BootstrapClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq sentry_0.BootstrapAgentTemplate + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["metadata.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.name", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Bootstrap_GetBootstrapAgentTemplate_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetBootstrapAgentTemplate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Bootstrap_GetBootstrapAgentTemplate_0(ctx context.Context, marshaler runtime.Marshaler, server BootstrapServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq sentry_0.BootstrapAgentTemplate + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["metadata.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.name", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Bootstrap_GetBootstrapAgentTemplate_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetBootstrapAgentTemplate(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Bootstrap_GetBootstrapAgentTemplates_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Bootstrap_GetBootstrapAgentTemplates_0(ctx context.Context, marshaler runtime.Marshaler, client BootstrapClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq commonv3.QueryOptions + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Bootstrap_GetBootstrapAgentTemplates_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetBootstrapAgentTemplates(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Bootstrap_GetBootstrapAgentTemplates_0(ctx context.Context, marshaler runtime.Marshaler, server BootstrapServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq commonv3.QueryOptions + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Bootstrap_GetBootstrapAgentTemplates_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetBootstrapAgentTemplates(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Bootstrap_RegisterBootstrapAgent_0(ctx context.Context, marshaler runtime.Marshaler, client BootstrapClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RegisterAgentRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["templateToken"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "templateToken") + } + + protoReq.TemplateToken, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "templateToken", err) + } + + msg, err := client.RegisterBootstrapAgent(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Bootstrap_RegisterBootstrapAgent_0(ctx context.Context, marshaler runtime.Marshaler, server BootstrapServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RegisterAgentRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["templateToken"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "templateToken") + } + + protoReq.TemplateToken, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "templateToken", err) + } + + msg, err := server.RegisterBootstrapAgent(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Bootstrap_GetBootstrapAgentConfig_0 = &utilities.DoubleArray{Encoding: map[string]int{"spec": 0, "templateRef": 1, "metadata": 2, "name": 3}, Base: []int{1, 1, 1, 1, 2, 0, 0}, Check: []int{0, 1, 2, 1, 4, 3, 5}} +) + +func request_Bootstrap_GetBootstrapAgentConfig_0(ctx context.Context, marshaler runtime.Marshaler, client BootstrapClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq sentry_0.BootstrapAgent + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["spec.templateRef"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "spec.templateRef") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "spec.templateRef", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "spec.templateRef", err) + } + + val, ok = pathParams["metadata.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.name", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Bootstrap_GetBootstrapAgentConfig_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetBootstrapAgentConfig(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Bootstrap_GetBootstrapAgentConfig_0(ctx context.Context, marshaler runtime.Marshaler, server BootstrapServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq sentry_0.BootstrapAgent + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["spec.templateRef"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "spec.templateRef") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "spec.templateRef", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "spec.templateRef", err) + } + + val, ok = pathParams["metadata.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.name", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Bootstrap_GetBootstrapAgentConfig_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetBootstrapAgentConfig(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Bootstrap_CreateBootstrapAgent_0(ctx context.Context, marshaler runtime.Marshaler, client BootstrapClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq sentry_0.BootstrapAgent + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["spec.templateRef"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "spec.templateRef") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "spec.templateRef", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "spec.templateRef", err) + } + + msg, err := client.CreateBootstrapAgent(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Bootstrap_CreateBootstrapAgent_0(ctx context.Context, marshaler runtime.Marshaler, server BootstrapServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq sentry_0.BootstrapAgent + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["spec.templateRef"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "spec.templateRef") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "spec.templateRef", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "spec.templateRef", err) + } + + msg, err := server.CreateBootstrapAgent(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Bootstrap_GetBootstrapAgent_0 = &utilities.DoubleArray{Encoding: map[string]int{"spec": 0, "templateRef": 1, "metadata": 2, "name": 3}, Base: []int{1, 1, 1, 1, 2, 0, 0}, Check: []int{0, 1, 2, 1, 4, 3, 5}} +) + +func request_Bootstrap_GetBootstrapAgent_0(ctx context.Context, marshaler runtime.Marshaler, client BootstrapClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq sentry_0.BootstrapAgent + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["spec.templateRef"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "spec.templateRef") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "spec.templateRef", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "spec.templateRef", err) + } + + val, ok = pathParams["metadata.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.name", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Bootstrap_GetBootstrapAgent_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetBootstrapAgent(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Bootstrap_GetBootstrapAgent_0(ctx context.Context, marshaler runtime.Marshaler, server BootstrapServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq sentry_0.BootstrapAgent + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["spec.templateRef"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "spec.templateRef") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "spec.templateRef", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "spec.templateRef", err) + } + + val, ok = pathParams["metadata.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.name", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Bootstrap_GetBootstrapAgent_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetBootstrapAgent(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Bootstrap_GetBootstrapAgents_0 = &utilities.DoubleArray{Encoding: map[string]int{"templateScope": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_Bootstrap_GetBootstrapAgents_0(ctx context.Context, marshaler runtime.Marshaler, client BootstrapClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetBootstrapAgentsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["templateScope"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "templateScope") + } + + protoReq.TemplateScope, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "templateScope", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Bootstrap_GetBootstrapAgents_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetBootstrapAgents(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Bootstrap_GetBootstrapAgents_0(ctx context.Context, marshaler runtime.Marshaler, server BootstrapServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetBootstrapAgentsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["templateScope"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "templateScope") + } + + protoReq.TemplateScope, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "templateScope", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Bootstrap_GetBootstrapAgents_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetBootstrapAgents(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Bootstrap_DeleteBootstrapAgent_0 = &utilities.DoubleArray{Encoding: map[string]int{"spec": 0, "templateRef": 1, "metadata": 2, "name": 3}, Base: []int{1, 1, 1, 1, 2, 0, 0}, Check: []int{0, 1, 2, 1, 4, 3, 5}} +) + +func request_Bootstrap_DeleteBootstrapAgent_0(ctx context.Context, marshaler runtime.Marshaler, client BootstrapClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq sentry_0.BootstrapAgent + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["spec.templateRef"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "spec.templateRef") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "spec.templateRef", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "spec.templateRef", err) + } + + val, ok = pathParams["metadata.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.name", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Bootstrap_DeleteBootstrapAgent_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.DeleteBootstrapAgent(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Bootstrap_DeleteBootstrapAgent_0(ctx context.Context, marshaler runtime.Marshaler, server BootstrapServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq sentry_0.BootstrapAgent + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["spec.templateRef"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "spec.templateRef") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "spec.templateRef", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "spec.templateRef", err) + } + + val, ok = pathParams["metadata.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.name", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Bootstrap_DeleteBootstrapAgent_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.DeleteBootstrapAgent(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Bootstrap_UpdateBootstrapAgent_0(ctx context.Context, marshaler runtime.Marshaler, client BootstrapClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq sentry_0.BootstrapAgent + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["spec.templateRef"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "spec.templateRef") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "spec.templateRef", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "spec.templateRef", err) + } + + val, ok = pathParams["metadata.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.name", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.name", err) + } + + msg, err := client.UpdateBootstrapAgent(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Bootstrap_UpdateBootstrapAgent_0(ctx context.Context, marshaler runtime.Marshaler, server BootstrapServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq sentry_0.BootstrapAgent + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["spec.templateRef"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "spec.templateRef") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "spec.templateRef", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "spec.templateRef", err) + } + + val, ok = pathParams["metadata.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "metadata.name") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "metadata.name", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "metadata.name", err) + } + + msg, err := server.UpdateBootstrapAgent(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterBootstrapHandlerServer registers the http handlers for service Bootstrap to "mux". +// UnaryRPC :call BootstrapServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterBootstrapHandlerFromEndpoint instead. +func RegisterBootstrapHandlerServer(ctx context.Context, mux *runtime.ServeMux, server BootstrapServer) error { + + mux.Handle("PUT", pattern_Bootstrap_PatchBootstrapInfra_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.sentry.rpc.Bootstrap/PatchBootstrapInfra", runtime.WithHTTPPathPattern("/v2/sentry/bootstrap/infra/{metadata.name}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Bootstrap_PatchBootstrapInfra_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Bootstrap_PatchBootstrapInfra_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Bootstrap_GetBootstrapInfra_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.sentry.rpc.Bootstrap/GetBootstrapInfra", runtime.WithHTTPPathPattern("/v2/sentry/bootstrap/infra/{metadata.name}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Bootstrap_GetBootstrapInfra_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Bootstrap_GetBootstrapInfra_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_Bootstrap_PatchBootstrapAgentTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.sentry.rpc.Bootstrap/PatchBootstrapAgentTemplate", runtime.WithHTTPPathPattern("/v2/sentry/bootstrap/template/{metadata.name}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Bootstrap_PatchBootstrapAgentTemplate_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Bootstrap_PatchBootstrapAgentTemplate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Bootstrap_GetBootstrapAgentTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.sentry.rpc.Bootstrap/GetBootstrapAgentTemplate", runtime.WithHTTPPathPattern("/v2/sentry/bootstrap/template/{metadata.name}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Bootstrap_GetBootstrapAgentTemplate_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Bootstrap_GetBootstrapAgentTemplate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Bootstrap_GetBootstrapAgentTemplates_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.sentry.rpc.Bootstrap/GetBootstrapAgentTemplates", runtime.WithHTTPPathPattern("/v2/sentry/bootstrap/template")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Bootstrap_GetBootstrapAgentTemplates_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Bootstrap_GetBootstrapAgentTemplates_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Bootstrap_RegisterBootstrapAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.sentry.rpc.Bootstrap/RegisterBootstrapAgent", runtime.WithHTTPPathPattern("/v2/sentry/bootstrap/{templateToken=template/*}/register")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Bootstrap_RegisterBootstrapAgent_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Bootstrap_RegisterBootstrapAgent_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Bootstrap_GetBootstrapAgentConfig_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.sentry.rpc.Bootstrap/GetBootstrapAgentConfig", runtime.WithHTTPPathPattern("/v2/sentry/bootstrap/{spec.templateRef=template/*}/agent/{metadata.name}/config")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Bootstrap_GetBootstrapAgentConfig_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Bootstrap_GetBootstrapAgentConfig_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Bootstrap_CreateBootstrapAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.sentry.rpc.Bootstrap/CreateBootstrapAgent", runtime.WithHTTPPathPattern("/v2/sentry/bootstrap/{spec.templateRef=template/*}/agent")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Bootstrap_CreateBootstrapAgent_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Bootstrap_CreateBootstrapAgent_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Bootstrap_GetBootstrapAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.sentry.rpc.Bootstrap/GetBootstrapAgent", runtime.WithHTTPPathPattern("/v2/sentry/bootstrap/{spec.templateRef=template/*}/agent/{metadata.name}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Bootstrap_GetBootstrapAgent_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Bootstrap_GetBootstrapAgent_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Bootstrap_GetBootstrapAgents_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.sentry.rpc.Bootstrap/GetBootstrapAgents", runtime.WithHTTPPathPattern("/v2/sentry/bootstrap/{templateScope=template/*}/agent")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Bootstrap_GetBootstrapAgents_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Bootstrap_GetBootstrapAgents_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("DELETE", pattern_Bootstrap_DeleteBootstrapAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.sentry.rpc.Bootstrap/DeleteBootstrapAgent", runtime.WithHTTPPathPattern("/v2/sentry/bootstrap/{spec.templateRef=template/*}/agent/{metadata.name}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Bootstrap_DeleteBootstrapAgent_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Bootstrap_DeleteBootstrapAgent_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_Bootstrap_UpdateBootstrapAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.sentry.rpc.Bootstrap/UpdateBootstrapAgent", runtime.WithHTTPPathPattern("/v2/sentry/bootstrap/{spec.templateRef=template/*}/agent/{metadata.name}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Bootstrap_UpdateBootstrapAgent_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Bootstrap_UpdateBootstrapAgent_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterBootstrapHandlerFromEndpoint is same as RegisterBootstrapHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterBootstrapHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterBootstrapHandler(ctx, mux, conn) +} + +// RegisterBootstrapHandler registers the http handlers for service Bootstrap to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterBootstrapHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterBootstrapHandlerClient(ctx, mux, NewBootstrapClient(conn)) +} + +// RegisterBootstrapHandlerClient registers the http handlers for service Bootstrap +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "BootstrapClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "BootstrapClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "BootstrapClient" to call the correct interceptors. +func RegisterBootstrapHandlerClient(ctx context.Context, mux *runtime.ServeMux, client BootstrapClient) error { + + mux.Handle("PUT", pattern_Bootstrap_PatchBootstrapInfra_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.sentry.rpc.Bootstrap/PatchBootstrapInfra", runtime.WithHTTPPathPattern("/v2/sentry/bootstrap/infra/{metadata.name}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Bootstrap_PatchBootstrapInfra_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Bootstrap_PatchBootstrapInfra_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Bootstrap_GetBootstrapInfra_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.sentry.rpc.Bootstrap/GetBootstrapInfra", runtime.WithHTTPPathPattern("/v2/sentry/bootstrap/infra/{metadata.name}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Bootstrap_GetBootstrapInfra_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Bootstrap_GetBootstrapInfra_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_Bootstrap_PatchBootstrapAgentTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.sentry.rpc.Bootstrap/PatchBootstrapAgentTemplate", runtime.WithHTTPPathPattern("/v2/sentry/bootstrap/template/{metadata.name}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Bootstrap_PatchBootstrapAgentTemplate_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Bootstrap_PatchBootstrapAgentTemplate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Bootstrap_GetBootstrapAgentTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.sentry.rpc.Bootstrap/GetBootstrapAgentTemplate", runtime.WithHTTPPathPattern("/v2/sentry/bootstrap/template/{metadata.name}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Bootstrap_GetBootstrapAgentTemplate_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Bootstrap_GetBootstrapAgentTemplate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Bootstrap_GetBootstrapAgentTemplates_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.sentry.rpc.Bootstrap/GetBootstrapAgentTemplates", runtime.WithHTTPPathPattern("/v2/sentry/bootstrap/template")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Bootstrap_GetBootstrapAgentTemplates_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Bootstrap_GetBootstrapAgentTemplates_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Bootstrap_RegisterBootstrapAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.sentry.rpc.Bootstrap/RegisterBootstrapAgent", runtime.WithHTTPPathPattern("/v2/sentry/bootstrap/{templateToken=template/*}/register")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Bootstrap_RegisterBootstrapAgent_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Bootstrap_RegisterBootstrapAgent_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Bootstrap_GetBootstrapAgentConfig_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.sentry.rpc.Bootstrap/GetBootstrapAgentConfig", runtime.WithHTTPPathPattern("/v2/sentry/bootstrap/{spec.templateRef=template/*}/agent/{metadata.name}/config")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Bootstrap_GetBootstrapAgentConfig_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Bootstrap_GetBootstrapAgentConfig_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Bootstrap_CreateBootstrapAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.sentry.rpc.Bootstrap/CreateBootstrapAgent", runtime.WithHTTPPathPattern("/v2/sentry/bootstrap/{spec.templateRef=template/*}/agent")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Bootstrap_CreateBootstrapAgent_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Bootstrap_CreateBootstrapAgent_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Bootstrap_GetBootstrapAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.sentry.rpc.Bootstrap/GetBootstrapAgent", runtime.WithHTTPPathPattern("/v2/sentry/bootstrap/{spec.templateRef=template/*}/agent/{metadata.name}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Bootstrap_GetBootstrapAgent_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Bootstrap_GetBootstrapAgent_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Bootstrap_GetBootstrapAgents_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.sentry.rpc.Bootstrap/GetBootstrapAgents", runtime.WithHTTPPathPattern("/v2/sentry/bootstrap/{templateScope=template/*}/agent")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Bootstrap_GetBootstrapAgents_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Bootstrap_GetBootstrapAgents_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("DELETE", pattern_Bootstrap_DeleteBootstrapAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.sentry.rpc.Bootstrap/DeleteBootstrapAgent", runtime.WithHTTPPathPattern("/v2/sentry/bootstrap/{spec.templateRef=template/*}/agent/{metadata.name}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Bootstrap_DeleteBootstrapAgent_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Bootstrap_DeleteBootstrapAgent_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_Bootstrap_UpdateBootstrapAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.sentry.rpc.Bootstrap/UpdateBootstrapAgent", runtime.WithHTTPPathPattern("/v2/sentry/bootstrap/{spec.templateRef=template/*}/agent/{metadata.name}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Bootstrap_UpdateBootstrapAgent_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Bootstrap_UpdateBootstrapAgent_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Bootstrap_PatchBootstrapInfra_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"v2", "sentry", "bootstrap", "infra", "metadata.name"}, "")) + + pattern_Bootstrap_GetBootstrapInfra_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"v2", "sentry", "bootstrap", "infra", "metadata.name"}, "")) + + pattern_Bootstrap_PatchBootstrapAgentTemplate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"v2", "sentry", "bootstrap", "template", "metadata.name"}, "")) + + pattern_Bootstrap_GetBootstrapAgentTemplate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"v2", "sentry", "bootstrap", "template", "metadata.name"}, "")) + + pattern_Bootstrap_GetBootstrapAgentTemplates_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v2", "sentry", "bootstrap", "template"}, "")) + + pattern_Bootstrap_RegisterBootstrapAgent_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 2, 5, 4, 2, 5}, []string{"v2", "sentry", "bootstrap", "template", "templateToken", "register"}, "")) + + pattern_Bootstrap_GetBootstrapAgentConfig_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 2, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6, 2, 7}, []string{"v2", "sentry", "bootstrap", "template", "spec.templateRef", "agent", "metadata.name", "config"}, "")) + + pattern_Bootstrap_CreateBootstrapAgent_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 2, 5, 4, 2, 5}, []string{"v2", "sentry", "bootstrap", "template", "spec.templateRef", "agent"}, "")) + + pattern_Bootstrap_GetBootstrapAgent_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 2, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6}, []string{"v2", "sentry", "bootstrap", "template", "spec.templateRef", "agent", "metadata.name"}, "")) + + pattern_Bootstrap_GetBootstrapAgents_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 2, 5, 4, 2, 5}, []string{"v2", "sentry", "bootstrap", "template", "templateScope", "agent"}, "")) + + pattern_Bootstrap_DeleteBootstrapAgent_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 2, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6}, []string{"v2", "sentry", "bootstrap", "template", "spec.templateRef", "agent", "metadata.name"}, "")) + + pattern_Bootstrap_UpdateBootstrapAgent_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 2, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6}, []string{"v2", "sentry", "bootstrap", "template", "spec.templateRef", "agent", "metadata.name"}, "")) +) + +var ( + forward_Bootstrap_PatchBootstrapInfra_0 = runtime.ForwardResponseMessage + + forward_Bootstrap_GetBootstrapInfra_0 = runtime.ForwardResponseMessage + + forward_Bootstrap_PatchBootstrapAgentTemplate_0 = runtime.ForwardResponseMessage + + forward_Bootstrap_GetBootstrapAgentTemplate_0 = runtime.ForwardResponseMessage + + forward_Bootstrap_GetBootstrapAgentTemplates_0 = runtime.ForwardResponseMessage + + forward_Bootstrap_RegisterBootstrapAgent_0 = runtime.ForwardResponseMessage + + forward_Bootstrap_GetBootstrapAgentConfig_0 = runtime.ForwardResponseMessage + + forward_Bootstrap_CreateBootstrapAgent_0 = runtime.ForwardResponseMessage + + forward_Bootstrap_GetBootstrapAgent_0 = runtime.ForwardResponseMessage + + forward_Bootstrap_GetBootstrapAgents_0 = runtime.ForwardResponseMessage + + forward_Bootstrap_DeleteBootstrapAgent_0 = runtime.ForwardResponseMessage + + forward_Bootstrap_UpdateBootstrapAgent_0 = runtime.ForwardResponseMessage +) diff --git a/components/common/proto/rpc/sentry/bootstrap.proto b/components/common/proto/rpc/sentry/bootstrap.proto new file mode 100644 index 0000000..4813b5d --- /dev/null +++ b/components/common/proto/rpc/sentry/bootstrap.proto @@ -0,0 +1,202 @@ +syntax = "proto3"; +package rafay.dev.sentry.rpc; + +import "google/api/annotations.proto"; +import "gogoproto/gogo.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; +import "proto/types/commonpb/v3/common.proto"; +import "proto/types/sentry/sentry.proto"; + +// Enable custom Marshal method. +option (gogoproto.marshaler_all) = true; +// Enable custom Unmarshal method. +option (gogoproto.unmarshaler_all) = true; +// Enable custom Size method (Required by Marshal and Unmarshal). +option (gogoproto.sizer_all) = true; +// Enable registration with golang/protobuf for the grpc-gateway. +option (gogoproto.goproto_registration) = true; +// Enable generation of XXX_MessageName methods for grpc-go/status. +option (gogoproto.messagename_all) = true; + +option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { + info : { + title : "Sentry Bootstrap Service" + version : "2.0" + contact : {name : "Rafay Dev"} + } + schemes : HTTPS + consumes : "application/json" + consumes : "application/yaml" + produces : "application/json" + produces : "application/yaml" + security_definitions : { + security : { + key : "BasicAuth" + value : {type : TYPE_BASIC} + } + security : { + key : "ApiKeyAuth" + value : {type : TYPE_API_KEY in : IN_HEADER name : "X-RAFAY-API-KEYID"} + } + } + security : { + security_requirement : { + key : "BasicAuth" + value : {} + } + security_requirement : { + key : "ApiKeyAuth" + value : {} + } + } + responses : { + key : "403" + value : { + description : "Returned when the user does not have permission to access " + "the resource." + } + } + responses : { + key : "404" + value : {description : "Returned when the resource does not exist."} + } + responses : { + key : "500" + value : {description : "Returned for internal server error"} + } +}; + +message RegisterAgentRequest { + string templateToken = 1; + string templateName = 2; + string token = 3; + bytes csr = 4; + string ipAddress = 5; + string name = 6; +} + +message RegisterAgentResponse { + bytes certificate = 1; + bytes caCertificate = 2; +} + +message GetBootstrapAgentsRequest { + rafay.dev.types.common.v3.QueryOptions opts = 1 + [ (gogoproto.nullable) = false, (gogoproto.embed) = true ]; + string templateScope = 2; +} + +message DeleteBootstrapAgentResponse {} +message DeleteRelayNetworkResponse {} +message GetRelayNetworksRequest { + rafay.dev.types.common.v3.QueryOptions opts = 1 + [ (gogoproto.nullable) = false, (gogoproto.embed) = true ]; +} + +message RelayAgentDownloadRequest { + rafay.dev.types.common.v3.Metadata metadata = 1 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Metadata", + description : "Metadata of the resource" + }, + (gogoproto.nullable) = false, (gogoproto.embed) = true ]; + string clusterScope = 2; +} + +service Bootstrap { + rpc PatchBootstrapInfra(rafay.dev.types.sentry.BootstrapInfra) + returns (rafay.dev.types.sentry.BootstrapInfra) { + option (google.api.http) = { + put : "/v2/sentry/bootstrap/infra/{metadata.name}" + body : "*" + }; + } + + rpc GetBootstrapInfra(rafay.dev.types.sentry.BootstrapInfra) + returns (rafay.dev.types.sentry.BootstrapInfra) { + option (google.api.http) = { + get : "/v2/sentry/bootstrap/infra/{metadata.name}" + }; + } + + rpc PatchBootstrapAgentTemplate( + rafay.dev.types.sentry.BootstrapAgentTemplate) + returns (rafay.dev.types.sentry.BootstrapAgentTemplate) { + option (google.api.http) = { + put : "/v2/sentry/bootstrap/template/{metadata.name}" + body : "*" + }; + } + + rpc GetBootstrapAgentTemplate( + rafay.dev.types.sentry.BootstrapAgentTemplate) + returns (rafay.dev.types.sentry.BootstrapAgentTemplate) { + option (google.api.http) = { + get : "/v2/sentry/bootstrap/template/{metadata.name}" + }; + } + + rpc GetBootstrapAgentTemplates(rafay.dev.types.common.v3.QueryOptions) + returns (rafay.dev.types.sentry.BootstrapAgentTemplateList) { + option (google.api.http) = { + get : "/v2/sentry/bootstrap/template" + }; + } + + rpc RegisterBootstrapAgent(RegisterAgentRequest) + returns (RegisterAgentResponse) { + option (google.api.http) = { + post : "/v2/sentry/bootstrap/{templateToken=template/*}/register" + body : "*" + }; + } + + rpc GetBootstrapAgentConfig(rafay.dev.types.sentry.BootstrapAgent) + returns (rafay.dev.types.common.v3.HttpBody) { + option (google.api.http) = { + get : "/v2/sentry/bootstrap/{spec.templateRef=template/*}/agent/" + "{metadata.name}/config" + }; + } + + rpc CreateBootstrapAgent(rafay.dev.types.sentry.BootstrapAgent) + returns (rafay.dev.types.sentry.BootstrapAgent) { + option (google.api.http) = { + post : "/v2/sentry/bootstrap/{spec.templateRef=template/*}/agent" + body : "*" + }; + } + + rpc GetBootstrapAgent(rafay.dev.types.sentry.BootstrapAgent) + returns (rafay.dev.types.sentry.BootstrapAgent) { + option (google.api.http) = { + get : "/v2/sentry/bootstrap/{spec.templateRef=template/*}/agent/" + "{metadata.name}" + }; + } + + rpc GetBootstrapAgents(GetBootstrapAgentsRequest) + returns (rafay.dev.types.sentry.BootstrapAgentList) { + option (google.api.http) = { + get : "/v2/sentry/bootstrap/{templateScope=template/*}/agent" + }; + } + + rpc DeleteBootstrapAgent(rafay.dev.types.sentry.BootstrapAgent) + returns (DeleteBootstrapAgentResponse) { + option (google.api.http) = { + delete : "/v2/sentry/bootstrap/{spec.templateRef=template/*}/agent/" + "{metadata.name}" + }; + } + + rpc UpdateBootstrapAgent(rafay.dev.types.sentry.BootstrapAgent) + returns (rafay.dev.types.sentry.BootstrapAgent) { + option (google.api.http) = { + put : "/v2/sentry/bootstrap/{spec.templateRef=template/*}/agent/" + "{metadata.name}" + body : "*" + }; + } + +} diff --git a/components/common/proto/rpc/sentry/bootstrap_grpc.pb.go b/components/common/proto/rpc/sentry/bootstrap_grpc.pb.go new file mode 100644 index 0000000..23d2309 --- /dev/null +++ b/components/common/proto/rpc/sentry/bootstrap_grpc.pb.go @@ -0,0 +1,501 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.2.0 +// - protoc (unknown) +// source: proto/rpc/sentry/bootstrap.proto + +package sentry + +import ( + context "context" + v3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/commonpb/v3" + sentry "github.com/RafaySystems/rcloud-base/components/common/proto/types/sentry" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// BootstrapClient is the client API for Bootstrap service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type BootstrapClient interface { + PatchBootstrapInfra(ctx context.Context, in *sentry.BootstrapInfra, opts ...grpc.CallOption) (*sentry.BootstrapInfra, error) + GetBootstrapInfra(ctx context.Context, in *sentry.BootstrapInfra, opts ...grpc.CallOption) (*sentry.BootstrapInfra, error) + PatchBootstrapAgentTemplate(ctx context.Context, in *sentry.BootstrapAgentTemplate, opts ...grpc.CallOption) (*sentry.BootstrapAgentTemplate, error) + GetBootstrapAgentTemplate(ctx context.Context, in *sentry.BootstrapAgentTemplate, opts ...grpc.CallOption) (*sentry.BootstrapAgentTemplate, error) + GetBootstrapAgentTemplates(ctx context.Context, in *v3.QueryOptions, opts ...grpc.CallOption) (*sentry.BootstrapAgentTemplateList, error) + RegisterBootstrapAgent(ctx context.Context, in *RegisterAgentRequest, opts ...grpc.CallOption) (*RegisterAgentResponse, error) + GetBootstrapAgentConfig(ctx context.Context, in *sentry.BootstrapAgent, opts ...grpc.CallOption) (*v3.HttpBody, error) + CreateBootstrapAgent(ctx context.Context, in *sentry.BootstrapAgent, opts ...grpc.CallOption) (*sentry.BootstrapAgent, error) + GetBootstrapAgent(ctx context.Context, in *sentry.BootstrapAgent, opts ...grpc.CallOption) (*sentry.BootstrapAgent, error) + GetBootstrapAgents(ctx context.Context, in *GetBootstrapAgentsRequest, opts ...grpc.CallOption) (*sentry.BootstrapAgentList, error) + DeleteBootstrapAgent(ctx context.Context, in *sentry.BootstrapAgent, opts ...grpc.CallOption) (*DeleteBootstrapAgentResponse, error) + UpdateBootstrapAgent(ctx context.Context, in *sentry.BootstrapAgent, opts ...grpc.CallOption) (*sentry.BootstrapAgent, error) +} + +type bootstrapClient struct { + cc grpc.ClientConnInterface +} + +func NewBootstrapClient(cc grpc.ClientConnInterface) BootstrapClient { + return &bootstrapClient{cc} +} + +func (c *bootstrapClient) PatchBootstrapInfra(ctx context.Context, in *sentry.BootstrapInfra, opts ...grpc.CallOption) (*sentry.BootstrapInfra, error) { + out := new(sentry.BootstrapInfra) + err := c.cc.Invoke(ctx, "/rafay.dev.sentry.rpc.Bootstrap/PatchBootstrapInfra", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *bootstrapClient) GetBootstrapInfra(ctx context.Context, in *sentry.BootstrapInfra, opts ...grpc.CallOption) (*sentry.BootstrapInfra, error) { + out := new(sentry.BootstrapInfra) + err := c.cc.Invoke(ctx, "/rafay.dev.sentry.rpc.Bootstrap/GetBootstrapInfra", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *bootstrapClient) PatchBootstrapAgentTemplate(ctx context.Context, in *sentry.BootstrapAgentTemplate, opts ...grpc.CallOption) (*sentry.BootstrapAgentTemplate, error) { + out := new(sentry.BootstrapAgentTemplate) + err := c.cc.Invoke(ctx, "/rafay.dev.sentry.rpc.Bootstrap/PatchBootstrapAgentTemplate", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *bootstrapClient) GetBootstrapAgentTemplate(ctx context.Context, in *sentry.BootstrapAgentTemplate, opts ...grpc.CallOption) (*sentry.BootstrapAgentTemplate, error) { + out := new(sentry.BootstrapAgentTemplate) + err := c.cc.Invoke(ctx, "/rafay.dev.sentry.rpc.Bootstrap/GetBootstrapAgentTemplate", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *bootstrapClient) GetBootstrapAgentTemplates(ctx context.Context, in *v3.QueryOptions, opts ...grpc.CallOption) (*sentry.BootstrapAgentTemplateList, error) { + out := new(sentry.BootstrapAgentTemplateList) + err := c.cc.Invoke(ctx, "/rafay.dev.sentry.rpc.Bootstrap/GetBootstrapAgentTemplates", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *bootstrapClient) RegisterBootstrapAgent(ctx context.Context, in *RegisterAgentRequest, opts ...grpc.CallOption) (*RegisterAgentResponse, error) { + out := new(RegisterAgentResponse) + err := c.cc.Invoke(ctx, "/rafay.dev.sentry.rpc.Bootstrap/RegisterBootstrapAgent", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *bootstrapClient) GetBootstrapAgentConfig(ctx context.Context, in *sentry.BootstrapAgent, opts ...grpc.CallOption) (*v3.HttpBody, error) { + out := new(v3.HttpBody) + err := c.cc.Invoke(ctx, "/rafay.dev.sentry.rpc.Bootstrap/GetBootstrapAgentConfig", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *bootstrapClient) CreateBootstrapAgent(ctx context.Context, in *sentry.BootstrapAgent, opts ...grpc.CallOption) (*sentry.BootstrapAgent, error) { + out := new(sentry.BootstrapAgent) + err := c.cc.Invoke(ctx, "/rafay.dev.sentry.rpc.Bootstrap/CreateBootstrapAgent", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *bootstrapClient) GetBootstrapAgent(ctx context.Context, in *sentry.BootstrapAgent, opts ...grpc.CallOption) (*sentry.BootstrapAgent, error) { + out := new(sentry.BootstrapAgent) + err := c.cc.Invoke(ctx, "/rafay.dev.sentry.rpc.Bootstrap/GetBootstrapAgent", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *bootstrapClient) GetBootstrapAgents(ctx context.Context, in *GetBootstrapAgentsRequest, opts ...grpc.CallOption) (*sentry.BootstrapAgentList, error) { + out := new(sentry.BootstrapAgentList) + err := c.cc.Invoke(ctx, "/rafay.dev.sentry.rpc.Bootstrap/GetBootstrapAgents", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *bootstrapClient) DeleteBootstrapAgent(ctx context.Context, in *sentry.BootstrapAgent, opts ...grpc.CallOption) (*DeleteBootstrapAgentResponse, error) { + out := new(DeleteBootstrapAgentResponse) + err := c.cc.Invoke(ctx, "/rafay.dev.sentry.rpc.Bootstrap/DeleteBootstrapAgent", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *bootstrapClient) UpdateBootstrapAgent(ctx context.Context, in *sentry.BootstrapAgent, opts ...grpc.CallOption) (*sentry.BootstrapAgent, error) { + out := new(sentry.BootstrapAgent) + err := c.cc.Invoke(ctx, "/rafay.dev.sentry.rpc.Bootstrap/UpdateBootstrapAgent", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// BootstrapServer is the server API for Bootstrap service. +// All implementations should embed UnimplementedBootstrapServer +// for forward compatibility +type BootstrapServer interface { + PatchBootstrapInfra(context.Context, *sentry.BootstrapInfra) (*sentry.BootstrapInfra, error) + GetBootstrapInfra(context.Context, *sentry.BootstrapInfra) (*sentry.BootstrapInfra, error) + PatchBootstrapAgentTemplate(context.Context, *sentry.BootstrapAgentTemplate) (*sentry.BootstrapAgentTemplate, error) + GetBootstrapAgentTemplate(context.Context, *sentry.BootstrapAgentTemplate) (*sentry.BootstrapAgentTemplate, error) + GetBootstrapAgentTemplates(context.Context, *v3.QueryOptions) (*sentry.BootstrapAgentTemplateList, error) + RegisterBootstrapAgent(context.Context, *RegisterAgentRequest) (*RegisterAgentResponse, error) + GetBootstrapAgentConfig(context.Context, *sentry.BootstrapAgent) (*v3.HttpBody, error) + CreateBootstrapAgent(context.Context, *sentry.BootstrapAgent) (*sentry.BootstrapAgent, error) + GetBootstrapAgent(context.Context, *sentry.BootstrapAgent) (*sentry.BootstrapAgent, error) + GetBootstrapAgents(context.Context, *GetBootstrapAgentsRequest) (*sentry.BootstrapAgentList, error) + DeleteBootstrapAgent(context.Context, *sentry.BootstrapAgent) (*DeleteBootstrapAgentResponse, error) + UpdateBootstrapAgent(context.Context, *sentry.BootstrapAgent) (*sentry.BootstrapAgent, error) +} + +// UnimplementedBootstrapServer should be embedded to have forward compatible implementations. +type UnimplementedBootstrapServer struct { +} + +func (UnimplementedBootstrapServer) PatchBootstrapInfra(context.Context, *sentry.BootstrapInfra) (*sentry.BootstrapInfra, error) { + return nil, status.Errorf(codes.Unimplemented, "method PatchBootstrapInfra not implemented") +} +func (UnimplementedBootstrapServer) GetBootstrapInfra(context.Context, *sentry.BootstrapInfra) (*sentry.BootstrapInfra, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetBootstrapInfra not implemented") +} +func (UnimplementedBootstrapServer) PatchBootstrapAgentTemplate(context.Context, *sentry.BootstrapAgentTemplate) (*sentry.BootstrapAgentTemplate, error) { + return nil, status.Errorf(codes.Unimplemented, "method PatchBootstrapAgentTemplate not implemented") +} +func (UnimplementedBootstrapServer) GetBootstrapAgentTemplate(context.Context, *sentry.BootstrapAgentTemplate) (*sentry.BootstrapAgentTemplate, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetBootstrapAgentTemplate not implemented") +} +func (UnimplementedBootstrapServer) GetBootstrapAgentTemplates(context.Context, *v3.QueryOptions) (*sentry.BootstrapAgentTemplateList, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetBootstrapAgentTemplates not implemented") +} +func (UnimplementedBootstrapServer) RegisterBootstrapAgent(context.Context, *RegisterAgentRequest) (*RegisterAgentResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RegisterBootstrapAgent not implemented") +} +func (UnimplementedBootstrapServer) GetBootstrapAgentConfig(context.Context, *sentry.BootstrapAgent) (*v3.HttpBody, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetBootstrapAgentConfig not implemented") +} +func (UnimplementedBootstrapServer) CreateBootstrapAgent(context.Context, *sentry.BootstrapAgent) (*sentry.BootstrapAgent, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateBootstrapAgent not implemented") +} +func (UnimplementedBootstrapServer) GetBootstrapAgent(context.Context, *sentry.BootstrapAgent) (*sentry.BootstrapAgent, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetBootstrapAgent not implemented") +} +func (UnimplementedBootstrapServer) GetBootstrapAgents(context.Context, *GetBootstrapAgentsRequest) (*sentry.BootstrapAgentList, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetBootstrapAgents not implemented") +} +func (UnimplementedBootstrapServer) DeleteBootstrapAgent(context.Context, *sentry.BootstrapAgent) (*DeleteBootstrapAgentResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteBootstrapAgent not implemented") +} +func (UnimplementedBootstrapServer) UpdateBootstrapAgent(context.Context, *sentry.BootstrapAgent) (*sentry.BootstrapAgent, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateBootstrapAgent not implemented") +} + +// UnsafeBootstrapServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to BootstrapServer will +// result in compilation errors. +type UnsafeBootstrapServer interface { + mustEmbedUnimplementedBootstrapServer() +} + +func RegisterBootstrapServer(s grpc.ServiceRegistrar, srv BootstrapServer) { + s.RegisterService(&Bootstrap_ServiceDesc, srv) +} + +func _Bootstrap_PatchBootstrapInfra_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(sentry.BootstrapInfra) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BootstrapServer).PatchBootstrapInfra(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rafay.dev.sentry.rpc.Bootstrap/PatchBootstrapInfra", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BootstrapServer).PatchBootstrapInfra(ctx, req.(*sentry.BootstrapInfra)) + } + return interceptor(ctx, in, info, handler) +} + +func _Bootstrap_GetBootstrapInfra_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(sentry.BootstrapInfra) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BootstrapServer).GetBootstrapInfra(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rafay.dev.sentry.rpc.Bootstrap/GetBootstrapInfra", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BootstrapServer).GetBootstrapInfra(ctx, req.(*sentry.BootstrapInfra)) + } + return interceptor(ctx, in, info, handler) +} + +func _Bootstrap_PatchBootstrapAgentTemplate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(sentry.BootstrapAgentTemplate) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BootstrapServer).PatchBootstrapAgentTemplate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rafay.dev.sentry.rpc.Bootstrap/PatchBootstrapAgentTemplate", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BootstrapServer).PatchBootstrapAgentTemplate(ctx, req.(*sentry.BootstrapAgentTemplate)) + } + return interceptor(ctx, in, info, handler) +} + +func _Bootstrap_GetBootstrapAgentTemplate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(sentry.BootstrapAgentTemplate) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BootstrapServer).GetBootstrapAgentTemplate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rafay.dev.sentry.rpc.Bootstrap/GetBootstrapAgentTemplate", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BootstrapServer).GetBootstrapAgentTemplate(ctx, req.(*sentry.BootstrapAgentTemplate)) + } + return interceptor(ctx, in, info, handler) +} + +func _Bootstrap_GetBootstrapAgentTemplates_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v3.QueryOptions) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BootstrapServer).GetBootstrapAgentTemplates(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rafay.dev.sentry.rpc.Bootstrap/GetBootstrapAgentTemplates", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BootstrapServer).GetBootstrapAgentTemplates(ctx, req.(*v3.QueryOptions)) + } + return interceptor(ctx, in, info, handler) +} + +func _Bootstrap_RegisterBootstrapAgent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RegisterAgentRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BootstrapServer).RegisterBootstrapAgent(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rafay.dev.sentry.rpc.Bootstrap/RegisterBootstrapAgent", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BootstrapServer).RegisterBootstrapAgent(ctx, req.(*RegisterAgentRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Bootstrap_GetBootstrapAgentConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(sentry.BootstrapAgent) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BootstrapServer).GetBootstrapAgentConfig(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rafay.dev.sentry.rpc.Bootstrap/GetBootstrapAgentConfig", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BootstrapServer).GetBootstrapAgentConfig(ctx, req.(*sentry.BootstrapAgent)) + } + return interceptor(ctx, in, info, handler) +} + +func _Bootstrap_CreateBootstrapAgent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(sentry.BootstrapAgent) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BootstrapServer).CreateBootstrapAgent(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rafay.dev.sentry.rpc.Bootstrap/CreateBootstrapAgent", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BootstrapServer).CreateBootstrapAgent(ctx, req.(*sentry.BootstrapAgent)) + } + return interceptor(ctx, in, info, handler) +} + +func _Bootstrap_GetBootstrapAgent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(sentry.BootstrapAgent) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BootstrapServer).GetBootstrapAgent(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rafay.dev.sentry.rpc.Bootstrap/GetBootstrapAgent", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BootstrapServer).GetBootstrapAgent(ctx, req.(*sentry.BootstrapAgent)) + } + return interceptor(ctx, in, info, handler) +} + +func _Bootstrap_GetBootstrapAgents_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetBootstrapAgentsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BootstrapServer).GetBootstrapAgents(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rafay.dev.sentry.rpc.Bootstrap/GetBootstrapAgents", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BootstrapServer).GetBootstrapAgents(ctx, req.(*GetBootstrapAgentsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Bootstrap_DeleteBootstrapAgent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(sentry.BootstrapAgent) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BootstrapServer).DeleteBootstrapAgent(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rafay.dev.sentry.rpc.Bootstrap/DeleteBootstrapAgent", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BootstrapServer).DeleteBootstrapAgent(ctx, req.(*sentry.BootstrapAgent)) + } + return interceptor(ctx, in, info, handler) +} + +func _Bootstrap_UpdateBootstrapAgent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(sentry.BootstrapAgent) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BootstrapServer).UpdateBootstrapAgent(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rafay.dev.sentry.rpc.Bootstrap/UpdateBootstrapAgent", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BootstrapServer).UpdateBootstrapAgent(ctx, req.(*sentry.BootstrapAgent)) + } + return interceptor(ctx, in, info, handler) +} + +// Bootstrap_ServiceDesc is the grpc.ServiceDesc for Bootstrap service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Bootstrap_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "rafay.dev.sentry.rpc.Bootstrap", + HandlerType: (*BootstrapServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "PatchBootstrapInfra", + Handler: _Bootstrap_PatchBootstrapInfra_Handler, + }, + { + MethodName: "GetBootstrapInfra", + Handler: _Bootstrap_GetBootstrapInfra_Handler, + }, + { + MethodName: "PatchBootstrapAgentTemplate", + Handler: _Bootstrap_PatchBootstrapAgentTemplate_Handler, + }, + { + MethodName: "GetBootstrapAgentTemplate", + Handler: _Bootstrap_GetBootstrapAgentTemplate_Handler, + }, + { + MethodName: "GetBootstrapAgentTemplates", + Handler: _Bootstrap_GetBootstrapAgentTemplates_Handler, + }, + { + MethodName: "RegisterBootstrapAgent", + Handler: _Bootstrap_RegisterBootstrapAgent_Handler, + }, + { + MethodName: "GetBootstrapAgentConfig", + Handler: _Bootstrap_GetBootstrapAgentConfig_Handler, + }, + { + MethodName: "CreateBootstrapAgent", + Handler: _Bootstrap_CreateBootstrapAgent_Handler, + }, + { + MethodName: "GetBootstrapAgent", + Handler: _Bootstrap_GetBootstrapAgent_Handler, + }, + { + MethodName: "GetBootstrapAgents", + Handler: _Bootstrap_GetBootstrapAgents_Handler, + }, + { + MethodName: "DeleteBootstrapAgent", + Handler: _Bootstrap_DeleteBootstrapAgent_Handler, + }, + { + MethodName: "UpdateBootstrapAgent", + Handler: _Bootstrap_UpdateBootstrapAgent_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "proto/rpc/sentry/bootstrap.proto", +} diff --git a/components/common/proto/rpc/sentry/cluster_authz.pb.go b/components/common/proto/rpc/sentry/cluster_authz.pb.go new file mode 100644 index 0000000..45702e9 --- /dev/null +++ b/components/common/proto/rpc/sentry/cluster_authz.pb.go @@ -0,0 +1,457 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc (unknown) +// source: proto/rpc/sentry/cluster_authz.proto + +package sentry + +import ( + _ "github.com/RafaySystems/rcloud-base/components/common/proto/types/commonpb/v3" + controller "github.com/RafaySystems/rcloud-base/components/common/proto/types/controller" + _ "github.com/RafaySystems/rcloud-base/components/common/proto/types/sentry" + _ "github.com/gogo/protobuf/gogoproto" + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GetUserAuthorizationResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UserName string `protobuf:"bytes,1,opt,name=userName,proto3" json:"userName,omitempty"` + ServiceAccount *controller.StepObject `protobuf:"bytes,2,opt,name=serviceAccount,proto3" json:"serviceAccount,omitempty"` + ClusterRoles []*controller.StepObject `protobuf:"bytes,3,rep,name=clusterRoles,proto3" json:"clusterRoles,omitempty"` + ClusterRoleBindings []*controller.StepObject `protobuf:"bytes,4,rep,name=clusterRoleBindings,proto3" json:"clusterRoleBindings,omitempty"` + Roles []*controller.StepObject `protobuf:"bytes,5,rep,name=roles,proto3" json:"roles,omitempty"` + RoleBindings []*controller.StepObject `protobuf:"bytes,6,rep,name=roleBindings,proto3" json:"roleBindings,omitempty"` + DeleteClusterRoleBindings []*controller.StepObject `protobuf:"bytes,7,rep,name=deleteClusterRoleBindings,proto3" json:"deleteClusterRoleBindings,omitempty"` + DeleteRoleBindings []*controller.StepObject `protobuf:"bytes,8,rep,name=deleteRoleBindings,proto3" json:"deleteRoleBindings,omitempty"` + Namespaces []*controller.StepObject `protobuf:"bytes,9,rep,name=namespaces,proto3" json:"namespaces,omitempty"` + RoleName string `protobuf:"bytes,10,opt,name=roleName,proto3" json:"roleName,omitempty"` + IsRead bool `protobuf:"varint,11,opt,name=isRead,proto3" json:"isRead,omitempty"` + EnforceOrgAdminOnlySecretAccess bool `protobuf:"varint,12,opt,name=enforceOrgAdminOnlySecretAccess,proto3" json:"enforceOrgAdminOnlySecretAccess,omitempty"` + IsOrgAdmin bool `protobuf:"varint,13,opt,name=isOrgAdmin,proto3" json:"isOrgAdmin,omitempty"` +} + +func (x *GetUserAuthorizationResponse) Reset() { + *x = GetUserAuthorizationResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_rpc_sentry_cluster_authz_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetUserAuthorizationResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetUserAuthorizationResponse) ProtoMessage() {} + +func (x *GetUserAuthorizationResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_rpc_sentry_cluster_authz_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetUserAuthorizationResponse.ProtoReflect.Descriptor instead. +func (*GetUserAuthorizationResponse) Descriptor() ([]byte, []int) { + return file_proto_rpc_sentry_cluster_authz_proto_rawDescGZIP(), []int{0} +} + +func (x *GetUserAuthorizationResponse) GetUserName() string { + if x != nil { + return x.UserName + } + return "" +} + +func (x *GetUserAuthorizationResponse) GetServiceAccount() *controller.StepObject { + if x != nil { + return x.ServiceAccount + } + return nil +} + +func (x *GetUserAuthorizationResponse) GetClusterRoles() []*controller.StepObject { + if x != nil { + return x.ClusterRoles + } + return nil +} + +func (x *GetUserAuthorizationResponse) GetClusterRoleBindings() []*controller.StepObject { + if x != nil { + return x.ClusterRoleBindings + } + return nil +} + +func (x *GetUserAuthorizationResponse) GetRoles() []*controller.StepObject { + if x != nil { + return x.Roles + } + return nil +} + +func (x *GetUserAuthorizationResponse) GetRoleBindings() []*controller.StepObject { + if x != nil { + return x.RoleBindings + } + return nil +} + +func (x *GetUserAuthorizationResponse) GetDeleteClusterRoleBindings() []*controller.StepObject { + if x != nil { + return x.DeleteClusterRoleBindings + } + return nil +} + +func (x *GetUserAuthorizationResponse) GetDeleteRoleBindings() []*controller.StepObject { + if x != nil { + return x.DeleteRoleBindings + } + return nil +} + +func (x *GetUserAuthorizationResponse) GetNamespaces() []*controller.StepObject { + if x != nil { + return x.Namespaces + } + return nil +} + +func (x *GetUserAuthorizationResponse) GetRoleName() string { + if x != nil { + return x.RoleName + } + return "" +} + +func (x *GetUserAuthorizationResponse) GetIsRead() bool { + if x != nil { + return x.IsRead + } + return false +} + +func (x *GetUserAuthorizationResponse) GetEnforceOrgAdminOnlySecretAccess() bool { + if x != nil { + return x.EnforceOrgAdminOnlySecretAccess + } + return false +} + +func (x *GetUserAuthorizationResponse) GetIsOrgAdmin() bool { + if x != nil { + return x.IsOrgAdmin + } + return false +} + +type GetUserAuthorizationRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UserCN string `protobuf:"bytes,1,opt,name=userCN,proto3" json:"userCN,omitempty"` + ClusterID string `protobuf:"bytes,2,opt,name=clusterID,proto3" json:"clusterID,omitempty"` + CertIssueSeconds int64 `protobuf:"varint,3,opt,name=certIssueSeconds,proto3" json:"certIssueSeconds,omitempty"` +} + +func (x *GetUserAuthorizationRequest) Reset() { + *x = GetUserAuthorizationRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_rpc_sentry_cluster_authz_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetUserAuthorizationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetUserAuthorizationRequest) ProtoMessage() {} + +func (x *GetUserAuthorizationRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_rpc_sentry_cluster_authz_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetUserAuthorizationRequest.ProtoReflect.Descriptor instead. +func (*GetUserAuthorizationRequest) Descriptor() ([]byte, []int) { + return file_proto_rpc_sentry_cluster_authz_proto_rawDescGZIP(), []int{1} +} + +func (x *GetUserAuthorizationRequest) GetUserCN() string { + if x != nil { + return x.UserCN + } + return "" +} + +func (x *GetUserAuthorizationRequest) GetClusterID() string { + if x != nil { + return x.ClusterID + } + return "" +} + +func (x *GetUserAuthorizationRequest) GetCertIssueSeconds() int64 { + if x != nil { + return x.CertIssueSeconds + } + return 0 +} + +var File_proto_rpc_sentry_cluster_authz_proto protoreflect.FileDescriptor + +var file_proto_rpc_sentry_cluster_authz_proto_rawDesc = []byte{ + 0x0a, 0x24, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x73, 0x65, 0x6e, 0x74, + 0x72, 0x79, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x7a, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, + 0x76, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x72, 0x70, 0x63, 0x1a, 0x1c, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, + 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x24, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x70, 0x62, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, + 0x70, 0x65, 0x73, 0x2f, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2f, 0x73, 0x65, 0x6e, 0x74, 0x72, + 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2f, + 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, + 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xde, 0x06, 0x0a, 0x1c, 0x47, 0x65, 0x74, + 0x55, 0x73, 0x65, 0x72, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, + 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, + 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x4e, 0x0a, 0x0e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, + 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x65, 0x70, 0x4f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x0e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x4a, 0x0a, 0x0c, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x72, 0x61, + 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x65, 0x70, 0x4f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x52, 0x0c, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, + 0x73, 0x12, 0x58, 0x0a, 0x13, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, + 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, + 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x65, 0x70, + 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x13, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, + 0x6f, 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x3c, 0x0a, 0x05, 0x72, + 0x6f, 0x6c, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x72, 0x61, 0x66, + 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x65, 0x70, 0x4f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x52, 0x05, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x12, 0x4a, 0x0a, 0x0c, 0x72, 0x6f, 0x6c, + 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x26, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x65, + 0x70, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x0c, 0x72, 0x6f, 0x6c, 0x65, 0x42, 0x69, 0x6e, + 0x64, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x64, 0x0a, 0x19, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, + 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, + 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x65, 0x70, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x52, 0x19, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, + 0x6f, 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x56, 0x0a, 0x12, 0x64, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, + 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, + 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x65, 0x70, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, + 0x12, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x42, 0x69, 0x6e, 0x64, 0x69, + 0x6e, 0x67, 0x73, 0x12, 0x46, 0x0a, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, + 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x65, 0x70, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, + 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x72, + 0x6f, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, + 0x6f, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x52, 0x65, 0x61, + 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x52, 0x65, 0x61, 0x64, 0x12, + 0x48, 0x0a, 0x1f, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x4f, 0x72, 0x67, 0x41, 0x64, 0x6d, + 0x69, 0x6e, 0x4f, 0x6e, 0x6c, 0x79, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x41, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1f, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, + 0x65, 0x4f, 0x72, 0x67, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x4f, 0x6e, 0x6c, 0x79, 0x53, 0x65, 0x63, + 0x72, 0x65, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x73, 0x4f, + 0x72, 0x67, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, + 0x73, 0x4f, 0x72, 0x67, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x22, 0x7f, 0x0a, 0x1b, 0x47, 0x65, 0x74, + 0x55, 0x73, 0x65, 0x72, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, + 0x43, 0x4e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x43, 0x4e, + 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x44, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x44, 0x12, 0x2a, + 0x0a, 0x10, 0x63, 0x65, 0x72, 0x74, 0x49, 0x73, 0x73, 0x75, 0x65, 0x53, 0x65, 0x63, 0x6f, 0x6e, + 0x64, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x63, 0x65, 0x72, 0x74, 0x49, 0x73, + 0x73, 0x75, 0x65, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x32, 0xbd, 0x01, 0x0a, 0x14, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0xa4, 0x01, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, + 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x31, 0x2e, 0x72, + 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, + 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x75, 0x74, 0x68, 0x6f, + 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x32, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, 0x65, 0x6e, 0x74, + 0x72, 0x79, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x75, + 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x12, 0x1d, 0x2f, 0x76, 0x32, + 0x2f, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x42, 0xf0, 0x04, 0x0a, 0x18, 0x63, + 0x6f, 0x6d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, 0x65, 0x6e, + 0x74, 0x72, 0x79, 0x2e, 0x72, 0x70, 0x63, 0x42, 0x11, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x41, 0x75, 0x74, 0x68, 0x7a, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x61, 0x66, 0x61, 0x79, 0x53, 0x79, + 0x73, 0x74, 0x65, 0x6d, 0x73, 0x2f, 0x72, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x62, 0x61, 0x73, + 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x73, 0x65, + 0x6e, 0x74, 0x72, 0x79, 0xa2, 0x02, 0x04, 0x52, 0x44, 0x53, 0x52, 0xaa, 0x02, 0x14, 0x52, 0x61, + 0x66, 0x61, 0x79, 0x2e, 0x44, 0x65, 0x76, 0x2e, 0x53, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x52, + 0x70, 0x63, 0xca, 0x02, 0x14, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x53, + 0x65, 0x6e, 0x74, 0x72, 0x79, 0x5c, 0x52, 0x70, 0x63, 0xe2, 0x02, 0x20, 0x52, 0x61, 0x66, 0x61, + 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x53, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x5c, 0x52, 0x70, 0x63, + 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x17, 0x52, + 0x61, 0x66, 0x61, 0x79, 0x3a, 0x3a, 0x44, 0x65, 0x76, 0x3a, 0x3a, 0x53, 0x65, 0x6e, 0x74, 0x72, + 0x79, 0x3a, 0x3a, 0x52, 0x70, 0x63, 0x92, 0x41, 0xef, 0x02, 0x12, 0x38, 0x0a, 0x24, 0x53, 0x65, + 0x6e, 0x74, 0x72, 0x79, 0x20, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x20, 0x41, 0x75, 0x74, + 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x22, 0x0b, 0x0a, 0x09, 0x52, 0x61, 0x66, 0x61, 0x79, 0x20, 0x44, 0x65, 0x76, 0x32, + 0x03, 0x32, 0x2e, 0x30, 0x2a, 0x01, 0x02, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x10, 0x61, 0x70, 0x70, + 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x10, 0x61, + 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x79, 0x61, 0x6d, 0x6c, 0x52, + 0x50, 0x0a, 0x03, 0x34, 0x30, 0x33, 0x12, 0x49, 0x0a, 0x47, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, + 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, + 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x70, + 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x2e, 0x52, 0x3b, 0x0a, 0x03, 0x34, 0x30, 0x34, 0x12, 0x34, 0x0a, 0x2a, 0x52, 0x65, 0x74, 0x75, + 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, + 0x65, 0x78, 0x69, 0x73, 0x74, 0x2e, 0x12, 0x06, 0x0a, 0x04, 0x9a, 0x02, 0x01, 0x07, 0x5a, 0x38, + 0x0a, 0x25, 0x0a, 0x0a, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x41, 0x75, 0x74, 0x68, 0x12, 0x17, + 0x08, 0x02, 0x1a, 0x11, 0x58, 0x2d, 0x52, 0x41, 0x46, 0x41, 0x59, 0x2d, 0x41, 0x50, 0x49, 0x2d, + 0x4b, 0x45, 0x59, 0x49, 0x44, 0x20, 0x02, 0x0a, 0x0f, 0x0a, 0x09, 0x42, 0x61, 0x73, 0x69, 0x63, + 0x41, 0x75, 0x74, 0x68, 0x12, 0x02, 0x08, 0x01, 0x62, 0x1f, 0x0a, 0x0e, 0x0a, 0x0a, 0x41, 0x70, + 0x69, 0x4b, 0x65, 0x79, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0x0a, 0x0d, 0x0a, 0x09, 0x42, 0x61, + 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0xc8, 0xe2, 0x1e, 0x01, 0xd0, 0xe2, 0x1e, + 0x01, 0xe0, 0xe2, 0x1e, 0x01, 0xc0, 0xe3, 0x1e, 0x01, 0xc8, 0xe3, 0x1e, 0x01, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_proto_rpc_sentry_cluster_authz_proto_rawDescOnce sync.Once + file_proto_rpc_sentry_cluster_authz_proto_rawDescData = file_proto_rpc_sentry_cluster_authz_proto_rawDesc +) + +func file_proto_rpc_sentry_cluster_authz_proto_rawDescGZIP() []byte { + file_proto_rpc_sentry_cluster_authz_proto_rawDescOnce.Do(func() { + file_proto_rpc_sentry_cluster_authz_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_rpc_sentry_cluster_authz_proto_rawDescData) + }) + return file_proto_rpc_sentry_cluster_authz_proto_rawDescData +} + +var file_proto_rpc_sentry_cluster_authz_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_proto_rpc_sentry_cluster_authz_proto_goTypes = []interface{}{ + (*GetUserAuthorizationResponse)(nil), // 0: rafay.dev.sentry.rpc.GetUserAuthorizationResponse + (*GetUserAuthorizationRequest)(nil), // 1: rafay.dev.sentry.rpc.GetUserAuthorizationRequest + (*controller.StepObject)(nil), // 2: rafay.dev.types.controller.StepObject +} +var file_proto_rpc_sentry_cluster_authz_proto_depIdxs = []int32{ + 2, // 0: rafay.dev.sentry.rpc.GetUserAuthorizationResponse.serviceAccount:type_name -> rafay.dev.types.controller.StepObject + 2, // 1: rafay.dev.sentry.rpc.GetUserAuthorizationResponse.clusterRoles:type_name -> rafay.dev.types.controller.StepObject + 2, // 2: rafay.dev.sentry.rpc.GetUserAuthorizationResponse.clusterRoleBindings:type_name -> rafay.dev.types.controller.StepObject + 2, // 3: rafay.dev.sentry.rpc.GetUserAuthorizationResponse.roles:type_name -> rafay.dev.types.controller.StepObject + 2, // 4: rafay.dev.sentry.rpc.GetUserAuthorizationResponse.roleBindings:type_name -> rafay.dev.types.controller.StepObject + 2, // 5: rafay.dev.sentry.rpc.GetUserAuthorizationResponse.deleteClusterRoleBindings:type_name -> rafay.dev.types.controller.StepObject + 2, // 6: rafay.dev.sentry.rpc.GetUserAuthorizationResponse.deleteRoleBindings:type_name -> rafay.dev.types.controller.StepObject + 2, // 7: rafay.dev.sentry.rpc.GetUserAuthorizationResponse.namespaces:type_name -> rafay.dev.types.controller.StepObject + 1, // 8: rafay.dev.sentry.rpc.ClusterAuthorization.GetUserAuthorization:input_type -> rafay.dev.sentry.rpc.GetUserAuthorizationRequest + 0, // 9: rafay.dev.sentry.rpc.ClusterAuthorization.GetUserAuthorization:output_type -> rafay.dev.sentry.rpc.GetUserAuthorizationResponse + 9, // [9:10] is the sub-list for method output_type + 8, // [8:9] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name +} + +func init() { file_proto_rpc_sentry_cluster_authz_proto_init() } +func file_proto_rpc_sentry_cluster_authz_proto_init() { + if File_proto_rpc_sentry_cluster_authz_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_proto_rpc_sentry_cluster_authz_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetUserAuthorizationResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_rpc_sentry_cluster_authz_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetUserAuthorizationRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_proto_rpc_sentry_cluster_authz_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_proto_rpc_sentry_cluster_authz_proto_goTypes, + DependencyIndexes: file_proto_rpc_sentry_cluster_authz_proto_depIdxs, + MessageInfos: file_proto_rpc_sentry_cluster_authz_proto_msgTypes, + }.Build() + File_proto_rpc_sentry_cluster_authz_proto = out.File + file_proto_rpc_sentry_cluster_authz_proto_rawDesc = nil + file_proto_rpc_sentry_cluster_authz_proto_goTypes = nil + file_proto_rpc_sentry_cluster_authz_proto_depIdxs = nil +} diff --git a/components/common/proto/rpc/sentry/cluster_authz.pb.gw.go b/components/common/proto/rpc/sentry/cluster_authz.pb.gw.go new file mode 100644 index 0000000..40c1a6b --- /dev/null +++ b/components/common/proto/rpc/sentry/cluster_authz.pb.gw.go @@ -0,0 +1,169 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: proto/rpc/sentry/cluster_authz.proto + +/* +Package sentry is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package sentry + +import ( + "context" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + +var ( + filter_ClusterAuthorization_GetUserAuthorization_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_ClusterAuthorization_GetUserAuthorization_0(ctx context.Context, marshaler runtime.Marshaler, client ClusterAuthorizationClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetUserAuthorizationRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ClusterAuthorization_GetUserAuthorization_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetUserAuthorization(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_ClusterAuthorization_GetUserAuthorization_0(ctx context.Context, marshaler runtime.Marshaler, server ClusterAuthorizationServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetUserAuthorizationRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ClusterAuthorization_GetUserAuthorization_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetUserAuthorization(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterClusterAuthorizationHandlerServer registers the http handlers for service ClusterAuthorization to "mux". +// UnaryRPC :call ClusterAuthorizationServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterClusterAuthorizationHandlerFromEndpoint instead. +func RegisterClusterAuthorizationHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ClusterAuthorizationServer) error { + + mux.Handle("GET", pattern_ClusterAuthorization_GetUserAuthorization_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.sentry.rpc.ClusterAuthorization/GetUserAuthorization", runtime.WithHTTPPathPattern("/v2/sentry/authorization/user")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_ClusterAuthorization_GetUserAuthorization_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_ClusterAuthorization_GetUserAuthorization_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterClusterAuthorizationHandlerFromEndpoint is same as RegisterClusterAuthorizationHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterClusterAuthorizationHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterClusterAuthorizationHandler(ctx, mux, conn) +} + +// RegisterClusterAuthorizationHandler registers the http handlers for service ClusterAuthorization to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterClusterAuthorizationHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterClusterAuthorizationHandlerClient(ctx, mux, NewClusterAuthorizationClient(conn)) +} + +// RegisterClusterAuthorizationHandlerClient registers the http handlers for service ClusterAuthorization +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ClusterAuthorizationClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ClusterAuthorizationClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "ClusterAuthorizationClient" to call the correct interceptors. +func RegisterClusterAuthorizationHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ClusterAuthorizationClient) error { + + mux.Handle("GET", pattern_ClusterAuthorization_GetUserAuthorization_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.sentry.rpc.ClusterAuthorization/GetUserAuthorization", runtime.WithHTTPPathPattern("/v2/sentry/authorization/user")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ClusterAuthorization_GetUserAuthorization_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_ClusterAuthorization_GetUserAuthorization_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_ClusterAuthorization_GetUserAuthorization_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v2", "sentry", "authorization", "user"}, "")) +) + +var ( + forward_ClusterAuthorization_GetUserAuthorization_0 = runtime.ForwardResponseMessage +) diff --git a/components/common/proto/rpc/sentry/cluster_authz.proto b/components/common/proto/rpc/sentry/cluster_authz.proto new file mode 100644 index 0000000..ecf9ab1 --- /dev/null +++ b/components/common/proto/rpc/sentry/cluster_authz.proto @@ -0,0 +1,98 @@ +syntax = "proto3"; +package rafay.dev.sentry.rpc; + +import "google/api/annotations.proto"; +import "gogoproto/gogo.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; +import "proto/types/commonpb/v3/common.proto"; +import "proto/types/sentry/sentry.proto"; +import "proto/types/controller/cluster_controller.proto"; + +// Enable custom Marshal method. +option (gogoproto.marshaler_all) = true; +// Enable custom Unmarshal method. +option (gogoproto.unmarshaler_all) = true; +// Enable custom Size method (Required by Marshal and Unmarshal). +option (gogoproto.sizer_all) = true; +// Enable registration with golang/protobuf for the grpc-gateway. +option (gogoproto.goproto_registration) = true; +// Enable generation of XXX_MessageName methods for grpc-go/status. +option (gogoproto.messagename_all) = true; + +option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { + info : { + title : "Sentry Cluster Authorization Service" + version : "2.0" + contact : {name : "Rafay Dev"} + } + schemes : HTTPS + consumes : "application/json" + consumes : "application/yaml" + produces : "application/json" + produces : "application/yaml" + security_definitions : { + security : { + key : "BasicAuth" + value : {type : TYPE_BASIC} + } + security : { + key : "ApiKeyAuth" + value : {type : TYPE_API_KEY in : IN_HEADER name : "X-RAFAY-API-KEYID"} + } + } + security : { + security_requirement : { + key : "BasicAuth" + value : {} + } + security_requirement : { + key : "ApiKeyAuth" + value : {} + } + } + responses : { + key : "403" + value : { + description : "Returned when the user does not have permission to access " + "the resource." + } + } + responses : { + key : "404" + value : { + description : "Returned when the resource does not exist." + schema : {json_schema : {type : STRING}} + } + } +}; + +message GetUserAuthorizationResponse { + string userName = 1; + rafay.dev.types.controller.StepObject serviceAccount = 2; + repeated rafay.dev.types.controller.StepObject clusterRoles = 3; + repeated rafay.dev.types.controller.StepObject clusterRoleBindings = 4; + repeated rafay.dev.types.controller.StepObject roles = 5; + repeated rafay.dev.types.controller.StepObject roleBindings = 6; + repeated rafay.dev.types.controller.StepObject deleteClusterRoleBindings = 7; + repeated rafay.dev.types.controller.StepObject deleteRoleBindings = 8; + repeated rafay.dev.types.controller.StepObject namespaces = 9; + string roleName = 10; + bool isRead = 11; + bool enforceOrgAdminOnlySecretAccess = 12; + bool isOrgAdmin = 13; +} + +message GetUserAuthorizationRequest { + string userCN = 1; + string clusterID = 2; + int64 certIssueSeconds = 3; +} + +service ClusterAuthorization { + rpc GetUserAuthorization(GetUserAuthorizationRequest) + returns (GetUserAuthorizationResponse) { + option (google.api.http) = { + get : "/v2/sentry/authorization/user" + }; + }; +} diff --git a/components/common/proto/rpc/sentry/cluster_authz_grpc.pb.go b/components/common/proto/rpc/sentry/cluster_authz_grpc.pb.go new file mode 100644 index 0000000..319cddc --- /dev/null +++ b/components/common/proto/rpc/sentry/cluster_authz_grpc.pb.go @@ -0,0 +1,103 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.2.0 +// - protoc (unknown) +// source: proto/rpc/sentry/cluster_authz.proto + +package sentry + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// ClusterAuthorizationClient is the client API for ClusterAuthorization service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type ClusterAuthorizationClient interface { + GetUserAuthorization(ctx context.Context, in *GetUserAuthorizationRequest, opts ...grpc.CallOption) (*GetUserAuthorizationResponse, error) +} + +type clusterAuthorizationClient struct { + cc grpc.ClientConnInterface +} + +func NewClusterAuthorizationClient(cc grpc.ClientConnInterface) ClusterAuthorizationClient { + return &clusterAuthorizationClient{cc} +} + +func (c *clusterAuthorizationClient) GetUserAuthorization(ctx context.Context, in *GetUserAuthorizationRequest, opts ...grpc.CallOption) (*GetUserAuthorizationResponse, error) { + out := new(GetUserAuthorizationResponse) + err := c.cc.Invoke(ctx, "/rafay.dev.sentry.rpc.ClusterAuthorization/GetUserAuthorization", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ClusterAuthorizationServer is the server API for ClusterAuthorization service. +// All implementations should embed UnimplementedClusterAuthorizationServer +// for forward compatibility +type ClusterAuthorizationServer interface { + GetUserAuthorization(context.Context, *GetUserAuthorizationRequest) (*GetUserAuthorizationResponse, error) +} + +// UnimplementedClusterAuthorizationServer should be embedded to have forward compatible implementations. +type UnimplementedClusterAuthorizationServer struct { +} + +func (UnimplementedClusterAuthorizationServer) GetUserAuthorization(context.Context, *GetUserAuthorizationRequest) (*GetUserAuthorizationResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetUserAuthorization not implemented") +} + +// UnsafeClusterAuthorizationServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ClusterAuthorizationServer will +// result in compilation errors. +type UnsafeClusterAuthorizationServer interface { + mustEmbedUnimplementedClusterAuthorizationServer() +} + +func RegisterClusterAuthorizationServer(s grpc.ServiceRegistrar, srv ClusterAuthorizationServer) { + s.RegisterService(&ClusterAuthorization_ServiceDesc, srv) +} + +func _ClusterAuthorization_GetUserAuthorization_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetUserAuthorizationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ClusterAuthorizationServer).GetUserAuthorization(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rafay.dev.sentry.rpc.ClusterAuthorization/GetUserAuthorization", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ClusterAuthorizationServer).GetUserAuthorization(ctx, req.(*GetUserAuthorizationRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// ClusterAuthorization_ServiceDesc is the grpc.ServiceDesc for ClusterAuthorization service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var ClusterAuthorization_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "rafay.dev.sentry.rpc.ClusterAuthorization", + HandlerType: (*ClusterAuthorizationServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetUserAuthorization", + Handler: _ClusterAuthorization_GetUserAuthorization_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "proto/rpc/sentry/cluster_authz.proto", +} diff --git a/components/common/proto/rpc/sentry/internal.go b/components/common/proto/rpc/sentry/internal.go new file mode 100644 index 0000000..63d82c1 --- /dev/null +++ b/components/common/proto/rpc/sentry/internal.go @@ -0,0 +1,190 @@ +package sentry + +import ( + "context" + "fmt" + + grpctools "github.com/RafaySystems/rcloud-base/components/common/pkg/grpc" + "github.com/RafaySystems/rcloud-base/components/common/pkg/pool" + grpcpool "github.com/processout/grpc-go-pool" + "google.golang.org/grpc/credentials" +) + +// SentryClient is the interface for accessing all the RPCs +// exposed by Rafay Sentry +type SentryClient interface { + Unhealthy() + Close() error + BootstrapClient + ClusterAuthorizationClient + KubeConfigClient +} + +// SentryAuthorizationClient is the interface for accessing all the RPCs +// exposed by Rafay Sentry for Authorization +type SentryAuthorizationClient interface { + Unhealthy() + Close() error + ClusterAuthorizationClient + AuditInformationClient +} + +type sentryClient struct { + *grpcpool.ClientConn + *bootstrapClient + *clusterAuthorizationClient + *kubeConfigClient +} + +var _ SentryClient = (*sentryClient)(nil) + +type sentryAuthorizationClient struct { + *grpcpool.ClientConn + *clusterAuthorizationClient + *auditInformationClient +} + +var _ SentryAuthorizationClient = (*sentryAuthorizationClient)(nil) + +// SentryPool maintains pool of grpc connections to sentry service +type SentryPool interface { + Close() + NewClient(ctx context.Context) (SentryClient, error) +} + +// SentryAuthorizationPool maintains pool of grpc connections to sentry +// authorization service +type SentryAuthorizationPool interface { + Close() + NewClient(ctx context.Context) (SentryAuthorizationClient, error) +} + +// NewSentryPool new sentry pool +func NewSentryPool(addr string, maxConn int) SentryPool { + return &sentryPool{ + GRPCPool: pool.NewGRPCPool(addr, maxConn, nil), + } +} + +type sentryPool struct { + *pool.GRPCPool +} + +func (p *sentryPool) Close() { + if p.GRPCPool != nil { + p.GRPCPool.Close() + } +} + +func (p *sentryPool) NewClient(ctx context.Context) (SentryClient, error) { + cc, err := p.GetConnection(ctx) + if err != nil { + return nil, err + } + return &sentryClient{ + cc, + &bootstrapClient{cc.ClientConn}, + &clusterAuthorizationClient{cc.ClientConn}, + &kubeConfigClient{cc.ClientConn}, + }, nil +} + +type sentryAuthorizationPool struct { + *pool.GRPCPool +} + +func (p *sentryAuthorizationPool) Close() { + if p.GRPCPool != nil { + p.GRPCPool.Close() + } +} + +func (p *sentryAuthorizationPool) NewClient(ctx context.Context) (SentryAuthorizationClient, error) { + cc, err := p.GetConnection(ctx) + if err != nil { + return nil, err + } + return &sentryAuthorizationClient{ + cc, + &clusterAuthorizationClient{cc.ClientConn}, + &auditInformationClient{cc.ClientConn}, + }, nil +} + +type options struct { + addr string + maxConn int + cert []byte + key []byte + caCert []byte +} + +// Option is the functional argument for Pool options +type Option func(*options) + +// WithAddr sets address of the pool +func WithAddr(addr string) Option { + return func(o *options) { + o.addr = addr + } +} + +// WithMaxConn sets maximum number of connections of the pool +// if not set defaults to 10 +func WithMaxConn(maxConn int) Option { + return func(o *options) { + o.maxConn = maxConn + } +} + +// WithClientCertPEM sets PEM encoded client cert for pool +func WithClientCertPEM(cert []byte) Option { + return func(o *options) { + o.cert = cert + } +} + +// WithClientKeyPEM sets PEM encoded client key for pool +func WithClientKeyPEM(key []byte) Option { + return func(o *options) { + o.key = key + } +} + +// WithCaCertPEM sets PEM encoded CA cert for pool +func WithCaCertPEM(caCert []byte) Option { + return func(o *options) { + o.caCert = caCert + } +} + +// NewSentryAuthorizationPool new sentry authorization pool +func NewSentryAuthorizationPool(opts ...Option) (SentryAuthorizationPool, error) { + + pOpts := options{} + for _, opt := range opts { + opt(&pOpts) + } + + if pOpts.addr == "" { + return nil, fmt.Errorf("addr cannot be empty") + } + + if pOpts.maxConn <= 0 { + pOpts.maxConn = 10 + } + + var creds credentials.TransportCredentials + var err error + + if pOpts.cert != nil && pOpts.key != nil { + creds, err = grpctools.NewClientTransportCredentials(pOpts.cert, pOpts.key, pOpts.caCert, pOpts.addr) + if err != nil { + return nil, err + } + } + + return &sentryAuthorizationPool{ + GRPCPool: pool.NewGRPCPool(pOpts.addr, pOpts.maxConn, creds), + }, nil +} diff --git a/components/common/proto/rpc/sentry/kubeconfig.pb.go b/components/common/proto/rpc/sentry/kubeconfig.pb.go new file mode 100644 index 0000000..dc328e8 --- /dev/null +++ b/components/common/proto/rpc/sentry/kubeconfig.pb.go @@ -0,0 +1,945 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc (unknown) +// source: proto/rpc/sentry/kubeconfig.proto + +package sentry + +import ( + v3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/commonpb/v3" + _ "github.com/RafaySystems/rcloud-base/components/common/proto/types/sentry" + _ "github.com/gogo/protobuf/gogoproto" + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GetForClusterRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Opts *v3.QueryOptions `protobuf:"bytes,1,opt,name=opts,proto3" json:"opts,omitempty"` + Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` + SystemUser bool `protobuf:"varint,3,opt,name=systemUser,proto3" json:"systemUser,omitempty"` +} + +func (x *GetForClusterRequest) Reset() { + *x = GetForClusterRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_rpc_sentry_kubeconfig_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetForClusterRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetForClusterRequest) ProtoMessage() {} + +func (x *GetForClusterRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_rpc_sentry_kubeconfig_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetForClusterRequest.ProtoReflect.Descriptor instead. +func (*GetForClusterRequest) Descriptor() ([]byte, []int) { + return file_proto_rpc_sentry_kubeconfig_proto_rawDescGZIP(), []int{0} +} + +func (x *GetForClusterRequest) GetOpts() *v3.QueryOptions { + if x != nil { + return x.Opts + } + return nil +} + +func (x *GetForClusterRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *GetForClusterRequest) GetSystemUser() bool { + if x != nil { + return x.SystemUser + } + return false +} + +type GetForUserRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Opts *v3.QueryOptions `protobuf:"bytes,1,opt,name=opts,proto3" json:"opts,omitempty"` + Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` +} + +func (x *GetForUserRequest) Reset() { + *x = GetForUserRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_rpc_sentry_kubeconfig_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetForUserRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetForUserRequest) ProtoMessage() {} + +func (x *GetForUserRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_rpc_sentry_kubeconfig_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetForUserRequest.ProtoReflect.Descriptor instead. +func (*GetForUserRequest) Descriptor() ([]byte, []int) { + return file_proto_rpc_sentry_kubeconfig_proto_rawDescGZIP(), []int{1} +} + +func (x *GetForUserRequest) GetOpts() *v3.QueryOptions { + if x != nil { + return x.Opts + } + return nil +} + +func (x *GetForUserRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +type RevokeKubeconfigRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Opts *v3.QueryOptions `protobuf:"bytes,1,opt,name=opts,proto3" json:"opts,omitempty"` +} + +func (x *RevokeKubeconfigRequest) Reset() { + *x = RevokeKubeconfigRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_rpc_sentry_kubeconfig_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RevokeKubeconfigRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RevokeKubeconfigRequest) ProtoMessage() {} + +func (x *RevokeKubeconfigRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_rpc_sentry_kubeconfig_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RevokeKubeconfigRequest.ProtoReflect.Descriptor instead. +func (*RevokeKubeconfigRequest) Descriptor() ([]byte, []int) { + return file_proto_rpc_sentry_kubeconfig_proto_rawDescGZIP(), []int{2} +} + +func (x *RevokeKubeconfigRequest) GetOpts() *v3.QueryOptions { + if x != nil { + return x.Opts + } + return nil +} + +type RevokeKubeconfigResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *RevokeKubeconfigResponse) Reset() { + *x = RevokeKubeconfigResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_rpc_sentry_kubeconfig_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RevokeKubeconfigResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RevokeKubeconfigResponse) ProtoMessage() {} + +func (x *RevokeKubeconfigResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_rpc_sentry_kubeconfig_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RevokeKubeconfigResponse.ProtoReflect.Descriptor instead. +func (*RevokeKubeconfigResponse) Descriptor() ([]byte, []int) { + return file_proto_rpc_sentry_kubeconfig_proto_rawDescGZIP(), []int{3} +} + +type UpdateKubeconfigSettingRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Opts *v3.QueryOptions `protobuf:"bytes,1,opt,name=opts,proto3" json:"opts,omitempty"` + ValiditySeconds int64 `protobuf:"varint,2,opt,name=validitySeconds,proto3" json:"validitySeconds,omitempty"` + EnableSessionCheck bool `protobuf:"varint,3,opt,name=enableSessionCheck,proto3" json:"enableSessionCheck,omitempty"` + EnablePrivateRelay bool `protobuf:"varint,4,opt,name=enablePrivateRelay,proto3" json:"enablePrivateRelay,omitempty"` + EnforceOrgAdminSecretAccess bool `protobuf:"varint,5,opt,name=enforceOrgAdminSecretAccess,proto3" json:"enforceOrgAdminSecretAccess,omitempty"` + DisableWebKubectl bool `protobuf:"varint,6,opt,name=disableWebKubectl,proto3" json:"disableWebKubectl,omitempty"` + DisableCLIKubectl bool `protobuf:"varint,7,opt,name=disableCLIKubectl,proto3" json:"disableCLIKubectl,omitempty"` +} + +func (x *UpdateKubeconfigSettingRequest) Reset() { + *x = UpdateKubeconfigSettingRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_rpc_sentry_kubeconfig_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateKubeconfigSettingRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateKubeconfigSettingRequest) ProtoMessage() {} + +func (x *UpdateKubeconfigSettingRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_rpc_sentry_kubeconfig_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateKubeconfigSettingRequest.ProtoReflect.Descriptor instead. +func (*UpdateKubeconfigSettingRequest) Descriptor() ([]byte, []int) { + return file_proto_rpc_sentry_kubeconfig_proto_rawDescGZIP(), []int{4} +} + +func (x *UpdateKubeconfigSettingRequest) GetOpts() *v3.QueryOptions { + if x != nil { + return x.Opts + } + return nil +} + +func (x *UpdateKubeconfigSettingRequest) GetValiditySeconds() int64 { + if x != nil { + return x.ValiditySeconds + } + return 0 +} + +func (x *UpdateKubeconfigSettingRequest) GetEnableSessionCheck() bool { + if x != nil { + return x.EnableSessionCheck + } + return false +} + +func (x *UpdateKubeconfigSettingRequest) GetEnablePrivateRelay() bool { + if x != nil { + return x.EnablePrivateRelay + } + return false +} + +func (x *UpdateKubeconfigSettingRequest) GetEnforceOrgAdminSecretAccess() bool { + if x != nil { + return x.EnforceOrgAdminSecretAccess + } + return false +} + +func (x *UpdateKubeconfigSettingRequest) GetDisableWebKubectl() bool { + if x != nil { + return x.DisableWebKubectl + } + return false +} + +func (x *UpdateKubeconfigSettingRequest) GetDisableCLIKubectl() bool { + if x != nil { + return x.DisableCLIKubectl + } + return false +} + +type UpdateKubeconfigSettingResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *UpdateKubeconfigSettingResponse) Reset() { + *x = UpdateKubeconfigSettingResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_rpc_sentry_kubeconfig_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateKubeconfigSettingResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateKubeconfigSettingResponse) ProtoMessage() {} + +func (x *UpdateKubeconfigSettingResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_rpc_sentry_kubeconfig_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateKubeconfigSettingResponse.ProtoReflect.Descriptor instead. +func (*UpdateKubeconfigSettingResponse) Descriptor() ([]byte, []int) { + return file_proto_rpc_sentry_kubeconfig_proto_rawDescGZIP(), []int{5} +} + +type GetKubeconfigSettingRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Opts *v3.QueryOptions `protobuf:"bytes,1,opt,name=opts,proto3" json:"opts,omitempty"` +} + +func (x *GetKubeconfigSettingRequest) Reset() { + *x = GetKubeconfigSettingRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_rpc_sentry_kubeconfig_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetKubeconfigSettingRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetKubeconfigSettingRequest) ProtoMessage() {} + +func (x *GetKubeconfigSettingRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_rpc_sentry_kubeconfig_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetKubeconfigSettingRequest.ProtoReflect.Descriptor instead. +func (*GetKubeconfigSettingRequest) Descriptor() ([]byte, []int) { + return file_proto_rpc_sentry_kubeconfig_proto_rawDescGZIP(), []int{6} +} + +func (x *GetKubeconfigSettingRequest) GetOpts() *v3.QueryOptions { + if x != nil { + return x.Opts + } + return nil +} + +type GetKubeconfigSettingResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ValiditySeconds int64 `protobuf:"varint,1,opt,name=validitySeconds,proto3" json:"validitySeconds,omitempty"` + EnableSessionCheck bool `protobuf:"varint,2,opt,name=enableSessionCheck,proto3" json:"enableSessionCheck,omitempty"` + EnablePrivateRelay bool `protobuf:"varint,3,opt,name=enablePrivateRelay,proto3" json:"enablePrivateRelay,omitempty"` + EnforceOrgAdminSecretAccess bool `protobuf:"varint,4,opt,name=enforceOrgAdminSecretAccess,proto3" json:"enforceOrgAdminSecretAccess,omitempty"` + DisableWebKubectl bool `protobuf:"varint,5,opt,name=disableWebKubectl,proto3" json:"disableWebKubectl,omitempty"` + DisableCLIKubectl bool `protobuf:"varint,6,opt,name=disableCLIKubectl,proto3" json:"disableCLIKubectl,omitempty"` +} + +func (x *GetKubeconfigSettingResponse) Reset() { + *x = GetKubeconfigSettingResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_rpc_sentry_kubeconfig_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetKubeconfigSettingResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetKubeconfigSettingResponse) ProtoMessage() {} + +func (x *GetKubeconfigSettingResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_rpc_sentry_kubeconfig_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetKubeconfigSettingResponse.ProtoReflect.Descriptor instead. +func (*GetKubeconfigSettingResponse) Descriptor() ([]byte, []int) { + return file_proto_rpc_sentry_kubeconfig_proto_rawDescGZIP(), []int{7} +} + +func (x *GetKubeconfigSettingResponse) GetValiditySeconds() int64 { + if x != nil { + return x.ValiditySeconds + } + return 0 +} + +func (x *GetKubeconfigSettingResponse) GetEnableSessionCheck() bool { + if x != nil { + return x.EnableSessionCheck + } + return false +} + +func (x *GetKubeconfigSettingResponse) GetEnablePrivateRelay() bool { + if x != nil { + return x.EnablePrivateRelay + } + return false +} + +func (x *GetKubeconfigSettingResponse) GetEnforceOrgAdminSecretAccess() bool { + if x != nil { + return x.EnforceOrgAdminSecretAccess + } + return false +} + +func (x *GetKubeconfigSettingResponse) GetDisableWebKubectl() bool { + if x != nil { + return x.DisableWebKubectl + } + return false +} + +func (x *GetKubeconfigSettingResponse) GetDisableCLIKubectl() bool { + if x != nil { + return x.DisableCLIKubectl + } + return false +} + +var File_proto_rpc_sentry_kubeconfig_proto protoreflect.FileDescriptor + +var file_proto_rpc_sentry_kubeconfig_proto_rawDesc = []byte{ + 0x0a, 0x21, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x73, 0x65, 0x6e, 0x74, + 0x72, 0x79, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, + 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x72, 0x70, 0x63, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, + 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x70, 0x62, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x2f, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2f, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9b, 0x01, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x46, 0x6f, 0x72, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x45, 0x0a, + 0x04, 0x6f, 0x70, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x72, 0x61, + 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0xd0, 0xde, 0x1f, 0x01, 0x52, 0x04, + 0x6f, 0x70, 0x74, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x55, 0x73, 0x65, 0x72, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x55, 0x73, + 0x65, 0x72, 0x22, 0x78, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x46, 0x6f, 0x72, 0x55, 0x73, 0x65, 0x72, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x45, 0x0a, 0x04, 0x6f, 0x70, 0x74, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, + 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, + 0x33, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x08, + 0xc8, 0xde, 0x1f, 0x00, 0xd0, 0xde, 0x1f, 0x01, 0x52, 0x04, 0x6f, 0x70, 0x74, 0x73, 0x12, 0x1c, + 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x60, 0x0a, 0x17, + 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x45, 0x0a, 0x04, 0x6f, 0x70, 0x74, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, + 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, + 0x33, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x08, + 0xc8, 0xde, 0x1f, 0x00, 0xd0, 0xde, 0x1f, 0x01, 0x52, 0x04, 0x6f, 0x70, 0x74, 0x73, 0x22, 0x1a, + 0x0a, 0x18, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x8f, 0x03, 0x0a, 0x1e, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, + 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x45, 0x0a, + 0x04, 0x6f, 0x70, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x72, 0x61, + 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0xd0, 0xde, 0x1f, 0x01, 0x52, 0x04, + 0x6f, 0x70, 0x74, 0x73, 0x12, 0x28, 0x0a, 0x0f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x69, 0x74, 0x79, + 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x69, 0x74, 0x79, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x12, 0x2e, + 0x0a, 0x12, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x43, + 0x68, 0x65, 0x63, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x65, 0x6e, 0x61, 0x62, + 0x6c, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x2e, + 0x0a, 0x12, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x52, + 0x65, 0x6c, 0x61, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x65, 0x6e, 0x61, 0x62, + 0x6c, 0x65, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x12, 0x40, + 0x0a, 0x1b, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x4f, 0x72, 0x67, 0x41, 0x64, 0x6d, 0x69, + 0x6e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x1b, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x4f, 0x72, 0x67, 0x41, + 0x64, 0x6d, 0x69, 0x6e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x12, 0x2c, 0x0a, 0x11, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x57, 0x65, 0x62, 0x4b, 0x75, + 0x62, 0x65, 0x63, 0x74, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x64, 0x69, 0x73, + 0x61, 0x62, 0x6c, 0x65, 0x57, 0x65, 0x62, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x74, 0x6c, 0x12, 0x2c, + 0x0a, 0x11, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x4c, 0x49, 0x4b, 0x75, 0x62, 0x65, + 0x63, 0x74, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x64, 0x69, 0x73, 0x61, 0x62, + 0x6c, 0x65, 0x43, 0x4c, 0x49, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x74, 0x6c, 0x22, 0x21, 0x0a, 0x1f, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x64, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x45, + 0x0a, 0x04, 0x6f, 0x70, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x72, + 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0xd0, 0xde, 0x1f, 0x01, 0x52, + 0x04, 0x6f, 0x70, 0x74, 0x73, 0x22, 0xda, 0x03, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x4b, 0x75, 0x62, + 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x0f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x69, + 0x74, 0x79, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, + 0x13, 0xea, 0xde, 0x1f, 0x0f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x69, 0x74, 0x79, 0x53, 0x65, 0x63, + 0x6f, 0x6e, 0x64, 0x73, 0x52, 0x0f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x69, 0x74, 0x79, 0x53, 0x65, + 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x12, 0x46, 0x0a, 0x12, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x53, + 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x08, 0x42, 0x16, 0xea, 0xde, 0x1f, 0x12, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x65, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x12, 0x65, 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x46, 0x0a, + 0x12, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x52, 0x65, + 0x6c, 0x61, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x42, 0x16, 0xea, 0xde, 0x1f, 0x12, 0x65, + 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, + 0x79, 0x52, 0x12, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, + 0x52, 0x65, 0x6c, 0x61, 0x79, 0x12, 0x61, 0x0a, 0x1b, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, + 0x4f, 0x72, 0x67, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x41, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x42, 0x1f, 0xea, 0xde, 0x1f, 0x1b, + 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x4f, 0x72, 0x67, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x53, + 0x65, 0x63, 0x72, 0x65, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x1b, 0x65, 0x6e, 0x66, + 0x6f, 0x72, 0x63, 0x65, 0x4f, 0x72, 0x67, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x53, 0x65, 0x63, 0x72, + 0x65, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x43, 0x0a, 0x11, 0x64, 0x69, 0x73, 0x61, + 0x62, 0x6c, 0x65, 0x57, 0x65, 0x62, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x74, 0x6c, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x08, 0x42, 0x15, 0xea, 0xde, 0x1f, 0x11, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, + 0x57, 0x65, 0x62, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x74, 0x6c, 0x52, 0x11, 0x64, 0x69, 0x73, 0x61, + 0x62, 0x6c, 0x65, 0x57, 0x65, 0x62, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x74, 0x6c, 0x12, 0x43, 0x0a, + 0x11, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x4c, 0x49, 0x4b, 0x75, 0x62, 0x65, 0x63, + 0x74, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x42, 0x15, 0xea, 0xde, 0x1f, 0x11, 0x64, 0x69, + 0x73, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x4c, 0x49, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x74, 0x6c, 0x52, + 0x11, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x4c, 0x49, 0x4b, 0x75, 0x62, 0x65, 0x63, + 0x74, 0x6c, 0x32, 0xff, 0x0e, 0x0a, 0x0a, 0x4b, 0x75, 0x62, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x12, 0x9b, 0x01, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x46, 0x6f, 0x72, 0x43, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x57, 0x65, 0x62, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x2e, + 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, + 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x46, 0x6f, 0x72, 0x43, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x72, 0x61, 0x66, 0x61, + 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x42, 0x6f, 0x64, 0x79, 0x22, 0x2f, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x12, 0x27, 0x2f, 0x76, 0x32, 0x2f, 0x73, 0x65, 0x6e, 0x74, + 0x72, 0x79, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x77, 0x65, 0x62, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, + 0xa1, 0x01, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x46, 0x6f, 0x72, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2a, + 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, + 0x79, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x46, 0x6f, 0x72, 0x43, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x72, 0x61, 0x66, + 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x42, 0x6f, 0x64, 0x79, 0x22, + 0x32, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c, 0x12, 0x2a, 0x2f, 0x76, 0x32, 0x2f, 0x73, 0x65, 0x6e, + 0x74, 0x72, 0x79, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x65, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x12, 0xb7, 0x01, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x46, 0x6f, 0x72, 0x55, 0x73, + 0x65, 0x72, 0x12, 0x27, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, + 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x46, 0x6f, 0x72, + 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x72, 0x61, + 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x42, 0x6f, 0x64, 0x79, + 0x22, 0x5b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x55, 0x12, 0x1a, 0x2f, 0x76, 0x32, 0x2f, 0x73, 0x65, + 0x6e, 0x74, 0x72, 0x79, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, + 0x75, 0x73, 0x65, 0x72, 0x5a, 0x37, 0x12, 0x35, 0x2f, 0x76, 0x32, 0x2f, 0x73, 0x65, 0x6e, 0x74, + 0x72, 0x79, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x7b, 0x6f, + 0x70, 0x74, 0x73, 0x2e, 0x75, 0x72, 0x6c, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x3d, 0x75, 0x73, 0x65, + 0x72, 0x2f, 0x2a, 0x7d, 0x2f, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0xd4, 0x01, + 0x0a, 0x10, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x12, 0x2d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, + 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, + 0x4b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x2e, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, 0x65, + 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x4b, + 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x61, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x5b, 0x22, 0x1c, 0x2f, 0x76, 0x32, 0x2f, 0x73, + 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2f, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x3a, 0x01, 0x2a, 0x5a, 0x38, 0x22, 0x33, 0x2f, 0x76, + 0x32, 0x2f, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2f, 0x7b, 0x6f, 0x70, 0x74, 0x73, 0x2e, 0x75, 0x72, 0x6c, 0x53, 0x63, 0x6f, + 0x70, 0x65, 0x3d, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x2a, 0x7d, 0x2f, 0x72, 0x65, 0x76, 0x6f, 0x6b, + 0x65, 0x3a, 0x01, 0x2a, 0x12, 0xc5, 0x01, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x67, 0x61, + 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, + 0x31, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, 0x65, 0x6e, 0x74, + 0x72, 0x79, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, + 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x4b, 0x75, 0x62, + 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x44, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3e, 0x12, 0x3c, + 0x2f, 0x76, 0x32, 0x2f, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x7b, 0x6f, 0x70, 0x74, 0x73, 0x2e, 0x75, 0x72, 0x6c, 0x53, + 0x63, 0x6f, 0x70, 0x65, 0x3d, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2f, 0x2a, 0x7d, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0xb5, 0x01, 0x0a, + 0x0e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, + 0x31, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, 0x65, 0x6e, 0x74, + 0x72, 0x79, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, + 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x4b, 0x75, 0x62, + 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x36, 0x12, 0x34, + 0x2f, 0x76, 0x32, 0x2f, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x7b, 0x6f, 0x70, 0x74, 0x73, 0x2e, 0x75, 0x72, 0x6c, 0x53, + 0x63, 0x6f, 0x70, 0x65, 0x3d, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x2a, 0x7d, 0x2f, 0x73, 0x65, 0x74, + 0x74, 0x69, 0x6e, 0x67, 0x12, 0xbb, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x53, 0x53, 0x4f, 0x55, + 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x31, 0x2e, 0x72, 0x61, 0x66, + 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x72, 0x70, + 0x63, 0x2e, 0x47, 0x65, 0x74, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, + 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, + 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, + 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x3f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x39, 0x12, 0x37, 0x2f, 0x76, 0x32, 0x2f, 0x73, + 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2f, 0x7b, 0x6f, 0x70, 0x74, 0x73, 0x2e, 0x75, 0x72, 0x6c, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x3d, + 0x73, 0x73, 0x6f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x2a, 0x7d, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, + 0x6e, 0x67, 0x12, 0xd1, 0x01, 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x67, + 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, + 0x12, 0x34, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, 0x65, 0x6e, + 0x74, 0x72, 0x79, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4b, 0x75, + 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, + 0x65, 0x76, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x65, + 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x47, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x41, 0x1a, 0x3c, 0x2f, 0x76, 0x32, 0x2f, 0x73, 0x65, 0x6e, 0x74, 0x72, + 0x79, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x7b, 0x6f, 0x70, + 0x74, 0x73, 0x2e, 0x75, 0x72, 0x6c, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x3d, 0x6f, 0x72, 0x67, 0x61, + 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x2a, 0x7d, 0x2f, 0x73, 0x65, 0x74, 0x74, + 0x69, 0x6e, 0x67, 0x3a, 0x01, 0x2a, 0x12, 0xc1, 0x01, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x34, 0x2e, 0x72, + 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, + 0x72, 0x70, 0x63, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, + 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x4b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, + 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3f, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x39, 0x1a, 0x34, 0x2f, 0x76, 0x32, 0x2f, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2f, 0x6b, 0x75, + 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x7b, 0x6f, 0x70, 0x74, 0x73, 0x2e, 0x75, + 0x72, 0x6c, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x3d, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x2a, 0x7d, 0x2f, + 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x3a, 0x01, 0x2a, 0x12, 0xc7, 0x01, 0x0a, 0x14, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x53, 0x4f, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, + 0x69, 0x6e, 0x67, 0x12, 0x34, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, + 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x65, 0x74, 0x74, 0x69, + 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x72, 0x61, 0x66, 0x61, + 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x72, 0x70, 0x63, + 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x42, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3c, 0x1a, 0x37, 0x2f, 0x76, 0x32, 0x2f, 0x73, 0x65, + 0x6e, 0x74, 0x72, 0x79, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, + 0x7b, 0x6f, 0x70, 0x74, 0x73, 0x2e, 0x75, 0x72, 0x6c, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x3d, 0x73, + 0x73, 0x6f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x2a, 0x7d, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, + 0x67, 0x3a, 0x01, 0x2a, 0x42, 0xe3, 0x04, 0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x2e, 0x72, 0x61, 0x66, + 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x72, 0x70, + 0x63, 0x42, 0x0f, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x52, 0x61, 0x66, 0x61, 0x79, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x2f, 0x72, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, + 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0xa2, 0x02, 0x04, 0x52, + 0x44, 0x53, 0x52, 0xaa, 0x02, 0x14, 0x52, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x44, 0x65, 0x76, 0x2e, + 0x53, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x52, 0x70, 0x63, 0xca, 0x02, 0x14, 0x52, 0x61, 0x66, + 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x53, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x5c, 0x52, 0x70, + 0x63, 0xe2, 0x02, 0x20, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x53, 0x65, + 0x6e, 0x74, 0x72, 0x79, 0x5c, 0x52, 0x70, 0x63, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x17, 0x52, 0x61, 0x66, 0x61, 0x79, 0x3a, 0x3a, 0x44, 0x65, + 0x76, 0x3a, 0x3a, 0x53, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x3a, 0x3a, 0x52, 0x70, 0x63, 0x92, 0x41, + 0xe4, 0x02, 0x12, 0x2d, 0x0a, 0x19, 0x53, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x20, 0x4b, 0x75, 0x62, + 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x20, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x22, + 0x0b, 0x0a, 0x09, 0x52, 0x61, 0x66, 0x61, 0x79, 0x20, 0x44, 0x65, 0x76, 0x32, 0x03, 0x32, 0x2e, + 0x30, 0x2a, 0x01, 0x02, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2f, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x79, 0x61, 0x6d, 0x6c, 0x52, 0x50, 0x0a, 0x03, + 0x34, 0x30, 0x33, 0x12, 0x49, 0x0a, 0x47, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, + 0x77, 0x68, 0x65, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x64, 0x6f, + 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x70, 0x65, 0x72, 0x6d, + 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x52, 0x3b, + 0x0a, 0x03, 0x34, 0x30, 0x34, 0x12, 0x34, 0x0a, 0x2a, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, + 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x65, 0x78, 0x69, + 0x73, 0x74, 0x2e, 0x12, 0x06, 0x0a, 0x04, 0x9a, 0x02, 0x01, 0x07, 0x5a, 0x38, 0x0a, 0x25, 0x0a, + 0x0a, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x41, 0x75, 0x74, 0x68, 0x12, 0x17, 0x08, 0x02, 0x1a, + 0x11, 0x58, 0x2d, 0x52, 0x41, 0x46, 0x41, 0x59, 0x2d, 0x41, 0x50, 0x49, 0x2d, 0x4b, 0x45, 0x59, + 0x49, 0x44, 0x20, 0x02, 0x0a, 0x0f, 0x0a, 0x09, 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, + 0x68, 0x12, 0x02, 0x08, 0x01, 0x62, 0x1f, 0x0a, 0x0e, 0x0a, 0x0a, 0x41, 0x70, 0x69, 0x4b, 0x65, + 0x79, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0x0a, 0x0d, 0x0a, 0x09, 0x42, 0x61, 0x73, 0x69, 0x63, + 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0xc8, 0xe2, 0x1e, 0x01, 0xd0, 0xe2, 0x1e, 0x01, 0xe0, 0xe2, + 0x1e, 0x01, 0xc0, 0xe3, 0x1e, 0x01, 0xc8, 0xe3, 0x1e, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +} + +var ( + file_proto_rpc_sentry_kubeconfig_proto_rawDescOnce sync.Once + file_proto_rpc_sentry_kubeconfig_proto_rawDescData = file_proto_rpc_sentry_kubeconfig_proto_rawDesc +) + +func file_proto_rpc_sentry_kubeconfig_proto_rawDescGZIP() []byte { + file_proto_rpc_sentry_kubeconfig_proto_rawDescOnce.Do(func() { + file_proto_rpc_sentry_kubeconfig_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_rpc_sentry_kubeconfig_proto_rawDescData) + }) + return file_proto_rpc_sentry_kubeconfig_proto_rawDescData +} + +var file_proto_rpc_sentry_kubeconfig_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_proto_rpc_sentry_kubeconfig_proto_goTypes = []interface{}{ + (*GetForClusterRequest)(nil), // 0: rafay.dev.sentry.rpc.GetForClusterRequest + (*GetForUserRequest)(nil), // 1: rafay.dev.sentry.rpc.GetForUserRequest + (*RevokeKubeconfigRequest)(nil), // 2: rafay.dev.sentry.rpc.RevokeKubeconfigRequest + (*RevokeKubeconfigResponse)(nil), // 3: rafay.dev.sentry.rpc.RevokeKubeconfigResponse + (*UpdateKubeconfigSettingRequest)(nil), // 4: rafay.dev.sentry.rpc.UpdateKubeconfigSettingRequest + (*UpdateKubeconfigSettingResponse)(nil), // 5: rafay.dev.sentry.rpc.UpdateKubeconfigSettingResponse + (*GetKubeconfigSettingRequest)(nil), // 6: rafay.dev.sentry.rpc.GetKubeconfigSettingRequest + (*GetKubeconfigSettingResponse)(nil), // 7: rafay.dev.sentry.rpc.GetKubeconfigSettingResponse + (*v3.QueryOptions)(nil), // 8: rafay.dev.types.common.v3.QueryOptions + (*v3.HttpBody)(nil), // 9: rafay.dev.types.common.v3.HttpBody +} +var file_proto_rpc_sentry_kubeconfig_proto_depIdxs = []int32{ + 8, // 0: rafay.dev.sentry.rpc.GetForClusterRequest.opts:type_name -> rafay.dev.types.common.v3.QueryOptions + 8, // 1: rafay.dev.sentry.rpc.GetForUserRequest.opts:type_name -> rafay.dev.types.common.v3.QueryOptions + 8, // 2: rafay.dev.sentry.rpc.RevokeKubeconfigRequest.opts:type_name -> rafay.dev.types.common.v3.QueryOptions + 8, // 3: rafay.dev.sentry.rpc.UpdateKubeconfigSettingRequest.opts:type_name -> rafay.dev.types.common.v3.QueryOptions + 8, // 4: rafay.dev.sentry.rpc.GetKubeconfigSettingRequest.opts:type_name -> rafay.dev.types.common.v3.QueryOptions + 0, // 5: rafay.dev.sentry.rpc.KubeConfig.GetForClusterWebSession:input_type -> rafay.dev.sentry.rpc.GetForClusterRequest + 0, // 6: rafay.dev.sentry.rpc.KubeConfig.GetForClusterSystemSession:input_type -> rafay.dev.sentry.rpc.GetForClusterRequest + 1, // 7: rafay.dev.sentry.rpc.KubeConfig.GetForUser:input_type -> rafay.dev.sentry.rpc.GetForUserRequest + 2, // 8: rafay.dev.sentry.rpc.KubeConfig.RevokeKubeconfig:input_type -> rafay.dev.sentry.rpc.RevokeKubeconfigRequest + 6, // 9: rafay.dev.sentry.rpc.KubeConfig.GetOrganizationSetting:input_type -> rafay.dev.sentry.rpc.GetKubeconfigSettingRequest + 6, // 10: rafay.dev.sentry.rpc.KubeConfig.GetUserSetting:input_type -> rafay.dev.sentry.rpc.GetKubeconfigSettingRequest + 6, // 11: rafay.dev.sentry.rpc.KubeConfig.GetSSOUserSetting:input_type -> rafay.dev.sentry.rpc.GetKubeconfigSettingRequest + 4, // 12: rafay.dev.sentry.rpc.KubeConfig.UpdateOrganizationSetting:input_type -> rafay.dev.sentry.rpc.UpdateKubeconfigSettingRequest + 4, // 13: rafay.dev.sentry.rpc.KubeConfig.UpdateUserSetting:input_type -> rafay.dev.sentry.rpc.UpdateKubeconfigSettingRequest + 4, // 14: rafay.dev.sentry.rpc.KubeConfig.UpdateSSOUserSetting:input_type -> rafay.dev.sentry.rpc.UpdateKubeconfigSettingRequest + 9, // 15: rafay.dev.sentry.rpc.KubeConfig.GetForClusterWebSession:output_type -> rafay.dev.types.common.v3.HttpBody + 9, // 16: rafay.dev.sentry.rpc.KubeConfig.GetForClusterSystemSession:output_type -> rafay.dev.types.common.v3.HttpBody + 9, // 17: rafay.dev.sentry.rpc.KubeConfig.GetForUser:output_type -> rafay.dev.types.common.v3.HttpBody + 3, // 18: rafay.dev.sentry.rpc.KubeConfig.RevokeKubeconfig:output_type -> rafay.dev.sentry.rpc.RevokeKubeconfigResponse + 7, // 19: rafay.dev.sentry.rpc.KubeConfig.GetOrganizationSetting:output_type -> rafay.dev.sentry.rpc.GetKubeconfigSettingResponse + 7, // 20: rafay.dev.sentry.rpc.KubeConfig.GetUserSetting:output_type -> rafay.dev.sentry.rpc.GetKubeconfigSettingResponse + 7, // 21: rafay.dev.sentry.rpc.KubeConfig.GetSSOUserSetting:output_type -> rafay.dev.sentry.rpc.GetKubeconfigSettingResponse + 5, // 22: rafay.dev.sentry.rpc.KubeConfig.UpdateOrganizationSetting:output_type -> rafay.dev.sentry.rpc.UpdateKubeconfigSettingResponse + 5, // 23: rafay.dev.sentry.rpc.KubeConfig.UpdateUserSetting:output_type -> rafay.dev.sentry.rpc.UpdateKubeconfigSettingResponse + 5, // 24: rafay.dev.sentry.rpc.KubeConfig.UpdateSSOUserSetting:output_type -> rafay.dev.sentry.rpc.UpdateKubeconfigSettingResponse + 15, // [15:25] is the sub-list for method output_type + 5, // [5:15] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_proto_rpc_sentry_kubeconfig_proto_init() } +func file_proto_rpc_sentry_kubeconfig_proto_init() { + if File_proto_rpc_sentry_kubeconfig_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_proto_rpc_sentry_kubeconfig_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetForClusterRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_rpc_sentry_kubeconfig_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetForUserRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_rpc_sentry_kubeconfig_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RevokeKubeconfigRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_rpc_sentry_kubeconfig_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RevokeKubeconfigResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_rpc_sentry_kubeconfig_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateKubeconfigSettingRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_rpc_sentry_kubeconfig_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateKubeconfigSettingResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_rpc_sentry_kubeconfig_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetKubeconfigSettingRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_rpc_sentry_kubeconfig_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetKubeconfigSettingResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_proto_rpc_sentry_kubeconfig_proto_rawDesc, + NumEnums: 0, + NumMessages: 8, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_proto_rpc_sentry_kubeconfig_proto_goTypes, + DependencyIndexes: file_proto_rpc_sentry_kubeconfig_proto_depIdxs, + MessageInfos: file_proto_rpc_sentry_kubeconfig_proto_msgTypes, + }.Build() + File_proto_rpc_sentry_kubeconfig_proto = out.File + file_proto_rpc_sentry_kubeconfig_proto_rawDesc = nil + file_proto_rpc_sentry_kubeconfig_proto_goTypes = nil + file_proto_rpc_sentry_kubeconfig_proto_depIdxs = nil +} diff --git a/components/common/proto/rpc/sentry/kubeconfig.pb.gw.go b/components/common/proto/rpc/sentry/kubeconfig.pb.gw.go new file mode 100644 index 0000000..5cd80b5 --- /dev/null +++ b/components/common/proto/rpc/sentry/kubeconfig.pb.gw.go @@ -0,0 +1,1344 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: proto/rpc/sentry/kubeconfig.proto + +/* +Package sentry is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package sentry + +import ( + "context" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + +var ( + filter_KubeConfig_GetForClusterWebSession_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_KubeConfig_GetForClusterWebSession_0(ctx context.Context, marshaler runtime.Marshaler, client KubeConfigClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetForClusterRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_KubeConfig_GetForClusterWebSession_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetForClusterWebSession(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_KubeConfig_GetForClusterWebSession_0(ctx context.Context, marshaler runtime.Marshaler, server KubeConfigServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetForClusterRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_KubeConfig_GetForClusterWebSession_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetForClusterWebSession(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_KubeConfig_GetForClusterSystemSession_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_KubeConfig_GetForClusterSystemSession_0(ctx context.Context, marshaler runtime.Marshaler, client KubeConfigClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetForClusterRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_KubeConfig_GetForClusterSystemSession_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetForClusterSystemSession(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_KubeConfig_GetForClusterSystemSession_0(ctx context.Context, marshaler runtime.Marshaler, server KubeConfigServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetForClusterRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_KubeConfig_GetForClusterSystemSession_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetForClusterSystemSession(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_KubeConfig_GetForUser_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_KubeConfig_GetForUser_0(ctx context.Context, marshaler runtime.Marshaler, client KubeConfigClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetForUserRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_KubeConfig_GetForUser_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetForUser(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_KubeConfig_GetForUser_0(ctx context.Context, marshaler runtime.Marshaler, server KubeConfigServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetForUserRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_KubeConfig_GetForUser_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetForUser(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_KubeConfig_GetForUser_1 = &utilities.DoubleArray{Encoding: map[string]int{"opts": 0, "urlScope": 1}, Base: []int{1, 1, 1, 0}, Check: []int{0, 1, 2, 3}} +) + +func request_KubeConfig_GetForUser_1(ctx context.Context, marshaler runtime.Marshaler, client KubeConfigClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetForUserRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["opts.urlScope"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "opts.urlScope") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "opts.urlScope", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "opts.urlScope", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_KubeConfig_GetForUser_1); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetForUser(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_KubeConfig_GetForUser_1(ctx context.Context, marshaler runtime.Marshaler, server KubeConfigServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetForUserRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["opts.urlScope"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "opts.urlScope") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "opts.urlScope", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "opts.urlScope", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_KubeConfig_GetForUser_1); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetForUser(ctx, &protoReq) + return msg, metadata, err + +} + +func request_KubeConfig_RevokeKubeconfig_0(ctx context.Context, marshaler runtime.Marshaler, client KubeConfigClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RevokeKubeconfigRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.RevokeKubeconfig(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_KubeConfig_RevokeKubeconfig_0(ctx context.Context, marshaler runtime.Marshaler, server KubeConfigServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RevokeKubeconfigRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.RevokeKubeconfig(ctx, &protoReq) + return msg, metadata, err + +} + +func request_KubeConfig_RevokeKubeconfig_1(ctx context.Context, marshaler runtime.Marshaler, client KubeConfigClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RevokeKubeconfigRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["opts.urlScope"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "opts.urlScope") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "opts.urlScope", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "opts.urlScope", err) + } + + msg, err := client.RevokeKubeconfig(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_KubeConfig_RevokeKubeconfig_1(ctx context.Context, marshaler runtime.Marshaler, server KubeConfigServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RevokeKubeconfigRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["opts.urlScope"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "opts.urlScope") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "opts.urlScope", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "opts.urlScope", err) + } + + msg, err := server.RevokeKubeconfig(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_KubeConfig_GetOrganizationSetting_0 = &utilities.DoubleArray{Encoding: map[string]int{"opts": 0, "urlScope": 1}, Base: []int{1, 1, 1, 0}, Check: []int{0, 1, 2, 3}} +) + +func request_KubeConfig_GetOrganizationSetting_0(ctx context.Context, marshaler runtime.Marshaler, client KubeConfigClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetKubeconfigSettingRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["opts.urlScope"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "opts.urlScope") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "opts.urlScope", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "opts.urlScope", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_KubeConfig_GetOrganizationSetting_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetOrganizationSetting(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_KubeConfig_GetOrganizationSetting_0(ctx context.Context, marshaler runtime.Marshaler, server KubeConfigServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetKubeconfigSettingRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["opts.urlScope"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "opts.urlScope") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "opts.urlScope", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "opts.urlScope", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_KubeConfig_GetOrganizationSetting_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetOrganizationSetting(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_KubeConfig_GetUserSetting_0 = &utilities.DoubleArray{Encoding: map[string]int{"opts": 0, "urlScope": 1}, Base: []int{1, 1, 1, 0}, Check: []int{0, 1, 2, 3}} +) + +func request_KubeConfig_GetUserSetting_0(ctx context.Context, marshaler runtime.Marshaler, client KubeConfigClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetKubeconfigSettingRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["opts.urlScope"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "opts.urlScope") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "opts.urlScope", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "opts.urlScope", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_KubeConfig_GetUserSetting_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetUserSetting(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_KubeConfig_GetUserSetting_0(ctx context.Context, marshaler runtime.Marshaler, server KubeConfigServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetKubeconfigSettingRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["opts.urlScope"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "opts.urlScope") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "opts.urlScope", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "opts.urlScope", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_KubeConfig_GetUserSetting_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetUserSetting(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_KubeConfig_GetSSOUserSetting_0 = &utilities.DoubleArray{Encoding: map[string]int{"opts": 0, "urlScope": 1}, Base: []int{1, 1, 1, 0}, Check: []int{0, 1, 2, 3}} +) + +func request_KubeConfig_GetSSOUserSetting_0(ctx context.Context, marshaler runtime.Marshaler, client KubeConfigClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetKubeconfigSettingRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["opts.urlScope"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "opts.urlScope") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "opts.urlScope", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "opts.urlScope", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_KubeConfig_GetSSOUserSetting_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetSSOUserSetting(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_KubeConfig_GetSSOUserSetting_0(ctx context.Context, marshaler runtime.Marshaler, server KubeConfigServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetKubeconfigSettingRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["opts.urlScope"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "opts.urlScope") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "opts.urlScope", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "opts.urlScope", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_KubeConfig_GetSSOUserSetting_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetSSOUserSetting(ctx, &protoReq) + return msg, metadata, err + +} + +func request_KubeConfig_UpdateOrganizationSetting_0(ctx context.Context, marshaler runtime.Marshaler, client KubeConfigClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateKubeconfigSettingRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["opts.urlScope"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "opts.urlScope") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "opts.urlScope", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "opts.urlScope", err) + } + + msg, err := client.UpdateOrganizationSetting(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_KubeConfig_UpdateOrganizationSetting_0(ctx context.Context, marshaler runtime.Marshaler, server KubeConfigServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateKubeconfigSettingRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["opts.urlScope"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "opts.urlScope") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "opts.urlScope", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "opts.urlScope", err) + } + + msg, err := server.UpdateOrganizationSetting(ctx, &protoReq) + return msg, metadata, err + +} + +func request_KubeConfig_UpdateUserSetting_0(ctx context.Context, marshaler runtime.Marshaler, client KubeConfigClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateKubeconfigSettingRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["opts.urlScope"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "opts.urlScope") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "opts.urlScope", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "opts.urlScope", err) + } + + msg, err := client.UpdateUserSetting(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_KubeConfig_UpdateUserSetting_0(ctx context.Context, marshaler runtime.Marshaler, server KubeConfigServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateKubeconfigSettingRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["opts.urlScope"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "opts.urlScope") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "opts.urlScope", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "opts.urlScope", err) + } + + msg, err := server.UpdateUserSetting(ctx, &protoReq) + return msg, metadata, err + +} + +func request_KubeConfig_UpdateSSOUserSetting_0(ctx context.Context, marshaler runtime.Marshaler, client KubeConfigClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateKubeconfigSettingRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["opts.urlScope"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "opts.urlScope") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "opts.urlScope", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "opts.urlScope", err) + } + + msg, err := client.UpdateSSOUserSetting(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_KubeConfig_UpdateSSOUserSetting_0(ctx context.Context, marshaler runtime.Marshaler, server KubeConfigServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateKubeconfigSettingRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["opts.urlScope"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "opts.urlScope") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "opts.urlScope", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "opts.urlScope", err) + } + + msg, err := server.UpdateSSOUserSetting(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterKubeConfigHandlerServer registers the http handlers for service KubeConfig to "mux". +// UnaryRPC :call KubeConfigServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterKubeConfigHandlerFromEndpoint instead. +func RegisterKubeConfigHandlerServer(ctx context.Context, mux *runtime.ServeMux, server KubeConfigServer) error { + + mux.Handle("GET", pattern_KubeConfig_GetForClusterWebSession_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.sentry.rpc.KubeConfig/GetForClusterWebSession", runtime.WithHTTPPathPattern("/v2/sentry/kubeconfig/clusterwebsession")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_KubeConfig_GetForClusterWebSession_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_KubeConfig_GetForClusterWebSession_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_KubeConfig_GetForClusterSystemSession_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.sentry.rpc.KubeConfig/GetForClusterSystemSession", runtime.WithHTTPPathPattern("/v2/sentry/kubeconfig/clustersystemsession")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_KubeConfig_GetForClusterSystemSession_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_KubeConfig_GetForClusterSystemSession_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_KubeConfig_GetForUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.sentry.rpc.KubeConfig/GetForUser", runtime.WithHTTPPathPattern("/v2/sentry/kubeconfig/user")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_KubeConfig_GetForUser_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_KubeConfig_GetForUser_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_KubeConfig_GetForUser_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.sentry.rpc.KubeConfig/GetForUser", runtime.WithHTTPPathPattern("/v2/sentry/kubeconfig/{opts.urlScope=user/*}/download")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_KubeConfig_GetForUser_1(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_KubeConfig_GetForUser_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_KubeConfig_RevokeKubeconfig_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.sentry.rpc.KubeConfig/RevokeKubeconfig", runtime.WithHTTPPathPattern("/v2/sentry/kubeconfig/revoke")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_KubeConfig_RevokeKubeconfig_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_KubeConfig_RevokeKubeconfig_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_KubeConfig_RevokeKubeconfig_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.sentry.rpc.KubeConfig/RevokeKubeconfig", runtime.WithHTTPPathPattern("/v2/sentry/kubeconfig/{opts.urlScope=user/*}/revoke")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_KubeConfig_RevokeKubeconfig_1(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_KubeConfig_RevokeKubeconfig_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_KubeConfig_GetOrganizationSetting_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.sentry.rpc.KubeConfig/GetOrganizationSetting", runtime.WithHTTPPathPattern("/v2/sentry/kubeconfig/{opts.urlScope=organization/*}/setting")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_KubeConfig_GetOrganizationSetting_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_KubeConfig_GetOrganizationSetting_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_KubeConfig_GetUserSetting_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.sentry.rpc.KubeConfig/GetUserSetting", runtime.WithHTTPPathPattern("/v2/sentry/kubeconfig/{opts.urlScope=user/*}/setting")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_KubeConfig_GetUserSetting_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_KubeConfig_GetUserSetting_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_KubeConfig_GetSSOUserSetting_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.sentry.rpc.KubeConfig/GetSSOUserSetting", runtime.WithHTTPPathPattern("/v2/sentry/kubeconfig/{opts.urlScope=ssouser/*}/setting")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_KubeConfig_GetSSOUserSetting_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_KubeConfig_GetSSOUserSetting_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_KubeConfig_UpdateOrganizationSetting_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.sentry.rpc.KubeConfig/UpdateOrganizationSetting", runtime.WithHTTPPathPattern("/v2/sentry/kubeconfig/{opts.urlScope=organization/*}/setting")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_KubeConfig_UpdateOrganizationSetting_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_KubeConfig_UpdateOrganizationSetting_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_KubeConfig_UpdateUserSetting_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.sentry.rpc.KubeConfig/UpdateUserSetting", runtime.WithHTTPPathPattern("/v2/sentry/kubeconfig/{opts.urlScope=user/*}/setting")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_KubeConfig_UpdateUserSetting_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_KubeConfig_UpdateUserSetting_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_KubeConfig_UpdateSSOUserSetting_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.sentry.rpc.KubeConfig/UpdateSSOUserSetting", runtime.WithHTTPPathPattern("/v2/sentry/kubeconfig/{opts.urlScope=ssouser/*}/setting")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_KubeConfig_UpdateSSOUserSetting_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_KubeConfig_UpdateSSOUserSetting_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterKubeConfigHandlerFromEndpoint is same as RegisterKubeConfigHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterKubeConfigHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterKubeConfigHandler(ctx, mux, conn) +} + +// RegisterKubeConfigHandler registers the http handlers for service KubeConfig to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterKubeConfigHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterKubeConfigHandlerClient(ctx, mux, NewKubeConfigClient(conn)) +} + +// RegisterKubeConfigHandlerClient registers the http handlers for service KubeConfig +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "KubeConfigClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "KubeConfigClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "KubeConfigClient" to call the correct interceptors. +func RegisterKubeConfigHandlerClient(ctx context.Context, mux *runtime.ServeMux, client KubeConfigClient) error { + + mux.Handle("GET", pattern_KubeConfig_GetForClusterWebSession_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.sentry.rpc.KubeConfig/GetForClusterWebSession", runtime.WithHTTPPathPattern("/v2/sentry/kubeconfig/clusterwebsession")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_KubeConfig_GetForClusterWebSession_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_KubeConfig_GetForClusterWebSession_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_KubeConfig_GetForClusterSystemSession_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.sentry.rpc.KubeConfig/GetForClusterSystemSession", runtime.WithHTTPPathPattern("/v2/sentry/kubeconfig/clustersystemsession")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_KubeConfig_GetForClusterSystemSession_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_KubeConfig_GetForClusterSystemSession_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_KubeConfig_GetForUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.sentry.rpc.KubeConfig/GetForUser", runtime.WithHTTPPathPattern("/v2/sentry/kubeconfig/user")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_KubeConfig_GetForUser_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_KubeConfig_GetForUser_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_KubeConfig_GetForUser_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.sentry.rpc.KubeConfig/GetForUser", runtime.WithHTTPPathPattern("/v2/sentry/kubeconfig/{opts.urlScope=user/*}/download")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_KubeConfig_GetForUser_1(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_KubeConfig_GetForUser_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_KubeConfig_RevokeKubeconfig_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.sentry.rpc.KubeConfig/RevokeKubeconfig", runtime.WithHTTPPathPattern("/v2/sentry/kubeconfig/revoke")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_KubeConfig_RevokeKubeconfig_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_KubeConfig_RevokeKubeconfig_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_KubeConfig_RevokeKubeconfig_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.sentry.rpc.KubeConfig/RevokeKubeconfig", runtime.WithHTTPPathPattern("/v2/sentry/kubeconfig/{opts.urlScope=user/*}/revoke")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_KubeConfig_RevokeKubeconfig_1(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_KubeConfig_RevokeKubeconfig_1(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_KubeConfig_GetOrganizationSetting_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.sentry.rpc.KubeConfig/GetOrganizationSetting", runtime.WithHTTPPathPattern("/v2/sentry/kubeconfig/{opts.urlScope=organization/*}/setting")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_KubeConfig_GetOrganizationSetting_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_KubeConfig_GetOrganizationSetting_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_KubeConfig_GetUserSetting_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.sentry.rpc.KubeConfig/GetUserSetting", runtime.WithHTTPPathPattern("/v2/sentry/kubeconfig/{opts.urlScope=user/*}/setting")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_KubeConfig_GetUserSetting_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_KubeConfig_GetUserSetting_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_KubeConfig_GetSSOUserSetting_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.sentry.rpc.KubeConfig/GetSSOUserSetting", runtime.WithHTTPPathPattern("/v2/sentry/kubeconfig/{opts.urlScope=ssouser/*}/setting")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_KubeConfig_GetSSOUserSetting_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_KubeConfig_GetSSOUserSetting_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_KubeConfig_UpdateOrganizationSetting_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.sentry.rpc.KubeConfig/UpdateOrganizationSetting", runtime.WithHTTPPathPattern("/v2/sentry/kubeconfig/{opts.urlScope=organization/*}/setting")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_KubeConfig_UpdateOrganizationSetting_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_KubeConfig_UpdateOrganizationSetting_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_KubeConfig_UpdateUserSetting_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.sentry.rpc.KubeConfig/UpdateUserSetting", runtime.WithHTTPPathPattern("/v2/sentry/kubeconfig/{opts.urlScope=user/*}/setting")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_KubeConfig_UpdateUserSetting_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_KubeConfig_UpdateUserSetting_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_KubeConfig_UpdateSSOUserSetting_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.sentry.rpc.KubeConfig/UpdateSSOUserSetting", runtime.WithHTTPPathPattern("/v2/sentry/kubeconfig/{opts.urlScope=ssouser/*}/setting")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_KubeConfig_UpdateSSOUserSetting_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_KubeConfig_UpdateSSOUserSetting_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_KubeConfig_GetForClusterWebSession_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v2", "sentry", "kubeconfig", "clusterwebsession"}, "")) + + pattern_KubeConfig_GetForClusterSystemSession_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v2", "sentry", "kubeconfig", "clustersystemsession"}, "")) + + pattern_KubeConfig_GetForUser_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v2", "sentry", "kubeconfig", "user"}, "")) + + pattern_KubeConfig_GetForUser_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 2, 5, 4, 2, 5}, []string{"v2", "sentry", "kubeconfig", "user", "opts.urlScope", "download"}, "")) + + pattern_KubeConfig_RevokeKubeconfig_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v2", "sentry", "kubeconfig", "revoke"}, "")) + + pattern_KubeConfig_RevokeKubeconfig_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 2, 5, 4, 2, 5}, []string{"v2", "sentry", "kubeconfig", "user", "opts.urlScope", "revoke"}, "")) + + pattern_KubeConfig_GetOrganizationSetting_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 2, 5, 4, 2, 5}, []string{"v2", "sentry", "kubeconfig", "organization", "opts.urlScope", "setting"}, "")) + + pattern_KubeConfig_GetUserSetting_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 2, 5, 4, 2, 5}, []string{"v2", "sentry", "kubeconfig", "user", "opts.urlScope", "setting"}, "")) + + pattern_KubeConfig_GetSSOUserSetting_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 2, 5, 4, 2, 5}, []string{"v2", "sentry", "kubeconfig", "ssouser", "opts.urlScope", "setting"}, "")) + + pattern_KubeConfig_UpdateOrganizationSetting_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 2, 5, 4, 2, 5}, []string{"v2", "sentry", "kubeconfig", "organization", "opts.urlScope", "setting"}, "")) + + pattern_KubeConfig_UpdateUserSetting_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 2, 5, 4, 2, 5}, []string{"v2", "sentry", "kubeconfig", "user", "opts.urlScope", "setting"}, "")) + + pattern_KubeConfig_UpdateSSOUserSetting_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 2, 5, 4, 2, 5}, []string{"v2", "sentry", "kubeconfig", "ssouser", "opts.urlScope", "setting"}, "")) +) + +var ( + forward_KubeConfig_GetForClusterWebSession_0 = runtime.ForwardResponseMessage + + forward_KubeConfig_GetForClusterSystemSession_0 = runtime.ForwardResponseMessage + + forward_KubeConfig_GetForUser_0 = runtime.ForwardResponseMessage + + forward_KubeConfig_GetForUser_1 = runtime.ForwardResponseMessage + + forward_KubeConfig_RevokeKubeconfig_0 = runtime.ForwardResponseMessage + + forward_KubeConfig_RevokeKubeconfig_1 = runtime.ForwardResponseMessage + + forward_KubeConfig_GetOrganizationSetting_0 = runtime.ForwardResponseMessage + + forward_KubeConfig_GetUserSetting_0 = runtime.ForwardResponseMessage + + forward_KubeConfig_GetSSOUserSetting_0 = runtime.ForwardResponseMessage + + forward_KubeConfig_UpdateOrganizationSetting_0 = runtime.ForwardResponseMessage + + forward_KubeConfig_UpdateUserSetting_0 = runtime.ForwardResponseMessage + + forward_KubeConfig_UpdateSSOUserSetting_0 = runtime.ForwardResponseMessage +) diff --git a/components/common/proto/rpc/sentry/kubeconfig.proto b/components/common/proto/rpc/sentry/kubeconfig.proto new file mode 100644 index 0000000..93bfd51 --- /dev/null +++ b/components/common/proto/rpc/sentry/kubeconfig.proto @@ -0,0 +1,202 @@ +syntax = "proto3"; +package rafay.dev.sentry.rpc; + +import "google/api/annotations.proto"; +import "gogoproto/gogo.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; +import "proto/types/commonpb/v3/common.proto"; +import "proto/types/sentry/sentry.proto"; + +// Enable custom Marshal method. +option (gogoproto.marshaler_all) = true; +// Enable custom Unmarshal method. +option (gogoproto.unmarshaler_all) = true; +// Enable custom Size method (Required by Marshal and Unmarshal). +option (gogoproto.sizer_all) = true; +// Enable registration with golang/protobuf for the grpc-gateway. +option (gogoproto.goproto_registration) = true; +// Enable generation of XXX_MessageName methods for grpc-go/status. +option (gogoproto.messagename_all) = true; + +option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { + info : { + title : "Sentry KubeConfig Service" + version : "2.0" + contact : {name : "Rafay Dev"} + } + schemes : HTTPS + consumes : "application/json" + consumes : "application/yaml" + produces : "application/json" + produces : "application/yaml" + security_definitions : { + security : { + key : "BasicAuth" + value : {type : TYPE_BASIC} + } + security : { + key : "ApiKeyAuth" + value : {type : TYPE_API_KEY in : IN_HEADER name : "X-RAFAY-API-KEYID"} + } + } + security : { + security_requirement : { + key : "BasicAuth" + value : {} + } + security_requirement : { + key : "ApiKeyAuth" + value : {} + } + } + responses : { + key : "403" + value : { + description : "Returned when the user does not have permission to access " + "the resource." + } + } + responses : { + key : "404" + value : { + description : "Returned when the resource does not exist." + schema : {json_schema : {type : STRING}} + } + } +}; + +message GetForClusterRequest { + rafay.dev.types.common.v3.QueryOptions opts = 1 + [ (gogoproto.nullable) = false, (gogoproto.embed) = true ]; + string namespace = 2; + bool systemUser = 3; +} + +message GetForUserRequest { + rafay.dev.types.common.v3.QueryOptions opts = 1 + [ (gogoproto.nullable) = false, (gogoproto.embed) = true ]; + string namespace = 2; +} + +message RevokeKubeconfigRequest { + rafay.dev.types.common.v3.QueryOptions opts = 1 + [ (gogoproto.nullable) = false, (gogoproto.embed) = true ]; +} + +message RevokeKubeconfigResponse {} + +message UpdateKubeconfigSettingRequest { + rafay.dev.types.common.v3.QueryOptions opts = 1 + [ (gogoproto.nullable) = false, (gogoproto.embed) = true ]; + int64 validitySeconds = 2; + bool enableSessionCheck = 3; + bool enablePrivateRelay = 4; + bool enforceOrgAdminSecretAccess = 5; + bool disableWebKubectl = 6; + bool disableCLIKubectl = 7; +} + +message UpdateKubeconfigSettingResponse {} + +message GetKubeconfigSettingRequest { + rafay.dev.types.common.v3.QueryOptions opts = 1 + [ (gogoproto.nullable) = false, (gogoproto.embed) = true ]; +} + +message GetKubeconfigSettingResponse { + int64 validitySeconds = 1 [ + (gogoproto.jsontag) = "validitySeconds" + ]; + + bool enableSessionCheck = 2 [ + (gogoproto.jsontag) = "enableSessionCheck" + ]; + + bool enablePrivateRelay = 3 + [ (gogoproto.jsontag) = "enablePrivateRelay" ]; + + bool enforceOrgAdminSecretAccess = 4 + [ (gogoproto.jsontag) = "enforceOrgAdminSecretAccess" ]; + + bool disableWebKubectl = 5 + [ (gogoproto.jsontag) = "disableWebKubectl" ]; + + bool disableCLIKubectl = 6 + [ (gogoproto.jsontag) = "disableCLIKubectl" ]; + +} + +service KubeConfig { + rpc GetForClusterWebSession(GetForClusterRequest) + returns (rafay.dev.types.common.v3.HttpBody) { + option (google.api.http) = { + get : "/v2/sentry/kubeconfig/clusterwebsession" + }; + }; + + rpc GetForClusterSystemSession(GetForClusterRequest) + returns (rafay.dev.types.common.v3.HttpBody) { + option (google.api.http) = { + get : "/v2/sentry/kubeconfig/clustersystemsession" + }; + }; + + rpc GetForUser(GetForUserRequest) returns (rafay.dev.types.common.v3.HttpBody) { + option (google.api.http) = { + get : "/v2/sentry/kubeconfig/user" + additional_bindings { + get : "/v2/sentry/kubeconfig/{opts.urlScope=user/*}/download" + } + }; + }; + + rpc RevokeKubeconfig(RevokeKubeconfigRequest) returns (RevokeKubeconfigResponse) { + option (google.api.http) = { + post : "/v2/sentry/kubeconfig/revoke" + body : "*" + additional_bindings { + post : "/v2/sentry/kubeconfig/{opts.urlScope=user/*}/revoke" + body : "*" + } + }; + }; + + rpc GetOrganizationSetting(GetKubeconfigSettingRequest) returns (GetKubeconfigSettingResponse) { + option (google.api.http) = { + get : "/v2/sentry/kubeconfig/{opts.urlScope=organization/*}/setting" + }; + }; + + rpc GetUserSetting(GetKubeconfigSettingRequest) returns (GetKubeconfigSettingResponse) { + option (google.api.http) = { + get : "/v2/sentry/kubeconfig/{opts.urlScope=user/*}/setting" + }; + }; + + rpc GetSSOUserSetting(GetKubeconfigSettingRequest) returns (GetKubeconfigSettingResponse) { + option (google.api.http) = { + get : "/v2/sentry/kubeconfig/{opts.urlScope=ssouser/*}/setting" + }; + }; + + rpc UpdateOrganizationSetting(UpdateKubeconfigSettingRequest) returns (UpdateKubeconfigSettingResponse) { + option (google.api.http) = { + put : "/v2/sentry/kubeconfig/{opts.urlScope=organization/*}/setting" + body : "*" + }; + }; + + rpc UpdateUserSetting(UpdateKubeconfigSettingRequest) returns (UpdateKubeconfigSettingResponse) { + option (google.api.http) = { + put : "/v2/sentry/kubeconfig/{opts.urlScope=user/*}/setting" + body : "*" + }; + } + + rpc UpdateSSOUserSetting(UpdateKubeconfigSettingRequest) returns (UpdateKubeconfigSettingResponse) { + option (google.api.http) = { + put : "/v2/sentry/kubeconfig/{opts.urlScope=ssouser/*}/setting" + body : "*" + }; + } +}; \ No newline at end of file diff --git a/components/common/proto/rpc/sentry/kubeconfig_grpc.pb.go b/components/common/proto/rpc/sentry/kubeconfig_grpc.pb.go new file mode 100644 index 0000000..18e0b8e --- /dev/null +++ b/components/common/proto/rpc/sentry/kubeconfig_grpc.pb.go @@ -0,0 +1,428 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.2.0 +// - protoc (unknown) +// source: proto/rpc/sentry/kubeconfig.proto + +package sentry + +import ( + context "context" + v3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/commonpb/v3" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// KubeConfigClient is the client API for KubeConfig service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type KubeConfigClient interface { + GetForClusterWebSession(ctx context.Context, in *GetForClusterRequest, opts ...grpc.CallOption) (*v3.HttpBody, error) + GetForClusterSystemSession(ctx context.Context, in *GetForClusterRequest, opts ...grpc.CallOption) (*v3.HttpBody, error) + GetForUser(ctx context.Context, in *GetForUserRequest, opts ...grpc.CallOption) (*v3.HttpBody, error) + RevokeKubeconfig(ctx context.Context, in *RevokeKubeconfigRequest, opts ...grpc.CallOption) (*RevokeKubeconfigResponse, error) + GetOrganizationSetting(ctx context.Context, in *GetKubeconfigSettingRequest, opts ...grpc.CallOption) (*GetKubeconfigSettingResponse, error) + GetUserSetting(ctx context.Context, in *GetKubeconfigSettingRequest, opts ...grpc.CallOption) (*GetKubeconfigSettingResponse, error) + GetSSOUserSetting(ctx context.Context, in *GetKubeconfigSettingRequest, opts ...grpc.CallOption) (*GetKubeconfigSettingResponse, error) + UpdateOrganizationSetting(ctx context.Context, in *UpdateKubeconfigSettingRequest, opts ...grpc.CallOption) (*UpdateKubeconfigSettingResponse, error) + UpdateUserSetting(ctx context.Context, in *UpdateKubeconfigSettingRequest, opts ...grpc.CallOption) (*UpdateKubeconfigSettingResponse, error) + UpdateSSOUserSetting(ctx context.Context, in *UpdateKubeconfigSettingRequest, opts ...grpc.CallOption) (*UpdateKubeconfigSettingResponse, error) +} + +type kubeConfigClient struct { + cc grpc.ClientConnInterface +} + +func NewKubeConfigClient(cc grpc.ClientConnInterface) KubeConfigClient { + return &kubeConfigClient{cc} +} + +func (c *kubeConfigClient) GetForClusterWebSession(ctx context.Context, in *GetForClusterRequest, opts ...grpc.CallOption) (*v3.HttpBody, error) { + out := new(v3.HttpBody) + err := c.cc.Invoke(ctx, "/rafay.dev.sentry.rpc.KubeConfig/GetForClusterWebSession", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *kubeConfigClient) GetForClusterSystemSession(ctx context.Context, in *GetForClusterRequest, opts ...grpc.CallOption) (*v3.HttpBody, error) { + out := new(v3.HttpBody) + err := c.cc.Invoke(ctx, "/rafay.dev.sentry.rpc.KubeConfig/GetForClusterSystemSession", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *kubeConfigClient) GetForUser(ctx context.Context, in *GetForUserRequest, opts ...grpc.CallOption) (*v3.HttpBody, error) { + out := new(v3.HttpBody) + err := c.cc.Invoke(ctx, "/rafay.dev.sentry.rpc.KubeConfig/GetForUser", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *kubeConfigClient) RevokeKubeconfig(ctx context.Context, in *RevokeKubeconfigRequest, opts ...grpc.CallOption) (*RevokeKubeconfigResponse, error) { + out := new(RevokeKubeconfigResponse) + err := c.cc.Invoke(ctx, "/rafay.dev.sentry.rpc.KubeConfig/RevokeKubeconfig", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *kubeConfigClient) GetOrganizationSetting(ctx context.Context, in *GetKubeconfigSettingRequest, opts ...grpc.CallOption) (*GetKubeconfigSettingResponse, error) { + out := new(GetKubeconfigSettingResponse) + err := c.cc.Invoke(ctx, "/rafay.dev.sentry.rpc.KubeConfig/GetOrganizationSetting", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *kubeConfigClient) GetUserSetting(ctx context.Context, in *GetKubeconfigSettingRequest, opts ...grpc.CallOption) (*GetKubeconfigSettingResponse, error) { + out := new(GetKubeconfigSettingResponse) + err := c.cc.Invoke(ctx, "/rafay.dev.sentry.rpc.KubeConfig/GetUserSetting", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *kubeConfigClient) GetSSOUserSetting(ctx context.Context, in *GetKubeconfigSettingRequest, opts ...grpc.CallOption) (*GetKubeconfigSettingResponse, error) { + out := new(GetKubeconfigSettingResponse) + err := c.cc.Invoke(ctx, "/rafay.dev.sentry.rpc.KubeConfig/GetSSOUserSetting", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *kubeConfigClient) UpdateOrganizationSetting(ctx context.Context, in *UpdateKubeconfigSettingRequest, opts ...grpc.CallOption) (*UpdateKubeconfigSettingResponse, error) { + out := new(UpdateKubeconfigSettingResponse) + err := c.cc.Invoke(ctx, "/rafay.dev.sentry.rpc.KubeConfig/UpdateOrganizationSetting", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *kubeConfigClient) UpdateUserSetting(ctx context.Context, in *UpdateKubeconfigSettingRequest, opts ...grpc.CallOption) (*UpdateKubeconfigSettingResponse, error) { + out := new(UpdateKubeconfigSettingResponse) + err := c.cc.Invoke(ctx, "/rafay.dev.sentry.rpc.KubeConfig/UpdateUserSetting", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *kubeConfigClient) UpdateSSOUserSetting(ctx context.Context, in *UpdateKubeconfigSettingRequest, opts ...grpc.CallOption) (*UpdateKubeconfigSettingResponse, error) { + out := new(UpdateKubeconfigSettingResponse) + err := c.cc.Invoke(ctx, "/rafay.dev.sentry.rpc.KubeConfig/UpdateSSOUserSetting", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// KubeConfigServer is the server API for KubeConfig service. +// All implementations should embed UnimplementedKubeConfigServer +// for forward compatibility +type KubeConfigServer interface { + GetForClusterWebSession(context.Context, *GetForClusterRequest) (*v3.HttpBody, error) + GetForClusterSystemSession(context.Context, *GetForClusterRequest) (*v3.HttpBody, error) + GetForUser(context.Context, *GetForUserRequest) (*v3.HttpBody, error) + RevokeKubeconfig(context.Context, *RevokeKubeconfigRequest) (*RevokeKubeconfigResponse, error) + GetOrganizationSetting(context.Context, *GetKubeconfigSettingRequest) (*GetKubeconfigSettingResponse, error) + GetUserSetting(context.Context, *GetKubeconfigSettingRequest) (*GetKubeconfigSettingResponse, error) + GetSSOUserSetting(context.Context, *GetKubeconfigSettingRequest) (*GetKubeconfigSettingResponse, error) + UpdateOrganizationSetting(context.Context, *UpdateKubeconfigSettingRequest) (*UpdateKubeconfigSettingResponse, error) + UpdateUserSetting(context.Context, *UpdateKubeconfigSettingRequest) (*UpdateKubeconfigSettingResponse, error) + UpdateSSOUserSetting(context.Context, *UpdateKubeconfigSettingRequest) (*UpdateKubeconfigSettingResponse, error) +} + +// UnimplementedKubeConfigServer should be embedded to have forward compatible implementations. +type UnimplementedKubeConfigServer struct { +} + +func (UnimplementedKubeConfigServer) GetForClusterWebSession(context.Context, *GetForClusterRequest) (*v3.HttpBody, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetForClusterWebSession not implemented") +} +func (UnimplementedKubeConfigServer) GetForClusterSystemSession(context.Context, *GetForClusterRequest) (*v3.HttpBody, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetForClusterSystemSession not implemented") +} +func (UnimplementedKubeConfigServer) GetForUser(context.Context, *GetForUserRequest) (*v3.HttpBody, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetForUser not implemented") +} +func (UnimplementedKubeConfigServer) RevokeKubeconfig(context.Context, *RevokeKubeconfigRequest) (*RevokeKubeconfigResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RevokeKubeconfig not implemented") +} +func (UnimplementedKubeConfigServer) GetOrganizationSetting(context.Context, *GetKubeconfigSettingRequest) (*GetKubeconfigSettingResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetOrganizationSetting not implemented") +} +func (UnimplementedKubeConfigServer) GetUserSetting(context.Context, *GetKubeconfigSettingRequest) (*GetKubeconfigSettingResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetUserSetting not implemented") +} +func (UnimplementedKubeConfigServer) GetSSOUserSetting(context.Context, *GetKubeconfigSettingRequest) (*GetKubeconfigSettingResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetSSOUserSetting not implemented") +} +func (UnimplementedKubeConfigServer) UpdateOrganizationSetting(context.Context, *UpdateKubeconfigSettingRequest) (*UpdateKubeconfigSettingResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateOrganizationSetting not implemented") +} +func (UnimplementedKubeConfigServer) UpdateUserSetting(context.Context, *UpdateKubeconfigSettingRequest) (*UpdateKubeconfigSettingResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateUserSetting not implemented") +} +func (UnimplementedKubeConfigServer) UpdateSSOUserSetting(context.Context, *UpdateKubeconfigSettingRequest) (*UpdateKubeconfigSettingResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateSSOUserSetting not implemented") +} + +// UnsafeKubeConfigServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to KubeConfigServer will +// result in compilation errors. +type UnsafeKubeConfigServer interface { + mustEmbedUnimplementedKubeConfigServer() +} + +func RegisterKubeConfigServer(s grpc.ServiceRegistrar, srv KubeConfigServer) { + s.RegisterService(&KubeConfig_ServiceDesc, srv) +} + +func _KubeConfig_GetForClusterWebSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetForClusterRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KubeConfigServer).GetForClusterWebSession(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rafay.dev.sentry.rpc.KubeConfig/GetForClusterWebSession", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KubeConfigServer).GetForClusterWebSession(ctx, req.(*GetForClusterRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _KubeConfig_GetForClusterSystemSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetForClusterRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KubeConfigServer).GetForClusterSystemSession(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rafay.dev.sentry.rpc.KubeConfig/GetForClusterSystemSession", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KubeConfigServer).GetForClusterSystemSession(ctx, req.(*GetForClusterRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _KubeConfig_GetForUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetForUserRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KubeConfigServer).GetForUser(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rafay.dev.sentry.rpc.KubeConfig/GetForUser", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KubeConfigServer).GetForUser(ctx, req.(*GetForUserRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _KubeConfig_RevokeKubeconfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RevokeKubeconfigRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KubeConfigServer).RevokeKubeconfig(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rafay.dev.sentry.rpc.KubeConfig/RevokeKubeconfig", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KubeConfigServer).RevokeKubeconfig(ctx, req.(*RevokeKubeconfigRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _KubeConfig_GetOrganizationSetting_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetKubeconfigSettingRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KubeConfigServer).GetOrganizationSetting(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rafay.dev.sentry.rpc.KubeConfig/GetOrganizationSetting", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KubeConfigServer).GetOrganizationSetting(ctx, req.(*GetKubeconfigSettingRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _KubeConfig_GetUserSetting_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetKubeconfigSettingRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KubeConfigServer).GetUserSetting(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rafay.dev.sentry.rpc.KubeConfig/GetUserSetting", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KubeConfigServer).GetUserSetting(ctx, req.(*GetKubeconfigSettingRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _KubeConfig_GetSSOUserSetting_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetKubeconfigSettingRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KubeConfigServer).GetSSOUserSetting(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rafay.dev.sentry.rpc.KubeConfig/GetSSOUserSetting", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KubeConfigServer).GetSSOUserSetting(ctx, req.(*GetKubeconfigSettingRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _KubeConfig_UpdateOrganizationSetting_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateKubeconfigSettingRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KubeConfigServer).UpdateOrganizationSetting(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rafay.dev.sentry.rpc.KubeConfig/UpdateOrganizationSetting", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KubeConfigServer).UpdateOrganizationSetting(ctx, req.(*UpdateKubeconfigSettingRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _KubeConfig_UpdateUserSetting_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateKubeconfigSettingRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KubeConfigServer).UpdateUserSetting(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rafay.dev.sentry.rpc.KubeConfig/UpdateUserSetting", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KubeConfigServer).UpdateUserSetting(ctx, req.(*UpdateKubeconfigSettingRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _KubeConfig_UpdateSSOUserSetting_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateKubeconfigSettingRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KubeConfigServer).UpdateSSOUserSetting(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rafay.dev.sentry.rpc.KubeConfig/UpdateSSOUserSetting", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KubeConfigServer).UpdateSSOUserSetting(ctx, req.(*UpdateKubeconfigSettingRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// KubeConfig_ServiceDesc is the grpc.ServiceDesc for KubeConfig service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var KubeConfig_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "rafay.dev.sentry.rpc.KubeConfig", + HandlerType: (*KubeConfigServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetForClusterWebSession", + Handler: _KubeConfig_GetForClusterWebSession_Handler, + }, + { + MethodName: "GetForClusterSystemSession", + Handler: _KubeConfig_GetForClusterSystemSession_Handler, + }, + { + MethodName: "GetForUser", + Handler: _KubeConfig_GetForUser_Handler, + }, + { + MethodName: "RevokeKubeconfig", + Handler: _KubeConfig_RevokeKubeconfig_Handler, + }, + { + MethodName: "GetOrganizationSetting", + Handler: _KubeConfig_GetOrganizationSetting_Handler, + }, + { + MethodName: "GetUserSetting", + Handler: _KubeConfig_GetUserSetting_Handler, + }, + { + MethodName: "GetSSOUserSetting", + Handler: _KubeConfig_GetSSOUserSetting_Handler, + }, + { + MethodName: "UpdateOrganizationSetting", + Handler: _KubeConfig_UpdateOrganizationSetting_Handler, + }, + { + MethodName: "UpdateUserSetting", + Handler: _KubeConfig_UpdateUserSetting_Handler, + }, + { + MethodName: "UpdateSSOUserSetting", + Handler: _KubeConfig_UpdateSSOUserSetting_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "proto/rpc/sentry/kubeconfig.proto", +} diff --git a/components/common/proto/rpc/sentry/kubectl_cluster.pb.go b/components/common/proto/rpc/sentry/kubectl_cluster.pb.go new file mode 100644 index 0000000..96007ce --- /dev/null +++ b/components/common/proto/rpc/sentry/kubectl_cluster.pb.go @@ -0,0 +1,459 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc (unknown) +// source: proto/rpc/sentry/kubectl_cluster.proto + +package sentry + +import ( + v3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/commonpb/v3" + _ "github.com/RafaySystems/rcloud-base/components/common/proto/types/sentry" + _ "github.com/gogo/protobuf/gogoproto" + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type UpdateKubectlClusterSettingsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Opts *v3.QueryOptions `protobuf:"bytes,1,opt,name=opts,proto3" json:"opts,omitempty"` + DisableWebKubectl bool `protobuf:"varint,2,opt,name=disableWebKubectl,proto3" json:"disableWebKubectl,omitempty"` + DisableCLIKubectl bool `protobuf:"varint,3,opt,name=disableCLIKubectl,proto3" json:"disableCLIKubectl,omitempty"` +} + +func (x *UpdateKubectlClusterSettingsRequest) Reset() { + *x = UpdateKubectlClusterSettingsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_rpc_sentry_kubectl_cluster_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateKubectlClusterSettingsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateKubectlClusterSettingsRequest) ProtoMessage() {} + +func (x *UpdateKubectlClusterSettingsRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_rpc_sentry_kubectl_cluster_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateKubectlClusterSettingsRequest.ProtoReflect.Descriptor instead. +func (*UpdateKubectlClusterSettingsRequest) Descriptor() ([]byte, []int) { + return file_proto_rpc_sentry_kubectl_cluster_proto_rawDescGZIP(), []int{0} +} + +func (x *UpdateKubectlClusterSettingsRequest) GetOpts() *v3.QueryOptions { + if x != nil { + return x.Opts + } + return nil +} + +func (x *UpdateKubectlClusterSettingsRequest) GetDisableWebKubectl() bool { + if x != nil { + return x.DisableWebKubectl + } + return false +} + +func (x *UpdateKubectlClusterSettingsRequest) GetDisableCLIKubectl() bool { + if x != nil { + return x.DisableCLIKubectl + } + return false +} + +type UpdateKubectlClusterSettingsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *UpdateKubectlClusterSettingsResponse) Reset() { + *x = UpdateKubectlClusterSettingsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_rpc_sentry_kubectl_cluster_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateKubectlClusterSettingsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateKubectlClusterSettingsResponse) ProtoMessage() {} + +func (x *UpdateKubectlClusterSettingsResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_rpc_sentry_kubectl_cluster_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateKubectlClusterSettingsResponse.ProtoReflect.Descriptor instead. +func (*UpdateKubectlClusterSettingsResponse) Descriptor() ([]byte, []int) { + return file_proto_rpc_sentry_kubectl_cluster_proto_rawDescGZIP(), []int{1} +} + +type GetKubectlClusterSettingsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Opts *v3.QueryOptions `protobuf:"bytes,1,opt,name=opts,proto3" json:"opts,omitempty"` +} + +func (x *GetKubectlClusterSettingsRequest) Reset() { + *x = GetKubectlClusterSettingsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_rpc_sentry_kubectl_cluster_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetKubectlClusterSettingsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetKubectlClusterSettingsRequest) ProtoMessage() {} + +func (x *GetKubectlClusterSettingsRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_rpc_sentry_kubectl_cluster_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetKubectlClusterSettingsRequest.ProtoReflect.Descriptor instead. +func (*GetKubectlClusterSettingsRequest) Descriptor() ([]byte, []int) { + return file_proto_rpc_sentry_kubectl_cluster_proto_rawDescGZIP(), []int{2} +} + +func (x *GetKubectlClusterSettingsRequest) GetOpts() *v3.QueryOptions { + if x != nil { + return x.Opts + } + return nil +} + +type GetKubectlClusterSettingsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + DisableWebKubectl bool `protobuf:"varint,1,opt,name=disableWebKubectl,proto3" json:"disableWebKubectl,omitempty"` + DisableCLIKubectl bool `protobuf:"varint,2,opt,name=disableCLIKubectl,proto3" json:"disableCLIKubectl,omitempty"` +} + +func (x *GetKubectlClusterSettingsResponse) Reset() { + *x = GetKubectlClusterSettingsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_rpc_sentry_kubectl_cluster_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetKubectlClusterSettingsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetKubectlClusterSettingsResponse) ProtoMessage() {} + +func (x *GetKubectlClusterSettingsResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_rpc_sentry_kubectl_cluster_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetKubectlClusterSettingsResponse.ProtoReflect.Descriptor instead. +func (*GetKubectlClusterSettingsResponse) Descriptor() ([]byte, []int) { + return file_proto_rpc_sentry_kubectl_cluster_proto_rawDescGZIP(), []int{3} +} + +func (x *GetKubectlClusterSettingsResponse) GetDisableWebKubectl() bool { + if x != nil { + return x.DisableWebKubectl + } + return false +} + +func (x *GetKubectlClusterSettingsResponse) GetDisableCLIKubectl() bool { + if x != nil { + return x.DisableCLIKubectl + } + return false +} + +var File_proto_rpc_sentry_kubectl_cluster_proto protoreflect.FileDescriptor + +var file_proto_rpc_sentry_kubectl_cluster_proto_rawDesc = []byte{ + 0x0a, 0x26, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x73, 0x65, 0x6e, 0x74, + 0x72, 0x79, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x63, 0x74, 0x6c, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, + 0x64, 0x65, 0x76, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x72, 0x70, 0x63, 0x1a, 0x1c, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, + 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, + 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x24, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x70, 0x62, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2f, 0x73, 0x65, 0x6e, + 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc8, 0x01, 0x0a, 0x23, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x74, 0x6c, 0x43, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x45, 0x0a, 0x04, 0x6f, 0x70, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x27, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0xd0, 0xde, + 0x1f, 0x01, 0x52, 0x04, 0x6f, 0x70, 0x74, 0x73, 0x12, 0x2c, 0x0a, 0x11, 0x64, 0x69, 0x73, 0x61, + 0x62, 0x6c, 0x65, 0x57, 0x65, 0x62, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x74, 0x6c, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x11, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x57, 0x65, 0x62, 0x4b, + 0x75, 0x62, 0x65, 0x63, 0x74, 0x6c, 0x12, 0x2c, 0x0a, 0x11, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, + 0x65, 0x43, 0x4c, 0x49, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x74, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x11, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x4c, 0x49, 0x4b, 0x75, 0x62, + 0x65, 0x63, 0x74, 0x6c, 0x22, 0x26, 0x0a, 0x24, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4b, 0x75, + 0x62, 0x65, 0x63, 0x74, 0x6c, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, + 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x69, 0x0a, 0x20, + 0x47, 0x65, 0x74, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x74, 0x6c, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x45, 0x0a, 0x04, 0x6f, 0x70, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, + 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0xd0, 0xde, 0x1f, + 0x01, 0x52, 0x04, 0x6f, 0x70, 0x74, 0x73, 0x22, 0xad, 0x01, 0x0a, 0x21, 0x47, 0x65, 0x74, 0x4b, + 0x75, 0x62, 0x65, 0x63, 0x74, 0x6c, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x65, 0x74, + 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x43, 0x0a, + 0x11, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x57, 0x65, 0x62, 0x4b, 0x75, 0x62, 0x65, 0x63, + 0x74, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, 0x15, 0xea, 0xde, 0x1f, 0x11, 0x64, 0x69, + 0x73, 0x61, 0x62, 0x6c, 0x65, 0x57, 0x65, 0x62, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x74, 0x6c, 0x52, + 0x11, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x57, 0x65, 0x62, 0x4b, 0x75, 0x62, 0x65, 0x63, + 0x74, 0x6c, 0x12, 0x43, 0x0a, 0x11, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x4c, 0x49, + 0x4b, 0x75, 0x62, 0x65, 0x63, 0x74, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x42, 0x15, 0xea, + 0xde, 0x1f, 0x11, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x4c, 0x49, 0x4b, 0x75, 0x62, + 0x65, 0x63, 0x74, 0x6c, 0x52, 0x11, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x4c, 0x49, + 0x4b, 0x75, 0x62, 0x65, 0x63, 0x74, 0x6c, 0x32, 0xc0, 0x03, 0x0a, 0x16, 0x4b, 0x75, 0x62, 0x65, + 0x63, 0x74, 0x6c, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, + 0x67, 0x73, 0x12, 0xd7, 0x01, 0x0a, 0x1c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4b, 0x75, 0x62, + 0x65, 0x63, 0x74, 0x6c, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, + 0x6e, 0x67, 0x73, 0x12, 0x39, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, + 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x74, 0x6c, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, + 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3a, + 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, + 0x79, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4b, 0x75, 0x62, 0x65, + 0x63, 0x74, 0x6c, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, + 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x40, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x3a, 0x1a, 0x35, 0x2f, 0x76, 0x32, 0x2f, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2f, 0x6b, + 0x75, 0x62, 0x65, 0x63, 0x74, 0x6c, 0x2f, 0x7b, 0x6f, 0x70, 0x74, 0x73, 0x2e, 0x75, 0x72, 0x6c, + 0x53, 0x63, 0x6f, 0x70, 0x65, 0x3d, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x2a, 0x7d, + 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x3a, 0x01, 0x2a, 0x12, 0xcb, 0x01, 0x0a, + 0x19, 0x47, 0x65, 0x74, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x74, 0x6c, 0x43, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x36, 0x2e, 0x72, 0x61, 0x66, + 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x72, 0x70, + 0x63, 0x2e, 0x47, 0x65, 0x74, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x74, 0x6c, 0x43, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, + 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x4b, 0x75, 0x62, + 0x65, 0x63, 0x74, 0x6c, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, + 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3d, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x37, 0x12, 0x35, 0x2f, 0x76, 0x32, 0x2f, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2f, + 0x6b, 0x75, 0x62, 0x65, 0x63, 0x74, 0x6c, 0x2f, 0x7b, 0x6f, 0x70, 0x74, 0x73, 0x2e, 0x75, 0x72, + 0x6c, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x3d, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x2a, + 0x7d, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x42, 0xf3, 0x04, 0x0a, 0x18, 0x63, + 0x6f, 0x6d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, 0x65, 0x6e, + 0x74, 0x72, 0x79, 0x2e, 0x72, 0x70, 0x63, 0x42, 0x13, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x74, 0x6c, + 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x61, 0x66, 0x61, 0x79, + 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x2f, 0x72, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x62, + 0x61, 0x73, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x70, 0x63, 0x2f, + 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0xa2, 0x02, 0x04, 0x52, 0x44, 0x53, 0x52, 0xaa, 0x02, 0x14, + 0x52, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x44, 0x65, 0x76, 0x2e, 0x53, 0x65, 0x6e, 0x74, 0x72, 0x79, + 0x2e, 0x52, 0x70, 0x63, 0xca, 0x02, 0x14, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, + 0x5c, 0x53, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x5c, 0x52, 0x70, 0x63, 0xe2, 0x02, 0x20, 0x52, 0x61, + 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x53, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x5c, 0x52, + 0x70, 0x63, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, + 0x17, 0x52, 0x61, 0x66, 0x61, 0x79, 0x3a, 0x3a, 0x44, 0x65, 0x76, 0x3a, 0x3a, 0x53, 0x65, 0x6e, + 0x74, 0x72, 0x79, 0x3a, 0x3a, 0x52, 0x70, 0x63, 0x92, 0x41, 0xf0, 0x02, 0x12, 0x39, 0x0a, 0x25, + 0x53, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x20, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x74, 0x6c, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x20, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x22, 0x0b, 0x0a, 0x09, 0x52, 0x61, 0x66, 0x61, 0x79, 0x20, 0x44, + 0x65, 0x76, 0x32, 0x03, 0x32, 0x2e, 0x30, 0x2a, 0x01, 0x02, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x32, 0x10, 0x61, 0x70, + 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x10, + 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, + 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x79, 0x61, + 0x6d, 0x6c, 0x52, 0x50, 0x0a, 0x03, 0x34, 0x30, 0x33, 0x12, 0x49, 0x0a, 0x47, 0x52, 0x65, 0x74, + 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, + 0x73, 0x65, 0x72, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x68, 0x61, 0x76, + 0x65, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x6f, 0x20, + 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x2e, 0x52, 0x3b, 0x0a, 0x03, 0x34, 0x30, 0x34, 0x12, 0x34, 0x0a, 0x2a, 0x52, + 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x74, 0x68, 0x65, + 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, + 0x6f, 0x74, 0x20, 0x65, 0x78, 0x69, 0x73, 0x74, 0x2e, 0x12, 0x06, 0x0a, 0x04, 0x9a, 0x02, 0x01, + 0x07, 0x5a, 0x38, 0x0a, 0x25, 0x0a, 0x0a, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x41, 0x75, 0x74, + 0x68, 0x12, 0x17, 0x08, 0x02, 0x1a, 0x11, 0x58, 0x2d, 0x52, 0x41, 0x46, 0x41, 0x59, 0x2d, 0x41, + 0x50, 0x49, 0x2d, 0x4b, 0x45, 0x59, 0x49, 0x44, 0x20, 0x02, 0x0a, 0x0f, 0x0a, 0x09, 0x42, 0x61, + 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, 0x68, 0x12, 0x02, 0x08, 0x01, 0x62, 0x1f, 0x0a, 0x0e, 0x0a, + 0x0a, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0x0a, 0x0d, 0x0a, + 0x09, 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0xc8, 0xe2, 0x1e, 0x01, + 0xd0, 0xe2, 0x1e, 0x01, 0xe0, 0xe2, 0x1e, 0x01, 0xc0, 0xe3, 0x1e, 0x01, 0xc8, 0xe3, 0x1e, 0x01, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_proto_rpc_sentry_kubectl_cluster_proto_rawDescOnce sync.Once + file_proto_rpc_sentry_kubectl_cluster_proto_rawDescData = file_proto_rpc_sentry_kubectl_cluster_proto_rawDesc +) + +func file_proto_rpc_sentry_kubectl_cluster_proto_rawDescGZIP() []byte { + file_proto_rpc_sentry_kubectl_cluster_proto_rawDescOnce.Do(func() { + file_proto_rpc_sentry_kubectl_cluster_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_rpc_sentry_kubectl_cluster_proto_rawDescData) + }) + return file_proto_rpc_sentry_kubectl_cluster_proto_rawDescData +} + +var file_proto_rpc_sentry_kubectl_cluster_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_proto_rpc_sentry_kubectl_cluster_proto_goTypes = []interface{}{ + (*UpdateKubectlClusterSettingsRequest)(nil), // 0: rafay.dev.sentry.rpc.UpdateKubectlClusterSettingsRequest + (*UpdateKubectlClusterSettingsResponse)(nil), // 1: rafay.dev.sentry.rpc.UpdateKubectlClusterSettingsResponse + (*GetKubectlClusterSettingsRequest)(nil), // 2: rafay.dev.sentry.rpc.GetKubectlClusterSettingsRequest + (*GetKubectlClusterSettingsResponse)(nil), // 3: rafay.dev.sentry.rpc.GetKubectlClusterSettingsResponse + (*v3.QueryOptions)(nil), // 4: rafay.dev.types.common.v3.QueryOptions +} +var file_proto_rpc_sentry_kubectl_cluster_proto_depIdxs = []int32{ + 4, // 0: rafay.dev.sentry.rpc.UpdateKubectlClusterSettingsRequest.opts:type_name -> rafay.dev.types.common.v3.QueryOptions + 4, // 1: rafay.dev.sentry.rpc.GetKubectlClusterSettingsRequest.opts:type_name -> rafay.dev.types.common.v3.QueryOptions + 0, // 2: rafay.dev.sentry.rpc.KubectlClusterSettings.UpdateKubectlClusterSettings:input_type -> rafay.dev.sentry.rpc.UpdateKubectlClusterSettingsRequest + 2, // 3: rafay.dev.sentry.rpc.KubectlClusterSettings.GetKubectlClusterSettings:input_type -> rafay.dev.sentry.rpc.GetKubectlClusterSettingsRequest + 1, // 4: rafay.dev.sentry.rpc.KubectlClusterSettings.UpdateKubectlClusterSettings:output_type -> rafay.dev.sentry.rpc.UpdateKubectlClusterSettingsResponse + 3, // 5: rafay.dev.sentry.rpc.KubectlClusterSettings.GetKubectlClusterSettings:output_type -> rafay.dev.sentry.rpc.GetKubectlClusterSettingsResponse + 4, // [4:6] is the sub-list for method output_type + 2, // [2:4] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_proto_rpc_sentry_kubectl_cluster_proto_init() } +func file_proto_rpc_sentry_kubectl_cluster_proto_init() { + if File_proto_rpc_sentry_kubectl_cluster_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_proto_rpc_sentry_kubectl_cluster_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateKubectlClusterSettingsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_rpc_sentry_kubectl_cluster_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateKubectlClusterSettingsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_rpc_sentry_kubectl_cluster_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetKubectlClusterSettingsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_rpc_sentry_kubectl_cluster_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetKubectlClusterSettingsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_proto_rpc_sentry_kubectl_cluster_proto_rawDesc, + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_proto_rpc_sentry_kubectl_cluster_proto_goTypes, + DependencyIndexes: file_proto_rpc_sentry_kubectl_cluster_proto_depIdxs, + MessageInfos: file_proto_rpc_sentry_kubectl_cluster_proto_msgTypes, + }.Build() + File_proto_rpc_sentry_kubectl_cluster_proto = out.File + file_proto_rpc_sentry_kubectl_cluster_proto_rawDesc = nil + file_proto_rpc_sentry_kubectl_cluster_proto_goTypes = nil + file_proto_rpc_sentry_kubectl_cluster_proto_depIdxs = nil +} diff --git a/components/common/proto/rpc/sentry/kubectl_cluster.pb.gw.go b/components/common/proto/rpc/sentry/kubectl_cluster.pb.gw.go new file mode 100644 index 0000000..0ef2b1c --- /dev/null +++ b/components/common/proto/rpc/sentry/kubectl_cluster.pb.gw.go @@ -0,0 +1,318 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: proto/rpc/sentry/kubectl_cluster.proto + +/* +Package sentry is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package sentry + +import ( + "context" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + +func request_KubectlClusterSettings_UpdateKubectlClusterSettings_0(ctx context.Context, marshaler runtime.Marshaler, client KubectlClusterSettingsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateKubectlClusterSettingsRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["opts.urlScope"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "opts.urlScope") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "opts.urlScope", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "opts.urlScope", err) + } + + msg, err := client.UpdateKubectlClusterSettings(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_KubectlClusterSettings_UpdateKubectlClusterSettings_0(ctx context.Context, marshaler runtime.Marshaler, server KubectlClusterSettingsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateKubectlClusterSettingsRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["opts.urlScope"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "opts.urlScope") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "opts.urlScope", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "opts.urlScope", err) + } + + msg, err := server.UpdateKubectlClusterSettings(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_KubectlClusterSettings_GetKubectlClusterSettings_0 = &utilities.DoubleArray{Encoding: map[string]int{"opts": 0, "urlScope": 1}, Base: []int{1, 1, 1, 0}, Check: []int{0, 1, 2, 3}} +) + +func request_KubectlClusterSettings_GetKubectlClusterSettings_0(ctx context.Context, marshaler runtime.Marshaler, client KubectlClusterSettingsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetKubectlClusterSettingsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["opts.urlScope"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "opts.urlScope") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "opts.urlScope", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "opts.urlScope", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_KubectlClusterSettings_GetKubectlClusterSettings_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetKubectlClusterSettings(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_KubectlClusterSettings_GetKubectlClusterSettings_0(ctx context.Context, marshaler runtime.Marshaler, server KubectlClusterSettingsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetKubectlClusterSettingsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["opts.urlScope"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "opts.urlScope") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "opts.urlScope", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "opts.urlScope", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_KubectlClusterSettings_GetKubectlClusterSettings_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetKubectlClusterSettings(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterKubectlClusterSettingsHandlerServer registers the http handlers for service KubectlClusterSettings to "mux". +// UnaryRPC :call KubectlClusterSettingsServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterKubectlClusterSettingsHandlerFromEndpoint instead. +func RegisterKubectlClusterSettingsHandlerServer(ctx context.Context, mux *runtime.ServeMux, server KubectlClusterSettingsServer) error { + + mux.Handle("PUT", pattern_KubectlClusterSettings_UpdateKubectlClusterSettings_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.sentry.rpc.KubectlClusterSettings/UpdateKubectlClusterSettings", runtime.WithHTTPPathPattern("/v2/sentry/kubectl/{opts.urlScope=cluster/*}/settings")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_KubectlClusterSettings_UpdateKubectlClusterSettings_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_KubectlClusterSettings_UpdateKubectlClusterSettings_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_KubectlClusterSettings_GetKubectlClusterSettings_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/rafay.dev.sentry.rpc.KubectlClusterSettings/GetKubectlClusterSettings", runtime.WithHTTPPathPattern("/v2/sentry/kubectl/{opts.urlScope=cluster/*}/settings")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_KubectlClusterSettings_GetKubectlClusterSettings_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_KubectlClusterSettings_GetKubectlClusterSettings_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterKubectlClusterSettingsHandlerFromEndpoint is same as RegisterKubectlClusterSettingsHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterKubectlClusterSettingsHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterKubectlClusterSettingsHandler(ctx, mux, conn) +} + +// RegisterKubectlClusterSettingsHandler registers the http handlers for service KubectlClusterSettings to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterKubectlClusterSettingsHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterKubectlClusterSettingsHandlerClient(ctx, mux, NewKubectlClusterSettingsClient(conn)) +} + +// RegisterKubectlClusterSettingsHandlerClient registers the http handlers for service KubectlClusterSettings +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "KubectlClusterSettingsClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "KubectlClusterSettingsClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "KubectlClusterSettingsClient" to call the correct interceptors. +func RegisterKubectlClusterSettingsHandlerClient(ctx context.Context, mux *runtime.ServeMux, client KubectlClusterSettingsClient) error { + + mux.Handle("PUT", pattern_KubectlClusterSettings_UpdateKubectlClusterSettings_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.sentry.rpc.KubectlClusterSettings/UpdateKubectlClusterSettings", runtime.WithHTTPPathPattern("/v2/sentry/kubectl/{opts.urlScope=cluster/*}/settings")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_KubectlClusterSettings_UpdateKubectlClusterSettings_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_KubectlClusterSettings_UpdateKubectlClusterSettings_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_KubectlClusterSettings_GetKubectlClusterSettings_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/rafay.dev.sentry.rpc.KubectlClusterSettings/GetKubectlClusterSettings", runtime.WithHTTPPathPattern("/v2/sentry/kubectl/{opts.urlScope=cluster/*}/settings")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_KubectlClusterSettings_GetKubectlClusterSettings_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_KubectlClusterSettings_GetKubectlClusterSettings_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_KubectlClusterSettings_UpdateKubectlClusterSettings_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 2, 5, 4, 2, 5}, []string{"v2", "sentry", "kubectl", "cluster", "opts.urlScope", "settings"}, "")) + + pattern_KubectlClusterSettings_GetKubectlClusterSettings_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 2, 5, 4, 2, 5}, []string{"v2", "sentry", "kubectl", "cluster", "opts.urlScope", "settings"}, "")) +) + +var ( + forward_KubectlClusterSettings_UpdateKubectlClusterSettings_0 = runtime.ForwardResponseMessage + + forward_KubectlClusterSettings_GetKubectlClusterSettings_0 = runtime.ForwardResponseMessage +) diff --git a/components/common/proto/rpc/sentry/kubectl_cluster.proto b/components/common/proto/rpc/sentry/kubectl_cluster.proto new file mode 100644 index 0000000..1798de2 --- /dev/null +++ b/components/common/proto/rpc/sentry/kubectl_cluster.proto @@ -0,0 +1,109 @@ +syntax = "proto3"; +package rafay.dev.sentry.rpc; + +import "google/api/annotations.proto"; +import "gogoproto/gogo.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; +import "proto/types/commonpb/v3/common.proto"; +import "proto/types/sentry/sentry.proto"; + +// Enable custom Marshal method. +option (gogoproto.marshaler_all) = true; +// Enable custom Unmarshal method. +option (gogoproto.unmarshaler_all) = true; +// Enable custom Size method (Required by Marshal and Unmarshal). +option (gogoproto.sizer_all) = true; +// Enable registration with golang/protobuf for the grpc-gateway. +option (gogoproto.goproto_registration) = true; +// Enable generation of XXX_MessageName methods for grpc-go/status. +option (gogoproto.messagename_all) = true; + +option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { + info : { + title : "Sentry KubectlClusterSettings Service" + version : "2.0" + contact : {name : "Rafay Dev"} + } + schemes : HTTPS + consumes : "application/json" + consumes : "application/yaml" + produces : "application/json" + produces : "application/yaml" + security_definitions : { + security : { + key : "BasicAuth" + value : {type : TYPE_BASIC} + } + security : { + key : "ApiKeyAuth" + value : {type : TYPE_API_KEY in : IN_HEADER name : "X-RAFAY-API-KEYID"} + } + } + security : { + security_requirement : { + key : "BasicAuth" + value : {} + } + security_requirement : { + key : "ApiKeyAuth" + value : {} + } + } + responses : { + key : "403" + value : { + description : "Returned when the user does not have permission to access " + "the resource." + } + } + responses : { + key : "404" + value : { + description : "Returned when the resource does not exist." + schema : {json_schema : {type : STRING}} + } + } +}; + + +message UpdateKubectlClusterSettingsRequest { + rafay.dev.types.common.v3.QueryOptions opts = 1 [ + (gogoproto.nullable) = false, + (gogoproto.embed) = true + ]; + bool disableWebKubectl = 2; + bool disableCLIKubectl = 3; +} + +message UpdateKubectlClusterSettingsResponse {} + +message GetKubectlClusterSettingsRequest { + rafay.dev.types.common.v3.QueryOptions opts = 1 + [ (gogoproto.nullable) = false, (gogoproto.embed) = true ]; +} + +message GetKubectlClusterSettingsResponse { + bool disableWebKubectl = 1 [ + (gogoproto.jsontag) = "disableWebKubectl" + ]; + + bool disableCLIKubectl = 2 [ + (gogoproto.jsontag) = "disableCLIKubectl" + ]; +} + +service KubectlClusterSettings { + rpc UpdateKubectlClusterSettings(UpdateKubectlClusterSettingsRequest) returns (UpdateKubectlClusterSettingsResponse) { + option (google.api.http) = { + put : "/v2/sentry/kubectl/{opts.urlScope=cluster/*}/settings" + body : "*" + }; + }; + + rpc GetKubectlClusterSettings(GetKubectlClusterSettingsRequest) + returns (GetKubectlClusterSettingsResponse) { + option (google.api.http) = { + get : "/v2/sentry/kubectl/{opts.urlScope=cluster/*}/settings" + }; + }; +}; \ No newline at end of file diff --git a/components/common/proto/rpc/sentry/kubectl_cluster_grpc.pb.go b/components/common/proto/rpc/sentry/kubectl_cluster_grpc.pb.go new file mode 100644 index 0000000..6d9e9bf --- /dev/null +++ b/components/common/proto/rpc/sentry/kubectl_cluster_grpc.pb.go @@ -0,0 +1,139 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.2.0 +// - protoc (unknown) +// source: proto/rpc/sentry/kubectl_cluster.proto + +package sentry + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// KubectlClusterSettingsClient is the client API for KubectlClusterSettings service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type KubectlClusterSettingsClient interface { + UpdateKubectlClusterSettings(ctx context.Context, in *UpdateKubectlClusterSettingsRequest, opts ...grpc.CallOption) (*UpdateKubectlClusterSettingsResponse, error) + GetKubectlClusterSettings(ctx context.Context, in *GetKubectlClusterSettingsRequest, opts ...grpc.CallOption) (*GetKubectlClusterSettingsResponse, error) +} + +type kubectlClusterSettingsClient struct { + cc grpc.ClientConnInterface +} + +func NewKubectlClusterSettingsClient(cc grpc.ClientConnInterface) KubectlClusterSettingsClient { + return &kubectlClusterSettingsClient{cc} +} + +func (c *kubectlClusterSettingsClient) UpdateKubectlClusterSettings(ctx context.Context, in *UpdateKubectlClusterSettingsRequest, opts ...grpc.CallOption) (*UpdateKubectlClusterSettingsResponse, error) { + out := new(UpdateKubectlClusterSettingsResponse) + err := c.cc.Invoke(ctx, "/rafay.dev.sentry.rpc.KubectlClusterSettings/UpdateKubectlClusterSettings", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *kubectlClusterSettingsClient) GetKubectlClusterSettings(ctx context.Context, in *GetKubectlClusterSettingsRequest, opts ...grpc.CallOption) (*GetKubectlClusterSettingsResponse, error) { + out := new(GetKubectlClusterSettingsResponse) + err := c.cc.Invoke(ctx, "/rafay.dev.sentry.rpc.KubectlClusterSettings/GetKubectlClusterSettings", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// KubectlClusterSettingsServer is the server API for KubectlClusterSettings service. +// All implementations should embed UnimplementedKubectlClusterSettingsServer +// for forward compatibility +type KubectlClusterSettingsServer interface { + UpdateKubectlClusterSettings(context.Context, *UpdateKubectlClusterSettingsRequest) (*UpdateKubectlClusterSettingsResponse, error) + GetKubectlClusterSettings(context.Context, *GetKubectlClusterSettingsRequest) (*GetKubectlClusterSettingsResponse, error) +} + +// UnimplementedKubectlClusterSettingsServer should be embedded to have forward compatible implementations. +type UnimplementedKubectlClusterSettingsServer struct { +} + +func (UnimplementedKubectlClusterSettingsServer) UpdateKubectlClusterSettings(context.Context, *UpdateKubectlClusterSettingsRequest) (*UpdateKubectlClusterSettingsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateKubectlClusterSettings not implemented") +} +func (UnimplementedKubectlClusterSettingsServer) GetKubectlClusterSettings(context.Context, *GetKubectlClusterSettingsRequest) (*GetKubectlClusterSettingsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetKubectlClusterSettings not implemented") +} + +// UnsafeKubectlClusterSettingsServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to KubectlClusterSettingsServer will +// result in compilation errors. +type UnsafeKubectlClusterSettingsServer interface { + mustEmbedUnimplementedKubectlClusterSettingsServer() +} + +func RegisterKubectlClusterSettingsServer(s grpc.ServiceRegistrar, srv KubectlClusterSettingsServer) { + s.RegisterService(&KubectlClusterSettings_ServiceDesc, srv) +} + +func _KubectlClusterSettings_UpdateKubectlClusterSettings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateKubectlClusterSettingsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KubectlClusterSettingsServer).UpdateKubectlClusterSettings(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rafay.dev.sentry.rpc.KubectlClusterSettings/UpdateKubectlClusterSettings", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KubectlClusterSettingsServer).UpdateKubectlClusterSettings(ctx, req.(*UpdateKubectlClusterSettingsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _KubectlClusterSettings_GetKubectlClusterSettings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetKubectlClusterSettingsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KubectlClusterSettingsServer).GetKubectlClusterSettings(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/rafay.dev.sentry.rpc.KubectlClusterSettings/GetKubectlClusterSettings", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KubectlClusterSettingsServer).GetKubectlClusterSettings(ctx, req.(*GetKubectlClusterSettingsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// KubectlClusterSettings_ServiceDesc is the grpc.ServiceDesc for KubectlClusterSettings service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var KubectlClusterSettings_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "rafay.dev.sentry.rpc.KubectlClusterSettings", + HandlerType: (*KubectlClusterSettingsServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "UpdateKubectlClusterSettings", + Handler: _KubectlClusterSettings_UpdateKubectlClusterSettings_Handler, + }, + { + MethodName: "GetKubectlClusterSettings", + Handler: _KubectlClusterSettings_GetKubectlClusterSettings_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "proto/rpc/sentry/kubectl_cluster.proto", +} diff --git a/components/common/proto/rpc/sentry/relaypeer.pb.go b/components/common/proto/rpc/sentry/relaypeer.pb.go new file mode 100644 index 0000000..dad7f32 --- /dev/null +++ b/components/common/proto/rpc/sentry/relaypeer.pb.go @@ -0,0 +1,644 @@ +//protobuf for relay peering service + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc (unknown) +// source: proto/rpc/sentry/relaypeer.proto + +package sentry + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type PeerHelloRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Relayuuid string `protobuf:"bytes,1,opt,name=relayuuid,proto3" json:"relayuuid,omitempty"` // the uuid of the relay + Relayip string `protobuf:"bytes,2,opt,name=relayip,proto3" json:"relayip,omitempty"` // the ip address of the relay +} + +func (x *PeerHelloRequest) Reset() { + *x = PeerHelloRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_rpc_sentry_relaypeer_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PeerHelloRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PeerHelloRequest) ProtoMessage() {} + +func (x *PeerHelloRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_rpc_sentry_relaypeer_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PeerHelloRequest.ProtoReflect.Descriptor instead. +func (*PeerHelloRequest) Descriptor() ([]byte, []int) { + return file_proto_rpc_sentry_relaypeer_proto_rawDescGZIP(), []int{0} +} + +func (x *PeerHelloRequest) GetRelayuuid() string { + if x != nil { + return x.Relayuuid + } + return "" +} + +func (x *PeerHelloRequest) GetRelayip() string { + if x != nil { + return x.Relayip + } + return "" +} + +type PeerHelloResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Serviceuuid string `protobuf:"bytes,1,opt,name=serviceuuid,proto3" json:"serviceuuid,omitempty"` // the uuid of the service + Serviceip string `protobuf:"bytes,2,opt,name=serviceip,proto3" json:"serviceip,omitempty"` // the ip address of the relay +} + +func (x *PeerHelloResponse) Reset() { + *x = PeerHelloResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_rpc_sentry_relaypeer_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PeerHelloResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PeerHelloResponse) ProtoMessage() {} + +func (x *PeerHelloResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_rpc_sentry_relaypeer_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PeerHelloResponse.ProtoReflect.Descriptor instead. +func (*PeerHelloResponse) Descriptor() ([]byte, []int) { + return file_proto_rpc_sentry_relaypeer_proto_rawDescGZIP(), []int{1} +} + +func (x *PeerHelloResponse) GetServiceuuid() string { + if x != nil { + return x.Serviceuuid + } + return "" +} + +func (x *PeerHelloResponse) GetServiceip() string { + if x != nil { + return x.Serviceip + } + return "" +} + +// Probe Request from relay to peering service +type PeerProbeRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Relayuuid string `protobuf:"bytes,1,opt,name=relayuuid,proto3" json:"relayuuid,omitempty"` + Clustersni string `protobuf:"bytes,2,opt,name=clustersni,proto3" json:"clustersni,omitempty"` +} + +func (x *PeerProbeRequest) Reset() { + *x = PeerProbeRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_rpc_sentry_relaypeer_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PeerProbeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PeerProbeRequest) ProtoMessage() {} + +func (x *PeerProbeRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_rpc_sentry_relaypeer_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PeerProbeRequest.ProtoReflect.Descriptor instead. +func (*PeerProbeRequest) Descriptor() ([]byte, []int) { + return file_proto_rpc_sentry_relaypeer_proto_rawDescGZIP(), []int{2} +} + +func (x *PeerProbeRequest) GetRelayuuid() string { + if x != nil { + return x.Relayuuid + } + return "" +} + +func (x *PeerProbeRequest) GetClustersni() string { + if x != nil { + return x.Clustersni + } + return "" +} + +type RelayClusterConnectionInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Relayuuid string `protobuf:"bytes,1,opt,name=relayuuid,proto3" json:"relayuuid,omitempty"` // the uuid of the relay + Relayip string `protobuf:"bytes,2,opt,name=relayip,proto3" json:"relayip,omitempty"` // the ip address of the relay +} + +func (x *RelayClusterConnectionInfo) Reset() { + *x = RelayClusterConnectionInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_rpc_sentry_relaypeer_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RelayClusterConnectionInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RelayClusterConnectionInfo) ProtoMessage() {} + +func (x *RelayClusterConnectionInfo) ProtoReflect() protoreflect.Message { + mi := &file_proto_rpc_sentry_relaypeer_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RelayClusterConnectionInfo.ProtoReflect.Descriptor instead. +func (*RelayClusterConnectionInfo) Descriptor() ([]byte, []int) { + return file_proto_rpc_sentry_relaypeer_proto_rawDescGZIP(), []int{3} +} + +func (x *RelayClusterConnectionInfo) GetRelayuuid() string { + if x != nil { + return x.Relayuuid + } + return "" +} + +func (x *RelayClusterConnectionInfo) GetRelayip() string { + if x != nil { + return x.Relayip + } + return "" +} + +// Probe Response from service to relay +type PeerProbeResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Clustersni string `protobuf:"bytes,1,opt,name=clustersni,proto3" json:"clustersni,omitempty"` + Items []*RelayClusterConnectionInfo `protobuf:"bytes,2,rep,name=items,proto3" json:"items,omitempty"` +} + +func (x *PeerProbeResponse) Reset() { + *x = PeerProbeResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_rpc_sentry_relaypeer_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PeerProbeResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PeerProbeResponse) ProtoMessage() {} + +func (x *PeerProbeResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_rpc_sentry_relaypeer_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PeerProbeResponse.ProtoReflect.Descriptor instead. +func (*PeerProbeResponse) Descriptor() ([]byte, []int) { + return file_proto_rpc_sentry_relaypeer_proto_rawDescGZIP(), []int{4} +} + +func (x *PeerProbeResponse) GetClustersni() string { + if x != nil { + return x.Clustersni + } + return "" +} + +func (x *PeerProbeResponse) GetItems() []*RelayClusterConnectionInfo { + if x != nil { + return x.Items + } + return nil +} + +// Survey request sent from the service to all relays +type PeerSurveyRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Clustersni string `protobuf:"bytes,1,opt,name=clustersni,proto3" json:"clustersni,omitempty"` +} + +func (x *PeerSurveyRequest) Reset() { + *x = PeerSurveyRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_rpc_sentry_relaypeer_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PeerSurveyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PeerSurveyRequest) ProtoMessage() {} + +func (x *PeerSurveyRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_rpc_sentry_relaypeer_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PeerSurveyRequest.ProtoReflect.Descriptor instead. +func (*PeerSurveyRequest) Descriptor() ([]byte, []int) { + return file_proto_rpc_sentry_relaypeer_proto_rawDescGZIP(), []int{5} +} + +func (x *PeerSurveyRequest) GetClustersni() string { + if x != nil { + return x.Clustersni + } + return "" +} + +// Survey response from relay to service +type PeerSurveyResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Relayuuid string `protobuf:"bytes,1,opt,name=relayuuid,proto3" json:"relayuuid,omitempty"` // the uuid of the relay + Relayip string `protobuf:"bytes,2,opt,name=relayip,proto3" json:"relayip,omitempty"` // the ip address of the relay + Clustersni string `protobuf:"bytes,3,opt,name=clustersni,proto3" json:"clustersni,omitempty"` +} + +func (x *PeerSurveyResponse) Reset() { + *x = PeerSurveyResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_rpc_sentry_relaypeer_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PeerSurveyResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PeerSurveyResponse) ProtoMessage() {} + +func (x *PeerSurveyResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_rpc_sentry_relaypeer_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PeerSurveyResponse.ProtoReflect.Descriptor instead. +func (*PeerSurveyResponse) Descriptor() ([]byte, []int) { + return file_proto_rpc_sentry_relaypeer_proto_rawDescGZIP(), []int{6} +} + +func (x *PeerSurveyResponse) GetRelayuuid() string { + if x != nil { + return x.Relayuuid + } + return "" +} + +func (x *PeerSurveyResponse) GetRelayip() string { + if x != nil { + return x.Relayip + } + return "" +} + +func (x *PeerSurveyResponse) GetClustersni() string { + if x != nil { + return x.Clustersni + } + return "" +} + +var File_proto_rpc_sentry_relaypeer_proto protoreflect.FileDescriptor + +var file_proto_rpc_sentry_relaypeer_proto_rawDesc = []byte{ + 0x0a, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x73, 0x65, 0x6e, 0x74, + 0x72, 0x79, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x70, 0x65, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x14, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, 0x65, + 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x72, 0x70, 0x63, 0x22, 0x4a, 0x0a, 0x10, 0x50, 0x65, 0x65, 0x72, + 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, + 0x72, 0x65, 0x6c, 0x61, 0x79, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x75, 0x75, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, + 0x6c, 0x61, 0x79, 0x69, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x6c, + 0x61, 0x79, 0x69, 0x70, 0x22, 0x53, 0x0a, 0x11, 0x50, 0x65, 0x65, 0x72, 0x48, 0x65, 0x6c, 0x6c, + 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x75, 0x75, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x69, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x69, 0x70, 0x22, 0x50, 0x0a, 0x10, 0x50, 0x65, 0x65, + 0x72, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, + 0x09, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x75, 0x75, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x63, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x6e, 0x69, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x6e, 0x69, 0x22, 0x54, 0x0a, 0x1a, 0x72, + 0x65, 0x6c, 0x61, 0x79, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x6c, + 0x61, 0x79, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, + 0x6c, 0x61, 0x79, 0x75, 0x75, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x6c, 0x61, 0x79, + 0x69, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x69, + 0x70, 0x22, 0x7b, 0x0a, 0x11, 0x50, 0x65, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x73, 0x6e, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x73, 0x6e, 0x69, 0x12, 0x46, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, + 0x76, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x72, 0x65, 0x6c, + 0x61, 0x79, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x22, 0x33, + 0x0a, 0x11, 0x50, 0x65, 0x65, 0x72, 0x53, 0x75, 0x72, 0x76, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x6e, + 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x73, 0x6e, 0x69, 0x22, 0x6c, 0x0a, 0x12, 0x50, 0x65, 0x65, 0x72, 0x53, 0x75, 0x72, 0x76, 0x65, + 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x6c, + 0x61, 0x79, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, + 0x6c, 0x61, 0x79, 0x75, 0x75, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x6c, 0x61, 0x79, + 0x69, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x69, + 0x70, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x6e, 0x69, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x6e, + 0x69, 0x32, 0xd9, 0x02, 0x0a, 0x10, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x50, 0x65, 0x65, 0x72, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6a, 0x0a, 0x11, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x50, + 0x65, 0x65, 0x72, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x50, 0x43, 0x12, 0x26, 0x2e, 0x72, 0x61, + 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x72, + 0x70, 0x63, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, + 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x48, + 0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, + 0x30, 0x01, 0x12, 0x6a, 0x0a, 0x11, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x50, 0x65, 0x65, 0x72, 0x50, + 0x72, 0x6f, 0x62, 0x65, 0x52, 0x50, 0x43, 0x12, 0x26, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, + 0x64, 0x65, 0x76, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x50, + 0x65, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x27, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, 0x65, 0x6e, 0x74, + 0x72, 0x79, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x62, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, 0x6d, + 0x0a, 0x12, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x50, 0x65, 0x65, 0x72, 0x53, 0x75, 0x72, 0x76, 0x65, + 0x79, 0x52, 0x50, 0x43, 0x12, 0x28, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, + 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x65, 0x65, 0x72, + 0x53, 0x75, 0x72, 0x76, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x27, + 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, + 0x79, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x53, 0x75, 0x72, 0x76, 0x65, 0x79, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x42, 0xe6, 0x01, + 0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, + 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x72, 0x70, 0x63, 0x42, 0x0e, 0x52, 0x65, 0x6c, 0x61, + 0x79, 0x70, 0x65, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x61, 0x66, 0x61, 0x79, 0x53, 0x79, + 0x73, 0x74, 0x65, 0x6d, 0x73, 0x2f, 0x72, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x62, 0x61, 0x73, + 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x73, 0x65, + 0x6e, 0x74, 0x72, 0x79, 0xa2, 0x02, 0x04, 0x52, 0x44, 0x53, 0x52, 0xaa, 0x02, 0x14, 0x52, 0x61, + 0x66, 0x61, 0x79, 0x2e, 0x44, 0x65, 0x76, 0x2e, 0x53, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x52, + 0x70, 0x63, 0xca, 0x02, 0x14, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x53, + 0x65, 0x6e, 0x74, 0x72, 0x79, 0x5c, 0x52, 0x70, 0x63, 0xe2, 0x02, 0x20, 0x52, 0x61, 0x66, 0x61, + 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x53, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x5c, 0x52, 0x70, 0x63, + 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x17, 0x52, + 0x61, 0x66, 0x61, 0x79, 0x3a, 0x3a, 0x44, 0x65, 0x76, 0x3a, 0x3a, 0x53, 0x65, 0x6e, 0x74, 0x72, + 0x79, 0x3a, 0x3a, 0x52, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_proto_rpc_sentry_relaypeer_proto_rawDescOnce sync.Once + file_proto_rpc_sentry_relaypeer_proto_rawDescData = file_proto_rpc_sentry_relaypeer_proto_rawDesc +) + +func file_proto_rpc_sentry_relaypeer_proto_rawDescGZIP() []byte { + file_proto_rpc_sentry_relaypeer_proto_rawDescOnce.Do(func() { + file_proto_rpc_sentry_relaypeer_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_rpc_sentry_relaypeer_proto_rawDescData) + }) + return file_proto_rpc_sentry_relaypeer_proto_rawDescData +} + +var file_proto_rpc_sentry_relaypeer_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_proto_rpc_sentry_relaypeer_proto_goTypes = []interface{}{ + (*PeerHelloRequest)(nil), // 0: rafay.dev.sentry.rpc.PeerHelloRequest + (*PeerHelloResponse)(nil), // 1: rafay.dev.sentry.rpc.PeerHelloResponse + (*PeerProbeRequest)(nil), // 2: rafay.dev.sentry.rpc.PeerProbeRequest + (*RelayClusterConnectionInfo)(nil), // 3: rafay.dev.sentry.rpc.relayClusterConnectionInfo + (*PeerProbeResponse)(nil), // 4: rafay.dev.sentry.rpc.PeerProbeResponse + (*PeerSurveyRequest)(nil), // 5: rafay.dev.sentry.rpc.PeerSurveyRequest + (*PeerSurveyResponse)(nil), // 6: rafay.dev.sentry.rpc.PeerSurveyResponse +} +var file_proto_rpc_sentry_relaypeer_proto_depIdxs = []int32{ + 3, // 0: rafay.dev.sentry.rpc.PeerProbeResponse.items:type_name -> rafay.dev.sentry.rpc.relayClusterConnectionInfo + 0, // 1: rafay.dev.sentry.rpc.RelayPeerService.RelayPeerHelloRPC:input_type -> rafay.dev.sentry.rpc.PeerHelloRequest + 2, // 2: rafay.dev.sentry.rpc.RelayPeerService.RelayPeerProbeRPC:input_type -> rafay.dev.sentry.rpc.PeerProbeRequest + 6, // 3: rafay.dev.sentry.rpc.RelayPeerService.RelayPeerSurveyRPC:input_type -> rafay.dev.sentry.rpc.PeerSurveyResponse + 1, // 4: rafay.dev.sentry.rpc.RelayPeerService.RelayPeerHelloRPC:output_type -> rafay.dev.sentry.rpc.PeerHelloResponse + 4, // 5: rafay.dev.sentry.rpc.RelayPeerService.RelayPeerProbeRPC:output_type -> rafay.dev.sentry.rpc.PeerProbeResponse + 5, // 6: rafay.dev.sentry.rpc.RelayPeerService.RelayPeerSurveyRPC:output_type -> rafay.dev.sentry.rpc.PeerSurveyRequest + 4, // [4:7] is the sub-list for method output_type + 1, // [1:4] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_proto_rpc_sentry_relaypeer_proto_init() } +func file_proto_rpc_sentry_relaypeer_proto_init() { + if File_proto_rpc_sentry_relaypeer_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_proto_rpc_sentry_relaypeer_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PeerHelloRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_rpc_sentry_relaypeer_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PeerHelloResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_rpc_sentry_relaypeer_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PeerProbeRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_rpc_sentry_relaypeer_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RelayClusterConnectionInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_rpc_sentry_relaypeer_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PeerProbeResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_rpc_sentry_relaypeer_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PeerSurveyRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_rpc_sentry_relaypeer_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PeerSurveyResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_proto_rpc_sentry_relaypeer_proto_rawDesc, + NumEnums: 0, + NumMessages: 7, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_proto_rpc_sentry_relaypeer_proto_goTypes, + DependencyIndexes: file_proto_rpc_sentry_relaypeer_proto_depIdxs, + MessageInfos: file_proto_rpc_sentry_relaypeer_proto_msgTypes, + }.Build() + File_proto_rpc_sentry_relaypeer_proto = out.File + file_proto_rpc_sentry_relaypeer_proto_rawDesc = nil + file_proto_rpc_sentry_relaypeer_proto_goTypes = nil + file_proto_rpc_sentry_relaypeer_proto_depIdxs = nil +} diff --git a/components/common/proto/rpc/sentry/relaypeer.proto b/components/common/proto/rpc/sentry/relaypeer.proto new file mode 100644 index 0000000..eb2e4c4 --- /dev/null +++ b/components/common/proto/rpc/sentry/relaypeer.proto @@ -0,0 +1,49 @@ +//protobuf for relay peering service +syntax = "proto3"; +package rafay.dev.sentry.rpc; + +service RelayPeerService { + rpc RelayPeerHelloRPC(stream PeerHelloRequest) returns (stream PeerHelloResponse) {} + rpc RelayPeerProbeRPC(stream PeerProbeRequest) returns (stream PeerProbeResponse) {} + rpc RelayPeerSurveyRPC(stream PeerSurveyResponse) returns (stream PeerSurveyRequest) {} +} + +message PeerHelloRequest { + string relayuuid = 1; // the uuid of the relay + string relayip = 2; // the ip address of the relay +} + +message PeerHelloResponse { + string serviceuuid = 1; // the uuid of the service + string serviceip = 2; // the ip address of the relay +} + +// Probe Request from relay to peering service +message PeerProbeRequest { + string relayuuid = 1; + string clustersni = 2; +} + +message relayClusterConnectionInfo { + string relayuuid = 1; // the uuid of the relay + string relayip = 2; // the ip address of the relay +} + +// Probe Response from service to relay +message PeerProbeResponse { + string clustersni = 1; + repeated relayClusterConnectionInfo items = 2; +} + +// Survey request sent from the service to all relays +message PeerSurveyRequest { + string clustersni = 1; +} + +// Survey response from relay to service +message PeerSurveyResponse { + string relayuuid = 1; // the uuid of the relay + string relayip = 2; // the ip address of the relay + string clustersni = 3; + +} diff --git a/components/common/proto/rpc/sentry/relaypeer_grpc.pb.go b/components/common/proto/rpc/sentry/relaypeer_grpc.pb.go new file mode 100644 index 0000000..81e3469 --- /dev/null +++ b/components/common/proto/rpc/sentry/relaypeer_grpc.pb.go @@ -0,0 +1,271 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.2.0 +// - protoc (unknown) +// source: proto/rpc/sentry/relaypeer.proto + +package sentry + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// RelayPeerServiceClient is the client API for RelayPeerService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type RelayPeerServiceClient interface { + RelayPeerHelloRPC(ctx context.Context, opts ...grpc.CallOption) (RelayPeerService_RelayPeerHelloRPCClient, error) + RelayPeerProbeRPC(ctx context.Context, opts ...grpc.CallOption) (RelayPeerService_RelayPeerProbeRPCClient, error) + RelayPeerSurveyRPC(ctx context.Context, opts ...grpc.CallOption) (RelayPeerService_RelayPeerSurveyRPCClient, error) +} + +type relayPeerServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewRelayPeerServiceClient(cc grpc.ClientConnInterface) RelayPeerServiceClient { + return &relayPeerServiceClient{cc} +} + +func (c *relayPeerServiceClient) RelayPeerHelloRPC(ctx context.Context, opts ...grpc.CallOption) (RelayPeerService_RelayPeerHelloRPCClient, error) { + stream, err := c.cc.NewStream(ctx, &RelayPeerService_ServiceDesc.Streams[0], "/rafay.dev.sentry.rpc.RelayPeerService/RelayPeerHelloRPC", opts...) + if err != nil { + return nil, err + } + x := &relayPeerServiceRelayPeerHelloRPCClient{stream} + return x, nil +} + +type RelayPeerService_RelayPeerHelloRPCClient interface { + Send(*PeerHelloRequest) error + Recv() (*PeerHelloResponse, error) + grpc.ClientStream +} + +type relayPeerServiceRelayPeerHelloRPCClient struct { + grpc.ClientStream +} + +func (x *relayPeerServiceRelayPeerHelloRPCClient) Send(m *PeerHelloRequest) error { + return x.ClientStream.SendMsg(m) +} + +func (x *relayPeerServiceRelayPeerHelloRPCClient) Recv() (*PeerHelloResponse, error) { + m := new(PeerHelloResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *relayPeerServiceClient) RelayPeerProbeRPC(ctx context.Context, opts ...grpc.CallOption) (RelayPeerService_RelayPeerProbeRPCClient, error) { + stream, err := c.cc.NewStream(ctx, &RelayPeerService_ServiceDesc.Streams[1], "/rafay.dev.sentry.rpc.RelayPeerService/RelayPeerProbeRPC", opts...) + if err != nil { + return nil, err + } + x := &relayPeerServiceRelayPeerProbeRPCClient{stream} + return x, nil +} + +type RelayPeerService_RelayPeerProbeRPCClient interface { + Send(*PeerProbeRequest) error + Recv() (*PeerProbeResponse, error) + grpc.ClientStream +} + +type relayPeerServiceRelayPeerProbeRPCClient struct { + grpc.ClientStream +} + +func (x *relayPeerServiceRelayPeerProbeRPCClient) Send(m *PeerProbeRequest) error { + return x.ClientStream.SendMsg(m) +} + +func (x *relayPeerServiceRelayPeerProbeRPCClient) Recv() (*PeerProbeResponse, error) { + m := new(PeerProbeResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *relayPeerServiceClient) RelayPeerSurveyRPC(ctx context.Context, opts ...grpc.CallOption) (RelayPeerService_RelayPeerSurveyRPCClient, error) { + stream, err := c.cc.NewStream(ctx, &RelayPeerService_ServiceDesc.Streams[2], "/rafay.dev.sentry.rpc.RelayPeerService/RelayPeerSurveyRPC", opts...) + if err != nil { + return nil, err + } + x := &relayPeerServiceRelayPeerSurveyRPCClient{stream} + return x, nil +} + +type RelayPeerService_RelayPeerSurveyRPCClient interface { + Send(*PeerSurveyResponse) error + Recv() (*PeerSurveyRequest, error) + grpc.ClientStream +} + +type relayPeerServiceRelayPeerSurveyRPCClient struct { + grpc.ClientStream +} + +func (x *relayPeerServiceRelayPeerSurveyRPCClient) Send(m *PeerSurveyResponse) error { + return x.ClientStream.SendMsg(m) +} + +func (x *relayPeerServiceRelayPeerSurveyRPCClient) Recv() (*PeerSurveyRequest, error) { + m := new(PeerSurveyRequest) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +// RelayPeerServiceServer is the server API for RelayPeerService service. +// All implementations should embed UnimplementedRelayPeerServiceServer +// for forward compatibility +type RelayPeerServiceServer interface { + RelayPeerHelloRPC(RelayPeerService_RelayPeerHelloRPCServer) error + RelayPeerProbeRPC(RelayPeerService_RelayPeerProbeRPCServer) error + RelayPeerSurveyRPC(RelayPeerService_RelayPeerSurveyRPCServer) error +} + +// UnimplementedRelayPeerServiceServer should be embedded to have forward compatible implementations. +type UnimplementedRelayPeerServiceServer struct { +} + +func (UnimplementedRelayPeerServiceServer) RelayPeerHelloRPC(RelayPeerService_RelayPeerHelloRPCServer) error { + return status.Errorf(codes.Unimplemented, "method RelayPeerHelloRPC not implemented") +} +func (UnimplementedRelayPeerServiceServer) RelayPeerProbeRPC(RelayPeerService_RelayPeerProbeRPCServer) error { + return status.Errorf(codes.Unimplemented, "method RelayPeerProbeRPC not implemented") +} +func (UnimplementedRelayPeerServiceServer) RelayPeerSurveyRPC(RelayPeerService_RelayPeerSurveyRPCServer) error { + return status.Errorf(codes.Unimplemented, "method RelayPeerSurveyRPC not implemented") +} + +// UnsafeRelayPeerServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to RelayPeerServiceServer will +// result in compilation errors. +type UnsafeRelayPeerServiceServer interface { + mustEmbedUnimplementedRelayPeerServiceServer() +} + +func RegisterRelayPeerServiceServer(s grpc.ServiceRegistrar, srv RelayPeerServiceServer) { + s.RegisterService(&RelayPeerService_ServiceDesc, srv) +} + +func _RelayPeerService_RelayPeerHelloRPC_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(RelayPeerServiceServer).RelayPeerHelloRPC(&relayPeerServiceRelayPeerHelloRPCServer{stream}) +} + +type RelayPeerService_RelayPeerHelloRPCServer interface { + Send(*PeerHelloResponse) error + Recv() (*PeerHelloRequest, error) + grpc.ServerStream +} + +type relayPeerServiceRelayPeerHelloRPCServer struct { + grpc.ServerStream +} + +func (x *relayPeerServiceRelayPeerHelloRPCServer) Send(m *PeerHelloResponse) error { + return x.ServerStream.SendMsg(m) +} + +func (x *relayPeerServiceRelayPeerHelloRPCServer) Recv() (*PeerHelloRequest, error) { + m := new(PeerHelloRequest) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func _RelayPeerService_RelayPeerProbeRPC_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(RelayPeerServiceServer).RelayPeerProbeRPC(&relayPeerServiceRelayPeerProbeRPCServer{stream}) +} + +type RelayPeerService_RelayPeerProbeRPCServer interface { + Send(*PeerProbeResponse) error + Recv() (*PeerProbeRequest, error) + grpc.ServerStream +} + +type relayPeerServiceRelayPeerProbeRPCServer struct { + grpc.ServerStream +} + +func (x *relayPeerServiceRelayPeerProbeRPCServer) Send(m *PeerProbeResponse) error { + return x.ServerStream.SendMsg(m) +} + +func (x *relayPeerServiceRelayPeerProbeRPCServer) Recv() (*PeerProbeRequest, error) { + m := new(PeerProbeRequest) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func _RelayPeerService_RelayPeerSurveyRPC_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(RelayPeerServiceServer).RelayPeerSurveyRPC(&relayPeerServiceRelayPeerSurveyRPCServer{stream}) +} + +type RelayPeerService_RelayPeerSurveyRPCServer interface { + Send(*PeerSurveyRequest) error + Recv() (*PeerSurveyResponse, error) + grpc.ServerStream +} + +type relayPeerServiceRelayPeerSurveyRPCServer struct { + grpc.ServerStream +} + +func (x *relayPeerServiceRelayPeerSurveyRPCServer) Send(m *PeerSurveyRequest) error { + return x.ServerStream.SendMsg(m) +} + +func (x *relayPeerServiceRelayPeerSurveyRPCServer) Recv() (*PeerSurveyResponse, error) { + m := new(PeerSurveyResponse) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +// RelayPeerService_ServiceDesc is the grpc.ServiceDesc for RelayPeerService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var RelayPeerService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "rafay.dev.sentry.rpc.RelayPeerService", + HandlerType: (*RelayPeerServiceServer)(nil), + Methods: []grpc.MethodDesc{}, + Streams: []grpc.StreamDesc{ + { + StreamName: "RelayPeerHelloRPC", + Handler: _RelayPeerService_RelayPeerHelloRPC_Handler, + ServerStreams: true, + ClientStreams: true, + }, + { + StreamName: "RelayPeerProbeRPC", + Handler: _RelayPeerService_RelayPeerProbeRPC_Handler, + ServerStreams: true, + ClientStreams: true, + }, + { + StreamName: "RelayPeerSurveyRPC", + Handler: _RelayPeerService_RelayPeerSurveyRPC_Handler, + ServerStreams: true, + ClientStreams: true, + }, + }, + Metadata: "proto/rpc/sentry/relaypeer.proto", +} diff --git a/components/common/proto/types/commonpb/v3/common.pb.go b/components/common/proto/types/commonpb/v3/common.pb.go index 230cd68..efa53ee 100644 --- a/components/common/proto/types/commonpb/v3/common.pb.go +++ b/components/common/proto/types/commonpb/v3/common.pb.go @@ -151,26 +151,83 @@ func (RafayConditionStatus) EnumDescriptor() ([]byte, []int) { return file_proto_types_commonpb_v3_common_proto_rawDescGZIP(), []int{1} } +// RafayTypeMeta is the type meta for rafay resources +type RafayTypeMeta struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ApiVersion string `protobuf:"bytes,1,opt,name=apiVersion,proto3" json:"apiVersion,omitempty"` + Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"` +} + +func (x *RafayTypeMeta) Reset() { + *x = RafayTypeMeta{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_commonpb_v3_common_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RafayTypeMeta) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RafayTypeMeta) ProtoMessage() {} + +func (x *RafayTypeMeta) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_commonpb_v3_common_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RafayTypeMeta.ProtoReflect.Descriptor instead. +func (*RafayTypeMeta) Descriptor() ([]byte, []int) { + return file_proto_types_commonpb_v3_common_proto_rawDescGZIP(), []int{0} +} + +func (x *RafayTypeMeta) GetApiVersion() string { + if x != nil { + return x.ApiVersion + } + return "" +} + +func (x *RafayTypeMeta) GetKind() string { + if x != nil { + return x.Kind + } + return "" +} + type Metadata struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` - Labels map[string]string `protobuf:"bytes,3,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - Annotations map[string]string `protobuf:"bytes,4,rep,name=annotations,proto3" json:"annotations,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - Project string `protobuf:"bytes,5,opt,name=project,proto3" json:"project,omitempty"` - Organization string `protobuf:"bytes,6,opt,name=organization,proto3" json:"organization,omitempty"` - Partner string `protobuf:"bytes,7,opt,name=partner,proto3" json:"partner,omitempty"` - Id string `protobuf:"bytes,8,opt,name=id,proto3" json:"id,omitempty"` - ModifiedAt *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=modifiedAt,proto3" json:"modifiedAt,omitempty"` + DisplayName string `protobuf:"bytes,2,opt,name=displayName,proto3" json:"displayName,omitempty"` + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + Labels map[string]string `protobuf:"bytes,4,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Annotations map[string]string `protobuf:"bytes,5,rep,name=annotations,proto3" json:"annotations,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Project string `protobuf:"bytes,6,opt,name=project,proto3" json:"project,omitempty"` + Organization string `protobuf:"bytes,7,opt,name=organization,proto3" json:"organization,omitempty"` + Partner string `protobuf:"bytes,8,opt,name=partner,proto3" json:"partner,omitempty"` + Id string `protobuf:"bytes,9,opt,name=id,proto3" json:"id,omitempty"` + ModifiedAt *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=modifiedAt,proto3" json:"modifiedAt,omitempty"` } func (x *Metadata) Reset() { *x = Metadata{} if protoimpl.UnsafeEnabled { - mi := &file_proto_types_commonpb_v3_common_proto_msgTypes[0] + mi := &file_proto_types_commonpb_v3_common_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -183,7 +240,7 @@ func (x *Metadata) String() string { func (*Metadata) ProtoMessage() {} func (x *Metadata) ProtoReflect() protoreflect.Message { - mi := &file_proto_types_commonpb_v3_common_proto_msgTypes[0] + mi := &file_proto_types_commonpb_v3_common_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -196,7 +253,7 @@ func (x *Metadata) ProtoReflect() protoreflect.Message { // Deprecated: Use Metadata.ProtoReflect.Descriptor instead. func (*Metadata) Descriptor() ([]byte, []int) { - return file_proto_types_commonpb_v3_common_proto_rawDescGZIP(), []int{0} + return file_proto_types_commonpb_v3_common_proto_rawDescGZIP(), []int{1} } func (x *Metadata) GetName() string { @@ -206,6 +263,13 @@ func (x *Metadata) GetName() string { return "" } +func (x *Metadata) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + func (x *Metadata) GetDescription() string { if x != nil { return x.Description @@ -274,7 +338,7 @@ type ProjectMeta struct { func (x *ProjectMeta) Reset() { *x = ProjectMeta{} if protoimpl.UnsafeEnabled { - mi := &file_proto_types_commonpb_v3_common_proto_msgTypes[1] + mi := &file_proto_types_commonpb_v3_common_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -287,7 +351,7 @@ func (x *ProjectMeta) String() string { func (*ProjectMeta) ProtoMessage() {} func (x *ProjectMeta) ProtoReflect() protoreflect.Message { - mi := &file_proto_types_commonpb_v3_common_proto_msgTypes[1] + mi := &file_proto_types_commonpb_v3_common_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -300,7 +364,7 @@ func (x *ProjectMeta) ProtoReflect() protoreflect.Message { // Deprecated: Use ProjectMeta.ProtoReflect.Descriptor instead. func (*ProjectMeta) Descriptor() ([]byte, []int) { - return file_proto_types_commonpb_v3_common_proto_rawDescGZIP(), []int{1} + return file_proto_types_commonpb_v3_common_proto_rawDescGZIP(), []int{2} } func (x *ProjectMeta) GetName() string { @@ -329,7 +393,7 @@ type SharingSpec struct { func (x *SharingSpec) Reset() { *x = SharingSpec{} if protoimpl.UnsafeEnabled { - mi := &file_proto_types_commonpb_v3_common_proto_msgTypes[2] + mi := &file_proto_types_commonpb_v3_common_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -342,7 +406,7 @@ func (x *SharingSpec) String() string { func (*SharingSpec) ProtoMessage() {} func (x *SharingSpec) ProtoReflect() protoreflect.Message { - mi := &file_proto_types_commonpb_v3_common_proto_msgTypes[2] + mi := &file_proto_types_commonpb_v3_common_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -355,7 +419,7 @@ func (x *SharingSpec) ProtoReflect() protoreflect.Message { // Deprecated: Use SharingSpec.ProtoReflect.Descriptor instead. func (*SharingSpec) Descriptor() ([]byte, []int) { - return file_proto_types_commonpb_v3_common_proto_rawDescGZIP(), []int{2} + return file_proto_types_commonpb_v3_common_proto_rawDescGZIP(), []int{3} } func (x *SharingSpec) GetEnabled() bool { @@ -384,7 +448,7 @@ type DriftSpec struct { func (x *DriftSpec) Reset() { *x = DriftSpec{} if protoimpl.UnsafeEnabled { - mi := &file_proto_types_commonpb_v3_common_proto_msgTypes[3] + mi := &file_proto_types_commonpb_v3_common_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -397,7 +461,7 @@ func (x *DriftSpec) String() string { func (*DriftSpec) ProtoMessage() {} func (x *DriftSpec) ProtoReflect() protoreflect.Message { - mi := &file_proto_types_commonpb_v3_common_proto_msgTypes[3] + mi := &file_proto_types_commonpb_v3_common_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -410,7 +474,7 @@ func (x *DriftSpec) ProtoReflect() protoreflect.Message { // Deprecated: Use DriftSpec.ProtoReflect.Descriptor instead. func (*DriftSpec) Descriptor() ([]byte, []int) { - return file_proto_types_commonpb_v3_common_proto_rawDescGZIP(), []int{3} + return file_proto_types_commonpb_v3_common_proto_rawDescGZIP(), []int{4} } func (x *DriftSpec) GetEnabled() bool { @@ -443,7 +507,7 @@ type ListMetadata struct { func (x *ListMetadata) Reset() { *x = ListMetadata{} if protoimpl.UnsafeEnabled { - mi := &file_proto_types_commonpb_v3_common_proto_msgTypes[4] + mi := &file_proto_types_commonpb_v3_common_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -456,7 +520,7 @@ func (x *ListMetadata) String() string { func (*ListMetadata) ProtoMessage() {} func (x *ListMetadata) ProtoReflect() protoreflect.Message { - mi := &file_proto_types_commonpb_v3_common_proto_msgTypes[4] + mi := &file_proto_types_commonpb_v3_common_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -469,7 +533,7 @@ func (x *ListMetadata) ProtoReflect() protoreflect.Message { // Deprecated: Use ListMetadata.ProtoReflect.Descriptor instead. func (*ListMetadata) Descriptor() ([]byte, []int) { - return file_proto_types_commonpb_v3_common_proto_rawDescGZIP(), []int{4} + return file_proto_types_commonpb_v3_common_proto_rawDescGZIP(), []int{5} } func (x *ListMetadata) GetCount() int64 { @@ -505,7 +569,7 @@ type PlacementLabel struct { func (x *PlacementLabel) Reset() { *x = PlacementLabel{} if protoimpl.UnsafeEnabled { - mi := &file_proto_types_commonpb_v3_common_proto_msgTypes[5] + mi := &file_proto_types_commonpb_v3_common_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -518,7 +582,7 @@ func (x *PlacementLabel) String() string { func (*PlacementLabel) ProtoMessage() {} func (x *PlacementLabel) ProtoReflect() protoreflect.Message { - mi := &file_proto_types_commonpb_v3_common_proto_msgTypes[5] + mi := &file_proto_types_commonpb_v3_common_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -531,7 +595,7 @@ func (x *PlacementLabel) ProtoReflect() protoreflect.Message { // Deprecated: Use PlacementLabel.ProtoReflect.Descriptor instead. func (*PlacementLabel) Descriptor() ([]byte, []int) { - return file_proto_types_commonpb_v3_common_proto_rawDescGZIP(), []int{5} + return file_proto_types_commonpb_v3_common_proto_rawDescGZIP(), []int{6} } func (x *PlacementLabel) GetKey() string { @@ -560,7 +624,7 @@ type PlacementSpec struct { func (x *PlacementSpec) Reset() { *x = PlacementSpec{} if protoimpl.UnsafeEnabled { - mi := &file_proto_types_commonpb_v3_common_proto_msgTypes[6] + mi := &file_proto_types_commonpb_v3_common_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -573,7 +637,7 @@ func (x *PlacementSpec) String() string { func (*PlacementSpec) ProtoMessage() {} func (x *PlacementSpec) ProtoReflect() protoreflect.Message { - mi := &file_proto_types_commonpb_v3_common_proto_msgTypes[6] + mi := &file_proto_types_commonpb_v3_common_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -586,7 +650,7 @@ func (x *PlacementSpec) ProtoReflect() protoreflect.Message { // Deprecated: Use PlacementSpec.ProtoReflect.Descriptor instead. func (*PlacementSpec) Descriptor() ([]byte, []int) { - return file_proto_types_commonpb_v3_common_proto_rawDescGZIP(), []int{6} + return file_proto_types_commonpb_v3_common_proto_rawDescGZIP(), []int{7} } func (x *PlacementSpec) GetLabels() []*PlacementLabel { @@ -617,7 +681,7 @@ type Status struct { func (x *Status) Reset() { *x = Status{} if protoimpl.UnsafeEnabled { - mi := &file_proto_types_commonpb_v3_common_proto_msgTypes[7] + mi := &file_proto_types_commonpb_v3_common_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -630,7 +694,7 @@ func (x *Status) String() string { func (*Status) ProtoMessage() {} func (x *Status) ProtoReflect() protoreflect.Message { - mi := &file_proto_types_commonpb_v3_common_proto_msgTypes[7] + mi := &file_proto_types_commonpb_v3_common_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -643,7 +707,7 @@ func (x *Status) ProtoReflect() protoreflect.Message { // Deprecated: Use Status.ProtoReflect.Descriptor instead. func (*Status) Descriptor() ([]byte, []int) { - return file_proto_types_commonpb_v3_common_proto_rawDescGZIP(), []int{7} + return file_proto_types_commonpb_v3_common_proto_rawDescGZIP(), []int{8} } func (x *Status) GetConditionType() string { @@ -684,10 +748,10 @@ type QueryOptions struct { // projectID) Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // selector is used to filter the labels of a resource - Selector string `protobuf:"bytes,2,opt,name=selector,proto3" json:"selector,omitempty"` - PartnerID string `protobuf:"bytes,3,opt,name=partnerID,proto3" json:"partnerID,omitempty"` - OrganizationID string `protobuf:"bytes,4,opt,name=organizationID,proto3" json:"organizationID,omitempty"` - ProjectID string `protobuf:"bytes,5,opt,name=projectID,proto3" json:"projectID,omitempty"` + Selector string `protobuf:"bytes,2,opt,name=selector,proto3" json:"selector,omitempty"` + Partner string `protobuf:"bytes,3,opt,name=partner,proto3" json:"partner,omitempty"` + Organization string `protobuf:"bytes,4,opt,name=organization,proto3" json:"organization,omitempty"` + Project string `protobuf:"bytes,5,opt,name=project,proto3" json:"project,omitempty"` // displayName only used for update queries to set displayName (READONLY) DisplayName string `protobuf:"bytes,6,opt,name=displayName,proto3" json:"displayName,omitempty"` // labels only used for update queries to set labels (READONLY) @@ -715,12 +779,13 @@ type QueryOptions struct { PublishedVersion string `protobuf:"bytes,23,opt,name=publishedVersion,proto3" json:"publishedVersion,omitempty"` ClusterID string `protobuf:"bytes,24,opt,name=clusterID,proto3" json:"clusterID,omitempty"` ID string `protobuf:"bytes,25,opt,name=ID,proto3" json:"ID,omitempty"` + Account string `protobuf:"bytes,26,opt,name=account,proto3" json:"account,omitempty"` } func (x *QueryOptions) Reset() { *x = QueryOptions{} if protoimpl.UnsafeEnabled { - mi := &file_proto_types_commonpb_v3_common_proto_msgTypes[8] + mi := &file_proto_types_commonpb_v3_common_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -733,7 +798,7 @@ func (x *QueryOptions) String() string { func (*QueryOptions) ProtoMessage() {} func (x *QueryOptions) ProtoReflect() protoreflect.Message { - mi := &file_proto_types_commonpb_v3_common_proto_msgTypes[8] + mi := &file_proto_types_commonpb_v3_common_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -746,7 +811,7 @@ func (x *QueryOptions) ProtoReflect() protoreflect.Message { // Deprecated: Use QueryOptions.ProtoReflect.Descriptor instead. func (*QueryOptions) Descriptor() ([]byte, []int) { - return file_proto_types_commonpb_v3_common_proto_rawDescGZIP(), []int{8} + return file_proto_types_commonpb_v3_common_proto_rawDescGZIP(), []int{9} } func (x *QueryOptions) GetName() string { @@ -763,23 +828,23 @@ func (x *QueryOptions) GetSelector() string { return "" } -func (x *QueryOptions) GetPartnerID() string { +func (x *QueryOptions) GetPartner() string { if x != nil { - return x.PartnerID + return x.Partner } return "" } -func (x *QueryOptions) GetOrganizationID() string { +func (x *QueryOptions) GetOrganization() string { if x != nil { - return x.OrganizationID + return x.Organization } return "" } -func (x *QueryOptions) GetProjectID() string { +func (x *QueryOptions) GetProject() string { if x != nil { - return x.ProjectID + return x.Project } return "" } @@ -924,6 +989,13 @@ func (x *QueryOptions) GetID() string { return "" } +func (x *QueryOptions) GetAccount() string { + if x != nil { + return x.Account + } + return "" +} + // HttpBody represents arbitrary HTTP Body. It should only be used for // payload formats that can't be represented as JSON type HttpBody struct { @@ -940,7 +1012,7 @@ type HttpBody struct { func (x *HttpBody) Reset() { *x = HttpBody{} if protoimpl.UnsafeEnabled { - mi := &file_proto_types_commonpb_v3_common_proto_msgTypes[9] + mi := &file_proto_types_commonpb_v3_common_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -953,7 +1025,7 @@ func (x *HttpBody) String() string { func (*HttpBody) ProtoMessage() {} func (x *HttpBody) ProtoReflect() protoreflect.Message { - mi := &file_proto_types_commonpb_v3_common_proto_msgTypes[9] + mi := &file_proto_types_commonpb_v3_common_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -966,7 +1038,7 @@ func (x *HttpBody) ProtoReflect() protoreflect.Message { // Deprecated: Use HttpBody.ProtoReflect.Descriptor instead. func (*HttpBody) Descriptor() ([]byte, []int) { - return file_proto_types_commonpb_v3_common_proto_rawDescGZIP(), []int{9} + return file_proto_types_commonpb_v3_common_proto_rawDescGZIP(), []int{10} } func (x *HttpBody) GetContentType() string { @@ -997,295 +1069,305 @@ var file_proto_types_commonpb_v3_common_proto_rawDesc = []byte{ 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0xbb, 0x07, 0x0a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x12, 0x33, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1f, - 0x92, 0x41, 0x1c, 0x2a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x32, 0x14, 0x6e, 0x61, 0x6d, 0x65, 0x20, - 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x4f, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2d, 0x92, 0x41, 0x2a, 0x2a, - 0x0b, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0x1b, 0x64, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, - 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x6c, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, - 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, - 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, - 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4c, 0x61, 0x62, 0x65, - 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x23, 0x92, 0x41, 0x20, 0x2a, 0x06, 0x4c, 0x61, - 0x62, 0x6c, 0x65, 0x73, 0x32, 0x16, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x20, 0x6f, 0x66, 0x20, - 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x06, 0x6c, 0x61, - 0x62, 0x65, 0x6c, 0x73, 0x12, 0x85, 0x01, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x72, 0x61, 0x66, - 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, - 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, - 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x42, 0x2d, 0x92, 0x41, 0x2a, 0x2a, 0x0b, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x32, 0x1b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, - 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, - 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3f, 0x0a, 0x07, - 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x25, 0x92, - 0x41, 0x22, 0x2a, 0x07, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x32, 0x17, 0x50, 0x72, 0x6f, - 0x6a, 0x65, 0x63, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x61, 0x0a, - 0x0c, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x3d, 0x92, 0x41, 0x3a, 0x2a, 0x0c, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, - 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0x2a, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x6f, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x74, 0x68, - 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x62, 0x65, 0x6c, 0x6f, 0x6e, - 0x67, 0x73, 0x52, 0x0c, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x4d, 0x0a, 0x07, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x33, 0x92, 0x41, 0x30, 0x2a, 0x07, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x32, - 0x25, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x20, 0x74, 0x6f, 0x20, 0x77, 0x68, 0x69, 0x63, - 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x62, - 0x65, 0x6c, 0x6f, 0x6e, 0x67, 0x73, 0x52, 0x07, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x12, - 0x14, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, - 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x40, 0x0a, 0x0a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, - 0x64, 0x41, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x03, 0x52, 0x0a, 0x6d, 0x6f, 0x64, - 0x69, 0x66, 0x69, 0x65, 0x64, 0x41, 0x74, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, - 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, - 0x38, 0x01, 0x1a, 0x3e, 0x0a, 0x10, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, - 0x38, 0x01, 0x3a, 0x6d, 0x92, 0x41, 0x6a, 0x0a, 0x35, 0x2a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x32, 0x18, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x20, 0x6f, 0x66, - 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0xd2, 0x01, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0xd2, 0x01, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x32, 0x31, - 0x7b, 0x22, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x6f, 0x6d, 0x65, 0x2d, 0x6e, - 0x61, 0x6d, 0x65, 0x22, 0x2c, 0x22, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x3a, 0x20, - 0x22, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x22, - 0x7d, 0x22, 0xa7, 0x01, 0x0a, 0x0b, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x74, - 0x61, 0x12, 0x32, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x1e, 0x92, 0x41, 0x1b, 0x2a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x32, 0x13, 0x6e, 0x61, 0x6d, 0x65, - 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x03, 0x52, 0x02, 0x69, 0x64, 0x3a, 0x4e, 0x92, 0x41, 0x4b, - 0x0a, 0x2d, 0x2a, 0x0b, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x32, - 0x17, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, - 0x20, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0xd2, 0x01, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x32, - 0x1a, 0x7b, 0x22, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x64, 0x65, 0x66, 0x61, 0x75, - 0x6c, 0x74, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x7d, 0x22, 0xe7, 0x02, 0x0a, 0x0b, - 0x53, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x53, 0x70, 0x65, 0x63, 0x12, 0x5a, 0x0a, 0x07, 0x65, - 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, 0x40, 0x92, 0x41, - 0x3d, 0x2a, 0x07, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x32, 0x32, 0x66, 0x6c, 0x61, 0x67, - 0x20, 0x74, 0x6f, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x79, 0x20, 0x69, 0x66, 0x20, 0x73, - 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x69, 0x73, 0x20, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, - 0x64, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x07, - 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x7e, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x6a, 0x65, - 0x63, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x72, 0x61, 0x66, 0x61, - 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, - 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x74, - 0x61, 0x42, 0x3a, 0x92, 0x41, 0x37, 0x2a, 0x08, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, - 0x32, 0x2b, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, - 0x74, 0x73, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x20, 0x69, 0x73, 0x20, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x52, 0x08, 0x70, - 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x3a, 0x7c, 0x92, 0x41, 0x79, 0x0a, 0x3d, 0x2a, 0x0b, - 0x53, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x53, 0x70, 0x65, 0x63, 0x32, 0x24, 0x73, 0x68, 0x61, - 0x72, 0x69, 0x6e, 0x67, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x61, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0xd2, 0x01, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x32, 0x38, 0x7b, 0x22, 0x65, - 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x22, 0x3a, 0x20, 0x74, 0x72, 0x75, 0x65, 0x2c, 0x22, 0x70, - 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x22, 0x3a, 0x20, 0x5b, 0x7b, 0x22, 0x6e, 0x61, 0x6d, - 0x65, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x6f, 0x6d, 0x65, 0x2d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, - 0x74, 0x22, 0x7d, 0x5d, 0x7d, 0x22, 0xd0, 0x02, 0x0a, 0x09, 0x44, 0x72, 0x69, 0x66, 0x74, 0x53, - 0x70, 0x65, 0x63, 0x12, 0x67, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x08, 0x42, 0x4d, 0x92, 0x41, 0x4a, 0x2a, 0x07, 0x45, 0x6e, 0x61, 0x62, 0x6c, - 0x65, 0x64, 0x32, 0x3f, 0x66, 0x6c, 0x61, 0x67, 0x20, 0x74, 0x6f, 0x20, 0x73, 0x70, 0x65, 0x63, - 0x69, 0x66, 0x79, 0x20, 0x69, 0x66, 0x20, 0x64, 0x72, 0x69, 0x66, 0x74, 0x20, 0x72, 0x65, 0x63, - 0x6f, 0x6e, 0x63, 0x69, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x73, 0x20, 0x65, - 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x67, 0x0a, 0x06, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x4f, 0x92, 0x41, - 0x4c, 0x2a, 0x06, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0x32, 0x66, 0x6c, 0x61, 0x67, 0x20, - 0x74, 0x6f, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x79, 0x20, 0x69, 0x66, 0x20, 0x73, 0x68, - 0x61, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x69, 0x73, 0x20, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, - 0x20, 0x66, 0x6f, 0x72, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0xf2, 0x02, 0x06, - 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0xf2, 0x02, 0x04, 0x44, 0x65, 0x6e, 0x79, 0x52, 0x06, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x71, 0x92, 0x41, 0x6e, 0x0a, 0x48, 0x2a, 0x09, 0x44, 0x72, - 0x69, 0x66, 0x74, 0x53, 0x70, 0x65, 0x63, 0x32, 0x31, 0x64, 0x72, 0x69, 0x66, 0x74, 0x20, 0x72, - 0x65, 0x63, 0x6f, 0x6e, 0x63, 0x69, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x73, 0x70, - 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x66, 0x6f, 0x72, 0x20, - 0x61, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0xd2, 0x01, 0x07, 0x65, 0x6e, 0x61, - 0x62, 0x6c, 0x65, 0x64, 0x32, 0x22, 0x7b, 0x22, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x22, - 0x3a, 0x20, 0x74, 0x72, 0x75, 0x65, 0x2c, 0x22, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, - 0x20, 0x22, 0x44, 0x65, 0x6e, 0x79, 0x22, 0x7d, 0x22, 0x52, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x12, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x16, - 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x12, 0x52, 0x06, - 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x12, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x22, 0xfa, 0x01, 0x0a, - 0x0e, 0x50, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x12, - 0x36, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x24, 0x92, 0x41, - 0x21, 0x2a, 0x03, 0x4b, 0x65, 0x79, 0x32, 0x1a, 0x4b, 0x65, 0x79, 0x20, 0x6f, 0x66, 0x20, 0x74, - 0x68, 0x65, 0x20, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x6c, 0x61, 0x62, - 0x65, 0x6c, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x3e, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x28, 0x92, 0x41, 0x25, 0x2a, 0x05, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x32, 0x1c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, - 0x20, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x6c, 0x61, 0x62, 0x65, 0x6c, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x70, 0x92, 0x41, 0x6d, 0x0a, 0x40, 0x2a, 0x0e, - 0x50, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x32, 0x20, - 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x70, 0x6c, 0x61, 0x63, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0xd2, 0x01, 0x03, 0x6b, 0x65, 0x79, 0xd2, 0x01, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x32, 0x29, - 0x7b, 0x22, 0x6b, 0x65, 0x79, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x6f, 0x6d, 0x65, 0x2d, 0x6b, 0x65, - 0x79, 0x22, 0x2c, 0x22, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x6f, 0x6d, - 0x65, 0x2d, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x7d, 0x22, 0xbe, 0x02, 0x0a, 0x0d, 0x50, 0x6c, - 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x70, 0x65, 0x63, 0x12, 0x6c, 0x0a, 0x06, 0x6c, - 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x72, 0x61, - 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x42, 0x29, 0x92, 0x41, 0x26, 0x2a, 0x06, 0x4c, 0x61, 0x62, - 0x65, 0x6c, 0x73, 0x32, 0x1c, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x6c, 0x61, 0x62, - 0x65, 0x6c, 0x73, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x4a, 0x0a, 0x08, 0x73, 0x65, 0x6c, - 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2e, 0x92, 0x41, 0x2b, - 0x2a, 0x08, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x32, 0x1f, 0x4b, 0x75, 0x62, 0x65, - 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x20, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x20, 0x6c, 0x61, 0x62, - 0x65, 0x6c, 0x20, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x08, 0x73, 0x65, 0x6c, - 0x65, 0x63, 0x74, 0x6f, 0x72, 0x3a, 0x73, 0x92, 0x41, 0x70, 0x0a, 0x37, 0x2a, 0x0d, 0x50, 0x6c, - 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x70, 0x65, 0x63, 0x32, 0x26, 0x70, 0x6c, 0x61, - 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x61, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x32, 0x35, 0x7b, 0x22, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x22, 0x3a, 0x20, - 0x5b, 0x7b, 0x22, 0x6b, 0x65, 0x79, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x6f, 0x6d, 0x65, 0x2d, 0x6b, - 0x65, 0x79, 0x22, 0x7d, 0x2c, 0x7b, 0x22, 0x6b, 0x65, 0x79, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x6f, - 0x6d, 0x65, 0x2d, 0x6b, 0x65, 0x79, 0x22, 0x7d, 0x5d, 0x7d, 0x22, 0x98, 0x04, 0x0a, 0x06, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x59, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x33, 0x92, 0x41, - 0x30, 0x2a, 0x0e, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x54, 0x79, 0x70, - 0x65, 0x32, 0x1c, 0x74, 0x79, 0x70, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x20, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x40, - 0x01, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, - 0x12, 0xc1, 0x01, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x72, 0x61, 0x66, - 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, - 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x6b, 0x92, 0x41, 0x68, 0x2a, 0x10, 0x43, 0x6f, 0x6e, - 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x32, 0x17, 0x73, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6f, 0x6e, - 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x40, 0x01, 0xf2, 0x02, 0x0c, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x4e, 0x6f, 0x74, 0x53, 0x65, 0x74, 0xf2, 0x02, 0x0f, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x64, 0xf2, 0x02, 0x08, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x4f, 0x4b, 0xf2, 0x02, 0x0c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x46, 0x61, 0x69, - 0x6c, 0x65, 0x64, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x12, 0x7c, 0x0a, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x3e, 0x92, 0x41, 0x3b, 0x2a, 0x0c, 0x4c, 0x61, 0x73, 0x74, - 0x20, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x32, 0x29, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x74, - 0x68, 0x65, 0x20, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x20, 0x69, 0x73, 0x20, 0x6c, 0x61, 0x73, 0x74, 0x20, 0x75, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x64, 0x40, 0x01, 0x52, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x64, 0x12, 0x4a, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x32, 0x92, 0x41, 0x2f, 0x2a, 0x06, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x32, - 0x23, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, - 0x61, 0x73, 0x74, 0x20, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x40, 0x01, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x3a, 0x25, - 0x92, 0x41, 0x22, 0x0a, 0x20, 0x2a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x32, 0x14, 0x73, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x40, 0x01, 0x22, 0xd0, 0x07, 0x0a, 0x0c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, - 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, - 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, - 0x72, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x72, 0x74, 0x6e, - 0x65, 0x72, 0x49, 0x44, 0x12, 0x26, 0x0a, 0x0e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x72, - 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x1c, 0x0a, 0x09, - 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x44, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x44, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x69, - 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x4b, 0x0a, 0x06, - 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x72, - 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, - 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x5a, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x38, + 0x6f, 0x74, 0x6f, 0x22, 0x43, 0x0a, 0x0d, 0x52, 0x61, 0x66, 0x61, 0x79, 0x54, 0x79, 0x70, 0x65, + 0x4d, 0x65, 0x74, 0x61, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x22, 0x8e, 0x08, 0x0a, 0x08, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x33, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x1f, 0x92, 0x41, 0x1c, 0x2a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x32, 0x14, + 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x51, 0x0a, 0x0b, 0x64, 0x69, + 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x2f, 0x92, 0x41, 0x2c, 0x2a, 0x0c, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x20, 0x4e, 0x61, + 0x6d, 0x65, 0x32, 0x1c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, + 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x4f, 0x0a, + 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x2d, 0x92, 0x41, 0x2a, 0x2a, 0x0b, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x32, 0x1b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x6c, + 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, - 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x09, - 0x20, 0x01, 0x28, 0x12, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6f, - 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x12, 0x52, 0x06, 0x6f, 0x66, 0x66, - 0x73, 0x65, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x0b, 0x20, 0x01, - 0x28, 0x12, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x2e, 0x0a, 0x12, 0x69, 0x67, 0x6e, - 0x6f, 0x72, 0x65, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, - 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x53, 0x63, 0x6f, - 0x70, 0x65, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x67, 0x6c, 0x6f, - 0x62, 0x61, 0x6c, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, - 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6f, - 0x72, 0x64, 0x65, 0x72, 0x42, 0x79, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x72, - 0x64, 0x65, 0x72, 0x42, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x0f, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x64, - 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x18, 0x10, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x64, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, - 0x64, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, - 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x72, 0x6c, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x12, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x72, 0x6c, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x1c, 0x0a, - 0x09, 0x69, 0x73, 0x53, 0x53, 0x4f, 0x55, 0x73, 0x65, 0x72, 0x18, 0x13, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x09, 0x69, 0x73, 0x53, 0x53, 0x4f, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x75, - 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, - 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, - 0x73, 0x18, 0x15, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x12, - 0x22, 0x0a, 0x0c, 0x62, 0x6c, 0x75, 0x65, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x66, 0x18, - 0x16, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x62, 0x6c, 0x75, 0x65, 0x70, 0x72, 0x69, 0x6e, 0x74, - 0x52, 0x65, 0x66, 0x12, 0x2a, 0x0a, 0x10, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x64, - 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x17, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x70, - 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x64, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, - 0x1c, 0x0a, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x44, 0x18, 0x18, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x44, 0x12, 0x0e, 0x0a, - 0x02, 0x49, 0x44, 0x18, 0x19, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x49, 0x44, 0x1a, 0x39, 0x0a, - 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, - 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3e, 0x0a, 0x10, 0x41, 0x6e, 0x6e, 0x6f, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, - 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x41, 0x0a, 0x08, 0x48, 0x74, 0x74, 0x70, - 0x42, 0x6f, 0x64, 0x79, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, - 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x2a, 0x58, 0x0a, 0x0f, 0x43, - 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x10, - 0x0a, 0x0c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x4e, 0x6f, 0x74, 0x53, 0x65, 0x74, 0x10, 0x00, - 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, - 0x74, 0x65, 0x64, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x4f, - 0x4b, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x46, 0x61, 0x69, - 0x6c, 0x65, 0x64, 0x10, 0x03, 0x2a, 0xa7, 0x01, 0x0a, 0x14, 0x52, 0x61, 0x66, 0x61, 0x79, 0x43, - 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0a, - 0x0a, 0x06, 0x4e, 0x6f, 0x74, 0x53, 0x65, 0x74, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x65, - 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x49, 0x6e, 0x50, 0x72, 0x6f, - 0x67, 0x72, 0x65, 0x73, 0x73, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x75, 0x63, 0x63, 0x65, - 0x73, 0x73, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x10, 0x04, - 0x12, 0x09, 0x0a, 0x05, 0x52, 0x65, 0x74, 0x72, 0x79, 0x10, 0x05, 0x12, 0x0b, 0x0a, 0x07, 0x53, - 0x6b, 0x69, 0x70, 0x70, 0x65, 0x64, 0x10, 0x06, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x74, 0x6f, 0x70, - 0x70, 0x65, 0x64, 0x10, 0x07, 0x12, 0x0b, 0x0a, 0x07, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, - 0x10, 0x08, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x74, 0x6f, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x10, 0x09, - 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x64, 0x10, 0x0a, 0x42, - 0x8d, 0x02, 0x0a, 0x1d, 0x63, 0x6f, 0x6d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, - 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, - 0x33, 0x42, 0x0b, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0x5a, 0x56, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x61, 0x66, - 0x61, 0x79, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x2f, 0x72, 0x63, 0x6c, 0x6f, 0x75, 0x64, - 0x2d, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, - 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, - 0x70, 0x65, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x70, 0x62, 0x2f, 0x76, 0x33, 0x3b, - 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x76, 0x33, 0xa2, 0x02, 0x04, 0x52, 0x44, 0x54, 0x43, 0xaa, - 0x02, 0x19, 0x52, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x44, 0x65, 0x76, 0x2e, 0x54, 0x79, 0x70, 0x65, - 0x73, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x56, 0x33, 0xca, 0x02, 0x19, 0x52, 0x61, - 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x5c, 0x43, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x5c, 0x56, 0x33, 0xe2, 0x02, 0x25, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, - 0x44, 0x65, 0x76, 0x5c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x5c, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, - 0x5c, 0x56, 0x33, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, - 0x02, 0x1d, 0x52, 0x61, 0x66, 0x61, 0x79, 0x3a, 0x3a, 0x44, 0x65, 0x76, 0x3a, 0x3a, 0x54, 0x79, - 0x70, 0x65, 0x73, 0x3a, 0x3a, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x3a, 0x3a, 0x56, 0x33, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, + 0x23, 0x92, 0x41, 0x20, 0x2a, 0x06, 0x4c, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x32, 0x16, 0x6c, 0x61, + 0x62, 0x65, 0x6c, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x85, 0x01, 0x0a, + 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x2d, 0x92, 0x41, 0x2a, 0x2a, 0x0b, 0x41, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x32, 0x1b, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3f, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x25, 0x92, 0x41, 0x22, 0x2a, 0x07, 0x50, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x32, 0x17, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x6f, 0x66, 0x20, + 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x07, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x61, 0x0a, 0x0c, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x3d, 0x92, 0x41, 0x3a, + 0x2a, 0x0c, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0x2a, + 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x6f, 0x20, + 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x20, 0x62, 0x65, 0x6c, 0x6f, 0x6e, 0x67, 0x73, 0x52, 0x0c, 0x6f, 0x72, 0x67, 0x61, + 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4d, 0x0a, 0x07, 0x70, 0x61, 0x72, 0x74, + 0x6e, 0x65, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x33, 0x92, 0x41, 0x30, 0x2a, 0x07, + 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x32, 0x25, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, + 0x20, 0x74, 0x6f, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x62, 0x65, 0x6c, 0x6f, 0x6e, 0x67, 0x73, 0x52, 0x07, + 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x09, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x40, 0x0a, + 0x0a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x41, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x04, 0xe2, + 0x41, 0x01, 0x03, 0x52, 0x0a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x41, 0x74, 0x1a, + 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, + 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, + 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3e, 0x0a, 0x10, 0x41, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, + 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, + 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x6d, 0x92, 0x41, 0x6a, 0x0a, + 0x35, 0x2a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x32, 0x18, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0xd2, 0x01, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0xd2, 0x01, 0x07, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x32, 0x31, 0x7b, 0x22, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x3a, + 0x20, 0x22, 0x73, 0x6f, 0x6d, 0x65, 0x2d, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x2c, 0x22, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x3a, 0x20, 0x22, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x7d, 0x22, 0xa7, 0x01, 0x0a, 0x0b, 0x50, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x32, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1e, 0x92, 0x41, 0x1b, 0x2a, 0x04, 0x4e, 0x61, + 0x6d, 0x65, 0x32, 0x13, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x03, 0x52, + 0x02, 0x69, 0x64, 0x3a, 0x4e, 0x92, 0x41, 0x4b, 0x0a, 0x2d, 0x2a, 0x0b, 0x50, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x32, 0x17, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0xd2, 0x01, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x32, 0x1a, 0x7b, 0x22, 0x6e, 0x61, 0x6d, 0x65, 0x22, + 0x3a, 0x20, 0x22, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x22, 0x7d, 0x22, 0xe7, 0x02, 0x0a, 0x0b, 0x53, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x53, + 0x70, 0x65, 0x63, 0x12, 0x5a, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x08, 0x42, 0x40, 0x92, 0x41, 0x3d, 0x2a, 0x07, 0x45, 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x64, 0x32, 0x32, 0x66, 0x6c, 0x61, 0x67, 0x20, 0x74, 0x6f, 0x20, 0x73, 0x70, 0x65, 0x63, + 0x69, 0x66, 0x79, 0x20, 0x69, 0x66, 0x20, 0x73, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x69, + 0x73, 0x20, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, + 0x7e, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x26, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x42, 0x3a, 0x92, 0x41, 0x37, 0x2a, 0x08, + 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x32, 0x2b, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x6f, + 0x66, 0x20, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x69, 0x73, 0x20, 0x73, 0x68, 0x61, 0x72, + 0x65, 0x64, 0x20, 0x74, 0x6f, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x3a, + 0x7c, 0x92, 0x41, 0x79, 0x0a, 0x3d, 0x2a, 0x0b, 0x53, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x53, + 0x70, 0x65, 0x63, 0x32, 0x24, 0x73, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x73, 0x70, 0x65, + 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x61, + 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0xd2, 0x01, 0x07, 0x65, 0x6e, 0x61, 0x62, + 0x6c, 0x65, 0x64, 0x32, 0x38, 0x7b, 0x22, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x22, 0x3a, + 0x20, 0x74, 0x72, 0x75, 0x65, 0x2c, 0x22, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x22, + 0x3a, 0x20, 0x5b, 0x7b, 0x22, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x6f, 0x6d, + 0x65, 0x2d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x7d, 0x5d, 0x7d, 0x22, 0xd0, 0x02, + 0x0a, 0x09, 0x44, 0x72, 0x69, 0x66, 0x74, 0x53, 0x70, 0x65, 0x63, 0x12, 0x67, 0x0a, 0x07, 0x65, + 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, 0x4d, 0x92, 0x41, + 0x4a, 0x2a, 0x07, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x32, 0x3f, 0x66, 0x6c, 0x61, 0x67, + 0x20, 0x74, 0x6f, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x79, 0x20, 0x69, 0x66, 0x20, 0x64, + 0x72, 0x69, 0x66, 0x74, 0x20, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x63, 0x69, 0x6c, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x73, 0x20, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x20, 0x66, + 0x6f, 0x72, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x07, 0x65, 0x6e, 0x61, + 0x62, 0x6c, 0x65, 0x64, 0x12, 0x67, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x4f, 0x92, 0x41, 0x4c, 0x2a, 0x06, 0x41, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x32, 0x32, 0x66, 0x6c, 0x61, 0x67, 0x20, 0x74, 0x6f, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, + 0x66, 0x79, 0x20, 0x69, 0x66, 0x20, 0x73, 0x68, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x69, 0x73, + 0x20, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0xf2, 0x02, 0x06, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0xf2, 0x02, + 0x04, 0x44, 0x65, 0x6e, 0x79, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x71, 0x92, + 0x41, 0x6e, 0x0a, 0x48, 0x2a, 0x09, 0x44, 0x72, 0x69, 0x66, 0x74, 0x53, 0x70, 0x65, 0x63, 0x32, + 0x31, 0x64, 0x72, 0x69, 0x66, 0x74, 0x20, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x63, 0x69, 0x6c, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x61, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0xd2, 0x01, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x32, 0x22, 0x7b, 0x22, + 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x22, 0x3a, 0x20, 0x74, 0x72, 0x75, 0x65, 0x2c, 0x22, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x20, 0x22, 0x44, 0x65, 0x6e, 0x79, 0x22, 0x7d, + 0x22, 0x52, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x12, 0x52, + 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x12, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x14, + 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x12, 0x52, 0x05, 0x6c, + 0x69, 0x6d, 0x69, 0x74, 0x22, 0xfa, 0x01, 0x0a, 0x0e, 0x50, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x36, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x24, 0x92, 0x41, 0x21, 0x2a, 0x03, 0x4b, 0x65, 0x79, 0x32, 0x1a, + 0x4b, 0x65, 0x79, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x6c, 0x61, 0x63, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, + 0x3e, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x28, + 0x92, 0x41, 0x25, 0x2a, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x32, 0x1c, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x20, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, + 0x70, 0x92, 0x41, 0x6d, 0x0a, 0x40, 0x2a, 0x0e, 0x50, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x32, 0x20, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x20, 0x66, + 0x6f, 0x72, 0x20, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x6f, 0x66, 0x20, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0xd2, 0x01, 0x03, 0x6b, 0x65, 0x79, 0xd2, 0x01, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x32, 0x29, 0x7b, 0x22, 0x6b, 0x65, 0x79, 0x22, 0x3a, 0x20, + 0x22, 0x73, 0x6f, 0x6d, 0x65, 0x2d, 0x6b, 0x65, 0x79, 0x22, 0x2c, 0x22, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x6f, 0x6d, 0x65, 0x2d, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, + 0x7d, 0x22, 0xbe, 0x02, 0x0a, 0x0d, 0x50, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x53, + 0x70, 0x65, 0x63, 0x12, 0x6c, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, + 0x50, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x42, 0x29, + 0x92, 0x41, 0x26, 0x2a, 0x06, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x32, 0x1c, 0x6c, 0x69, 0x73, + 0x74, 0x20, 0x6f, 0x66, 0x20, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x20, 0x66, 0x6f, 0x72, 0x20, + 0x70, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, + 0x73, 0x12, 0x4a, 0x0a, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x2e, 0x92, 0x41, 0x2b, 0x2a, 0x08, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0x32, 0x1f, 0x4b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x20, 0x73, + 0x74, 0x79, 0x6c, 0x65, 0x20, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x20, 0x73, 0x65, 0x6c, 0x65, 0x63, + 0x74, 0x6f, 0x72, 0x52, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x3a, 0x73, 0x92, + 0x41, 0x70, 0x0a, 0x37, 0x2a, 0x0d, 0x50, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x53, + 0x70, 0x65, 0x63, 0x32, 0x26, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x73, + 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x66, 0x6f, 0x72, + 0x20, 0x61, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x32, 0x35, 0x7b, 0x22, 0x6c, + 0x61, 0x62, 0x65, 0x6c, 0x73, 0x22, 0x3a, 0x20, 0x5b, 0x7b, 0x22, 0x6b, 0x65, 0x79, 0x22, 0x3a, + 0x20, 0x22, 0x73, 0x6f, 0x6d, 0x65, 0x2d, 0x6b, 0x65, 0x79, 0x22, 0x7d, 0x2c, 0x7b, 0x22, 0x6b, + 0x65, 0x79, 0x22, 0x3a, 0x20, 0x22, 0x73, 0x6f, 0x6d, 0x65, 0x2d, 0x6b, 0x65, 0x79, 0x22, 0x7d, + 0x5d, 0x7d, 0x22, 0x98, 0x04, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x59, 0x0a, + 0x0d, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x33, 0x92, 0x41, 0x30, 0x2a, 0x0e, 0x43, 0x6f, 0x6e, 0x64, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x54, 0x79, 0x70, 0x65, 0x32, 0x1c, 0x74, 0x79, 0x70, 0x65, 0x20, + 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x20, 0x63, 0x6f, + 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x40, 0x01, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x64, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0xc1, 0x01, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x43, + 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x6b, + 0x92, 0x41, 0x68, 0x2a, 0x10, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x32, 0x17, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x20, 0x6f, 0x66, + 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x40, 0x01, + 0xf2, 0x02, 0x0c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x4e, 0x6f, 0x74, 0x53, 0x65, 0x74, 0xf2, + 0x02, 0x0f, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x74, 0x65, + 0x64, 0xf2, 0x02, 0x08, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x4f, 0x4b, 0xf2, 0x02, 0x0c, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x52, 0x0f, 0x63, 0x6f, 0x6e, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x7c, 0x0a, 0x0b, + 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x3e, 0x92, + 0x41, 0x3b, 0x2a, 0x0c, 0x4c, 0x61, 0x73, 0x74, 0x20, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, + 0x32, 0x29, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6f, 0x6e, 0x64, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x20, 0x69, 0x73, 0x20, 0x6c, + 0x61, 0x73, 0x74, 0x20, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x40, 0x01, 0x52, 0x0b, 0x6c, + 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x12, 0x4a, 0x0a, 0x06, 0x72, 0x65, + 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x32, 0x92, 0x41, 0x2f, 0x2a, + 0x06, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x32, 0x23, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x20, + 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x61, 0x73, 0x74, 0x20, 0x63, 0x6f, 0x6e, 0x64, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x40, 0x01, 0x52, 0x06, + 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x3a, 0x25, 0x92, 0x41, 0x22, 0x0a, 0x20, 0x2a, 0x06, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x32, 0x14, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x20, 0x6f, 0x66, + 0x20, 0x61, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x40, 0x01, 0x22, 0xde, 0x07, + 0x0a, 0x0c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x18, + 0x0a, 0x07, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x12, 0x22, 0x0a, 0x0c, 0x6f, 0x72, 0x67, 0x61, + 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, + 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, + 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, + 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x4b, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, + 0x6c, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, + 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, + 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x5a, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x72, 0x61, 0x66, + 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x12, + 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, + 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x12, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, + 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x12, 0x52, 0x05, + 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x2e, 0x0a, 0x12, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x53, + 0x63, 0x6f, 0x70, 0x65, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x12, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x44, 0x65, + 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x53, + 0x63, 0x6f, 0x70, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x67, 0x6c, 0x6f, 0x62, + 0x61, 0x6c, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, + 0x42, 0x79, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x42, + 0x79, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x64, 0x18, 0x10, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x18, 0x11, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x08, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x12, 0x1a, 0x0a, + 0x08, 0x75, 0x72, 0x6c, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x75, 0x72, 0x6c, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x73, 0x53, + 0x53, 0x4f, 0x55, 0x73, 0x65, 0x72, 0x18, 0x13, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, + 0x53, 0x53, 0x4f, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x15, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x62, + 0x6c, 0x75, 0x65, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x66, 0x18, 0x16, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0c, 0x62, 0x6c, 0x75, 0x65, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x66, 0x12, + 0x2a, 0x0a, 0x10, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x64, 0x56, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x18, 0x17, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x70, 0x75, 0x62, 0x6c, 0x69, + 0x73, 0x68, 0x65, 0x64, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x63, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x44, 0x18, 0x18, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x44, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x44, 0x18, + 0x19, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x49, 0x44, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3e, + 0x0a, 0x10, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x41, + 0x0a, 0x08, 0x48, 0x74, 0x74, 0x70, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, + 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, + 0x61, 0x2a, 0x58, 0x0a, 0x0f, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x4e, 0x6f, + 0x74, 0x53, 0x65, 0x74, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x64, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x4f, 0x4b, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x10, 0x03, 0x2a, 0xa7, 0x01, 0x0a, 0x14, + 0x52, 0x61, 0x66, 0x61, 0x79, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x12, 0x0a, 0x0a, 0x06, 0x4e, 0x6f, 0x74, 0x53, 0x65, 0x74, 0x10, 0x00, + 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x10, 0x01, 0x12, 0x0e, 0x0a, + 0x0a, 0x49, 0x6e, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x10, 0x02, 0x12, 0x0b, 0x0a, + 0x07, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x61, + 0x69, 0x6c, 0x65, 0x64, 0x10, 0x04, 0x12, 0x09, 0x0a, 0x05, 0x52, 0x65, 0x74, 0x72, 0x79, 0x10, + 0x05, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x6b, 0x69, 0x70, 0x70, 0x65, 0x64, 0x10, 0x06, 0x12, 0x0b, + 0x0a, 0x07, 0x53, 0x74, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x10, 0x07, 0x12, 0x0b, 0x0a, 0x07, 0x45, + 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x10, 0x08, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x74, 0x6f, 0x70, + 0x70, 0x69, 0x6e, 0x67, 0x10, 0x09, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, + 0x74, 0x65, 0x64, 0x10, 0x0a, 0x42, 0x8d, 0x02, 0x0a, 0x1d, 0x63, 0x6f, 0x6d, 0x2e, 0x72, 0x61, + 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x42, 0x0b, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x56, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x52, 0x61, 0x66, 0x61, 0x79, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x2f, + 0x72, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x70, + 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x70, 0x62, 0x2f, 0x76, 0x33, 0x3b, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x76, 0x33, 0xa2, 0x02, + 0x04, 0x52, 0x44, 0x54, 0x43, 0xaa, 0x02, 0x19, 0x52, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x44, 0x65, + 0x76, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x56, + 0x33, 0xca, 0x02, 0x19, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x54, 0x79, + 0x70, 0x65, 0x73, 0x5c, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5c, 0x56, 0x33, 0xe2, 0x02, 0x25, + 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x5c, + 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5c, 0x56, 0x33, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1d, 0x52, 0x61, 0x66, 0x61, 0x79, 0x3a, 0x3a, 0x44, + 0x65, 0x76, 0x3a, 0x3a, 0x54, 0x79, 0x70, 0x65, 0x73, 0x3a, 0x3a, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x3a, 0x3a, 0x56, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1301,36 +1383,37 @@ func file_proto_types_commonpb_v3_common_proto_rawDescGZIP() []byte { } var file_proto_types_commonpb_v3_common_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_proto_types_commonpb_v3_common_proto_msgTypes = make([]protoimpl.MessageInfo, 14) +var file_proto_types_commonpb_v3_common_proto_msgTypes = make([]protoimpl.MessageInfo, 15) var file_proto_types_commonpb_v3_common_proto_goTypes = []interface{}{ (ConditionStatus)(0), // 0: rafay.dev.types.common.v3.ConditionStatus (RafayConditionStatus)(0), // 1: rafay.dev.types.common.v3.RafayConditionStatus - (*Metadata)(nil), // 2: rafay.dev.types.common.v3.Metadata - (*ProjectMeta)(nil), // 3: rafay.dev.types.common.v3.ProjectMeta - (*SharingSpec)(nil), // 4: rafay.dev.types.common.v3.SharingSpec - (*DriftSpec)(nil), // 5: rafay.dev.types.common.v3.DriftSpec - (*ListMetadata)(nil), // 6: rafay.dev.types.common.v3.ListMetadata - (*PlacementLabel)(nil), // 7: rafay.dev.types.common.v3.PlacementLabel - (*PlacementSpec)(nil), // 8: rafay.dev.types.common.v3.PlacementSpec - (*Status)(nil), // 9: rafay.dev.types.common.v3.Status - (*QueryOptions)(nil), // 10: rafay.dev.types.common.v3.QueryOptions - (*HttpBody)(nil), // 11: rafay.dev.types.common.v3.HttpBody - nil, // 12: rafay.dev.types.common.v3.Metadata.LabelsEntry - nil, // 13: rafay.dev.types.common.v3.Metadata.AnnotationsEntry - nil, // 14: rafay.dev.types.common.v3.QueryOptions.LabelsEntry - nil, // 15: rafay.dev.types.common.v3.QueryOptions.AnnotationsEntry - (*timestamppb.Timestamp)(nil), // 16: google.protobuf.Timestamp + (*RafayTypeMeta)(nil), // 2: rafay.dev.types.common.v3.RafayTypeMeta + (*Metadata)(nil), // 3: rafay.dev.types.common.v3.Metadata + (*ProjectMeta)(nil), // 4: rafay.dev.types.common.v3.ProjectMeta + (*SharingSpec)(nil), // 5: rafay.dev.types.common.v3.SharingSpec + (*DriftSpec)(nil), // 6: rafay.dev.types.common.v3.DriftSpec + (*ListMetadata)(nil), // 7: rafay.dev.types.common.v3.ListMetadata + (*PlacementLabel)(nil), // 8: rafay.dev.types.common.v3.PlacementLabel + (*PlacementSpec)(nil), // 9: rafay.dev.types.common.v3.PlacementSpec + (*Status)(nil), // 10: rafay.dev.types.common.v3.Status + (*QueryOptions)(nil), // 11: rafay.dev.types.common.v3.QueryOptions + (*HttpBody)(nil), // 12: rafay.dev.types.common.v3.HttpBody + nil, // 13: rafay.dev.types.common.v3.Metadata.LabelsEntry + nil, // 14: rafay.dev.types.common.v3.Metadata.AnnotationsEntry + nil, // 15: rafay.dev.types.common.v3.QueryOptions.LabelsEntry + nil, // 16: rafay.dev.types.common.v3.QueryOptions.AnnotationsEntry + (*timestamppb.Timestamp)(nil), // 17: google.protobuf.Timestamp } var file_proto_types_commonpb_v3_common_proto_depIdxs = []int32{ - 12, // 0: rafay.dev.types.common.v3.Metadata.labels:type_name -> rafay.dev.types.common.v3.Metadata.LabelsEntry - 13, // 1: rafay.dev.types.common.v3.Metadata.annotations:type_name -> rafay.dev.types.common.v3.Metadata.AnnotationsEntry - 16, // 2: rafay.dev.types.common.v3.Metadata.modifiedAt:type_name -> google.protobuf.Timestamp - 3, // 3: rafay.dev.types.common.v3.SharingSpec.projects:type_name -> rafay.dev.types.common.v3.ProjectMeta - 7, // 4: rafay.dev.types.common.v3.PlacementSpec.labels:type_name -> rafay.dev.types.common.v3.PlacementLabel + 13, // 0: rafay.dev.types.common.v3.Metadata.labels:type_name -> rafay.dev.types.common.v3.Metadata.LabelsEntry + 14, // 1: rafay.dev.types.common.v3.Metadata.annotations:type_name -> rafay.dev.types.common.v3.Metadata.AnnotationsEntry + 17, // 2: rafay.dev.types.common.v3.Metadata.modifiedAt:type_name -> google.protobuf.Timestamp + 4, // 3: rafay.dev.types.common.v3.SharingSpec.projects:type_name -> rafay.dev.types.common.v3.ProjectMeta + 8, // 4: rafay.dev.types.common.v3.PlacementSpec.labels:type_name -> rafay.dev.types.common.v3.PlacementLabel 0, // 5: rafay.dev.types.common.v3.Status.conditionStatus:type_name -> rafay.dev.types.common.v3.ConditionStatus - 16, // 6: rafay.dev.types.common.v3.Status.lastUpdated:type_name -> google.protobuf.Timestamp - 14, // 7: rafay.dev.types.common.v3.QueryOptions.labels:type_name -> rafay.dev.types.common.v3.QueryOptions.LabelsEntry - 15, // 8: rafay.dev.types.common.v3.QueryOptions.annotations:type_name -> rafay.dev.types.common.v3.QueryOptions.AnnotationsEntry + 17, // 6: rafay.dev.types.common.v3.Status.lastUpdated:type_name -> google.protobuf.Timestamp + 15, // 7: rafay.dev.types.common.v3.QueryOptions.labels:type_name -> rafay.dev.types.common.v3.QueryOptions.LabelsEntry + 16, // 8: rafay.dev.types.common.v3.QueryOptions.annotations:type_name -> rafay.dev.types.common.v3.QueryOptions.AnnotationsEntry 9, // [9:9] is the sub-list for method output_type 9, // [9:9] is the sub-list for method input_type 9, // [9:9] is the sub-list for extension type_name @@ -1345,7 +1428,7 @@ func file_proto_types_commonpb_v3_common_proto_init() { } if !protoimpl.UnsafeEnabled { file_proto_types_commonpb_v3_common_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Metadata); i { + switch v := v.(*RafayTypeMeta); i { case 0: return &v.state case 1: @@ -1357,7 +1440,7 @@ func file_proto_types_commonpb_v3_common_proto_init() { } } file_proto_types_commonpb_v3_common_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ProjectMeta); i { + switch v := v.(*Metadata); i { case 0: return &v.state case 1: @@ -1369,7 +1452,7 @@ func file_proto_types_commonpb_v3_common_proto_init() { } } file_proto_types_commonpb_v3_common_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SharingSpec); i { + switch v := v.(*ProjectMeta); i { case 0: return &v.state case 1: @@ -1381,7 +1464,7 @@ func file_proto_types_commonpb_v3_common_proto_init() { } } file_proto_types_commonpb_v3_common_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DriftSpec); i { + switch v := v.(*SharingSpec); i { case 0: return &v.state case 1: @@ -1393,7 +1476,7 @@ func file_proto_types_commonpb_v3_common_proto_init() { } } file_proto_types_commonpb_v3_common_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListMetadata); i { + switch v := v.(*DriftSpec); i { case 0: return &v.state case 1: @@ -1405,7 +1488,7 @@ func file_proto_types_commonpb_v3_common_proto_init() { } } file_proto_types_commonpb_v3_common_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PlacementLabel); i { + switch v := v.(*ListMetadata); i { case 0: return &v.state case 1: @@ -1417,7 +1500,7 @@ func file_proto_types_commonpb_v3_common_proto_init() { } } file_proto_types_commonpb_v3_common_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PlacementSpec); i { + switch v := v.(*PlacementLabel); i { case 0: return &v.state case 1: @@ -1429,7 +1512,7 @@ func file_proto_types_commonpb_v3_common_proto_init() { } } file_proto_types_commonpb_v3_common_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Status); i { + switch v := v.(*PlacementSpec); i { case 0: return &v.state case 1: @@ -1441,7 +1524,7 @@ func file_proto_types_commonpb_v3_common_proto_init() { } } file_proto_types_commonpb_v3_common_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryOptions); i { + switch v := v.(*Status); i { case 0: return &v.state case 1: @@ -1453,6 +1536,18 @@ func file_proto_types_commonpb_v3_common_proto_init() { } } file_proto_types_commonpb_v3_common_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryOptions); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_commonpb_v3_common_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*HttpBody); i { case 0: return &v.state @@ -1471,7 +1566,7 @@ func file_proto_types_commonpb_v3_common_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_proto_types_commonpb_v3_common_proto_rawDesc, NumEnums: 2, - NumMessages: 14, + NumMessages: 15, NumExtensions: 0, NumServices: 0, }, diff --git a/components/common/proto/types/commonpb/v3/common.proto b/components/common/proto/types/commonpb/v3/common.proto index 9072ba5..49e32cb 100644 --- a/components/common/proto/types/commonpb/v3/common.proto +++ b/components/common/proto/types/commonpb/v3/common.proto @@ -5,6 +5,12 @@ import "google/protobuf/timestamp.proto"; import "google/api/field_behavior.proto"; import "protoc-gen-openapiv2/options/annotations.proto"; +// RafayTypeMeta is the type meta for rafay resources +message RafayTypeMeta { + string apiVersion = 1; + string kind = 2; +} + message Metadata { option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { json_schema : { @@ -22,38 +28,43 @@ message Metadata { title : "Name", description : "name of the resource" } ]; - string description = 2 + string displayName = 2 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Display Name", + description : "display name of the resource" + } ]; + string description = 3 [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { title : "Description", description : "description of the resource" } ]; - map labels = 3 + map labels = 4 [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { title : "Lables", description : "labels of the resource" } ]; - map annotations = 4 + map annotations = 5 [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { title : "Annotations", description : "annotations of the resource" } ]; - string project = 5 + string project = 6 [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { title : "Project", description : "Project of the resource" } ]; - string organization = 6 + string organization = 7 [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { title : "Organization", description : "Organization to which the resource belongs" } ]; - string partner = 7 + string partner = 8 [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { title : "Partner", description : "Partner to which the resource belongs" } ]; - string id = 8 [ (google.api.field_behavior) = OUTPUT_ONLY ]; - google.protobuf.Timestamp modifiedAt = 9 + string id = 9 [ (google.api.field_behavior) = OUTPUT_ONLY ]; + google.protobuf.Timestamp modifiedAt = 10 [ (google.api.field_behavior) = OUTPUT_ONLY ]; } @@ -232,9 +243,9 @@ message QueryOptions { string name = 1; // selector is used to filter the labels of a resource string selector = 2; - string partnerID = 3; - string organizationID = 4; - string projectID = 5; + string partner = 3; + string organization = 4; + string project = 5; // displayName only used for update queries to set displayName (READONLY) string displayName = 6; // labels only used for update queries to set labels (READONLY) @@ -263,6 +274,7 @@ message QueryOptions { string publishedVersion = 23; string clusterID = 24; string ID = 25; + string account = 26; } // RafayConditionStatus is the status of the status condition diff --git a/components/common/proto/types/commonpb/v3/kube.pb.go b/components/common/proto/types/commonpb/v3/kube.pb.go deleted file mode 100644 index f9a78a3..0000000 --- a/components/common/proto/types/commonpb/v3/kube.pb.go +++ /dev/null @@ -1,587 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.1 -// protoc (unknown) -// source: proto/types/commonpb/v3/kube.proto - -package commonv3 - -import ( - _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type Taint struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Required. The taint key to be applied to a node. - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - // The taint value corresponding to the taint key. - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` - // Required. The effect of the taint on pods - // that do not tolerate the taint. - // Valid effects are NoSchedule, PreferNoSchedule and NoExecute. - Effect string `protobuf:"bytes,3,opt,name=effect,proto3" json:"effect,omitempty"` - // TimeAdded represents the time at which the taint was added. - // It is only written for NoExecute taints. - TimeAdded *Time `protobuf:"bytes,4,opt,name=timeAdded,proto3" json:"timeAdded,omitempty"` -} - -func (x *Taint) Reset() { - *x = Taint{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_types_commonpb_v3_kube_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Taint) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Taint) ProtoMessage() {} - -func (x *Taint) ProtoReflect() protoreflect.Message { - mi := &file_proto_types_commonpb_v3_kube_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Taint.ProtoReflect.Descriptor instead. -func (*Taint) Descriptor() ([]byte, []int) { - return file_proto_types_commonpb_v3_kube_proto_rawDescGZIP(), []int{0} -} - -func (x *Taint) GetKey() string { - if x != nil { - return x.Key - } - return "" -} - -func (x *Taint) GetValue() string { - if x != nil { - return x.Value - } - return "" -} - -func (x *Taint) GetEffect() string { - if x != nil { - return x.Effect - } - return "" -} - -func (x *Taint) GetTimeAdded() *Time { - if x != nil { - return x.TimeAdded - } - return nil -} - -type Time struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Represents seconds of UTC time since Unix epoch - // 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - // 9999-12-31T23:59:59Z inclusive. - Seconds int64 `protobuf:"varint,1,opt,name=seconds,proto3" json:"seconds,omitempty"` - // Non-negative fractions of a second at nanosecond resolution. Negative - // second values with fractions must still have non-negative nanos values - // that count forward in time. Must be from 0 to 999,999,999 - // inclusive. This field may be limited in precision depending on context. - Nanos int32 `protobuf:"varint,2,opt,name=nanos,proto3" json:"nanos,omitempty"` -} - -func (x *Time) Reset() { - *x = Time{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_types_commonpb_v3_kube_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Time) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Time) ProtoMessage() {} - -func (x *Time) ProtoReflect() protoreflect.Message { - mi := &file_proto_types_commonpb_v3_kube_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Time.ProtoReflect.Descriptor instead. -func (*Time) Descriptor() ([]byte, []int) { - return file_proto_types_commonpb_v3_kube_proto_rawDescGZIP(), []int{1} -} - -func (x *Time) GetSeconds() int64 { - if x != nil { - return x.Seconds - } - return 0 -} - -func (x *Time) GetNanos() int32 { - if x != nil { - return x.Nanos - } - return 0 -} - -type NodeCondition struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Type of node condition. - Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` - // Status of the condition, one of True, False, Unknown. - Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` - // Last time we got an update on a given condition. - LastHeartbeatTime *Time `protobuf:"bytes,3,opt,name=lastHeartbeatTime,proto3" json:"lastHeartbeatTime,omitempty"` - // Last time the condition transit from one status to another. - LastTransitionTime *Time `protobuf:"bytes,4,opt,name=lastTransitionTime,proto3" json:"lastTransitionTime,omitempty"` - // (brief) reason for the condition's last transition. - Reason string `protobuf:"bytes,5,opt,name=reason,proto3" json:"reason,omitempty"` - // Human readable message indicating details about last transition. - Message string `protobuf:"bytes,6,opt,name=message,proto3" json:"message,omitempty"` -} - -func (x *NodeCondition) Reset() { - *x = NodeCondition{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_types_commonpb_v3_kube_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *NodeCondition) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NodeCondition) ProtoMessage() {} - -func (x *NodeCondition) ProtoReflect() protoreflect.Message { - mi := &file_proto_types_commonpb_v3_kube_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use NodeCondition.ProtoReflect.Descriptor instead. -func (*NodeCondition) Descriptor() ([]byte, []int) { - return file_proto_types_commonpb_v3_kube_proto_rawDescGZIP(), []int{2} -} - -func (x *NodeCondition) GetType() string { - if x != nil { - return x.Type - } - return "" -} - -func (x *NodeCondition) GetStatus() string { - if x != nil { - return x.Status - } - return "" -} - -func (x *NodeCondition) GetLastHeartbeatTime() *Time { - if x != nil { - return x.LastHeartbeatTime - } - return nil -} - -func (x *NodeCondition) GetLastTransitionTime() *Time { - if x != nil { - return x.LastTransitionTime - } - return nil -} - -func (x *NodeCondition) GetReason() string { - if x != nil { - return x.Reason - } - return "" -} - -func (x *NodeCondition) GetMessage() string { - if x != nil { - return x.Message - } - return "" -} - -type NodeSystemInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // MachineID reported by the node. For unique machine identification - // in the cluster this field is preferred. Learn more from man(5) - // machine-id: http://man7.org/linux/man-pages/man5/machine-id.5.html - MachineID string `protobuf:"bytes,1,opt,name=machineID,proto3" json:"machineID,omitempty"` - // SystemUUID reported by the node. For unique machine identification - // MachineID is preferred. This field is specific to Red Hat hosts - // https://access.redhat.com/documentation/en-us/red_hat_subscription_management/1/html/rhsm/uuid - SystemUUID string `protobuf:"bytes,2,opt,name=systemUUID,proto3" json:"systemUUID,omitempty"` - // Boot ID reported by the node. - BootID string `protobuf:"bytes,3,opt,name=bootID,proto3" json:"bootID,omitempty"` - // Kernel Version reported by the node from 'uname -r' (e.g. 3.16.0-0.bpo.4-amd64). - KernelVersion string `protobuf:"bytes,4,opt,name=kernelVersion,proto3" json:"kernelVersion,omitempty"` - // OS Image reported by the node from /etc/os-release (e.g. Debian GNU/Linux 7 (wheezy)). - OsImage string `protobuf:"bytes,5,opt,name=osImage,proto3" json:"osImage,omitempty"` - // ContainerRuntime Version reported by the node through runtime remote API (e.g. docker://1.5.0). - ContainerRuntimeVersion string `protobuf:"bytes,6,opt,name=containerRuntimeVersion,proto3" json:"containerRuntimeVersion,omitempty"` - // Kubelet Version reported by the node. - KubeletVersion string `protobuf:"bytes,7,opt,name=kubeletVersion,proto3" json:"kubeletVersion,omitempty"` - // KubeProxy Version reported by the node. - KubeProxyVersion string `protobuf:"bytes,8,opt,name=kubeProxyVersion,proto3" json:"kubeProxyVersion,omitempty"` - // The Operating System reported by the node - OperatingSystem string `protobuf:"bytes,9,opt,name=operatingSystem,proto3" json:"operatingSystem,omitempty"` - // The Architecture reported by the node - Architecture string `protobuf:"bytes,10,opt,name=architecture,proto3" json:"architecture,omitempty"` -} - -func (x *NodeSystemInfo) Reset() { - *x = NodeSystemInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_types_commonpb_v3_kube_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *NodeSystemInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NodeSystemInfo) ProtoMessage() {} - -func (x *NodeSystemInfo) ProtoReflect() protoreflect.Message { - mi := &file_proto_types_commonpb_v3_kube_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use NodeSystemInfo.ProtoReflect.Descriptor instead. -func (*NodeSystemInfo) Descriptor() ([]byte, []int) { - return file_proto_types_commonpb_v3_kube_proto_rawDescGZIP(), []int{3} -} - -func (x *NodeSystemInfo) GetMachineID() string { - if x != nil { - return x.MachineID - } - return "" -} - -func (x *NodeSystemInfo) GetSystemUUID() string { - if x != nil { - return x.SystemUUID - } - return "" -} - -func (x *NodeSystemInfo) GetBootID() string { - if x != nil { - return x.BootID - } - return "" -} - -func (x *NodeSystemInfo) GetKernelVersion() string { - if x != nil { - return x.KernelVersion - } - return "" -} - -func (x *NodeSystemInfo) GetOsImage() string { - if x != nil { - return x.OsImage - } - return "" -} - -func (x *NodeSystemInfo) GetContainerRuntimeVersion() string { - if x != nil { - return x.ContainerRuntimeVersion - } - return "" -} - -func (x *NodeSystemInfo) GetKubeletVersion() string { - if x != nil { - return x.KubeletVersion - } - return "" -} - -func (x *NodeSystemInfo) GetKubeProxyVersion() string { - if x != nil { - return x.KubeProxyVersion - } - return "" -} - -func (x *NodeSystemInfo) GetOperatingSystem() string { - if x != nil { - return x.OperatingSystem - } - return "" -} - -func (x *NodeSystemInfo) GetArchitecture() string { - if x != nil { - return x.Architecture - } - return "" -} - -var File_proto_types_commonpb_v3_kube_proto protoreflect.FileDescriptor - -var file_proto_types_commonpb_v3_kube_proto_rawDesc = []byte{ - 0x0a, 0x22, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x63, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x70, 0x62, 0x2f, 0x76, 0x33, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, - 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x1a, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, - 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, - 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0xaa, 0x01, 0x0a, 0x05, 0x54, 0x61, 0x69, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x12, 0x3d, 0x0a, 0x09, 0x74, 0x69, 0x6d, - 0x65, 0x41, 0x64, 0x64, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x72, - 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, - 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x52, 0x09, 0x74, - 0x69, 0x6d, 0x65, 0x41, 0x64, 0x64, 0x65, 0x64, 0x3a, 0x22, 0x92, 0x41, 0x1f, 0x0a, 0x1d, 0x2a, - 0x05, 0x54, 0x61, 0x69, 0x6e, 0x74, 0x32, 0x14, 0x54, 0x61, 0x69, 0x6e, 0x74, 0x20, 0x6f, 0x66, - 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x22, 0x49, 0x0a, 0x04, - 0x54, 0x69, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x12, 0x14, - 0x0a, 0x05, 0x6e, 0x61, 0x6e, 0x6f, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6e, - 0x61, 0x6e, 0x6f, 0x73, 0x3a, 0x11, 0x92, 0x41, 0x0e, 0x0a, 0x0c, 0x2a, 0x04, 0x54, 0x69, 0x6d, - 0x65, 0x32, 0x04, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xd6, 0x02, 0x0a, 0x0d, 0x4e, 0x6f, 0x64, 0x65, - 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x35, 0x0a, 0x04, 0x74, 0x79, 0x70, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0x92, 0x41, 0x1e, 0x2a, 0x04, 0x54, 0x79, - 0x70, 0x65, 0x32, 0x16, 0x54, 0x79, 0x70, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x6e, 0x6f, 0x64, 0x65, - 0x20, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, - 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x4d, 0x0a, 0x11, 0x6c, 0x61, 0x73, 0x74, - 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, - 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, - 0x54, 0x69, 0x6d, 0x65, 0x52, 0x11, 0x6c, 0x61, 0x73, 0x74, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, - 0x65, 0x61, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x4f, 0x0a, 0x12, 0x6c, 0x61, 0x73, 0x74, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, - 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, - 0x54, 0x69, 0x6d, 0x65, 0x52, 0x12, 0x6c, 0x61, 0x73, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, - 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, - 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x3a, 0x24, 0x92, 0x41, 0x21, 0x0a, - 0x1f, 0x2a, 0x0d, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x32, 0x0e, 0x4e, 0x6f, 0x64, 0x65, 0x20, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x22, 0xab, 0x03, 0x0a, 0x0e, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x49, - 0x6e, 0x66, 0x6f, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x49, 0x44, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x49, - 0x44, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x55, 0x55, 0x49, 0x44, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x55, 0x55, 0x49, - 0x44, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x6f, 0x6f, 0x74, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x62, 0x6f, 0x6f, 0x74, 0x49, 0x44, 0x12, 0x24, 0x0a, 0x0d, 0x6b, 0x65, 0x72, - 0x6e, 0x65, 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0d, 0x6b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, - 0x18, 0x0a, 0x07, 0x6f, 0x73, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x6f, 0x73, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x38, 0x0a, 0x17, 0x63, 0x6f, 0x6e, - 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x56, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x17, 0x63, 0x6f, 0x6e, 0x74, - 0x61, 0x69, 0x6e, 0x65, 0x72, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x56, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x0e, 0x6b, 0x75, 0x62, 0x65, 0x6c, 0x65, 0x74, 0x56, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6b, 0x75, 0x62, - 0x65, 0x6c, 0x65, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x10, 0x6b, - 0x75, 0x62, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, - 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x6b, 0x75, 0x62, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, - 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x0f, 0x6f, 0x70, 0x65, 0x72, 0x61, - 0x74, 0x69, 0x6e, 0x67, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x79, 0x73, 0x74, 0x65, - 0x6d, 0x12, 0x22, 0x0a, 0x0c, 0x61, 0x72, 0x63, 0x68, 0x69, 0x74, 0x65, 0x63, 0x74, 0x75, 0x72, - 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x72, 0x63, 0x68, 0x69, 0x74, 0x65, - 0x63, 0x74, 0x75, 0x72, 0x65, 0x3a, 0x27, 0x92, 0x41, 0x24, 0x0a, 0x22, 0x2a, 0x0e, 0x4e, 0x6f, - 0x64, 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x32, 0x10, 0x4e, 0x6f, - 0x64, 0x65, 0x20, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x20, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x8b, - 0x02, 0x0a, 0x1d, 0x63, 0x6f, 0x6d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, - 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, - 0x42, 0x09, 0x4b, 0x75, 0x62, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x56, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x61, 0x66, 0x61, 0x79, 0x53, - 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x2f, 0x72, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x62, 0x61, - 0x73, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x63, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, - 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x70, 0x62, 0x2f, 0x76, 0x33, 0x3b, 0x63, 0x6f, 0x6d, - 0x6d, 0x6f, 0x6e, 0x76, 0x33, 0xa2, 0x02, 0x04, 0x52, 0x44, 0x54, 0x43, 0xaa, 0x02, 0x19, 0x52, - 0x61, 0x66, 0x61, 0x79, 0x2e, 0x44, 0x65, 0x76, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, - 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x56, 0x33, 0xca, 0x02, 0x19, 0x52, 0x61, 0x66, 0x61, 0x79, - 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x5c, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, - 0x6e, 0x5c, 0x56, 0x33, 0xe2, 0x02, 0x25, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, - 0x5c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x5c, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5c, 0x56, 0x33, - 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1d, 0x52, - 0x61, 0x66, 0x61, 0x79, 0x3a, 0x3a, 0x44, 0x65, 0x76, 0x3a, 0x3a, 0x54, 0x79, 0x70, 0x65, 0x73, - 0x3a, 0x3a, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x3a, 0x3a, 0x56, 0x33, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_proto_types_commonpb_v3_kube_proto_rawDescOnce sync.Once - file_proto_types_commonpb_v3_kube_proto_rawDescData = file_proto_types_commonpb_v3_kube_proto_rawDesc -) - -func file_proto_types_commonpb_v3_kube_proto_rawDescGZIP() []byte { - file_proto_types_commonpb_v3_kube_proto_rawDescOnce.Do(func() { - file_proto_types_commonpb_v3_kube_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_types_commonpb_v3_kube_proto_rawDescData) - }) - return file_proto_types_commonpb_v3_kube_proto_rawDescData -} - -var file_proto_types_commonpb_v3_kube_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_proto_types_commonpb_v3_kube_proto_goTypes = []interface{}{ - (*Taint)(nil), // 0: rafay.dev.types.common.v3.Taint - (*Time)(nil), // 1: rafay.dev.types.common.v3.Time - (*NodeCondition)(nil), // 2: rafay.dev.types.common.v3.NodeCondition - (*NodeSystemInfo)(nil), // 3: rafay.dev.types.common.v3.NodeSystemInfo -} -var file_proto_types_commonpb_v3_kube_proto_depIdxs = []int32{ - 1, // 0: rafay.dev.types.common.v3.Taint.timeAdded:type_name -> rafay.dev.types.common.v3.Time - 1, // 1: rafay.dev.types.common.v3.NodeCondition.lastHeartbeatTime:type_name -> rafay.dev.types.common.v3.Time - 1, // 2: rafay.dev.types.common.v3.NodeCondition.lastTransitionTime:type_name -> rafay.dev.types.common.v3.Time - 3, // [3:3] is the sub-list for method output_type - 3, // [3:3] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name -} - -func init() { file_proto_types_commonpb_v3_kube_proto_init() } -func file_proto_types_commonpb_v3_kube_proto_init() { - if File_proto_types_commonpb_v3_kube_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_proto_types_commonpb_v3_kube_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Taint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_types_commonpb_v3_kube_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Time); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_types_commonpb_v3_kube_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NodeCondition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_types_commonpb_v3_kube_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NodeSystemInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_proto_types_commonpb_v3_kube_proto_rawDesc, - NumEnums: 0, - NumMessages: 4, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_proto_types_commonpb_v3_kube_proto_goTypes, - DependencyIndexes: file_proto_types_commonpb_v3_kube_proto_depIdxs, - MessageInfos: file_proto_types_commonpb_v3_kube_proto_msgTypes, - }.Build() - File_proto_types_commonpb_v3_kube_proto = out.File - file_proto_types_commonpb_v3_kube_proto_rawDesc = nil - file_proto_types_commonpb_v3_kube_proto_goTypes = nil - file_proto_types_commonpb_v3_kube_proto_depIdxs = nil -} diff --git a/components/common/proto/types/commonpb/v3/kube.proto b/components/common/proto/types/commonpb/v3/kube.proto deleted file mode 100644 index 4c4b433..0000000 --- a/components/common/proto/types/commonpb/v3/kube.proto +++ /dev/null @@ -1,118 +0,0 @@ -syntax = "proto3"; -package rafay.dev.types.common.v3; - -import "protoc-gen-openapiv2/options/annotations.proto"; - -message Taint { - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { - json_schema : { - title : "Taint" - description : "Taint of the cluster" - } - }; - // Required. The taint key to be applied to a node. - string key = 1; - - // The taint value corresponding to the taint key. - string value = 2; - - // Required. The effect of the taint on pods - // that do not tolerate the taint. - // Valid effects are NoSchedule, PreferNoSchedule and NoExecute. - string effect = 3; - - // TimeAdded represents the time at which the taint was added. - // It is only written for NoExecute taints. - Time timeAdded = 4; -} - -message Time { - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { - json_schema : { - title : "Time" - description : "Time" - } - }; - // Represents seconds of UTC time since Unix epoch - // 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - // 9999-12-31T23:59:59Z inclusive. - int64 seconds = 1; - - // Non-negative fractions of a second at nanosecond resolution. Negative - // second values with fractions must still have non-negative nanos values - // that count forward in time. Must be from 0 to 999,999,999 - // inclusive. This field may be limited in precision depending on context. - int32 nanos = 2; -} - -message NodeCondition { - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { - json_schema : { - title : "NodeCondition" - description : "Node Condition" - } - }; - // Type of node condition. - string type = 1 - [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - title : "Type", - description : "Type of node condition" - } ]; - - // Status of the condition, one of True, False, Unknown. - string status = 2; - - // Last time we got an update on a given condition. - Time lastHeartbeatTime = 3; - - // Last time the condition transit from one status to another. - Time lastTransitionTime = 4; - - // (brief) reason for the condition's last transition. - string reason = 5; - - // Human readable message indicating details about last transition. - string message = 6; -} - -message NodeSystemInfo { - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { - json_schema : { - title : "NodeSystemInfo" - description : "Node System Info" - } - }; - // MachineID reported by the node. For unique machine identification - // in the cluster this field is preferred. Learn more from man(5) - // machine-id: http://man7.org/linux/man-pages/man5/machine-id.5.html - string machineID = 1; - - // SystemUUID reported by the node. For unique machine identification - // MachineID is preferred. This field is specific to Red Hat hosts - // https://access.redhat.com/documentation/en-us/red_hat_subscription_management/1/html/rhsm/uuid - string systemUUID = 2; - - // Boot ID reported by the node. - string bootID = 3; - - // Kernel Version reported by the node from 'uname -r' (e.g. 3.16.0-0.bpo.4-amd64). - string kernelVersion = 4; - - // OS Image reported by the node from /etc/os-release (e.g. Debian GNU/Linux 7 (wheezy)). - string osImage = 5; - - // ContainerRuntime Version reported by the node through runtime remote API (e.g. docker://1.5.0). - string containerRuntimeVersion = 6; - - // Kubelet Version reported by the node. - string kubeletVersion = 7; - - // KubeProxy Version reported by the node. - string kubeProxyVersion = 8; - - // The Operating System reported by the node - string operatingSystem = 9; - - // The Architecture reported by the node - string architecture = 10; -} \ No newline at end of file diff --git a/components/common/proto/types/config/config.pb.go b/components/common/proto/types/config/config.pb.go new file mode 100644 index 0000000..9a5b4e2 --- /dev/null +++ b/components/common/proto/types/config/config.pb.go @@ -0,0 +1,3024 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc (unknown) +// source: proto/types/config/config.proto + +package config + +import ( + _ "github.com/RafaySystems/rcloud-base/components/common/proto/types/commonpb/v3" + controller "github.com/RafaySystems/rcloud-base/components/common/proto/types/controller" + _ "github.com/gogo/protobuf/gogoproto" + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + _ "k8s.io/api/extensions/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type SnapshotRefType int32 + +const ( + SnapshotRefType_SnapshotTaskSet SnapshotRefType = 0 + SnapshotRefType_SnapshotWorkload SnapshotRefType = 1 +) + +// Enum value maps for SnapshotRefType. +var ( + SnapshotRefType_name = map[int32]string{ + 0: "SnapshotTaskSet", + 1: "SnapshotWorkload", + } + SnapshotRefType_value = map[string]int32{ + "SnapshotTaskSet": 0, + "SnapshotWorkload": 1, + } +) + +func (x SnapshotRefType) Enum() *SnapshotRefType { + p := new(SnapshotRefType) + *p = x + return p +} + +func (x SnapshotRefType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SnapshotRefType) Descriptor() protoreflect.EnumDescriptor { + return file_proto_types_config_config_proto_enumTypes[0].Descriptor() +} + +func (SnapshotRefType) Type() protoreflect.EnumType { + return &file_proto_types_config_config_proto_enumTypes[0] +} + +func (x SnapshotRefType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SnapshotRefType.Descriptor instead. +func (SnapshotRefType) EnumDescriptor() ([]byte, []int) { + return file_proto_types_config_config_proto_rawDescGZIP(), []int{0} +} + +type WorkloadType int32 + +const ( + WorkloadType_NativeYaml WorkloadType = 0 + WorkloadType_Helm WorkloadType = 1 + WorkloadType_NativeHelm WorkloadType = 2 + WorkloadType_Rafay WorkloadType = 3 + WorkloadType_HelmInGitRepo WorkloadType = 4 + WorkloadType_YamlInGitRepo WorkloadType = 5 + WorkloadType_HelmInHelmRepo WorkloadType = 6 +) + +// Enum value maps for WorkloadType. +var ( + WorkloadType_name = map[int32]string{ + 0: "NativeYaml", + 1: "Helm", + 2: "NativeHelm", + 3: "Rafay", + 4: "HelmInGitRepo", + 5: "YamlInGitRepo", + 6: "HelmInHelmRepo", + } + WorkloadType_value = map[string]int32{ + "NativeYaml": 0, + "Helm": 1, + "NativeHelm": 2, + "Rafay": 3, + "HelmInGitRepo": 4, + "YamlInGitRepo": 5, + "HelmInHelmRepo": 6, + } +) + +func (x WorkloadType) Enum() *WorkloadType { + p := new(WorkloadType) + *p = x + return p +} + +func (x WorkloadType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (WorkloadType) Descriptor() protoreflect.EnumDescriptor { + return file_proto_types_config_config_proto_enumTypes[1].Descriptor() +} + +func (WorkloadType) Type() protoreflect.EnumType { + return &file_proto_types_config_config_proto_enumTypes[1] +} + +func (x WorkloadType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use WorkloadType.Descriptor instead. +func (WorkloadType) EnumDescriptor() ([]byte, []int) { + return file_proto_types_config_config_proto_rawDescGZIP(), []int{1} +} + +type ArtifactType int32 + +const ( + ArtifactType_ArtifactTypeNotSet ArtifactType = 0 + ArtifactType_RafayWizardWorkload ArtifactType = 1 + ArtifactType_HelmChart ArtifactType = 2 + ArtifactType_NativeYAML ArtifactType = 3 + ArtifactType_GitRepoWithHelm ArtifactType = 4 + ArtifactType_GitRepoWithNativeYAML ArtifactType = 5 + ArtifactType_HelmRepo ArtifactType = 6 + ArtifactType_RafayVMWizardWorkload ArtifactType = 7 +) + +// Enum value maps for ArtifactType. +var ( + ArtifactType_name = map[int32]string{ + 0: "ArtifactTypeNotSet", + 1: "RafayWizardWorkload", + 2: "HelmChart", + 3: "NativeYAML", + 4: "GitRepoWithHelm", + 5: "GitRepoWithNativeYAML", + 6: "HelmRepo", + 7: "RafayVMWizardWorkload", + } + ArtifactType_value = map[string]int32{ + "ArtifactTypeNotSet": 0, + "RafayWizardWorkload": 1, + "HelmChart": 2, + "NativeYAML": 3, + "GitRepoWithHelm": 4, + "GitRepoWithNativeYAML": 5, + "HelmRepo": 6, + "RafayVMWizardWorkload": 7, + } +) + +func (x ArtifactType) Enum() *ArtifactType { + p := new(ArtifactType) + *p = x + return p +} + +func (x ArtifactType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ArtifactType) Descriptor() protoreflect.EnumDescriptor { + return file_proto_types_config_config_proto_enumTypes[2].Descriptor() +} + +func (ArtifactType) Type() protoreflect.EnumType { + return &file_proto_types_config_config_proto_enumTypes[2] +} + +func (x ArtifactType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ArtifactType.Descriptor instead. +func (ArtifactType) EnumDescriptor() ([]byte, []int) { + return file_proto_types_config_config_proto_rawDescGZIP(), []int{2} +} + +type FileType int32 + +const ( + FileType_FileTypeNotSet FileType = 0 + FileType_K8sYAMLFile FileType = 1 + FileType_HelmChartFile FileType = 2 + FileType_HelmValuesFile FileType = 3 + FileType_JSONFile FileType = 4 +) + +// Enum value maps for FileType. +var ( + FileType_name = map[int32]string{ + 0: "FileTypeNotSet", + 1: "K8sYAMLFile", + 2: "HelmChartFile", + 3: "HelmValuesFile", + 4: "JSONFile", + } + FileType_value = map[string]int32{ + "FileTypeNotSet": 0, + "K8sYAMLFile": 1, + "HelmChartFile": 2, + "HelmValuesFile": 3, + "JSONFile": 4, + } +) + +func (x FileType) Enum() *FileType { + p := new(FileType) + *p = x + return p +} + +func (x FileType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (FileType) Descriptor() protoreflect.EnumDescriptor { + return file_proto_types_config_config_proto_enumTypes[3].Descriptor() +} + +func (FileType) Type() protoreflect.EnumType { + return &file_proto_types_config_config_proto_enumTypes[3] +} + +func (x FileType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use FileType.Descriptor instead. +func (FileType) EnumDescriptor() ([]byte, []int) { + return file_proto_types_config_config_proto_rawDescGZIP(), []int{3} +} + +type HealthStatus int32 + +const ( + HealthStatus_UNKNOWN HealthStatus = 0 + HealthStatus_HEALTHY HealthStatus = 1 + HealthStatus_UNHEALTHY HealthStatus = 2 + HealthStatus_INACTIVE HealthStatus = 3 +) + +// Enum value maps for HealthStatus. +var ( + HealthStatus_name = map[int32]string{ + 0: "UNKNOWN", + 1: "HEALTHY", + 2: "UNHEALTHY", + 3: "INACTIVE", + } + HealthStatus_value = map[string]int32{ + "UNKNOWN": 0, + "HEALTHY": 1, + "UNHEALTHY": 2, + "INACTIVE": 3, + } +) + +func (x HealthStatus) Enum() *HealthStatus { + p := new(HealthStatus) + *p = x + return p +} + +func (x HealthStatus) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (HealthStatus) Descriptor() protoreflect.EnumDescriptor { + return file_proto_types_config_config_proto_enumTypes[4].Descriptor() +} + +func (HealthStatus) Type() protoreflect.EnumType { + return &file_proto_types_config_config_proto_enumTypes[4] +} + +func (x HealthStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use HealthStatus.Descriptor instead. +func (HealthStatus) EnumDescriptor() ([]byte, []int) { + return file_proto_types_config_config_proto_rawDescGZIP(), []int{4} +} + +type ShareMode int32 + +const ( + ShareMode_ShareModeNotSet ShareMode = 0 + ShareMode_ALL ShareMode = 1 + ShareMode_CUSTOM ShareMode = 2 +) + +// Enum value maps for ShareMode. +var ( + ShareMode_name = map[int32]string{ + 0: "ShareModeNotSet", + 1: "ALL", + 2: "CUSTOM", + } + ShareMode_value = map[string]int32{ + "ShareModeNotSet": 0, + "ALL": 1, + "CUSTOM": 2, + } +) + +func (x ShareMode) Enum() *ShareMode { + p := new(ShareMode) + *p = x + return p +} + +func (x ShareMode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ShareMode) Descriptor() protoreflect.EnumDescriptor { + return file_proto_types_config_config_proto_enumTypes[5].Descriptor() +} + +func (ShareMode) Type() protoreflect.EnumType { + return &file_proto_types_config_config_proto_enumTypes[5] +} + +func (x ShareMode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ShareMode.Descriptor instead. +func (ShareMode) EnumDescriptor() ([]byte, []int) { + return file_proto_types_config_config_proto_rawDescGZIP(), []int{5} +} + +// SnapshotRef +// +// SnapshotRef refers to a published snapshot of a taskset/workload +type SnapshotRef struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + PublishedGeneration string `protobuf:"bytes,2,opt,name=publishedGeneration,proto3" json:"publishedGeneration,omitempty"` + Selector string `protobuf:"bytes,3,opt,name=selector,proto3" json:"selector,omitempty"` + Revision int64 `protobuf:"zigzag64,4,opt,name=revision,proto3" json:"revision,omitempty"` + WorkloadID string `protobuf:"bytes,5,opt,name=workloadID,proto3" json:"workloadID,omitempty"` + RefType SnapshotRefType `protobuf:"varint,6,opt,name=refType,proto3,enum=rafay.dev.types.config.SnapshotRefType" json:"refType,omitempty"` + Version string `protobuf:"bytes,7,opt,name=version,proto3" json:"version,omitempty"` + IsGlobal bool `protobuf:"varint,8,opt,name=isGlobal,proto3" json:"isGlobal,omitempty"` + ComponentType string `protobuf:"bytes,9,opt,name=componentType,proto3" json:"componentType,omitempty"` + DependsOn []string `protobuf:"bytes,10,rep,name=dependsOn,proto3" json:"dependsOn,omitempty"` +} + +func (x *SnapshotRef) Reset() { + *x = SnapshotRef{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_config_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SnapshotRef) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SnapshotRef) ProtoMessage() {} + +func (x *SnapshotRef) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_config_config_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SnapshotRef.ProtoReflect.Descriptor instead. +func (*SnapshotRef) Descriptor() ([]byte, []int) { + return file_proto_types_config_config_proto_rawDescGZIP(), []int{0} +} + +func (x *SnapshotRef) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *SnapshotRef) GetPublishedGeneration() string { + if x != nil { + return x.PublishedGeneration + } + return "" +} + +func (x *SnapshotRef) GetSelector() string { + if x != nil { + return x.Selector + } + return "" +} + +func (x *SnapshotRef) GetRevision() int64 { + if x != nil { + return x.Revision + } + return 0 +} + +func (x *SnapshotRef) GetWorkloadID() string { + if x != nil { + return x.WorkloadID + } + return "" +} + +func (x *SnapshotRef) GetRefType() SnapshotRefType { + if x != nil { + return x.RefType + } + return SnapshotRefType_SnapshotTaskSet +} + +func (x *SnapshotRef) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *SnapshotRef) GetIsGlobal() bool { + if x != nil { + return x.IsGlobal + } + return false +} + +func (x *SnapshotRef) GetComponentType() string { + if x != nil { + return x.ComponentType + } + return "" +} + +func (x *SnapshotRef) GetDependsOn() []string { + if x != nil { + return x.DependsOn + } + return nil +} + +type DiscoveryConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + Resource string `protobuf:"bytes,2,opt,name=resource,proto3" json:"resource,omitempty"` + Labels map[string]string `protobuf:"bytes,3,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *DiscoveryConfig) Reset() { + *x = DiscoveryConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_config_config_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DiscoveryConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DiscoveryConfig) ProtoMessage() {} + +func (x *DiscoveryConfig) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_config_config_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DiscoveryConfig.ProtoReflect.Descriptor instead. +func (*DiscoveryConfig) Descriptor() ([]byte, []int) { + return file_proto_types_config_config_proto_rawDescGZIP(), []int{1} +} + +func (x *DiscoveryConfig) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *DiscoveryConfig) GetResource() string { + if x != nil { + return x.Resource + } + return "" +} + +func (x *DiscoveryConfig) GetLabels() map[string]string { + if x != nil { + return x.Labels + } + return nil +} + +type ResourceRequirements struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Limits *ResourceQuantity `protobuf:"bytes,1,opt,name=limits,proto3" json:"limits,omitempty"` +} + +func (x *ResourceRequirements) Reset() { + *x = ResourceRequirements{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_config_config_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ResourceRequirements) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResourceRequirements) ProtoMessage() {} + +func (x *ResourceRequirements) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_config_config_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResourceRequirements.ProtoReflect.Descriptor instead. +func (*ResourceRequirements) Descriptor() ([]byte, []int) { + return file_proto_types_config_config_proto_rawDescGZIP(), []int{2} +} + +func (x *ResourceRequirements) GetLimits() *ResourceQuantity { + if x != nil { + return x.Limits + } + return nil +} + +type ResourceQuantity struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Memory string `protobuf:"bytes,1,opt,name=memory,proto3" json:"memory,omitempty"` + Cpu string `protobuf:"bytes,2,opt,name=cpu,proto3" json:"cpu,omitempty"` +} + +func (x *ResourceQuantity) Reset() { + *x = ResourceQuantity{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_config_config_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ResourceQuantity) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResourceQuantity) ProtoMessage() {} + +func (x *ResourceQuantity) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_config_config_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResourceQuantity.ProtoReflect.Descriptor instead. +func (*ResourceQuantity) Descriptor() ([]byte, []int) { + return file_proto_types_config_config_proto_rawDescGZIP(), []int{3} +} + +func (x *ResourceQuantity) GetMemory() string { + if x != nil { + return x.Memory + } + return "" +} + +func (x *ResourceQuantity) GetCpu() string { + if x != nil { + return x.Cpu + } + return "" +} + +type ComponentConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Disable bool `protobuf:"varint,1,opt,name=disable,proto3" json:"disable,omitempty"` + // optional + DiscoveryConfig *DiscoveryConfig `protobuf:"bytes,2,opt,name=discoveryConfig,proto3" json:"discoveryConfig,omitempty"` +} + +func (x *ComponentConfig) Reset() { + *x = ComponentConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_config_config_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ComponentConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ComponentConfig) ProtoMessage() {} + +func (x *ComponentConfig) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_config_config_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ComponentConfig.ProtoReflect.Descriptor instead. +func (*ComponentConfig) Descriptor() ([]byte, []int) { + return file_proto_types_config_config_proto_rawDescGZIP(), []int{4} +} + +func (x *ComponentConfig) GetDisable() bool { + if x != nil { + return x.Disable + } + return false +} + +func (x *ComponentConfig) GetDiscoveryConfig() *DiscoveryConfig { + if x != nil { + return x.DiscoveryConfig + } + return nil +} + +type PrometheusCustomization struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PrometheusAdapter *ComponentConfig `protobuf:"bytes,1,opt,name=prometheusAdapter,proto3" json:"prometheusAdapter,omitempty"` + MetricsServer *ComponentConfig `protobuf:"bytes,2,opt,name=metricsServer,proto3" json:"metricsServer,omitempty"` + KubeStateMetrics *ComponentConfig `protobuf:"bytes,3,opt,name=kubeStateMetrics,proto3" json:"kubeStateMetrics,omitempty"` + NodeExporter *ComponentConfig `protobuf:"bytes,4,opt,name=nodeExporter,proto3" json:"nodeExporter,omitempty"` + HelmExporter *ComponentConfig `protobuf:"bytes,5,opt,name=helmExporter,proto3" json:"helmExporter,omitempty"` + Resources *ResourceRequirements `protobuf:"bytes,6,opt,name=resources,proto3" json:"resources,omitempty"` +} + +func (x *PrometheusCustomization) Reset() { + *x = PrometheusCustomization{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_config_config_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PrometheusCustomization) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PrometheusCustomization) ProtoMessage() {} + +func (x *PrometheusCustomization) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_config_config_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PrometheusCustomization.ProtoReflect.Descriptor instead. +func (*PrometheusCustomization) Descriptor() ([]byte, []int) { + return file_proto_types_config_config_proto_rawDescGZIP(), []int{5} +} + +func (x *PrometheusCustomization) GetPrometheusAdapter() *ComponentConfig { + if x != nil { + return x.PrometheusAdapter + } + return nil +} + +func (x *PrometheusCustomization) GetMetricsServer() *ComponentConfig { + if x != nil { + return x.MetricsServer + } + return nil +} + +func (x *PrometheusCustomization) GetKubeStateMetrics() *ComponentConfig { + if x != nil { + return x.KubeStateMetrics + } + return nil +} + +func (x *PrometheusCustomization) GetNodeExporter() *ComponentConfig { + if x != nil { + return x.NodeExporter + } + return nil +} + +func (x *PrometheusCustomization) GetHelmExporter() *ComponentConfig { + if x != nil { + return x.HelmExporter + } + return nil +} + +func (x *PrometheusCustomization) GetResources() *ResourceRequirements { + if x != nil { + return x.Resources + } + return nil +} + +// TaskTemplate is the template for creating task +type TaskTemplate struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ObjectMeta *v1.ObjectMeta `protobuf:"bytes,1,opt,name=objectMeta,proto3" json:"objectMeta,omitempty"` + Spec *controller.TaskSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` +} + +func (x *TaskTemplate) Reset() { + *x = TaskTemplate{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_config_config_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TaskTemplate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TaskTemplate) ProtoMessage() {} + +func (x *TaskTemplate) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_config_config_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TaskTemplate.ProtoReflect.Descriptor instead. +func (*TaskTemplate) Descriptor() ([]byte, []int) { + return file_proto_types_config_config_proto_rawDescGZIP(), []int{6} +} + +func (x *TaskTemplate) GetObjectMeta() *v1.ObjectMeta { + if x != nil { + return x.ObjectMeta + } + return nil +} + +func (x *TaskTemplate) GetSpec() *controller.TaskSpec { + if x != nil { + return x.Spec + } + return nil +} + +// TaskStatusTemplate is the template for sending status of the task +type TaskStatusTemplate struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ObjectMeta *v1.ObjectMeta `protobuf:"bytes,1,opt,name=objectMeta,proto3" json:"objectMeta,omitempty"` + Status *controller.TaskStatus `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *TaskStatusTemplate) Reset() { + *x = TaskStatusTemplate{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_config_config_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TaskStatusTemplate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TaskStatusTemplate) ProtoMessage() {} + +func (x *TaskStatusTemplate) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_config_config_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TaskStatusTemplate.ProtoReflect.Descriptor instead. +func (*TaskStatusTemplate) Descriptor() ([]byte, []int) { + return file_proto_types_config_config_proto_rawDescGZIP(), []int{7} +} + +func (x *TaskStatusTemplate) GetObjectMeta() *v1.ObjectMeta { + if x != nil { + return x.ObjectMeta + } + return nil +} + +func (x *TaskStatusTemplate) GetStatus() *controller.TaskStatus { + if x != nil { + return x.Status + } + return nil +} + +type V2Workload struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + WorkloadType WorkloadType `protobuf:"varint,1,opt,name=workloadType,proto3,enum=rafay.dev.types.config.WorkloadType" json:"workloadType,omitempty"` + IsSystemWorkload bool `protobuf:"varint,2,opt,name=isSystemWorkload,proto3" json:"isSystemWorkload,omitempty"` + WorkloadName string `protobuf:"bytes,3,opt,name=workloadName,proto3" json:"workloadName,omitempty"` + Payload []byte `protobuf:"bytes,4,opt,name=payload,proto3" json:"payload,omitempty"` +} + +func (x *V2Workload) Reset() { + *x = V2Workload{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_config_config_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *V2Workload) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*V2Workload) ProtoMessage() {} + +func (x *V2Workload) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_config_config_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use V2Workload.ProtoReflect.Descriptor instead. +func (*V2Workload) Descriptor() ([]byte, []int) { + return file_proto_types_config_config_proto_rawDescGZIP(), []int{8} +} + +func (x *V2Workload) GetWorkloadType() WorkloadType { + if x != nil { + return x.WorkloadType + } + return WorkloadType_NativeYaml +} + +func (x *V2Workload) GetIsSystemWorkload() bool { + if x != nil { + return x.IsSystemWorkload + } + return false +} + +func (x *V2Workload) GetWorkloadName() string { + if x != nil { + return x.WorkloadName + } + return "" +} + +func (x *V2Workload) GetPayload() []byte { + if x != nil { + return x.Payload + } + return nil +} + +type FileMeta struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + FileType FileType `protobuf:"varint,2,opt,name=fileType,proto3,enum=rafay.dev.types.config.FileType" json:"fileType,omitempty"` + FileSize int64 `protobuf:"zigzag64,3,opt,name=fileSize,proto3" json:"fileSize,omitempty"` +} + +func (x *FileMeta) Reset() { + *x = FileMeta{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_config_config_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FileMeta) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FileMeta) ProtoMessage() {} + +func (x *FileMeta) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_config_config_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FileMeta.ProtoReflect.Descriptor instead. +func (*FileMeta) Descriptor() ([]byte, []int) { + return file_proto_types_config_config_proto_rawDescGZIP(), []int{9} +} + +func (x *FileMeta) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *FileMeta) GetFileType() FileType { + if x != nil { + return x.FileType + } + return FileType_FileTypeNotSet +} + +func (x *FileMeta) GetFileSize() int64 { + if x != nil { + return x.FileSize + } + return 0 +} + +type PipelineMeta struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PipelineID string `protobuf:"bytes,1,opt,name=pipelineID,proto3" json:"pipelineID,omitempty"` + InstanceID int64 `protobuf:"zigzag64,2,opt,name=instanceID,proto3" json:"instanceID,omitempty"` + StageName string `protobuf:"bytes,3,opt,name=stageName,proto3" json:"stageName,omitempty"` +} + +func (x *PipelineMeta) Reset() { + *x = PipelineMeta{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_config_config_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PipelineMeta) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PipelineMeta) ProtoMessage() {} + +func (x *PipelineMeta) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_config_config_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PipelineMeta.ProtoReflect.Descriptor instead. +func (*PipelineMeta) Descriptor() ([]byte, []int) { + return file_proto_types_config_config_proto_rawDescGZIP(), []int{10} +} + +func (x *PipelineMeta) GetPipelineID() string { + if x != nil { + return x.PipelineID + } + return "" +} + +func (x *PipelineMeta) GetInstanceID() int64 { + if x != nil { + return x.InstanceID + } + return 0 +} + +func (x *PipelineMeta) GetStageName() string { + if x != nil { + return x.StageName + } + return "" +} + +type ClusterMeta struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ClusterID string `protobuf:"bytes,1,opt,name=clusterID,proto3" json:"clusterID,omitempty"` + ClusterName string `protobuf:"bytes,2,opt,name=clusterName,proto3" json:"clusterName,omitempty"` + Reason string `protobuf:"bytes,3,opt,name=reason,proto3" json:"reason,omitempty"` + Deleted bool `protobuf:"varint,4,opt,name=deleted,proto3" json:"deleted,omitempty"` + IngressIPs []string `protobuf:"bytes,5,rep,name=ingressIPs,proto3" json:"ingressIPs,omitempty"` +} + +func (x *ClusterMeta) Reset() { + *x = ClusterMeta{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_config_config_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ClusterMeta) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClusterMeta) ProtoMessage() {} + +func (x *ClusterMeta) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_config_config_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClusterMeta.ProtoReflect.Descriptor instead. +func (*ClusterMeta) Descriptor() ([]byte, []int) { + return file_proto_types_config_config_proto_rawDescGZIP(), []int{11} +} + +func (x *ClusterMeta) GetClusterID() string { + if x != nil { + return x.ClusterID + } + return "" +} + +func (x *ClusterMeta) GetClusterName() string { + if x != nil { + return x.ClusterName + } + return "" +} + +func (x *ClusterMeta) GetReason() string { + if x != nil { + return x.Reason + } + return "" +} + +func (x *ClusterMeta) GetDeleted() bool { + if x != nil { + return x.Deleted + } + return false +} + +func (x *ClusterMeta) GetIngressIPs() []string { + if x != nil { + return x.IngressIPs + } + return nil +} + +type RepoArtifactMeta struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Git *GitOptions `protobuf:"bytes,1,opt,name=git,proto3" json:"git,omitempty"` + Helm *HelmOptions `protobuf:"bytes,2,opt,name=helm,proto3" json:"helm,omitempty"` + Timeout int64 `protobuf:"varint,3,opt,name=timeout,proto3" json:"timeout,omitempty"` +} + +func (x *RepoArtifactMeta) Reset() { + *x = RepoArtifactMeta{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_config_config_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RepoArtifactMeta) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RepoArtifactMeta) ProtoMessage() {} + +func (x *RepoArtifactMeta) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_config_config_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RepoArtifactMeta.ProtoReflect.Descriptor instead. +func (*RepoArtifactMeta) Descriptor() ([]byte, []int) { + return file_proto_types_config_config_proto_rawDescGZIP(), []int{12} +} + +func (x *RepoArtifactMeta) GetGit() *GitOptions { + if x != nil { + return x.Git + } + return nil +} + +func (x *RepoArtifactMeta) GetHelm() *HelmOptions { + if x != nil { + return x.Helm + } + return nil +} + +func (x *RepoArtifactMeta) GetTimeout() int64 { + if x != nil { + return x.Timeout + } + return 0 +} + +type GitOptions struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Revision string `protobuf:"bytes,1,opt,name=revision,proto3" json:"revision,omitempty"` + RepoArtifactFiles []*RepoFile `protobuf:"bytes,2,rep,name=repoArtifactFiles,proto3" json:"repoArtifactFiles,omitempty"` +} + +func (x *GitOptions) Reset() { + *x = GitOptions{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_config_config_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GitOptions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GitOptions) ProtoMessage() {} + +func (x *GitOptions) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_config_config_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GitOptions.ProtoReflect.Descriptor instead. +func (*GitOptions) Descriptor() ([]byte, []int) { + return file_proto_types_config_config_proto_rawDescGZIP(), []int{13} +} + +func (x *GitOptions) GetRevision() string { + if x != nil { + return x.Revision + } + return "" +} + +func (x *GitOptions) GetRepoArtifactFiles() []*RepoFile { + if x != nil { + return x.RepoArtifactFiles + } + return nil +} + +type HelmOptions struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ChartName string `protobuf:"bytes,1,opt,name=chartName,proto3" json:"chartName,omitempty"` + Tag string `protobuf:"bytes,2,opt,name=tag,proto3" json:"tag,omitempty"` +} + +func (x *HelmOptions) Reset() { + *x = HelmOptions{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_config_config_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HelmOptions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HelmOptions) ProtoMessage() {} + +func (x *HelmOptions) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_config_config_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HelmOptions.ProtoReflect.Descriptor instead. +func (*HelmOptions) Descriptor() ([]byte, []int) { + return file_proto_types_config_config_proto_rawDescGZIP(), []int{14} +} + +func (x *HelmOptions) GetChartName() string { + if x != nil { + return x.ChartName + } + return "" +} + +func (x *HelmOptions) GetTag() string { + if x != nil { + return x.Tag + } + return "" +} + +type RepoFile struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + RelPath string `protobuf:"bytes,2,opt,name=relPath,proto3" json:"relPath,omitempty"` + FileType FileType `protobuf:"varint,3,opt,name=fileType,proto3,enum=rafay.dev.types.config.FileType" json:"fileType,omitempty"` +} + +func (x *RepoFile) Reset() { + *x = RepoFile{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_config_config_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RepoFile) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RepoFile) ProtoMessage() {} + +func (x *RepoFile) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_config_config_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RepoFile.ProtoReflect.Descriptor instead. +func (*RepoFile) Descriptor() ([]byte, []int) { + return file_proto_types_config_config_proto_rawDescGZIP(), []int{15} +} + +func (x *RepoFile) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *RepoFile) GetRelPath() string { + if x != nil { + return x.RelPath + } + return "" +} + +func (x *RepoFile) GetFileType() FileType { + if x != nil { + return x.FileType + } + return FileType_FileTypeNotSet +} + +type File struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` + FileType FileType `protobuf:"varint,3,opt,name=fileType,proto3,enum=rafay.dev.types.config.FileType" json:"fileType,omitempty"` + Ordinal int64 `protobuf:"varint,4,opt,name=ordinal,proto3" json:"ordinal,omitempty"` +} + +func (x *File) Reset() { + *x = File{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_config_config_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *File) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*File) ProtoMessage() {} + +func (x *File) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_config_config_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use File.ProtoReflect.Descriptor instead. +func (*File) Descriptor() ([]byte, []int) { + return file_proto_types_config_config_proto_rawDescGZIP(), []int{16} +} + +func (x *File) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *File) GetPayload() []byte { + if x != nil { + return x.Payload + } + return nil +} + +func (x *File) GetFileType() FileType { + if x != nil { + return x.FileType + } + return FileType_FileTypeNotSet +} + +func (x *File) GetOrdinal() int64 { + if x != nil { + return x.Ordinal + } + return 0 +} + +type HelmExtra struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Atomic bool `protobuf:"varint,1,opt,name=atomic,proto3" json:"atomic,omitempty"` + Wait bool `protobuf:"varint,2,opt,name=wait,proto3" json:"wait,omitempty"` + Force bool `protobuf:"varint,3,opt,name=force,proto3" json:"force,omitempty"` + NoHooks bool `protobuf:"varint,4,opt,name=noHooks,proto3" json:"noHooks,omitempty"` + MaxHistory int32 `protobuf:"zigzag32,5,opt,name=maxHistory,proto3" json:"maxHistory,omitempty"` + RenderSubChartNotes bool `protobuf:"varint,6,opt,name=renderSubChartNotes,proto3" json:"renderSubChartNotes,omitempty"` + ResetValues bool `protobuf:"varint,7,opt,name=resetValues,proto3" json:"resetValues,omitempty"` + ReuseValues bool `protobuf:"varint,8,opt,name=reuseValues,proto3" json:"reuseValues,omitempty"` + Set []string `protobuf:"bytes,9,rep,name=set,proto3" json:"set,omitempty"` + SkipCRDs bool `protobuf:"varint,10,opt,name=skipCRDs,proto3" json:"skipCRDs,omitempty"` + Timeout int64 `protobuf:"zigzag64,11,opt,name=timeout,proto3" json:"timeout,omitempty"` + CleanUpOnFail bool `protobuf:"varint,12,opt,name=cleanUpOnFail,proto3" json:"cleanUpOnFail,omitempty"` + Description string `protobuf:"bytes,13,opt,name=description,proto3" json:"description,omitempty"` + DisableOpenAPIValidation bool `protobuf:"varint,14,opt,name=disableOpenAPIValidation,proto3" json:"disableOpenAPIValidation,omitempty"` + KeepHistory bool `protobuf:"varint,15,opt,name=keepHistory,proto3" json:"keepHistory,omitempty"` +} + +func (x *HelmExtra) Reset() { + *x = HelmExtra{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_config_config_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HelmExtra) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HelmExtra) ProtoMessage() {} + +func (x *HelmExtra) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_config_config_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HelmExtra.ProtoReflect.Descriptor instead. +func (*HelmExtra) Descriptor() ([]byte, []int) { + return file_proto_types_config_config_proto_rawDescGZIP(), []int{17} +} + +func (x *HelmExtra) GetAtomic() bool { + if x != nil { + return x.Atomic + } + return false +} + +func (x *HelmExtra) GetWait() bool { + if x != nil { + return x.Wait + } + return false +} + +func (x *HelmExtra) GetForce() bool { + if x != nil { + return x.Force + } + return false +} + +func (x *HelmExtra) GetNoHooks() bool { + if x != nil { + return x.NoHooks + } + return false +} + +func (x *HelmExtra) GetMaxHistory() int32 { + if x != nil { + return x.MaxHistory + } + return 0 +} + +func (x *HelmExtra) GetRenderSubChartNotes() bool { + if x != nil { + return x.RenderSubChartNotes + } + return false +} + +func (x *HelmExtra) GetResetValues() bool { + if x != nil { + return x.ResetValues + } + return false +} + +func (x *HelmExtra) GetReuseValues() bool { + if x != nil { + return x.ReuseValues + } + return false +} + +func (x *HelmExtra) GetSet() []string { + if x != nil { + return x.Set + } + return nil +} + +func (x *HelmExtra) GetSkipCRDs() bool { + if x != nil { + return x.SkipCRDs + } + return false +} + +func (x *HelmExtra) GetTimeout() int64 { + if x != nil { + return x.Timeout + } + return 0 +} + +func (x *HelmExtra) GetCleanUpOnFail() bool { + if x != nil { + return x.CleanUpOnFail + } + return false +} + +func (x *HelmExtra) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *HelmExtra) GetDisableOpenAPIValidation() bool { + if x != nil { + return x.DisableOpenAPIValidation + } + return false +} + +func (x *HelmExtra) GetKeepHistory() bool { + if x != nil { + return x.KeepHistory + } + return false +} + +type YamlExtra struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Force bool `protobuf:"varint,1,opt,name=force,proto3" json:"force,omitempty"` + DisableOpenAPIValidation bool `protobuf:"varint,2,opt,name=disableOpenAPIValidation,proto3" json:"disableOpenAPIValidation,omitempty"` +} + +func (x *YamlExtra) Reset() { + *x = YamlExtra{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_config_config_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *YamlExtra) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*YamlExtra) ProtoMessage() {} + +func (x *YamlExtra) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_config_config_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use YamlExtra.ProtoReflect.Descriptor instead. +func (*YamlExtra) Descriptor() ([]byte, []int) { + return file_proto_types_config_config_proto_rawDescGZIP(), []int{18} +} + +func (x *YamlExtra) GetForce() bool { + if x != nil { + return x.Force + } + return false +} + +func (x *YamlExtra) GetDisableOpenAPIValidation() bool { + if x != nil { + return x.DisableOpenAPIValidation + } + return false +} + +type ArtifactExtra struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Helm *HelmExtra `protobuf:"bytes,1,opt,name=helm,proto3" json:"helm,omitempty"` + MaxHistory int32 `protobuf:"zigzag32,2,opt,name=maxHistory,proto3" json:"maxHistory,omitempty"` + Repo *RepoArtifactMeta `protobuf:"bytes,3,opt,name=repo,proto3" json:"repo,omitempty"` + Pipeline *PipelineMeta `protobuf:"bytes,4,opt,name=pipeline,proto3" json:"pipeline,omitempty"` + UsePlacementName bool `protobuf:"varint,5,opt,name=usePlacementName,proto3" json:"usePlacementName,omitempty"` + Yaml *YamlExtra `protobuf:"bytes,6,opt,name=yaml,proto3" json:"yaml,omitempty"` +} + +func (x *ArtifactExtra) Reset() { + *x = ArtifactExtra{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_config_config_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ArtifactExtra) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ArtifactExtra) ProtoMessage() {} + +func (x *ArtifactExtra) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_config_config_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ArtifactExtra.ProtoReflect.Descriptor instead. +func (*ArtifactExtra) Descriptor() ([]byte, []int) { + return file_proto_types_config_config_proto_rawDescGZIP(), []int{19} +} + +func (x *ArtifactExtra) GetHelm() *HelmExtra { + if x != nil { + return x.Helm + } + return nil +} + +func (x *ArtifactExtra) GetMaxHistory() int32 { + if x != nil { + return x.MaxHistory + } + return 0 +} + +func (x *ArtifactExtra) GetRepo() *RepoArtifactMeta { + if x != nil { + return x.Repo + } + return nil +} + +func (x *ArtifactExtra) GetPipeline() *PipelineMeta { + if x != nil { + return x.Pipeline + } + return nil +} + +func (x *ArtifactExtra) GetUsePlacementName() bool { + if x != nil { + return x.UsePlacementName + } + return false +} + +func (x *ArtifactExtra) GetYaml() *YamlExtra { + if x != nil { + return x.Yaml + } + return nil +} + +type HealthCheck struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Status HealthStatus `protobuf:"varint,1,opt,name=status,proto3,enum=rafay.dev.types.config.HealthStatus" json:"status,omitempty"` + LastUpdated *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=lastUpdated,proto3" json:"lastUpdated,omitempty"` + Comment string `protobuf:"bytes,3,opt,name=comment,proto3" json:"comment,omitempty"` +} + +func (x *HealthCheck) Reset() { + *x = HealthCheck{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_config_config_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HealthCheck) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HealthCheck) ProtoMessage() {} + +func (x *HealthCheck) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_config_config_proto_msgTypes[20] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HealthCheck.ProtoReflect.Descriptor instead. +func (*HealthCheck) Descriptor() ([]byte, []int) { + return file_proto_types_config_config_proto_rawDescGZIP(), []int{20} +} + +func (x *HealthCheck) GetStatus() HealthStatus { + if x != nil { + return x.Status + } + return HealthStatus_UNKNOWN +} + +func (x *HealthCheck) GetLastUpdated() *timestamppb.Timestamp { + if x != nil { + return x.LastUpdated + } + return nil +} + +func (x *HealthCheck) GetComment() string { + if x != nil { + return x.Comment + } + return "" +} + +type Image struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Repository string `protobuf:"bytes,1,opt,name=repository,proto3" json:"repository,omitempty"` + Tag string `protobuf:"bytes,2,opt,name=tag,proto3" json:"tag,omitempty"` + PullPolicy string `protobuf:"bytes,3,opt,name=pullPolicy,proto3" json:"pullPolicy,omitempty"` + Digest string `protobuf:"bytes,4,opt,name=digest,proto3" json:"digest,omitempty"` +} + +func (x *Image) Reset() { + *x = Image{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_config_config_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Image) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Image) ProtoMessage() {} + +func (x *Image) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_config_config_proto_msgTypes[21] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Image.ProtoReflect.Descriptor instead. +func (*Image) Descriptor() ([]byte, []int) { + return file_proto_types_config_config_proto_rawDescGZIP(), []int{21} +} + +func (x *Image) GetRepository() string { + if x != nil { + return x.Repository + } + return "" +} + +func (x *Image) GetTag() string { + if x != nil { + return x.Tag + } + return "" +} + +func (x *Image) GetPullPolicy() string { + if x != nil { + return x.PullPolicy + } + return "" +} + +func (x *Image) GetDigest() string { + if x != nil { + return x.Digest + } + return "" +} + +type VolumeMount struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + MountPath string `protobuf:"bytes,2,opt,name=mountPath,proto3" json:"mountPath,omitempty"` +} + +func (x *VolumeMount) Reset() { + *x = VolumeMount{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_config_config_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *VolumeMount) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VolumeMount) ProtoMessage() {} + +func (x *VolumeMount) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_config_config_proto_msgTypes[22] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VolumeMount.ProtoReflect.Descriptor instead. +func (*VolumeMount) Descriptor() ([]byte, []int) { + return file_proto_types_config_config_proto_rawDescGZIP(), []int{22} +} + +func (x *VolumeMount) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *VolumeMount) GetMountPath() string { + if x != nil { + return x.MountPath + } + return "" +} + +type InitContainer struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Image string `protobuf:"bytes,2,opt,name=image,proto3" json:"image,omitempty"` + ImagePullPolicy string `protobuf:"bytes,3,opt,name=imagePullPolicy,proto3" json:"imagePullPolicy,omitempty"` + VolumeMounts []*VolumeMount `protobuf:"bytes,4,rep,name=volumeMounts,proto3" json:"volumeMounts,omitempty"` +} + +func (x *InitContainer) Reset() { + *x = InitContainer{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_config_config_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InitContainer) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InitContainer) ProtoMessage() {} + +func (x *InitContainer) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_config_config_proto_msgTypes[23] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InitContainer.ProtoReflect.Descriptor instead. +func (*InitContainer) Descriptor() ([]byte, []int) { + return file_proto_types_config_config_proto_rawDescGZIP(), []int{23} +} + +func (x *InitContainer) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *InitContainer) GetImage() string { + if x != nil { + return x.Image + } + return "" +} + +func (x *InitContainer) GetImagePullPolicy() string { + if x != nil { + return x.ImagePullPolicy + } + return "" +} + +func (x *InitContainer) GetVolumeMounts() []*VolumeMount { + if x != nil { + return x.VolumeMounts + } + return nil +} + +type Restic struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PodVolumePath string `protobuf:"bytes,1,opt,name=podVolumePath,proto3" json:"podVolumePath,omitempty"` + Privileged bool `protobuf:"varint,2,opt,name=privileged,proto3" json:"privileged,omitempty"` +} + +func (x *Restic) Reset() { + *x = Restic{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_config_config_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Restic) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Restic) ProtoMessage() {} + +func (x *Restic) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_config_config_proto_msgTypes[24] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Restic.ProtoReflect.Descriptor instead. +func (*Restic) Descriptor() ([]byte, []int) { + return file_proto_types_config_config_proto_rawDescGZIP(), []int{24} +} + +func (x *Restic) GetPodVolumePath() string { + if x != nil { + return x.PodVolumePath + } + return "" +} + +func (x *Restic) GetPrivileged() bool { + if x != nil { + return x.Privileged + } + return false +} + +type ProjectTaskSet struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TaskSetID string `protobuf:"bytes,1,opt,name=taskSetID,proto3" json:"taskSetID,omitempty"` + ProjectID string `protobuf:"bytes,2,opt,name=projectID,proto3" json:"projectID,omitempty"` +} + +func (x *ProjectTaskSet) Reset() { + *x = ProjectTaskSet{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_config_config_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ProjectTaskSet) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ProjectTaskSet) ProtoMessage() {} + +func (x *ProjectTaskSet) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_config_config_proto_msgTypes[25] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ProjectTaskSet.ProtoReflect.Descriptor instead. +func (*ProjectTaskSet) Descriptor() ([]byte, []int) { + return file_proto_types_config_config_proto_rawDescGZIP(), []int{25} +} + +func (x *ProjectTaskSet) GetTaskSetID() string { + if x != nil { + return x.TaskSetID + } + return "" +} + +func (x *ProjectTaskSet) GetProjectID() string { + if x != nil { + return x.ProjectID + } + return "" +} + +var File_proto_types_config_config_proto protoreflect.FileDescriptor + +var file_proto_types_config_config_proto_rawDesc = []byte{ + 0x0a, 0x1f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x16, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, + 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x34, 0x6b, 0x38, 0x73, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x6d, 0x61, 0x63, 0x68, + 0x69, 0x6e, 0x65, 0x72, 0x79, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x6d, + 0x65, 0x74, 0x61, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2d, 0x6b, 0x38, 0x73, 0x2e, 0x69, 0x6f, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x70, 0x62, 0x2f, 0x76, 0x33, 0x2f, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x6c, 0x65, 0x72, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x99, 0x04, 0x0a, + 0x0b, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x66, 0x12, 0x1c, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xea, 0xde, 0x1f, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x49, 0x0a, 0x13, 0x70, 0x75, + 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x64, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x17, 0xea, 0xde, 0x1f, 0x13, 0x70, 0x75, 0x62, + 0x6c, 0x69, 0x73, 0x68, 0x65, 0x64, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x13, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x64, 0x47, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, + 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0c, 0xea, 0xde, 0x1f, 0x08, 0x73, 0x65, 0x6c, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, + 0x28, 0x0a, 0x08, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x12, 0x42, 0x0c, 0xea, 0xde, 0x1f, 0x08, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, + 0x08, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x77, 0x6f, 0x72, + 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x49, 0x44, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x77, + 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x49, 0x44, 0x12, 0x4e, 0x0a, 0x07, 0x72, 0x65, 0x66, + 0x54, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x72, 0x61, 0x66, + 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x66, 0x54, + 0x79, 0x70, 0x65, 0x42, 0x0b, 0xea, 0xde, 0x1f, 0x07, 0x72, 0x65, 0x66, 0x54, 0x79, 0x70, 0x65, + 0x52, 0x07, 0x72, 0x65, 0x66, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2f, 0x0a, 0x07, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x15, 0xea, 0xde, 0x1f, 0x11, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, + 0x79, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x32, 0x0a, 0x08, 0x69, 0x73, + 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x42, 0x16, 0xea, 0xde, + 0x1f, 0x12, 0x69, 0x73, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, + 0x6d, 0x70, 0x74, 0x79, 0x52, 0x08, 0x69, 0x73, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x12, 0x41, + 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x18, + 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1b, 0xea, 0xde, 0x1f, 0x17, 0x63, 0x6f, 0x6d, 0x70, 0x6f, + 0x6e, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, + 0x74, 0x79, 0x52, 0x0d, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x35, 0x0a, 0x09, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x73, 0x4f, 0x6e, 0x18, 0x0a, + 0x20, 0x03, 0x28, 0x09, 0x42, 0x17, 0xea, 0xde, 0x1f, 0x13, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, + 0x73, 0x4f, 0x6e, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x09, 0x64, + 0x65, 0x70, 0x65, 0x6e, 0x64, 0x73, 0x4f, 0x6e, 0x22, 0xd3, 0x01, 0x0a, 0x0f, 0x44, 0x69, 0x73, + 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1c, 0x0a, 0x09, + 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x4b, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, + 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, + 0x65, 0x6c, 0x73, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x58, + 0x0a, 0x14, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x40, 0x0a, 0x06, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, + 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x51, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, + 0x52, 0x06, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x22, 0x3c, 0x0a, 0x10, 0x52, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x51, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x16, 0x0a, 0x06, + 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, + 0x6d, 0x6f, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x70, 0x75, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x63, 0x70, 0x75, 0x22, 0x7e, 0x0a, 0x0f, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, + 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x69, 0x73, + 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x64, 0x69, 0x73, 0x61, + 0x62, 0x6c, 0x65, 0x12, 0x51, 0x0a, 0x0f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x72, + 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0xfa, 0x03, 0x0a, 0x17, 0x50, 0x72, 0x6f, 0x6d, 0x65, + 0x74, 0x68, 0x65, 0x75, 0x73, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x55, 0x0a, 0x11, 0x70, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, + 0x41, 0x64, 0x61, 0x70, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, + 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x11, 0x70, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, + 0x75, 0x73, 0x41, 0x64, 0x61, 0x70, 0x74, 0x65, 0x72, 0x12, 0x4d, 0x0a, 0x0d, 0x6d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x27, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, + 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0d, 0x6d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x53, 0x0a, 0x10, 0x6b, 0x75, 0x62, 0x65, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x43, 0x6f, 0x6d, 0x70, + 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x10, 0x6b, 0x75, 0x62, + 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x4b, 0x0a, + 0x0c, 0x6e, 0x6f, 0x64, 0x65, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x43, 0x6f, 0x6d, + 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0c, 0x6e, 0x6f, + 0x64, 0x65, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x12, 0x4b, 0x0a, 0x0c, 0x68, 0x65, + 0x6c, 0x6d, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x27, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, + 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0c, 0x68, 0x65, 0x6c, 0x6d, 0x45, + 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x12, 0x4a, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x72, 0x61, 0x66, + 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x73, 0x22, 0xc4, 0x01, 0x0a, 0x0c, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x65, 0x6d, 0x70, + 0x6c, 0x61, 0x74, 0x65, 0x12, 0x70, 0x0a, 0x0a, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x65, + 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x6b, 0x38, 0x73, 0x2e, 0x69, + 0x6f, 0x2e, 0x61, 0x70, 0x69, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x72, 0x79, 0x2e, 0x70, + 0x6b, 0x67, 0x2e, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x76, 0x31, 0x2e, + 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x42, 0x1e, 0xc8, 0xde, 0x1f, 0x00, + 0xd0, 0xde, 0x1f, 0x01, 0xea, 0xde, 0x1f, 0x12, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x0a, 0x6f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x42, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, + 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, + 0x72, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x70, 0x65, 0x63, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, + 0xd0, 0xde, 0x1f, 0x01, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, 0xd0, 0x01, 0x0a, 0x12, 0x54, + 0x61, 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, + 0x65, 0x12, 0x70, 0x0a, 0x0a, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x6b, 0x38, 0x73, 0x2e, 0x69, 0x6f, 0x2e, 0x61, + 0x70, 0x69, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x6b, 0x67, 0x2e, + 0x61, 0x70, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x42, 0x1e, 0xc8, 0xde, 0x1f, 0x00, 0xd0, 0xde, 0x1f, + 0x01, 0xea, 0xde, 0x1f, 0x12, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2c, 0x6f, 0x6d, + 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x0a, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, + 0x65, 0x74, 0x61, 0x12, 0x48, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, + 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x08, 0xc8, 0xde, 0x1f, + 0x00, 0xd0, 0xde, 0x1f, 0x01, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0xc0, 0x01, + 0x0a, 0x0a, 0x56, 0x32, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x48, 0x0a, 0x0c, + 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x57, 0x6f, 0x72, 0x6b, + 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0c, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, + 0x61, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2a, 0x0a, 0x10, 0x69, 0x73, 0x53, 0x79, 0x73, 0x74, + 0x65, 0x6d, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x10, 0x69, 0x73, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, + 0x61, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x4e, 0x61, + 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, + 0x61, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, + 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, + 0x22, 0x78, 0x0a, 0x08, 0x46, 0x69, 0x6c, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x3c, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x46, 0x69, 0x6c, 0x65, + 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, + 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x12, + 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x22, 0x6c, 0x0a, 0x0c, 0x50, 0x69, + 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x69, + 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, + 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x44, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x6e, + 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x12, 0x52, 0x0a, + 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x44, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x74, + 0x61, 0x67, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, + 0x74, 0x61, 0x67, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xcb, 0x01, 0x0a, 0x0b, 0x43, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x2b, 0x0a, 0x09, 0x63, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xea, 0xde, 0x1f, + 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x44, 0x52, 0x09, 0x63, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x49, 0x44, 0x12, 0x31, 0x0a, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0f, 0xea, 0xde, 0x1f, 0x0b, + 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x0b, 0x63, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, + 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xea, 0xde, 0x1f, 0x06, 0x72, 0x65, + 0x61, 0x73, 0x6f, 0x6e, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, + 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x64, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x6e, 0x67, 0x72, 0x65, 0x73, + 0x73, 0x49, 0x50, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x6e, 0x67, 0x72, + 0x65, 0x73, 0x73, 0x49, 0x50, 0x73, 0x22, 0x9b, 0x01, 0x0a, 0x10, 0x52, 0x65, 0x70, 0x6f, 0x41, + 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x34, 0x0a, 0x03, 0x67, + 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, + 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x47, 0x69, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x03, 0x67, 0x69, + 0x74, 0x12, 0x37, 0x0a, 0x04, 0x68, 0x65, 0x6c, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x23, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x48, 0x65, 0x6c, 0x6d, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x04, 0x68, 0x65, 0x6c, 0x6d, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x69, + 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x74, 0x69, 0x6d, + 0x65, 0x6f, 0x75, 0x74, 0x22, 0xee, 0x01, 0x0a, 0x0a, 0x47, 0x69, 0x74, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x12, 0x43, 0x0a, 0x08, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x27, 0xea, 0xde, 0x1f, 0x08, 0x72, 0x65, 0x76, 0x69, 0x73, + 0x69, 0x6f, 0x6e, 0xf2, 0xde, 0x1f, 0x17, 0x70, 0x61, 0x74, 0x63, 0x68, 0x53, 0x74, 0x72, 0x61, + 0x74, 0x65, 0x67, 0x79, 0x3a, 0x22, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x22, 0x52, 0x08, + 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x9a, 0x01, 0x0a, 0x11, 0x72, 0x65, 0x70, + 0x6f, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, + 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x52, 0x65, + 0x70, 0x6f, 0x46, 0x69, 0x6c, 0x65, 0x42, 0x4a, 0xc8, 0xde, 0x1f, 0x00, 0xea, 0xde, 0x1f, 0x11, + 0x72, 0x65, 0x70, 0x6f, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x46, 0x69, 0x6c, 0x65, + 0x73, 0xf2, 0xde, 0x1f, 0x2d, 0x70, 0x61, 0x74, 0x63, 0x68, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, + 0x67, 0x79, 0x3a, 0x22, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x22, 0x20, 0x70, 0x61, 0x74, 0x63, 0x68, + 0x4d, 0x65, 0x72, 0x67, 0x65, 0x4b, 0x65, 0x79, 0x3a, 0x22, 0x72, 0x65, 0x6c, 0x50, 0x61, 0x74, + 0x68, 0x22, 0x52, 0x11, 0x72, 0x65, 0x70, 0x6f, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, + 0x46, 0x69, 0x6c, 0x65, 0x73, 0x22, 0x8b, 0x01, 0x0a, 0x0b, 0x48, 0x65, 0x6c, 0x6d, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x46, 0x0a, 0x09, 0x63, 0x68, 0x61, 0x72, 0x74, 0x4e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x28, 0xea, 0xde, 0x1f, 0x09, 0x63, 0x68, + 0x61, 0x72, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0xf2, 0xde, 0x1f, 0x17, 0x70, 0x61, 0x74, 0x63, 0x68, + 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x3a, 0x22, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, + 0x65, 0x22, 0x52, 0x09, 0x63, 0x68, 0x61, 0x72, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x34, 0x0a, + 0x03, 0x74, 0x61, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x22, 0xea, 0xde, 0x1f, 0x03, + 0x74, 0x61, 0x67, 0xf2, 0xde, 0x1f, 0x17, 0x70, 0x61, 0x74, 0x63, 0x68, 0x53, 0x74, 0x72, 0x61, + 0x74, 0x65, 0x67, 0x79, 0x3a, 0x22, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x22, 0x52, 0x03, + 0x74, 0x61, 0x67, 0x22, 0x9b, 0x01, 0x0a, 0x08, 0x52, 0x65, 0x70, 0x6f, 0x46, 0x69, 0x6c, 0x65, + 0x12, 0x1c, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, + 0xea, 0xde, 0x1f, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x25, + 0x0a, 0x07, 0x72, 0x65, 0x6c, 0x50, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x0b, 0xea, 0xde, 0x1f, 0x07, 0x72, 0x65, 0x6c, 0x50, 0x61, 0x74, 0x68, 0x52, 0x07, 0x72, 0x65, + 0x6c, 0x50, 0x61, 0x74, 0x68, 0x12, 0x4a, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x79, 0x70, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, + 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x42, 0x0c, 0xea, 0xde, 0x1f, 0x08, 0x66, + 0x69, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x79, 0x70, + 0x65, 0x22, 0x84, 0x02, 0x0a, 0x04, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x29, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x15, 0xea, 0xde, 0x1f, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0xf2, 0xde, 0x1f, 0x09, 0x70, 0x67, 0x3a, 0x22, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2a, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x10, 0xf2, 0xde, 0x1f, 0x0c, 0x70, 0x67, 0x3a, 0x22, + 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, + 0x64, 0x12, 0x65, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x46, 0x69, 0x6c, + 0x65, 0x54, 0x79, 0x70, 0x65, 0x42, 0x27, 0xea, 0xde, 0x1f, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x54, + 0x79, 0x70, 0x65, 0xf2, 0xde, 0x1f, 0x17, 0x70, 0x67, 0x3a, 0x22, 0x66, 0x69, 0x6c, 0x65, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x2c, 0x75, 0x73, 0x65, 0x5f, 0x7a, 0x65, 0x72, 0x6f, 0x22, 0x52, 0x08, + 0x66, 0x69, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x3e, 0x0a, 0x07, 0x6f, 0x72, 0x64, 0x69, + 0x6e, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x42, 0x24, 0xea, 0xde, 0x1f, 0x07, 0x6f, + 0x72, 0x64, 0x69, 0x6e, 0x61, 0x6c, 0xf2, 0xde, 0x1f, 0x15, 0x70, 0x67, 0x3a, 0x22, 0x6f, 0x72, + 0x64, 0x69, 0x6e, 0x61, 0x6c, 0x2c, 0x75, 0x73, 0x65, 0x5f, 0x7a, 0x65, 0x72, 0x6f, 0x22, 0x52, + 0x07, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x6c, 0x22, 0xec, 0x05, 0x0a, 0x09, 0x48, 0x65, 0x6c, + 0x6d, 0x45, 0x78, 0x74, 0x72, 0x61, 0x12, 0x22, 0x0a, 0x06, 0x61, 0x74, 0x6f, 0x6d, 0x69, 0x63, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, 0x0a, 0xea, 0xde, 0x1f, 0x06, 0x61, 0x74, 0x6f, 0x6d, + 0x69, 0x63, 0x52, 0x06, 0x61, 0x74, 0x6f, 0x6d, 0x69, 0x63, 0x12, 0x1c, 0x0a, 0x04, 0x77, 0x61, + 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x42, 0x08, 0xea, 0xde, 0x1f, 0x04, 0x77, 0x61, + 0x69, 0x74, 0x52, 0x04, 0x77, 0x61, 0x69, 0x74, 0x12, 0x1f, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x42, 0x09, 0xea, 0xde, 0x1f, 0x05, 0x66, 0x6f, 0x72, + 0x63, 0x65, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x12, 0x25, 0x0a, 0x07, 0x6e, 0x6f, 0x48, + 0x6f, 0x6f, 0x6b, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x42, 0x0b, 0xea, 0xde, 0x1f, 0x07, + 0x6e, 0x6f, 0x48, 0x6f, 0x6f, 0x6b, 0x73, 0x52, 0x07, 0x6e, 0x6f, 0x48, 0x6f, 0x6f, 0x6b, 0x73, + 0x12, 0x2e, 0x0a, 0x0a, 0x6d, 0x61, 0x78, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x11, 0x42, 0x0e, 0xea, 0xde, 0x1f, 0x0a, 0x6d, 0x61, 0x78, 0x48, 0x69, 0x73, + 0x74, 0x6f, 0x72, 0x79, 0x52, 0x0a, 0x6d, 0x61, 0x78, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, + 0x12, 0x49, 0x0a, 0x13, 0x72, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x53, 0x75, 0x62, 0x43, 0x68, 0x61, + 0x72, 0x74, 0x4e, 0x6f, 0x74, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x42, 0x17, 0xea, + 0xde, 0x1f, 0x13, 0x72, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x53, 0x75, 0x62, 0x43, 0x68, 0x61, 0x72, + 0x74, 0x4e, 0x6f, 0x74, 0x65, 0x73, 0x52, 0x13, 0x72, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x53, 0x75, + 0x62, 0x43, 0x68, 0x61, 0x72, 0x74, 0x4e, 0x6f, 0x74, 0x65, 0x73, 0x12, 0x31, 0x0a, 0x0b, 0x72, + 0x65, 0x73, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, + 0x42, 0x0f, 0xea, 0xde, 0x1f, 0x0b, 0x72, 0x65, 0x73, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x73, 0x52, 0x0b, 0x72, 0x65, 0x73, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x31, + 0x0a, 0x0b, 0x72, 0x65, 0x75, 0x73, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x08, 0x42, 0x0f, 0xea, 0xde, 0x1f, 0x0b, 0x72, 0x65, 0x75, 0x73, 0x65, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x73, 0x52, 0x0b, 0x72, 0x65, 0x75, 0x73, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x73, 0x12, 0x19, 0x0a, 0x03, 0x73, 0x65, 0x74, 0x18, 0x09, 0x20, 0x03, 0x28, 0x09, 0x42, 0x07, + 0xea, 0xde, 0x1f, 0x03, 0x73, 0x65, 0x74, 0x52, 0x03, 0x73, 0x65, 0x74, 0x12, 0x28, 0x0a, 0x08, + 0x73, 0x6b, 0x69, 0x70, 0x43, 0x52, 0x44, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x42, 0x0c, + 0xea, 0xde, 0x1f, 0x08, 0x73, 0x6b, 0x69, 0x70, 0x43, 0x52, 0x44, 0x73, 0x52, 0x08, 0x73, 0x6b, + 0x69, 0x70, 0x43, 0x52, 0x44, 0x73, 0x12, 0x36, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, + 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x12, 0x42, 0x1c, 0xea, 0xde, 0x1f, 0x07, 0x74, 0x69, 0x6d, + 0x65, 0x6f, 0x75, 0x74, 0xfa, 0xde, 0x1f, 0x0d, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x44, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x37, + 0x0a, 0x0d, 0x63, 0x6c, 0x65, 0x61, 0x6e, 0x55, 0x70, 0x4f, 0x6e, 0x46, 0x61, 0x69, 0x6c, 0x18, + 0x0c, 0x20, 0x01, 0x28, 0x08, 0x42, 0x11, 0xea, 0xde, 0x1f, 0x0d, 0x63, 0x6c, 0x65, 0x61, 0x6e, + 0x55, 0x70, 0x4f, 0x6e, 0x46, 0x61, 0x69, 0x6c, 0x52, 0x0d, 0x63, 0x6c, 0x65, 0x61, 0x6e, 0x55, + 0x70, 0x4f, 0x6e, 0x46, 0x61, 0x69, 0x6c, 0x12, 0x31, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0f, 0xea, 0xde, + 0x1f, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x64, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x58, 0x0a, 0x18, 0x64, 0x69, + 0x73, 0x61, 0x62, 0x6c, 0x65, 0x4f, 0x70, 0x65, 0x6e, 0x41, 0x50, 0x49, 0x56, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x42, 0x1c, 0xea, 0xde, + 0x1f, 0x18, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x4f, 0x70, 0x65, 0x6e, 0x41, 0x50, 0x49, + 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x18, 0x64, 0x69, 0x73, 0x61, + 0x62, 0x6c, 0x65, 0x4f, 0x70, 0x65, 0x6e, 0x41, 0x50, 0x49, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x31, 0x0a, 0x0b, 0x6b, 0x65, 0x65, 0x70, 0x48, 0x69, 0x73, 0x74, + 0x6f, 0x72, 0x79, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, 0x42, 0x0f, 0xea, 0xde, 0x1f, 0x0b, 0x6b, + 0x65, 0x65, 0x70, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x0b, 0x6b, 0x65, 0x65, 0x70, + 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x22, 0x86, 0x01, 0x0a, 0x09, 0x59, 0x61, 0x6d, 0x6c, + 0x45, 0x78, 0x74, 0x72, 0x61, 0x12, 0x1f, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x08, 0x42, 0x09, 0xea, 0xde, 0x1f, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x52, + 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x12, 0x58, 0x0a, 0x18, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, + 0x65, 0x4f, 0x70, 0x65, 0x6e, 0x41, 0x50, 0x49, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x42, 0x1c, 0xea, 0xde, 0x1f, 0x18, 0x64, 0x69, + 0x73, 0x61, 0x62, 0x6c, 0x65, 0x4f, 0x70, 0x65, 0x6e, 0x41, 0x50, 0x49, 0x56, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x18, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x4f, + 0x70, 0x65, 0x6e, 0x41, 0x50, 0x49, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x22, 0xf7, 0x03, 0x0a, 0x0d, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x45, 0x78, 0x74, + 0x72, 0x61, 0x12, 0x52, 0x0a, 0x04, 0x68, 0x65, 0x6c, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x21, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x48, 0x65, 0x6c, 0x6d, 0x45, 0x78, + 0x74, 0x72, 0x61, 0x42, 0x1b, 0xf2, 0xde, 0x1f, 0x17, 0x70, 0x61, 0x74, 0x63, 0x68, 0x53, 0x74, + 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x3a, 0x22, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x22, + 0x52, 0x04, 0x68, 0x65, 0x6c, 0x6d, 0x12, 0x3b, 0x0a, 0x0a, 0x6d, 0x61, 0x78, 0x48, 0x69, 0x73, + 0x74, 0x6f, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x11, 0x42, 0x1b, 0xf2, 0xde, 0x1f, 0x17, + 0x70, 0x61, 0x74, 0x63, 0x68, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x3a, 0x22, 0x72, + 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x22, 0x52, 0x0a, 0x6d, 0x61, 0x78, 0x48, 0x69, 0x73, 0x74, + 0x6f, 0x72, 0x79, 0x12, 0x59, 0x0a, 0x04, 0x72, 0x65, 0x70, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x28, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x41, + 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x42, 0x1b, 0xf2, 0xde, 0x1f, + 0x17, 0x70, 0x61, 0x74, 0x63, 0x68, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x3a, 0x22, + 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x22, 0x52, 0x04, 0x72, 0x65, 0x70, 0x6f, 0x12, 0x5d, + 0x0a, 0x08, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x24, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, + 0x6e, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x42, 0x1b, 0xf2, 0xde, 0x1f, 0x17, 0x70, 0x61, 0x74, 0x63, + 0x68, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x3a, 0x22, 0x72, 0x65, 0x70, 0x6c, 0x61, + 0x63, 0x65, 0x22, 0x52, 0x08, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x47, 0x0a, + 0x10, 0x75, 0x73, 0x65, 0x50, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, + 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x42, 0x1b, 0xf2, 0xde, 0x1f, 0x17, 0x70, 0x61, 0x74, + 0x63, 0x68, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x3a, 0x22, 0x72, 0x65, 0x70, 0x6c, + 0x61, 0x63, 0x65, 0x22, 0x52, 0x10, 0x75, 0x73, 0x65, 0x50, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x52, 0x0a, 0x04, 0x79, 0x61, 0x6d, 0x6c, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, + 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x59, 0x61, + 0x6d, 0x6c, 0x45, 0x78, 0x74, 0x72, 0x61, 0x42, 0x1b, 0xf2, 0xde, 0x1f, 0x17, 0x70, 0x61, 0x74, + 0x63, 0x68, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x3a, 0x22, 0x72, 0x65, 0x70, 0x6c, + 0x61, 0x63, 0x65, 0x22, 0x52, 0x04, 0x79, 0x61, 0x6d, 0x6c, 0x22, 0xad, 0x01, 0x0a, 0x0b, 0x48, + 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x3c, 0x0a, 0x06, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x72, 0x61, 0x66, + 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x46, 0x0a, 0x0b, 0x6c, 0x61, 0x73, 0x74, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0x90, + 0xdf, 0x1f, 0x01, 0x52, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, + 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0xb6, 0x01, 0x0a, 0x05, 0x49, + 0x6d, 0x61, 0x67, 0x65, 0x12, 0x32, 0x0a, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, + 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x12, 0xc8, 0xde, 0x1f, 0x01, 0xea, 0xde, + 0x1f, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x0a, 0x72, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x1d, 0x0a, 0x03, 0x74, 0x61, 0x67, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0xc8, 0xde, 0x1f, 0x01, 0xea, 0xde, 0x1f, 0x03, 0x74, + 0x61, 0x67, 0x52, 0x03, 0x74, 0x61, 0x67, 0x12, 0x32, 0x0a, 0x0a, 0x70, 0x75, 0x6c, 0x6c, 0x50, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x12, 0xc8, 0xde, 0x1f, + 0x01, 0xea, 0xde, 0x1f, 0x0a, 0x70, 0x75, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, + 0x0a, 0x70, 0x75, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x26, 0x0a, 0x06, 0x64, + 0x69, 0x67, 0x65, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xc8, 0xde, 0x1f, + 0x01, 0xea, 0xde, 0x1f, 0x06, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x52, 0x06, 0x64, 0x69, 0x67, + 0x65, 0x73, 0x74, 0x22, 0x4b, 0x0a, 0x0b, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x4d, 0x6f, 0x75, + 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x09, + 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x04, 0xc8, 0xde, 0x1f, 0x01, 0x52, 0x09, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x61, 0x74, 0x68, + 0x22, 0xc4, 0x01, 0x0a, 0x0d, 0x49, 0x6e, 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, + 0x65, 0x72, 0x12, 0x18, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x05, + 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xc8, 0xde, 0x1f, + 0x01, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x2e, 0x0a, 0x0f, 0x69, 0x6d, 0x61, 0x67, + 0x65, 0x50, 0x75, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x01, 0x52, 0x0f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x50, 0x75, + 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x4d, 0x0a, 0x0c, 0x76, 0x6f, 0x6c, 0x75, + 0x6d, 0x65, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, + 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x4d, 0x6f, + 0x75, 0x6e, 0x74, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x01, 0x52, 0x0c, 0x76, 0x6f, 0x6c, 0x75, 0x6d, + 0x65, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x22, 0x5a, 0x0a, 0x06, 0x52, 0x65, 0x73, 0x74, 0x69, + 0x63, 0x12, 0x2a, 0x0a, 0x0d, 0x70, 0x6f, 0x64, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x50, 0x61, + 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x01, 0x52, 0x0d, + 0x70, 0x6f, 0x64, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x24, 0x0a, + 0x0a, 0x70, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x08, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x01, 0x52, 0x0a, 0x70, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, + 0x67, 0x65, 0x64, 0x22, 0x5c, 0x0a, 0x0e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x61, + 0x73, 0x6b, 0x53, 0x65, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x61, 0x73, 0x6b, 0x53, 0x65, 0x74, + 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x61, 0x73, 0x6b, 0x53, 0x65, + 0x74, 0x49, 0x44, 0x12, 0x2c, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x44, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xea, 0xde, 0x1f, 0x0a, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, + 0x44, 0x2a, 0x42, 0x0a, 0x0f, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x66, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, + 0x54, 0x61, 0x73, 0x6b, 0x53, 0x65, 0x74, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x6e, 0x61, + 0x70, 0x73, 0x68, 0x6f, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x10, 0x01, 0x1a, + 0x04, 0x88, 0xa3, 0x1e, 0x00, 0x2a, 0x83, 0x01, 0x0a, 0x0c, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, + 0x61, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0e, 0x0a, 0x0a, 0x4e, 0x61, 0x74, 0x69, 0x76, 0x65, + 0x59, 0x61, 0x6d, 0x6c, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x65, 0x6c, 0x6d, 0x10, 0x01, + 0x12, 0x0e, 0x0a, 0x0a, 0x4e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x48, 0x65, 0x6c, 0x6d, 0x10, 0x02, + 0x12, 0x09, 0x0a, 0x05, 0x52, 0x61, 0x66, 0x61, 0x79, 0x10, 0x03, 0x12, 0x11, 0x0a, 0x0d, 0x48, + 0x65, 0x6c, 0x6d, 0x49, 0x6e, 0x47, 0x69, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x10, 0x04, 0x12, 0x11, + 0x0a, 0x0d, 0x59, 0x61, 0x6d, 0x6c, 0x49, 0x6e, 0x47, 0x69, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x10, + 0x05, 0x12, 0x12, 0x0a, 0x0e, 0x48, 0x65, 0x6c, 0x6d, 0x49, 0x6e, 0x48, 0x65, 0x6c, 0x6d, 0x52, + 0x65, 0x70, 0x6f, 0x10, 0x06, 0x1a, 0x04, 0x88, 0xa3, 0x1e, 0x00, 0x2a, 0xbd, 0x01, 0x0a, 0x0c, + 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x12, + 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x4e, 0x6f, 0x74, 0x53, + 0x65, 0x74, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x52, 0x61, 0x66, 0x61, 0x79, 0x57, 0x69, 0x7a, + 0x61, 0x72, 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x10, 0x01, 0x12, 0x0d, 0x0a, + 0x09, 0x48, 0x65, 0x6c, 0x6d, 0x43, 0x68, 0x61, 0x72, 0x74, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, + 0x4e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x59, 0x41, 0x4d, 0x4c, 0x10, 0x03, 0x12, 0x13, 0x0a, 0x0f, + 0x47, 0x69, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x57, 0x69, 0x74, 0x68, 0x48, 0x65, 0x6c, 0x6d, 0x10, + 0x04, 0x12, 0x19, 0x0a, 0x15, 0x47, 0x69, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x57, 0x69, 0x74, 0x68, + 0x4e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x59, 0x41, 0x4d, 0x4c, 0x10, 0x05, 0x12, 0x0c, 0x0a, 0x08, + 0x48, 0x65, 0x6c, 0x6d, 0x52, 0x65, 0x70, 0x6f, 0x10, 0x06, 0x12, 0x19, 0x0a, 0x15, 0x52, 0x61, + 0x66, 0x61, 0x79, 0x56, 0x4d, 0x57, 0x69, 0x7a, 0x61, 0x72, 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x6c, + 0x6f, 0x61, 0x64, 0x10, 0x07, 0x1a, 0x04, 0x88, 0xa3, 0x1e, 0x00, 0x2a, 0x6a, 0x0a, 0x08, 0x46, + 0x69, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x0e, 0x46, 0x69, 0x6c, 0x65, 0x54, + 0x79, 0x70, 0x65, 0x4e, 0x6f, 0x74, 0x53, 0x65, 0x74, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x4b, + 0x38, 0x73, 0x59, 0x41, 0x4d, 0x4c, 0x46, 0x69, 0x6c, 0x65, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, + 0x48, 0x65, 0x6c, 0x6d, 0x43, 0x68, 0x61, 0x72, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x10, 0x02, 0x12, + 0x12, 0x0a, 0x0e, 0x48, 0x65, 0x6c, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x46, 0x69, 0x6c, + 0x65, 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x4a, 0x53, 0x4f, 0x4e, 0x46, 0x69, 0x6c, 0x65, 0x10, + 0x04, 0x1a, 0x04, 0x88, 0xa3, 0x1e, 0x00, 0x2a, 0x4b, 0x0a, 0x0c, 0x48, 0x65, 0x61, 0x6c, 0x74, + 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, + 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x48, 0x45, 0x41, 0x4c, 0x54, 0x48, 0x59, 0x10, + 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x55, 0x4e, 0x48, 0x45, 0x41, 0x4c, 0x54, 0x48, 0x59, 0x10, 0x02, + 0x12, 0x0c, 0x0a, 0x08, 0x49, 0x4e, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x03, 0x1a, 0x04, + 0x88, 0xa3, 0x1e, 0x00, 0x2a, 0x3b, 0x0a, 0x09, 0x53, 0x68, 0x61, 0x72, 0x65, 0x4d, 0x6f, 0x64, + 0x65, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x68, 0x61, 0x72, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x4e, 0x6f, + 0x74, 0x53, 0x65, 0x74, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x4c, 0x4c, 0x10, 0x01, 0x12, + 0x0a, 0x0a, 0x06, 0x43, 0x55, 0x53, 0x54, 0x4f, 0x4d, 0x10, 0x02, 0x1a, 0x04, 0x88, 0xa3, 0x1e, + 0x00, 0x42, 0x83, 0x02, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, + 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x42, 0x0b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x48, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x61, 0x66, 0x61, + 0x79, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x2f, 0x72, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, + 0x62, 0x61, 0x73, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2f, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0xa2, 0x02, 0x04, 0x52, 0x44, 0x54, 0x43, + 0xaa, 0x02, 0x16, 0x52, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x44, 0x65, 0x76, 0x2e, 0x54, 0x79, 0x70, + 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0xca, 0x02, 0x16, 0x52, 0x61, 0x66, 0x61, + 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x5c, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0xe2, 0x02, 0x22, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x54, + 0x79, 0x70, 0x65, 0x73, 0x5c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5c, 0x47, 0x50, 0x42, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x19, 0x52, 0x61, 0x66, 0x61, 0x79, 0x3a, + 0x3a, 0x44, 0x65, 0x76, 0x3a, 0x3a, 0x54, 0x79, 0x70, 0x65, 0x73, 0x3a, 0x3a, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0xc8, 0xe2, 0x1e, 0x01, 0xd0, 0xe2, 0x1e, 0x01, 0xe0, 0xe2, 0x1e, 0x01, 0xc0, + 0xe3, 0x1e, 0x01, 0xc8, 0xe3, 0x1e, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_proto_types_config_config_proto_rawDescOnce sync.Once + file_proto_types_config_config_proto_rawDescData = file_proto_types_config_config_proto_rawDesc +) + +func file_proto_types_config_config_proto_rawDescGZIP() []byte { + file_proto_types_config_config_proto_rawDescOnce.Do(func() { + file_proto_types_config_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_types_config_config_proto_rawDescData) + }) + return file_proto_types_config_config_proto_rawDescData +} + +var file_proto_types_config_config_proto_enumTypes = make([]protoimpl.EnumInfo, 6) +var file_proto_types_config_config_proto_msgTypes = make([]protoimpl.MessageInfo, 27) +var file_proto_types_config_config_proto_goTypes = []interface{}{ + (SnapshotRefType)(0), // 0: rafay.dev.types.config.SnapshotRefType + (WorkloadType)(0), // 1: rafay.dev.types.config.WorkloadType + (ArtifactType)(0), // 2: rafay.dev.types.config.ArtifactType + (FileType)(0), // 3: rafay.dev.types.config.FileType + (HealthStatus)(0), // 4: rafay.dev.types.config.HealthStatus + (ShareMode)(0), // 5: rafay.dev.types.config.ShareMode + (*SnapshotRef)(nil), // 6: rafay.dev.types.config.SnapshotRef + (*DiscoveryConfig)(nil), // 7: rafay.dev.types.config.DiscoveryConfig + (*ResourceRequirements)(nil), // 8: rafay.dev.types.config.ResourceRequirements + (*ResourceQuantity)(nil), // 9: rafay.dev.types.config.ResourceQuantity + (*ComponentConfig)(nil), // 10: rafay.dev.types.config.ComponentConfig + (*PrometheusCustomization)(nil), // 11: rafay.dev.types.config.PrometheusCustomization + (*TaskTemplate)(nil), // 12: rafay.dev.types.config.TaskTemplate + (*TaskStatusTemplate)(nil), // 13: rafay.dev.types.config.TaskStatusTemplate + (*V2Workload)(nil), // 14: rafay.dev.types.config.V2Workload + (*FileMeta)(nil), // 15: rafay.dev.types.config.FileMeta + (*PipelineMeta)(nil), // 16: rafay.dev.types.config.PipelineMeta + (*ClusterMeta)(nil), // 17: rafay.dev.types.config.ClusterMeta + (*RepoArtifactMeta)(nil), // 18: rafay.dev.types.config.RepoArtifactMeta + (*GitOptions)(nil), // 19: rafay.dev.types.config.GitOptions + (*HelmOptions)(nil), // 20: rafay.dev.types.config.HelmOptions + (*RepoFile)(nil), // 21: rafay.dev.types.config.RepoFile + (*File)(nil), // 22: rafay.dev.types.config.File + (*HelmExtra)(nil), // 23: rafay.dev.types.config.HelmExtra + (*YamlExtra)(nil), // 24: rafay.dev.types.config.YamlExtra + (*ArtifactExtra)(nil), // 25: rafay.dev.types.config.ArtifactExtra + (*HealthCheck)(nil), // 26: rafay.dev.types.config.HealthCheck + (*Image)(nil), // 27: rafay.dev.types.config.Image + (*VolumeMount)(nil), // 28: rafay.dev.types.config.VolumeMount + (*InitContainer)(nil), // 29: rafay.dev.types.config.InitContainer + (*Restic)(nil), // 30: rafay.dev.types.config.Restic + (*ProjectTaskSet)(nil), // 31: rafay.dev.types.config.ProjectTaskSet + nil, // 32: rafay.dev.types.config.DiscoveryConfig.LabelsEntry + (*v1.ObjectMeta)(nil), // 33: k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta + (*controller.TaskSpec)(nil), // 34: rafay.dev.types.controller.TaskSpec + (*controller.TaskStatus)(nil), // 35: rafay.dev.types.controller.TaskStatus + (*timestamppb.Timestamp)(nil), // 36: google.protobuf.Timestamp +} +var file_proto_types_config_config_proto_depIdxs = []int32{ + 0, // 0: rafay.dev.types.config.SnapshotRef.refType:type_name -> rafay.dev.types.config.SnapshotRefType + 32, // 1: rafay.dev.types.config.DiscoveryConfig.labels:type_name -> rafay.dev.types.config.DiscoveryConfig.LabelsEntry + 9, // 2: rafay.dev.types.config.ResourceRequirements.limits:type_name -> rafay.dev.types.config.ResourceQuantity + 7, // 3: rafay.dev.types.config.ComponentConfig.discoveryConfig:type_name -> rafay.dev.types.config.DiscoveryConfig + 10, // 4: rafay.dev.types.config.PrometheusCustomization.prometheusAdapter:type_name -> rafay.dev.types.config.ComponentConfig + 10, // 5: rafay.dev.types.config.PrometheusCustomization.metricsServer:type_name -> rafay.dev.types.config.ComponentConfig + 10, // 6: rafay.dev.types.config.PrometheusCustomization.kubeStateMetrics:type_name -> rafay.dev.types.config.ComponentConfig + 10, // 7: rafay.dev.types.config.PrometheusCustomization.nodeExporter:type_name -> rafay.dev.types.config.ComponentConfig + 10, // 8: rafay.dev.types.config.PrometheusCustomization.helmExporter:type_name -> rafay.dev.types.config.ComponentConfig + 8, // 9: rafay.dev.types.config.PrometheusCustomization.resources:type_name -> rafay.dev.types.config.ResourceRequirements + 33, // 10: rafay.dev.types.config.TaskTemplate.objectMeta:type_name -> k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta + 34, // 11: rafay.dev.types.config.TaskTemplate.spec:type_name -> rafay.dev.types.controller.TaskSpec + 33, // 12: rafay.dev.types.config.TaskStatusTemplate.objectMeta:type_name -> k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta + 35, // 13: rafay.dev.types.config.TaskStatusTemplate.status:type_name -> rafay.dev.types.controller.TaskStatus + 1, // 14: rafay.dev.types.config.V2Workload.workloadType:type_name -> rafay.dev.types.config.WorkloadType + 3, // 15: rafay.dev.types.config.FileMeta.fileType:type_name -> rafay.dev.types.config.FileType + 19, // 16: rafay.dev.types.config.RepoArtifactMeta.git:type_name -> rafay.dev.types.config.GitOptions + 20, // 17: rafay.dev.types.config.RepoArtifactMeta.helm:type_name -> rafay.dev.types.config.HelmOptions + 21, // 18: rafay.dev.types.config.GitOptions.repoArtifactFiles:type_name -> rafay.dev.types.config.RepoFile + 3, // 19: rafay.dev.types.config.RepoFile.fileType:type_name -> rafay.dev.types.config.FileType + 3, // 20: rafay.dev.types.config.File.fileType:type_name -> rafay.dev.types.config.FileType + 23, // 21: rafay.dev.types.config.ArtifactExtra.helm:type_name -> rafay.dev.types.config.HelmExtra + 18, // 22: rafay.dev.types.config.ArtifactExtra.repo:type_name -> rafay.dev.types.config.RepoArtifactMeta + 16, // 23: rafay.dev.types.config.ArtifactExtra.pipeline:type_name -> rafay.dev.types.config.PipelineMeta + 24, // 24: rafay.dev.types.config.ArtifactExtra.yaml:type_name -> rafay.dev.types.config.YamlExtra + 4, // 25: rafay.dev.types.config.HealthCheck.status:type_name -> rafay.dev.types.config.HealthStatus + 36, // 26: rafay.dev.types.config.HealthCheck.lastUpdated:type_name -> google.protobuf.Timestamp + 28, // 27: rafay.dev.types.config.InitContainer.volumeMounts:type_name -> rafay.dev.types.config.VolumeMount + 28, // [28:28] is the sub-list for method output_type + 28, // [28:28] is the sub-list for method input_type + 28, // [28:28] is the sub-list for extension type_name + 28, // [28:28] is the sub-list for extension extendee + 0, // [0:28] is the sub-list for field type_name +} + +func init() { file_proto_types_config_config_proto_init() } +func file_proto_types_config_config_proto_init() { + if File_proto_types_config_config_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_proto_types_config_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SnapshotRef); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_config_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DiscoveryConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_config_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResourceRequirements); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_config_config_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResourceQuantity); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_config_config_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ComponentConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_config_config_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PrometheusCustomization); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_config_config_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TaskTemplate); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_config_config_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TaskStatusTemplate); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_config_config_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*V2Workload); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_config_config_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FileMeta); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_config_config_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PipelineMeta); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_config_config_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ClusterMeta); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_config_config_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RepoArtifactMeta); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_config_config_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GitOptions); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_config_config_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HelmOptions); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_config_config_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RepoFile); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_config_config_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*File); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_config_config_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HelmExtra); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_config_config_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*YamlExtra); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_config_config_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ArtifactExtra); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_config_config_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HealthCheck); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_config_config_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Image); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_config_config_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VolumeMount); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_config_config_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InitContainer); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_config_config_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Restic); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_config_config_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ProjectTaskSet); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_proto_types_config_config_proto_rawDesc, + NumEnums: 6, + NumMessages: 27, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_proto_types_config_config_proto_goTypes, + DependencyIndexes: file_proto_types_config_config_proto_depIdxs, + EnumInfos: file_proto_types_config_config_proto_enumTypes, + MessageInfos: file_proto_types_config_config_proto_msgTypes, + }.Build() + File_proto_types_config_config_proto = out.File + file_proto_types_config_config_proto_rawDesc = nil + file_proto_types_config_config_proto_goTypes = nil + file_proto_types_config_config_proto_depIdxs = nil +} diff --git a/components/common/proto/types/config/config.proto b/components/common/proto/types/config/config.proto new file mode 100644 index 0000000..b6ea1e3 --- /dev/null +++ b/components/common/proto/types/config/config.proto @@ -0,0 +1,313 @@ +syntax = "proto3"; +package rafay.dev.types.config; + +import "gogoproto/gogo.proto"; +import "google/protobuf/timestamp.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; +import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; +import "k8s.io/api/extensions/v1beta1/generated.proto"; +import "proto/types/commonpb/v3/common.proto"; +import "proto/types/controller/cluster_controller.proto"; + +// Enable custom Marshal method. +option (gogoproto.marshaler_all) = true; +// Enable custom Unmarshal method. +option (gogoproto.unmarshaler_all) = true; +// Enable custom Size method (Required by Marshal and Unmarshal). +option (gogoproto.sizer_all) = true; +// Enable registration with golang/protobuf for the grpc-gateway. +option (gogoproto.goproto_registration) = true; +// Enable generation of XXX_MessageName methods for grpc-go/status. +option (gogoproto.messagename_all) = true; + +enum SnapshotRefType { + // disable enum prefix + option (gogoproto.goproto_enum_prefix) = false; + + SnapshotTaskSet = 0; + SnapshotWorkload = 1; +} + +// SnapshotRef +// +// SnapshotRef refers to a published snapshot of a taskset/workload +message SnapshotRef { + string name = 1 [ (gogoproto.jsontag) = "name" ]; + string publishedGeneration = 2 + [ (gogoproto.jsontag) = "publishedGeneration" ]; + string selector = 3 [ (gogoproto.jsontag) = "selector" ]; + sint64 revision = 4 [ (gogoproto.jsontag) = "revision" ]; + string workloadID = 5; + SnapshotRefType refType = 6 [ (gogoproto.jsontag) = "refType" ]; + string version = 7 [ (gogoproto.jsontag) = "version,omitempty" ]; + bool isGlobal = 8 [ (gogoproto.jsontag) = "isGlobal,omitempty" ]; + string componentType = 9 [ (gogoproto.jsontag) = "componentType,omitempty" ]; + repeated string dependsOn = 10 + [ (gogoproto.jsontag) = "dependsOn,omitempty" ]; +} + +message DiscoveryConfig { + string namespace = 1; + string resource = 2; + map labels = 3; +} + +message ResourceRequirements { ResourceQuantity limits = 1; } + +message ResourceQuantity { + string memory = 1; + string cpu = 2; +} + +message ComponentConfig { + bool disable = 1; + // optional + DiscoveryConfig discoveryConfig = 2; +} + +message PrometheusCustomization { + ComponentConfig prometheusAdapter = 1; + ComponentConfig metricsServer = 2; + ComponentConfig kubeStateMetrics = 3; + ComponentConfig nodeExporter = 4; + ComponentConfig helmExporter = 5; + ResourceRequirements resources = 6; +} + +// TaskTemplate is the template for creating task +message TaskTemplate { + k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta objectMeta = 1 [ + (gogoproto.embed) = true, + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "metadata,omitempty" + ]; + + rafay.dev.types.controller.TaskSpec spec = 2 + [ (gogoproto.nullable) = false, (gogoproto.embed) = true ]; +} + +// TaskStatusTemplate is the template for sending status of the task +message TaskStatusTemplate { + k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta objectMeta = 1 [ + (gogoproto.embed) = true, + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "metadata,omitempty" + ]; + + rafay.dev.types.controller.TaskStatus status = 2 + [ (gogoproto.nullable) = false, (gogoproto.embed) = true ]; +} + +enum WorkloadType { + option (gogoproto.goproto_enum_prefix) = false; + NativeYaml = 0; + Helm = 1; + NativeHelm = 2; + Rafay = 3; + HelmInGitRepo = 4; + YamlInGitRepo = 5; + HelmInHelmRepo = 6; +} + +message V2Workload { + WorkloadType workloadType = 1; + bool isSystemWorkload = 2; + string workloadName = 3; + bytes payload = 4; +} + +message FileMeta { + string name = 1; + FileType fileType = 2; + sint64 fileSize = 3; +} + +message PipelineMeta { + string pipelineID = 1; + sint64 instanceID = 2; + string stageName = 3; +} + +message ClusterMeta { + string clusterID = 1 [ + (gogoproto.jsontag) = "clusterID" + ]; + string clusterName = 2 [ (gogoproto.jsontag) = "clusterName" ]; + string reason = 3 [ (gogoproto.jsontag) = "reason" ]; + bool deleted = 4; + repeated string ingressIPs = 5; +} + +message RepoArtifactMeta { + GitOptions git = 1; + HelmOptions helm = 2; + int64 timeout = 3; +} + +message GitOptions { + string revision = 1 [ + (gogoproto.moretags) = "patchStrategy:\"replace\"", + (gogoproto.jsontag) = "revision" + ]; + repeated RepoFile repoArtifactFiles = 2 [ + (gogoproto.moretags) = "patchStrategy:\"merge\" patchMergeKey:\"relPath\"", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "repoArtifactFiles" + ]; +} + +message HelmOptions { + string chartName = 1 [ + (gogoproto.moretags) = "patchStrategy:\"replace\"", + (gogoproto.jsontag) = "chartName" + ]; + string tag = 2 [ + (gogoproto.moretags) = "patchStrategy:\"replace\"", + (gogoproto.jsontag) = "tag" + ]; +} + +enum ArtifactType { + // disable enum prefix + option (gogoproto.goproto_enum_prefix) = false; + + ArtifactTypeNotSet = 0; + RafayWizardWorkload = 1; + HelmChart = 2; + NativeYAML = 3; + GitRepoWithHelm = 4; + GitRepoWithNativeYAML = 5; + HelmRepo = 6; + RafayVMWizardWorkload = 7; +} + +enum FileType { + // disable enum prefix + option (gogoproto.goproto_enum_prefix) = false; + + FileTypeNotSet = 0; + K8sYAMLFile = 1; + HelmChartFile = 2; + HelmValuesFile = 3; + JSONFile = 4; +} + +message RepoFile { + string name = 1 [ (gogoproto.jsontag) = "name" ]; + string relPath = 2 [ (gogoproto.jsontag) = "relPath" ]; + FileType fileType = 3 [ (gogoproto.jsontag) = "fileType" ]; +} + +message File { + string name = 1 + [ (gogoproto.moretags) = "pg:\"name\"", (gogoproto.jsontag) = "name" ]; + bytes payload = 2 [ (gogoproto.moretags) = "pg:\"payload\"" ]; + FileType fileType = 3 [ + (gogoproto.moretags) = "pg:\"file_type,use_zero\"", + (gogoproto.jsontag) = "fileType" + ]; + int64 ordinal = 4 [ + (gogoproto.moretags) = "pg:\"ordinal,use_zero\"", + (gogoproto.jsontag) = "ordinal" + ]; +} + +message HelmExtra { + bool atomic = 1 [ (gogoproto.jsontag) = "atomic" ]; + bool wait = 2 [ (gogoproto.jsontag) = "wait" ]; + bool force = 3 [ (gogoproto.jsontag) = "force" ]; + bool noHooks = 4 [ (gogoproto.jsontag) = "noHooks" ]; + sint32 maxHistory = 5 [ (gogoproto.jsontag) = "maxHistory" ]; + bool renderSubChartNotes = 6 [ (gogoproto.jsontag) = "renderSubChartNotes" ]; + bool resetValues = 7 [ (gogoproto.jsontag) = "resetValues" ]; + bool reuseValues = 8 [ (gogoproto.jsontag) = "reuseValues" ]; + repeated string set = 9 [ (gogoproto.jsontag) = "set" ]; + bool skipCRDs = 10 [ (gogoproto.jsontag) = "skipCRDs" ]; + sint64 timeout = 11 [ + (gogoproto.jsontag) = "timeout", + (gogoproto.casttype) = "time.Duration" + ]; + bool cleanUpOnFail = 12 [ (gogoproto.jsontag) = "cleanUpOnFail" ]; + string description = 13 [ (gogoproto.jsontag) = "description" ]; + bool disableOpenAPIValidation = 14 + [ (gogoproto.jsontag) = "disableOpenAPIValidation" ]; + bool keepHistory = 15 [ (gogoproto.jsontag) = "keepHistory" ]; +} + +message YamlExtra { + bool force = 1 [ (gogoproto.jsontag) = "force" ]; + bool disableOpenAPIValidation = 2 + [ (gogoproto.jsontag) = "disableOpenAPIValidation" ]; +} + +message ArtifactExtra { + HelmExtra helm = 1 [ (gogoproto.moretags) = "patchStrategy:\"replace\"" ]; + sint32 maxHistory = 2 [ (gogoproto.moretags) = "patchStrategy:\"replace\"" ]; + RepoArtifactMeta repo = 3 + [ (gogoproto.moretags) = "patchStrategy:\"replace\"" ]; + PipelineMeta pipeline = 4 + [ (gogoproto.moretags) = "patchStrategy:\"replace\"" ]; + bool usePlacementName = 5 + [ (gogoproto.moretags) = "patchStrategy:\"replace\"" ]; + YamlExtra yaml = 6 [ (gogoproto.moretags) = "patchStrategy:\"replace\"" ]; +} + +enum HealthStatus { + // disable enum prefix + option (gogoproto.goproto_enum_prefix) = false; + + UNKNOWN = 0; + HEALTHY = 1; + UNHEALTHY = 2; + INACTIVE = 3; +} + +message HealthCheck { + HealthStatus status = 1; + google.protobuf.Timestamp lastUpdated = 2 + [ (gogoproto.stdtime) = true, (gogoproto.nullable) = false ]; + string comment = 3; +} + +message Image { + string repository = 1 + [ (gogoproto.nullable) = true, (gogoproto.jsontag) = "repository" ]; + string tag = 2 [ (gogoproto.nullable) = true, (gogoproto.jsontag) = "tag" ]; + string pullPolicy = 3 + [ (gogoproto.nullable) = true, (gogoproto.jsontag) = "pullPolicy" ]; + string digest = 4 + [ (gogoproto.nullable) = true, (gogoproto.jsontag) = "digest" ]; +} + +message VolumeMount { + string name = 1 [ (gogoproto.nullable) = true ]; + string mountPath = 2 [ (gogoproto.nullable) = true ]; +} + +message InitContainer { + string name = 1 [ (gogoproto.nullable) = true ]; + string image = 2 [ (gogoproto.nullable) = true ]; + string imagePullPolicy = 3 [ (gogoproto.nullable) = true ]; + repeated VolumeMount volumeMounts = 4 [ (gogoproto.nullable) = true ]; +} + +message Restic { + string podVolumePath = 1 [ (gogoproto.nullable) = true ]; + bool privileged = 2 [ (gogoproto.nullable) = true ]; +} + +enum ShareMode { + // disable enum prefix + option (gogoproto.goproto_enum_prefix) = false; + + ShareModeNotSet = 0; + ALL = 1; + CUSTOM = 2; +} + +message ProjectTaskSet { + string taskSetID = 1; + string projectID = 2 [ + (gogoproto.jsontag) = "project_id" + ]; +} \ No newline at end of file diff --git a/components/common/proto/types/config/constants.go b/components/common/proto/types/config/constants.go new file mode 100644 index 0000000..c0bf021 --- /dev/null +++ b/components/common/proto/types/config/constants.go @@ -0,0 +1,22 @@ +package config + +const ( + ConfigGroup = "config.rafay.dev/v3" + OverrideScope = "rafay.dev/overrideScope" + OverrideType = "rafay.dev/overrideType" + OverrideCluster = "rafay.dev/overrideCluster" + OverrideScopeSpecificCluster = "cluster" + KubeDefaultNamespace = "default" + + LogEndpoint = "rafay.dev/logging" +) + +// Kind is kind of resource +type Kind = string + +const ( + NamespaceKind Kind = "Namespace" + NamespaceListKind Kind = "NamespaceList" + PlacementKind Kind = "Placement" + PlacementListKind Kind = "PlacementList" +) diff --git a/components/common/proto/types/config/namespace.pb.go b/components/common/proto/types/config/namespace.pb.go new file mode 100644 index 0000000..4465049 --- /dev/null +++ b/components/common/proto/types/config/namespace.pb.go @@ -0,0 +1,1243 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc (unknown) +// source: proto/types/config/namespace.proto + +package config + +import ( + v3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/commonpb/v3" + controller "github.com/RafaySystems/rcloud-base/components/common/proto/types/controller" + _ "github.com/gogo/protobuf/gogoproto" + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type NamespaceStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + GeneratedName string `protobuf:"bytes,1,opt,name=generatedName,proto3" json:"generatedName,omitempty"` + PublishPending bool `protobuf:"varint,2,opt,name=publishPending,proto3" json:"publishPending,omitempty"` + LastPublishedRevision int64 `protobuf:"zigzag64,3,opt,name=lastPublishedRevision,proto3" json:"lastPublishedRevision,omitempty"` + AssignedClusters []*ClusterMeta `protobuf:"bytes,4,rep,name=assignedClusters,proto3" json:"assignedClusters,omitempty"` + DeployedClusters []*ClusterMeta `protobuf:"bytes,5,rep,name=deployedClusters,proto3" json:"deployedClusters,omitempty"` + FailedClusters []*ClusterMeta `protobuf:"bytes,6,rep,name=failedClusters,proto3" json:"failedClusters,omitempty"` + ReadyClusters []*ClusterMeta `protobuf:"bytes,7,rep,name=readyClusters,proto3" json:"readyClusters,omitempty"` + DriftedClusters []*ClusterMeta `protobuf:"bytes,8,rep,name=driftedClusters,proto3" json:"driftedClusters,omitempty"` + Conditions []*WorkloadSnapshotCondition `protobuf:"bytes,9,rep,name=conditions,proto3" json:"conditions,omitempty"` + IsDirty bool `protobuf:"varint,10,opt,name=isDirty,proto3" json:"isDirty,omitempty"` +} + +func (x *NamespaceStatus) Reset() { + *x = NamespaceStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_config_namespace_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NamespaceStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NamespaceStatus) ProtoMessage() {} + +func (x *NamespaceStatus) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_config_namespace_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NamespaceStatus.ProtoReflect.Descriptor instead. +func (*NamespaceStatus) Descriptor() ([]byte, []int) { + return file_proto_types_config_namespace_proto_rawDescGZIP(), []int{0} +} + +func (x *NamespaceStatus) GetGeneratedName() string { + if x != nil { + return x.GeneratedName + } + return "" +} + +func (x *NamespaceStatus) GetPublishPending() bool { + if x != nil { + return x.PublishPending + } + return false +} + +func (x *NamespaceStatus) GetLastPublishedRevision() int64 { + if x != nil { + return x.LastPublishedRevision + } + return 0 +} + +func (x *NamespaceStatus) GetAssignedClusters() []*ClusterMeta { + if x != nil { + return x.AssignedClusters + } + return nil +} + +func (x *NamespaceStatus) GetDeployedClusters() []*ClusterMeta { + if x != nil { + return x.DeployedClusters + } + return nil +} + +func (x *NamespaceStatus) GetFailedClusters() []*ClusterMeta { + if x != nil { + return x.FailedClusters + } + return nil +} + +func (x *NamespaceStatus) GetReadyClusters() []*ClusterMeta { + if x != nil { + return x.ReadyClusters + } + return nil +} + +func (x *NamespaceStatus) GetDriftedClusters() []*ClusterMeta { + if x != nil { + return x.DriftedClusters + } + return nil +} + +func (x *NamespaceStatus) GetConditions() []*WorkloadSnapshotCondition { + if x != nil { + return x.Conditions + } + return nil +} + +func (x *NamespaceStatus) GetIsDirty() bool { + if x != nil { + return x.IsDirty + } + return false +} + +type LimitRangeItem struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + MaxCpu float32 `protobuf:"fixed32,1,opt,name=maxCpu,proto3" json:"maxCpu,omitempty"` + MaxMemory float32 `protobuf:"fixed32,2,opt,name=maxMemory,proto3" json:"maxMemory,omitempty"` + MinCpu float32 `protobuf:"fixed32,3,opt,name=minCpu,proto3" json:"minCpu,omitempty"` + MinMemory float32 `protobuf:"fixed32,4,opt,name=minMemory,proto3" json:"minMemory,omitempty"` + DefaultCpu float32 `protobuf:"fixed32,5,opt,name=defaultCpu,proto3" json:"defaultCpu,omitempty"` + DefaultMemory float32 `protobuf:"fixed32,6,opt,name=defaultMemory,proto3" json:"defaultMemory,omitempty"` + DefaultRequestCpu float32 `protobuf:"fixed32,7,opt,name=defaultRequestCpu,proto3" json:"defaultRequestCpu,omitempty"` + DefaultRequestMemory float32 `protobuf:"fixed32,8,opt,name=defaultRequestMemory,proto3" json:"defaultRequestMemory,omitempty"` + MaxLimitRequestRatioCpu float32 `protobuf:"fixed32,9,opt,name=maxLimitRequestRatioCpu,proto3" json:"maxLimitRequestRatioCpu,omitempty"` + MaxLimitRequestRatioMemory float32 `protobuf:"fixed32,10,opt,name=maxLimitRequestRatioMemory,proto3" json:"maxLimitRequestRatioMemory,omitempty"` +} + +func (x *LimitRangeItem) Reset() { + *x = LimitRangeItem{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_config_namespace_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LimitRangeItem) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LimitRangeItem) ProtoMessage() {} + +func (x *LimitRangeItem) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_config_namespace_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LimitRangeItem.ProtoReflect.Descriptor instead. +func (*LimitRangeItem) Descriptor() ([]byte, []int) { + return file_proto_types_config_namespace_proto_rawDescGZIP(), []int{1} +} + +func (x *LimitRangeItem) GetMaxCpu() float32 { + if x != nil { + return x.MaxCpu + } + return 0 +} + +func (x *LimitRangeItem) GetMaxMemory() float32 { + if x != nil { + return x.MaxMemory + } + return 0 +} + +func (x *LimitRangeItem) GetMinCpu() float32 { + if x != nil { + return x.MinCpu + } + return 0 +} + +func (x *LimitRangeItem) GetMinMemory() float32 { + if x != nil { + return x.MinMemory + } + return 0 +} + +func (x *LimitRangeItem) GetDefaultCpu() float32 { + if x != nil { + return x.DefaultCpu + } + return 0 +} + +func (x *LimitRangeItem) GetDefaultMemory() float32 { + if x != nil { + return x.DefaultMemory + } + return 0 +} + +func (x *LimitRangeItem) GetDefaultRequestCpu() float32 { + if x != nil { + return x.DefaultRequestCpu + } + return 0 +} + +func (x *LimitRangeItem) GetDefaultRequestMemory() float32 { + if x != nil { + return x.DefaultRequestMemory + } + return 0 +} + +func (x *LimitRangeItem) GetMaxLimitRequestRatioCpu() float32 { + if x != nil { + return x.MaxLimitRequestRatioCpu + } + return 0 +} + +func (x *LimitRangeItem) GetMaxLimitRequestRatioMemory() float32 { + if x != nil { + return x.MaxLimitRequestRatioMemory + } + return 0 +} + +type LimitRange struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PodLimits *LimitRangeItem `protobuf:"bytes,1,opt,name=podLimits,proto3" json:"podLimits,omitempty"` + ContainerLimits *LimitRangeItem `protobuf:"bytes,2,opt,name=containerLimits,proto3" json:"containerLimits,omitempty"` +} + +func (x *LimitRange) Reset() { + *x = LimitRange{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_config_namespace_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LimitRange) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LimitRange) ProtoMessage() {} + +func (x *LimitRange) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_config_namespace_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LimitRange.ProtoReflect.Descriptor instead. +func (*LimitRange) Descriptor() ([]byte, []int) { + return file_proto_types_config_namespace_proto_rawDescGZIP(), []int{2} +} + +func (x *LimitRange) GetPodLimits() *LimitRangeItem { + if x != nil { + return x.PodLimits + } + return nil +} + +func (x *LimitRange) GetContainerLimits() *LimitRangeItem { + if x != nil { + return x.ContainerLimits + } + return nil +} + +type ResourceQuota struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + CpuRequests float32 `protobuf:"fixed32,1,opt,name=cpuRequests,proto3" json:"cpuRequests,omitempty"` + MemoryRequests float32 `protobuf:"fixed32,2,opt,name=memoryRequests,proto3" json:"memoryRequests,omitempty"` + CpuLimits float32 `protobuf:"fixed32,3,opt,name=cpuLimits,proto3" json:"cpuLimits,omitempty"` + MemoryLimits float32 `protobuf:"fixed32,4,opt,name=memoryLimits,proto3" json:"memoryLimits,omitempty"` +} + +func (x *ResourceQuota) Reset() { + *x = ResourceQuota{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_config_namespace_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ResourceQuota) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResourceQuota) ProtoMessage() {} + +func (x *ResourceQuota) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_config_namespace_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResourceQuota.ProtoReflect.Descriptor instead. +func (*ResourceQuota) Descriptor() ([]byte, []int) { + return file_proto_types_config_namespace_proto_rawDescGZIP(), []int{3} +} + +func (x *ResourceQuota) GetCpuRequests() float32 { + if x != nil { + return x.CpuRequests + } + return 0 +} + +func (x *ResourceQuota) GetMemoryRequests() float32 { + if x != nil { + return x.MemoryRequests + } + return 0 +} + +func (x *ResourceQuota) GetCpuLimits() float32 { + if x != nil { + return x.CpuLimits + } + return 0 +} + +func (x *ResourceQuota) GetMemoryLimits() float32 { + if x != nil { + return x.MemoryLimits + } + return 0 +} + +// NamespaceStatusTemplate is the template for sending namespace status +type NamespaceStatusTemplate struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ObjectMeta *v1.ObjectMeta `protobuf:"bytes,1,opt,name=objectMeta,proto3" json:"objectMeta,omitempty"` + Status *controller.NamespaceStatus `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *NamespaceStatusTemplate) Reset() { + *x = NamespaceStatusTemplate{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_config_namespace_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NamespaceStatusTemplate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NamespaceStatusTemplate) ProtoMessage() {} + +func (x *NamespaceStatusTemplate) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_config_namespace_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NamespaceStatusTemplate.ProtoReflect.Descriptor instead. +func (*NamespaceStatusTemplate) Descriptor() ([]byte, []int) { + return file_proto_types_config_namespace_proto_rawDescGZIP(), []int{4} +} + +func (x *NamespaceStatusTemplate) GetObjectMeta() *v1.ObjectMeta { + if x != nil { + return x.ObjectMeta + } + return nil +} + +func (x *NamespaceStatusTemplate) GetStatus() *controller.NamespaceStatus { + if x != nil { + return x.Status + } + return nil +} + +// NamespaceTemplate is the template for creating namespace +type NamespaceTemplate struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ObjectMeta *v1.ObjectMeta `protobuf:"bytes,1,opt,name=objectMeta,proto3" json:"objectMeta,omitempty"` + Spec *controller.NamespaceSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` + ResourceQuota *ResourceQuota `protobuf:"bytes,4,opt,name=resourceQuota,proto3" json:"resourceQuota,omitempty"` + LimitRange *LimitRange `protobuf:"bytes,5,opt,name=limitRange,proto3" json:"limitRange,omitempty"` + Placement *PlacementSpec `protobuf:"bytes,6,opt,name=placement,proto3" json:"placement,omitempty"` + Type string `protobuf:"bytes,7,opt,name=type,proto3" json:"type,omitempty"` + NamespaceFromFile string `protobuf:"bytes,8,opt,name=namespaceFromFile,proto3" json:"namespaceFromFile,omitempty"` + RepoRef string `protobuf:"bytes,9,opt,name=repoRef,proto3" json:"repoRef,omitempty"` + RepoArtifactMeta *RepoArtifactMeta `protobuf:"bytes,10,opt,name=repoArtifactMeta,proto3" json:"repoArtifactMeta,omitempty"` + NamespaceFromRepo string `protobuf:"bytes,11,opt,name=namespaceFromRepo,proto3" json:"namespaceFromRepo,omitempty"` +} + +func (x *NamespaceTemplate) Reset() { + *x = NamespaceTemplate{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_config_namespace_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NamespaceTemplate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NamespaceTemplate) ProtoMessage() {} + +func (x *NamespaceTemplate) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_config_namespace_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NamespaceTemplate.ProtoReflect.Descriptor instead. +func (*NamespaceTemplate) Descriptor() ([]byte, []int) { + return file_proto_types_config_namespace_proto_rawDescGZIP(), []int{5} +} + +func (x *NamespaceTemplate) GetObjectMeta() *v1.ObjectMeta { + if x != nil { + return x.ObjectMeta + } + return nil +} + +func (x *NamespaceTemplate) GetSpec() *controller.NamespaceSpec { + if x != nil { + return x.Spec + } + return nil +} + +func (x *NamespaceTemplate) GetResourceQuota() *ResourceQuota { + if x != nil { + return x.ResourceQuota + } + return nil +} + +func (x *NamespaceTemplate) GetLimitRange() *LimitRange { + if x != nil { + return x.LimitRange + } + return nil +} + +func (x *NamespaceTemplate) GetPlacement() *PlacementSpec { + if x != nil { + return x.Placement + } + return nil +} + +func (x *NamespaceTemplate) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *NamespaceTemplate) GetNamespaceFromFile() string { + if x != nil { + return x.NamespaceFromFile + } + return "" +} + +func (x *NamespaceTemplate) GetRepoRef() string { + if x != nil { + return x.RepoRef + } + return "" +} + +func (x *NamespaceTemplate) GetRepoArtifactMeta() *RepoArtifactMeta { + if x != nil { + return x.RepoArtifactMeta + } + return nil +} + +func (x *NamespaceTemplate) GetNamespaceFromRepo() string { + if x != nil { + return x.NamespaceFromRepo + } + return "" +} + +// Namespace represets a kubernetes namespace along with all the objects +// whose lifecycle is tied to the kubernetes namespace lifecycle +type Namespace struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ApiVersion string `protobuf:"bytes,1,opt,name=apiVersion,proto3" json:"apiVersion,omitempty"` + Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"` + Metadata *v3.Metadata `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *NamespaceTemplate `protobuf:"bytes,4,opt,name=spec,proto3" json:"spec,omitempty"` + Status *NamespaceStatus `protobuf:"bytes,5,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *Namespace) Reset() { + *x = Namespace{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_config_namespace_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Namespace) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Namespace) ProtoMessage() {} + +func (x *Namespace) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_config_namespace_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Namespace.ProtoReflect.Descriptor instead. +func (*Namespace) Descriptor() ([]byte, []int) { + return file_proto_types_config_namespace_proto_rawDescGZIP(), []int{6} +} + +func (x *Namespace) GetApiVersion() string { + if x != nil { + return x.ApiVersion + } + return "" +} + +func (x *Namespace) GetKind() string { + if x != nil { + return x.Kind + } + return "" +} + +func (x *Namespace) GetMetadata() *v3.Metadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *Namespace) GetSpec() *NamespaceTemplate { + if x != nil { + return x.Spec + } + return nil +} + +func (x *Namespace) GetStatus() *NamespaceStatus { + if x != nil { + return x.Status + } + return nil +} + +// NamespaceList is a list of namespaces +type NamespaceList struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ApiVersion string `protobuf:"bytes,1,opt,name=apiVersion,proto3" json:"apiVersion,omitempty"` + Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"` + Metadata *v3.ListMetadata `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` + Items []*Namespace `protobuf:"bytes,4,rep,name=items,proto3" json:"items,omitempty"` +} + +func (x *NamespaceList) Reset() { + *x = NamespaceList{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_config_namespace_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NamespaceList) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NamespaceList) ProtoMessage() {} + +func (x *NamespaceList) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_config_namespace_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NamespaceList.ProtoReflect.Descriptor instead. +func (*NamespaceList) Descriptor() ([]byte, []int) { + return file_proto_types_config_namespace_proto_rawDescGZIP(), []int{7} +} + +func (x *NamespaceList) GetApiVersion() string { + if x != nil { + return x.ApiVersion + } + return "" +} + +func (x *NamespaceList) GetKind() string { + if x != nil { + return x.Kind + } + return "" +} + +func (x *NamespaceList) GetMetadata() *v3.ListMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *NamespaceList) GetItems() []*Namespace { + if x != nil { + return x.Items + } + return nil +} + +var File_proto_types_config_namespace_proto protoreflect.FileDescriptor + +var file_proto_types_config_namespace_proto_rawDesc = []byte{ + 0x0a, 0x22, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, + 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, + 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x34, 0x6b, 0x38, 0x73, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x6d, 0x61, + 0x63, 0x68, 0x69, 0x6e, 0x65, 0x72, 0x79, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x61, 0x70, 0x69, 0x73, + 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, + 0x65, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x70, 0x62, 0x2f, 0x76, + 0x33, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x22, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2f, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, + 0x70, 0x65, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2f, 0x63, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, + 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd2, 0x0a, 0x0a, 0x0f, 0x4e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x4b, 0x0a, 0x0d, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x25, 0x92, 0x41, 0x02, 0x40, 0x01, 0xf2, 0xde, 0x1f, 0x1c, 0x70, 0x67, 0x3a, + 0x22, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x2c, + 0x75, 0x73, 0x65, 0x5f, 0x7a, 0x65, 0x72, 0x6f, 0x22, 0x52, 0x0d, 0x67, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x65, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x5b, 0x0a, 0x0e, 0x70, 0x75, 0x62, 0x6c, + 0x69, 0x73, 0x68, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, + 0x42, 0x33, 0xea, 0xde, 0x1f, 0x0e, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x50, 0x65, 0x6e, + 0x64, 0x69, 0x6e, 0x67, 0xf2, 0xde, 0x1f, 0x1d, 0x70, 0x67, 0x3a, 0x22, 0x70, 0x75, 0x62, 0x6c, + 0x69, 0x73, 0x68, 0x5f, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x2c, 0x75, 0x73, 0x65, 0x5f, + 0x7a, 0x65, 0x72, 0x6f, 0x22, 0x52, 0x0e, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x50, 0x65, + 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x5f, 0x0a, 0x15, 0x6c, 0x61, 0x73, 0x74, 0x50, 0x75, 0x62, + 0x6c, 0x69, 0x73, 0x68, 0x65, 0x64, 0x52, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x12, 0x42, 0x29, 0xf2, 0xde, 0x1f, 0x25, 0x70, 0x67, 0x3a, 0x22, 0x6c, 0x61, + 0x73, 0x74, 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x76, + 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x2c, 0x75, 0x73, 0x65, 0x5f, 0x7a, 0x65, 0x72, 0x6f, 0x22, 0x52, + 0x15, 0x6c, 0x61, 0x73, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x64, 0x52, 0x65, + 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0xa8, 0x01, 0x0a, 0x10, 0x61, 0x73, 0x73, 0x69, 0x67, + 0x6e, 0x65, 0x64, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x23, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x42, 0x57, 0xc8, 0xde, 0x1f, 0x00, 0xf2, 0xde, 0x1f, 0x4f, + 0x70, 0x61, 0x74, 0x63, 0x68, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x3a, 0x22, 0x6d, + 0x65, 0x72, 0x67, 0x65, 0x22, 0x20, 0x70, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x65, 0x72, 0x67, 0x65, + 0x4b, 0x65, 0x79, 0x3a, 0x22, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x44, 0x22, 0x20, + 0x70, 0x67, 0x3a, 0x22, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x63, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x73, 0x2c, 0x75, 0x73, 0x65, 0x5f, 0x7a, 0x65, 0x72, 0x6f, 0x22, 0x52, + 0x10, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x73, 0x12, 0xa8, 0x01, 0x0a, 0x10, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x64, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x72, + 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4d, 0x65, 0x74, + 0x61, 0x42, 0x57, 0xc8, 0xde, 0x1f, 0x00, 0xf2, 0xde, 0x1f, 0x4f, 0x70, 0x61, 0x74, 0x63, 0x68, + 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x3a, 0x22, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x22, + 0x20, 0x70, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x4b, 0x65, 0x79, 0x3a, 0x22, + 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x44, 0x22, 0x20, 0x70, 0x67, 0x3a, 0x22, 0x64, + 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x64, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, + 0x2c, 0x75, 0x73, 0x65, 0x5f, 0x7a, 0x65, 0x72, 0x6f, 0x22, 0x52, 0x10, 0x64, 0x65, 0x70, 0x6c, + 0x6f, 0x79, 0x65, 0x64, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, 0xa2, 0x01, 0x0a, + 0x0e, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, + 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, + 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x42, 0x55, 0xc8, 0xde, 0x1f, 0x00, + 0xf2, 0xde, 0x1f, 0x4d, 0x70, 0x61, 0x74, 0x63, 0x68, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, + 0x79, 0x3a, 0x22, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x22, 0x20, 0x70, 0x61, 0x74, 0x63, 0x68, 0x4d, + 0x65, 0x72, 0x67, 0x65, 0x4b, 0x65, 0x79, 0x3a, 0x22, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x49, 0x44, 0x22, 0x20, 0x70, 0x67, 0x3a, 0x22, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x5f, 0x63, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x2c, 0x75, 0x73, 0x65, 0x5f, 0x7a, 0x65, 0x72, 0x6f, + 0x22, 0x52, 0x0e, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x73, 0x12, 0x9f, 0x01, 0x0a, 0x0d, 0x72, 0x65, 0x61, 0x64, 0x79, 0x43, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x72, 0x61, 0x66, 0x61, + 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x42, 0x54, + 0xc8, 0xde, 0x1f, 0x00, 0xf2, 0xde, 0x1f, 0x4c, 0x70, 0x61, 0x74, 0x63, 0x68, 0x53, 0x74, 0x72, + 0x61, 0x74, 0x65, 0x67, 0x79, 0x3a, 0x22, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x22, 0x20, 0x70, 0x61, + 0x74, 0x63, 0x68, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x4b, 0x65, 0x79, 0x3a, 0x22, 0x63, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x49, 0x44, 0x22, 0x20, 0x70, 0x67, 0x3a, 0x22, 0x72, 0x65, 0x61, 0x64, + 0x79, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x2c, 0x75, 0x73, 0x65, 0x5f, 0x7a, + 0x65, 0x72, 0x6f, 0x22, 0x52, 0x0d, 0x72, 0x65, 0x61, 0x64, 0x79, 0x43, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x73, 0x12, 0xa5, 0x01, 0x0a, 0x0f, 0x64, 0x72, 0x69, 0x66, 0x74, 0x65, 0x64, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, + 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4d, 0x65, + 0x74, 0x61, 0x42, 0x56, 0xc8, 0xde, 0x1f, 0x00, 0xf2, 0xde, 0x1f, 0x4e, 0x70, 0x61, 0x74, 0x63, + 0x68, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x3a, 0x22, 0x6d, 0x65, 0x72, 0x67, 0x65, + 0x22, 0x20, 0x70, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x4b, 0x65, 0x79, 0x3a, + 0x22, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x44, 0x22, 0x20, 0x70, 0x67, 0x3a, 0x22, + 0x64, 0x72, 0x69, 0x66, 0x74, 0x65, 0x64, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, + 0x2c, 0x75, 0x73, 0x65, 0x5f, 0x7a, 0x65, 0x72, 0x6f, 0x22, 0x52, 0x0f, 0x64, 0x72, 0x69, 0x66, + 0x74, 0x65, 0x64, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, 0xad, 0x01, 0x0a, 0x0a, + 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x31, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, + 0x61, 0x64, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x42, 0x5a, 0xc8, 0xde, 0x1f, 0x00, 0xea, 0xde, 0x1f, 0x14, 0x63, 0x6f, 0x6e, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, + 0x79, 0xf2, 0xde, 0x1f, 0x3a, 0x70, 0x61, 0x74, 0x63, 0x68, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, + 0x67, 0x79, 0x3a, 0x22, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x22, 0x20, 0x70, 0x61, 0x74, 0x63, 0x68, + 0x4d, 0x65, 0x72, 0x67, 0x65, 0x4b, 0x65, 0x79, 0x3a, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x20, + 0x70, 0x67, 0x3a, 0x22, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x52, + 0x0a, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3f, 0x0a, 0x07, 0x69, + 0x73, 0x44, 0x69, 0x72, 0x74, 0x79, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x42, 0x25, 0xea, 0xde, + 0x1f, 0x07, 0x69, 0x73, 0x44, 0x69, 0x72, 0x74, 0x79, 0xf2, 0xde, 0x1f, 0x16, 0x70, 0x67, 0x3a, + 0x22, 0x69, 0x73, 0x5f, 0x64, 0x69, 0x72, 0x74, 0x79, 0x2c, 0x75, 0x73, 0x65, 0x5f, 0x7a, 0x65, + 0x72, 0x6f, 0x22, 0x52, 0x07, 0x69, 0x73, 0x44, 0x69, 0x72, 0x74, 0x79, 0x22, 0xc9, 0x05, 0x0a, + 0x0e, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x12, + 0x2c, 0x0a, 0x06, 0x6d, 0x61, 0x78, 0x43, 0x70, 0x75, 0x18, 0x01, 0x20, 0x01, 0x28, 0x02, 0x42, + 0x14, 0xea, 0xde, 0x1f, 0x10, 0x6d, 0x61, 0x78, 0x43, 0x70, 0x75, 0x2c, 0x6f, 0x6d, 0x69, 0x74, + 0x65, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x06, 0x6d, 0x61, 0x78, 0x43, 0x70, 0x75, 0x12, 0x35, 0x0a, + 0x09, 0x6d, 0x61, 0x78, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x02, + 0x42, 0x17, 0xea, 0xde, 0x1f, 0x13, 0x6d, 0x61, 0x78, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x2c, + 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x09, 0x6d, 0x61, 0x78, 0x4d, 0x65, + 0x6d, 0x6f, 0x72, 0x79, 0x12, 0x2c, 0x0a, 0x06, 0x6d, 0x69, 0x6e, 0x43, 0x70, 0x75, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x02, 0x42, 0x14, 0xea, 0xde, 0x1f, 0x10, 0x6d, 0x69, 0x6e, 0x43, 0x70, 0x75, + 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x06, 0x6d, 0x69, 0x6e, 0x43, + 0x70, 0x75, 0x12, 0x35, 0x0a, 0x09, 0x6d, 0x69, 0x6e, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x02, 0x42, 0x17, 0xea, 0xde, 0x1f, 0x13, 0x6d, 0x69, 0x6e, 0x4d, 0x65, + 0x6d, 0x6f, 0x72, 0x79, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x09, + 0x6d, 0x69, 0x6e, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x12, 0x38, 0x0a, 0x0a, 0x64, 0x65, 0x66, + 0x61, 0x75, 0x6c, 0x74, 0x43, 0x70, 0x75, 0x18, 0x05, 0x20, 0x01, 0x28, 0x02, 0x42, 0x18, 0xea, + 0xde, 0x1f, 0x14, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x43, 0x70, 0x75, 0x2c, 0x6f, 0x6d, + 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x0a, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, + 0x43, 0x70, 0x75, 0x12, 0x41, 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x4d, 0x65, + 0x6d, 0x6f, 0x72, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x02, 0x42, 0x1b, 0xea, 0xde, 0x1f, 0x17, + 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x2c, 0x6f, 0x6d, + 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, + 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x12, 0x4d, 0x0a, 0x11, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x43, 0x70, 0x75, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x02, 0x42, 0x1f, 0xea, 0xde, 0x1f, 0x1b, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x43, 0x70, 0x75, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, + 0x74, 0x79, 0x52, 0x11, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x43, 0x70, 0x75, 0x12, 0x56, 0x0a, 0x14, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x02, 0x42, 0x22, 0xea, 0xde, 0x1f, 0x1e, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x2c, 0x6f, 0x6d, + 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x14, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x12, 0x5f, 0x0a, + 0x17, 0x6d, 0x61, 0x78, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x52, 0x61, 0x74, 0x69, 0x6f, 0x43, 0x70, 0x75, 0x18, 0x09, 0x20, 0x01, 0x28, 0x02, 0x42, 0x25, + 0xea, 0xde, 0x1f, 0x21, 0x6d, 0x61, 0x78, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x43, 0x70, 0x75, 0x2c, 0x6f, 0x6d, 0x69, 0x74, + 0x65, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x17, 0x6d, 0x61, 0x78, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x43, 0x70, 0x75, 0x12, 0x68, + 0x0a, 0x1a, 0x6d, 0x61, 0x78, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x18, 0x0a, 0x20, 0x01, + 0x28, 0x02, 0x42, 0x28, 0xea, 0xde, 0x1f, 0x24, 0x6d, 0x61, 0x78, 0x4c, 0x69, 0x6d, 0x69, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x4d, 0x65, 0x6d, 0x6f, + 0x72, 0x79, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x1a, 0x6d, 0x61, + 0x78, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x61, 0x74, + 0x69, 0x6f, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x22, 0xdc, 0x01, 0x0a, 0x0a, 0x4c, 0x69, 0x6d, + 0x69, 0x74, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x5d, 0x0a, 0x09, 0x70, 0x6f, 0x64, 0x4c, 0x69, + 0x6d, 0x69, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x72, 0x61, 0x66, + 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x49, 0x74, + 0x65, 0x6d, 0x42, 0x17, 0xea, 0xde, 0x1f, 0x13, 0x70, 0x6f, 0x64, 0x4c, 0x69, 0x6d, 0x69, 0x74, + 0x73, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x09, 0x70, 0x6f, 0x64, + 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x12, 0x6f, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, + 0x6e, 0x65, 0x72, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x26, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x61, + 0x6e, 0x67, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x42, 0x1d, 0xea, 0xde, 0x1f, 0x19, 0x63, 0x6f, 0x6e, + 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x2c, 0x6f, 0x6d, 0x69, + 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, + 0x72, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x22, 0x89, 0x02, 0x0a, 0x0d, 0x52, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x12, 0x3b, 0x0a, 0x0b, 0x63, 0x70, 0x75, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x02, 0x42, 0x19, + 0xea, 0xde, 0x1f, 0x15, 0x63, 0x70, 0x75, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x2c, + 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x0b, 0x63, 0x70, 0x75, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x12, 0x44, 0x0a, 0x0e, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x02, 0x42, 0x1c, + 0xea, 0xde, 0x1f, 0x18, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x73, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x0e, 0x6d, 0x65, + 0x6d, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x12, 0x35, 0x0a, 0x09, + 0x63, 0x70, 0x75, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x02, 0x42, + 0x17, 0xea, 0xde, 0x1f, 0x13, 0x63, 0x70, 0x75, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x2c, 0x6f, + 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x09, 0x63, 0x70, 0x75, 0x4c, 0x69, 0x6d, + 0x69, 0x74, 0x73, 0x12, 0x3e, 0x0a, 0x0c, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x4c, 0x69, 0x6d, + 0x69, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x02, 0x42, 0x1a, 0xea, 0xde, 0x1f, 0x16, 0x6d, + 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x2c, 0x6f, 0x6d, 0x69, 0x74, + 0x65, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x0c, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x4c, 0x69, 0x6d, + 0x69, 0x74, 0x73, 0x22, 0xda, 0x01, 0x0a, 0x17, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, + 0x70, 0x0a, 0x0a, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x6b, 0x38, 0x73, 0x2e, 0x69, 0x6f, 0x2e, 0x61, 0x70, 0x69, + 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x6b, 0x67, 0x2e, 0x61, 0x70, + 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x4d, 0x65, 0x74, 0x61, 0x42, 0x1e, 0xc8, 0xde, 0x1f, 0x00, 0xd0, 0xde, 0x1f, 0x01, 0xea, + 0xde, 0x1f, 0x12, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2c, 0x6f, 0x6d, 0x69, 0x74, + 0x65, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x0a, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x74, + 0x61, 0x12, 0x4d, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2b, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x4e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x08, + 0xc8, 0xde, 0x1f, 0x00, 0xd0, 0xde, 0x1f, 0x01, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x22, 0xd2, 0x07, 0x0a, 0x11, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, + 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x70, 0x0a, 0x0a, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x4d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x6b, 0x38, 0x73, + 0x2e, 0x69, 0x6f, 0x2e, 0x61, 0x70, 0x69, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x72, 0x79, + 0x2e, 0x70, 0x6b, 0x67, 0x2e, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x76, + 0x31, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x42, 0x1e, 0xc8, 0xde, + 0x1f, 0x00, 0xd0, 0xde, 0x1f, 0x01, 0xea, 0xde, 0x1f, 0x12, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x0a, 0x6f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x47, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, + 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x6c, 0x65, 0x72, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x70, 0x65, + 0x63, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0xd0, 0xde, 0x1f, 0x01, 0x52, 0x04, 0x73, 0x70, 0x65, + 0x63, 0x12, 0x72, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x51, 0x75, 0x6f, + 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, + 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x42, + 0x25, 0xea, 0xde, 0x1f, 0x17, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x51, 0x75, 0x6f, + 0x74, 0x61, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0xf2, 0xde, 0x1f, 0x06, + 0x70, 0x67, 0x3a, 0x22, 0x2d, 0x22, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x51, 0x75, 0x6f, 0x74, 0x61, 0x12, 0x66, 0x0a, 0x0a, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x61, + 0x6e, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x72, 0x61, 0x66, 0x61, + 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x22, 0xea, + 0xde, 0x1f, 0x14, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x2c, 0x6f, 0x6d, + 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0xf2, 0xde, 0x1f, 0x06, 0x70, 0x67, 0x3a, 0x22, 0x2d, + 0x22, 0x52, 0x0a, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x6e, 0x0a, + 0x09, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x25, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x50, 0x6c, 0x61, 0x63, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x53, 0x70, 0x65, 0x63, 0x42, 0x29, 0xea, 0xde, 0x1f, 0x13, 0x70, 0x6c, 0x61, + 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, + 0xf2, 0xde, 0x1f, 0x0e, 0x70, 0x67, 0x3a, 0x22, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x22, 0x52, 0x09, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x33, 0x0a, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1f, 0xea, 0xde, 0x1f, + 0x0e, 0x74, 0x79, 0x70, 0x65, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0xf2, + 0xde, 0x1f, 0x09, 0x70, 0x67, 0x3a, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x52, 0x04, 0x74, 0x79, + 0x70, 0x65, 0x12, 0x57, 0x0a, 0x11, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x46, + 0x72, 0x6f, 0x6d, 0x46, 0x69, 0x6c, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xea, + 0xde, 0x1f, 0x1b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x46, 0x72, 0x6f, 0x6d, + 0x46, 0x69, 0x6c, 0x65, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0xf2, 0xde, + 0x1f, 0x06, 0x70, 0x67, 0x3a, 0x22, 0x2d, 0x22, 0x52, 0x11, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x46, 0x72, 0x6f, 0x6d, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x3f, 0x0a, 0x07, 0x72, + 0x65, 0x70, 0x6f, 0x52, 0x65, 0x66, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x25, 0xea, 0xde, + 0x1f, 0x11, 0x72, 0x65, 0x70, 0x6f, 0x52, 0x65, 0x66, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, + 0x70, 0x74, 0x79, 0xf2, 0xde, 0x1f, 0x0c, 0x70, 0x67, 0x3a, 0x22, 0x72, 0x65, 0x70, 0x6f, 0x52, + 0x65, 0x66, 0x22, 0x52, 0x07, 0x72, 0x65, 0x70, 0x6f, 0x52, 0x65, 0x66, 0x12, 0x8d, 0x01, 0x0a, + 0x10, 0x72, 0x65, 0x70, 0x6f, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x4d, 0x65, 0x74, + 0x61, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, + 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x4d, 0x65, 0x74, + 0x61, 0x42, 0x37, 0xea, 0xde, 0x1f, 0x1a, 0x72, 0x65, 0x70, 0x6f, 0x41, 0x72, 0x74, 0x69, 0x66, + 0x61, 0x63, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, + 0x79, 0xf2, 0xde, 0x1f, 0x15, 0x70, 0x67, 0x3a, 0x22, 0x72, 0x65, 0x70, 0x6f, 0x41, 0x72, 0x74, + 0x69, 0x66, 0x61, 0x63, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x22, 0x52, 0x10, 0x72, 0x65, 0x70, 0x6f, + 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x57, 0x0a, 0x11, + 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x46, 0x72, 0x6f, 0x6d, 0x52, 0x65, 0x70, + 0x6f, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xea, 0xde, 0x1f, 0x1b, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x46, 0x72, 0x6f, 0x6d, 0x52, 0x65, 0x70, 0x6f, 0x2c, 0x6f, + 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0xf2, 0xde, 0x1f, 0x06, 0x70, 0x67, 0x3a, 0x22, + 0x2d, 0x22, 0x52, 0x11, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x46, 0x72, 0x6f, + 0x6d, 0x52, 0x65, 0x70, 0x6f, 0x22, 0x89, 0x04, 0x0a, 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x12, 0x65, 0x0a, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x45, 0x92, 0x41, 0x42, 0x2a, 0x0b, 0x41, 0x50, + 0x49, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0x1b, 0x41, 0x50, 0x49, 0x20, 0x56, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, 0x14, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6b, + 0x38, 0x73, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x69, 0x6f, 0x2f, 0x76, 0x33, 0x40, 0x01, 0x52, 0x0a, + 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x4f, 0x0a, 0x04, 0x6b, 0x69, + 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x3b, 0x92, 0x41, 0x38, 0x2a, 0x04, 0x4b, + 0x69, 0x6e, 0x64, 0x32, 0x19, 0x4b, 0x69, 0x6e, 0x64, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, + 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, 0x13, + 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x4c, + 0x69, 0x73, 0x74, 0x40, 0x01, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x68, 0x0a, 0x08, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, + 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x42, 0x27, 0x92, 0x41, 0x24, 0x2a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x32, 0x18, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x20, 0x6f, 0x66, 0x20, 0x74, + 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x50, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x4e, 0x61, 0x6d, + 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x42, 0x11, + 0xc8, 0xde, 0x1f, 0x00, 0xf2, 0xde, 0x1f, 0x09, 0x70, 0x67, 0x3a, 0x22, 0x73, 0x70, 0x65, 0x63, + 0x22, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x45, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, + 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x3a, 0x41, + 0x92, 0x41, 0x3e, 0x0a, 0x3c, 0x2a, 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x32, 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0xd2, 0x01, 0x0a, 0x61, 0x70, + 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0xd2, 0x01, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0xd2, + 0x01, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xd2, 0x01, 0x04, 0x73, 0x70, 0x65, + 0x63, 0x22, 0xf8, 0x02, 0x0a, 0x0d, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4c, + 0x69, 0x73, 0x74, 0x12, 0x6a, 0x0a, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x4a, 0x92, 0x41, 0x47, 0x2a, 0x0b, 0x41, 0x50, + 0x49, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0x20, 0x41, 0x50, 0x49, 0x20, 0x56, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x69, + 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, 0x14, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x6b, 0x38, 0x73, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x69, 0x6f, 0x2f, 0x76, + 0x33, 0x40, 0x01, 0x52, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, + 0x49, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x35, 0x92, + 0x41, 0x32, 0x2a, 0x04, 0x4b, 0x69, 0x6e, 0x64, 0x32, 0x19, 0x4b, 0x69, 0x6e, 0x64, 0x20, 0x6f, + 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x3a, 0x0d, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4c, 0x69, + 0x73, 0x74, 0x40, 0x01, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x77, 0x0a, 0x08, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x72, + 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x32, 0x92, 0x41, 0x2f, 0x2a, 0x0c, 0x4c, 0x69, 0x73, 0x74, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x32, 0x1d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x72, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x40, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x12, 0x37, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x4e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x42, 0xf2, 0x01, 0x0a, + 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x0e, 0x4e, 0x61, 0x6d, + 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x48, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x61, 0x66, 0x61, 0x79, 0x53, + 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x2f, 0x72, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x62, 0x61, + 0x73, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0xa2, 0x02, 0x04, 0x52, 0x44, 0x54, 0x43, 0xaa, 0x02, + 0x16, 0x52, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x44, 0x65, 0x76, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x73, + 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0xca, 0x02, 0x16, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, + 0x44, 0x65, 0x76, 0x5c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x5c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0xe2, 0x02, 0x22, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x54, 0x79, 0x70, + 0x65, 0x73, 0x5c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x19, 0x52, 0x61, 0x66, 0x61, 0x79, 0x3a, 0x3a, 0x44, + 0x65, 0x76, 0x3a, 0x3a, 0x54, 0x79, 0x70, 0x65, 0x73, 0x3a, 0x3a, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_proto_types_config_namespace_proto_rawDescOnce sync.Once + file_proto_types_config_namespace_proto_rawDescData = file_proto_types_config_namespace_proto_rawDesc +) + +func file_proto_types_config_namespace_proto_rawDescGZIP() []byte { + file_proto_types_config_namespace_proto_rawDescOnce.Do(func() { + file_proto_types_config_namespace_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_types_config_namespace_proto_rawDescData) + }) + return file_proto_types_config_namespace_proto_rawDescData +} + +var file_proto_types_config_namespace_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_proto_types_config_namespace_proto_goTypes = []interface{}{ + (*NamespaceStatus)(nil), // 0: rafay.dev.types.config.NamespaceStatus + (*LimitRangeItem)(nil), // 1: rafay.dev.types.config.LimitRangeItem + (*LimitRange)(nil), // 2: rafay.dev.types.config.LimitRange + (*ResourceQuota)(nil), // 3: rafay.dev.types.config.ResourceQuota + (*NamespaceStatusTemplate)(nil), // 4: rafay.dev.types.config.NamespaceStatusTemplate + (*NamespaceTemplate)(nil), // 5: rafay.dev.types.config.NamespaceTemplate + (*Namespace)(nil), // 6: rafay.dev.types.config.Namespace + (*NamespaceList)(nil), // 7: rafay.dev.types.config.NamespaceList + (*ClusterMeta)(nil), // 8: rafay.dev.types.config.ClusterMeta + (*WorkloadSnapshotCondition)(nil), // 9: rafay.dev.types.config.WorkloadSnapshotCondition + (*v1.ObjectMeta)(nil), // 10: k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta + (*controller.NamespaceStatus)(nil), // 11: rafay.dev.types.controller.NamespaceStatus + (*controller.NamespaceSpec)(nil), // 12: rafay.dev.types.controller.NamespaceSpec + (*PlacementSpec)(nil), // 13: rafay.dev.types.config.PlacementSpec + (*RepoArtifactMeta)(nil), // 14: rafay.dev.types.config.RepoArtifactMeta + (*v3.Metadata)(nil), // 15: rafay.dev.types.common.v3.Metadata + (*v3.ListMetadata)(nil), // 16: rafay.dev.types.common.v3.ListMetadata +} +var file_proto_types_config_namespace_proto_depIdxs = []int32{ + 8, // 0: rafay.dev.types.config.NamespaceStatus.assignedClusters:type_name -> rafay.dev.types.config.ClusterMeta + 8, // 1: rafay.dev.types.config.NamespaceStatus.deployedClusters:type_name -> rafay.dev.types.config.ClusterMeta + 8, // 2: rafay.dev.types.config.NamespaceStatus.failedClusters:type_name -> rafay.dev.types.config.ClusterMeta + 8, // 3: rafay.dev.types.config.NamespaceStatus.readyClusters:type_name -> rafay.dev.types.config.ClusterMeta + 8, // 4: rafay.dev.types.config.NamespaceStatus.driftedClusters:type_name -> rafay.dev.types.config.ClusterMeta + 9, // 5: rafay.dev.types.config.NamespaceStatus.conditions:type_name -> rafay.dev.types.config.WorkloadSnapshotCondition + 1, // 6: rafay.dev.types.config.LimitRange.podLimits:type_name -> rafay.dev.types.config.LimitRangeItem + 1, // 7: rafay.dev.types.config.LimitRange.containerLimits:type_name -> rafay.dev.types.config.LimitRangeItem + 10, // 8: rafay.dev.types.config.NamespaceStatusTemplate.objectMeta:type_name -> k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta + 11, // 9: rafay.dev.types.config.NamespaceStatusTemplate.status:type_name -> rafay.dev.types.controller.NamespaceStatus + 10, // 10: rafay.dev.types.config.NamespaceTemplate.objectMeta:type_name -> k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta + 12, // 11: rafay.dev.types.config.NamespaceTemplate.spec:type_name -> rafay.dev.types.controller.NamespaceSpec + 3, // 12: rafay.dev.types.config.NamespaceTemplate.resourceQuota:type_name -> rafay.dev.types.config.ResourceQuota + 2, // 13: rafay.dev.types.config.NamespaceTemplate.limitRange:type_name -> rafay.dev.types.config.LimitRange + 13, // 14: rafay.dev.types.config.NamespaceTemplate.placement:type_name -> rafay.dev.types.config.PlacementSpec + 14, // 15: rafay.dev.types.config.NamespaceTemplate.repoArtifactMeta:type_name -> rafay.dev.types.config.RepoArtifactMeta + 15, // 16: rafay.dev.types.config.Namespace.metadata:type_name -> rafay.dev.types.common.v3.Metadata + 5, // 17: rafay.dev.types.config.Namespace.spec:type_name -> rafay.dev.types.config.NamespaceTemplate + 0, // 18: rafay.dev.types.config.Namespace.status:type_name -> rafay.dev.types.config.NamespaceStatus + 16, // 19: rafay.dev.types.config.NamespaceList.metadata:type_name -> rafay.dev.types.common.v3.ListMetadata + 6, // 20: rafay.dev.types.config.NamespaceList.items:type_name -> rafay.dev.types.config.Namespace + 21, // [21:21] is the sub-list for method output_type + 21, // [21:21] is the sub-list for method input_type + 21, // [21:21] is the sub-list for extension type_name + 21, // [21:21] is the sub-list for extension extendee + 0, // [0:21] is the sub-list for field type_name +} + +func init() { file_proto_types_config_namespace_proto_init() } +func file_proto_types_config_namespace_proto_init() { + if File_proto_types_config_namespace_proto != nil { + return + } + file_proto_types_config_config_proto_init() + file_proto_types_config_placement_proto_init() + file_proto_types_config_workload_proto_init() + if !protoimpl.UnsafeEnabled { + file_proto_types_config_namespace_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NamespaceStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_config_namespace_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LimitRangeItem); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_config_namespace_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LimitRange); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_config_namespace_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResourceQuota); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_config_namespace_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NamespaceStatusTemplate); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_config_namespace_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NamespaceTemplate); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_config_namespace_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Namespace); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_config_namespace_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NamespaceList); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_proto_types_config_namespace_proto_rawDesc, + NumEnums: 0, + NumMessages: 8, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_proto_types_config_namespace_proto_goTypes, + DependencyIndexes: file_proto_types_config_namespace_proto_depIdxs, + MessageInfos: file_proto_types_config_namespace_proto_msgTypes, + }.Build() + File_proto_types_config_namespace_proto = out.File + file_proto_types_config_namespace_proto_rawDesc = nil + file_proto_types_config_namespace_proto_goTypes = nil + file_proto_types_config_namespace_proto_depIdxs = nil +} diff --git a/components/common/proto/types/config/namespace.proto b/components/common/proto/types/config/namespace.proto new file mode 100644 index 0000000..0638e97 --- /dev/null +++ b/components/common/proto/types/config/namespace.proto @@ -0,0 +1,211 @@ +syntax = "proto3"; +package rafay.dev.types.config; + +import "protoc-gen-openapiv2/options/annotations.proto"; +import "gogoproto/gogo.proto"; +import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; +import "proto/types/commonpb/v3/common.proto"; +import "proto/types/config/config.proto"; +import "proto/types/config/placement.proto"; +import "proto/types/config/workload.proto"; +import "proto/types/controller/cluster_controller.proto"; + +message NamespaceStatus { + string generatedName = 1 [ + (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + read_only : true + }, + (gogoproto.moretags) = "pg:\"generated_name,use_zero\"" + ]; + bool publishPending = 2 [ + (gogoproto.moretags) = "pg:\"publish_pending,use_zero\"", + (gogoproto.jsontag) = "publishPending" + ]; + sint64 lastPublishedRevision = 3 + [ (gogoproto.moretags) = "pg:\"last_published_revision,use_zero\"" ]; + repeated rafay.dev.types.config.ClusterMeta assignedClusters = 4 [ + (gogoproto.moretags) = + "patchStrategy:\"merge\" patchMergeKey:\"clusterID\" " + "pg:\"assigned_clusters,use_zero\"", + (gogoproto.nullable) = false + ]; + repeated rafay.dev.types.config.ClusterMeta deployedClusters = 5 [ + (gogoproto.moretags) = + "patchStrategy:\"merge\" patchMergeKey:\"clusterID\" " + "pg:\"deployed_clusters,use_zero\"", + (gogoproto.nullable) = false + ]; + repeated rafay.dev.types.config.ClusterMeta failedClusters = 6 [ + (gogoproto.moretags) = + "patchStrategy:\"merge\" patchMergeKey:\"clusterID\" " + "pg:\"failed_clusters,use_zero\"", + (gogoproto.nullable) = false + ]; + repeated rafay.dev.types.config.ClusterMeta readyClusters = 7 [ + (gogoproto.moretags) = + "patchStrategy:\"merge\" patchMergeKey:\"clusterID\" " + "pg:\"ready_clusters,use_zero\"", + (gogoproto.nullable) = false + ]; + repeated rafay.dev.types.config.ClusterMeta driftedClusters = 8 [ + (gogoproto.moretags) = + "patchStrategy:\"merge\" patchMergeKey:\"clusterID\" " + "pg:\"drifted_clusters,use_zero\"", + (gogoproto.nullable) = false + ]; + repeated rafay.dev.types.config.WorkloadSnapshotCondition conditions = 9 [ + (gogoproto.nullable) = false, + (gogoproto.moretags) = + "patchStrategy:\"merge\" patchMergeKey:\"type\" pg:\"conditions\"", + (gogoproto.jsontag) = "conditions,omitempty" + ]; + bool isDirty = 10 [ + (gogoproto.moretags) = "pg:\"is_dirty,use_zero\"", + (gogoproto.jsontag) = "isDirty" + ]; +} + +message LimitRangeItem { + float maxCpu = 1 [ (gogoproto.jsontag) = "maxCpu,omitempty" ]; + float maxMemory = 2 [ (gogoproto.jsontag) = "maxMemory,omitempty" ]; + float minCpu = 3 [ (gogoproto.jsontag) = "minCpu,omitempty" ]; + float minMemory = 4 [ (gogoproto.jsontag) = "minMemory,omitempty" ]; + float defaultCpu = 5 [ (gogoproto.jsontag) = "defaultCpu,omitempty" ]; + float defaultMemory = 6 [ (gogoproto.jsontag) = "defaultMemory,omitempty" ]; + float defaultRequestCpu = 7 + [ (gogoproto.jsontag) = "defaultRequestCpu,omitempty" ]; + float defaultRequestMemory = 8 + [ (gogoproto.jsontag) = "defaultRequestMemory,omitempty" ]; + float maxLimitRequestRatioCpu = 9 + [ (gogoproto.jsontag) = "maxLimitRequestRatioCpu,omitempty" ]; + float maxLimitRequestRatioMemory = 10 + [ (gogoproto.jsontag) = "maxLimitRequestRatioMemory,omitempty" ]; +} + +message LimitRange { + LimitRangeItem podLimits = 1 [ (gogoproto.jsontag) = "podLimits,omitempty" ]; + LimitRangeItem containerLimits = 2 + [ (gogoproto.jsontag) = "containerLimits,omitempty" ]; +} + +message ResourceQuota { + float cpuRequests = 1 [ (gogoproto.jsontag) = "cpuRequests,omitempty" ]; + float memoryRequests = 2 [ (gogoproto.jsontag) = "memoryRequests,omitempty" ]; + float cpuLimits = 3 [ (gogoproto.jsontag) = "cpuLimits,omitempty" ]; + float memoryLimits = 4 [ (gogoproto.jsontag) = "memoryLimits,omitempty" ]; +} + +// NamespaceStatusTemplate is the template for sending namespace status +message NamespaceStatusTemplate { + k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta objectMeta = 1 [ + (gogoproto.embed) = true, + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "metadata,omitempty" + ]; + rafay.dev.types.controller.NamespaceStatus status = 2 + [ (gogoproto.nullable) = false, (gogoproto.embed) = true ]; +} + +// NamespaceTemplate is the template for creating namespace +message NamespaceTemplate { + k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta objectMeta = 1 [ + (gogoproto.embed) = true, + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "metadata,omitempty" + ]; + rafay.dev.types.controller.NamespaceSpec spec = 2 + [ (gogoproto.nullable) = false, (gogoproto.embed) = true ]; + + ResourceQuota resourceQuota = 4 [ + (gogoproto.moretags) = "pg:\"-\"", + (gogoproto.jsontag) = "resourceQuota,omitempty" + ]; + LimitRange limitRange = 5 [ + (gogoproto.moretags) = "pg:\"-\"", + (gogoproto.jsontag) = "limitRange,omitempty" + ]; + rafay.dev.types.config.PlacementSpec placement = 6 [ + (gogoproto.moretags) = "pg:\"placement\"", + (gogoproto.jsontag) = "placement,omitempty" + ]; + string type = 7 [ + (gogoproto.moretags) = "pg:\"type\"", + (gogoproto.jsontag) = "type,omitempty" + ]; + string namespaceFromFile = 8 [ + (gogoproto.moretags) = "pg:\"-\"", + (gogoproto.jsontag) = "namespaceFromFile,omitempty" + ]; + string repoRef = 9 [ + (gogoproto.moretags) = "pg:\"repoRef\"", + (gogoproto.jsontag) = "repoRef,omitempty" + ]; + rafay.dev.types.config.RepoArtifactMeta repoArtifactMeta = 10 [ + (gogoproto.moretags) = "pg:\"repoArtifactMeta\"", + (gogoproto.jsontag) = "repoArtifactMeta,omitempty" + ]; + string namespaceFromRepo = 11 [ + (gogoproto.moretags) = "pg:\"-\"", + (gogoproto.jsontag) = "namespaceFromRepo,omitempty" + ]; +} + +// Namespace represets a kubernetes namespace along with all the objects +// whose lifecycle is tied to the kubernetes namespace lifecycle +message Namespace { + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { + json_schema : { + title : "Namespace" + description : "Namespace" + required : [ "apiVersion", "kind", "metadata", "spec" ] + } + }; + string apiVersion = 1 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "API Version", + description : "API Version of the resource" + default : "config.k8smgmt.io/v3" + read_only : true + } ]; + string kind = 2 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Kind", + description : "Kind of the list resource" + default : "ClusterOverrideList" + read_only : true + } ]; + rafay.dev.types.common.v3.Metadata metadata = 3 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Metadata", + description : "Metadata of the resource" + } ]; + NamespaceTemplate spec = 4 + [ (gogoproto.nullable) = false, (gogoproto.moretags) = "pg:\"spec\"" ]; + NamespaceStatus status = 5 + [ (gogoproto.nullable) = false ]; + } + + // NamespaceList is a list of namespaces + message NamespaceList { + string apiVersion = 1 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "API Version", + description : "API Version of the list resource" + default : "config.k8smgmt.io/v3" + read_only : true + } ]; + string kind = 2 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Kind", + description : "Kind of the list resource" + default : "NamespaceList" + read_only : true + } ]; + rafay.dev.types.common.v3.ListMetadata metadata = 3 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "ListMetadata", + description : "Metadata of the list resource" + read_only : true + } ]; + repeated Namespace items = 4; + } \ No newline at end of file diff --git a/components/common/proto/types/config/override.pb.go b/components/common/proto/types/config/override.pb.go new file mode 100644 index 0000000..e5d00b4 --- /dev/null +++ b/components/common/proto/types/config/override.pb.go @@ -0,0 +1,1215 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc (unknown) +// source: proto/types/config/override.proto + +package config + +import ( + v3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/commonpb/v3" + controller "github.com/RafaySystems/rcloud-base/components/common/proto/types/controller" + _ "github.com/gogo/protobuf/gogoproto" + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type ClusterOverrideType int32 + +const ( + ClusterOverrideType_ClusterOverrideTypeUnknown ClusterOverrideType = 0 + ClusterOverrideType_ClusterOverrideTypeWorkload ClusterOverrideType = 1 + ClusterOverrideType_ClusterOverrideTypeAddon ClusterOverrideType = 2 + ClusterOverrideType_ClusterOverrideTypeNamespace ClusterOverrideType = 3 + ClusterOverrideType_ClusterOverrideTypeBlueprint ClusterOverrideType = 4 +) + +// Enum value maps for ClusterOverrideType. +var ( + ClusterOverrideType_name = map[int32]string{ + 0: "ClusterOverrideTypeUnknown", + 1: "ClusterOverrideTypeWorkload", + 2: "ClusterOverrideTypeAddon", + 3: "ClusterOverrideTypeNamespace", + 4: "ClusterOverrideTypeBlueprint", + } + ClusterOverrideType_value = map[string]int32{ + "ClusterOverrideTypeUnknown": 0, + "ClusterOverrideTypeWorkload": 1, + "ClusterOverrideTypeAddon": 2, + "ClusterOverrideTypeNamespace": 3, + "ClusterOverrideTypeBlueprint": 4, + } +) + +func (x ClusterOverrideType) Enum() *ClusterOverrideType { + p := new(ClusterOverrideType) + *p = x + return p +} + +func (x ClusterOverrideType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ClusterOverrideType) Descriptor() protoreflect.EnumDescriptor { + return file_proto_types_config_override_proto_enumTypes[0].Descriptor() +} + +func (ClusterOverrideType) Type() protoreflect.EnumType { + return &file_proto_types_config_override_proto_enumTypes[0] +} + +func (x ClusterOverrideType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ClusterOverrideType.Descriptor instead. +func (ClusterOverrideType) EnumDescriptor() ([]byte, []int) { + return file_proto_types_config_override_proto_rawDescGZIP(), []int{0} +} + +type TemplateOverrides struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ClusterName string `protobuf:"bytes,1,opt,name=clusterName,proto3" json:"clusterName,omitempty"` + PartnerID int64 `protobuf:"zigzag64,2,opt,name=partnerID,proto3" json:"partnerID,omitempty"` + OrganizationID int64 `protobuf:"zigzag64,3,opt,name=organizationID,proto3" json:"organizationID,omitempty"` + ProjectID int64 `protobuf:"zigzag64,4,opt,name=projectID,proto3" json:"projectID,omitempty"` + V1EdgeID string `protobuf:"bytes,5,opt,name=v1EdgeID,proto3" json:"v1EdgeID,omitempty"` + V1FluentdAggregatorAddr string `protobuf:"bytes,6,opt,name=v1FluentdAggregatorAddr,proto3" json:"v1FluentdAggregatorAddr,omitempty"` + V1DeploymentEnv string `protobuf:"bytes,7,opt,name=v1DeploymentEnv,proto3" json:"v1DeploymentEnv,omitempty"` + V1InfluxDBFQDN string `protobuf:"bytes,8,opt,name=v1InfluxDBFQDN,proto3" json:"v1InfluxDBFQDN,omitempty"` + V1InfluxDBPassword string `protobuf:"bytes,9,opt,name=v1InfluxDBPassword,proto3" json:"v1InfluxDBPassword,omitempty"` + V1PromethuesRelayFQDN string `protobuf:"bytes,10,opt,name=v1PromethuesRelayFQDN,proto3" json:"v1PromethuesRelayFQDN,omitempty"` + V1EdgeDisplayName string `protobuf:"bytes,11,opt,name=v1EdgeDisplayName,proto3" json:"v1EdgeDisplayName,omitempty"` + OrganizationHash string `protobuf:"bytes,12,opt,name=organizationHash,proto3" json:"organizationHash,omitempty"` + PartnerHash string `protobuf:"bytes,13,opt,name=partnerHash,proto3" json:"partnerHash,omitempty"` + OrgDisplayName string `protobuf:"bytes,14,opt,name=orgDisplayName,proto3" json:"orgDisplayName,omitempty"` + PartnerDisplayName string `protobuf:"bytes,15,opt,name=partnerDisplayName,proto3" json:"partnerDisplayName,omitempty"` + V2EventFrameworkFQDN string `protobuf:"bytes,16,opt,name=V2EventFrameworkFQDN,proto3" json:"V2EventFrameworkFQDN,omitempty"` + ProxyURL string `protobuf:"bytes,17,opt,name=proxyURL,proto3" json:"proxyURL,omitempty"` +} + +func (x *TemplateOverrides) Reset() { + *x = TemplateOverrides{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_config_override_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TemplateOverrides) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TemplateOverrides) ProtoMessage() {} + +func (x *TemplateOverrides) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_config_override_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TemplateOverrides.ProtoReflect.Descriptor instead. +func (*TemplateOverrides) Descriptor() ([]byte, []int) { + return file_proto_types_config_override_proto_rawDescGZIP(), []int{0} +} + +func (x *TemplateOverrides) GetClusterName() string { + if x != nil { + return x.ClusterName + } + return "" +} + +func (x *TemplateOverrides) GetPartnerID() int64 { + if x != nil { + return x.PartnerID + } + return 0 +} + +func (x *TemplateOverrides) GetOrganizationID() int64 { + if x != nil { + return x.OrganizationID + } + return 0 +} + +func (x *TemplateOverrides) GetProjectID() int64 { + if x != nil { + return x.ProjectID + } + return 0 +} + +func (x *TemplateOverrides) GetV1EdgeID() string { + if x != nil { + return x.V1EdgeID + } + return "" +} + +func (x *TemplateOverrides) GetV1FluentdAggregatorAddr() string { + if x != nil { + return x.V1FluentdAggregatorAddr + } + return "" +} + +func (x *TemplateOverrides) GetV1DeploymentEnv() string { + if x != nil { + return x.V1DeploymentEnv + } + return "" +} + +func (x *TemplateOverrides) GetV1InfluxDBFQDN() string { + if x != nil { + return x.V1InfluxDBFQDN + } + return "" +} + +func (x *TemplateOverrides) GetV1InfluxDBPassword() string { + if x != nil { + return x.V1InfluxDBPassword + } + return "" +} + +func (x *TemplateOverrides) GetV1PromethuesRelayFQDN() string { + if x != nil { + return x.V1PromethuesRelayFQDN + } + return "" +} + +func (x *TemplateOverrides) GetV1EdgeDisplayName() string { + if x != nil { + return x.V1EdgeDisplayName + } + return "" +} + +func (x *TemplateOverrides) GetOrganizationHash() string { + if x != nil { + return x.OrganizationHash + } + return "" +} + +func (x *TemplateOverrides) GetPartnerHash() string { + if x != nil { + return x.PartnerHash + } + return "" +} + +func (x *TemplateOverrides) GetOrgDisplayName() string { + if x != nil { + return x.OrgDisplayName + } + return "" +} + +func (x *TemplateOverrides) GetPartnerDisplayName() string { + if x != nil { + return x.PartnerDisplayName + } + return "" +} + +func (x *TemplateOverrides) GetV2EventFrameworkFQDN() string { + if x != nil { + return x.V2EventFrameworkFQDN + } + return "" +} + +func (x *TemplateOverrides) GetProxyURL() string { + if x != nil { + return x.ProxyURL + } + return "" +} + +// OverrideSpec is the specification of override +type OverrideSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // an override is only applied if selector matches the taskset/namespace + // labels + ResourceSelector string `protobuf:"bytes,1,opt,name=resourceSelector,proto3" json:"resourceSelector,omitempty"` + // overrides is list of objects to be overriden + Overrides []*controller.StepObject `protobuf:"bytes,2,rep,name=overrides,proto3" json:"overrides,omitempty"` + ValuesFile string `protobuf:"bytes,3,opt,name=valuesFile,proto3" json:"valuesFile,omitempty"` + TemplateOverrides *TemplateOverrides `protobuf:"bytes,4,opt,name=templateOverrides,proto3" json:"templateOverrides,omitempty"` + ClusterSelector string `protobuf:"bytes,5,opt,name=clusterSelector,proto3" json:"clusterSelector,omitempty"` + ClusterPlacement *PlacementSpec `protobuf:"bytes,6,opt,name=clusterPlacement,proto3" json:"clusterPlacement,omitempty"` + RepositoryRef string `protobuf:"bytes,7,opt,name=repositoryRef,proto3" json:"repositoryRef,omitempty"` + RepoArtifactMeta *RepoArtifactMeta `protobuf:"bytes,8,opt,name=repoArtifactMeta,proto3" json:"repoArtifactMeta,omitempty"` +} + +func (x *OverrideSpec) Reset() { + *x = OverrideSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_config_override_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OverrideSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OverrideSpec) ProtoMessage() {} + +func (x *OverrideSpec) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_config_override_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OverrideSpec.ProtoReflect.Descriptor instead. +func (*OverrideSpec) Descriptor() ([]byte, []int) { + return file_proto_types_config_override_proto_rawDescGZIP(), []int{1} +} + +func (x *OverrideSpec) GetResourceSelector() string { + if x != nil { + return x.ResourceSelector + } + return "" +} + +func (x *OverrideSpec) GetOverrides() []*controller.StepObject { + if x != nil { + return x.Overrides + } + return nil +} + +func (x *OverrideSpec) GetValuesFile() string { + if x != nil { + return x.ValuesFile + } + return "" +} + +func (x *OverrideSpec) GetTemplateOverrides() *TemplateOverrides { + if x != nil { + return x.TemplateOverrides + } + return nil +} + +func (x *OverrideSpec) GetClusterSelector() string { + if x != nil { + return x.ClusterSelector + } + return "" +} + +func (x *OverrideSpec) GetClusterPlacement() *PlacementSpec { + if x != nil { + return x.ClusterPlacement + } + return nil +} + +func (x *OverrideSpec) GetRepositoryRef() string { + if x != nil { + return x.RepositoryRef + } + return "" +} + +func (x *OverrideSpec) GetRepoArtifactMeta() *RepoArtifactMeta { + if x != nil { + return x.RepoArtifactMeta + } + return nil +} + +// Override is a list of objects that can be used to patch namespace/taskset +// at partner/org/project/cluster level +// override type should be sepecificed as a label rafay.dev/overrideType +// applicable values are partner/organization/project/cluster +type Override struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ApiVersion string `protobuf:"bytes,1,opt,name=apiVersion,proto3" json:"apiVersion,omitempty"` + Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"` + Metadata *v3.Metadata `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *OverrideSpec `protobuf:"bytes,4,opt,name=spec,proto3" json:"spec,omitempty"` + Status *v3.Status `protobuf:"bytes,5,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *Override) Reset() { + *x = Override{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_config_override_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Override) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Override) ProtoMessage() {} + +func (x *Override) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_config_override_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Override.ProtoReflect.Descriptor instead. +func (*Override) Descriptor() ([]byte, []int) { + return file_proto_types_config_override_proto_rawDescGZIP(), []int{2} +} + +func (x *Override) GetApiVersion() string { + if x != nil { + return x.ApiVersion + } + return "" +} + +func (x *Override) GetKind() string { + if x != nil { + return x.Kind + } + return "" +} + +func (x *Override) GetMetadata() *v3.Metadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *Override) GetSpec() *OverrideSpec { + if x != nil { + return x.Spec + } + return nil +} + +func (x *Override) GetStatus() *v3.Status { + if x != nil { + return x.Status + } + return nil +} + +// OverrideList is a list of overrides +type OverrideList struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ApiVersion string `protobuf:"bytes,1,opt,name=apiVersion,proto3" json:"apiVersion,omitempty"` + Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"` + Metadata *v3.ListMetadata `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` + Items []*Override `protobuf:"bytes,4,rep,name=items,proto3" json:"items,omitempty"` +} + +func (x *OverrideList) Reset() { + *x = OverrideList{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_config_override_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OverrideList) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OverrideList) ProtoMessage() {} + +func (x *OverrideList) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_config_override_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OverrideList.ProtoReflect.Descriptor instead. +func (*OverrideList) Descriptor() ([]byte, []int) { + return file_proto_types_config_override_proto_rawDescGZIP(), []int{3} +} + +func (x *OverrideList) GetApiVersion() string { + if x != nil { + return x.ApiVersion + } + return "" +} + +func (x *OverrideList) GetKind() string { + if x != nil { + return x.Kind + } + return "" +} + +func (x *OverrideList) GetMetadata() *v3.ListMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *OverrideList) GetItems() []*Override { + if x != nil { + return x.Items + } + return nil +} + +type ClusterOverride struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ApiVersion string `protobuf:"bytes,1,opt,name=apiVersion,proto3" json:"apiVersion,omitempty"` + Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"` + Metadata *v3.Metadata `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *ClusterOverrideSpec `protobuf:"bytes,4,opt,name=spec,proto3" json:"spec,omitempty"` + Status *v3.Status `protobuf:"bytes,5,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *ClusterOverride) Reset() { + *x = ClusterOverride{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_config_override_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ClusterOverride) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClusterOverride) ProtoMessage() {} + +func (x *ClusterOverride) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_config_override_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClusterOverride.ProtoReflect.Descriptor instead. +func (*ClusterOverride) Descriptor() ([]byte, []int) { + return file_proto_types_config_override_proto_rawDescGZIP(), []int{4} +} + +func (x *ClusterOverride) GetApiVersion() string { + if x != nil { + return x.ApiVersion + } + return "" +} + +func (x *ClusterOverride) GetKind() string { + if x != nil { + return x.Kind + } + return "" +} + +func (x *ClusterOverride) GetMetadata() *v3.Metadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *ClusterOverride) GetSpec() *ClusterOverrideSpec { + if x != nil { + return x.Spec + } + return nil +} + +func (x *ClusterOverride) GetStatus() *v3.Status { + if x != nil { + return x.Status + } + return nil +} + +// OverrideSpec is the specification of override +type ClusterOverrideSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ClusterSelector string `protobuf:"bytes,1,opt,name=clusterSelector,proto3" json:"clusterSelector,omitempty"` + ResourceSelector string `protobuf:"bytes,2,opt,name=resourceSelector,proto3" json:"resourceSelector,omitempty"` + Type ClusterOverrideType `protobuf:"varint,3,opt,name=type,proto3,enum=rafay.dev.types.config.ClusterOverrideType" json:"type,omitempty"` + OverrideValues string `protobuf:"bytes,4,opt,name=overrideValues,proto3" json:"overrideValues,omitempty"` + ClusterPlacement *PlacementSpec `protobuf:"bytes,5,opt,name=clusterPlacement,proto3" json:"clusterPlacement,omitempty"` + RepositoryRef string `protobuf:"bytes,6,opt,name=repositoryRef,proto3" json:"repositoryRef,omitempty"` + RepoArtifactMeta *RepoArtifactMeta `protobuf:"bytes,7,opt,name=repoArtifactMeta,proto3" json:"repoArtifactMeta,omitempty"` +} + +func (x *ClusterOverrideSpec) Reset() { + *x = ClusterOverrideSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_config_override_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ClusterOverrideSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClusterOverrideSpec) ProtoMessage() {} + +func (x *ClusterOverrideSpec) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_config_override_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClusterOverrideSpec.ProtoReflect.Descriptor instead. +func (*ClusterOverrideSpec) Descriptor() ([]byte, []int) { + return file_proto_types_config_override_proto_rawDescGZIP(), []int{5} +} + +func (x *ClusterOverrideSpec) GetClusterSelector() string { + if x != nil { + return x.ClusterSelector + } + return "" +} + +func (x *ClusterOverrideSpec) GetResourceSelector() string { + if x != nil { + return x.ResourceSelector + } + return "" +} + +func (x *ClusterOverrideSpec) GetType() ClusterOverrideType { + if x != nil { + return x.Type + } + return ClusterOverrideType_ClusterOverrideTypeUnknown +} + +func (x *ClusterOverrideSpec) GetOverrideValues() string { + if x != nil { + return x.OverrideValues + } + return "" +} + +func (x *ClusterOverrideSpec) GetClusterPlacement() *PlacementSpec { + if x != nil { + return x.ClusterPlacement + } + return nil +} + +func (x *ClusterOverrideSpec) GetRepositoryRef() string { + if x != nil { + return x.RepositoryRef + } + return "" +} + +func (x *ClusterOverrideSpec) GetRepoArtifactMeta() *RepoArtifactMeta { + if x != nil { + return x.RepoArtifactMeta + } + return nil +} + +// OverrideList is a list of overrides +type ClusterOverrideList struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ApiVersion string `protobuf:"bytes,1,opt,name=apiVersion,proto3" json:"apiVersion,omitempty"` + Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"` + Metadata *v3.ListMetadata `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` + Items []*ClusterOverride `protobuf:"bytes,4,rep,name=items,proto3" json:"items,omitempty"` +} + +func (x *ClusterOverrideList) Reset() { + *x = ClusterOverrideList{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_config_override_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ClusterOverrideList) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClusterOverrideList) ProtoMessage() {} + +func (x *ClusterOverrideList) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_config_override_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClusterOverrideList.ProtoReflect.Descriptor instead. +func (*ClusterOverrideList) Descriptor() ([]byte, []int) { + return file_proto_types_config_override_proto_rawDescGZIP(), []int{6} +} + +func (x *ClusterOverrideList) GetApiVersion() string { + if x != nil { + return x.ApiVersion + } + return "" +} + +func (x *ClusterOverrideList) GetKind() string { + if x != nil { + return x.Kind + } + return "" +} + +func (x *ClusterOverrideList) GetMetadata() *v3.ListMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *ClusterOverrideList) GetItems() []*ClusterOverride { + if x != nil { + return x.Items + } + return nil +} + +var File_proto_types_config_override_proto protoreflect.FileDescriptor + +var file_proto_types_config_override_proto_rawDesc = []byte{ + 0x0a, 0x21, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, + 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, + 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x1f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x22, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, + 0x70, 0x65, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2f, 0x63, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, + 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x70, 0x62, 0x2f, 0x76, 0x33, + 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcb, 0x05, + 0x0a, 0x11, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, + 0x64, 0x65, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, + 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x12, 0x52, 0x09, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, + 0x72, 0x49, 0x44, 0x12, 0x26, 0x0a, 0x0e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x12, 0x52, 0x0e, 0x6f, 0x72, 0x67, + 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x1c, 0x0a, 0x09, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x44, 0x18, 0x04, 0x20, 0x01, 0x28, 0x12, 0x52, 0x09, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x44, 0x12, 0x1a, 0x0a, 0x08, 0x76, 0x31, 0x45, + 0x64, 0x67, 0x65, 0x49, 0x44, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x76, 0x31, 0x45, + 0x64, 0x67, 0x65, 0x49, 0x44, 0x12, 0x38, 0x0a, 0x17, 0x76, 0x31, 0x46, 0x6c, 0x75, 0x65, 0x6e, + 0x74, 0x64, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x17, 0x76, 0x31, 0x46, 0x6c, 0x75, 0x65, 0x6e, 0x74, + 0x64, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x12, + 0x28, 0x0a, 0x0f, 0x76, 0x31, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x45, + 0x6e, 0x76, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x76, 0x31, 0x44, 0x65, 0x70, 0x6c, + 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x45, 0x6e, 0x76, 0x12, 0x26, 0x0a, 0x0e, 0x76, 0x31, 0x49, + 0x6e, 0x66, 0x6c, 0x75, 0x78, 0x44, 0x42, 0x46, 0x51, 0x44, 0x4e, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0e, 0x76, 0x31, 0x49, 0x6e, 0x66, 0x6c, 0x75, 0x78, 0x44, 0x42, 0x46, 0x51, 0x44, + 0x4e, 0x12, 0x2e, 0x0a, 0x12, 0x76, 0x31, 0x49, 0x6e, 0x66, 0x6c, 0x75, 0x78, 0x44, 0x42, 0x50, + 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x76, + 0x31, 0x49, 0x6e, 0x66, 0x6c, 0x75, 0x78, 0x44, 0x42, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, + 0x64, 0x12, 0x34, 0x0a, 0x15, 0x76, 0x31, 0x50, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x75, 0x65, + 0x73, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x46, 0x51, 0x44, 0x4e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x15, 0x76, 0x31, 0x50, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x75, 0x65, 0x73, 0x52, 0x65, + 0x6c, 0x61, 0x79, 0x46, 0x51, 0x44, 0x4e, 0x12, 0x2c, 0x0a, 0x11, 0x76, 0x31, 0x45, 0x64, 0x67, + 0x65, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x0b, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x11, 0x76, 0x31, 0x45, 0x64, 0x67, 0x65, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, + 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2a, 0x0a, 0x10, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x61, 0x73, 0x68, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x10, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x61, 0x73, + 0x68, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x48, 0x61, 0x73, 0x68, + 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x48, + 0x61, 0x73, 0x68, 0x12, 0x26, 0x0a, 0x0e, 0x6f, 0x72, 0x67, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, + 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x72, 0x67, + 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x12, 0x70, + 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, + 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, + 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x32, 0x0a, 0x14, 0x56, + 0x32, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x77, 0x6f, 0x72, 0x6b, 0x46, + 0x51, 0x44, 0x4e, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x56, 0x32, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x77, 0x6f, 0x72, 0x6b, 0x46, 0x51, 0x44, 0x4e, 0x12, + 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x55, 0x52, 0x4c, 0x18, 0x11, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x55, 0x52, 0x4c, 0x22, 0xce, 0x05, 0x0a, 0x0c, + 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x53, 0x70, 0x65, 0x63, 0x12, 0x46, 0x0a, 0x10, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1a, 0xf2, 0xde, 0x1f, 0x16, 0x70, 0x67, 0x3a, 0x22, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, + 0x72, 0x22, 0x52, 0x10, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x65, 0x6c, 0x65, + 0x63, 0x74, 0x6f, 0x72, 0x12, 0x5c, 0x0a, 0x09, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, + 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x65, 0x70, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x42, + 0x16, 0xc8, 0xde, 0x1f, 0x00, 0xf2, 0xde, 0x1f, 0x0e, 0x70, 0x67, 0x3a, 0x22, 0x6f, 0x76, 0x65, + 0x72, 0x72, 0x69, 0x64, 0x65, 0x73, 0x22, 0x52, 0x09, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, + 0x65, 0x73, 0x12, 0x34, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x46, 0x69, 0x6c, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x14, 0xf2, 0xde, 0x1f, 0x10, 0x70, 0x67, 0x3a, 0x22, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x22, 0x52, 0x0a, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x73, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x78, 0x0a, 0x11, 0x74, 0x65, 0x6d, 0x70, + 0x6c, 0x61, 0x74, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x73, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x54, 0x65, 0x6d, + 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x73, 0x42, 0x1f, + 0xc8, 0xde, 0x1f, 0x00, 0xf2, 0xde, 0x1f, 0x17, 0x70, 0x67, 0x3a, 0x22, 0x74, 0x65, 0x6d, 0x70, + 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x73, 0x22, 0x52, + 0x11, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, + 0x65, 0x73, 0x12, 0x43, 0x0a, 0x0f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x65, 0x6c, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x19, 0xf2, 0xde, 0x1f, + 0x15, 0x70, 0x67, 0x3a, 0x22, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x65, 0x6c, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x22, 0x52, 0x0f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, + 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x6d, 0x0a, 0x10, 0x63, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x50, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x25, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x50, 0x6c, 0x61, 0x63, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x70, 0x65, 0x63, 0x42, 0x1a, 0xf2, 0xde, 0x1f, 0x16, 0x70, 0x67, + 0x3a, 0x22, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x22, 0x52, 0x10, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x50, 0x6c, 0x61, + 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x3d, 0x0a, 0x0d, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x66, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x17, 0xf2, + 0xde, 0x1f, 0x13, 0x70, 0x67, 0x3a, 0x22, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, + 0x79, 0x5f, 0x72, 0x65, 0x66, 0x22, 0x52, 0x0d, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, + 0x72, 0x79, 0x52, 0x65, 0x66, 0x12, 0x75, 0x0a, 0x10, 0x72, 0x65, 0x70, 0x6f, 0x41, 0x72, 0x74, + 0x69, 0x66, 0x61, 0x63, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x28, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x41, 0x72, 0x74, + 0x69, 0x66, 0x61, 0x63, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x42, 0x1f, 0xc8, 0xde, 0x1f, 0x00, 0xf2, + 0xde, 0x1f, 0x17, 0x70, 0x67, 0x3a, 0x22, 0x72, 0x65, 0x70, 0x6f, 0x5f, 0x61, 0x72, 0x74, 0x69, + 0x66, 0x61, 0x63, 0x74, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x22, 0x52, 0x10, 0x72, 0x65, 0x70, 0x6f, + 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x22, 0x82, 0x04, 0x0a, + 0x08, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, 0x65, 0x0a, 0x0a, 0x61, 0x70, 0x69, + 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x45, 0x92, + 0x41, 0x42, 0x2a, 0x0b, 0x41, 0x50, 0x49, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x32, + 0x1b, 0x41, 0x50, 0x49, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, + 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, 0x14, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6b, 0x38, 0x73, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x69, 0x6f, 0x2f, + 0x76, 0x33, 0x40, 0x01, 0x52, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x12, 0x3e, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2a, + 0x92, 0x41, 0x27, 0x2a, 0x04, 0x4b, 0x69, 0x6e, 0x64, 0x32, 0x14, 0x4b, 0x69, 0x6e, 0x64, 0x20, + 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, + 0x07, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x40, 0x01, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, + 0x12, 0x68, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x27, 0x92, 0x41, 0x24, 0x2a, 0x08, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x32, 0x18, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x42, 0x0a, 0x04, 0x73, 0x70, + 0x65, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, + 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x53, 0x70, 0x65, 0x63, 0x42, 0x08, + 0xc8, 0xde, 0x1f, 0x00, 0xd0, 0xde, 0x1f, 0x01, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x60, + 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, + 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x42, 0x25, 0x92, 0x41, 0x22, 0x2a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x32, 0x16, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x40, 0x01, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x3a, 0x3f, 0x92, 0x41, 0x3c, 0x0a, 0x3a, 0x2a, 0x08, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, + 0x65, 0x32, 0x08, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0xd2, 0x01, 0x0a, 0x61, 0x70, + 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0xd2, 0x01, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0xd2, + 0x01, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xd2, 0x01, 0x04, 0x73, 0x70, 0x65, + 0x63, 0x22, 0xf4, 0x02, 0x0a, 0x0c, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x4c, 0x69, + 0x73, 0x74, 0x12, 0x6a, 0x0a, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x4a, 0x92, 0x41, 0x47, 0x2a, 0x0b, 0x41, 0x50, 0x49, + 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0x20, 0x41, 0x50, 0x49, 0x20, 0x56, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x69, 0x73, + 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, 0x14, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x6b, 0x38, 0x73, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x69, 0x6f, 0x2f, 0x76, 0x33, + 0x40, 0x01, 0x52, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x47, + 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x33, 0x92, 0x41, + 0x30, 0x2a, 0x04, 0x4b, 0x69, 0x6e, 0x64, 0x32, 0x19, 0x4b, 0x69, 0x6e, 0x64, 0x20, 0x6f, 0x66, + 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x3a, 0x0b, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x40, + 0x01, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x77, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x72, 0x61, 0x66, 0x61, + 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x42, 0x32, 0x92, 0x41, 0x2f, 0x2a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x32, 0x1d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x20, + 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x40, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x12, 0x36, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x20, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, + 0x65, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x22, 0x9e, 0x04, 0x0a, 0x0f, 0x43, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, 0x65, 0x0a, 0x0a, + 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x45, 0x92, 0x41, 0x42, 0x2a, 0x0b, 0x41, 0x50, 0x49, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x32, 0x1b, 0x41, 0x50, 0x49, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, + 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, + 0x14, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6b, 0x38, 0x73, 0x6d, 0x67, 0x6d, 0x74, 0x2e, + 0x69, 0x6f, 0x2f, 0x76, 0x33, 0x40, 0x01, 0x52, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x12, 0x3e, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x2a, 0x92, 0x41, 0x27, 0x2a, 0x04, 0x4b, 0x69, 0x6e, 0x64, 0x32, 0x14, 0x4b, 0x69, + 0x6e, 0x64, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x3a, 0x07, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x40, 0x01, 0x52, 0x04, 0x6b, + 0x69, 0x6e, 0x64, 0x12, 0x68, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, + 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, + 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x27, 0x92, 0x41, 0x24, 0x2a, + 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x32, 0x18, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x49, 0x0a, + 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x72, 0x61, + 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x76, 0x65, 0x72, + 0x72, 0x69, 0x64, 0x65, 0x53, 0x70, 0x65, 0x63, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0xd0, 0xde, + 0x1f, 0x01, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x60, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, + 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x25, 0x92, 0x41, 0x22, + 0x2a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x32, 0x16, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x40, 0x01, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x3a, 0x4d, 0x92, 0x41, 0x4a, 0x0a, + 0x48, 0x2a, 0x0f, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, + 0x64, 0x65, 0x32, 0x0f, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x76, 0x65, 0x72, 0x72, + 0x69, 0x64, 0x65, 0xd2, 0x01, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0xd2, 0x01, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0xd2, 0x01, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0xd2, 0x01, 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, 0xa3, 0x03, 0x0a, 0x13, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x53, 0x70, 0x65, + 0x63, 0x12, 0x28, 0x0a, 0x0f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x65, 0x6c, 0x65, + 0x63, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x2a, 0x0a, 0x10, 0x72, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, + 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x3f, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, + 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x54, 0x79, + 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x6f, 0x76, 0x65, 0x72, + 0x72, 0x69, 0x64, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0e, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, + 0x12, 0x51, 0x0a, 0x10, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x50, 0x6c, 0x61, 0x63, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x72, 0x61, 0x66, + 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x50, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x70, 0x65, + 0x63, 0x52, 0x10, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x50, 0x6c, 0x61, 0x63, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x12, 0x24, 0x0a, 0x0d, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, + 0x79, 0x52, 0x65, 0x66, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x72, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x66, 0x12, 0x54, 0x0a, 0x10, 0x72, 0x65, 0x70, + 0x6f, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x52, 0x65, 0x70, + 0x6f, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x10, 0x72, + 0x65, 0x70, 0x6f, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x22, + 0x8a, 0x03, 0x0a, 0x13, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x76, 0x65, 0x72, 0x72, + 0x69, 0x64, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x6a, 0x0a, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x4a, 0x92, 0x41, 0x47, + 0x2a, 0x0b, 0x41, 0x50, 0x49, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0x20, 0x41, + 0x50, 0x49, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, + 0x65, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, + 0x14, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6b, 0x38, 0x73, 0x6d, 0x67, 0x6d, 0x74, 0x2e, + 0x69, 0x6f, 0x2f, 0x76, 0x33, 0x40, 0x01, 0x52, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x12, 0x4f, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x3b, 0x92, 0x41, 0x38, 0x2a, 0x04, 0x4b, 0x69, 0x6e, 0x64, 0x32, 0x19, 0x4b, 0x69, + 0x6e, 0x64, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x72, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, 0x13, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x40, 0x01, 0x52, 0x04, + 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x77, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, + 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, + 0x32, 0x92, 0x41, 0x2f, 0x2a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x32, 0x1d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x20, 0x6f, 0x66, 0x20, + 0x74, 0x68, 0x65, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x40, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x3d, 0x0a, + 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x72, + 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x76, 0x65, + 0x72, 0x72, 0x69, 0x64, 0x65, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x2a, 0xbe, 0x01, 0x0a, + 0x13, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x1a, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4f, + 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x54, 0x79, 0x70, 0x65, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, + 0x77, 0x6e, 0x10, 0x00, 0x12, 0x1f, 0x0a, 0x1b, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4f, + 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x54, 0x79, 0x70, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x6c, + 0x6f, 0x61, 0x64, 0x10, 0x01, 0x12, 0x1c, 0x0a, 0x18, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x54, 0x79, 0x70, 0x65, 0x41, 0x64, 0x64, 0x6f, + 0x6e, 0x10, 0x02, 0x12, 0x20, 0x0a, 0x1c, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x76, + 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x54, 0x79, 0x70, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x10, 0x03, 0x12, 0x20, 0x0a, 0x1c, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x54, 0x79, 0x70, 0x65, 0x42, 0x6c, 0x75, 0x65, + 0x70, 0x72, 0x69, 0x6e, 0x74, 0x10, 0x04, 0x1a, 0x04, 0x88, 0xa3, 0x1e, 0x00, 0x42, 0xf1, 0x01, + 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x0d, 0x4f, 0x76, + 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x48, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x61, 0x66, 0x61, 0x79, 0x53, + 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x2f, 0x72, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x62, 0x61, + 0x73, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0xa2, 0x02, 0x04, 0x52, 0x44, 0x54, 0x43, 0xaa, 0x02, + 0x16, 0x52, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x44, 0x65, 0x76, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x73, + 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0xca, 0x02, 0x16, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, + 0x44, 0x65, 0x76, 0x5c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x5c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0xe2, 0x02, 0x22, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x54, 0x79, 0x70, + 0x65, 0x73, 0x5c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x19, 0x52, 0x61, 0x66, 0x61, 0x79, 0x3a, 0x3a, 0x44, + 0x65, 0x76, 0x3a, 0x3a, 0x54, 0x79, 0x70, 0x65, 0x73, 0x3a, 0x3a, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_proto_types_config_override_proto_rawDescOnce sync.Once + file_proto_types_config_override_proto_rawDescData = file_proto_types_config_override_proto_rawDesc +) + +func file_proto_types_config_override_proto_rawDescGZIP() []byte { + file_proto_types_config_override_proto_rawDescOnce.Do(func() { + file_proto_types_config_override_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_types_config_override_proto_rawDescData) + }) + return file_proto_types_config_override_proto_rawDescData +} + +var file_proto_types_config_override_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_proto_types_config_override_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_proto_types_config_override_proto_goTypes = []interface{}{ + (ClusterOverrideType)(0), // 0: rafay.dev.types.config.ClusterOverrideType + (*TemplateOverrides)(nil), // 1: rafay.dev.types.config.TemplateOverrides + (*OverrideSpec)(nil), // 2: rafay.dev.types.config.OverrideSpec + (*Override)(nil), // 3: rafay.dev.types.config.Override + (*OverrideList)(nil), // 4: rafay.dev.types.config.OverrideList + (*ClusterOverride)(nil), // 5: rafay.dev.types.config.ClusterOverride + (*ClusterOverrideSpec)(nil), // 6: rafay.dev.types.config.ClusterOverrideSpec + (*ClusterOverrideList)(nil), // 7: rafay.dev.types.config.ClusterOverrideList + (*controller.StepObject)(nil), // 8: rafay.dev.types.controller.StepObject + (*PlacementSpec)(nil), // 9: rafay.dev.types.config.PlacementSpec + (*RepoArtifactMeta)(nil), // 10: rafay.dev.types.config.RepoArtifactMeta + (*v3.Metadata)(nil), // 11: rafay.dev.types.common.v3.Metadata + (*v3.Status)(nil), // 12: rafay.dev.types.common.v3.Status + (*v3.ListMetadata)(nil), // 13: rafay.dev.types.common.v3.ListMetadata +} +var file_proto_types_config_override_proto_depIdxs = []int32{ + 8, // 0: rafay.dev.types.config.OverrideSpec.overrides:type_name -> rafay.dev.types.controller.StepObject + 1, // 1: rafay.dev.types.config.OverrideSpec.templateOverrides:type_name -> rafay.dev.types.config.TemplateOverrides + 9, // 2: rafay.dev.types.config.OverrideSpec.clusterPlacement:type_name -> rafay.dev.types.config.PlacementSpec + 10, // 3: rafay.dev.types.config.OverrideSpec.repoArtifactMeta:type_name -> rafay.dev.types.config.RepoArtifactMeta + 11, // 4: rafay.dev.types.config.Override.metadata:type_name -> rafay.dev.types.common.v3.Metadata + 2, // 5: rafay.dev.types.config.Override.spec:type_name -> rafay.dev.types.config.OverrideSpec + 12, // 6: rafay.dev.types.config.Override.status:type_name -> rafay.dev.types.common.v3.Status + 13, // 7: rafay.dev.types.config.OverrideList.metadata:type_name -> rafay.dev.types.common.v3.ListMetadata + 3, // 8: rafay.dev.types.config.OverrideList.items:type_name -> rafay.dev.types.config.Override + 11, // 9: rafay.dev.types.config.ClusterOverride.metadata:type_name -> rafay.dev.types.common.v3.Metadata + 6, // 10: rafay.dev.types.config.ClusterOverride.spec:type_name -> rafay.dev.types.config.ClusterOverrideSpec + 12, // 11: rafay.dev.types.config.ClusterOverride.status:type_name -> rafay.dev.types.common.v3.Status + 0, // 12: rafay.dev.types.config.ClusterOverrideSpec.type:type_name -> rafay.dev.types.config.ClusterOverrideType + 9, // 13: rafay.dev.types.config.ClusterOverrideSpec.clusterPlacement:type_name -> rafay.dev.types.config.PlacementSpec + 10, // 14: rafay.dev.types.config.ClusterOverrideSpec.repoArtifactMeta:type_name -> rafay.dev.types.config.RepoArtifactMeta + 13, // 15: rafay.dev.types.config.ClusterOverrideList.metadata:type_name -> rafay.dev.types.common.v3.ListMetadata + 5, // 16: rafay.dev.types.config.ClusterOverrideList.items:type_name -> rafay.dev.types.config.ClusterOverride + 17, // [17:17] is the sub-list for method output_type + 17, // [17:17] is the sub-list for method input_type + 17, // [17:17] is the sub-list for extension type_name + 17, // [17:17] is the sub-list for extension extendee + 0, // [0:17] is the sub-list for field type_name +} + +func init() { file_proto_types_config_override_proto_init() } +func file_proto_types_config_override_proto_init() { + if File_proto_types_config_override_proto != nil { + return + } + file_proto_types_config_config_proto_init() + file_proto_types_config_placement_proto_init() + if !protoimpl.UnsafeEnabled { + file_proto_types_config_override_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TemplateOverrides); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_config_override_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OverrideSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_config_override_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Override); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_config_override_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OverrideList); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_config_override_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ClusterOverride); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_config_override_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ClusterOverrideSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_config_override_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ClusterOverrideList); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_proto_types_config_override_proto_rawDesc, + NumEnums: 1, + NumMessages: 7, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_proto_types_config_override_proto_goTypes, + DependencyIndexes: file_proto_types_config_override_proto_depIdxs, + EnumInfos: file_proto_types_config_override_proto_enumTypes, + MessageInfos: file_proto_types_config_override_proto_msgTypes, + }.Build() + File_proto_types_config_override_proto = out.File + file_proto_types_config_override_proto_rawDesc = nil + file_proto_types_config_override_proto_goTypes = nil + file_proto_types_config_override_proto_depIdxs = nil +} diff --git a/components/common/proto/types/config/override.proto b/components/common/proto/types/config/override.proto new file mode 100644 index 0000000..7e2278f --- /dev/null +++ b/components/common/proto/types/config/override.proto @@ -0,0 +1,206 @@ +syntax = "proto3"; +package rafay.dev.types.config; + +import "protoc-gen-openapiv2/options/annotations.proto"; +import "gogoproto/gogo.proto"; +import "proto/types/config/config.proto"; +import "proto/types/config/placement.proto"; +import "proto/types/controller/cluster_controller.proto"; +import "proto/types/commonpb/v3/common.proto"; + +message TemplateOverrides { + string clusterName = 1; + sint64 partnerID = 2; + sint64 organizationID = 3; + sint64 projectID = 4; + string v1EdgeID = 5; + string v1FluentdAggregatorAddr = 6; + string v1DeploymentEnv = 7; + string v1InfluxDBFQDN = 8; + string v1InfluxDBPassword = 9; + string v1PromethuesRelayFQDN = 10; + string v1EdgeDisplayName = 11; + string organizationHash = 12; + string partnerHash = 13; + string orgDisplayName = 14; + string partnerDisplayName = 15; + string V2EventFrameworkFQDN = 16; + string proxyURL = 17; +} + +// OverrideSpec is the specification of override +message OverrideSpec { + // an override is only applied if selector matches the taskset/namespace + // labels + string resourceSelector = 1 + [ (gogoproto.moretags) = "pg:\"resource_selector\"" ]; + // overrides is list of objects to be overriden + repeated rafay.dev.types.controller.StepObject overrides = 2 [ + (gogoproto.moretags) = "pg:\"overrides\"", + (gogoproto.nullable) = false + ]; + string valuesFile = 3 [ (gogoproto.moretags) = "pg:\"values_file\"" ]; + TemplateOverrides templateOverrides = 4 [ + (gogoproto.moretags) = "pg:\"template_overrides\"", + (gogoproto.nullable) = false + ]; + string clusterSelector = 5 + [ (gogoproto.moretags) = "pg:\"cluster_selector\"" ]; + rafay.dev.types.config.PlacementSpec clusterPlacement = 6 + [ (gogoproto.moretags) = "pg:\"cluster_placement\"" ]; + string repositoryRef = 7 [ (gogoproto.moretags) = "pg:\"repository_ref\"" ]; + rafay.dev.types.config.RepoArtifactMeta repoArtifactMeta = 8 [ + (gogoproto.moretags) = "pg:\"repo_artifact_meta\"", + (gogoproto.nullable) = false + ]; +} + +// Override is a list of objects that can be used to patch namespace/taskset +// at partner/org/project/cluster level +// override type should be sepecificed as a label rafay.dev/overrideType +// applicable values are partner/organization/project/cluster +message Override { + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { + json_schema : { + title : "Override" + description : "Override" + required : [ "apiVersion", "kind", "metadata", "spec" ] + } + }; + string apiVersion = 1 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "API Version", + description : "API Version of the resource" + default : "config.k8smgmt.io/v3" + read_only : true + } ]; + string kind = 2 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Kind", + description : "Kind of the resource" + default : "Cluster" + read_only : true + } ]; + rafay.dev.types.common.v3.Metadata metadata = 3 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Metadata", + description : "Metadata of the resource" + } ]; + OverrideSpec spec = 4 + [ (gogoproto.nullable) = false, (gogoproto.embed) = true ]; + rafay.dev.types.common.v3.Status status = 5 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Status", + description : "Status of the resource" + read_only : true + } ]; +} + +// OverrideList is a list of overrides +message OverrideList { + string apiVersion = 1 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "API Version", + description : "API Version of the list resource" + default : "config.k8smgmt.io/v3" + read_only : true + } ]; + string kind = 2 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Kind", + description : "Kind of the list resource" + default : "ClusterList" + read_only : true + } ]; + rafay.dev.types.common.v3.ListMetadata metadata = 3 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "ListMetadata", + description : "Metadata of the list resource" + read_only : true + } ]; + repeated Override items = 4; +} + +message ClusterOverride { + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { + json_schema : { + title : "ClusterOverride" + description : "ClusterOverride" + required : [ "apiVersion", "kind", "metadata", "spec" ] + } + }; + string apiVersion = 1 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "API Version", + description : "API Version of the resource" + default : "config.k8smgmt.io/v3" + read_only : true + } ]; + string kind = 2 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Kind", + description : "Kind of the resource" + default : "Cluster" + read_only : true + } ]; + rafay.dev.types.common.v3.Metadata metadata = 3 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Metadata", + description : "Metadata of the resource" + } ]; + ClusterOverrideSpec spec = 4 + [ (gogoproto.nullable) = false, (gogoproto.embed) = true ]; + rafay.dev.types.common.v3.Status status = 5 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Status", + description : "Status of the resource" + read_only : true + } ]; +} + +// OverrideSpec is the specification of override +message ClusterOverrideSpec { + string clusterSelector = 1; + string resourceSelector = 2; + ClusterOverrideType type = 3; + string overrideValues = 4; + rafay.dev.types.config.PlacementSpec clusterPlacement = 5; + string repositoryRef = 6; + rafay.dev.types.config.RepoArtifactMeta repoArtifactMeta = 7; +} + +enum ClusterOverrideType { + // disable enum prefix + option (gogoproto.goproto_enum_prefix) = false; + + ClusterOverrideTypeUnknown = 0; + ClusterOverrideTypeWorkload = 1; + ClusterOverrideTypeAddon = 2; + ClusterOverrideTypeNamespace = 3; + ClusterOverrideTypeBlueprint = 4; +} + +// OverrideList is a list of overrides +message ClusterOverrideList { + string apiVersion = 1 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "API Version", + description : "API Version of the list resource" + default : "config.k8smgmt.io/v3" + read_only : true + } ]; + string kind = 2 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Kind", + description : "Kind of the list resource" + default : "ClusterOverrideList" + read_only : true + } ]; + rafay.dev.types.common.v3.ListMetadata metadata = 3 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "ListMetadata", + description : "Metadata of the list resource" + read_only : true + } ]; + repeated ClusterOverride items = 4; +} \ No newline at end of file diff --git a/components/common/proto/types/config/placement.pb.go b/components/common/proto/types/config/placement.pb.go new file mode 100644 index 0000000..8156ef4 --- /dev/null +++ b/components/common/proto/types/config/placement.pb.go @@ -0,0 +1,755 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc (unknown) +// source: proto/types/config/placement.proto + +package config + +import ( + v3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/commonpb/v3" + _ "github.com/gogo/protobuf/gogoproto" + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type DriftReconcillationAction int32 + +const ( + DriftReconcillationAction_DriftReconcillationActionNotSet DriftReconcillationAction = 0 + DriftReconcillationAction_DriftReconcillationActionNotify DriftReconcillationAction = 1 + DriftReconcillationAction_DriftReconcillationActionDeny DriftReconcillationAction = 2 +) + +// Enum value maps for DriftReconcillationAction. +var ( + DriftReconcillationAction_name = map[int32]string{ + 0: "DriftReconcillationActionNotSet", + 1: "DriftReconcillationActionNotify", + 2: "DriftReconcillationActionDeny", + } + DriftReconcillationAction_value = map[string]int32{ + "DriftReconcillationActionNotSet": 0, + "DriftReconcillationActionNotify": 1, + "DriftReconcillationActionDeny": 2, + } +) + +func (x DriftReconcillationAction) Enum() *DriftReconcillationAction { + p := new(DriftReconcillationAction) + *p = x + return p +} + +func (x DriftReconcillationAction) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (DriftReconcillationAction) Descriptor() protoreflect.EnumDescriptor { + return file_proto_types_config_placement_proto_enumTypes[0].Descriptor() +} + +func (DriftReconcillationAction) Type() protoreflect.EnumType { + return &file_proto_types_config_placement_proto_enumTypes[0] +} + +func (x DriftReconcillationAction) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use DriftReconcillationAction.Descriptor instead. +func (DriftReconcillationAction) EnumDescriptor() ([]byte, []int) { + return file_proto_types_config_placement_proto_rawDescGZIP(), []int{0} +} + +type PlacementType int32 + +const ( + PlacementType_ClusterSelector PlacementType = 0 + PlacementType_ClusterLocations PlacementType = 1 + PlacementType_ClusterLabels PlacementType = 2 + PlacementType_ClusterSpecific PlacementType = 3 +) + +// Enum value maps for PlacementType. +var ( + PlacementType_name = map[int32]string{ + 0: "ClusterSelector", + 1: "ClusterLocations", + 2: "ClusterLabels", + 3: "ClusterSpecific", + } + PlacementType_value = map[string]int32{ + "ClusterSelector": 0, + "ClusterLocations": 1, + "ClusterLabels": 2, + "ClusterSpecific": 3, + } +) + +func (x PlacementType) Enum() *PlacementType { + p := new(PlacementType) + *p = x + return p +} + +func (x PlacementType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (PlacementType) Descriptor() protoreflect.EnumDescriptor { + return file_proto_types_config_placement_proto_enumTypes[1].Descriptor() +} + +func (PlacementType) Type() protoreflect.EnumType { + return &file_proto_types_config_placement_proto_enumTypes[1] +} + +func (x PlacementType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use PlacementType.Descriptor instead. +func (PlacementType) EnumDescriptor() ([]byte, []int) { + return file_proto_types_config_placement_proto_rawDescGZIP(), []int{1} +} + +type PlacementLabel struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *PlacementLabel) Reset() { + *x = PlacementLabel{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_config_placement_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PlacementLabel) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PlacementLabel) ProtoMessage() {} + +func (x *PlacementLabel) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_config_placement_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PlacementLabel.ProtoReflect.Descriptor instead. +func (*PlacementLabel) Descriptor() ([]byte, []int) { + return file_proto_types_config_placement_proto_rawDescGZIP(), []int{0} +} + +func (x *PlacementLabel) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +func (x *PlacementLabel) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +// PlacementTemplate is the template for creating placements +type PlacementTemplate struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metadata *v3.Metadata `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *PlacementSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` +} + +func (x *PlacementTemplate) Reset() { + *x = PlacementTemplate{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_config_placement_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PlacementTemplate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PlacementTemplate) ProtoMessage() {} + +func (x *PlacementTemplate) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_config_placement_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PlacementTemplate.ProtoReflect.Descriptor instead. +func (*PlacementTemplate) Descriptor() ([]byte, []int) { + return file_proto_types_config_placement_proto_rawDescGZIP(), []int{1} +} + +func (x *PlacementTemplate) GetMetadata() *v3.Metadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *PlacementTemplate) GetSpec() *PlacementSpec { + if x != nil { + return x.Spec + } + return nil +} + +// PlacementSpec is the specification of placement +type PlacementSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // placementType is the type of placement + PlacementType PlacementType `protobuf:"varint,1,opt,name=placementType,proto3,enum=rafay.dev.types.config.PlacementType" json:"placementType,omitempty"` + ClusterSelector string `protobuf:"bytes,2,opt,name=clusterSelector,proto3" json:"clusterSelector,omitempty"` + DriftAction DriftReconcillationAction `protobuf:"varint,3,opt,name=driftAction,proto3,enum=rafay.dev.types.config.DriftReconcillationAction" json:"driftAction,omitempty"` + ClusterLabels []*PlacementLabel `protobuf:"bytes,4,rep,name=clusterLabels,proto3" json:"clusterLabels,omitempty"` + NodeGroupingKeys []string `protobuf:"bytes,5,rep,name=nodeGroupingKeys,proto3" json:"nodeGroupingKeys,omitempty"` +} + +func (x *PlacementSpec) Reset() { + *x = PlacementSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_config_placement_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PlacementSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PlacementSpec) ProtoMessage() {} + +func (x *PlacementSpec) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_config_placement_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PlacementSpec.ProtoReflect.Descriptor instead. +func (*PlacementSpec) Descriptor() ([]byte, []int) { + return file_proto_types_config_placement_proto_rawDescGZIP(), []int{2} +} + +func (x *PlacementSpec) GetPlacementType() PlacementType { + if x != nil { + return x.PlacementType + } + return PlacementType_ClusterSelector +} + +func (x *PlacementSpec) GetClusterSelector() string { + if x != nil { + return x.ClusterSelector + } + return "" +} + +func (x *PlacementSpec) GetDriftAction() DriftReconcillationAction { + if x != nil { + return x.DriftAction + } + return DriftReconcillationAction_DriftReconcillationActionNotSet +} + +func (x *PlacementSpec) GetClusterLabels() []*PlacementLabel { + if x != nil { + return x.ClusterLabels + } + return nil +} + +func (x *PlacementSpec) GetNodeGroupingKeys() []string { + if x != nil { + return x.NodeGroupingKeys + } + return nil +} + +// Placement defines how clusters have to be selected for a taskset +type Placement struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ApiVersion string `protobuf:"bytes,1,opt,name=apiVersion,proto3" json:"apiVersion,omitempty"` + Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"` + Metadata *v3.Metadata `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *PlacementSpec `protobuf:"bytes,4,opt,name=spec,proto3" json:"spec,omitempty"` + Status *v3.Status `protobuf:"bytes,5,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *Placement) Reset() { + *x = Placement{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_config_placement_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Placement) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Placement) ProtoMessage() {} + +func (x *Placement) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_config_placement_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Placement.ProtoReflect.Descriptor instead. +func (*Placement) Descriptor() ([]byte, []int) { + return file_proto_types_config_placement_proto_rawDescGZIP(), []int{3} +} + +func (x *Placement) GetApiVersion() string { + if x != nil { + return x.ApiVersion + } + return "" +} + +func (x *Placement) GetKind() string { + if x != nil { + return x.Kind + } + return "" +} + +func (x *Placement) GetMetadata() *v3.Metadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *Placement) GetSpec() *PlacementSpec { + if x != nil { + return x.Spec + } + return nil +} + +func (x *Placement) GetStatus() *v3.Status { + if x != nil { + return x.Status + } + return nil +} + +// PlacementList is a list of placements +type PlacementList struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ApiVersion string `protobuf:"bytes,1,opt,name=apiVersion,proto3" json:"apiVersion,omitempty"` + Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"` + Metadata *v3.ListMetadata `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` + Items []*Placement `protobuf:"bytes,4,rep,name=items,proto3" json:"items,omitempty"` +} + +func (x *PlacementList) Reset() { + *x = PlacementList{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_config_placement_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PlacementList) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PlacementList) ProtoMessage() {} + +func (x *PlacementList) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_config_placement_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PlacementList.ProtoReflect.Descriptor instead. +func (*PlacementList) Descriptor() ([]byte, []int) { + return file_proto_types_config_placement_proto_rawDescGZIP(), []int{4} +} + +func (x *PlacementList) GetApiVersion() string { + if x != nil { + return x.ApiVersion + } + return "" +} + +func (x *PlacementList) GetKind() string { + if x != nil { + return x.Kind + } + return "" +} + +func (x *PlacementList) GetMetadata() *v3.ListMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *PlacementList) GetItems() []*Placement { + if x != nil { + return x.Items + } + return nil +} + +var File_proto_types_config_placement_proto protoreflect.FileDescriptor + +var file_proto_types_config_placement_proto_rawDesc = []byte{ + 0x0a, 0x22, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, + 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, + 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x24, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x70, 0x62, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x38, 0x0a, 0x0e, 0x50, 0x6c, 0x61, 0x63, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x22, 0xa3, 0x01, 0x0a, 0x11, 0x50, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x49, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x72, 0x61, 0x66, + 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, + 0x08, 0xc8, 0xde, 0x1f, 0x00, 0xd0, 0xde, 0x1f, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x12, 0x43, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x25, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x50, 0x6c, 0x61, 0x63, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x70, 0x65, 0x63, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0xd0, 0xde, + 0x1f, 0x01, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, 0xac, 0x04, 0x0a, 0x0d, 0x50, 0x6c, 0x61, + 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x70, 0x65, 0x63, 0x12, 0x7e, 0x0a, 0x0d, 0x70, 0x6c, + 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x25, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x50, 0x6c, 0x61, 0x63, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x42, 0x31, 0xea, 0xde, 0x1f, 0x0d, 0x70, 0x6c, + 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0xf2, 0xde, 0x1f, 0x1c, 0x70, + 0x67, 0x3a, 0x22, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x2c, 0x75, 0x73, 0x65, 0x5f, 0x7a, 0x65, 0x72, 0x6f, 0x22, 0x52, 0x0d, 0x70, 0x6c, 0x61, + 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x5f, 0x0a, 0x0f, 0x63, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x35, 0xea, 0xde, 0x1f, 0x0f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0xf2, 0xde, 0x1f, 0x1e, 0x70, 0x67, 0x3a, 0x22, + 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x2c, 0x75, 0x73, 0x65, 0x5f, 0x7a, 0x65, 0x72, 0x6f, 0x22, 0x52, 0x0f, 0x63, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x82, 0x01, 0x0a, 0x0b, + 0x64, 0x72, 0x69, 0x66, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x31, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x44, 0x72, 0x69, 0x66, 0x74, + 0x52, 0x65, 0x63, 0x6f, 0x6e, 0x63, 0x69, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x2d, 0xea, 0xde, 0x1f, 0x0b, 0x64, 0x72, 0x69, 0x66, 0x74, 0x41, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0xf2, 0xde, 0x1f, 0x1a, 0x70, 0x67, 0x3a, 0x22, 0x64, 0x72, 0x69, + 0x66, 0x74, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x75, 0x73, 0x65, 0x5f, 0x7a, 0x65, + 0x72, 0x6f, 0x22, 0x52, 0x0b, 0x64, 0x72, 0x69, 0x66, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x69, 0x0a, 0x0d, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4c, 0x61, 0x62, 0x65, 0x6c, + 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, + 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x50, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x42, + 0x1b, 0xea, 0xde, 0x1f, 0x0d, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4c, 0x61, 0x62, 0x65, + 0x6c, 0x73, 0xf2, 0xde, 0x1f, 0x06, 0x70, 0x67, 0x3a, 0x22, 0x2d, 0x22, 0x52, 0x0d, 0x63, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x4a, 0x0a, 0x10, 0x6e, + 0x6f, 0x64, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x69, 0x6e, 0x67, 0x4b, 0x65, 0x79, 0x73, 0x18, + 0x05, 0x20, 0x03, 0x28, 0x09, 0x42, 0x1e, 0xea, 0xde, 0x1f, 0x10, 0x6e, 0x6f, 0x64, 0x65, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x69, 0x6e, 0x67, 0x4b, 0x65, 0x79, 0x73, 0xf2, 0xde, 0x1f, 0x06, 0x70, + 0x67, 0x3a, 0x22, 0x2d, 0x22, 0x52, 0x10, 0x6e, 0x6f, 0x64, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x69, 0x6e, 0x67, 0x4b, 0x65, 0x79, 0x73, 0x22, 0x97, 0x04, 0x0a, 0x09, 0x50, 0x6c, 0x61, 0x63, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x65, 0x0a, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x45, 0x92, 0x41, 0x42, 0x2a, 0x0b, + 0x41, 0x50, 0x49, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0x1b, 0x41, 0x50, 0x49, + 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, 0x14, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x6b, 0x38, 0x73, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x69, 0x6f, 0x2f, 0x76, 0x33, 0x40, 0x01, + 0x52, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x4f, 0x0a, 0x04, + 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x3b, 0x92, 0x41, 0x38, 0x2a, + 0x04, 0x4b, 0x69, 0x6e, 0x64, 0x32, 0x19, 0x4b, 0x69, 0x6e, 0x64, 0x20, 0x6f, 0x66, 0x20, 0x74, + 0x68, 0x65, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x3a, 0x13, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, + 0x65, 0x4c, 0x69, 0x73, 0x74, 0x40, 0x01, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x68, 0x0a, + 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x23, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x42, 0x27, 0x92, 0x41, 0x24, 0x2a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x32, 0x18, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x20, 0x6f, 0x66, + 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x43, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, + 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x50, + 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x70, 0x65, 0x63, 0x42, 0x08, 0xc8, 0xde, + 0x1f, 0x00, 0xd0, 0xde, 0x1f, 0x01, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x60, 0x0a, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x72, + 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, + 0x25, 0x92, 0x41, 0x22, 0x2a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x32, 0x16, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x40, 0x01, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x3a, 0x41, + 0x92, 0x41, 0x3e, 0x0a, 0x3c, 0x2a, 0x09, 0x50, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x32, 0x09, 0x50, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0xd2, 0x01, 0x0a, 0x61, 0x70, + 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0xd2, 0x01, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0xd2, + 0x01, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xd2, 0x01, 0x04, 0x73, 0x70, 0x65, + 0x63, 0x22, 0xf8, 0x02, 0x0a, 0x0d, 0x50, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x4c, + 0x69, 0x73, 0x74, 0x12, 0x6a, 0x0a, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x4a, 0x92, 0x41, 0x47, 0x2a, 0x0b, 0x41, 0x50, + 0x49, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0x20, 0x41, 0x50, 0x49, 0x20, 0x56, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x69, + 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, 0x14, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x6b, 0x38, 0x73, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x69, 0x6f, 0x2f, 0x76, + 0x33, 0x40, 0x01, 0x52, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, + 0x49, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x35, 0x92, + 0x41, 0x32, 0x2a, 0x04, 0x4b, 0x69, 0x6e, 0x64, 0x32, 0x19, 0x4b, 0x69, 0x6e, 0x64, 0x20, 0x6f, + 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x3a, 0x0d, 0x50, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69, + 0x73, 0x74, 0x40, 0x01, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x77, 0x0a, 0x08, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x72, + 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x32, 0x92, 0x41, 0x2f, 0x2a, 0x0c, 0x4c, 0x69, 0x73, 0x74, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x32, 0x1d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x72, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x40, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x12, 0x37, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x50, 0x6c, 0x61, 0x63, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x2a, 0x8e, 0x01, 0x0a, + 0x19, 0x44, 0x72, 0x69, 0x66, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x6e, 0x63, 0x69, 0x6c, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x1f, 0x44, 0x72, + 0x69, 0x66, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x6e, 0x63, 0x69, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x53, 0x65, 0x74, 0x10, 0x00, 0x12, + 0x23, 0x0a, 0x1f, 0x44, 0x72, 0x69, 0x66, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x6e, 0x63, 0x69, 0x6c, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x69, + 0x66, 0x79, 0x10, 0x01, 0x12, 0x21, 0x0a, 0x1d, 0x44, 0x72, 0x69, 0x66, 0x74, 0x52, 0x65, 0x63, + 0x6f, 0x6e, 0x63, 0x69, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x44, 0x65, 0x6e, 0x79, 0x10, 0x02, 0x1a, 0x04, 0x88, 0xa3, 0x1e, 0x00, 0x2a, 0x68, 0x0a, + 0x0d, 0x50, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x13, + 0x0a, 0x0f, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, + 0x72, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4c, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x43, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, + 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x10, + 0x03, 0x1a, 0x04, 0x88, 0xa3, 0x1e, 0x00, 0x42, 0xf2, 0x01, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, + 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x0e, 0x50, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x48, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x61, 0x66, 0x61, 0x79, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, + 0x73, 0x2f, 0x72, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x63, 0x6f, + 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0xa2, 0x02, 0x04, 0x52, 0x44, 0x54, 0x43, 0xaa, 0x02, 0x16, 0x52, 0x61, 0x66, 0x61, + 0x79, 0x2e, 0x44, 0x65, 0x76, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0xca, 0x02, 0x16, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x54, + 0x79, 0x70, 0x65, 0x73, 0x5c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0xe2, 0x02, 0x22, 0x52, 0x61, + 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x5c, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0xea, 0x02, 0x19, 0x52, 0x61, 0x66, 0x61, 0x79, 0x3a, 0x3a, 0x44, 0x65, 0x76, 0x3a, 0x3a, 0x54, + 0x79, 0x70, 0x65, 0x73, 0x3a, 0x3a, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_proto_types_config_placement_proto_rawDescOnce sync.Once + file_proto_types_config_placement_proto_rawDescData = file_proto_types_config_placement_proto_rawDesc +) + +func file_proto_types_config_placement_proto_rawDescGZIP() []byte { + file_proto_types_config_placement_proto_rawDescOnce.Do(func() { + file_proto_types_config_placement_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_types_config_placement_proto_rawDescData) + }) + return file_proto_types_config_placement_proto_rawDescData +} + +var file_proto_types_config_placement_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_proto_types_config_placement_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_proto_types_config_placement_proto_goTypes = []interface{}{ + (DriftReconcillationAction)(0), // 0: rafay.dev.types.config.DriftReconcillationAction + (PlacementType)(0), // 1: rafay.dev.types.config.PlacementType + (*PlacementLabel)(nil), // 2: rafay.dev.types.config.PlacementLabel + (*PlacementTemplate)(nil), // 3: rafay.dev.types.config.PlacementTemplate + (*PlacementSpec)(nil), // 4: rafay.dev.types.config.PlacementSpec + (*Placement)(nil), // 5: rafay.dev.types.config.Placement + (*PlacementList)(nil), // 6: rafay.dev.types.config.PlacementList + (*v3.Metadata)(nil), // 7: rafay.dev.types.common.v3.Metadata + (*v3.Status)(nil), // 8: rafay.dev.types.common.v3.Status + (*v3.ListMetadata)(nil), // 9: rafay.dev.types.common.v3.ListMetadata +} +var file_proto_types_config_placement_proto_depIdxs = []int32{ + 7, // 0: rafay.dev.types.config.PlacementTemplate.metadata:type_name -> rafay.dev.types.common.v3.Metadata + 4, // 1: rafay.dev.types.config.PlacementTemplate.spec:type_name -> rafay.dev.types.config.PlacementSpec + 1, // 2: rafay.dev.types.config.PlacementSpec.placementType:type_name -> rafay.dev.types.config.PlacementType + 0, // 3: rafay.dev.types.config.PlacementSpec.driftAction:type_name -> rafay.dev.types.config.DriftReconcillationAction + 2, // 4: rafay.dev.types.config.PlacementSpec.clusterLabels:type_name -> rafay.dev.types.config.PlacementLabel + 7, // 5: rafay.dev.types.config.Placement.metadata:type_name -> rafay.dev.types.common.v3.Metadata + 4, // 6: rafay.dev.types.config.Placement.spec:type_name -> rafay.dev.types.config.PlacementSpec + 8, // 7: rafay.dev.types.config.Placement.status:type_name -> rafay.dev.types.common.v3.Status + 9, // 8: rafay.dev.types.config.PlacementList.metadata:type_name -> rafay.dev.types.common.v3.ListMetadata + 5, // 9: rafay.dev.types.config.PlacementList.items:type_name -> rafay.dev.types.config.Placement + 10, // [10:10] is the sub-list for method output_type + 10, // [10:10] is the sub-list for method input_type + 10, // [10:10] is the sub-list for extension type_name + 10, // [10:10] is the sub-list for extension extendee + 0, // [0:10] is the sub-list for field type_name +} + +func init() { file_proto_types_config_placement_proto_init() } +func file_proto_types_config_placement_proto_init() { + if File_proto_types_config_placement_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_proto_types_config_placement_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PlacementLabel); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_config_placement_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PlacementTemplate); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_config_placement_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PlacementSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_config_placement_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Placement); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_config_placement_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PlacementList); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_proto_types_config_placement_proto_rawDesc, + NumEnums: 2, + NumMessages: 5, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_proto_types_config_placement_proto_goTypes, + DependencyIndexes: file_proto_types_config_placement_proto_depIdxs, + EnumInfos: file_proto_types_config_placement_proto_enumTypes, + MessageInfos: file_proto_types_config_placement_proto_msgTypes, + }.Build() + File_proto_types_config_placement_proto = out.File + file_proto_types_config_placement_proto_rawDesc = nil + file_proto_types_config_placement_proto_goTypes = nil + file_proto_types_config_placement_proto_depIdxs = nil +} diff --git a/components/common/proto/types/config/placement.proto b/components/common/proto/types/config/placement.proto new file mode 100644 index 0000000..3ed44b1 --- /dev/null +++ b/components/common/proto/types/config/placement.proto @@ -0,0 +1,127 @@ +syntax = "proto3"; +package rafay.dev.types.config; + +import "protoc-gen-openapiv2/options/annotations.proto"; +import "gogoproto/gogo.proto"; +import "proto/types/commonpb/v3/common.proto"; + +enum DriftReconcillationAction { + // disable enum prefix + option (gogoproto.goproto_enum_prefix) = false; + + DriftReconcillationActionNotSet = 0; + DriftReconcillationActionNotify = 1; + DriftReconcillationActionDeny = 2; +} + +enum PlacementType { + // disable enum prefix + option (gogoproto.goproto_enum_prefix) = false; + + ClusterSelector = 0; + ClusterLocations = 1; + ClusterLabels = 2; + ClusterSpecific = 3; +} + +message PlacementLabel { + string key = 1; + string value = 2; +} + +// PlacementTemplate is the template for creating placements +message PlacementTemplate { + rafay.dev.types.common.v3.Metadata metadata = 3 + [ (gogoproto.nullable) = false, (gogoproto.embed) = true ]; + PlacementSpec spec = 2 + [ (gogoproto.nullable) = false, (gogoproto.embed) = true ]; +} + +// PlacementSpec is the specification of placement +message PlacementSpec { + // placementType is the type of placement + PlacementType placementType = 1 [ + (gogoproto.jsontag) = "placementType", + (gogoproto.moretags) = "pg:\"placement_type,use_zero\"" + ]; + string clusterSelector = 2 [ + (gogoproto.moretags) = "pg:\"cluster_selector,use_zero\"", + (gogoproto.jsontag) = "clusterSelector" + ]; + + DriftReconcillationAction driftAction = 3 [ + (gogoproto.moretags) = "pg:\"drift_action,use_zero\"", + (gogoproto.jsontag) = "driftAction" + ]; + repeated PlacementLabel clusterLabels = 4 [ + (gogoproto.moretags) = "pg:\"-\"", + (gogoproto.jsontag) = "clusterLabels" + ]; + repeated string nodeGroupingKeys = 5 [ + (gogoproto.moretags) = "pg:\"-\"", + (gogoproto.jsontag) = "nodeGroupingKeys" + ]; +} + +// Placement defines how clusters have to be selected for a taskset +message Placement { + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { + json_schema : { + title : "Placement" + description : "Placement" + required : [ "apiVersion", "kind", "metadata", "spec" ] + } + }; + string apiVersion = 1 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "API Version", + description : "API Version of the resource" + default : "config.k8smgmt.io/v3" + read_only : true + } ]; + string kind = 2 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Kind", + description : "Kind of the list resource" + default : "ClusterOverrideList" + read_only : true + } ]; + rafay.dev.types.common.v3.Metadata metadata = 3 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Metadata", + description : "Metadata of the resource" + } ]; + PlacementSpec spec = 4 + [ (gogoproto.nullable) = false, (gogoproto.embed) = true ]; + rafay.dev.types.common.v3.Status status = 5 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Status", + description : "Status of the resource" + read_only : true + } ]; +} + +// PlacementList is a list of placements +message PlacementList { + string apiVersion = 1 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "API Version", + description : "API Version of the list resource" + default : "config.k8smgmt.io/v3" + read_only : true + } ]; + string kind = 2 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Kind", + description : "Kind of the list resource" + default : "PlacementList" + read_only : true + } ]; + rafay.dev.types.common.v3.ListMetadata metadata = 3 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "ListMetadata", + description : "Metadata of the list resource" + read_only : true + } ]; + repeated Placement items = 4; +} \ No newline at end of file diff --git a/components/common/proto/types/config/repository.pb.go b/components/common/proto/types/config/repository.pb.go new file mode 100644 index 0000000..1b72320 --- /dev/null +++ b/components/common/proto/types/config/repository.pb.go @@ -0,0 +1,1049 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc (unknown) +// source: proto/types/config/repository.proto + +package config + +import ( + v3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/commonpb/v3" + _ "github.com/gogo/protobuf/gogoproto" + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type RepositoryType int32 + +const ( + RepositoryType_RepositoryTypeNotSet RepositoryType = 0 + RepositoryType_GitRepository RepositoryType = 1 + RepositoryType_HelmRepository RepositoryType = 2 +) + +// Enum value maps for RepositoryType. +var ( + RepositoryType_name = map[int32]string{ + 0: "RepositoryTypeNotSet", + 1: "GitRepository", + 2: "HelmRepository", + } + RepositoryType_value = map[string]int32{ + "RepositoryTypeNotSet": 0, + "GitRepository": 1, + "HelmRepository": 2, + } +) + +func (x RepositoryType) Enum() *RepositoryType { + p := new(RepositoryType) + *p = x + return p +} + +func (x RepositoryType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (RepositoryType) Descriptor() protoreflect.EnumDescriptor { + return file_proto_types_config_repository_proto_enumTypes[0].Descriptor() +} + +func (RepositoryType) Type() protoreflect.EnumType { + return &file_proto_types_config_repository_proto_enumTypes[0] +} + +func (x RepositoryType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use RepositoryType.Descriptor instead. +func (RepositoryType) EnumDescriptor() ([]byte, []int) { + return file_proto_types_config_repository_proto_rawDescGZIP(), []int{0} +} + +type RepositoryCredentialType int32 + +const ( + RepositoryCredentialType_CredentialTypeNotSet RepositoryCredentialType = 0 + RepositoryCredentialType_UserPassCredential RepositoryCredentialType = 1 + RepositoryCredentialType_SSHCredential RepositoryCredentialType = 2 +) + +// Enum value maps for RepositoryCredentialType. +var ( + RepositoryCredentialType_name = map[int32]string{ + 0: "CredentialTypeNotSet", + 1: "UserPassCredential", + 2: "SSHCredential", + } + RepositoryCredentialType_value = map[string]int32{ + "CredentialTypeNotSet": 0, + "UserPassCredential": 1, + "SSHCredential": 2, + } +) + +func (x RepositoryCredentialType) Enum() *RepositoryCredentialType { + p := new(RepositoryCredentialType) + *p = x + return p +} + +func (x RepositoryCredentialType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (RepositoryCredentialType) Descriptor() protoreflect.EnumDescriptor { + return file_proto_types_config_repository_proto_enumTypes[1].Descriptor() +} + +func (RepositoryCredentialType) Type() protoreflect.EnumType { + return &file_proto_types_config_repository_proto_enumTypes[1] +} + +func (x RepositoryCredentialType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use RepositoryCredentialType.Descriptor instead. +func (RepositoryCredentialType) EnumDescriptor() ([]byte, []int) { + return file_proto_types_config_repository_proto_rawDescGZIP(), []int{1} +} + +// Repository is a first class object for storing reference to git,helm, etc +// repo +type Repository struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ApiVersion string `protobuf:"bytes,1,opt,name=apiVersion,proto3" json:"apiVersion,omitempty"` + Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"` + Metadata *v3.Metadata `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *RepositorySpec `protobuf:"bytes,4,opt,name=spec,proto3" json:"spec,omitempty"` + Status *RepositoryStatus `protobuf:"bytes,5,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *Repository) Reset() { + *x = Repository{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_config_repository_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Repository) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Repository) ProtoMessage() {} + +func (x *Repository) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_config_repository_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Repository.ProtoReflect.Descriptor instead. +func (*Repository) Descriptor() ([]byte, []int) { + return file_proto_types_config_repository_proto_rawDescGZIP(), []int{0} +} + +func (x *Repository) GetApiVersion() string { + if x != nil { + return x.ApiVersion + } + return "" +} + +func (x *Repository) GetKind() string { + if x != nil { + return x.Kind + } + return "" +} + +func (x *Repository) GetMetadata() *v3.Metadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *Repository) GetSpec() *RepositorySpec { + if x != nil { + return x.Spec + } + return nil +} + +func (x *Repository) GetStatus() *RepositoryStatus { + if x != nil { + return x.Status + } + return nil +} + +type AgentRef struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *AgentRef) Reset() { + *x = AgentRef{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_config_repository_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AgentRef) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AgentRef) ProtoMessage() {} + +func (x *AgentRef) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_config_repository_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AgentRef.ProtoReflect.Descriptor instead. +func (*AgentRef) Descriptor() ([]byte, []int) { + return file_proto_types_config_repository_proto_rawDescGZIP(), []int{1} +} + +func (x *AgentRef) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *AgentRef) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +// RepositorySpec is the spec of SecretStore +type RepositorySpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // helm, git etc + RepositoryType RepositoryType `protobuf:"varint,1,opt,name=repositoryType,proto3,enum=rafay.dev.types.config.RepositoryType" json:"repositoryType,omitempty"` + // Https URL or SSH URL + Endpoint string `protobuf:"bytes,2,opt,name=endpoint,proto3" json:"endpoint,omitempty"` + Insecure bool `protobuf:"varint,3,opt,name=insecure,proto3" json:"insecure,omitempty"` + CaCert string `protobuf:"bytes,4,opt,name=caCert,proto3" json:"caCert,omitempty"` + Credentials *RepoCredentials `protobuf:"bytes,5,opt,name=credentials,proto3" json:"credentials,omitempty"` + AgentNames []string `protobuf:"bytes,6,rep,name=agentNames,proto3" json:"agentNames,omitempty"` + CredentialType RepositoryCredentialType `protobuf:"varint,7,opt,name=credentialType,proto3,enum=rafay.dev.types.config.RepositoryCredentialType" json:"credentialType,omitempty"` + InternalNetworkAccessOnly bool `protobuf:"varint,9,opt,name=internalNetworkAccessOnly,proto3" json:"internalNetworkAccessOnly,omitempty"` + EnableSubmodules bool `protobuf:"varint,10,opt,name=enableSubmodules,proto3" json:"enableSubmodules,omitempty"` + MaxRetires int64 `protobuf:"zigzag64,11,opt,name=maxRetires,proto3" json:"maxRetires,omitempty"` + EnableLFS bool `protobuf:"varint,12,opt,name=enableLFS,proto3" json:"enableLFS,omitempty"` +} + +func (x *RepositorySpec) Reset() { + *x = RepositorySpec{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_config_repository_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RepositorySpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RepositorySpec) ProtoMessage() {} + +func (x *RepositorySpec) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_config_repository_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RepositorySpec.ProtoReflect.Descriptor instead. +func (*RepositorySpec) Descriptor() ([]byte, []int) { + return file_proto_types_config_repository_proto_rawDescGZIP(), []int{2} +} + +func (x *RepositorySpec) GetRepositoryType() RepositoryType { + if x != nil { + return x.RepositoryType + } + return RepositoryType_RepositoryTypeNotSet +} + +func (x *RepositorySpec) GetEndpoint() string { + if x != nil { + return x.Endpoint + } + return "" +} + +func (x *RepositorySpec) GetInsecure() bool { + if x != nil { + return x.Insecure + } + return false +} + +func (x *RepositorySpec) GetCaCert() string { + if x != nil { + return x.CaCert + } + return "" +} + +func (x *RepositorySpec) GetCredentials() *RepoCredentials { + if x != nil { + return x.Credentials + } + return nil +} + +func (x *RepositorySpec) GetAgentNames() []string { + if x != nil { + return x.AgentNames + } + return nil +} + +func (x *RepositorySpec) GetCredentialType() RepositoryCredentialType { + if x != nil { + return x.CredentialType + } + return RepositoryCredentialType_CredentialTypeNotSet +} + +func (x *RepositorySpec) GetInternalNetworkAccessOnly() bool { + if x != nil { + return x.InternalNetworkAccessOnly + } + return false +} + +func (x *RepositorySpec) GetEnableSubmodules() bool { + if x != nil { + return x.EnableSubmodules + } + return false +} + +func (x *RepositorySpec) GetMaxRetires() int64 { + if x != nil { + return x.MaxRetires + } + return 0 +} + +func (x *RepositorySpec) GetEnableLFS() bool { + if x != nil { + return x.EnableLFS + } + return false +} + +type RepositoryStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Agents []*AgentRef `protobuf:"bytes,2,rep,name=agents,proto3" json:"agents,omitempty"` +} + +func (x *RepositoryStatus) Reset() { + *x = RepositoryStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_config_repository_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RepositoryStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RepositoryStatus) ProtoMessage() {} + +func (x *RepositoryStatus) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_config_repository_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RepositoryStatus.ProtoReflect.Descriptor instead. +func (*RepositoryStatus) Descriptor() ([]byte, []int) { + return file_proto_types_config_repository_proto_rawDescGZIP(), []int{3} +} + +func (x *RepositoryStatus) GetAgents() []*AgentRef { + if x != nil { + return x.Agents + } + return nil +} + +type RepoCredentials struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UserPass *RepoUserPassCredentials `protobuf:"bytes,1,opt,name=userPass,proto3" json:"userPass,omitempty"` + Ssh *RepoSSHCredentials `protobuf:"bytes,2,opt,name=ssh,proto3" json:"ssh,omitempty"` +} + +func (x *RepoCredentials) Reset() { + *x = RepoCredentials{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_config_repository_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RepoCredentials) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RepoCredentials) ProtoMessage() {} + +func (x *RepoCredentials) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_config_repository_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RepoCredentials.ProtoReflect.Descriptor instead. +func (*RepoCredentials) Descriptor() ([]byte, []int) { + return file_proto_types_config_repository_proto_rawDescGZIP(), []int{4} +} + +func (x *RepoCredentials) GetUserPass() *RepoUserPassCredentials { + if x != nil { + return x.UserPass + } + return nil +} + +func (x *RepoCredentials) GetSsh() *RepoSSHCredentials { + if x != nil { + return x.Ssh + } + return nil +} + +type RepoUserPassCredentials struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` + Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` + ClientCertData string `protobuf:"bytes,3,opt,name=clientCertData,proto3" json:"clientCertData,omitempty"` + ClientCertKey string `protobuf:"bytes,4,opt,name=clientCertKey,proto3" json:"clientCertKey,omitempty"` +} + +func (x *RepoUserPassCredentials) Reset() { + *x = RepoUserPassCredentials{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_config_repository_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RepoUserPassCredentials) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RepoUserPassCredentials) ProtoMessage() {} + +func (x *RepoUserPassCredentials) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_config_repository_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RepoUserPassCredentials.ProtoReflect.Descriptor instead. +func (*RepoUserPassCredentials) Descriptor() ([]byte, []int) { + return file_proto_types_config_repository_proto_rawDescGZIP(), []int{5} +} + +func (x *RepoUserPassCredentials) GetUsername() string { + if x != nil { + return x.Username + } + return "" +} + +func (x *RepoUserPassCredentials) GetPassword() string { + if x != nil { + return x.Password + } + return "" +} + +func (x *RepoUserPassCredentials) GetClientCertData() string { + if x != nil { + return x.ClientCertData + } + return "" +} + +func (x *RepoUserPassCredentials) GetClientCertKey() string { + if x != nil { + return x.ClientCertKey + } + return "" +} + +type RepoSSHCredentials struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SshPrivateKey string `protobuf:"bytes,1,opt,name=sshPrivateKey,proto3" json:"sshPrivateKey,omitempty"` +} + +func (x *RepoSSHCredentials) Reset() { + *x = RepoSSHCredentials{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_config_repository_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RepoSSHCredentials) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RepoSSHCredentials) ProtoMessage() {} + +func (x *RepoSSHCredentials) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_config_repository_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RepoSSHCredentials.ProtoReflect.Descriptor instead. +func (*RepoSSHCredentials) Descriptor() ([]byte, []int) { + return file_proto_types_config_repository_proto_rawDescGZIP(), []int{6} +} + +func (x *RepoSSHCredentials) GetSshPrivateKey() string { + if x != nil { + return x.SshPrivateKey + } + return "" +} + +// RepositoryList is a list of repositories +type RepositoryList struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ApiVersion string `protobuf:"bytes,1,opt,name=apiVersion,proto3" json:"apiVersion,omitempty"` + Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"` + Metadata *v3.ListMetadata `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` + Items []*Repository `protobuf:"bytes,4,rep,name=items,proto3" json:"items,omitempty"` +} + +func (x *RepositoryList) Reset() { + *x = RepositoryList{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_config_repository_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RepositoryList) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RepositoryList) ProtoMessage() {} + +func (x *RepositoryList) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_config_repository_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RepositoryList.ProtoReflect.Descriptor instead. +func (*RepositoryList) Descriptor() ([]byte, []int) { + return file_proto_types_config_repository_proto_rawDescGZIP(), []int{7} +} + +func (x *RepositoryList) GetApiVersion() string { + if x != nil { + return x.ApiVersion + } + return "" +} + +func (x *RepositoryList) GetKind() string { + if x != nil { + return x.Kind + } + return "" +} + +func (x *RepositoryList) GetMetadata() *v3.ListMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *RepositoryList) GetItems() []*Repository { + if x != nil { + return x.Items + } + return nil +} + +var File_proto_types_config_repository_proto protoreflect.FileDescriptor + +var file_proto_types_config_repository_proto_rawDesc = []byte{ + 0x0a, 0x23, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, + 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, + 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, + 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x70, 0x62, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf7, 0x03, 0x0a, 0x0a, 0x52, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x65, 0x0a, 0x0a, 0x61, 0x70, 0x69, 0x56, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x45, 0x92, 0x41, + 0x42, 0x2a, 0x0b, 0x41, 0x50, 0x49, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0x1b, + 0x41, 0x50, 0x49, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, + 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, 0x14, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x6b, 0x38, 0x73, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x69, 0x6f, 0x2f, 0x76, + 0x33, 0x40, 0x01, 0x52, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, + 0x41, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2d, 0x92, + 0x41, 0x2a, 0x2a, 0x04, 0x4b, 0x69, 0x6e, 0x64, 0x32, 0x14, 0x4b, 0x69, 0x6e, 0x64, 0x20, 0x6f, + 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, 0x0a, + 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x40, 0x01, 0x52, 0x04, 0x6b, 0x69, + 0x6e, 0x64, 0x12, 0x68, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, + 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, + 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x27, 0x92, 0x41, 0x24, 0x2a, 0x08, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x32, 0x18, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x44, 0x0a, 0x04, + 0x73, 0x70, 0x65, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x72, 0x61, 0x66, + 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x70, + 0x65, 0x63, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0xd0, 0xde, 0x1f, 0x01, 0x52, 0x04, 0x73, 0x70, + 0x65, 0x63, 0x12, 0x4a, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x52, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x08, 0xc8, 0xde, + 0x1f, 0x00, 0xd0, 0xde, 0x1f, 0x01, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x3a, 0x43, + 0x92, 0x41, 0x40, 0x0a, 0x3e, 0x2a, 0x0a, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, + 0x79, 0x32, 0x0a, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0xd2, 0x01, 0x0a, + 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0xd2, 0x01, 0x04, 0x6b, 0x69, 0x6e, + 0x64, 0xd2, 0x01, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xd2, 0x01, 0x04, 0x73, + 0x70, 0x65, 0x63, 0x22, 0x2e, 0x0a, 0x08, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x66, 0x12, + 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x02, 0x69, 0x64, 0x22, 0x98, 0x08, 0x0a, 0x0e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, + 0x72, 0x79, 0x53, 0x70, 0x65, 0x63, 0x12, 0x83, 0x01, 0x0a, 0x0e, 0x72, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x6f, 0x72, 0x79, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x26, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x6f, 0x72, 0x79, 0x54, 0x79, 0x70, 0x65, 0x42, 0x33, 0xea, 0xde, 0x1f, 0x0e, 0x72, 0x65, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x54, 0x79, 0x70, 0x65, 0xf2, 0xde, 0x1f, 0x1d, 0x70, + 0x67, 0x3a, 0x22, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x74, 0x79, + 0x70, 0x65, 0x2c, 0x75, 0x73, 0x65, 0x5f, 0x7a, 0x65, 0x72, 0x6f, 0x22, 0x52, 0x0e, 0x72, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x42, 0x0a, 0x08, + 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x26, + 0xea, 0xde, 0x1f, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0xf2, 0xde, 0x1f, 0x16, + 0x70, 0x67, 0x3a, 0x22, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2c, 0x75, 0x73, 0x65, + 0x5f, 0x7a, 0x65, 0x72, 0x6f, 0x22, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, + 0x12, 0x42, 0x0a, 0x08, 0x69, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x08, 0x42, 0x26, 0xea, 0xde, 0x1f, 0x08, 0x69, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x65, + 0xf2, 0xde, 0x1f, 0x16, 0x70, 0x67, 0x3a, 0x22, 0x69, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x65, + 0x2c, 0x75, 0x73, 0x65, 0x5f, 0x7a, 0x65, 0x72, 0x6f, 0x22, 0x52, 0x08, 0x69, 0x6e, 0x73, 0x65, + 0x63, 0x75, 0x72, 0x65, 0x12, 0x31, 0x0a, 0x06, 0x63, 0x61, 0x43, 0x65, 0x72, 0x74, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x19, 0xf2, 0xde, 0x1f, 0x15, 0x70, 0x67, 0x3a, 0x22, 0x63, 0x61, + 0x5f, 0x63, 0x65, 0x72, 0x74, 0x2c, 0x75, 0x73, 0x65, 0x5f, 0x7a, 0x65, 0x72, 0x6f, 0x22, 0x52, + 0x06, 0x63, 0x61, 0x43, 0x65, 0x72, 0x74, 0x12, 0x6c, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x72, + 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x61, 0x6c, 0x73, 0x42, 0x21, 0xc8, 0xde, 0x1f, 0x00, 0xf2, 0xde, 0x1f, 0x19, 0x70, + 0x67, 0x3a, 0x22, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x2c, 0x75, + 0x73, 0x65, 0x5f, 0x7a, 0x65, 0x72, 0x6f, 0x22, 0x52, 0x0b, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x61, 0x6c, 0x73, 0x12, 0x41, 0x0a, 0x0a, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x4e, 0x61, + 0x6d, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x42, 0x21, 0xc8, 0xde, 0x1f, 0x00, 0xf2, + 0xde, 0x1f, 0x19, 0x70, 0x67, 0x3a, 0x22, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x2c, 0x75, 0x73, 0x65, 0x5f, 0x7a, 0x65, 0x72, 0x6f, 0x22, 0x52, 0x0a, 0x61, 0x67, + 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x8d, 0x01, 0x0a, 0x0e, 0x63, 0x72, 0x65, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x30, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x54, + 0x79, 0x70, 0x65, 0x42, 0x33, 0xea, 0xde, 0x1f, 0x0e, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, 0xf2, 0xde, 0x1f, 0x1d, 0x70, 0x67, 0x3a, 0x22, 0x63, + 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x2c, 0x75, + 0x73, 0x65, 0x5f, 0x7a, 0x65, 0x72, 0x6f, 0x22, 0x52, 0x0e, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x12, 0x89, 0x01, 0x0a, 0x19, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x41, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x4f, 0x6e, 0x6c, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x42, 0x4b, 0xea, 0xde, + 0x1f, 0x19, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, + 0x6b, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4f, 0x6e, 0x6c, 0x79, 0xf2, 0xde, 0x1f, 0x2a, 0x70, + 0x67, 0x3a, 0x22, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x6e, 0x65, 0x74, 0x77, + 0x6f, 0x72, 0x6b, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x2c, + 0x75, 0x73, 0x65, 0x5f, 0x7a, 0x65, 0x72, 0x6f, 0x22, 0x52, 0x19, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x62, 0x0a, 0x10, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x75, + 0x62, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x42, 0x36, + 0xea, 0xde, 0x1f, 0x10, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x75, 0x62, 0x6d, 0x6f, 0x64, + 0x75, 0x6c, 0x65, 0x73, 0xf2, 0xde, 0x1f, 0x1e, 0x70, 0x67, 0x3a, 0x22, 0x65, 0x6e, 0x61, 0x62, + 0x6c, 0x65, 0x5f, 0x73, 0x75, 0x62, 0x6d, 0x6f, 0x64, 0x6c, 0x65, 0x73, 0x2c, 0x75, 0x73, 0x65, + 0x5f, 0x7a, 0x65, 0x72, 0x6f, 0x22, 0x52, 0x10, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x75, + 0x62, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x4b, 0x0a, 0x0a, 0x6d, 0x61, 0x78, 0x52, + 0x65, 0x74, 0x69, 0x72, 0x65, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x12, 0x42, 0x2b, 0xea, 0xde, + 0x1f, 0x0a, 0x6d, 0x61, 0x78, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0xf2, 0xde, 0x1f, 0x19, + 0x70, 0x67, 0x3a, 0x22, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x2c, + 0x75, 0x73, 0x65, 0x5f, 0x7a, 0x65, 0x72, 0x6f, 0x22, 0x52, 0x0a, 0x6d, 0x61, 0x78, 0x52, 0x65, + 0x74, 0x69, 0x72, 0x65, 0x73, 0x12, 0x47, 0x0a, 0x09, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x4c, + 0x46, 0x53, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x42, 0x29, 0xea, 0xde, 0x1f, 0x09, 0x65, 0x6e, + 0x61, 0x62, 0x6c, 0x65, 0x4c, 0x46, 0x53, 0xf2, 0xde, 0x1f, 0x18, 0x70, 0x67, 0x3a, 0x22, 0x65, + 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6c, 0x66, 0x73, 0x2c, 0x75, 0x73, 0x65, 0x5f, 0x7a, 0x65, + 0x72, 0x6f, 0x22, 0x52, 0x09, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x4c, 0x46, 0x53, 0x22, 0x5c, + 0x0a, 0x10, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x12, 0x48, 0x0a, 0x06, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x41, 0x67, 0x65, 0x6e, + 0x74, 0x52, 0x65, 0x66, 0x42, 0x0e, 0xc8, 0xde, 0x1f, 0x00, 0xf2, 0xde, 0x1f, 0x06, 0x70, 0x67, + 0x3a, 0x22, 0x2d, 0x22, 0x52, 0x06, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x9c, 0x01, 0x0a, + 0x0f, 0x52, 0x65, 0x70, 0x6f, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, + 0x12, 0x4b, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x50, 0x61, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x52, 0x65, 0x70, 0x6f, + 0x55, 0x73, 0x65, 0x72, 0x50, 0x61, 0x73, 0x73, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x61, 0x6c, 0x73, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x50, 0x61, 0x73, 0x73, 0x12, 0x3c, 0x0a, + 0x03, 0x73, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x72, 0x61, 0x66, + 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x53, 0x53, 0x48, 0x43, 0x72, 0x65, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x52, 0x03, 0x73, 0x73, 0x68, 0x22, 0x9f, 0x01, 0x0a, 0x17, + 0x52, 0x65, 0x70, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x50, 0x61, 0x73, 0x73, 0x43, 0x72, 0x65, 0x64, + 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, + 0x26, 0x0a, 0x0e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x65, 0x72, 0x74, 0x44, 0x61, 0x74, + 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, + 0x65, 0x72, 0x74, 0x44, 0x61, 0x74, 0x61, 0x12, 0x24, 0x0a, 0x0d, 0x63, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x43, 0x65, 0x72, 0x74, 0x4b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, + 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x65, 0x72, 0x74, 0x4b, 0x65, 0x79, 0x22, 0x3a, 0x0a, + 0x12, 0x52, 0x65, 0x70, 0x6f, 0x53, 0x53, 0x48, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x61, 0x6c, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x73, 0x73, 0x68, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, + 0x65, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x73, 0x68, 0x50, + 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x22, 0xfb, 0x02, 0x0a, 0x0e, 0x52, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x6a, 0x0a, 0x0a, + 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x4a, 0x92, 0x41, 0x47, 0x2a, 0x0b, 0x41, 0x50, 0x49, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x32, 0x20, 0x41, 0x50, 0x49, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, + 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x3a, 0x14, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6b, 0x38, 0x73, + 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x69, 0x6f, 0x2f, 0x76, 0x33, 0x40, 0x01, 0x52, 0x0a, 0x61, 0x70, + 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x4a, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x36, 0x92, 0x41, 0x33, 0x2a, 0x04, 0x4b, 0x69, 0x6e, + 0x64, 0x32, 0x19, 0x4b, 0x69, 0x6e, 0x64, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, + 0x69, 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, 0x0e, 0x52, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x4c, 0x69, 0x73, 0x74, 0x40, 0x01, 0x52, 0x04, + 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x77, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, + 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, + 0x32, 0x92, 0x41, 0x2f, 0x2a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x32, 0x1d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x20, 0x6f, 0x66, 0x20, + 0x74, 0x68, 0x65, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x40, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x38, 0x0a, + 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x72, + 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, + 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x2a, 0x57, 0x0a, 0x0e, 0x52, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x6f, 0x72, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x52, 0x65, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x54, 0x79, 0x70, 0x65, 0x4e, 0x6f, 0x74, 0x53, 0x65, + 0x74, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x47, 0x69, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x6f, 0x72, 0x79, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x48, 0x65, 0x6c, 0x6d, 0x52, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x10, 0x02, 0x1a, 0x04, 0x88, 0xa3, 0x1e, 0x00, + 0x2a, 0x65, 0x0a, 0x18, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x72, + 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x14, + 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x4e, 0x6f, + 0x74, 0x53, 0x65, 0x74, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x55, 0x73, 0x65, 0x72, 0x50, 0x61, + 0x73, 0x73, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x10, 0x01, 0x12, 0x11, + 0x0a, 0x0d, 0x53, 0x53, 0x48, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x10, + 0x02, 0x1a, 0x04, 0x88, 0xa3, 0x1e, 0x00, 0x42, 0xf3, 0x01, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, + 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x0f, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, + 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x48, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x61, 0x66, 0x61, 0x79, 0x53, 0x79, 0x73, 0x74, 0x65, + 0x6d, 0x73, 0x2f, 0x72, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x63, + 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0xa2, 0x02, 0x04, 0x52, 0x44, 0x54, 0x43, 0xaa, 0x02, 0x16, 0x52, 0x61, 0x66, + 0x61, 0x79, 0x2e, 0x44, 0x65, 0x76, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0xca, 0x02, 0x16, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, + 0x54, 0x79, 0x70, 0x65, 0x73, 0x5c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0xe2, 0x02, 0x22, 0x52, + 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x5c, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0xea, 0x02, 0x19, 0x52, 0x61, 0x66, 0x61, 0x79, 0x3a, 0x3a, 0x44, 0x65, 0x76, 0x3a, 0x3a, + 0x54, 0x79, 0x70, 0x65, 0x73, 0x3a, 0x3a, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_proto_types_config_repository_proto_rawDescOnce sync.Once + file_proto_types_config_repository_proto_rawDescData = file_proto_types_config_repository_proto_rawDesc +) + +func file_proto_types_config_repository_proto_rawDescGZIP() []byte { + file_proto_types_config_repository_proto_rawDescOnce.Do(func() { + file_proto_types_config_repository_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_types_config_repository_proto_rawDescData) + }) + return file_proto_types_config_repository_proto_rawDescData +} + +var file_proto_types_config_repository_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_proto_types_config_repository_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_proto_types_config_repository_proto_goTypes = []interface{}{ + (RepositoryType)(0), // 0: rafay.dev.types.config.RepositoryType + (RepositoryCredentialType)(0), // 1: rafay.dev.types.config.RepositoryCredentialType + (*Repository)(nil), // 2: rafay.dev.types.config.Repository + (*AgentRef)(nil), // 3: rafay.dev.types.config.AgentRef + (*RepositorySpec)(nil), // 4: rafay.dev.types.config.RepositorySpec + (*RepositoryStatus)(nil), // 5: rafay.dev.types.config.RepositoryStatus + (*RepoCredentials)(nil), // 6: rafay.dev.types.config.RepoCredentials + (*RepoUserPassCredentials)(nil), // 7: rafay.dev.types.config.RepoUserPassCredentials + (*RepoSSHCredentials)(nil), // 8: rafay.dev.types.config.RepoSSHCredentials + (*RepositoryList)(nil), // 9: rafay.dev.types.config.RepositoryList + (*v3.Metadata)(nil), // 10: rafay.dev.types.common.v3.Metadata + (*v3.ListMetadata)(nil), // 11: rafay.dev.types.common.v3.ListMetadata +} +var file_proto_types_config_repository_proto_depIdxs = []int32{ + 10, // 0: rafay.dev.types.config.Repository.metadata:type_name -> rafay.dev.types.common.v3.Metadata + 4, // 1: rafay.dev.types.config.Repository.spec:type_name -> rafay.dev.types.config.RepositorySpec + 5, // 2: rafay.dev.types.config.Repository.status:type_name -> rafay.dev.types.config.RepositoryStatus + 0, // 3: rafay.dev.types.config.RepositorySpec.repositoryType:type_name -> rafay.dev.types.config.RepositoryType + 6, // 4: rafay.dev.types.config.RepositorySpec.credentials:type_name -> rafay.dev.types.config.RepoCredentials + 1, // 5: rafay.dev.types.config.RepositorySpec.credentialType:type_name -> rafay.dev.types.config.RepositoryCredentialType + 3, // 6: rafay.dev.types.config.RepositoryStatus.agents:type_name -> rafay.dev.types.config.AgentRef + 7, // 7: rafay.dev.types.config.RepoCredentials.userPass:type_name -> rafay.dev.types.config.RepoUserPassCredentials + 8, // 8: rafay.dev.types.config.RepoCredentials.ssh:type_name -> rafay.dev.types.config.RepoSSHCredentials + 11, // 9: rafay.dev.types.config.RepositoryList.metadata:type_name -> rafay.dev.types.common.v3.ListMetadata + 2, // 10: rafay.dev.types.config.RepositoryList.items:type_name -> rafay.dev.types.config.Repository + 11, // [11:11] is the sub-list for method output_type + 11, // [11:11] is the sub-list for method input_type + 11, // [11:11] is the sub-list for extension type_name + 11, // [11:11] is the sub-list for extension extendee + 0, // [0:11] is the sub-list for field type_name +} + +func init() { file_proto_types_config_repository_proto_init() } +func file_proto_types_config_repository_proto_init() { + if File_proto_types_config_repository_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_proto_types_config_repository_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Repository); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_config_repository_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AgentRef); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_config_repository_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RepositorySpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_config_repository_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RepositoryStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_config_repository_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RepoCredentials); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_config_repository_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RepoUserPassCredentials); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_config_repository_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RepoSSHCredentials); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_config_repository_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RepositoryList); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_proto_types_config_repository_proto_rawDesc, + NumEnums: 2, + NumMessages: 8, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_proto_types_config_repository_proto_goTypes, + DependencyIndexes: file_proto_types_config_repository_proto_depIdxs, + EnumInfos: file_proto_types_config_repository_proto_enumTypes, + MessageInfos: file_proto_types_config_repository_proto_msgTypes, + }.Build() + File_proto_types_config_repository_proto = out.File + file_proto_types_config_repository_proto_rawDesc = nil + file_proto_types_config_repository_proto_goTypes = nil + file_proto_types_config_repository_proto_depIdxs = nil +} diff --git a/components/common/proto/types/config/repository.proto b/components/common/proto/types/config/repository.proto new file mode 100644 index 0000000..977bbe7 --- /dev/null +++ b/components/common/proto/types/config/repository.proto @@ -0,0 +1,161 @@ +syntax = "proto3"; +package rafay.dev.types.config; + +import "protoc-gen-openapiv2/options/annotations.proto"; +import "gogoproto/gogo.proto"; +import "proto/types/commonpb/v3/common.proto"; + +// Repository is a first class object for storing reference to git,helm, etc +// repo +message Repository { + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { + json_schema : { + title : "Repository" + description : "Repository" + required : [ "apiVersion", "kind", "metadata", "spec" ] + } + }; + string apiVersion = 1 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "API Version", + description : "API Version of the resource" + default : "config.k8smgmt.io/v3" + read_only : true + } ]; + string kind = 2 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Kind", + description : "Kind of the resource" + default : "Repository" + read_only : true + } ]; + rafay.dev.types.common.v3.Metadata metadata = 3 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Metadata", + description : "Metadata of the resource" + } ]; + RepositorySpec spec = 4 + [ (gogoproto.nullable) = false, (gogoproto.embed) = true ]; + RepositoryStatus status = 5 + [ (gogoproto.nullable) = false, (gogoproto.embed) = true ]; +} + +enum RepositoryType { + // disable enum prefix + option (gogoproto.goproto_enum_prefix) = false; + + RepositoryTypeNotSet = 0; + GitRepository = 1; + HelmRepository = 2; +} + +enum RepositoryCredentialType { + // disable enum prefix + option (gogoproto.goproto_enum_prefix) = false; + + CredentialTypeNotSet = 0; + UserPassCredential = 1; + SSHCredential = 2; +} + +message AgentRef { + string name = 1; + string id = 2; +} + +// RepositorySpec is the spec of SecretStore +message RepositorySpec { + // helm, git etc + RepositoryType repositoryType = 1 [ + (gogoproto.moretags) = "pg:\"repository_type,use_zero\"", + (gogoproto.jsontag) = "repositoryType" + ]; + // Https URL or SSH URL + string endpoint = 2 [ + (gogoproto.moretags) = "pg:\"endpoint,use_zero\"", + (gogoproto.jsontag) = "endpoint" + ]; + + bool insecure = 3 [ + (gogoproto.moretags) = "pg:\"insecure,use_zero\"", + (gogoproto.jsontag) = "insecure" + ]; + + string caCert = 4 [ (gogoproto.moretags) = "pg:\"ca_cert,use_zero\"" ]; + + RepoCredentials credentials = 5 [ + (gogoproto.moretags) = "pg:\"credentials,use_zero\"", + (gogoproto.nullable) = false + ]; + + repeated string agentNames = 6 [ + (gogoproto.moretags) = "pg:\"agent_names,use_zero\"", + (gogoproto.nullable) = false + ]; + + RepositoryCredentialType credentialType = 7 [ + (gogoproto.moretags) = "pg:\"credential_type,use_zero\"", + (gogoproto.jsontag) = "credentialType" + ]; + + bool internalNetworkAccessOnly = 9 [ + (gogoproto.moretags) = "pg:\"internal_network_access_only,use_zero\"", + (gogoproto.jsontag) = "internalNetworkAccessOnly" + ]; + bool enableSubmodules = 10 [ + (gogoproto.moretags) = "pg:\"enable_submodles,use_zero\"", + (gogoproto.jsontag) = "enableSubmodules" + ]; + sint64 maxRetires = 11 [ + (gogoproto.moretags) = "pg:\"max_retries,use_zero\"", + (gogoproto.jsontag) = "maxRetries" + ]; + bool enableLFS = 12 [ + (gogoproto.moretags) = "pg:\"enable_lfs,use_zero\"", + (gogoproto.jsontag) = "enableLFS" + ]; +} + +message RepositoryStatus { + repeated AgentRef agents = 2 + [ (gogoproto.moretags) = "pg:\"-\"", (gogoproto.nullable) = false ]; +} + +message RepoCredentials { + RepoUserPassCredentials userPass = 1; + RepoSSHCredentials ssh = 2; +} + +message RepoUserPassCredentials { + string username = 1; + string password = 2; + string clientCertData = 3; + string clientCertKey = 4; +} + +message RepoSSHCredentials { string sshPrivateKey = 1; } + +// RepositoryList is a list of repositories +message RepositoryList { + string apiVersion = 1 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "API Version", + description : "API Version of the list resource" + default : "config.k8smgmt.io/v3" + read_only : true + } ]; +string kind = 2 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Kind", + description : "Kind of the list resource" + default : "RepositoryList" + read_only : true + } ]; +rafay.dev.types.common.v3.ListMetadata metadata = 3 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "ListMetadata", + description : "Metadata of the list resource" + read_only : true + } ]; + repeated Repository items = 4; +} \ No newline at end of file diff --git a/components/common/proto/types/config/workload.pb.go b/components/common/proto/types/config/workload.pb.go new file mode 100644 index 0000000..9b60205 --- /dev/null +++ b/components/common/proto/types/config/workload.pb.go @@ -0,0 +1,2615 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc (unknown) +// source: proto/types/config/workload.proto + +package config + +import ( + v3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/commonpb/v3" + _ "github.com/gogo/protobuf/gogoproto" + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type DeploymentPlanType int32 + +const ( + DeploymentPlanType_DeploymentPlanNotSet DeploymentPlanType = 0 + DeploymentPlanType_ParallelDeploymentPlan DeploymentPlanType = 1 + DeploymentPlanType_CanaryDeploymentPlan DeploymentPlanType = 2 + DeploymentPlanType_BlueGreenDeploymentPlan DeploymentPlanType = 3 + DeploymentPlanType_DependencyDeploymentPlan DeploymentPlanType = 4 +) + +// Enum value maps for DeploymentPlanType. +var ( + DeploymentPlanType_name = map[int32]string{ + 0: "DeploymentPlanNotSet", + 1: "ParallelDeploymentPlan", + 2: "CanaryDeploymentPlan", + 3: "BlueGreenDeploymentPlan", + 4: "DependencyDeploymentPlan", + } + DeploymentPlanType_value = map[string]int32{ + "DeploymentPlanNotSet": 0, + "ParallelDeploymentPlan": 1, + "CanaryDeploymentPlan": 2, + "BlueGreenDeploymentPlan": 3, + "DependencyDeploymentPlan": 4, + } +) + +func (x DeploymentPlanType) Enum() *DeploymentPlanType { + p := new(DeploymentPlanType) + *p = x + return p +} + +func (x DeploymentPlanType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (DeploymentPlanType) Descriptor() protoreflect.EnumDescriptor { + return file_proto_types_config_workload_proto_enumTypes[0].Descriptor() +} + +func (DeploymentPlanType) Type() protoreflect.EnumType { + return &file_proto_types_config_workload_proto_enumTypes[0] +} + +func (x DeploymentPlanType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use DeploymentPlanType.Descriptor instead. +func (DeploymentPlanType) EnumDescriptor() ([]byte, []int) { + return file_proto_types_config_workload_proto_rawDescGZIP(), []int{0} +} + +type WorkloadSnapshotType int32 + +const ( + WorkloadSnapshotType_WorkloadSnapshotTypeNotSet WorkloadSnapshotType = 0 + WorkloadSnapshotType_RafayWizardWorkloadJSON WorkloadSnapshotType = 1 + WorkloadSnapshotType_ZipArchive WorkloadSnapshotType = 2 +) + +// Enum value maps for WorkloadSnapshotType. +var ( + WorkloadSnapshotType_name = map[int32]string{ + 0: "WorkloadSnapshotTypeNotSet", + 1: "RafayWizardWorkloadJSON", + 2: "ZipArchive", + } + WorkloadSnapshotType_value = map[string]int32{ + "WorkloadSnapshotTypeNotSet": 0, + "RafayWizardWorkloadJSON": 1, + "ZipArchive": 2, + } +) + +func (x WorkloadSnapshotType) Enum() *WorkloadSnapshotType { + p := new(WorkloadSnapshotType) + *p = x + return p +} + +func (x WorkloadSnapshotType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (WorkloadSnapshotType) Descriptor() protoreflect.EnumDescriptor { + return file_proto_types_config_workload_proto_enumTypes[1].Descriptor() +} + +func (WorkloadSnapshotType) Type() protoreflect.EnumType { + return &file_proto_types_config_workload_proto_enumTypes[1] +} + +func (x WorkloadSnapshotType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use WorkloadSnapshotType.Descriptor instead. +func (WorkloadSnapshotType) EnumDescriptor() ([]byte, []int) { + return file_proto_types_config_workload_proto_rawDescGZIP(), []int{1} +} + +// WorkloadSnapshotConditionType is the condition type of workload +// snapshot condition +type WorkloadSnapshotConditionType int32 + +const ( + WorkloadSnapshotConditionType_WorkloadSnapshotValidate WorkloadSnapshotConditionType = 0 + WorkloadSnapshotConditionType_WorkloadSnapshotSchedule WorkloadSnapshotConditionType = 1 + WorkloadSnapshotConditionType_WorkloadSnapshotUnschedule WorkloadSnapshotConditionType = 2 + WorkloadSnapshotConditionType_WorkloadSnapshotClusterDeployed WorkloadSnapshotConditionType = 3 + WorkloadSnapshotConditionType_WorkloadSnapshotClusterReady WorkloadSnapshotConditionType = 4 + WorkloadSnapshotConditionType_WorkloadSnapshotClusterDrifted WorkloadSnapshotConditionType = 5 + WorkloadSnapshotConditionType_WorkloadSnapshotUpdateRepoArtifact WorkloadSnapshotConditionType = 6 +) + +// Enum value maps for WorkloadSnapshotConditionType. +var ( + WorkloadSnapshotConditionType_name = map[int32]string{ + 0: "WorkloadSnapshotValidate", + 1: "WorkloadSnapshotSchedule", + 2: "WorkloadSnapshotUnschedule", + 3: "WorkloadSnapshotClusterDeployed", + 4: "WorkloadSnapshotClusterReady", + 5: "WorkloadSnapshotClusterDrifted", + 6: "WorkloadSnapshotUpdateRepoArtifact", + } + WorkloadSnapshotConditionType_value = map[string]int32{ + "WorkloadSnapshotValidate": 0, + "WorkloadSnapshotSchedule": 1, + "WorkloadSnapshotUnschedule": 2, + "WorkloadSnapshotClusterDeployed": 3, + "WorkloadSnapshotClusterReady": 4, + "WorkloadSnapshotClusterDrifted": 5, + "WorkloadSnapshotUpdateRepoArtifact": 6, + } +) + +func (x WorkloadSnapshotConditionType) Enum() *WorkloadSnapshotConditionType { + p := new(WorkloadSnapshotConditionType) + *p = x + return p +} + +func (x WorkloadSnapshotConditionType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (WorkloadSnapshotConditionType) Descriptor() protoreflect.EnumDescriptor { + return file_proto_types_config_workload_proto_enumTypes[2].Descriptor() +} + +func (WorkloadSnapshotConditionType) Type() protoreflect.EnumType { + return &file_proto_types_config_workload_proto_enumTypes[2] +} + +func (x WorkloadSnapshotConditionType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use WorkloadSnapshotConditionType.Descriptor instead. +func (WorkloadSnapshotConditionType) EnumDescriptor() ([]byte, []int) { + return file_proto_types_config_workload_proto_rawDescGZIP(), []int{2} +} + +type ParallelPlanSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + MaxParallel int32 `protobuf:"zigzag32,1,opt,name=maxParallel,proto3" json:"maxParallel,omitempty"` +} + +func (x *ParallelPlanSpec) Reset() { + *x = ParallelPlanSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_config_workload_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ParallelPlanSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ParallelPlanSpec) ProtoMessage() {} + +func (x *ParallelPlanSpec) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_config_workload_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ParallelPlanSpec.ProtoReflect.Descriptor instead. +func (*ParallelPlanSpec) Descriptor() ([]byte, []int) { + return file_proto_types_config_workload_proto_rawDescGZIP(), []int{0} +} + +func (x *ParallelPlanSpec) GetMaxParallel() int32 { + if x != nil { + return x.MaxParallel + } + return 0 +} + +type Dependency struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Dependent string `protobuf:"bytes,1,opt,name=dependent,proto3" json:"dependent,omitempty"` + Dependencies []string `protobuf:"bytes,2,rep,name=dependencies,proto3" json:"dependencies,omitempty"` +} + +func (x *Dependency) Reset() { + *x = Dependency{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_config_workload_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Dependency) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Dependency) ProtoMessage() {} + +func (x *Dependency) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_config_workload_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Dependency.ProtoReflect.Descriptor instead. +func (*Dependency) Descriptor() ([]byte, []int) { + return file_proto_types_config_workload_proto_rawDescGZIP(), []int{1} +} + +func (x *Dependency) GetDependent() string { + if x != nil { + return x.Dependent + } + return "" +} + +func (x *Dependency) GetDependencies() []string { + if x != nil { + return x.Dependencies + } + return nil +} + +type DependencyPlanSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + MaxParallel int32 `protobuf:"zigzag32,1,opt,name=maxParallel,proto3" json:"maxParallel,omitempty"` + Dependencies []*Dependency `protobuf:"bytes,4,rep,name=dependencies,proto3" json:"dependencies,omitempty"` +} + +func (x *DependencyPlanSpec) Reset() { + *x = DependencyPlanSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_config_workload_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DependencyPlanSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DependencyPlanSpec) ProtoMessage() {} + +func (x *DependencyPlanSpec) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_config_workload_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DependencyPlanSpec.ProtoReflect.Descriptor instead. +func (*DependencyPlanSpec) Descriptor() ([]byte, []int) { + return file_proto_types_config_workload_proto_rawDescGZIP(), []int{2} +} + +func (x *DependencyPlanSpec) GetMaxParallel() int32 { + if x != nil { + return x.MaxParallel + } + return 0 +} + +func (x *DependencyPlanSpec) GetDependencies() []*Dependency { + if x != nil { + return x.Dependencies + } + return nil +} + +type CanaryPlanSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *CanaryPlanSpec) Reset() { + *x = CanaryPlanSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_config_workload_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CanaryPlanSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CanaryPlanSpec) ProtoMessage() {} + +func (x *CanaryPlanSpec) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_config_workload_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CanaryPlanSpec.ProtoReflect.Descriptor instead. +func (*CanaryPlanSpec) Descriptor() ([]byte, []int) { + return file_proto_types_config_workload_proto_rawDescGZIP(), []int{3} +} + +type BlueGreenPlanSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *BlueGreenPlanSpec) Reset() { + *x = BlueGreenPlanSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_config_workload_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BlueGreenPlanSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BlueGreenPlanSpec) ProtoMessage() {} + +func (x *BlueGreenPlanSpec) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_config_workload_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BlueGreenPlanSpec.ProtoReflect.Descriptor instead. +func (*BlueGreenPlanSpec) Descriptor() ([]byte, []int) { + return file_proto_types_config_workload_proto_rawDescGZIP(), []int{4} +} + +type DeploymentPlanSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PlanType DeploymentPlanType `protobuf:"varint,1,opt,name=planType,proto3,enum=rafay.dev.types.config.DeploymentPlanType" json:"planType,omitempty"` + ParallelSpec *ParallelPlanSpec `protobuf:"bytes,2,opt,name=parallelSpec,proto3" json:"parallelSpec,omitempty"` + CanarySpec *CanaryPlanSpec `protobuf:"bytes,3,opt,name=canarySpec,proto3" json:"canarySpec,omitempty"` + BlueGreenSpec *BlueGreenPlanSpec `protobuf:"bytes,4,opt,name=blueGreenSpec,proto3" json:"blueGreenSpec,omitempty"` + DependencySpec *DependencyPlanSpec `protobuf:"bytes,5,opt,name=dependencySpec,proto3" json:"dependencySpec,omitempty"` +} + +func (x *DeploymentPlanSpec) Reset() { + *x = DeploymentPlanSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_config_workload_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeploymentPlanSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeploymentPlanSpec) ProtoMessage() {} + +func (x *DeploymentPlanSpec) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_config_workload_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeploymentPlanSpec.ProtoReflect.Descriptor instead. +func (*DeploymentPlanSpec) Descriptor() ([]byte, []int) { + return file_proto_types_config_workload_proto_rawDescGZIP(), []int{5} +} + +func (x *DeploymentPlanSpec) GetPlanType() DeploymentPlanType { + if x != nil { + return x.PlanType + } + return DeploymentPlanType_DeploymentPlanNotSet +} + +func (x *DeploymentPlanSpec) GetParallelSpec() *ParallelPlanSpec { + if x != nil { + return x.ParallelSpec + } + return nil +} + +func (x *DeploymentPlanSpec) GetCanarySpec() *CanaryPlanSpec { + if x != nil { + return x.CanarySpec + } + return nil +} + +func (x *DeploymentPlanSpec) GetBlueGreenSpec() *BlueGreenPlanSpec { + if x != nil { + return x.BlueGreenSpec + } + return nil +} + +func (x *DeploymentPlanSpec) GetDependencySpec() *DependencyPlanSpec { + if x != nil { + return x.DependencySpec + } + return nil +} + +type Workload struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ApiVersion string `protobuf:"bytes,1,opt,name=apiVersion,proto3" json:"apiVersion,omitempty"` + Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"` + Metadata *v3.Metadata `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *WorkloadSpec `protobuf:"bytes,4,opt,name=spec,proto3" json:"spec,omitempty"` + Status *WorkloadStatus `protobuf:"bytes,5,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *Workload) Reset() { + *x = Workload{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_config_workload_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Workload) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Workload) ProtoMessage() {} + +func (x *Workload) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_config_workload_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Workload.ProtoReflect.Descriptor instead. +func (*Workload) Descriptor() ([]byte, []int) { + return file_proto_types_config_workload_proto_rawDescGZIP(), []int{6} +} + +func (x *Workload) GetApiVersion() string { + if x != nil { + return x.ApiVersion + } + return "" +} + +func (x *Workload) GetKind() string { + if x != nil { + return x.Kind + } + return "" +} + +func (x *Workload) GetMetadata() *v3.Metadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *Workload) GetSpec() *WorkloadSpec { + if x != nil { + return x.Spec + } + return nil +} + +func (x *Workload) GetStatus() *WorkloadStatus { + if x != nil { + return x.Status + } + return nil +} + +type WorkloadSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + Placement *PlacementSpec `protobuf:"bytes,2,opt,name=placement,proto3" json:"placement,omitempty"` + DeploymentPlan *DeploymentPlanSpec `protobuf:"bytes,3,opt,name=deploymentPlan,proto3" json:"deploymentPlan,omitempty"` + ArtifactType ArtifactType `protobuf:"varint,4,opt,name=artifactType,proto3,enum=rafay.dev.types.config.ArtifactType" json:"artifactType,omitempty"` + ArtifactFiles []*File `protobuf:"bytes,5,rep,name=artifactFiles,proto3" json:"artifactFiles,omitempty"` + Extra *ArtifactExtra `protobuf:"bytes,6,opt,name=extra,proto3" json:"extra,omitempty"` + RepositoryRef string `protobuf:"bytes,7,opt,name=repositoryRef,proto3" json:"repositoryRef,omitempty"` + TemplateID string `protobuf:"bytes,8,opt,name=templateID,proto3" json:"templateID,omitempty"` + ShareMode ShareMode `protobuf:"varint,9,opt,name=shareMode,proto3,enum=rafay.dev.types.config.ShareMode" json:"shareMode,omitempty"` + ValueRepositoryRef string `protobuf:"bytes,10,opt,name=valueRepositoryRef,proto3" json:"valueRepositoryRef,omitempty"` + AdditionalReference *RepoArtifactMeta `protobuf:"bytes,11,opt,name=additionalReference,proto3" json:"additionalReference,omitempty"` +} + +func (x *WorkloadSpec) Reset() { + *x = WorkloadSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_config_workload_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WorkloadSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkloadSpec) ProtoMessage() {} + +func (x *WorkloadSpec) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_config_workload_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WorkloadSpec.ProtoReflect.Descriptor instead. +func (*WorkloadSpec) Descriptor() ([]byte, []int) { + return file_proto_types_config_workload_proto_rawDescGZIP(), []int{7} +} + +func (x *WorkloadSpec) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *WorkloadSpec) GetPlacement() *PlacementSpec { + if x != nil { + return x.Placement + } + return nil +} + +func (x *WorkloadSpec) GetDeploymentPlan() *DeploymentPlanSpec { + if x != nil { + return x.DeploymentPlan + } + return nil +} + +func (x *WorkloadSpec) GetArtifactType() ArtifactType { + if x != nil { + return x.ArtifactType + } + return ArtifactType_ArtifactTypeNotSet +} + +func (x *WorkloadSpec) GetArtifactFiles() []*File { + if x != nil { + return x.ArtifactFiles + } + return nil +} + +func (x *WorkloadSpec) GetExtra() *ArtifactExtra { + if x != nil { + return x.Extra + } + return nil +} + +func (x *WorkloadSpec) GetRepositoryRef() string { + if x != nil { + return x.RepositoryRef + } + return "" +} + +func (x *WorkloadSpec) GetTemplateID() string { + if x != nil { + return x.TemplateID + } + return "" +} + +func (x *WorkloadSpec) GetShareMode() ShareMode { + if x != nil { + return x.ShareMode + } + return ShareMode_ShareModeNotSet +} + +func (x *WorkloadSpec) GetValueRepositoryRef() string { + if x != nil { + return x.ValueRepositoryRef + } + return "" +} + +func (x *WorkloadSpec) GetAdditionalReference() *RepoArtifactMeta { + if x != nil { + return x.AdditionalReference + } + return nil +} + +type ProjectWorkload struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + WorkloadID string `protobuf:"bytes,1,opt,name=workloadID,proto3" json:"workloadID,omitempty"` + ProjectID string `protobuf:"bytes,2,opt,name=projectID,proto3" json:"projectID,omitempty"` +} + +func (x *ProjectWorkload) Reset() { + *x = ProjectWorkload{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_config_workload_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ProjectWorkload) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ProjectWorkload) ProtoMessage() {} + +func (x *ProjectWorkload) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_config_workload_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ProjectWorkload.ProtoReflect.Descriptor instead. +func (*ProjectWorkload) Descriptor() ([]byte, []int) { + return file_proto_types_config_workload_proto_rawDescGZIP(), []int{8} +} + +func (x *ProjectWorkload) GetWorkloadID() string { + if x != nil { + return x.WorkloadID + } + return "" +} + +func (x *ProjectWorkload) GetProjectID() string { + if x != nil { + return x.ProjectID + } + return "" +} + +type WorkloadStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + WorkloadID string `protobuf:"bytes,1,opt,name=workloadID,proto3" json:"workloadID,omitempty"` + PublishPending bool `protobuf:"varint,2,opt,name=publishPending,proto3" json:"publishPending,omitempty"` + LastPublishedRevision int64 `protobuf:"zigzag64,3,opt,name=lastPublishedRevision,proto3" json:"lastPublishedRevision,omitempty"` + Projects []*ProjectWorkload `protobuf:"bytes,4,rep,name=projects,proto3" json:"projects,omitempty"` +} + +func (x *WorkloadStatus) Reset() { + *x = WorkloadStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_config_workload_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WorkloadStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkloadStatus) ProtoMessage() {} + +func (x *WorkloadStatus) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_config_workload_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WorkloadStatus.ProtoReflect.Descriptor instead. +func (*WorkloadStatus) Descriptor() ([]byte, []int) { + return file_proto_types_config_workload_proto_rawDescGZIP(), []int{9} +} + +func (x *WorkloadStatus) GetWorkloadID() string { + if x != nil { + return x.WorkloadID + } + return "" +} + +func (x *WorkloadStatus) GetPublishPending() bool { + if x != nil { + return x.PublishPending + } + return false +} + +func (x *WorkloadStatus) GetLastPublishedRevision() int64 { + if x != nil { + return x.LastPublishedRevision + } + return 0 +} + +func (x *WorkloadStatus) GetProjects() []*ProjectWorkload { + if x != nil { + return x.Projects + } + return nil +} + +// WorkloadList is a list of Workloads +type WorkloadList struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ApiVersion string `protobuf:"bytes,1,opt,name=apiVersion,proto3" json:"apiVersion,omitempty"` + Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"` + Metadata *v3.ListMetadata `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` + Items []*Workload `protobuf:"bytes,4,rep,name=items,proto3" json:"items,omitempty"` +} + +func (x *WorkloadList) Reset() { + *x = WorkloadList{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_config_workload_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WorkloadList) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkloadList) ProtoMessage() {} + +func (x *WorkloadList) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_config_workload_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WorkloadList.ProtoReflect.Descriptor instead. +func (*WorkloadList) Descriptor() ([]byte, []int) { + return file_proto_types_config_workload_proto_rawDescGZIP(), []int{10} +} + +func (x *WorkloadList) GetApiVersion() string { + if x != nil { + return x.ApiVersion + } + return "" +} + +func (x *WorkloadList) GetKind() string { + if x != nil { + return x.Kind + } + return "" +} + +func (x *WorkloadList) GetMetadata() *v3.ListMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *WorkloadList) GetItems() []*Workload { + if x != nil { + return x.Items + } + return nil +} + +// WorkloadSnapshotCondition is the condition of workload snapshot +type WorkloadSnapshotCondition struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Type WorkloadSnapshotConditionType `protobuf:"varint,1,opt,name=type,proto3,enum=rafay.dev.types.config.WorkloadSnapshotConditionType" json:"type,omitempty"` + Status *v3.Status `protobuf:"bytes,5,opt,name=status,proto3" json:"status,omitempty"` + LastUpdated *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=lastUpdated,proto3" json:"lastUpdated,omitempty"` + Reason string `protobuf:"bytes,4,opt,name=reason,proto3" json:"reason,omitempty"` +} + +func (x *WorkloadSnapshotCondition) Reset() { + *x = WorkloadSnapshotCondition{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_config_workload_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WorkloadSnapshotCondition) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkloadSnapshotCondition) ProtoMessage() {} + +func (x *WorkloadSnapshotCondition) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_config_workload_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WorkloadSnapshotCondition.ProtoReflect.Descriptor instead. +func (*WorkloadSnapshotCondition) Descriptor() ([]byte, []int) { + return file_proto_types_config_workload_proto_rawDescGZIP(), []int{11} +} + +func (x *WorkloadSnapshotCondition) GetType() WorkloadSnapshotConditionType { + if x != nil { + return x.Type + } + return WorkloadSnapshotConditionType_WorkloadSnapshotValidate +} + +func (x *WorkloadSnapshotCondition) GetStatus() *v3.Status { + if x != nil { + return x.Status + } + return nil +} + +func (x *WorkloadSnapshotCondition) GetLastUpdated() *timestamppb.Timestamp { + if x != nil { + return x.LastUpdated + } + return nil +} + +func (x *WorkloadSnapshotCondition) GetReason() string { + if x != nil { + return x.Reason + } + return "" +} + +type WorkloadSnapshotAuthMeta struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AccountID int64 `protobuf:"zigzag64,1,opt,name=accountID,proto3" json:"accountID,omitempty"` + IsSSOUser bool `protobuf:"varint,2,opt,name=isSSOUser,proto3" json:"isSSOUser,omitempty"` + UserName string `protobuf:"bytes,3,opt,name=userName,proto3" json:"userName,omitempty"` +} + +func (x *WorkloadSnapshotAuthMeta) Reset() { + *x = WorkloadSnapshotAuthMeta{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_config_workload_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WorkloadSnapshotAuthMeta) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkloadSnapshotAuthMeta) ProtoMessage() {} + +func (x *WorkloadSnapshotAuthMeta) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_config_workload_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WorkloadSnapshotAuthMeta.ProtoReflect.Descriptor instead. +func (*WorkloadSnapshotAuthMeta) Descriptor() ([]byte, []int) { + return file_proto_types_config_workload_proto_rawDescGZIP(), []int{12} +} + +func (x *WorkloadSnapshotAuthMeta) GetAccountID() int64 { + if x != nil { + return x.AccountID + } + return 0 +} + +func (x *WorkloadSnapshotAuthMeta) GetIsSSOUser() bool { + if x != nil { + return x.IsSSOUser + } + return false +} + +func (x *WorkloadSnapshotAuthMeta) GetUserName() string { + if x != nil { + return x.UserName + } + return "" +} + +type WorkloadSnapshotSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + Placement *PlacementSpec `protobuf:"bytes,2,opt,name=placement,proto3" json:"placement,omitempty"` + DeploymentPlan *DeploymentPlanSpec `protobuf:"bytes,3,opt,name=deploymentPlan,proto3" json:"deploymentPlan,omitempty"` + ArtifactType ArtifactType `protobuf:"varint,4,opt,name=artifactType,proto3,enum=rafay.dev.types.config.ArtifactType" json:"artifactType,omitempty"` + SnapshotType WorkloadSnapshotType `protobuf:"varint,5,opt,name=snapshotType,proto3,enum=rafay.dev.types.config.WorkloadSnapshotType" json:"snapshotType,omitempty"` + Snapshot []byte `protobuf:"bytes,6,opt,name=snapshot,proto3" json:"snapshot,omitempty"` + SnapshotFiles []*FileMeta `protobuf:"bytes,7,rep,name=snapshotFiles,proto3" json:"snapshotFiles,omitempty"` + Extra *ArtifactExtra `protobuf:"bytes,8,opt,name=extra,proto3" json:"extra,omitempty"` + AuthMeta *WorkloadSnapshotAuthMeta `protobuf:"bytes,9,opt,name=authMeta,proto3" json:"authMeta,omitempty"` + WorkloadName string `protobuf:"bytes,10,opt,name=workloadName,proto3" json:"workloadName,omitempty"` + RepositoryRef string `protobuf:"bytes,11,opt,name=repositoryRef,proto3" json:"repositoryRef,omitempty"` + ValueRepositoryRef string `protobuf:"bytes,12,opt,name=valueRepositoryRef,proto3" json:"valueRepositoryRef,omitempty"` + AdditionalReference *RepoArtifactMeta `protobuf:"bytes,13,opt,name=additionalReference,proto3" json:"additionalReference,omitempty"` +} + +func (x *WorkloadSnapshotSpec) Reset() { + *x = WorkloadSnapshotSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_config_workload_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WorkloadSnapshotSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkloadSnapshotSpec) ProtoMessage() {} + +func (x *WorkloadSnapshotSpec) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_config_workload_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WorkloadSnapshotSpec.ProtoReflect.Descriptor instead. +func (*WorkloadSnapshotSpec) Descriptor() ([]byte, []int) { + return file_proto_types_config_workload_proto_rawDescGZIP(), []int{13} +} + +func (x *WorkloadSnapshotSpec) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *WorkloadSnapshotSpec) GetPlacement() *PlacementSpec { + if x != nil { + return x.Placement + } + return nil +} + +func (x *WorkloadSnapshotSpec) GetDeploymentPlan() *DeploymentPlanSpec { + if x != nil { + return x.DeploymentPlan + } + return nil +} + +func (x *WorkloadSnapshotSpec) GetArtifactType() ArtifactType { + if x != nil { + return x.ArtifactType + } + return ArtifactType_ArtifactTypeNotSet +} + +func (x *WorkloadSnapshotSpec) GetSnapshotType() WorkloadSnapshotType { + if x != nil { + return x.SnapshotType + } + return WorkloadSnapshotType_WorkloadSnapshotTypeNotSet +} + +func (x *WorkloadSnapshotSpec) GetSnapshot() []byte { + if x != nil { + return x.Snapshot + } + return nil +} + +func (x *WorkloadSnapshotSpec) GetSnapshotFiles() []*FileMeta { + if x != nil { + return x.SnapshotFiles + } + return nil +} + +func (x *WorkloadSnapshotSpec) GetExtra() *ArtifactExtra { + if x != nil { + return x.Extra + } + return nil +} + +func (x *WorkloadSnapshotSpec) GetAuthMeta() *WorkloadSnapshotAuthMeta { + if x != nil { + return x.AuthMeta + } + return nil +} + +func (x *WorkloadSnapshotSpec) GetWorkloadName() string { + if x != nil { + return x.WorkloadName + } + return "" +} + +func (x *WorkloadSnapshotSpec) GetRepositoryRef() string { + if x != nil { + return x.RepositoryRef + } + return "" +} + +func (x *WorkloadSnapshotSpec) GetValueRepositoryRef() string { + if x != nil { + return x.ValueRepositoryRef + } + return "" +} + +func (x *WorkloadSnapshotSpec) GetAdditionalReference() *RepoArtifactMeta { + if x != nil { + return x.AdditionalReference + } + return nil +} + +type WorkloadSnapshotStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Revision int64 `protobuf:"zigzag64,1,opt,name=revision,proto3" json:"revision,omitempty"` + WorkloadID string `protobuf:"bytes,2,opt,name=workloadID,proto3" json:"workloadID,omitempty"` + Conditions []*WorkloadSnapshotCondition `protobuf:"bytes,3,rep,name=conditions,proto3" json:"conditions,omitempty"` + AssignedClusters []*ClusterMeta `protobuf:"bytes,4,rep,name=assignedClusters,proto3" json:"assignedClusters,omitempty"` + DeployedClusters []*ClusterMeta `protobuf:"bytes,5,rep,name=deployedClusters,proto3" json:"deployedClusters,omitempty"` + FailedClusters []*ClusterMeta `protobuf:"bytes,6,rep,name=failedClusters,proto3" json:"failedClusters,omitempty"` + ReadyClusters []*ClusterMeta `protobuf:"bytes,7,rep,name=readyClusters,proto3" json:"readyClusters,omitempty"` + DriftedClusters []*ClusterMeta `protobuf:"bytes,8,rep,name=driftedClusters,proto3" json:"driftedClusters,omitempty"` + RepoSourceVersion string `protobuf:"bytes,9,opt,name=repoSourceVersion,proto3" json:"repoSourceVersion,omitempty"` +} + +func (x *WorkloadSnapshotStatus) Reset() { + *x = WorkloadSnapshotStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_config_workload_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WorkloadSnapshotStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkloadSnapshotStatus) ProtoMessage() {} + +func (x *WorkloadSnapshotStatus) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_config_workload_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WorkloadSnapshotStatus.ProtoReflect.Descriptor instead. +func (*WorkloadSnapshotStatus) Descriptor() ([]byte, []int) { + return file_proto_types_config_workload_proto_rawDescGZIP(), []int{14} +} + +func (x *WorkloadSnapshotStatus) GetRevision() int64 { + if x != nil { + return x.Revision + } + return 0 +} + +func (x *WorkloadSnapshotStatus) GetWorkloadID() string { + if x != nil { + return x.WorkloadID + } + return "" +} + +func (x *WorkloadSnapshotStatus) GetConditions() []*WorkloadSnapshotCondition { + if x != nil { + return x.Conditions + } + return nil +} + +func (x *WorkloadSnapshotStatus) GetAssignedClusters() []*ClusterMeta { + if x != nil { + return x.AssignedClusters + } + return nil +} + +func (x *WorkloadSnapshotStatus) GetDeployedClusters() []*ClusterMeta { + if x != nil { + return x.DeployedClusters + } + return nil +} + +func (x *WorkloadSnapshotStatus) GetFailedClusters() []*ClusterMeta { + if x != nil { + return x.FailedClusters + } + return nil +} + +func (x *WorkloadSnapshotStatus) GetReadyClusters() []*ClusterMeta { + if x != nil { + return x.ReadyClusters + } + return nil +} + +func (x *WorkloadSnapshotStatus) GetDriftedClusters() []*ClusterMeta { + if x != nil { + return x.DriftedClusters + } + return nil +} + +func (x *WorkloadSnapshotStatus) GetRepoSourceVersion() string { + if x != nil { + return x.RepoSourceVersion + } + return "" +} + +type WorkloadSnapshot struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ApiVersion string `protobuf:"bytes,1,opt,name=apiVersion,proto3" json:"apiVersion,omitempty"` + Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"` + Metadata *v3.Metadata `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *WorkloadSnapshotSpec `protobuf:"bytes,4,opt,name=spec,proto3" json:"spec,omitempty"` + Status *WorkloadSnapshotStatus `protobuf:"bytes,5,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *WorkloadSnapshot) Reset() { + *x = WorkloadSnapshot{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_config_workload_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WorkloadSnapshot) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkloadSnapshot) ProtoMessage() {} + +func (x *WorkloadSnapshot) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_config_workload_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WorkloadSnapshot.ProtoReflect.Descriptor instead. +func (*WorkloadSnapshot) Descriptor() ([]byte, []int) { + return file_proto_types_config_workload_proto_rawDescGZIP(), []int{15} +} + +func (x *WorkloadSnapshot) GetApiVersion() string { + if x != nil { + return x.ApiVersion + } + return "" +} + +func (x *WorkloadSnapshot) GetKind() string { + if x != nil { + return x.Kind + } + return "" +} + +func (x *WorkloadSnapshot) GetMetadata() *v3.Metadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *WorkloadSnapshot) GetSpec() *WorkloadSnapshotSpec { + if x != nil { + return x.Spec + } + return nil +} + +func (x *WorkloadSnapshot) GetStatus() *WorkloadSnapshotStatus { + if x != nil { + return x.Status + } + return nil +} + +type WorkloadSnapshotList struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ApiVersion string `protobuf:"bytes,1,opt,name=apiVersion,proto3" json:"apiVersion,omitempty"` + Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"` + Metadata *v3.ListMetadata `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` + Items []*WorkloadSnapshot `protobuf:"bytes,4,rep,name=items,proto3" json:"items,omitempty"` +} + +func (x *WorkloadSnapshotList) Reset() { + *x = WorkloadSnapshotList{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_config_workload_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WorkloadSnapshotList) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkloadSnapshotList) ProtoMessage() {} + +func (x *WorkloadSnapshotList) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_config_workload_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WorkloadSnapshotList.ProtoReflect.Descriptor instead. +func (*WorkloadSnapshotList) Descriptor() ([]byte, []int) { + return file_proto_types_config_workload_proto_rawDescGZIP(), []int{16} +} + +func (x *WorkloadSnapshotList) GetApiVersion() string { + if x != nil { + return x.ApiVersion + } + return "" +} + +func (x *WorkloadSnapshotList) GetKind() string { + if x != nil { + return x.Kind + } + return "" +} + +func (x *WorkloadSnapshotList) GetMetadata() *v3.ListMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *WorkloadSnapshotList) GetItems() []*WorkloadSnapshot { + if x != nil { + return x.Items + } + return nil +} + +type WorkloadTemplateSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ArtifactType ArtifactType `protobuf:"varint,1,opt,name=artifactType,proto3,enum=rafay.dev.types.config.ArtifactType" json:"artifactType,omitempty"` + ArtifactFiles []*File `protobuf:"bytes,2,rep,name=artifactFiles,proto3" json:"artifactFiles,omitempty"` + Extra *ArtifactExtra `protobuf:"bytes,3,opt,name=extra,proto3" json:"extra,omitempty"` + RepositoryRef string `protobuf:"bytes,4,opt,name=repositoryRef,proto3" json:"repositoryRef,omitempty"` +} + +func (x *WorkloadTemplateSpec) Reset() { + *x = WorkloadTemplateSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_config_workload_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WorkloadTemplateSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkloadTemplateSpec) ProtoMessage() {} + +func (x *WorkloadTemplateSpec) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_config_workload_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WorkloadTemplateSpec.ProtoReflect.Descriptor instead. +func (*WorkloadTemplateSpec) Descriptor() ([]byte, []int) { + return file_proto_types_config_workload_proto_rawDescGZIP(), []int{17} +} + +func (x *WorkloadTemplateSpec) GetArtifactType() ArtifactType { + if x != nil { + return x.ArtifactType + } + return ArtifactType_ArtifactTypeNotSet +} + +func (x *WorkloadTemplateSpec) GetArtifactFiles() []*File { + if x != nil { + return x.ArtifactFiles + } + return nil +} + +func (x *WorkloadTemplateSpec) GetExtra() *ArtifactExtra { + if x != nil { + return x.Extra + } + return nil +} + +func (x *WorkloadTemplateSpec) GetRepositoryRef() string { + if x != nil { + return x.RepositoryRef + } + return "" +} + +type WorkloadTemplate struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ApiVersion string `protobuf:"bytes,1,opt,name=apiVersion,proto3" json:"apiVersion,omitempty"` + Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"` + Metadata *v3.Metadata `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *WorkloadTemplateSpec `protobuf:"bytes,4,opt,name=spec,proto3" json:"spec,omitempty"` +} + +func (x *WorkloadTemplate) Reset() { + *x = WorkloadTemplate{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_config_workload_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WorkloadTemplate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkloadTemplate) ProtoMessage() {} + +func (x *WorkloadTemplate) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_config_workload_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WorkloadTemplate.ProtoReflect.Descriptor instead. +func (*WorkloadTemplate) Descriptor() ([]byte, []int) { + return file_proto_types_config_workload_proto_rawDescGZIP(), []int{18} +} + +func (x *WorkloadTemplate) GetApiVersion() string { + if x != nil { + return x.ApiVersion + } + return "" +} + +func (x *WorkloadTemplate) GetKind() string { + if x != nil { + return x.Kind + } + return "" +} + +func (x *WorkloadTemplate) GetMetadata() *v3.Metadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *WorkloadTemplate) GetSpec() *WorkloadTemplateSpec { + if x != nil { + return x.Spec + } + return nil +} + +type WorkloadTemplateList struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ApiVersion string `protobuf:"bytes,1,opt,name=apiVersion,proto3" json:"apiVersion,omitempty"` + Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"` + Metadata *v3.ListMetadata `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` + Items []*WorkloadTemplate `protobuf:"bytes,4,rep,name=items,proto3" json:"items,omitempty"` +} + +func (x *WorkloadTemplateList) Reset() { + *x = WorkloadTemplateList{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_config_workload_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WorkloadTemplateList) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkloadTemplateList) ProtoMessage() {} + +func (x *WorkloadTemplateList) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_config_workload_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WorkloadTemplateList.ProtoReflect.Descriptor instead. +func (*WorkloadTemplateList) Descriptor() ([]byte, []int) { + return file_proto_types_config_workload_proto_rawDescGZIP(), []int{19} +} + +func (x *WorkloadTemplateList) GetApiVersion() string { + if x != nil { + return x.ApiVersion + } + return "" +} + +func (x *WorkloadTemplateList) GetKind() string { + if x != nil { + return x.Kind + } + return "" +} + +func (x *WorkloadTemplateList) GetMetadata() *v3.ListMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *WorkloadTemplateList) GetItems() []*WorkloadTemplate { + if x != nil { + return x.Items + } + return nil +} + +var File_proto_types_config_workload_proto protoreflect.FileDescriptor + +var file_proto_types_config_workload_proto_rawDesc = []byte{ + 0x0a, 0x21, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, + 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, + 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x70, 0x62, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x70, 0x6c, + 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x34, 0x0a, + 0x10, 0x50, 0x61, 0x72, 0x61, 0x6c, 0x6c, 0x65, 0x6c, 0x50, 0x6c, 0x61, 0x6e, 0x53, 0x70, 0x65, + 0x63, 0x12, 0x20, 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x50, 0x61, 0x72, 0x61, 0x6c, 0x6c, 0x65, 0x6c, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x11, 0x52, 0x0b, 0x6d, 0x61, 0x78, 0x50, 0x61, 0x72, 0x61, 0x6c, + 0x6c, 0x65, 0x6c, 0x22, 0x4e, 0x0a, 0x0a, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, + 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x74, 0x12, + 0x22, 0x0a, 0x0c, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, + 0x69, 0x65, 0x73, 0x22, 0x8f, 0x01, 0x0a, 0x12, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, + 0x63, 0x79, 0x50, 0x6c, 0x61, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x12, 0x20, 0x0a, 0x0b, 0x6d, 0x61, + 0x78, 0x50, 0x61, 0x72, 0x61, 0x6c, 0x6c, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x11, 0x52, + 0x0b, 0x6d, 0x61, 0x78, 0x50, 0x61, 0x72, 0x61, 0x6c, 0x6c, 0x65, 0x6c, 0x12, 0x57, 0x0a, 0x0c, + 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x44, 0x65, 0x70, 0x65, + 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x42, 0x0f, 0xc8, 0xde, 0x1f, 0x00, 0xea, 0xde, 0x1f, 0x07, + 0x2c, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x0c, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, + 0x6e, 0x63, 0x69, 0x65, 0x73, 0x22, 0x10, 0x0a, 0x0e, 0x43, 0x61, 0x6e, 0x61, 0x72, 0x79, 0x50, + 0x6c, 0x61, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x22, 0x13, 0x0a, 0x11, 0x42, 0x6c, 0x75, 0x65, 0x47, + 0x72, 0x65, 0x65, 0x6e, 0x50, 0x6c, 0x61, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x22, 0xa5, 0x03, 0x0a, + 0x12, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x6c, 0x61, 0x6e, 0x53, + 0x70, 0x65, 0x63, 0x12, 0x54, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, + 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x44, + 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x6c, 0x61, 0x6e, 0x54, 0x79, 0x70, + 0x65, 0x42, 0x0c, 0xea, 0xde, 0x1f, 0x08, 0x70, 0x6c, 0x61, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, + 0x08, 0x70, 0x6c, 0x61, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x4c, 0x0a, 0x0c, 0x70, 0x61, 0x72, + 0x61, 0x6c, 0x6c, 0x65, 0x6c, 0x53, 0x70, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x28, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6c, 0x6c, 0x65, + 0x6c, 0x50, 0x6c, 0x61, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x52, 0x0c, 0x70, 0x61, 0x72, 0x61, 0x6c, + 0x6c, 0x65, 0x6c, 0x53, 0x70, 0x65, 0x63, 0x12, 0x46, 0x0a, 0x0a, 0x63, 0x61, 0x6e, 0x61, 0x72, + 0x79, 0x53, 0x70, 0x65, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x72, 0x61, + 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x43, 0x61, 0x6e, 0x61, 0x72, 0x79, 0x50, 0x6c, 0x61, 0x6e, 0x53, + 0x70, 0x65, 0x63, 0x52, 0x0a, 0x63, 0x61, 0x6e, 0x61, 0x72, 0x79, 0x53, 0x70, 0x65, 0x63, 0x12, + 0x4f, 0x0a, 0x0d, 0x62, 0x6c, 0x75, 0x65, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x53, 0x70, 0x65, 0x63, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, + 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, + 0x42, 0x6c, 0x75, 0x65, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x50, 0x6c, 0x61, 0x6e, 0x53, 0x70, 0x65, + 0x63, 0x52, 0x0d, 0x62, 0x6c, 0x75, 0x65, 0x47, 0x72, 0x65, 0x65, 0x6e, 0x53, 0x70, 0x65, 0x63, + 0x12, 0x52, 0x0a, 0x0e, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x53, 0x70, + 0x65, 0x63, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, + 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x50, 0x6c, 0x61, 0x6e, + 0x53, 0x70, 0x65, 0x63, 0x52, 0x0e, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, + 0x53, 0x70, 0x65, 0x63, 0x22, 0xeb, 0x03, 0x0a, 0x08, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, + 0x64, 0x12, 0x65, 0x0a, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x45, 0x92, 0x41, 0x42, 0x2a, 0x0b, 0x41, 0x50, 0x49, 0x20, + 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0x1b, 0x41, 0x50, 0x49, 0x20, 0x56, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x3a, 0x14, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6b, 0x38, 0x73, + 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x69, 0x6f, 0x2f, 0x76, 0x33, 0x40, 0x01, 0x52, 0x0a, 0x61, 0x70, + 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x3f, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2b, 0x92, 0x41, 0x28, 0x2a, 0x04, 0x4b, 0x69, 0x6e, + 0x64, 0x32, 0x14, 0x4b, 0x69, 0x6e, 0x64, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, 0x08, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, + 0x64, 0x40, 0x01, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x68, 0x0a, 0x08, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x72, 0x61, + 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x42, 0x27, 0x92, 0x41, 0x24, 0x2a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x32, + 0x18, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, + 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x12, 0x42, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x24, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x6c, + 0x6f, 0x61, 0x64, 0x53, 0x70, 0x65, 0x63, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0xd0, 0xde, 0x1f, + 0x01, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x48, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, + 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, + 0x08, 0xc8, 0xde, 0x1f, 0x00, 0xd0, 0xde, 0x1f, 0x01, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x3a, 0x3f, 0x92, 0x41, 0x3c, 0x0a, 0x3a, 0x2a, 0x08, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, + 0x61, 0x64, 0x32, 0x08, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0xd2, 0x01, 0x0a, 0x61, + 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0xd2, 0x01, 0x04, 0x6b, 0x69, 0x6e, 0x64, + 0xd2, 0x01, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xd2, 0x01, 0x04, 0x73, 0x70, + 0x65, 0x63, 0x22, 0xc4, 0x07, 0x0a, 0x0c, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x53, + 0x70, 0x65, 0x63, 0x12, 0x3d, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1f, 0xea, 0xde, 0x1f, 0x09, 0x6e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0xf2, 0xde, 0x1f, 0x0e, 0x70, 0x67, 0x3a, 0x22, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x12, 0x5b, 0x0a, 0x09, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, + 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x50, + 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x70, 0x65, 0x63, 0x42, 0x16, 0xc8, 0xde, + 0x1f, 0x00, 0xf2, 0xde, 0x1f, 0x0e, 0x70, 0x67, 0x3a, 0x22, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x22, 0x52, 0x09, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, + 0x70, 0x0a, 0x0e, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x6c, 0x61, + 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, + 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x6c, 0x61, 0x6e, 0x53, + 0x70, 0x65, 0x63, 0x42, 0x1c, 0xc8, 0xde, 0x1f, 0x00, 0xf2, 0xde, 0x1f, 0x14, 0x70, 0x67, 0x3a, + 0x22, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x70, 0x6c, 0x61, 0x6e, + 0x22, 0x52, 0x0e, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x6c, 0x61, + 0x6e, 0x12, 0x79, 0x0a, 0x0c, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x54, 0x79, 0x70, + 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, + 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x42, 0x2f, 0xea, + 0xde, 0x1f, 0x0c, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0xf2, + 0xde, 0x1f, 0x1b, 0x70, 0x67, 0x3a, 0x22, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x2c, 0x75, 0x73, 0x65, 0x5f, 0x7a, 0x65, 0x72, 0x6f, 0x22, 0x52, 0x0c, + 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x4e, 0x0a, 0x0d, + 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x05, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x46, 0x69, 0x6c, + 0x65, 0x42, 0x0a, 0xf2, 0xde, 0x1f, 0x06, 0x70, 0x67, 0x3a, 0x22, 0x2d, 0x22, 0x52, 0x0d, 0x61, + 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x4f, 0x0a, 0x05, + 0x65, 0x78, 0x74, 0x72, 0x61, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x72, 0x61, + 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x45, 0x78, 0x74, + 0x72, 0x61, 0x42, 0x12, 0xc8, 0xde, 0x1f, 0x00, 0xf2, 0xde, 0x1f, 0x0a, 0x70, 0x67, 0x3a, 0x22, + 0x65, 0x78, 0x74, 0x72, 0x61, 0x22, 0x52, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x12, 0x3d, 0x0a, + 0x0d, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x66, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x17, 0xf2, 0xde, 0x1f, 0x13, 0x70, 0x67, 0x3a, 0x22, 0x72, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x72, 0x65, 0x66, 0x22, 0x52, 0x0d, 0x72, + 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x66, 0x12, 0x1e, 0x0a, 0x0a, + 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x49, 0x44, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0a, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x49, 0x44, 0x12, 0x5d, 0x0a, 0x09, + 0x73, 0x68, 0x61, 0x72, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x21, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x53, 0x68, 0x61, 0x72, 0x65, 0x4d, 0x6f, + 0x64, 0x65, 0x42, 0x1c, 0xf2, 0xde, 0x1f, 0x18, 0x70, 0x67, 0x3a, 0x22, 0x73, 0x68, 0x61, 0x72, + 0x65, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x2c, 0x75, 0x73, 0x65, 0x5f, 0x7a, 0x65, 0x72, 0x6f, 0x22, + 0x52, 0x09, 0x73, 0x68, 0x61, 0x72, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x4d, 0x0a, 0x12, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, + 0x66, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1d, 0xf2, 0xde, 0x1f, 0x19, 0x70, 0x67, 0x3a, + 0x22, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, + 0x79, 0x5f, 0x72, 0x65, 0x66, 0x22, 0x52, 0x12, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x66, 0x12, 0x7d, 0x0a, 0x13, 0x61, 0x64, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, + 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, + 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x4d, 0x65, 0x74, + 0x61, 0x42, 0x21, 0xc8, 0xde, 0x1f, 0x01, 0xf2, 0xde, 0x1f, 0x19, 0x70, 0x67, 0x3a, 0x22, 0x61, + 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, + 0x6e, 0x63, 0x65, 0x22, 0x52, 0x13, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, + 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x22, 0x5f, 0x0a, 0x0f, 0x50, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x1e, 0x0a, 0x0a, + 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0a, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x49, 0x44, 0x12, 0x2c, 0x0a, 0x09, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x0e, 0xea, 0xde, 0x1f, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x52, + 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x44, 0x22, 0xd9, 0x02, 0x0a, 0x0e, 0x57, + 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2b, 0x0a, + 0x0a, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x0b, 0xf2, 0xde, 0x1f, 0x07, 0x70, 0x67, 0x3a, 0x22, 0x69, 0x64, 0x22, 0x52, 0x0a, + 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x49, 0x44, 0x12, 0x49, 0x0a, 0x0e, 0x70, 0x75, + 0x62, 0x6c, 0x69, 0x73, 0x68, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x08, 0x42, 0x21, 0xf2, 0xde, 0x1f, 0x1d, 0x70, 0x67, 0x3a, 0x22, 0x70, 0x75, 0x62, 0x6c, + 0x69, 0x73, 0x68, 0x5f, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x2c, 0x75, 0x73, 0x65, 0x5f, + 0x7a, 0x65, 0x72, 0x6f, 0x22, 0x52, 0x0e, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x50, 0x65, + 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x5f, 0x0a, 0x15, 0x6c, 0x61, 0x73, 0x74, 0x50, 0x75, 0x62, + 0x6c, 0x69, 0x73, 0x68, 0x65, 0x64, 0x52, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x12, 0x42, 0x29, 0xf2, 0xde, 0x1f, 0x25, 0x70, 0x67, 0x3a, 0x22, 0x6c, 0x61, + 0x73, 0x74, 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x76, + 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x2c, 0x75, 0x73, 0x65, 0x5f, 0x7a, 0x65, 0x72, 0x6f, 0x22, 0x52, + 0x15, 0x6c, 0x61, 0x73, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x64, 0x52, 0x65, + 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x6e, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, + 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, + 0x64, 0x42, 0x29, 0x92, 0x41, 0x02, 0x40, 0x01, 0xc8, 0xde, 0x1f, 0x00, 0xea, 0xde, 0x1f, 0x12, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, + 0x74, 0x79, 0xf2, 0xde, 0x1f, 0x06, 0x70, 0x67, 0x3a, 0x22, 0x2d, 0x22, 0x52, 0x08, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x22, 0xf5, 0x02, 0x0a, 0x0c, 0x57, 0x6f, 0x72, 0x6b, 0x6c, + 0x6f, 0x61, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x6a, 0x0a, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x4a, 0x92, 0x41, 0x47, + 0x2a, 0x0b, 0x41, 0x50, 0x49, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0x20, 0x41, + 0x50, 0x49, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, + 0x65, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, + 0x14, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6b, 0x38, 0x73, 0x6d, 0x67, 0x6d, 0x74, 0x2e, + 0x69, 0x6f, 0x2f, 0x76, 0x33, 0x40, 0x01, 0x52, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x12, 0x48, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x34, 0x92, 0x41, 0x31, 0x2a, 0x04, 0x4b, 0x69, 0x6e, 0x64, 0x32, 0x19, 0x4b, 0x69, + 0x6e, 0x64, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x72, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, 0x0c, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, + 0x64, 0x4c, 0x69, 0x73, 0x74, 0x40, 0x01, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x77, 0x0a, + 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x27, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x32, 0x92, 0x41, 0x2f, 0x2a, 0x0c, 0x4c, + 0x69, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x32, 0x1d, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x69, 0x73, + 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x40, 0x01, 0x52, 0x08, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x36, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, + 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, + 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x57, + 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x22, 0xb2, + 0x02, 0x0a, 0x19, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x6e, 0x61, 0x70, 0x73, + 0x68, 0x6f, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x53, 0x0a, 0x04, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x35, 0x2e, 0x72, 0x61, 0x66, + 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x6e, 0x61, 0x70, + 0x73, 0x68, 0x6f, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, + 0x65, 0x42, 0x08, 0xea, 0xde, 0x1f, 0x04, 0x74, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, + 0x65, 0x12, 0x60, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x21, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x42, 0x25, 0x92, 0x41, 0x22, 0x2a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x32, 0x16, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, + 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x40, 0x01, 0x52, 0x06, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x12, 0x46, 0x0a, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x0b, + 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x72, + 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x61, + 0x73, 0x6f, 0x6e, 0x22, 0x72, 0x0a, 0x18, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x53, + 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x41, 0x75, 0x74, 0x68, 0x4d, 0x65, 0x74, 0x61, 0x12, + 0x1c, 0x0a, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x12, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x44, 0x12, 0x1c, 0x0a, + 0x09, 0x69, 0x73, 0x53, 0x53, 0x4f, 0x55, 0x73, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x09, 0x69, 0x73, 0x53, 0x53, 0x4f, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x75, + 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, + 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xb2, 0x09, 0x0a, 0x14, 0x57, 0x6f, 0x72, 0x6b, + 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x53, 0x70, 0x65, 0x63, + 0x12, 0x3d, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x1f, 0xea, 0xde, 0x1f, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0xf2, 0xde, 0x1f, 0x0e, 0x70, 0x67, 0x3a, 0x22, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x22, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, + 0x5b, 0x0a, 0x09, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x50, 0x6c, 0x61, 0x63, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x70, 0x65, 0x63, 0x42, 0x16, 0xc8, 0xde, 0x1f, 0x00, 0xf2, + 0xde, 0x1f, 0x0e, 0x70, 0x67, 0x3a, 0x22, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x22, 0x52, 0x09, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x70, 0x0a, 0x0e, + 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x6c, 0x61, 0x6e, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, + 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x44, 0x65, + 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x6c, 0x61, 0x6e, 0x53, 0x70, 0x65, 0x63, + 0x42, 0x1c, 0xc8, 0xde, 0x1f, 0x00, 0xf2, 0xde, 0x1f, 0x14, 0x70, 0x67, 0x3a, 0x22, 0x64, 0x65, + 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x70, 0x6c, 0x61, 0x6e, 0x22, 0x52, 0x0e, + 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x6c, 0x61, 0x6e, 0x12, 0x79, + 0x0a, 0x0c, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, + 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x41, 0x72, + 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x42, 0x2f, 0xea, 0xde, 0x1f, 0x0c, + 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0xf2, 0xde, 0x1f, 0x1b, + 0x70, 0x67, 0x3a, 0x22, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x2c, 0x75, 0x73, 0x65, 0x5f, 0x7a, 0x65, 0x72, 0x6f, 0x22, 0x52, 0x0c, 0x61, 0x72, 0x74, + 0x69, 0x66, 0x61, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x68, 0x0a, 0x0c, 0x73, 0x6e, 0x61, + 0x70, 0x73, 0x68, 0x6f, 0x74, 0x54, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x2c, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, + 0x64, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x54, 0x79, 0x70, 0x65, 0x42, 0x16, 0xf2, + 0xde, 0x1f, 0x12, 0x70, 0x67, 0x3a, 0x22, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x22, 0x52, 0x0c, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x32, 0x0a, 0x08, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x16, 0xea, 0xde, 0x1f, 0x01, 0x2d, 0xf2, 0xde, 0x1f, 0x0d, + 0x70, 0x67, 0x3a, 0x22, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x22, 0x52, 0x08, 0x73, + 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x63, 0x0a, 0x0d, 0x73, 0x6e, 0x61, 0x70, 0x73, + 0x68, 0x6f, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, + 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4d, 0x65, 0x74, 0x61, + 0x42, 0x1b, 0xc8, 0xde, 0x1f, 0x00, 0xf2, 0xde, 0x1f, 0x13, 0x70, 0x67, 0x3a, 0x22, 0x73, 0x6e, + 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x22, 0x52, 0x0d, 0x73, + 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x4f, 0x0a, 0x05, + 0x65, 0x78, 0x74, 0x72, 0x61, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x72, 0x61, + 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x45, 0x78, 0x74, + 0x72, 0x61, 0x42, 0x12, 0xc8, 0xde, 0x1f, 0x00, 0xf2, 0xde, 0x1f, 0x0a, 0x70, 0x67, 0x3a, 0x22, + 0x65, 0x78, 0x74, 0x72, 0x61, 0x22, 0x52, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x12, 0x64, 0x0a, + 0x08, 0x61, 0x75, 0x74, 0x68, 0x4d, 0x65, 0x74, 0x61, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x30, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, + 0x64, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x41, 0x75, 0x74, 0x68, 0x4d, 0x65, 0x74, + 0x61, 0x42, 0x16, 0xc8, 0xde, 0x1f, 0x00, 0xf2, 0xde, 0x1f, 0x0e, 0x70, 0x67, 0x3a, 0x22, 0x61, + 0x75, 0x74, 0x68, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x22, 0x52, 0x08, 0x61, 0x75, 0x74, 0x68, 0x4d, + 0x65, 0x74, 0x61, 0x12, 0x4a, 0x0a, 0x0c, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x4e, + 0x61, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x42, 0x26, 0xea, 0xde, 0x1f, 0x0c, 0x77, + 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0xf2, 0xde, 0x1f, 0x12, 0x70, + 0x67, 0x3a, 0x22, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x22, 0x52, 0x0c, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x12, + 0x3d, 0x0a, 0x0d, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x66, + 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x42, 0x17, 0xf2, 0xde, 0x1f, 0x13, 0x70, 0x67, 0x3a, 0x22, + 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x72, 0x65, 0x66, 0x22, 0x52, + 0x0d, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x66, 0x12, 0x4d, + 0x0a, 0x12, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, + 0x79, 0x52, 0x65, 0x66, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1d, 0xf2, 0xde, 0x1f, 0x19, + 0x70, 0x67, 0x3a, 0x22, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x72, 0x65, 0x66, 0x22, 0x52, 0x12, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x66, 0x12, 0x7d, 0x0a, + 0x13, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x66, 0x65, 0x72, + 0x65, 0x6e, 0x63, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x72, 0x61, 0x66, + 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, + 0x4d, 0x65, 0x74, 0x61, 0x42, 0x21, 0xc8, 0xde, 0x1f, 0x01, 0xf2, 0xde, 0x1f, 0x19, 0x70, 0x67, + 0x3a, 0x22, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x66, + 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x22, 0x52, 0x13, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x22, 0xdf, 0x09, 0x0a, + 0x16, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, + 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2d, 0x0a, 0x08, 0x72, 0x65, 0x76, 0x69, 0x73, + 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x12, 0x42, 0x11, 0xf2, 0xde, 0x1f, 0x0d, 0x70, + 0x67, 0x3a, 0x22, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x52, 0x08, 0x72, 0x65, + 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x34, 0x0a, 0x0a, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, + 0x61, 0x64, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x14, 0xf2, 0xde, 0x1f, 0x10, + 0x70, 0x67, 0x3a, 0x22, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x69, 0x64, 0x22, + 0x52, 0x0a, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x49, 0x44, 0x12, 0xad, 0x01, 0x0a, + 0x0a, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x31, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x6c, + 0x6f, 0x61, 0x64, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x5a, 0xc8, 0xde, 0x1f, 0x00, 0xea, 0xde, 0x1f, 0x14, 0x63, 0x6f, + 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, + 0x74, 0x79, 0xf2, 0xde, 0x1f, 0x3a, 0x70, 0x61, 0x74, 0x63, 0x68, 0x53, 0x74, 0x72, 0x61, 0x74, + 0x65, 0x67, 0x79, 0x3a, 0x22, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x22, 0x20, 0x70, 0x61, 0x74, 0x63, + 0x68, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x4b, 0x65, 0x79, 0x3a, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, + 0x20, 0x70, 0x67, 0x3a, 0x22, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, + 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0xa8, 0x01, 0x0a, + 0x10, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, + 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x42, 0x57, 0xc8, 0xde, + 0x1f, 0x00, 0xf2, 0xde, 0x1f, 0x4f, 0x70, 0x61, 0x74, 0x63, 0x68, 0x53, 0x74, 0x72, 0x61, 0x74, + 0x65, 0x67, 0x79, 0x3a, 0x22, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x22, 0x20, 0x70, 0x61, 0x74, 0x63, + 0x68, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x4b, 0x65, 0x79, 0x3a, 0x22, 0x63, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x49, 0x44, 0x22, 0x20, 0x70, 0x67, 0x3a, 0x22, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, + 0x65, 0x64, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x2c, 0x75, 0x73, 0x65, 0x5f, + 0x7a, 0x65, 0x72, 0x6f, 0x22, 0x52, 0x10, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, 0xa8, 0x01, 0x0a, 0x10, 0x64, 0x65, 0x70, 0x6c, + 0x6f, 0x79, 0x65, 0x64, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x43, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x42, 0x57, 0xc8, 0xde, 0x1f, 0x00, 0xf2, 0xde, 0x1f, + 0x4f, 0x70, 0x61, 0x74, 0x63, 0x68, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x3a, 0x22, + 0x6d, 0x65, 0x72, 0x67, 0x65, 0x22, 0x20, 0x70, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x65, 0x72, 0x67, + 0x65, 0x4b, 0x65, 0x79, 0x3a, 0x22, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x44, 0x22, + 0x20, 0x70, 0x67, 0x3a, 0x22, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x64, 0x5f, 0x63, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x2c, 0x75, 0x73, 0x65, 0x5f, 0x7a, 0x65, 0x72, 0x6f, 0x22, + 0x52, 0x10, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x64, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x73, 0x12, 0xa2, 0x01, 0x0a, 0x0e, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x43, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x72, 0x61, + 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, + 0x42, 0x55, 0xc8, 0xde, 0x1f, 0x00, 0xf2, 0xde, 0x1f, 0x4d, 0x70, 0x61, 0x74, 0x63, 0x68, 0x53, + 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x3a, 0x22, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x22, 0x20, + 0x70, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x4b, 0x65, 0x79, 0x3a, 0x22, 0x63, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x44, 0x22, 0x20, 0x70, 0x67, 0x3a, 0x22, 0x66, 0x61, + 0x69, 0x6c, 0x65, 0x64, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x2c, 0x75, 0x73, + 0x65, 0x5f, 0x7a, 0x65, 0x72, 0x6f, 0x22, 0x52, 0x0e, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, 0x9f, 0x01, 0x0a, 0x0d, 0x72, 0x65, 0x61, 0x64, + 0x79, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x23, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x4d, 0x65, 0x74, 0x61, 0x42, 0x54, 0xc8, 0xde, 0x1f, 0x00, 0xf2, 0xde, 0x1f, 0x4c, 0x70, 0x61, + 0x74, 0x63, 0x68, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x3a, 0x22, 0x6d, 0x65, 0x72, + 0x67, 0x65, 0x22, 0x20, 0x70, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x4b, 0x65, + 0x79, 0x3a, 0x22, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x44, 0x22, 0x20, 0x70, 0x67, + 0x3a, 0x22, 0x72, 0x65, 0x61, 0x64, 0x79, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, + 0x2c, 0x75, 0x73, 0x65, 0x5f, 0x7a, 0x65, 0x72, 0x6f, 0x22, 0x52, 0x0d, 0x72, 0x65, 0x61, 0x64, + 0x79, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, 0xa5, 0x01, 0x0a, 0x0f, 0x64, 0x72, + 0x69, 0x66, 0x74, 0x65, 0x64, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x08, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x43, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x61, 0x42, 0x56, 0xc8, 0xde, 0x1f, 0x00, 0xf2, 0xde, + 0x1f, 0x4e, 0x70, 0x61, 0x74, 0x63, 0x68, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x3a, + 0x22, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x22, 0x20, 0x70, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x65, 0x72, + 0x67, 0x65, 0x4b, 0x65, 0x79, 0x3a, 0x22, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x44, + 0x22, 0x20, 0x70, 0x67, 0x3a, 0x22, 0x64, 0x72, 0x69, 0x66, 0x74, 0x65, 0x64, 0x5f, 0x63, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x2c, 0x75, 0x73, 0x65, 0x5f, 0x7a, 0x65, 0x72, 0x6f, 0x22, + 0x52, 0x0f, 0x64, 0x72, 0x69, 0x66, 0x74, 0x65, 0x64, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x73, 0x12, 0x6b, 0x0a, 0x11, 0x72, 0x65, 0x70, 0x6f, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x56, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x3d, 0xf2, 0xde, + 0x1f, 0x39, 0x70, 0x61, 0x74, 0x63, 0x68, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x3a, + 0x22, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x22, 0x20, 0x70, 0x67, 0x3a, 0x22, 0x72, 0x65, + 0x70, 0x6f, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x2c, 0x75, 0x73, 0x65, 0x5f, 0x7a, 0x65, 0x72, 0x6f, 0x22, 0x52, 0x11, 0x72, 0x65, 0x70, + 0x6f, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x9b, + 0x04, 0x0a, 0x10, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x6e, 0x61, 0x70, 0x73, + 0x68, 0x6f, 0x74, 0x12, 0x65, 0x0a, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x45, 0x92, 0x41, 0x42, 0x2a, 0x0b, 0x41, 0x50, + 0x49, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0x1b, 0x41, 0x50, 0x49, 0x20, 0x56, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, 0x14, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6b, + 0x38, 0x73, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x69, 0x6f, 0x2f, 0x76, 0x33, 0x40, 0x01, 0x52, 0x0a, + 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x47, 0x0a, 0x04, 0x6b, 0x69, + 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x33, 0x92, 0x41, 0x30, 0x2a, 0x04, 0x4b, + 0x69, 0x6e, 0x64, 0x32, 0x14, 0x4b, 0x69, 0x6e, 0x64, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, + 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, 0x10, 0x57, 0x6f, 0x72, 0x6b, 0x6c, + 0x6f, 0x61, 0x64, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x40, 0x01, 0x52, 0x04, 0x6b, + 0x69, 0x6e, 0x64, 0x12, 0x68, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, + 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, + 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x27, 0x92, 0x41, 0x24, 0x2a, + 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x32, 0x18, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x4a, 0x0a, + 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x72, 0x61, + 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x6e, 0x61, + 0x70, 0x73, 0x68, 0x6f, 0x74, 0x53, 0x70, 0x65, 0x63, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0xd0, + 0xde, 0x1f, 0x01, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x50, 0x0a, 0x06, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x72, 0x61, 0x66, 0x61, + 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x6e, 0x61, 0x70, 0x73, + 0x68, 0x6f, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0xd0, + 0xde, 0x1f, 0x01, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x3a, 0x4f, 0x92, 0x41, 0x4c, + 0x0a, 0x4a, 0x2a, 0x10, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x6e, 0x61, 0x70, + 0x73, 0x68, 0x6f, 0x74, 0x32, 0x10, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x6e, + 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0xd2, 0x01, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0xd2, 0x01, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0xd2, 0x01, 0x08, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0xd2, 0x01, 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, 0x8d, 0x03, 0x0a, + 0x14, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, + 0x74, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x6a, 0x0a, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x4a, 0x92, 0x41, 0x47, 0x2a, 0x0b, + 0x41, 0x50, 0x49, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0x20, 0x41, 0x50, 0x49, + 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, + 0x6c, 0x69, 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, 0x14, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6b, 0x38, 0x73, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x69, 0x6f, + 0x2f, 0x76, 0x33, 0x40, 0x01, 0x52, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x12, 0x50, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x3c, 0x92, 0x41, 0x39, 0x2a, 0x04, 0x4b, 0x69, 0x6e, 0x64, 0x32, 0x19, 0x4b, 0x69, 0x6e, 0x64, + 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, 0x14, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x53, + 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x40, 0x01, 0x52, 0x04, 0x6b, + 0x69, 0x6e, 0x64, 0x12, 0x77, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, + 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, + 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x32, + 0x92, 0x41, 0x2f, 0x2a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x32, 0x1d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x20, 0x6f, 0x66, 0x20, 0x74, + 0x68, 0x65, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x40, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x3e, 0x0a, 0x05, + 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x72, 0x61, + 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x6e, 0x61, + 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x22, 0xf1, 0x02, 0x0a, + 0x14, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, + 0x65, 0x53, 0x70, 0x65, 0x63, 0x12, 0x79, 0x0a, 0x0c, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, + 0x74, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x72, 0x61, + 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x54, 0x79, 0x70, + 0x65, 0x42, 0x2f, 0xea, 0xde, 0x1f, 0x0c, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x54, + 0x79, 0x70, 0x65, 0xf2, 0xde, 0x1f, 0x1b, 0x70, 0x67, 0x3a, 0x22, 0x61, 0x72, 0x74, 0x69, 0x66, + 0x61, 0x63, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x2c, 0x75, 0x73, 0x65, 0x5f, 0x7a, 0x65, 0x72, + 0x6f, 0x22, 0x52, 0x0c, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x4e, 0x0a, 0x0d, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x46, 0x69, 0x6c, 0x65, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, + 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x42, 0x0a, 0xf2, 0xde, 0x1f, 0x06, 0x70, 0x67, 0x3a, 0x22, 0x2d, + 0x22, 0x52, 0x0d, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, + 0x12, 0x4f, 0x0a, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x25, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, + 0x74, 0x45, 0x78, 0x74, 0x72, 0x61, 0x42, 0x12, 0xc8, 0xde, 0x1f, 0x00, 0xf2, 0xde, 0x1f, 0x0a, + 0x70, 0x67, 0x3a, 0x22, 0x65, 0x78, 0x74, 0x72, 0x61, 0x22, 0x52, 0x05, 0x65, 0x78, 0x74, 0x72, + 0x61, 0x12, 0x3d, 0x0a, 0x0d, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, + 0x65, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x17, 0xf2, 0xde, 0x1f, 0x13, 0x70, 0x67, + 0x3a, 0x22, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x72, 0x65, 0x66, + 0x22, 0x52, 0x0d, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x66, + 0x22, 0xc9, 0x03, 0x0a, 0x10, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x65, 0x6d, + 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x65, 0x0a, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x45, 0x92, 0x41, 0x42, 0x2a, 0x0b, + 0x41, 0x50, 0x49, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0x1b, 0x41, 0x50, 0x49, + 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, 0x14, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x2e, 0x6b, 0x38, 0x73, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x69, 0x6f, 0x2f, 0x76, 0x33, 0x40, 0x01, + 0x52, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x47, 0x0a, 0x04, + 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x33, 0x92, 0x41, 0x30, 0x2a, + 0x04, 0x4b, 0x69, 0x6e, 0x64, 0x32, 0x14, 0x4b, 0x69, 0x6e, 0x64, 0x20, 0x6f, 0x66, 0x20, 0x74, + 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, 0x10, 0x57, 0x6f, 0x72, + 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x40, 0x01, 0x52, + 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x68, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, + 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x27, 0x92, 0x41, + 0x24, 0x2a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x32, 0x18, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, + 0x4a, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, + 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x54, + 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x53, 0x70, 0x65, 0x63, 0x42, 0x08, 0xc8, 0xde, 0x1f, + 0x00, 0xd0, 0xde, 0x1f, 0x01, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x3a, 0x4f, 0x92, 0x41, 0x4c, + 0x0a, 0x4a, 0x2a, 0x10, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x65, 0x6d, 0x70, + 0x6c, 0x61, 0x74, 0x65, 0x32, 0x10, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x65, + 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0xd2, 0x01, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0xd2, 0x01, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0xd2, 0x01, 0x08, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0xd2, 0x01, 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, 0x8d, 0x03, 0x0a, + 0x14, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, + 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x6a, 0x0a, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x4a, 0x92, 0x41, 0x47, 0x2a, 0x0b, + 0x41, 0x50, 0x49, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0x20, 0x41, 0x50, 0x49, + 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, + 0x6c, 0x69, 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, 0x14, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x6b, 0x38, 0x73, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x69, 0x6f, + 0x2f, 0x76, 0x33, 0x40, 0x01, 0x52, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x12, 0x50, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x3c, 0x92, 0x41, 0x39, 0x2a, 0x04, 0x4b, 0x69, 0x6e, 0x64, 0x32, 0x19, 0x4b, 0x69, 0x6e, 0x64, + 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, 0x14, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x53, + 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x40, 0x01, 0x52, 0x04, 0x6b, + 0x69, 0x6e, 0x64, 0x12, 0x77, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, + 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, + 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x32, + 0x92, 0x41, 0x2f, 0x2a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x32, 0x1d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x20, 0x6f, 0x66, 0x20, 0x74, + 0x68, 0x65, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x40, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x3e, 0x0a, 0x05, + 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x72, 0x61, + 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x65, 0x6d, + 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x2a, 0xa5, 0x01, 0x0a, + 0x12, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x6c, 0x61, 0x6e, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, + 0x74, 0x50, 0x6c, 0x61, 0x6e, 0x4e, 0x6f, 0x74, 0x53, 0x65, 0x74, 0x10, 0x00, 0x12, 0x1a, 0x0a, + 0x16, 0x50, 0x61, 0x72, 0x61, 0x6c, 0x6c, 0x65, 0x6c, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, + 0x65, 0x6e, 0x74, 0x50, 0x6c, 0x61, 0x6e, 0x10, 0x01, 0x12, 0x18, 0x0a, 0x14, 0x43, 0x61, 0x6e, + 0x61, 0x72, 0x79, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x6c, 0x61, + 0x6e, 0x10, 0x02, 0x12, 0x1b, 0x0a, 0x17, 0x42, 0x6c, 0x75, 0x65, 0x47, 0x72, 0x65, 0x65, 0x6e, + 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x6c, 0x61, 0x6e, 0x10, 0x03, + 0x12, 0x1c, 0x0a, 0x18, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x44, 0x65, + 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x6c, 0x61, 0x6e, 0x10, 0x04, 0x1a, 0x04, + 0x88, 0xa3, 0x1e, 0x00, 0x2a, 0x69, 0x0a, 0x14, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, + 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x1a, + 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, + 0x54, 0x79, 0x70, 0x65, 0x4e, 0x6f, 0x74, 0x53, 0x65, 0x74, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, + 0x52, 0x61, 0x66, 0x61, 0x79, 0x57, 0x69, 0x7a, 0x61, 0x72, 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x6c, + 0x6f, 0x61, 0x64, 0x4a, 0x53, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x5a, 0x69, 0x70, + 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x10, 0x02, 0x1a, 0x04, 0x88, 0xa3, 0x1e, 0x00, 0x2a, + 0x94, 0x02, 0x0a, 0x1d, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x6e, 0x61, 0x70, + 0x73, 0x68, 0x6f, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x1c, 0x0a, 0x18, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x6e, 0x61, + 0x70, 0x73, 0x68, 0x6f, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x10, 0x00, 0x12, + 0x1c, 0x0a, 0x18, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x6e, 0x61, 0x70, 0x73, + 0x68, 0x6f, 0x74, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x10, 0x01, 0x12, 0x1e, 0x0a, + 0x1a, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, + 0x74, 0x55, 0x6e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x10, 0x02, 0x12, 0x23, 0x0a, + 0x1f, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, + 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x64, + 0x10, 0x03, 0x12, 0x20, 0x0a, 0x1c, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x6e, + 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x61, + 0x64, 0x79, 0x10, 0x04, 0x12, 0x22, 0x0a, 0x1e, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, + 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x44, + 0x72, 0x69, 0x66, 0x74, 0x65, 0x64, 0x10, 0x05, 0x12, 0x26, 0x0a, 0x22, 0x57, 0x6f, 0x72, 0x6b, + 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x10, 0x06, + 0x1a, 0x04, 0x88, 0xa3, 0x1e, 0x00, 0x42, 0xf1, 0x01, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x72, + 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x0d, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x48, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x52, 0x61, 0x66, 0x61, 0x79, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x2f, + 0x72, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x70, + 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0xa2, 0x02, 0x04, 0x52, 0x44, 0x54, 0x43, 0xaa, 0x02, 0x16, 0x52, 0x61, 0x66, 0x61, 0x79, 0x2e, + 0x44, 0x65, 0x76, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0xca, 0x02, 0x16, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x54, 0x79, 0x70, + 0x65, 0x73, 0x5c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0xe2, 0x02, 0x22, 0x52, 0x61, 0x66, 0x61, + 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x5c, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, + 0x19, 0x52, 0x61, 0x66, 0x61, 0x79, 0x3a, 0x3a, 0x44, 0x65, 0x76, 0x3a, 0x3a, 0x54, 0x79, 0x70, + 0x65, 0x73, 0x3a, 0x3a, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +} + +var ( + file_proto_types_config_workload_proto_rawDescOnce sync.Once + file_proto_types_config_workload_proto_rawDescData = file_proto_types_config_workload_proto_rawDesc +) + +func file_proto_types_config_workload_proto_rawDescGZIP() []byte { + file_proto_types_config_workload_proto_rawDescOnce.Do(func() { + file_proto_types_config_workload_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_types_config_workload_proto_rawDescData) + }) + return file_proto_types_config_workload_proto_rawDescData +} + +var file_proto_types_config_workload_proto_enumTypes = make([]protoimpl.EnumInfo, 3) +var file_proto_types_config_workload_proto_msgTypes = make([]protoimpl.MessageInfo, 20) +var file_proto_types_config_workload_proto_goTypes = []interface{}{ + (DeploymentPlanType)(0), // 0: rafay.dev.types.config.DeploymentPlanType + (WorkloadSnapshotType)(0), // 1: rafay.dev.types.config.WorkloadSnapshotType + (WorkloadSnapshotConditionType)(0), // 2: rafay.dev.types.config.WorkloadSnapshotConditionType + (*ParallelPlanSpec)(nil), // 3: rafay.dev.types.config.ParallelPlanSpec + (*Dependency)(nil), // 4: rafay.dev.types.config.Dependency + (*DependencyPlanSpec)(nil), // 5: rafay.dev.types.config.DependencyPlanSpec + (*CanaryPlanSpec)(nil), // 6: rafay.dev.types.config.CanaryPlanSpec + (*BlueGreenPlanSpec)(nil), // 7: rafay.dev.types.config.BlueGreenPlanSpec + (*DeploymentPlanSpec)(nil), // 8: rafay.dev.types.config.DeploymentPlanSpec + (*Workload)(nil), // 9: rafay.dev.types.config.Workload + (*WorkloadSpec)(nil), // 10: rafay.dev.types.config.WorkloadSpec + (*ProjectWorkload)(nil), // 11: rafay.dev.types.config.ProjectWorkload + (*WorkloadStatus)(nil), // 12: rafay.dev.types.config.WorkloadStatus + (*WorkloadList)(nil), // 13: rafay.dev.types.config.WorkloadList + (*WorkloadSnapshotCondition)(nil), // 14: rafay.dev.types.config.WorkloadSnapshotCondition + (*WorkloadSnapshotAuthMeta)(nil), // 15: rafay.dev.types.config.WorkloadSnapshotAuthMeta + (*WorkloadSnapshotSpec)(nil), // 16: rafay.dev.types.config.WorkloadSnapshotSpec + (*WorkloadSnapshotStatus)(nil), // 17: rafay.dev.types.config.WorkloadSnapshotStatus + (*WorkloadSnapshot)(nil), // 18: rafay.dev.types.config.WorkloadSnapshot + (*WorkloadSnapshotList)(nil), // 19: rafay.dev.types.config.WorkloadSnapshotList + (*WorkloadTemplateSpec)(nil), // 20: rafay.dev.types.config.WorkloadTemplateSpec + (*WorkloadTemplate)(nil), // 21: rafay.dev.types.config.WorkloadTemplate + (*WorkloadTemplateList)(nil), // 22: rafay.dev.types.config.WorkloadTemplateList + (*v3.Metadata)(nil), // 23: rafay.dev.types.common.v3.Metadata + (*PlacementSpec)(nil), // 24: rafay.dev.types.config.PlacementSpec + (ArtifactType)(0), // 25: rafay.dev.types.config.ArtifactType + (*File)(nil), // 26: rafay.dev.types.config.File + (*ArtifactExtra)(nil), // 27: rafay.dev.types.config.ArtifactExtra + (ShareMode)(0), // 28: rafay.dev.types.config.ShareMode + (*RepoArtifactMeta)(nil), // 29: rafay.dev.types.config.RepoArtifactMeta + (*v3.ListMetadata)(nil), // 30: rafay.dev.types.common.v3.ListMetadata + (*v3.Status)(nil), // 31: rafay.dev.types.common.v3.Status + (*timestamppb.Timestamp)(nil), // 32: google.protobuf.Timestamp + (*FileMeta)(nil), // 33: rafay.dev.types.config.FileMeta + (*ClusterMeta)(nil), // 34: rafay.dev.types.config.ClusterMeta +} +var file_proto_types_config_workload_proto_depIdxs = []int32{ + 4, // 0: rafay.dev.types.config.DependencyPlanSpec.dependencies:type_name -> rafay.dev.types.config.Dependency + 0, // 1: rafay.dev.types.config.DeploymentPlanSpec.planType:type_name -> rafay.dev.types.config.DeploymentPlanType + 3, // 2: rafay.dev.types.config.DeploymentPlanSpec.parallelSpec:type_name -> rafay.dev.types.config.ParallelPlanSpec + 6, // 3: rafay.dev.types.config.DeploymentPlanSpec.canarySpec:type_name -> rafay.dev.types.config.CanaryPlanSpec + 7, // 4: rafay.dev.types.config.DeploymentPlanSpec.blueGreenSpec:type_name -> rafay.dev.types.config.BlueGreenPlanSpec + 5, // 5: rafay.dev.types.config.DeploymentPlanSpec.dependencySpec:type_name -> rafay.dev.types.config.DependencyPlanSpec + 23, // 6: rafay.dev.types.config.Workload.metadata:type_name -> rafay.dev.types.common.v3.Metadata + 10, // 7: rafay.dev.types.config.Workload.spec:type_name -> rafay.dev.types.config.WorkloadSpec + 12, // 8: rafay.dev.types.config.Workload.status:type_name -> rafay.dev.types.config.WorkloadStatus + 24, // 9: rafay.dev.types.config.WorkloadSpec.placement:type_name -> rafay.dev.types.config.PlacementSpec + 8, // 10: rafay.dev.types.config.WorkloadSpec.deploymentPlan:type_name -> rafay.dev.types.config.DeploymentPlanSpec + 25, // 11: rafay.dev.types.config.WorkloadSpec.artifactType:type_name -> rafay.dev.types.config.ArtifactType + 26, // 12: rafay.dev.types.config.WorkloadSpec.artifactFiles:type_name -> rafay.dev.types.config.File + 27, // 13: rafay.dev.types.config.WorkloadSpec.extra:type_name -> rafay.dev.types.config.ArtifactExtra + 28, // 14: rafay.dev.types.config.WorkloadSpec.shareMode:type_name -> rafay.dev.types.config.ShareMode + 29, // 15: rafay.dev.types.config.WorkloadSpec.additionalReference:type_name -> rafay.dev.types.config.RepoArtifactMeta + 11, // 16: rafay.dev.types.config.WorkloadStatus.projects:type_name -> rafay.dev.types.config.ProjectWorkload + 30, // 17: rafay.dev.types.config.WorkloadList.metadata:type_name -> rafay.dev.types.common.v3.ListMetadata + 9, // 18: rafay.dev.types.config.WorkloadList.items:type_name -> rafay.dev.types.config.Workload + 2, // 19: rafay.dev.types.config.WorkloadSnapshotCondition.type:type_name -> rafay.dev.types.config.WorkloadSnapshotConditionType + 31, // 20: rafay.dev.types.config.WorkloadSnapshotCondition.status:type_name -> rafay.dev.types.common.v3.Status + 32, // 21: rafay.dev.types.config.WorkloadSnapshotCondition.lastUpdated:type_name -> google.protobuf.Timestamp + 24, // 22: rafay.dev.types.config.WorkloadSnapshotSpec.placement:type_name -> rafay.dev.types.config.PlacementSpec + 8, // 23: rafay.dev.types.config.WorkloadSnapshotSpec.deploymentPlan:type_name -> rafay.dev.types.config.DeploymentPlanSpec + 25, // 24: rafay.dev.types.config.WorkloadSnapshotSpec.artifactType:type_name -> rafay.dev.types.config.ArtifactType + 1, // 25: rafay.dev.types.config.WorkloadSnapshotSpec.snapshotType:type_name -> rafay.dev.types.config.WorkloadSnapshotType + 33, // 26: rafay.dev.types.config.WorkloadSnapshotSpec.snapshotFiles:type_name -> rafay.dev.types.config.FileMeta + 27, // 27: rafay.dev.types.config.WorkloadSnapshotSpec.extra:type_name -> rafay.dev.types.config.ArtifactExtra + 15, // 28: rafay.dev.types.config.WorkloadSnapshotSpec.authMeta:type_name -> rafay.dev.types.config.WorkloadSnapshotAuthMeta + 29, // 29: rafay.dev.types.config.WorkloadSnapshotSpec.additionalReference:type_name -> rafay.dev.types.config.RepoArtifactMeta + 14, // 30: rafay.dev.types.config.WorkloadSnapshotStatus.conditions:type_name -> rafay.dev.types.config.WorkloadSnapshotCondition + 34, // 31: rafay.dev.types.config.WorkloadSnapshotStatus.assignedClusters:type_name -> rafay.dev.types.config.ClusterMeta + 34, // 32: rafay.dev.types.config.WorkloadSnapshotStatus.deployedClusters:type_name -> rafay.dev.types.config.ClusterMeta + 34, // 33: rafay.dev.types.config.WorkloadSnapshotStatus.failedClusters:type_name -> rafay.dev.types.config.ClusterMeta + 34, // 34: rafay.dev.types.config.WorkloadSnapshotStatus.readyClusters:type_name -> rafay.dev.types.config.ClusterMeta + 34, // 35: rafay.dev.types.config.WorkloadSnapshotStatus.driftedClusters:type_name -> rafay.dev.types.config.ClusterMeta + 23, // 36: rafay.dev.types.config.WorkloadSnapshot.metadata:type_name -> rafay.dev.types.common.v3.Metadata + 16, // 37: rafay.dev.types.config.WorkloadSnapshot.spec:type_name -> rafay.dev.types.config.WorkloadSnapshotSpec + 17, // 38: rafay.dev.types.config.WorkloadSnapshot.status:type_name -> rafay.dev.types.config.WorkloadSnapshotStatus + 30, // 39: rafay.dev.types.config.WorkloadSnapshotList.metadata:type_name -> rafay.dev.types.common.v3.ListMetadata + 18, // 40: rafay.dev.types.config.WorkloadSnapshotList.items:type_name -> rafay.dev.types.config.WorkloadSnapshot + 25, // 41: rafay.dev.types.config.WorkloadTemplateSpec.artifactType:type_name -> rafay.dev.types.config.ArtifactType + 26, // 42: rafay.dev.types.config.WorkloadTemplateSpec.artifactFiles:type_name -> rafay.dev.types.config.File + 27, // 43: rafay.dev.types.config.WorkloadTemplateSpec.extra:type_name -> rafay.dev.types.config.ArtifactExtra + 23, // 44: rafay.dev.types.config.WorkloadTemplate.metadata:type_name -> rafay.dev.types.common.v3.Metadata + 20, // 45: rafay.dev.types.config.WorkloadTemplate.spec:type_name -> rafay.dev.types.config.WorkloadTemplateSpec + 30, // 46: rafay.dev.types.config.WorkloadTemplateList.metadata:type_name -> rafay.dev.types.common.v3.ListMetadata + 21, // 47: rafay.dev.types.config.WorkloadTemplateList.items:type_name -> rafay.dev.types.config.WorkloadTemplate + 48, // [48:48] is the sub-list for method output_type + 48, // [48:48] is the sub-list for method input_type + 48, // [48:48] is the sub-list for extension type_name + 48, // [48:48] is the sub-list for extension extendee + 0, // [0:48] is the sub-list for field type_name +} + +func init() { file_proto_types_config_workload_proto_init() } +func file_proto_types_config_workload_proto_init() { + if File_proto_types_config_workload_proto != nil { + return + } + file_proto_types_config_config_proto_init() + file_proto_types_config_placement_proto_init() + if !protoimpl.UnsafeEnabled { + file_proto_types_config_workload_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ParallelPlanSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_config_workload_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Dependency); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_config_workload_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DependencyPlanSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_config_workload_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CanaryPlanSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_config_workload_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BlueGreenPlanSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_config_workload_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeploymentPlanSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_config_workload_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Workload); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_config_workload_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WorkloadSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_config_workload_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ProjectWorkload); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_config_workload_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WorkloadStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_config_workload_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WorkloadList); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_config_workload_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WorkloadSnapshotCondition); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_config_workload_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WorkloadSnapshotAuthMeta); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_config_workload_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WorkloadSnapshotSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_config_workload_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WorkloadSnapshotStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_config_workload_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WorkloadSnapshot); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_config_workload_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WorkloadSnapshotList); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_config_workload_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WorkloadTemplateSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_config_workload_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WorkloadTemplate); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_config_workload_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WorkloadTemplateList); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_proto_types_config_workload_proto_rawDesc, + NumEnums: 3, + NumMessages: 20, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_proto_types_config_workload_proto_goTypes, + DependencyIndexes: file_proto_types_config_workload_proto_depIdxs, + EnumInfos: file_proto_types_config_workload_proto_enumTypes, + MessageInfos: file_proto_types_config_workload_proto_msgTypes, + }.Build() + File_proto_types_config_workload_proto = out.File + file_proto_types_config_workload_proto_rawDesc = nil + file_proto_types_config_workload_proto_goTypes = nil + file_proto_types_config_workload_proto_depIdxs = nil +} diff --git a/components/common/proto/types/config/workload.proto b/components/common/proto/types/config/workload.proto new file mode 100644 index 0000000..2136d17 --- /dev/null +++ b/components/common/proto/types/config/workload.proto @@ -0,0 +1,409 @@ +syntax = "proto3"; +package rafay.dev.types.config; + +import "google/protobuf/timestamp.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; +import "gogoproto/gogo.proto"; +import "proto/types/config/config.proto"; +import "proto/types/commonpb/v3/common.proto"; +import "proto/types/config/placement.proto"; + +enum DeploymentPlanType { + // disable enum prefix + option (gogoproto.goproto_enum_prefix) = false; + + DeploymentPlanNotSet = 0; + ParallelDeploymentPlan = 1; + CanaryDeploymentPlan = 2; + BlueGreenDeploymentPlan = 3; + DependencyDeploymentPlan = 4; +} + +message ParallelPlanSpec { sint32 maxParallel = 1; } + +message Dependency { + string dependent = 1; + repeated string dependencies = 2; +} + +message DependencyPlanSpec { + sint32 maxParallel = 1; + repeated Dependency dependencies = 4 + [ (gogoproto.nullable) = false, (gogoproto.jsontag) = ",inline" ]; +} + +message CanaryPlanSpec {} + +message BlueGreenPlanSpec {} + +message DeploymentPlanSpec { + DeploymentPlanType planType = 1 [ (gogoproto.jsontag) = "planType" ]; + ParallelPlanSpec parallelSpec = 2; + CanaryPlanSpec canarySpec = 3; + BlueGreenPlanSpec blueGreenSpec = 4; + DependencyPlanSpec dependencySpec = 5; +} + +message Workload { + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { + json_schema : { + title : "Workload" + description : "Workload" + required : [ "apiVersion", "kind", "metadata", "spec" ] + } + }; + string apiVersion = 1 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "API Version", + description : "API Version of the resource" + default : "config.k8smgmt.io/v3" + read_only : true + } ]; + string kind = 2 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Kind", + description : "Kind of the resource" + default : "Workload" + read_only : true + } ]; + rafay.dev.types.common.v3.Metadata metadata = 3 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Metadata", + description : "Metadata of the resource" + } ]; + WorkloadSpec spec = 4 + [ (gogoproto.nullable) = false, (gogoproto.embed) = true ]; + WorkloadStatus status = 5 + [ (gogoproto.nullable) = false, (gogoproto.embed) = true ]; +} + +message WorkloadSpec { + string namespace = 1 [ + (gogoproto.moretags) = "pg:\"namespace\"", + (gogoproto.jsontag) = "namespace" + ]; + rafay.dev.types.config.PlacementSpec placement = 2 [ + (gogoproto.moretags) = "pg:\"placement\"", + (gogoproto.nullable) = false + ]; + DeploymentPlanSpec deploymentPlan = 3 [ + (gogoproto.moretags) = "pg:\"deployment_plan\"", + (gogoproto.nullable) = false + ]; + rafay.dev.types.config.ArtifactType artifactType = 4 [ + (gogoproto.moretags) = "pg:\"artifact_type,use_zero\"", + (gogoproto.jsontag) = "artifactType" + ]; + repeated rafay.dev.types.config.File artifactFiles = 5 [ (gogoproto.moretags) = "pg:\"-\"" ]; + rafay.dev.types.config.ArtifactExtra extra = 6 + [ (gogoproto.moretags) = "pg:\"extra\"", (gogoproto.nullable) = false ]; + string repositoryRef = 7 [ (gogoproto.moretags) = "pg:\"repository_ref\"" ]; + string templateID = 8; + rafay.dev.types.config.ShareMode shareMode = 9 + [ (gogoproto.moretags) = "pg:\"share_mode,use_zero\"" ]; + string valueRepositoryRef = 10 [ (gogoproto.moretags) = "pg:\"value_repository_ref\"" ]; + rafay.dev.types.config.RepoArtifactMeta additionalReference = 11 [ (gogoproto.moretags) = "pg:\"additional_reference\"", (gogoproto.nullable) = true ]; +} + +message ProjectWorkload { + string workloadID = 1; + string projectID = 2 [ + (gogoproto.jsontag) = "project_id" + ]; +} + +message WorkloadStatus { + string workloadID = 1 [ + (gogoproto.moretags) = "pg:\"id\"" + ]; + bool publishPending = 2 + [ (gogoproto.moretags) = "pg:\"publish_pending,use_zero\"" ]; + sint64 lastPublishedRevision = 3 + [ (gogoproto.moretags) = "pg:\"last_published_revision,use_zero\"" ]; + repeated ProjectWorkload projects = 4 [ + (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + read_only : true + }, + (gogoproto.moretags) = "pg:\"-\"", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "projects,omitempty" + ]; +} + +// WorkloadList is a list of Workloads +message WorkloadList { + string apiVersion = 1 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "API Version", + description : "API Version of the list resource" + default : "config.k8smgmt.io/v3" + read_only : true + } ]; + string kind = 2 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Kind", + description : "Kind of the list resource" + default : "WorkloadList" + read_only : true + } ]; + rafay.dev.types.common.v3.ListMetadata metadata = 3 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "ListMetadata", + description : "Metadata of the list resource" + read_only : true + } ]; + repeated Workload items = 4; +} + +enum WorkloadSnapshotType { + // disable enum prefix + option (gogoproto.goproto_enum_prefix) = false; + + WorkloadSnapshotTypeNotSet = 0; + RafayWizardWorkloadJSON = 1; + ZipArchive = 2; +} + + // WorkloadSnapshotConditionType is the condition type of workload + // snapshot condition +enum WorkloadSnapshotConditionType { + // disable enum prefix + option (gogoproto.goproto_enum_prefix) = false; + + WorkloadSnapshotValidate = 0; + WorkloadSnapshotSchedule = 1; + WorkloadSnapshotUnschedule = 2; + WorkloadSnapshotClusterDeployed = 3; + WorkloadSnapshotClusterReady = 4; + WorkloadSnapshotClusterDrifted = 5; + WorkloadSnapshotUpdateRepoArtifact = 6; +} + + // WorkloadSnapshotCondition is the condition of workload snapshot +message WorkloadSnapshotCondition { + WorkloadSnapshotConditionType type = 1 [ (gogoproto.jsontag) = "type" ]; + rafay.dev.types.common.v3.Status status = 5 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Status", + description : "Status of the resource" + read_only : true + } ]; + google.protobuf.Timestamp lastUpdated = 3 + [ (gogoproto.stdtime) = true, (gogoproto.nullable) = false ]; + string reason = 4; +} + +message WorkloadSnapshotAuthMeta { + sint64 accountID = 1; + bool isSSOUser = 2; + string userName = 3; +} + +message WorkloadSnapshotSpec { + string namespace = 1 [ + (gogoproto.moretags) = "pg:\"namespace\"", + (gogoproto.jsontag) = "namespace" + ]; + rafay.dev.types.config.PlacementSpec placement = 2 [ + (gogoproto.moretags) = "pg:\"placement\"", + (gogoproto.nullable) = false + ]; + DeploymentPlanSpec deploymentPlan = 3 [ + (gogoproto.moretags) = "pg:\"deployment_plan\"", + (gogoproto.nullable) = false + ]; + rafay.dev.types.config.ArtifactType artifactType = 4 [ + (gogoproto.moretags) = "pg:\"artifact_type,use_zero\"", + (gogoproto.jsontag) = "artifactType" + ]; + WorkloadSnapshotType snapshotType = 5 + [ (gogoproto.moretags) = "pg:\"snapshot_type\"" ]; + bytes snapshot = 6 + [ (gogoproto.moretags) = "pg:\"snapshot\"", (gogoproto.jsontag) = "-" ]; + repeated rafay.dev.types.config.FileMeta snapshotFiles = 7 [ + (gogoproto.moretags) = "pg:\"snapshot_files\"", + (gogoproto.nullable) = false + ]; + rafay.dev.types.config.ArtifactExtra extra = 8 + [ (gogoproto.moretags) = "pg:\"extra\"", (gogoproto.nullable) = false ]; + WorkloadSnapshotAuthMeta authMeta = 9 [ + (gogoproto.moretags) = "pg:\"auth_meta\"", + (gogoproto.nullable) = false + ]; + string workloadName = 10 [ + (gogoproto.moretags) = "pg:\"workload_name\"", + (gogoproto.jsontag) = "workloadName" + ]; + string repositoryRef = 11 [ (gogoproto.moretags) = "pg:\"repository_ref\"" ]; + string valueRepositoryRef = 12 [ (gogoproto.moretags) = "pg:\"value_repository_ref\"" ]; + rafay.dev.types.config.RepoArtifactMeta additionalReference = 13 [ (gogoproto.moretags) = "pg:\"additional_reference\"", (gogoproto.nullable) = true ]; +} + +message WorkloadSnapshotStatus { + sint64 revision = 1 [ (gogoproto.moretags) = "pg:\"revision\"" ]; + string workloadID = 2 [ + (gogoproto.moretags) = "pg:\"workload_id\"" + ]; + repeated WorkloadSnapshotCondition conditions = 3 [ + (gogoproto.nullable) = false, + (gogoproto.moretags) = + "patchStrategy:\"merge\" patchMergeKey:\"type\" pg:\"conditions\"", + (gogoproto.jsontag) = "conditions,omitempty" + ]; + repeated ClusterMeta assignedClusters = 4 [ + (gogoproto.moretags) = + "patchStrategy:\"merge\" patchMergeKey:\"clusterID\" " + "pg:\"assigned_clusters,use_zero\"", + (gogoproto.nullable) = false + ]; + repeated ClusterMeta deployedClusters = 5 [ + (gogoproto.moretags) = + "patchStrategy:\"merge\" patchMergeKey:\"clusterID\" " + "pg:\"deployed_clusters,use_zero\"", + (gogoproto.nullable) = false + ]; + repeated ClusterMeta failedClusters = 6 [ + (gogoproto.moretags) = + "patchStrategy:\"merge\" patchMergeKey:\"clusterID\" " + "pg:\"failed_clusters,use_zero\"", + (gogoproto.nullable) = false + ]; + repeated ClusterMeta readyClusters = 7 [ + (gogoproto.moretags) = + "patchStrategy:\"merge\" patchMergeKey:\"clusterID\" " + "pg:\"ready_clusters,use_zero\"", + (gogoproto.nullable) = false + ]; + repeated ClusterMeta driftedClusters = 8 [ + (gogoproto.moretags) = + "patchStrategy:\"merge\" patchMergeKey:\"clusterID\" " + "pg:\"drifted_clusters,use_zero\"", + (gogoproto.nullable) = false + ]; + string repoSourceVersion = 9 + [ (gogoproto.moretags) = "patchStrategy:\"replace\" " + "pg:\"repo_source_version,use_zero\"" ]; +} + +message WorkloadSnapshot { + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { + json_schema : { + title : "WorkloadSnapshot" + description : "WorkloadSnapshot" + required : [ "apiVersion", "kind", "metadata", "spec" ] + } + }; + string apiVersion = 1 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "API Version", + description : "API Version of the resource" + default : "config.k8smgmt.io/v3" + read_only : true + } ]; + string kind = 2 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Kind", + description : "Kind of the resource" + default : "WorkloadSnapshot" + read_only : true + } ]; + rafay.dev.types.common.v3.Metadata metadata = 3 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Metadata", + description : "Metadata of the resource" + } ]; + WorkloadSnapshotSpec spec = 4 + [ (gogoproto.nullable) = false, (gogoproto.embed) = true ]; + WorkloadSnapshotStatus status = 5 + [ (gogoproto.nullable) = false, (gogoproto.embed) = true ]; +} + +message WorkloadSnapshotList { + string apiVersion = 1 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "API Version", + description : "API Version of the list resource" + default : "config.k8smgmt.io/v3" + read_only : true + } ]; + string kind = 2 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Kind", + description : "Kind of the list resource" + default : "WorkloadSnapshotList" + read_only : true + } ]; + rafay.dev.types.common.v3.ListMetadata metadata = 3 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "ListMetadata", + description : "Metadata of the list resource" + read_only : true + } ]; + repeated WorkloadSnapshot items = 4; +} + +message WorkloadTemplateSpec { + ArtifactType artifactType = 1 [ + (gogoproto.moretags) = "pg:\"artifact_type,use_zero\"", + (gogoproto.jsontag) = "artifactType" + ]; + repeated File artifactFiles = 2 [ (gogoproto.moretags) = "pg:\"-\"" ]; + rafay.dev.types.config.ArtifactExtra extra = 3 + [ (gogoproto.moretags) = "pg:\"extra\"", (gogoproto.nullable) = false ]; + string repositoryRef = 4 [ (gogoproto.moretags) = "pg:\"repository_ref\"" ]; +} + +message WorkloadTemplate { + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { + json_schema : { + title : "WorkloadTemplate" + description : "WorkloadTemplate" + required : [ "apiVersion", "kind", "metadata", "spec" ] + } + }; + string apiVersion = 1 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "API Version", + description : "API Version of the resource" + default : "config.k8smgmt.io/v3" + read_only : true + } ]; + string kind = 2 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Kind", + description : "Kind of the resource" + default : "WorkloadTemplate" + read_only : true + } ]; + rafay.dev.types.common.v3.Metadata metadata = 3 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Metadata", + description : "Metadata of the resource" + } ]; + WorkloadTemplateSpec spec = 4 + [ (gogoproto.nullable) = false, (gogoproto.embed) = true ]; +} + +message WorkloadTemplateList { + string apiVersion = 1 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "API Version", + description : "API Version of the list resource" + default : "config.k8smgmt.io/v3" + read_only : true + } ]; +string kind = 2 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Kind", + description : "Kind of the list resource" + default : "WorkloadSnapshotList" + read_only : true + } ]; +rafay.dev.types.common.v3.ListMetadata metadata = 3 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "ListMetadata", + description : "Metadata of the list resource" + read_only : true + } ]; + repeated WorkloadTemplate items = 4; +} \ No newline at end of file diff --git a/components/common/proto/types/controller/accessor.go b/components/common/proto/types/controller/accessor.go new file mode 100644 index 0000000..57e15b3 --- /dev/null +++ b/components/common/proto/types/controller/accessor.go @@ -0,0 +1,475 @@ +package controller + +import ( + "errors" + "fmt" + "strings" + + "github.com/valyala/fastjson" + "k8s.io/apimachinery/pkg/runtime/schema" + ctrl "sigs.k8s.io/controller-runtime" +) + +var ( + accessorLog = ctrl.Log.WithName("accessor") +) + +const ( + apiVersion = "apiVersion" + kind = "kind" + metadata = "metadata" + name = "name" + namespace = "namespace" + labels = "labels" + annotations = "annotations" + creationTimestamp = "creationTimestamp" + generateName = "generateName" + ownerReferences = "ownerReferences" + resourceVersion = "resourceVersion" + selfLink = "selfLink" + uid = "uid" + status = "status" + emptyObject = "{}" + emptyArray = "[]" +) + +var ( + // ErrNoMetadata is returned when metadata field is not present in the object + ErrNoMetadata = errors.New("metadata filed not present") +) + +// +kubebuilder:object:generate=false + +// Accessor is the interface for accessing k8s fields from step object +type Accessor interface { + // Kind returns the kind of the step object + Kind() (string, error) + // SetKind sets kind for step object + SetKind(string) error + // APIVersion returns api version for the step object + APIVersion() (string, error) + // SetAPIVersion sets api version for step object + SetAPIVersion(string) error + + // GroupVersionKind returns group version kind of the step object + GroupVersionKind() (schema.GroupVersionKind, error) + + // Namespace returns namespace of the step object + Namespace() (string, error) + // SetNamespace sets namespace for step object + SetNamespace(string) error + // Name returns name of the step object + Name() (string, error) + // SetName sets name for the step object + SetName(string) error + // Labels returns labels of the step object + Labels() (map[string]string, error) + // SetLabels sets labels for the step object + SetLabels(map[string]string) error + // Annotations returns annotations of the step object + Annotations() (map[string]string, error) + // SetAnnotations sets annotations for the step object + SetAnnotations(map[string]string) error + // SetRaw sets json serialized bytes value at keys + SetRaw(value []byte, keys ...string) error + // GetRaw gets json serialized bytes value at keys + GetRaw(keys ...string) ([]byte, error) + // ResetAutoFields resets fields auto populated by the server in the step object + ResetAutoFields() error + // Bytes returns the mutated step object + Bytes() []byte +} + +// +kubebuilder:object:generate=false + +type accessor struct { + *fastjson.Value +} + +// +kubebuilder:object:generate=false + +func newAccessor(b []byte) (Accessor, error) { + v, err := fastjson.ParseBytes(b) + if err != nil { + return nil, err + } + return &accessor{v}, nil +} + +var _ Accessor = (*accessor)(nil) + +func ensureKeys(obj *fastjson.Object, keys ...string) error { + var err error + if len(keys) == 0 { + return nil + } + + if obj.Get(keys[0]) == nil || obj.Get(keys[0]).Type() == fastjson.TypeNull { + obj.Set(keys[0], fastjson.MustParse(emptyObject)) + } + + obj, err = obj.Get(keys[0]).Object() + if err != nil { + return err + } + + return ensureKeys(obj, keys[1:]...) +} + +func ensureKeysWithDefaultValue(obj *fastjson.Object, value *fastjson.Value, keys ...string) error { + var err error + if obj.Get(keys[0]) == nil || obj.Get(keys[0]).Type() == fastjson.TypeNull { + //If this is the last leg of the keys, set the default value (which would be either Array or Object + if len(keys) == 1 { + obj.Set(keys[0], value) + } else { + //For any node above the leaf node, we must create an empty object only. + //Currently we don't support setting raw on a path which has an array in the middle of the path + obj.Set(keys[0], fastjson.MustParse(emptyObject)) + } + } + if len(keys) == 1 { + return nil + } + obj, err = obj.Get(keys[0]).Object() + if err != nil { + return err + } + return ensureKeysWithDefaultValue(obj, value, keys[1:]...) +} + +func (a *accessor) ensureKeys(keys ...string) error { + return a.ensureKeysWithDefaultValue(fastjson.MustParse(emptyObject), keys...) +} + +func (a *accessor) ensureKeysWithDefaultValue(value *fastjson.Value, keys ...string) error { + o, err := a.Object() + if err != nil { + return err + } + err = ensureKeysWithDefaultValue(o, value, keys...) + return err +} + +func (a *accessor) Kind() (string, error) { + if ok := a.Exists(kind); ok { + v, err := a.Get(kind).StringBytes() + if err != nil { + return "", err + } + return string(v), nil + } + return "", fmt.Errorf("%s not found", kind) +} + +func (a *accessor) SetKind(k string) error { + sb := new(strings.Builder) + sb.WriteString(`"`) + sb.WriteString(k) + sb.WriteString(`"`) + v, err := fastjson.Parse(sb.String()) + if err != nil { + return err + } + + a.Set(kind, v) + return nil +} + +func (a *accessor) APIVersion() (string, error) { + if ok := a.Exists(apiVersion); ok { + v, err := a.Get(apiVersion).StringBytes() + if err != nil { + return "", err + } + return string(v), nil + } + return "", fmt.Errorf("%s not found", apiVersion) +} + +func (a *accessor) SetAPIVersion(k string) error { + sb := new(strings.Builder) + sb.WriteString(`"`) + sb.WriteString(k) + sb.WriteString(`"`) + v, err := fastjson.Parse(sb.String()) + if err != nil { + return err + } + + a.Set(apiVersion, v) + return nil +} + +func (a *accessor) GroupVersionKind() (gvk schema.GroupVersionKind, err error) { + var kind, apiVersion string + var gv schema.GroupVersion + kind, err = a.Kind() + if err != nil { + return + } + apiVersion, err = a.APIVersion() + if err != nil { + return + } + + gv, err = schema.ParseGroupVersion(apiVersion) + if err != nil { + return + } + + gvk.Kind = kind + gvk.Group = gv.Group + gvk.Version = gv.Version + + return +} + +func (a *accessor) Namespace() (string, error) { + if ok := a.Exists(metadata, namespace); ok { + v, err := a.Get(metadata, namespace).StringBytes() + if err != nil { + return "", err + } + return string(v), nil + } + return "", nil +} + +func (a *accessor) SetNamespace(k string) error { + err := a.ensureKeys(metadata) + if err != nil { + return err + } + sb := new(strings.Builder) + sb.WriteString(`"`) + sb.WriteString(k) + sb.WriteString(`"`) + v, err := fastjson.Parse(sb.String()) + if err != nil { + return err + } + + o, err := a.Get(metadata).Object() + if err != nil { + return err + } + + o.Set(namespace, v) + return nil +} + +func (a *accessor) Name() (string, error) { + if ok := a.Exists(metadata, name); ok { + v, err := a.Get(metadata, name).StringBytes() + if err != nil { + return "", err + } + return string(v), nil + } + return "", nil +} + +func (a *accessor) SetName(k string) error { + err := a.ensureKeys(metadata) + if err != nil { + return err + } + sb := new(strings.Builder) + sb.WriteString(`"`) + sb.WriteString(k) + sb.WriteString(`"`) + v, err := fastjson.Parse(sb.String()) + if err != nil { + return err + } + + o, err := a.Get(metadata).Object() + if err != nil { + return err + } + + o.Set(name, v) + return nil +} + +func (a *accessor) Labels() (map[string]string, error) { + if ok := a.Exists(metadata, labels); ok { + + if a.Get(metadata, labels).Type() == fastjson.TypeNull { + return map[string]string{}, nil + } + + o, err := a.Get(metadata, labels).Object() + if err != nil { + return nil, err + } + + lbls := make(map[string]string) + + o.Visit(func(k []byte, v *fastjson.Value) { + vb, err := v.StringBytes() + if err != nil { + return + } + + lbls[string(k)] = string(vb) + }) + return lbls, nil + } + return map[string]string{}, nil +} + +func (a *accessor) SetLabels(lbls map[string]string) error { + err := a.ensureKeys(metadata, labels) + if err != nil { + return err + } + + elbls, err := a.Get(metadata, labels).Object() + if err != nil { + return err + } + + for k, v := range lbls { + sb := new(strings.Builder) + sb.WriteString(`"`) + sb.WriteString(v) + sb.WriteString(`"`) + jv, err := fastjson.Parse(sb.String()) + if err != nil { + return err + } + elbls.Set(k, jv) + } + + return nil +} + +func (a *accessor) Annotations() (map[string]string, error) { + if ok := a.Exists(metadata, annotations); ok { + if a.Get(metadata, annotations).Type() == fastjson.TypeNull { + return map[string]string{}, nil + } + + o, err := a.Get(metadata, annotations).Object() + if err != nil { + return nil, err + } + + ants := make(map[string]string) + + o.Visit(func(k []byte, v *fastjson.Value) { + vb, err := v.StringBytes() + if err != nil { + return + } + ants[string(k)] = string(vb) + }) + return ants, nil + } + return map[string]string{}, nil +} + +func (a *accessor) SetAnnotations(ants map[string]string) error { + err := a.ensureKeys(metadata, annotations) + if err != nil { + return err + } + + eants, err := a.Get(metadata, annotations).Object() + if err != nil { + return err + } + + for k, v := range ants { + + sb := new(strings.Builder) + sb.WriteString(`"`) + sb.WriteString(v) + sb.WriteString(`"`) + jv, err := fastjson.Parse(sb.String()) + if err != nil { + return err + } + eants.Set(k, jv) + } + + return nil +} + +func (a *accessor) ResetAutoFields() error { + if a.Get(metadata) == nil { + return ErrNoMetadata + } + o, err := a.Get(metadata).Object() + if err != nil { + return err + } + o.Del(creationTimestamp) + o.Del(generateName) + o.Del(ownerReferences) + o.Del(resourceVersion) + o.Del(selfLink) + o.Del(uid) + + a.Del(status) + + return nil +} + +func (a *accessor) SetRaw(value []byte, keys ...string) error { + v, err := fastjson.ParseBytes(value) + if err != nil { + return err + } + var defaultValue *fastjson.Value + + switch v.Type() { + case fastjson.TypeArray: + defaultValue = fastjson.MustParse(emptyArray) + default: + defaultValue = fastjson.MustParse(emptyObject) + } + + err = a.ensureKeysWithDefaultValue(defaultValue, keys...) + if err != nil { + return err + } + + o, err := a.Get(keys[:len(keys)-1]...).Object() + if err != nil { + return err + } + + // if the value of the last key is an object + if eo, err := o.Get(keys[len(keys)-1]).Object(); err == nil { + // and the value to be set is also an object + if vo, err := v.Object(); err == nil { + // merge the value k v + vo.Visit(func(k []byte, v *fastjson.Value) { + eo.Set(string(k), v) + }) + } else { + // otherwise set the value + eo.Set(keys[len(keys)-1], v) + } + } else { + // otherwise set the last key and value on parent + o.Set(keys[len(keys)-1], v) + } + + return nil +} + +func (a *accessor) GetRaw(keys ...string) ([]byte, error) { + v := a.Get(keys...) + if v != nil { + return v.MarshalTo(nil), nil + } + return nil, fmt.Errorf("not found %s", strings.Join(keys, ".")) +} + +func (a *accessor) Bytes() []byte { + return a.MarshalTo(nil) +} diff --git a/components/common/proto/types/controller/accessor_test.go b/components/common/proto/types/controller/accessor_test.go new file mode 100644 index 0000000..b7b38ee --- /dev/null +++ b/components/common/proto/types/controller/accessor_test.go @@ -0,0 +1,231 @@ +package controller + +import ( + "io/ioutil" + "os" + "reflect" + "testing" + + "encoding/json" + + "github.com/valyala/fastjson" + "sigs.k8s.io/yaml" +) + +func loadStepObject(path string) (*StepObject, error) { + f, err := os.Open(path) + if err != nil { + return nil, err + } + yb, err := ioutil.ReadAll(f) + if err != nil { + return nil, err + } + + jb, err := yaml.YAMLToJSON(yb) + if err != nil { + return nil, err + } + + var so StepObject + err = json.Unmarshal(jb, &so) + if err != nil { + return nil, err + } + return &so, nil +} + +func TestEnsureKeys(t *testing.T) { + o1, _ := fastjson.MustParse("{}").Object() + err := ensureKeys(o1, "k1", "k2", "k3") + if err != nil { + t.Error(err) + return + } + t.Log(string(o1.MarshalTo(nil))) + + o2, _ := fastjson.MustParse(`{"k1":"k2"}`).Object() + err = ensureKeys(o2, "k1", "k2", "k3") + if err == nil { + t.Error("expected error") + return + } + t.Log(string(o2.MarshalTo(nil))) + o3, _ := fastjson.MustParse(`{"k1":null}`).Object() + err = ensureKeys(o3, "k1", "k2", "k3") + if err != nil { + t.Error("expected error") + return + } + t.Log(string(o3.MarshalTo(nil))) +} + +func TestAccessorWithNull(t *testing.T) { + so, err := loadStepObject("testdata/secret.yaml") + if err != nil { + t.Error(err) + return + } + + a, err := so.Accessor() + if err != nil { + t.Error(err) + return + } + + l, err := a.Labels() + if err != nil { + t.Error(err) + return + } + t.Log(l) + an, err := a.Annotations() + if err != nil { + t.Error(err) + return + } + t.Log(an) +} + +func TestAccessorSetRaw(t *testing.T) { + so, err := loadStepObject("testdata/pod.yaml") + if err != nil { + t.Error(err) + return + } + + a, err := so.Accessor() + if err != nil { + t.Error(err) + return + } + + labels := make(map[string]string) + labels["testlbl1"] = "test" + labels["testlbl2"] = "test" + + lb, err := json.Marshal(labels) + if err != nil { + t.Error(err) + return + } + + err = a.SetRaw(lb, "metadata", "labels") + if err != nil { + t.Error(err) + return + } + + so.Raw = a.Bytes() + + t.Log(string(so.Raw)) + +} + +func TestAccessor(t *testing.T) { + so, err := loadStepObject("testdata/pod.yaml") + if err != nil { + t.Error(err) + return + } + + a, err := so.Accessor() + if err != nil { + t.Error(err) + return + } + + k, err := a.Kind() + if err != nil { + t.Error(err) + return + } + + if k != "Pod" { + t.Error("expected kind to be Pod got ", k) + return + } + + labels, err := a.Labels() + if err != nil { + t.Error(err) + return + } + + if !reflect.DeepEqual(labels, map[string]string{ + "k8s-app": "kube-dns", + "pod-template-hash": "b7464766c", + }) { + t.Error(`expected map[string]string{ + "k8s-app": "kube-dns", + "pod-template-hash": "b7464766c", + } got`, labels) + return + } + + err = a.SetKind("test-kind") + if err != nil { + t.Error(err) + return + } + + k, err = a.Kind() + if err != nil { + t.Error(err) + return + } + + if k != "test-kind" { + t.Error("expected kind to be test-kind") + return + } + + err = a.ResetAutoFields() + if err != nil { + t.Error(err) + return + } + + err = a.SetRaw([]byte(`{"nest1": "nest2"}`), "metadata", "annotations") + if err != nil { + t.Error(err) + return + } + + ants, err := a.Annotations() + if err != nil { + t.Error(err) + return + } + + if !reflect.DeepEqual(ants, map[string]string{"nest1": "nest2"}) { + t.Error(`expected map[string]string{"nest1": "nest2"} got `, ants) + return + } + + err = a.SetAnnotations(map[string]string{"test1": "test2"}) + if err != nil { + t.Error(err) + return + } + + ants, err = a.Annotations() + if err != nil { + t.Error(err) + return + } + + if !reflect.DeepEqual(ants, map[string]string{"test1": "test2", "nest1": "nest2"}) { + t.Error(`expected map[string]string{"test1": "test2"} got`, ants) + return + } + + err = a.SetAnnotations(map[string]string{"test4": `{\"apiVersion\":\"v1\"}`}) + if err != nil { + t.Error(err) + return + } + ann, _ := a.Annotations() + t.Log(ann) + +} diff --git a/components/common/proto/types/controller/cluster_controller.pb.go b/components/common/proto/types/controller/cluster_controller.pb.go new file mode 100644 index 0000000..2be7fe7 --- /dev/null +++ b/components/common/proto/types/controller/cluster_controller.pb.go @@ -0,0 +1,2238 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc (unknown) +// source: proto/types/controller/cluster_controller.proto + +package controller + +import ( + _ "github.com/gogo/protobuf/gogoproto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + v1beta1 "k8s.io/api/batch/v1beta1" + v11 "k8s.io/api/core/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + _ "k8s.io/apimachinery/pkg/runtime" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// +kubebuilder:object:generate=true +// StepObject can represent any kubernetes object +type StepObject struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + v1.TypeMeta `protobuf:"bytes,1,opt,name=typeMeta,proto3,embedded=typeMeta" json:"typeMeta,omitempty"` + v1.ObjectMeta `protobuf:"bytes,2,opt,name=objectMeta,proto3,embedded=objectMeta" json:"objectMeta,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + Raw []byte `protobuf:"bytes,4,opt,name=raw,proto3" json:"raw,omitempty"` +} + +func (x *StepObject) Reset() { + *x = StepObject{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_controller_cluster_controller_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StepObject) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StepObject) ProtoMessage() {} + +func (x *StepObject) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_controller_cluster_controller_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StepObject.ProtoReflect.Descriptor instead. +func (*StepObject) Descriptor() ([]byte, []int) { + return file_proto_types_controller_cluster_controller_proto_rawDescGZIP(), []int{0} +} + +func (x *StepObject) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *StepObject) GetRaw() []byte { + if x != nil { + return x.Raw + } + return nil +} + +// +kubebuilder:object:generate=true +// StepTemplate is the description of a step +type StepTemplate struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + OnFailed string `protobuf:"bytes,2,opt,name=onFailed,proto3" json:"onFailed,omitempty"` + Object *StepObject `protobuf:"bytes,3,opt,name=object,proto3" json:"object,omitempty"` + JobTemplate *v1beta1.JobTemplateSpec `protobuf:"bytes,4,opt,name=jobTemplate,proto3" json:"jobTemplate,omitempty"` +} + +func (x *StepTemplate) Reset() { + *x = StepTemplate{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_controller_cluster_controller_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StepTemplate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StepTemplate) ProtoMessage() {} + +func (x *StepTemplate) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_controller_cluster_controller_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StepTemplate.ProtoReflect.Descriptor instead. +func (*StepTemplate) Descriptor() ([]byte, []int) { + return file_proto_types_controller_cluster_controller_proto_rawDescGZIP(), []int{1} +} + +func (x *StepTemplate) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *StepTemplate) GetOnFailed() string { + if x != nil { + return x.OnFailed + } + return "" +} + +func (x *StepTemplate) GetObject() *StepObject { + if x != nil { + return x.Object + } + return nil +} + +func (x *StepTemplate) GetJobTemplate() *v1beta1.JobTemplateSpec { + if x != nil { + return x.JobTemplate + } + return nil +} + +// +kubebuilder:object:generate=true +// StepStatus is the status of the step +type StepStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + ObjectRef *v11.ObjectReference `protobuf:"bytes,2,opt,name=objectRef,proto3" json:"objectRef,omitempty"` + ObjectState string `protobuf:"bytes,3,opt,name=objectState,proto3" json:"objectState,omitempty"` + ObjectReason string `protobuf:"bytes,4,opt,name=objectReason,proto3" json:"objectReason,omitempty"` + JobState string `protobuf:"bytes,5,opt,name=jobState,proto3" json:"jobState,omitempty"` + JobReason string `protobuf:"bytes,6,opt,name=jobReason,proto3" json:"jobReason,omitempty"` + JobRef *v11.ObjectReference `protobuf:"bytes,7,opt,name=jobRef,proto3" json:"jobRef,omitempty"` + State string `protobuf:"bytes,8,opt,name=state,proto3" json:"state,omitempty"` + Reason string `protobuf:"bytes,9,opt,name=reason,proto3" json:"reason,omitempty"` + ObjectSpecHash string `protobuf:"bytes,10,opt,name=objectSpecHash,proto3" json:"objectSpecHash,omitempty"` + JobSpecHash string `protobuf:"bytes,11,opt,name=jobSpecHash,proto3" json:"jobSpecHash,omitempty"` +} + +func (x *StepStatus) Reset() { + *x = StepStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_controller_cluster_controller_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StepStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StepStatus) ProtoMessage() {} + +func (x *StepStatus) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_controller_cluster_controller_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StepStatus.ProtoReflect.Descriptor instead. +func (*StepStatus) Descriptor() ([]byte, []int) { + return file_proto_types_controller_cluster_controller_proto_rawDescGZIP(), []int{2} +} + +func (x *StepStatus) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *StepStatus) GetObjectRef() *v11.ObjectReference { + if x != nil { + return x.ObjectRef + } + return nil +} + +func (x *StepStatus) GetObjectState() string { + if x != nil { + return x.ObjectState + } + return "" +} + +func (x *StepStatus) GetObjectReason() string { + if x != nil { + return x.ObjectReason + } + return "" +} + +func (x *StepStatus) GetJobState() string { + if x != nil { + return x.JobState + } + return "" +} + +func (x *StepStatus) GetJobReason() string { + if x != nil { + return x.JobReason + } + return "" +} + +func (x *StepStatus) GetJobRef() *v11.ObjectReference { + if x != nil { + return x.JobRef + } + return nil +} + +func (x *StepStatus) GetState() string { + if x != nil { + return x.State + } + return "" +} + +func (x *StepStatus) GetReason() string { + if x != nil { + return x.Reason + } + return "" +} + +func (x *StepStatus) GetObjectSpecHash() string { + if x != nil { + return x.ObjectSpecHash + } + return "" +} + +func (x *StepStatus) GetJobSpecHash() string { + if x != nil { + return x.JobSpecHash + } + return "" +} + +// +kubebuilder:object:generate=true +// TaskletSpec is the spec of the tasklet +type TaskletSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Init []*StepTemplate `protobuf:"bytes,1,rep,name=init,proto3" json:"init,omitempty"` + Install []*StepTemplate `protobuf:"bytes,2,rep,name=install,proto3" json:"install,omitempty"` + PostInstall []*StepTemplate `protobuf:"bytes,3,rep,name=postInstall,proto3" json:"postInstall,omitempty"` + PreDelete []*StepTemplate `protobuf:"bytes,4,rep,name=preDelete,proto3" json:"preDelete,omitempty"` +} + +func (x *TaskletSpec) Reset() { + *x = TaskletSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_controller_cluster_controller_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TaskletSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TaskletSpec) ProtoMessage() {} + +func (x *TaskletSpec) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_controller_cluster_controller_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TaskletSpec.ProtoReflect.Descriptor instead. +func (*TaskletSpec) Descriptor() ([]byte, []int) { + return file_proto_types_controller_cluster_controller_proto_rawDescGZIP(), []int{3} +} + +func (x *TaskletSpec) GetInit() []*StepTemplate { + if x != nil { + return x.Init + } + return nil +} + +func (x *TaskletSpec) GetInstall() []*StepTemplate { + if x != nil { + return x.Install + } + return nil +} + +func (x *TaskletSpec) GetPostInstall() []*StepTemplate { + if x != nil { + return x.PostInstall + } + return nil +} + +func (x *TaskletSpec) GetPreDelete() []*StepTemplate { + if x != nil { + return x.PreDelete + } + return nil +} + +// +kubebuilder:object:generate=true +// TaskletCondition is the condition of the tasklet +type TaskletCondition struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` + Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` + LastUpdateTime *v1.Time `protobuf:"bytes,3,opt,name=lastUpdateTime,proto3" json:"lastUpdateTime,omitempty"` + Reason string `protobuf:"bytes,4,opt,name=reason,proto3" json:"reason,omitempty"` +} + +func (x *TaskletCondition) Reset() { + *x = TaskletCondition{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_controller_cluster_controller_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TaskletCondition) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TaskletCondition) ProtoMessage() {} + +func (x *TaskletCondition) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_controller_cluster_controller_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TaskletCondition.ProtoReflect.Descriptor instead. +func (*TaskletCondition) Descriptor() ([]byte, []int) { + return file_proto_types_controller_cluster_controller_proto_rawDescGZIP(), []int{4} +} + +func (x *TaskletCondition) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *TaskletCondition) GetStatus() string { + if x != nil { + return x.Status + } + return "" +} + +func (x *TaskletCondition) GetLastUpdateTime() *v1.Time { + if x != nil { + return x.LastUpdateTime + } + return nil +} + +func (x *TaskletCondition) GetReason() string { + if x != nil { + return x.Reason + } + return "" +} + +// +kubebuilder:object:generate=true +// TaskletStatus is the status of the tasklet +type TaskletStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ObservedGeneration int64 `protobuf:"zigzag64,1,opt,name=observedGeneration,proto3" json:"observedGeneration,omitempty"` + Conditions []*TaskletCondition `protobuf:"bytes,2,rep,name=conditions,proto3" json:"conditions,omitempty"` + Init []*StepStatus `protobuf:"bytes,3,rep,name=init,proto3" json:"init,omitempty"` + Install []*StepStatus `protobuf:"bytes,4,rep,name=install,proto3" json:"install,omitempty"` + PostInstall []*StepStatus `protobuf:"bytes,5,rep,name=postInstall,proto3" json:"postInstall,omitempty"` + PreDelete []*StepStatus `protobuf:"bytes,6,rep,name=preDelete,proto3" json:"preDelete,omitempty"` +} + +func (x *TaskletStatus) Reset() { + *x = TaskletStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_controller_cluster_controller_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TaskletStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TaskletStatus) ProtoMessage() {} + +func (x *TaskletStatus) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_controller_cluster_controller_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TaskletStatus.ProtoReflect.Descriptor instead. +func (*TaskletStatus) Descriptor() ([]byte, []int) { + return file_proto_types_controller_cluster_controller_proto_rawDescGZIP(), []int{5} +} + +func (x *TaskletStatus) GetObservedGeneration() int64 { + if x != nil { + return x.ObservedGeneration + } + return 0 +} + +func (x *TaskletStatus) GetConditions() []*TaskletCondition { + if x != nil { + return x.Conditions + } + return nil +} + +func (x *TaskletStatus) GetInit() []*StepStatus { + if x != nil { + return x.Init + } + return nil +} + +func (x *TaskletStatus) GetInstall() []*StepStatus { + if x != nil { + return x.Install + } + return nil +} + +func (x *TaskletStatus) GetPostInstall() []*StepStatus { + if x != nil { + return x.PostInstall + } + return nil +} + +func (x *TaskletStatus) GetPreDelete() []*StepStatus { + if x != nil { + return x.PreDelete + } + return nil +} + +// +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:resource:shortName=rtl +// Tasklet is the schema of tasklet +type Tasklet struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + v1.TypeMeta `protobuf:"bytes,1,opt,name=typeMeta,proto3,embedded=typeMeta" json:"typeMeta,omitempty"` + v1.ObjectMeta `protobuf:"bytes,2,opt,name=objectMeta,proto3,embedded=objectMeta" json:"objectMeta,omitempty"` + Spec *TaskletSpec `protobuf:"bytes,3,opt,name=spec,proto3" json:"spec,omitempty"` + Status *TaskletStatus `protobuf:"bytes,4,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *Tasklet) Reset() { + *x = Tasklet{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_controller_cluster_controller_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Tasklet) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Tasklet) ProtoMessage() {} + +func (x *Tasklet) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_controller_cluster_controller_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Tasklet.ProtoReflect.Descriptor instead. +func (*Tasklet) Descriptor() ([]byte, []int) { + return file_proto_types_controller_cluster_controller_proto_rawDescGZIP(), []int{6} +} + +func (x *Tasklet) GetSpec() *TaskletSpec { + if x != nil { + return x.Spec + } + return nil +} + +func (x *Tasklet) GetStatus() *TaskletStatus { + if x != nil { + return x.Status + } + return nil +} + +// +kubebuilder:object:root=true +// TaskletList contains a list of tasklets +type TaskletList struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + v1.TypeMeta `protobuf:"bytes,1,opt,name=typeMeta,proto3,embedded=typeMeta" json:"typeMeta,omitempty"` + v1.ListMeta `protobuf:"bytes,2,opt,name=listMeta,proto3,embedded=listMeta" json:"listMeta,omitempty"` + Items []*Tasklet `protobuf:"bytes,3,rep,name=items,proto3" json:"items,omitempty"` +} + +func (x *TaskletList) Reset() { + *x = TaskletList{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_controller_cluster_controller_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TaskletList) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TaskletList) ProtoMessage() {} + +func (x *TaskletList) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_controller_cluster_controller_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TaskletList.ProtoReflect.Descriptor instead. +func (*TaskletList) Descriptor() ([]byte, []int) { + return file_proto_types_controller_cluster_controller_proto_rawDescGZIP(), []int{7} +} + +func (x *TaskletList) GetItems() []*Tasklet { + if x != nil { + return x.Items + } + return nil +} + +// +kubebuilder:object:generate=true +// TaskletTemplate is the template for creating a tasklet +type TaskletTemplate struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ObjectMeta *v1.ObjectMeta `protobuf:"bytes,1,opt,name=objectMeta,proto3" json:"objectMeta,omitempty"` + Spec *TaskletSpec `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` +} + +func (x *TaskletTemplate) Reset() { + *x = TaskletTemplate{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_controller_cluster_controller_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TaskletTemplate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TaskletTemplate) ProtoMessage() {} + +func (x *TaskletTemplate) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_controller_cluster_controller_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TaskletTemplate.ProtoReflect.Descriptor instead. +func (*TaskletTemplate) Descriptor() ([]byte, []int) { + return file_proto_types_controller_cluster_controller_proto_rawDescGZIP(), []int{8} +} + +func (x *TaskletTemplate) GetObjectMeta() *v1.ObjectMeta { + if x != nil { + return x.ObjectMeta + } + return nil +} + +func (x *TaskletTemplate) GetSpec() *TaskletSpec { + if x != nil { + return x.Spec + } + return nil +} + +// +kubebuilder:object:generate=true +// TaskSpec is the spec of the task +type TaskSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Init []*StepTemplate `protobuf:"bytes,1,rep,name=init,proto3" json:"init,omitempty"` + Tasklet *TaskletTemplate `protobuf:"bytes,2,opt,name=tasklet,proto3" json:"tasklet,omitempty"` + PreDelete []*StepTemplate `protobuf:"bytes,3,rep,name=preDelete,proto3" json:"preDelete,omitempty"` +} + +func (x *TaskSpec) Reset() { + *x = TaskSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_controller_cluster_controller_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TaskSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TaskSpec) ProtoMessage() {} + +func (x *TaskSpec) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_controller_cluster_controller_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TaskSpec.ProtoReflect.Descriptor instead. +func (*TaskSpec) Descriptor() ([]byte, []int) { + return file_proto_types_controller_cluster_controller_proto_rawDescGZIP(), []int{9} +} + +func (x *TaskSpec) GetInit() []*StepTemplate { + if x != nil { + return x.Init + } + return nil +} + +func (x *TaskSpec) GetTasklet() *TaskletTemplate { + if x != nil { + return x.Tasklet + } + return nil +} + +func (x *TaskSpec) GetPreDelete() []*StepTemplate { + if x != nil { + return x.PreDelete + } + return nil +} + +// +kubebuilder:object:generate=true +// TaskCondition is the condition of the tasklet +type TaskCondition struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` + Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` + LastUpdateTime *v1.Time `protobuf:"bytes,3,opt,name=lastUpdateTime,proto3" json:"lastUpdateTime,omitempty"` + Reason string `protobuf:"bytes,4,opt,name=reason,proto3" json:"reason,omitempty"` +} + +func (x *TaskCondition) Reset() { + *x = TaskCondition{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_controller_cluster_controller_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TaskCondition) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TaskCondition) ProtoMessage() {} + +func (x *TaskCondition) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_controller_cluster_controller_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TaskCondition.ProtoReflect.Descriptor instead. +func (*TaskCondition) Descriptor() ([]byte, []int) { + return file_proto_types_controller_cluster_controller_proto_rawDescGZIP(), []int{10} +} + +func (x *TaskCondition) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *TaskCondition) GetStatus() string { + if x != nil { + return x.Status + } + return "" +} + +func (x *TaskCondition) GetLastUpdateTime() *v1.Time { + if x != nil { + return x.LastUpdateTime + } + return nil +} + +func (x *TaskCondition) GetReason() string { + if x != nil { + return x.Reason + } + return "" +} + +// +kubebuilder:object:generate=true +// TaskStatus is the status of the task +type TaskStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ObservedGeneration int64 `protobuf:"zigzag64,1,opt,name=observedGeneration,proto3" json:"observedGeneration,omitempty"` + Conditions []*TaskCondition `protobuf:"bytes,2,rep,name=conditions,proto3" json:"conditions,omitempty"` + Init []*StepStatus `protobuf:"bytes,3,rep,name=init,proto3" json:"init,omitempty"` + TaskletRef *v11.ObjectReference `protobuf:"bytes,4,opt,name=taskletRef,proto3" json:"taskletRef,omitempty"` + PreDelete []*StepStatus `protobuf:"bytes,5,rep,name=preDelete,proto3" json:"preDelete,omitempty"` +} + +func (x *TaskStatus) Reset() { + *x = TaskStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_controller_cluster_controller_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TaskStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TaskStatus) ProtoMessage() {} + +func (x *TaskStatus) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_controller_cluster_controller_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TaskStatus.ProtoReflect.Descriptor instead. +func (*TaskStatus) Descriptor() ([]byte, []int) { + return file_proto_types_controller_cluster_controller_proto_rawDescGZIP(), []int{11} +} + +func (x *TaskStatus) GetObservedGeneration() int64 { + if x != nil { + return x.ObservedGeneration + } + return 0 +} + +func (x *TaskStatus) GetConditions() []*TaskCondition { + if x != nil { + return x.Conditions + } + return nil +} + +func (x *TaskStatus) GetInit() []*StepStatus { + if x != nil { + return x.Init + } + return nil +} + +func (x *TaskStatus) GetTaskletRef() *v11.ObjectReference { + if x != nil { + return x.TaskletRef + } + return nil +} + +func (x *TaskStatus) GetPreDelete() []*StepStatus { + if x != nil { + return x.PreDelete + } + return nil +} + +// +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:resource:shortName=rt +// Tasklet is the schema of task +type Task struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + v1.TypeMeta `protobuf:"bytes,1,opt,name=typeMeta,proto3,embedded=typeMeta" json:"typeMeta,omitempty"` + v1.ObjectMeta `protobuf:"bytes,2,opt,name=objectMeta,proto3,embedded=objectMeta" json:"objectMeta,omitempty"` + Spec *TaskSpec `protobuf:"bytes,3,opt,name=spec,proto3" json:"spec,omitempty"` + Status *TaskStatus `protobuf:"bytes,4,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *Task) Reset() { + *x = Task{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_controller_cluster_controller_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Task) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Task) ProtoMessage() {} + +func (x *Task) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_controller_cluster_controller_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Task.ProtoReflect.Descriptor instead. +func (*Task) Descriptor() ([]byte, []int) { + return file_proto_types_controller_cluster_controller_proto_rawDescGZIP(), []int{12} +} + +func (x *Task) GetSpec() *TaskSpec { + if x != nil { + return x.Spec + } + return nil +} + +func (x *Task) GetStatus() *TaskStatus { + if x != nil { + return x.Status + } + return nil +} + +// +kubebuilder:object:root=true +// TaskList contains a list of tasks +type TaskList struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + v1.TypeMeta `protobuf:"bytes,1,opt,name=typeMeta,proto3,embedded=typeMeta" json:"typeMeta,omitempty"` + v1.ListMeta `protobuf:"bytes,2,opt,name=listMeta,proto3,embedded=listMeta" json:"listMeta,omitempty"` + Items []*Task `protobuf:"bytes,3,rep,name=items,proto3" json:"items,omitempty"` +} + +func (x *TaskList) Reset() { + *x = TaskList{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_controller_cluster_controller_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TaskList) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TaskList) ProtoMessage() {} + +func (x *TaskList) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_controller_cluster_controller_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TaskList.ProtoReflect.Descriptor instead. +func (*TaskList) Descriptor() ([]byte, []int) { + return file_proto_types_controller_cluster_controller_proto_rawDescGZIP(), []int{13} +} + +func (x *TaskList) GetItems() []*Task { + if x != nil { + return x.Items + } + return nil +} + +// +kubebuilder:object:generate=true +// NamespaceSpec is the spec of the namespace +type NamespaceSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Init []*StepTemplate `protobuf:"bytes,1,rep,name=init,proto3" json:"init,omitempty"` + NamespaceMeta *v1.ObjectMeta `protobuf:"bytes,2,opt,name=namespaceMeta,proto3" json:"namespaceMeta,omitempty"` + PostCreate []*StepTemplate `protobuf:"bytes,3,rep,name=postCreate,proto3" json:"postCreate,omitempty"` + PreDelete []*StepTemplate `protobuf:"bytes,4,rep,name=preDelete,proto3" json:"preDelete,omitempty"` +} + +func (x *NamespaceSpec) Reset() { + *x = NamespaceSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_controller_cluster_controller_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NamespaceSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NamespaceSpec) ProtoMessage() {} + +func (x *NamespaceSpec) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_controller_cluster_controller_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NamespaceSpec.ProtoReflect.Descriptor instead. +func (*NamespaceSpec) Descriptor() ([]byte, []int) { + return file_proto_types_controller_cluster_controller_proto_rawDescGZIP(), []int{14} +} + +func (x *NamespaceSpec) GetInit() []*StepTemplate { + if x != nil { + return x.Init + } + return nil +} + +func (x *NamespaceSpec) GetNamespaceMeta() *v1.ObjectMeta { + if x != nil { + return x.NamespaceMeta + } + return nil +} + +func (x *NamespaceSpec) GetPostCreate() []*StepTemplate { + if x != nil { + return x.PostCreate + } + return nil +} + +func (x *NamespaceSpec) GetPreDelete() []*StepTemplate { + if x != nil { + return x.PreDelete + } + return nil +} + +// +kubebuilder:object:generate=true +type NamespaceCondition struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` + Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` + LastUpdateTime *v1.Time `protobuf:"bytes,3,opt,name=lastUpdateTime,proto3" json:"lastUpdateTime,omitempty"` + Reason string `protobuf:"bytes,4,opt,name=reason,proto3" json:"reason,omitempty"` +} + +func (x *NamespaceCondition) Reset() { + *x = NamespaceCondition{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_controller_cluster_controller_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NamespaceCondition) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NamespaceCondition) ProtoMessage() {} + +func (x *NamespaceCondition) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_controller_cluster_controller_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NamespaceCondition.ProtoReflect.Descriptor instead. +func (*NamespaceCondition) Descriptor() ([]byte, []int) { + return file_proto_types_controller_cluster_controller_proto_rawDescGZIP(), []int{15} +} + +func (x *NamespaceCondition) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *NamespaceCondition) GetStatus() string { + if x != nil { + return x.Status + } + return "" +} + +func (x *NamespaceCondition) GetLastUpdateTime() *v1.Time { + if x != nil { + return x.LastUpdateTime + } + return nil +} + +func (x *NamespaceCondition) GetReason() string { + if x != nil { + return x.Reason + } + return "" +} + +// +kubebuilder:object:generate=true +// NamespaceStatus is the status of namespace +type NamespaceStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ObservedGeneration int64 `protobuf:"zigzag64,1,opt,name=observedGeneration,proto3" json:"observedGeneration,omitempty"` + Conditions []*NamespaceCondition `protobuf:"bytes,2,rep,name=conditions,proto3" json:"conditions,omitempty"` + Init []*StepStatus `protobuf:"bytes,3,rep,name=init,proto3" json:"init,omitempty"` + NamespaceRef *v11.ObjectReference `protobuf:"bytes,4,opt,name=namespaceRef,proto3" json:"namespaceRef,omitempty"` + PostCreate []*StepStatus `protobuf:"bytes,5,rep,name=postCreate,proto3" json:"postCreate,omitempty"` + PreDelete []*StepStatus `protobuf:"bytes,6,rep,name=preDelete,proto3" json:"preDelete,omitempty"` +} + +func (x *NamespaceStatus) Reset() { + *x = NamespaceStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_controller_cluster_controller_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NamespaceStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NamespaceStatus) ProtoMessage() {} + +func (x *NamespaceStatus) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_controller_cluster_controller_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NamespaceStatus.ProtoReflect.Descriptor instead. +func (*NamespaceStatus) Descriptor() ([]byte, []int) { + return file_proto_types_controller_cluster_controller_proto_rawDescGZIP(), []int{16} +} + +func (x *NamespaceStatus) GetObservedGeneration() int64 { + if x != nil { + return x.ObservedGeneration + } + return 0 +} + +func (x *NamespaceStatus) GetConditions() []*NamespaceCondition { + if x != nil { + return x.Conditions + } + return nil +} + +func (x *NamespaceStatus) GetInit() []*StepStatus { + if x != nil { + return x.Init + } + return nil +} + +func (x *NamespaceStatus) GetNamespaceRef() *v11.ObjectReference { + if x != nil { + return x.NamespaceRef + } + return nil +} + +func (x *NamespaceStatus) GetPostCreate() []*StepStatus { + if x != nil { + return x.PostCreate + } + return nil +} + +func (x *NamespaceStatus) GetPreDelete() []*StepStatus { + if x != nil { + return x.PreDelete + } + return nil +} + +// +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:resource:shortName=rns +// Namespace is the schema of namespace +type Namespace struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + v1.TypeMeta `protobuf:"bytes,1,opt,name=typeMeta,proto3,embedded=typeMeta" json:"typeMeta,omitempty"` + v1.ObjectMeta `protobuf:"bytes,2,opt,name=objectMeta,proto3,embedded=objectMeta" json:"objectMeta,omitempty"` + Spec *NamespaceSpec `protobuf:"bytes,3,opt,name=spec,proto3" json:"spec,omitempty"` + Status *NamespaceStatus `protobuf:"bytes,4,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *Namespace) Reset() { + *x = Namespace{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_controller_cluster_controller_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Namespace) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Namespace) ProtoMessage() {} + +func (x *Namespace) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_controller_cluster_controller_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Namespace.ProtoReflect.Descriptor instead. +func (*Namespace) Descriptor() ([]byte, []int) { + return file_proto_types_controller_cluster_controller_proto_rawDescGZIP(), []int{17} +} + +func (x *Namespace) GetSpec() *NamespaceSpec { + if x != nil { + return x.Spec + } + return nil +} + +func (x *Namespace) GetStatus() *NamespaceStatus { + if x != nil { + return x.Status + } + return nil +} + +// +kubebuilder:object:root=true +// TaskletList contains a list of tasklets +type NamespaceList struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + v1.TypeMeta `protobuf:"bytes,1,opt,name=typeMeta,proto3,embedded=typeMeta" json:"typeMeta,omitempty"` + v1.ListMeta `protobuf:"bytes,2,opt,name=listMeta,proto3,embedded=listMeta" json:"listMeta,omitempty"` + Items []*Namespace `protobuf:"bytes,3,rep,name=items,proto3" json:"items,omitempty"` +} + +func (x *NamespaceList) Reset() { + *x = NamespaceList{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_controller_cluster_controller_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NamespaceList) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NamespaceList) ProtoMessage() {} + +func (x *NamespaceList) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_controller_cluster_controller_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NamespaceList.ProtoReflect.Descriptor instead. +func (*NamespaceList) Descriptor() ([]byte, []int) { + return file_proto_types_controller_cluster_controller_proto_rawDescGZIP(), []int{18} +} + +func (x *NamespaceList) GetItems() []*Namespace { + if x != nil { + return x.Items + } + return nil +} + +var File_proto_types_controller_cluster_controller_proto protoreflect.FileDescriptor + +var file_proto_types_controller_cluster_controller_proto_rawDesc = []byte{ + 0x0a, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x1a, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x1a, 0x14, 0x67, + 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x34, 0x6b, 0x38, 0x73, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x6d, + 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x72, 0x79, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x61, 0x70, 0x69, + 0x73, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x65, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2f, 0x6b, 0x38, 0x73, 0x2e, 0x69, + 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x72, 0x79, 0x2f, 0x70, + 0x6b, 0x67, 0x2f, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x65, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x6b, 0x38, 0x73, 0x2e, + 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x28, + 0x6b, 0x38, 0x73, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x62, 0x61, 0x74, 0x63, 0x68, + 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, + 0x65, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xfa, 0x01, 0x0a, 0x0a, 0x53, 0x74, 0x65, + 0x70, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x54, 0x0a, 0x08, 0x74, 0x79, 0x70, 0x65, 0x4d, + 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6b, 0x38, 0x73, 0x2e, + 0x69, 0x6f, 0x2e, 0x61, 0x70, 0x69, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x72, 0x79, 0x2e, + 0x70, 0x6b, 0x67, 0x2e, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x76, 0x31, + 0x2e, 0x54, 0x79, 0x70, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0xd0, + 0xde, 0x1f, 0x01, 0x52, 0x08, 0x74, 0x79, 0x70, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x70, 0x0a, + 0x0a, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x30, 0x2e, 0x6b, 0x38, 0x73, 0x2e, 0x69, 0x6f, 0x2e, 0x61, 0x70, 0x69, 0x6d, 0x61, + 0x63, 0x68, 0x69, 0x6e, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x6b, 0x67, 0x2e, 0x61, 0x70, 0x69, 0x73, + 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, + 0x65, 0x74, 0x61, 0x42, 0x1e, 0xc8, 0xde, 0x1f, 0x00, 0xd0, 0xde, 0x1f, 0x01, 0xea, 0xde, 0x1f, + 0x12, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, + 0x70, 0x74, 0x79, 0x52, 0x0a, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x12, + 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x61, 0x77, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x03, 0x72, 0x61, 0x77, 0x22, 0xdd, 0x01, 0x0a, 0x0c, 0x53, 0x74, 0x65, 0x70, 0x54, 0x65, + 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2c, 0x0a, 0x08, 0x6f, 0x6e, + 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x10, 0xfa, 0xde, + 0x1f, 0x0c, 0x53, 0x74, 0x65, 0x70, 0x4f, 0x6e, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x52, 0x08, + 0x6f, 0x6e, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x12, 0x3e, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, + 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x65, 0x70, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x4b, 0x0a, 0x0b, 0x6a, 0x6f, 0x62, 0x54, + 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, + 0x6b, 0x38, 0x73, 0x2e, 0x69, 0x6f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x61, 0x74, 0x63, 0x68, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x54, 0x65, 0x6d, 0x70, + 0x6c, 0x61, 0x74, 0x65, 0x53, 0x70, 0x65, 0x63, 0x52, 0x0b, 0x6a, 0x6f, 0x62, 0x54, 0x65, 0x6d, + 0x70, 0x6c, 0x61, 0x74, 0x65, 0x22, 0xf2, 0x03, 0x0a, 0x0a, 0x53, 0x74, 0x65, 0x70, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x41, 0x0a, 0x09, 0x6f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x52, 0x65, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6b, 0x38, + 0x73, 0x2e, 0x69, 0x6f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, + 0x52, 0x09, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x66, 0x12, 0x44, 0x0a, 0x0b, 0x6f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x22, 0xea, 0xde, 0x1f, 0x0b, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x74, 0x61, 0x74, + 0x65, 0xfa, 0xde, 0x1f, 0x0f, 0x53, 0x74, 0x65, 0x70, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x52, 0x0b, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x61, 0x73, 0x6f, + 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, + 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x38, 0x0a, 0x08, 0x6a, 0x6f, 0x62, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1c, 0xea, 0xde, 0x1f, 0x08, 0x6a, 0x6f, 0x62, + 0x53, 0x74, 0x61, 0x74, 0x65, 0xfa, 0xde, 0x1f, 0x0c, 0x53, 0x74, 0x65, 0x70, 0x4a, 0x6f, 0x62, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x08, 0x6a, 0x6f, 0x62, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, + 0x1c, 0x0a, 0x09, 0x6a, 0x6f, 0x62, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x6a, 0x6f, 0x62, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x3b, 0x0a, + 0x06, 0x6a, 0x6f, 0x62, 0x52, 0x65, 0x66, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, + 0x6b, 0x38, 0x73, 0x2e, 0x69, 0x6f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, + 0x63, 0x65, 0x52, 0x06, 0x6a, 0x6f, 0x62, 0x52, 0x65, 0x66, 0x12, 0x2c, 0x0a, 0x05, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x16, 0xea, 0xde, 0x1f, 0x05, 0x73, + 0x74, 0x61, 0x74, 0x65, 0xfa, 0xde, 0x1f, 0x09, 0x53, 0x74, 0x65, 0x70, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, + 0x6f, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, + 0x12, 0x26, 0x0a, 0x0e, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x70, 0x65, 0x63, 0x48, 0x61, + 0x73, 0x68, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x53, 0x70, 0x65, 0x63, 0x48, 0x61, 0x73, 0x68, 0x12, 0x20, 0x0a, 0x0b, 0x6a, 0x6f, 0x62, 0x53, + 0x70, 0x65, 0x63, 0x48, 0x61, 0x73, 0x68, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6a, + 0x6f, 0x62, 0x53, 0x70, 0x65, 0x63, 0x48, 0x61, 0x73, 0x68, 0x22, 0xce, 0x04, 0x0a, 0x0b, 0x54, + 0x61, 0x73, 0x6b, 0x6c, 0x65, 0x74, 0x53, 0x70, 0x65, 0x63, 0x12, 0x82, 0x01, 0x0a, 0x04, 0x69, + 0x6e, 0x69, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x72, 0x61, 0x66, 0x61, + 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x65, 0x70, 0x54, 0x65, 0x6d, 0x70, 0x6c, + 0x61, 0x74, 0x65, 0x42, 0x44, 0xc8, 0xde, 0x1f, 0x00, 0xea, 0xde, 0x1f, 0x0e, 0x69, 0x6e, 0x69, + 0x74, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0xf2, 0xde, 0x1f, 0x2a, 0x70, + 0x61, 0x74, 0x63, 0x68, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x3a, 0x22, 0x6d, 0x65, + 0x72, 0x67, 0x65, 0x22, 0x20, 0x70, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x4b, + 0x65, 0x79, 0x3a, 0x22, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x52, 0x04, 0x69, 0x6e, 0x69, 0x74, 0x12, + 0x8b, 0x01, 0x0a, 0x07, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x28, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x53, + 0x74, 0x65, 0x70, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x42, 0x47, 0xc8, 0xde, 0x1f, + 0x00, 0xea, 0xde, 0x1f, 0x11, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x2c, 0x6f, 0x6d, 0x69, + 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0xf2, 0xde, 0x1f, 0x2a, 0x70, 0x61, 0x74, 0x63, 0x68, 0x53, + 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x3a, 0x22, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x22, 0x20, + 0x70, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x4b, 0x65, 0x79, 0x3a, 0x22, 0x6e, + 0x61, 0x6d, 0x65, 0x22, 0x52, 0x07, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x12, 0x97, 0x01, + 0x0a, 0x0b, 0x70, 0x6f, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, + 0x2e, 0x53, 0x74, 0x65, 0x70, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x42, 0x4b, 0xc8, + 0xde, 0x1f, 0x00, 0xea, 0xde, 0x1f, 0x15, 0x70, 0x6f, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, + 0x6c, 0x6c, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0xf2, 0xde, 0x1f, 0x2a, + 0x70, 0x61, 0x74, 0x63, 0x68, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x3a, 0x22, 0x6d, + 0x65, 0x72, 0x67, 0x65, 0x22, 0x20, 0x70, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x65, 0x72, 0x67, 0x65, + 0x4b, 0x65, 0x79, 0x3a, 0x22, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x52, 0x0b, 0x70, 0x6f, 0x73, 0x74, + 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x12, 0x91, 0x01, 0x0a, 0x09, 0x70, 0x72, 0x65, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x72, 0x61, + 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x65, 0x70, 0x54, 0x65, 0x6d, + 0x70, 0x6c, 0x61, 0x74, 0x65, 0x42, 0x49, 0xc8, 0xde, 0x1f, 0x00, 0xea, 0xde, 0x1f, 0x13, 0x70, + 0x72, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, + 0x74, 0x79, 0xf2, 0xde, 0x1f, 0x2a, 0x70, 0x61, 0x74, 0x63, 0x68, 0x53, 0x74, 0x72, 0x61, 0x74, + 0x65, 0x67, 0x79, 0x3a, 0x22, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x22, 0x20, 0x70, 0x61, 0x74, 0x63, + 0x68, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x4b, 0x65, 0x79, 0x3a, 0x22, 0x6e, 0x61, 0x6d, 0x65, 0x22, + 0x52, 0x09, 0x70, 0x72, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x22, 0xe7, 0x01, 0x0a, 0x10, + 0x54, 0x61, 0x73, 0x6b, 0x6c, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x34, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x20, + 0xea, 0xde, 0x1f, 0x04, 0x74, 0x79, 0x70, 0x65, 0xfa, 0xde, 0x1f, 0x14, 0x54, 0x61, 0x73, 0x6b, + 0x6c, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, + 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x2b, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x13, 0xfa, 0xde, 0x1f, 0x0f, 0x43, 0x6f, 0x6e, 0x64, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x12, 0x58, 0x0a, 0x0e, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6b, 0x38, + 0x73, 0x2e, 0x69, 0x6f, 0x2e, 0x61, 0x70, 0x69, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x72, + 0x79, 0x2e, 0x70, 0x6b, 0x67, 0x2e, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, + 0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0e, 0x6c, + 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x16, 0x0a, + 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, + 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x22, 0x93, 0x06, 0x0a, 0x0d, 0x54, 0x61, 0x73, 0x6b, 0x6c, 0x65, + 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2e, 0x0a, 0x12, 0x6f, 0x62, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x64, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x12, 0x52, 0x12, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x47, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x98, 0x01, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x64, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x72, + 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x6c, 0x65, + 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x4a, 0xc8, 0xde, 0x1f, 0x00, + 0xea, 0xde, 0x1f, 0x14, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2c, 0x6f, + 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0xf2, 0xde, 0x1f, 0x2a, 0x70, 0x61, 0x74, 0x63, + 0x68, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x3a, 0x22, 0x6d, 0x65, 0x72, 0x67, 0x65, + 0x22, 0x20, 0x70, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x4b, 0x65, 0x79, 0x3a, + 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x12, 0x80, 0x01, 0x0a, 0x04, 0x69, 0x6e, 0x69, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x26, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x53, + 0x74, 0x65, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x44, 0xc8, 0xde, 0x1f, 0x00, 0xea, + 0xde, 0x1f, 0x0e, 0x69, 0x6e, 0x69, 0x74, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, + 0x79, 0xf2, 0xde, 0x1f, 0x2a, 0x70, 0x61, 0x74, 0x63, 0x68, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, + 0x67, 0x79, 0x3a, 0x22, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x22, 0x20, 0x70, 0x61, 0x74, 0x63, 0x68, + 0x4d, 0x65, 0x72, 0x67, 0x65, 0x4b, 0x65, 0x79, 0x3a, 0x22, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x52, + 0x04, 0x69, 0x6e, 0x69, 0x74, 0x12, 0x89, 0x01, 0x0a, 0x07, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, + 0x6c, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, + 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x65, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, + 0x47, 0xc8, 0xde, 0x1f, 0x00, 0xea, 0xde, 0x1f, 0x11, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, + 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0xf2, 0xde, 0x1f, 0x2a, 0x70, 0x61, + 0x74, 0x63, 0x68, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x3a, 0x22, 0x6d, 0x65, 0x72, + 0x67, 0x65, 0x22, 0x20, 0x70, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x4b, 0x65, + 0x79, 0x3a, 0x22, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x52, 0x07, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, + 0x6c, 0x12, 0x95, 0x01, 0x0a, 0x0b, 0x70, 0x6f, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, + 0x6c, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, + 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x65, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, + 0x4b, 0xc8, 0xde, 0x1f, 0x00, 0xea, 0xde, 0x1f, 0x15, 0x70, 0x6f, 0x73, 0x74, 0x49, 0x6e, 0x73, + 0x74, 0x61, 0x6c, 0x6c, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0xf2, 0xde, + 0x1f, 0x2a, 0x70, 0x61, 0x74, 0x63, 0x68, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x3a, + 0x22, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x22, 0x20, 0x70, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x65, 0x72, + 0x67, 0x65, 0x4b, 0x65, 0x79, 0x3a, 0x22, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x52, 0x0b, 0x70, 0x6f, + 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x12, 0x8f, 0x01, 0x0a, 0x09, 0x70, 0x72, + 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, + 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x65, 0x70, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x49, 0xc8, 0xde, 0x1f, 0x00, 0xea, 0xde, 0x1f, 0x13, 0x70, + 0x72, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, + 0x74, 0x79, 0xf2, 0xde, 0x1f, 0x2a, 0x70, 0x61, 0x74, 0x63, 0x68, 0x53, 0x74, 0x72, 0x61, 0x74, + 0x65, 0x67, 0x79, 0x3a, 0x22, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x22, 0x20, 0x70, 0x61, 0x74, 0x63, + 0x68, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x4b, 0x65, 0x79, 0x3a, 0x22, 0x6e, 0x61, 0x6d, 0x65, 0x22, + 0x52, 0x09, 0x70, 0x72, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x22, 0xe8, 0x02, 0x0a, 0x07, + 0x54, 0x61, 0x73, 0x6b, 0x6c, 0x65, 0x74, 0x12, 0x5f, 0x0a, 0x08, 0x74, 0x79, 0x70, 0x65, 0x4d, + 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6b, 0x38, 0x73, 0x2e, + 0x69, 0x6f, 0x2e, 0x61, 0x70, 0x69, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x72, 0x79, 0x2e, + 0x70, 0x6b, 0x67, 0x2e, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x76, 0x31, + 0x2e, 0x54, 0x79, 0x70, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x42, 0x13, 0xc8, 0xde, 0x1f, 0x00, 0xd0, + 0xde, 0x1f, 0x01, 0xea, 0xde, 0x1f, 0x07, 0x2c, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x08, + 0x74, 0x79, 0x70, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x70, 0x0a, 0x0a, 0x6f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x6b, + 0x38, 0x73, 0x2e, 0x69, 0x6f, 0x2e, 0x61, 0x70, 0x69, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, + 0x72, 0x79, 0x2e, 0x70, 0x6b, 0x67, 0x2e, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x74, 0x61, + 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x42, 0x1e, + 0xc8, 0xde, 0x1f, 0x00, 0xd0, 0xde, 0x1f, 0x01, 0xea, 0xde, 0x1f, 0x12, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x0a, + 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x41, 0x0a, 0x04, 0x73, 0x70, + 0x65, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, + 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x6c, 0x65, 0x74, 0x53, 0x70, 0x65, + 0x63, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x47, 0x0a, + 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, + 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x6c, + 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x9b, 0x02, 0x0a, 0x0b, 0x54, 0x61, 0x73, 0x6b, 0x6c, + 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x5f, 0x0a, 0x08, 0x74, 0x79, 0x70, 0x65, 0x4d, 0x65, + 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6b, 0x38, 0x73, 0x2e, 0x69, + 0x6f, 0x2e, 0x61, 0x70, 0x69, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x72, 0x79, 0x2e, 0x70, + 0x6b, 0x67, 0x2e, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x76, 0x31, 0x2e, + 0x54, 0x79, 0x70, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x42, 0x13, 0xc8, 0xde, 0x1f, 0x00, 0xd0, 0xde, + 0x1f, 0x01, 0xea, 0xde, 0x1f, 0x07, 0x2c, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x08, 0x74, + 0x79, 0x70, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x6a, 0x0a, 0x08, 0x6c, 0x69, 0x73, 0x74, 0x4d, + 0x65, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6b, 0x38, 0x73, 0x2e, + 0x69, 0x6f, 0x2e, 0x61, 0x70, 0x69, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x72, 0x79, 0x2e, + 0x70, 0x6b, 0x67, 0x2e, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x76, 0x31, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x42, 0x1e, 0xc8, 0xde, 0x1f, 0x00, 0xd0, + 0xde, 0x1f, 0x01, 0xea, 0xde, 0x1f, 0x12, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2c, + 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x08, 0x6c, 0x69, 0x73, 0x74, 0x4d, + 0x65, 0x74, 0x61, 0x12, 0x3f, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, + 0x54, 0x61, 0x73, 0x6b, 0x6c, 0x65, 0x74, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x05, 0x69, + 0x74, 0x65, 0x6d, 0x73, 0x22, 0xc6, 0x01, 0x0a, 0x0f, 0x54, 0x61, 0x73, 0x6b, 0x6c, 0x65, 0x74, + 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x70, 0x0a, 0x0a, 0x6f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x6b, + 0x38, 0x73, 0x2e, 0x69, 0x6f, 0x2e, 0x61, 0x70, 0x69, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, + 0x72, 0x79, 0x2e, 0x70, 0x6b, 0x67, 0x2e, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x74, 0x61, + 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x42, 0x1e, + 0xc8, 0xde, 0x1f, 0x00, 0xd0, 0xde, 0x1f, 0x01, 0xea, 0xde, 0x1f, 0x12, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x0a, + 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x41, 0x0a, 0x04, 0x73, 0x70, + 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, + 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x6c, 0x65, 0x74, 0x53, 0x70, 0x65, + 0x63, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, 0xf0, 0x02, + 0x0a, 0x08, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x70, 0x65, 0x63, 0x12, 0x82, 0x01, 0x0a, 0x04, 0x69, + 0x6e, 0x69, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x72, 0x61, 0x66, 0x61, + 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x65, 0x70, 0x54, 0x65, 0x6d, 0x70, 0x6c, + 0x61, 0x74, 0x65, 0x42, 0x44, 0xc8, 0xde, 0x1f, 0x00, 0xea, 0xde, 0x1f, 0x0e, 0x69, 0x6e, 0x69, + 0x74, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0xf2, 0xde, 0x1f, 0x2a, 0x70, + 0x61, 0x74, 0x63, 0x68, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x3a, 0x22, 0x6d, 0x65, + 0x72, 0x67, 0x65, 0x22, 0x20, 0x70, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x4b, + 0x65, 0x79, 0x3a, 0x22, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x52, 0x04, 0x69, 0x6e, 0x69, 0x74, 0x12, + 0x4b, 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x6c, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x2b, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x54, 0x61, + 0x73, 0x6b, 0x6c, 0x65, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x42, 0x04, 0xc8, + 0xde, 0x1f, 0x00, 0x52, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x6c, 0x65, 0x74, 0x12, 0x91, 0x01, 0x0a, + 0x09, 0x70, 0x72, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x28, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x53, 0x74, + 0x65, 0x70, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x42, 0x49, 0xc8, 0xde, 0x1f, 0x00, + 0xea, 0xde, 0x1f, 0x13, 0x70, 0x72, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x2c, 0x6f, 0x6d, + 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0xf2, 0xde, 0x1f, 0x2a, 0x70, 0x61, 0x74, 0x63, 0x68, + 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x3a, 0x22, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x22, + 0x20, 0x70, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x4b, 0x65, 0x79, 0x3a, 0x22, + 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x52, 0x09, 0x70, 0x72, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x22, 0xe1, 0x01, 0x0a, 0x0d, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x31, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x1d, 0xea, 0xde, 0x1f, 0x04, 0x74, 0x79, 0x70, 0x65, 0xfa, 0xde, 0x1f, 0x11, 0x54, 0x61, + 0x73, 0x6b, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x2b, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x13, 0xfa, 0xde, 0x1f, 0x0f, 0x43, 0x6f, 0x6e, 0x64, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x12, 0x58, 0x0a, 0x0e, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6b, 0x38, 0x73, + 0x2e, 0x69, 0x6f, 0x2e, 0x61, 0x70, 0x69, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x72, 0x79, + 0x2e, 0x70, 0x6b, 0x67, 0x2e, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x76, + 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0e, 0x6c, 0x61, + 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, + 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, + 0x61, 0x73, 0x6f, 0x6e, 0x22, 0xae, 0x04, 0x0a, 0x0a, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x12, 0x2e, 0x0a, 0x12, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x47, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x12, 0x52, + 0x12, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x95, 0x01, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, + 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x42, 0x4a, 0xc8, 0xde, 0x1f, 0x00, 0xea, 0xde, 0x1f, 0x14, 0x63, 0x6f, 0x6e, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, + 0x79, 0xf2, 0xde, 0x1f, 0x2a, 0x70, 0x61, 0x74, 0x63, 0x68, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, + 0x67, 0x79, 0x3a, 0x22, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x22, 0x20, 0x70, 0x61, 0x74, 0x63, 0x68, + 0x4d, 0x65, 0x72, 0x67, 0x65, 0x4b, 0x65, 0x79, 0x3a, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x52, + 0x0a, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x80, 0x01, 0x0a, 0x04, + 0x69, 0x6e, 0x69, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x72, 0x61, 0x66, + 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x65, 0x70, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x42, 0x44, 0xc8, 0xde, 0x1f, 0x00, 0xea, 0xde, 0x1f, 0x0e, 0x69, 0x6e, 0x69, 0x74, + 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0xf2, 0xde, 0x1f, 0x2a, 0x70, 0x61, + 0x74, 0x63, 0x68, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x3a, 0x22, 0x6d, 0x65, 0x72, + 0x67, 0x65, 0x22, 0x20, 0x70, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x4b, 0x65, + 0x79, 0x3a, 0x22, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x52, 0x04, 0x69, 0x6e, 0x69, 0x74, 0x12, 0x43, + 0x0a, 0x0a, 0x74, 0x61, 0x73, 0x6b, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x66, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6b, 0x38, 0x73, 0x2e, 0x69, 0x6f, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, + 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x0a, 0x74, 0x61, 0x73, 0x6b, 0x6c, 0x65, 0x74, + 0x52, 0x65, 0x66, 0x12, 0x8f, 0x01, 0x0a, 0x09, 0x70, 0x72, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, + 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x65, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, + 0x49, 0xc8, 0xde, 0x1f, 0x00, 0xea, 0xde, 0x1f, 0x13, 0x70, 0x72, 0x65, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0xf2, 0xde, 0x1f, 0x2a, + 0x70, 0x61, 0x74, 0x63, 0x68, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x3a, 0x22, 0x6d, + 0x65, 0x72, 0x67, 0x65, 0x22, 0x20, 0x70, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x65, 0x72, 0x67, 0x65, + 0x4b, 0x65, 0x79, 0x3a, 0x22, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x52, 0x09, 0x70, 0x72, 0x65, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x22, 0x85, 0x03, 0x0a, 0x04, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x5f, + 0x0a, 0x08, 0x74, 0x79, 0x70, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x2e, 0x2e, 0x6b, 0x38, 0x73, 0x2e, 0x69, 0x6f, 0x2e, 0x61, 0x70, 0x69, 0x6d, 0x61, 0x63, + 0x68, 0x69, 0x6e, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x6b, 0x67, 0x2e, 0x61, 0x70, 0x69, 0x73, 0x2e, + 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x4d, 0x65, 0x74, 0x61, + 0x42, 0x13, 0xc8, 0xde, 0x1f, 0x00, 0xd0, 0xde, 0x1f, 0x01, 0xea, 0xde, 0x1f, 0x07, 0x2c, 0x69, + 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x08, 0x74, 0x79, 0x70, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x12, + 0x70, 0x0a, 0x0a, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x6b, 0x38, 0x73, 0x2e, 0x69, 0x6f, 0x2e, 0x61, 0x70, 0x69, + 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x6b, 0x67, 0x2e, 0x61, 0x70, + 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x4d, 0x65, 0x74, 0x61, 0x42, 0x1e, 0xc8, 0xde, 0x1f, 0x00, 0xd0, 0xde, 0x1f, 0x01, 0xea, + 0xde, 0x1f, 0x12, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2c, 0x6f, 0x6d, 0x69, 0x74, + 0x65, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x0a, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x74, + 0x61, 0x12, 0x50, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x24, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x54, 0x61, 0x73, + 0x6b, 0x53, 0x70, 0x65, 0x63, 0x42, 0x16, 0xc8, 0xde, 0x1f, 0x00, 0xea, 0xde, 0x1f, 0x0e, 0x73, + 0x70, 0x65, 0x63, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x04, 0x73, + 0x70, 0x65, 0x63, 0x12, 0x58, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, + 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x18, 0xc8, 0xde, 0x1f, + 0x00, 0xea, 0xde, 0x1f, 0x10, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2c, 0x6f, 0x6d, 0x69, 0x74, + 0x65, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x95, 0x02, + 0x0a, 0x08, 0x54, 0x61, 0x73, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x5f, 0x0a, 0x08, 0x74, 0x79, + 0x70, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6b, + 0x38, 0x73, 0x2e, 0x69, 0x6f, 0x2e, 0x61, 0x70, 0x69, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, + 0x72, 0x79, 0x2e, 0x70, 0x6b, 0x67, 0x2e, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x74, 0x61, + 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x42, 0x13, 0xc8, 0xde, + 0x1f, 0x00, 0xd0, 0xde, 0x1f, 0x01, 0xea, 0xde, 0x1f, 0x07, 0x2c, 0x69, 0x6e, 0x6c, 0x69, 0x6e, + 0x65, 0x52, 0x08, 0x74, 0x79, 0x70, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x6a, 0x0a, 0x08, 0x6c, + 0x69, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, + 0x6b, 0x38, 0x73, 0x2e, 0x69, 0x6f, 0x2e, 0x61, 0x70, 0x69, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, + 0x65, 0x72, 0x79, 0x2e, 0x70, 0x6b, 0x67, 0x2e, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x74, + 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x42, 0x1e, 0xc8, + 0xde, 0x1f, 0x00, 0xd0, 0xde, 0x1f, 0x01, 0xea, 0xde, 0x1f, 0x12, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x08, 0x6c, + 0x69, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x3c, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, + 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x6c, 0x65, 0x72, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x05, + 0x69, 0x74, 0x65, 0x6d, 0x73, 0x22, 0x9d, 0x04, 0x0a, 0x0d, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x12, 0x82, 0x01, 0x0a, 0x04, 0x69, 0x6e, 0x69, 0x74, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, + 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x6c, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x65, 0x70, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, + 0x42, 0x44, 0xc8, 0xde, 0x1f, 0x00, 0xea, 0xde, 0x1f, 0x0e, 0x69, 0x6e, 0x69, 0x74, 0x2c, 0x6f, + 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0xf2, 0xde, 0x1f, 0x2a, 0x70, 0x61, 0x74, 0x63, + 0x68, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x3a, 0x22, 0x6d, 0x65, 0x72, 0x67, 0x65, + 0x22, 0x20, 0x70, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x4b, 0x65, 0x79, 0x3a, + 0x22, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x52, 0x04, 0x69, 0x6e, 0x69, 0x74, 0x12, 0x5c, 0x0a, 0x0d, + 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x6b, 0x38, 0x73, 0x2e, 0x69, 0x6f, 0x2e, 0x61, 0x70, 0x69, + 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x6b, 0x67, 0x2e, 0x61, 0x70, + 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x4d, 0x65, 0x74, 0x61, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0d, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x94, 0x01, 0x0a, 0x0a, 0x70, + 0x6f, 0x73, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x28, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x65, + 0x70, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x42, 0x4a, 0xc8, 0xde, 0x1f, 0x00, 0xea, + 0xde, 0x1f, 0x14, 0x70, 0x6f, 0x73, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x2c, 0x6f, 0x6d, + 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0xf2, 0xde, 0x1f, 0x2a, 0x70, 0x61, 0x74, 0x63, 0x68, + 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x3a, 0x22, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x22, + 0x20, 0x70, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x4b, 0x65, 0x79, 0x3a, 0x22, + 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x52, 0x0a, 0x70, 0x6f, 0x73, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x12, 0x91, 0x01, 0x0a, 0x09, 0x70, 0x72, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x18, + 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, + 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, + 0x65, 0x72, 0x2e, 0x53, 0x74, 0x65, 0x70, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x42, + 0x49, 0xc8, 0xde, 0x1f, 0x00, 0xea, 0xde, 0x1f, 0x13, 0x70, 0x72, 0x65, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0xf2, 0xde, 0x1f, 0x2a, + 0x70, 0x61, 0x74, 0x63, 0x68, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x3a, 0x22, 0x6d, + 0x65, 0x72, 0x67, 0x65, 0x22, 0x20, 0x70, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x65, 0x72, 0x67, 0x65, + 0x4b, 0x65, 0x79, 0x3a, 0x22, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x52, 0x09, 0x70, 0x72, 0x65, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x22, 0xeb, 0x01, 0x0a, 0x12, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x36, 0x0a, 0x04, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x22, 0xea, 0xde, 0x1f, 0x04, + 0x74, 0x79, 0x70, 0x65, 0xfa, 0xde, 0x1f, 0x16, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, + 0x74, 0x79, 0x70, 0x65, 0x12, 0x2b, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x13, 0xfa, 0xde, 0x1f, 0x0f, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x12, 0x58, 0x0a, 0x0e, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, + 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6b, 0x38, 0x73, 0x2e, + 0x69, 0x6f, 0x2e, 0x61, 0x70, 0x69, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x72, 0x79, 0x2e, + 0x70, 0x6b, 0x67, 0x2e, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x76, 0x31, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0e, 0x6c, 0x61, 0x73, + 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, + 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x61, + 0x73, 0x6f, 0x6e, 0x22, 0xd1, 0x05, 0x0a, 0x0f, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2e, 0x0a, 0x12, 0x6f, 0x62, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x64, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x12, 0x52, 0x12, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x47, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x9a, 0x01, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x64, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x72, + 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x4a, 0xc8, 0xde, + 0x1f, 0x00, 0xea, 0xde, 0x1f, 0x14, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0xf2, 0xde, 0x1f, 0x2a, 0x70, 0x61, + 0x74, 0x63, 0x68, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x3a, 0x22, 0x6d, 0x65, 0x72, + 0x67, 0x65, 0x22, 0x20, 0x70, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x4b, 0x65, + 0x79, 0x3a, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x80, 0x01, 0x0a, 0x04, 0x69, 0x6e, 0x69, 0x74, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, + 0x2e, 0x53, 0x74, 0x65, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x44, 0xc8, 0xde, 0x1f, + 0x00, 0xea, 0xde, 0x1f, 0x0e, 0x69, 0x6e, 0x69, 0x74, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, + 0x70, 0x74, 0x79, 0xf2, 0xde, 0x1f, 0x2a, 0x70, 0x61, 0x74, 0x63, 0x68, 0x53, 0x74, 0x72, 0x61, + 0x74, 0x65, 0x67, 0x79, 0x3a, 0x22, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x22, 0x20, 0x70, 0x61, 0x74, + 0x63, 0x68, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x4b, 0x65, 0x79, 0x3a, 0x22, 0x6e, 0x61, 0x6d, 0x65, + 0x22, 0x52, 0x04, 0x69, 0x6e, 0x69, 0x74, 0x12, 0x47, 0x0a, 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, + 0x6b, 0x38, 0x73, 0x2e, 0x69, 0x6f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, + 0x63, 0x65, 0x52, 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x66, + 0x12, 0x92, 0x01, 0x0a, 0x0a, 0x70, 0x6f, 0x73, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x18, + 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, + 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, + 0x65, 0x72, 0x2e, 0x53, 0x74, 0x65, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x4a, 0xc8, + 0xde, 0x1f, 0x00, 0xea, 0xde, 0x1f, 0x14, 0x70, 0x6f, 0x73, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0xf2, 0xde, 0x1f, 0x2a, 0x70, + 0x61, 0x74, 0x63, 0x68, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x3a, 0x22, 0x6d, 0x65, + 0x72, 0x67, 0x65, 0x22, 0x20, 0x70, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x4b, + 0x65, 0x79, 0x3a, 0x22, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x52, 0x0a, 0x70, 0x6f, 0x73, 0x74, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x8f, 0x01, 0x0a, 0x09, 0x70, 0x72, 0x65, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x72, 0x61, 0x66, 0x61, + 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x65, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x42, 0x49, 0xc8, 0xde, 0x1f, 0x00, 0xea, 0xde, 0x1f, 0x13, 0x70, 0x72, 0x65, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0xf2, 0xde, + 0x1f, 0x2a, 0x70, 0x61, 0x74, 0x63, 0x68, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x3a, + 0x22, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x22, 0x20, 0x70, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x65, 0x72, + 0x67, 0x65, 0x4b, 0x65, 0x79, 0x3a, 0x22, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x52, 0x09, 0x70, 0x72, + 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x22, 0x94, 0x03, 0x0a, 0x09, 0x4e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x5f, 0x0a, 0x08, 0x74, 0x79, 0x70, 0x65, 0x4d, 0x65, 0x74, + 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6b, 0x38, 0x73, 0x2e, 0x69, 0x6f, + 0x2e, 0x61, 0x70, 0x69, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x6b, + 0x67, 0x2e, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x54, + 0x79, 0x70, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x42, 0x13, 0xc8, 0xde, 0x1f, 0x00, 0xd0, 0xde, 0x1f, + 0x01, 0xea, 0xde, 0x1f, 0x07, 0x2c, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x08, 0x74, 0x79, + 0x70, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x70, 0x0a, 0x0a, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x4d, 0x65, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x6b, 0x38, 0x73, + 0x2e, 0x69, 0x6f, 0x2e, 0x61, 0x70, 0x69, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x72, 0x79, + 0x2e, 0x70, 0x6b, 0x67, 0x2e, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x76, + 0x31, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x42, 0x1e, 0xc8, 0xde, + 0x1f, 0x00, 0xd0, 0xde, 0x1f, 0x01, 0xea, 0xde, 0x1f, 0x12, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x0a, 0x6f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x55, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, + 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x6c, 0x65, 0x72, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x70, 0x65, + 0x63, 0x42, 0x16, 0xc8, 0xde, 0x1f, 0x00, 0xea, 0xde, 0x1f, 0x0e, 0x73, 0x70, 0x65, 0x63, 0x2c, + 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, + 0x5d, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x2b, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x4e, 0x61, 0x6d, + 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x18, 0xc8, 0xde, + 0x1f, 0x00, 0xea, 0xde, 0x1f, 0x10, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2c, 0x6f, 0x6d, 0x69, + 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x9f, + 0x02, 0x0a, 0x0d, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, + 0x12, 0x5f, 0x0a, 0x08, 0x74, 0x79, 0x70, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6b, 0x38, 0x73, 0x2e, 0x69, 0x6f, 0x2e, 0x61, 0x70, 0x69, 0x6d, + 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x6b, 0x67, 0x2e, 0x61, 0x70, 0x69, + 0x73, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x4d, 0x65, + 0x74, 0x61, 0x42, 0x13, 0xc8, 0xde, 0x1f, 0x00, 0xd0, 0xde, 0x1f, 0x01, 0xea, 0xde, 0x1f, 0x07, + 0x2c, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x08, 0x74, 0x79, 0x70, 0x65, 0x4d, 0x65, 0x74, + 0x61, 0x12, 0x6a, 0x0a, 0x08, 0x6c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6b, 0x38, 0x73, 0x2e, 0x69, 0x6f, 0x2e, 0x61, 0x70, 0x69, + 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x6b, 0x67, 0x2e, 0x61, 0x70, + 0x69, 0x73, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, + 0x65, 0x74, 0x61, 0x42, 0x1e, 0xc8, 0xde, 0x1f, 0x00, 0xd0, 0xde, 0x1f, 0x01, 0xea, 0xde, 0x1f, + 0x12, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, + 0x70, 0x74, 0x79, 0x52, 0x08, 0x6c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x41, 0x0a, + 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x72, + 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, + 0x42, 0xa6, 0x02, 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, + 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x6c, 0x65, 0x72, 0x42, 0x16, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4c, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x61, 0x66, 0x61, 0x79, 0x53, + 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x2f, 0x72, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x62, 0x61, + 0x73, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0xa2, 0x02, 0x04, 0x52, 0x44, + 0x54, 0x43, 0xaa, 0x02, 0x1a, 0x52, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x44, 0x65, 0x76, 0x2e, 0x54, + 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0xca, + 0x02, 0x1a, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x54, 0x79, 0x70, 0x65, + 0x73, 0x5c, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0xe2, 0x02, 0x26, 0x52, + 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x5c, 0x43, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1d, 0x52, 0x61, 0x66, 0x61, 0x79, 0x3a, 0x3a, 0x44, + 0x65, 0x76, 0x3a, 0x3a, 0x54, 0x79, 0x70, 0x65, 0x73, 0x3a, 0x3a, 0x43, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0xc8, 0xe2, 0x1e, 0x01, 0xd0, 0xe2, 0x1e, 0x01, 0xe0, 0xe2, 0x1e, + 0x01, 0xc0, 0xe3, 0x1e, 0x01, 0xc8, 0xe3, 0x1e, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_proto_types_controller_cluster_controller_proto_rawDescOnce sync.Once + file_proto_types_controller_cluster_controller_proto_rawDescData = file_proto_types_controller_cluster_controller_proto_rawDesc +) + +func file_proto_types_controller_cluster_controller_proto_rawDescGZIP() []byte { + file_proto_types_controller_cluster_controller_proto_rawDescOnce.Do(func() { + file_proto_types_controller_cluster_controller_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_types_controller_cluster_controller_proto_rawDescData) + }) + return file_proto_types_controller_cluster_controller_proto_rawDescData +} + +var file_proto_types_controller_cluster_controller_proto_msgTypes = make([]protoimpl.MessageInfo, 19) +var file_proto_types_controller_cluster_controller_proto_goTypes = []interface{}{ + (*StepObject)(nil), // 0: rafay.dev.types.controller.StepObject + (*StepTemplate)(nil), // 1: rafay.dev.types.controller.StepTemplate + (*StepStatus)(nil), // 2: rafay.dev.types.controller.StepStatus + (*TaskletSpec)(nil), // 3: rafay.dev.types.controller.TaskletSpec + (*TaskletCondition)(nil), // 4: rafay.dev.types.controller.TaskletCondition + (*TaskletStatus)(nil), // 5: rafay.dev.types.controller.TaskletStatus + (*Tasklet)(nil), // 6: rafay.dev.types.controller.Tasklet + (*TaskletList)(nil), // 7: rafay.dev.types.controller.TaskletList + (*TaskletTemplate)(nil), // 8: rafay.dev.types.controller.TaskletTemplate + (*TaskSpec)(nil), // 9: rafay.dev.types.controller.TaskSpec + (*TaskCondition)(nil), // 10: rafay.dev.types.controller.TaskCondition + (*TaskStatus)(nil), // 11: rafay.dev.types.controller.TaskStatus + (*Task)(nil), // 12: rafay.dev.types.controller.Task + (*TaskList)(nil), // 13: rafay.dev.types.controller.TaskList + (*NamespaceSpec)(nil), // 14: rafay.dev.types.controller.NamespaceSpec + (*NamespaceCondition)(nil), // 15: rafay.dev.types.controller.NamespaceCondition + (*NamespaceStatus)(nil), // 16: rafay.dev.types.controller.NamespaceStatus + (*Namespace)(nil), // 17: rafay.dev.types.controller.Namespace + (*NamespaceList)(nil), // 18: rafay.dev.types.controller.NamespaceList + (*v1.TypeMeta)(nil), // 19: k8s.io.apimachinery.pkg.apis.meta.v1.TypeMeta + (*v1.ObjectMeta)(nil), // 20: k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta + (*v1beta1.JobTemplateSpec)(nil), // 21: k8s.io.api.batch.v1beta1.JobTemplateSpec + (*v11.ObjectReference)(nil), // 22: k8s.io.api.core.v1.ObjectReference + (*v1.Time)(nil), // 23: k8s.io.apimachinery.pkg.apis.meta.v1.Time + (*v1.ListMeta)(nil), // 24: k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta +} +var file_proto_types_controller_cluster_controller_proto_depIdxs = []int32{ + 19, // 0: rafay.dev.types.controller.StepObject.typeMeta:type_name -> k8s.io.apimachinery.pkg.apis.meta.v1.TypeMeta + 20, // 1: rafay.dev.types.controller.StepObject.objectMeta:type_name -> k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta + 0, // 2: rafay.dev.types.controller.StepTemplate.object:type_name -> rafay.dev.types.controller.StepObject + 21, // 3: rafay.dev.types.controller.StepTemplate.jobTemplate:type_name -> k8s.io.api.batch.v1beta1.JobTemplateSpec + 22, // 4: rafay.dev.types.controller.StepStatus.objectRef:type_name -> k8s.io.api.core.v1.ObjectReference + 22, // 5: rafay.dev.types.controller.StepStatus.jobRef:type_name -> k8s.io.api.core.v1.ObjectReference + 1, // 6: rafay.dev.types.controller.TaskletSpec.init:type_name -> rafay.dev.types.controller.StepTemplate + 1, // 7: rafay.dev.types.controller.TaskletSpec.install:type_name -> rafay.dev.types.controller.StepTemplate + 1, // 8: rafay.dev.types.controller.TaskletSpec.postInstall:type_name -> rafay.dev.types.controller.StepTemplate + 1, // 9: rafay.dev.types.controller.TaskletSpec.preDelete:type_name -> rafay.dev.types.controller.StepTemplate + 23, // 10: rafay.dev.types.controller.TaskletCondition.lastUpdateTime:type_name -> k8s.io.apimachinery.pkg.apis.meta.v1.Time + 4, // 11: rafay.dev.types.controller.TaskletStatus.conditions:type_name -> rafay.dev.types.controller.TaskletCondition + 2, // 12: rafay.dev.types.controller.TaskletStatus.init:type_name -> rafay.dev.types.controller.StepStatus + 2, // 13: rafay.dev.types.controller.TaskletStatus.install:type_name -> rafay.dev.types.controller.StepStatus + 2, // 14: rafay.dev.types.controller.TaskletStatus.postInstall:type_name -> rafay.dev.types.controller.StepStatus + 2, // 15: rafay.dev.types.controller.TaskletStatus.preDelete:type_name -> rafay.dev.types.controller.StepStatus + 19, // 16: rafay.dev.types.controller.Tasklet.typeMeta:type_name -> k8s.io.apimachinery.pkg.apis.meta.v1.TypeMeta + 20, // 17: rafay.dev.types.controller.Tasklet.objectMeta:type_name -> k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta + 3, // 18: rafay.dev.types.controller.Tasklet.spec:type_name -> rafay.dev.types.controller.TaskletSpec + 5, // 19: rafay.dev.types.controller.Tasklet.status:type_name -> rafay.dev.types.controller.TaskletStatus + 19, // 20: rafay.dev.types.controller.TaskletList.typeMeta:type_name -> k8s.io.apimachinery.pkg.apis.meta.v1.TypeMeta + 24, // 21: rafay.dev.types.controller.TaskletList.listMeta:type_name -> k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta + 6, // 22: rafay.dev.types.controller.TaskletList.items:type_name -> rafay.dev.types.controller.Tasklet + 20, // 23: rafay.dev.types.controller.TaskletTemplate.objectMeta:type_name -> k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta + 3, // 24: rafay.dev.types.controller.TaskletTemplate.spec:type_name -> rafay.dev.types.controller.TaskletSpec + 1, // 25: rafay.dev.types.controller.TaskSpec.init:type_name -> rafay.dev.types.controller.StepTemplate + 8, // 26: rafay.dev.types.controller.TaskSpec.tasklet:type_name -> rafay.dev.types.controller.TaskletTemplate + 1, // 27: rafay.dev.types.controller.TaskSpec.preDelete:type_name -> rafay.dev.types.controller.StepTemplate + 23, // 28: rafay.dev.types.controller.TaskCondition.lastUpdateTime:type_name -> k8s.io.apimachinery.pkg.apis.meta.v1.Time + 10, // 29: rafay.dev.types.controller.TaskStatus.conditions:type_name -> rafay.dev.types.controller.TaskCondition + 2, // 30: rafay.dev.types.controller.TaskStatus.init:type_name -> rafay.dev.types.controller.StepStatus + 22, // 31: rafay.dev.types.controller.TaskStatus.taskletRef:type_name -> k8s.io.api.core.v1.ObjectReference + 2, // 32: rafay.dev.types.controller.TaskStatus.preDelete:type_name -> rafay.dev.types.controller.StepStatus + 19, // 33: rafay.dev.types.controller.Task.typeMeta:type_name -> k8s.io.apimachinery.pkg.apis.meta.v1.TypeMeta + 20, // 34: rafay.dev.types.controller.Task.objectMeta:type_name -> k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta + 9, // 35: rafay.dev.types.controller.Task.spec:type_name -> rafay.dev.types.controller.TaskSpec + 11, // 36: rafay.dev.types.controller.Task.status:type_name -> rafay.dev.types.controller.TaskStatus + 19, // 37: rafay.dev.types.controller.TaskList.typeMeta:type_name -> k8s.io.apimachinery.pkg.apis.meta.v1.TypeMeta + 24, // 38: rafay.dev.types.controller.TaskList.listMeta:type_name -> k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta + 12, // 39: rafay.dev.types.controller.TaskList.items:type_name -> rafay.dev.types.controller.Task + 1, // 40: rafay.dev.types.controller.NamespaceSpec.init:type_name -> rafay.dev.types.controller.StepTemplate + 20, // 41: rafay.dev.types.controller.NamespaceSpec.namespaceMeta:type_name -> k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta + 1, // 42: rafay.dev.types.controller.NamespaceSpec.postCreate:type_name -> rafay.dev.types.controller.StepTemplate + 1, // 43: rafay.dev.types.controller.NamespaceSpec.preDelete:type_name -> rafay.dev.types.controller.StepTemplate + 23, // 44: rafay.dev.types.controller.NamespaceCondition.lastUpdateTime:type_name -> k8s.io.apimachinery.pkg.apis.meta.v1.Time + 15, // 45: rafay.dev.types.controller.NamespaceStatus.conditions:type_name -> rafay.dev.types.controller.NamespaceCondition + 2, // 46: rafay.dev.types.controller.NamespaceStatus.init:type_name -> rafay.dev.types.controller.StepStatus + 22, // 47: rafay.dev.types.controller.NamespaceStatus.namespaceRef:type_name -> k8s.io.api.core.v1.ObjectReference + 2, // 48: rafay.dev.types.controller.NamespaceStatus.postCreate:type_name -> rafay.dev.types.controller.StepStatus + 2, // 49: rafay.dev.types.controller.NamespaceStatus.preDelete:type_name -> rafay.dev.types.controller.StepStatus + 19, // 50: rafay.dev.types.controller.Namespace.typeMeta:type_name -> k8s.io.apimachinery.pkg.apis.meta.v1.TypeMeta + 20, // 51: rafay.dev.types.controller.Namespace.objectMeta:type_name -> k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta + 14, // 52: rafay.dev.types.controller.Namespace.spec:type_name -> rafay.dev.types.controller.NamespaceSpec + 16, // 53: rafay.dev.types.controller.Namespace.status:type_name -> rafay.dev.types.controller.NamespaceStatus + 19, // 54: rafay.dev.types.controller.NamespaceList.typeMeta:type_name -> k8s.io.apimachinery.pkg.apis.meta.v1.TypeMeta + 24, // 55: rafay.dev.types.controller.NamespaceList.listMeta:type_name -> k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta + 17, // 56: rafay.dev.types.controller.NamespaceList.items:type_name -> rafay.dev.types.controller.Namespace + 57, // [57:57] is the sub-list for method output_type + 57, // [57:57] is the sub-list for method input_type + 57, // [57:57] is the sub-list for extension type_name + 57, // [57:57] is the sub-list for extension extendee + 0, // [0:57] is the sub-list for field type_name +} + +func init() { file_proto_types_controller_cluster_controller_proto_init() } +func file_proto_types_controller_cluster_controller_proto_init() { + if File_proto_types_controller_cluster_controller_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_proto_types_controller_cluster_controller_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StepObject); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_controller_cluster_controller_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StepTemplate); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_controller_cluster_controller_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StepStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_controller_cluster_controller_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TaskletSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_controller_cluster_controller_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TaskletCondition); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_controller_cluster_controller_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TaskletStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_controller_cluster_controller_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Tasklet); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_controller_cluster_controller_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TaskletList); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_controller_cluster_controller_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TaskletTemplate); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_controller_cluster_controller_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TaskSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_controller_cluster_controller_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TaskCondition); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_controller_cluster_controller_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TaskStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_controller_cluster_controller_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Task); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_controller_cluster_controller_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TaskList); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_controller_cluster_controller_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NamespaceSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_controller_cluster_controller_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NamespaceCondition); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_controller_cluster_controller_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NamespaceStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_controller_cluster_controller_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Namespace); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_controller_cluster_controller_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NamespaceList); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_proto_types_controller_cluster_controller_proto_rawDesc, + NumEnums: 0, + NumMessages: 19, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_proto_types_controller_cluster_controller_proto_goTypes, + DependencyIndexes: file_proto_types_controller_cluster_controller_proto_depIdxs, + MessageInfos: file_proto_types_controller_cluster_controller_proto_msgTypes, + }.Build() + File_proto_types_controller_cluster_controller_proto = out.File + file_proto_types_controller_cluster_controller_proto_rawDesc = nil + file_proto_types_controller_cluster_controller_proto_goTypes = nil + file_proto_types_controller_cluster_controller_proto_depIdxs = nil +} diff --git a/components/common/proto/types/controller/cluster_controller.proto b/components/common/proto/types/controller/cluster_controller.proto new file mode 100644 index 0000000..4ba624e --- /dev/null +++ b/components/common/proto/types/controller/cluster_controller.proto @@ -0,0 +1,376 @@ +syntax = "proto3"; +package rafay.dev.types.controller; + +import "gogoproto/gogo.proto"; +import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; +import "k8s.io/apimachinery/pkg/runtime/generated.proto"; + +import "k8s.io/api/core/v1/generated.proto"; +import "k8s.io/api/batch/v1beta1/generated.proto"; + +// Enable custom Marshal method. +option (gogoproto.marshaler_all) = true; +// Enable custom Unmarshal method. +option (gogoproto.unmarshaler_all) = true; +// Enable custom Size method (Required by Marshal and Unmarshal). +option (gogoproto.sizer_all) = true; +// Enable registration with golang/protobuf for the grpc-gateway. +option (gogoproto.goproto_registration) = true; +// Enable generation of XXX_MessageName methods for grpc-go/status. +option (gogoproto.messagename_all) = true; + +// +kubebuilder:object:generate=true +// StepObject can represent any kubernetes object +message StepObject { + k8s.io.apimachinery.pkg.apis.meta.v1.TypeMeta typeMeta = 1 + [(gogoproto.embed) = true, (gogoproto.nullable) = false]; + k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta objectMeta = 2 [ + (gogoproto.embed) = true, + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "metadata,omitempty" + ]; + string name = 3; + bytes raw = 4; +} + +// +kubebuilder:object:generate=true +// StepTemplate is the description of a step +message StepTemplate { + string name = 1; + string onFailed = 2 [(gogoproto.casttype) = "StepOnFailed"]; + StepObject object = 3; + k8s.io.api.batch.v1beta1.JobTemplateSpec jobTemplate = 4; +} + +// +kubebuilder:object:generate=true +// StepStatus is the status of the step +message StepStatus { + string name = 1; + k8s.io.api.core.v1.ObjectReference objectRef = 2; + string objectState = 3 [ + (gogoproto.jsontag) = "objectState", + (gogoproto.casttype) = "StepObjectState" + ]; + string objectReason = 4; + string jobState = 5 + [(gogoproto.jsontag) = "jobState", (gogoproto.casttype) = "StepJobState"]; + string jobReason = 6; + k8s.io.api.core.v1.ObjectReference jobRef = 7; + string state = 8 + [(gogoproto.jsontag) = "state", (gogoproto.casttype) = "StepState"]; + string reason = 9; + string objectSpecHash = 10; + string jobSpecHash = 11; +} + +// +kubebuilder:object:generate=true +// TaskletSpec is the spec of the tasklet +message TaskletSpec { + repeated StepTemplate init = 1 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "init,omitempty", + (gogoproto.moretags) = "patchStrategy:\"merge\" patchMergeKey:\"name\"" + ]; + repeated StepTemplate install = 2 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "install,omitempty", + (gogoproto.moretags) = "patchStrategy:\"merge\" patchMergeKey:\"name\"" + ]; + repeated StepTemplate postInstall = 3 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "postInstall,omitempty", + (gogoproto.moretags) = "patchStrategy:\"merge\" patchMergeKey:\"name\"" + ]; + repeated StepTemplate preDelete = 4 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "preDelete,omitempty", + (gogoproto.moretags) = "patchStrategy:\"merge\" patchMergeKey:\"name\"" + ]; +} + +// +kubebuilder:object:generate=true +// TaskletCondition is the condition of the tasklet +message TaskletCondition { + string type = 1 [ + (gogoproto.jsontag) = "type", + (gogoproto.casttype) = "TaskletConditionType" + ]; + string status = 2 [(gogoproto.casttype) = "ConditionStatus"]; + k8s.io.apimachinery.pkg.apis.meta.v1.Time lastUpdateTime = 3 + [(gogoproto.nullable) = false]; + string reason = 4; +} + +// +kubebuilder:object:generate=true +// TaskletStatus is the status of the tasklet +message TaskletStatus { + sint64 observedGeneration = 1; + repeated TaskletCondition conditions = 2 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "conditions,omitempty", + (gogoproto.moretags) = "patchStrategy:\"merge\" patchMergeKey:\"type\"" + ]; + repeated StepStatus init = 3 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "init,omitempty", + (gogoproto.moretags) = "patchStrategy:\"merge\" patchMergeKey:\"name\"" + ]; + repeated StepStatus install = 4 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "install,omitempty", + (gogoproto.moretags) = "patchStrategy:\"merge\" patchMergeKey:\"name\"" + ]; + repeated StepStatus postInstall = 5 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "postInstall,omitempty", + (gogoproto.moretags) = "patchStrategy:\"merge\" patchMergeKey:\"name\"" + ]; + repeated StepStatus preDelete = 6 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "preDelete,omitempty", + (gogoproto.moretags) = "patchStrategy:\"merge\" patchMergeKey:\"name\"" + ]; +} + +// +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:resource:shortName=rtl +// Tasklet is the schema of tasklet +message Tasklet { + k8s.io.apimachinery.pkg.apis.meta.v1.TypeMeta typeMeta = 1 [ + (gogoproto.embed) = true, + (gogoproto.nullable) = false, + (gogoproto.jsontag) = ",inline" + ]; + k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta objectMeta = 2 [ + (gogoproto.embed) = true, + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "metadata,omitempty" + ]; + + TaskletSpec spec = 3 [(gogoproto.nullable) = false]; + TaskletStatus status = 4 [(gogoproto.nullable) = false]; +} + +// +kubebuilder:object:root=true +// TaskletList contains a list of tasklets +message TaskletList { + k8s.io.apimachinery.pkg.apis.meta.v1.TypeMeta typeMeta = 1 [ + (gogoproto.embed) = true, + (gogoproto.nullable) = false, + (gogoproto.jsontag) = ",inline" + ]; + + k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta listMeta = 2 [ + (gogoproto.embed) = true, + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "metadata,omitempty" + ]; + + repeated Tasklet items = 3 [(gogoproto.nullable) = false]; +} + +// +kubebuilder:object:generate=true +// TaskletTemplate is the template for creating a tasklet +message TaskletTemplate { + k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta objectMeta = 1 [ + (gogoproto.embed) = true, + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "metadata,omitempty" + ]; + + TaskletSpec spec = 2 [(gogoproto.nullable) = false]; +} + +// +kubebuilder:object:generate=true +// TaskSpec is the spec of the task +message TaskSpec { + repeated StepTemplate init = 1 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "init,omitempty", + (gogoproto.moretags) = "patchStrategy:\"merge\" patchMergeKey:\"name\"" + ]; + + TaskletTemplate tasklet = 2 [(gogoproto.nullable) = false]; + repeated StepTemplate preDelete = 3 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "preDelete,omitempty", + (gogoproto.moretags) = "patchStrategy:\"merge\" patchMergeKey:\"name\"" + ]; +} + +// +kubebuilder:object:generate=true +// TaskCondition is the condition of the tasklet +message TaskCondition { + string type = 1 [ + (gogoproto.jsontag) = "type", + (gogoproto.casttype) = "TaskConditionType" + ]; + string status = 2 [(gogoproto.casttype) = "ConditionStatus"]; + k8s.io.apimachinery.pkg.apis.meta.v1.Time lastUpdateTime = 3 + [(gogoproto.nullable) = false]; + string reason = 4; +} + +// +kubebuilder:object:generate=true +// TaskStatus is the status of the task +message TaskStatus { + sint64 observedGeneration = 1; + repeated TaskCondition conditions = 2 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "conditions,omitempty", + (gogoproto.moretags) = "patchStrategy:\"merge\" patchMergeKey:\"type\"" + ]; + repeated StepStatus init = 3 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "init,omitempty", + (gogoproto.moretags) = "patchStrategy:\"merge\" patchMergeKey:\"name\"" + ]; + k8s.io.api.core.v1.ObjectReference taskletRef = 4; + repeated StepStatus preDelete = 5 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "preDelete,omitempty", + (gogoproto.moretags) = "patchStrategy:\"merge\" patchMergeKey:\"name\"" + ]; +} + +// +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:resource:shortName=rt +// Tasklet is the schema of task +message Task { + k8s.io.apimachinery.pkg.apis.meta.v1.TypeMeta typeMeta = 1 [ + (gogoproto.embed) = true, + (gogoproto.nullable) = false, + (gogoproto.jsontag) = ",inline" + ]; + k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta objectMeta = 2 [ + (gogoproto.embed) = true, + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "metadata,omitempty" + ]; + + TaskSpec spec = 3 + [(gogoproto.nullable) = false, (gogoproto.jsontag) = "spec,omitempty"]; + TaskStatus status = 4 + [(gogoproto.nullable) = false, (gogoproto.jsontag) = "status,omitempty"]; +} + +// +kubebuilder:object:root=true +// TaskList contains a list of tasks +message TaskList { + k8s.io.apimachinery.pkg.apis.meta.v1.TypeMeta typeMeta = 1 [ + (gogoproto.embed) = true, + (gogoproto.nullable) = false, + (gogoproto.jsontag) = ",inline" + ]; + + k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta listMeta = 2 [ + (gogoproto.embed) = true, + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "metadata,omitempty" + ]; + + repeated Task items = 3 [(gogoproto.nullable) = false]; +} + +// +kubebuilder:object:generate=true +// NamespaceSpec is the spec of the namespace +message NamespaceSpec { + repeated StepTemplate init = 1 [ + (gogoproto.nullable) = false, + (gogoproto.moretags) = "patchStrategy:\"merge\" patchMergeKey:\"name\"", + (gogoproto.jsontag) = "init,omitempty" + ]; + k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta namespaceMeta = 2 + [(gogoproto.nullable) = false]; + repeated StepTemplate postCreate = 3 [ + (gogoproto.nullable) = false, + (gogoproto.moretags) = "patchStrategy:\"merge\" patchMergeKey:\"name\"", + (gogoproto.jsontag) = "postCreate,omitempty" + ]; + repeated StepTemplate preDelete = 4 [ + (gogoproto.nullable) = false, + (gogoproto.moretags) = "patchStrategy:\"merge\" patchMergeKey:\"name\"", + (gogoproto.jsontag) = "preDelete,omitempty" + ]; +} + +// +kubebuilder:object:generate=true +message NamespaceCondition { + string type = 1 [ + (gogoproto.jsontag) = "type", + (gogoproto.casttype) = "NamespaceConditionType" + ]; + string status = 2 [(gogoproto.casttype) = "ConditionStatus"]; + k8s.io.apimachinery.pkg.apis.meta.v1.Time lastUpdateTime = 3 + [(gogoproto.nullable) = false]; + string reason = 4; +} + +// +kubebuilder:object:generate=true +// NamespaceStatus is the status of namespace +message NamespaceStatus { + sint64 observedGeneration = 1; + repeated NamespaceCondition conditions = 2 [ + (gogoproto.nullable) = false, + (gogoproto.moretags) = "patchStrategy:\"merge\" patchMergeKey:\"type\"", + (gogoproto.jsontag) = "conditions,omitempty" + ]; + repeated StepStatus init = 3 [ + (gogoproto.nullable) = false, + (gogoproto.moretags) = "patchStrategy:\"merge\" patchMergeKey:\"name\"", + (gogoproto.jsontag) = "init,omitempty" + ]; + k8s.io.api.core.v1.ObjectReference namespaceRef = 4; + repeated StepStatus postCreate = 5 [ + (gogoproto.nullable) = false, + (gogoproto.moretags) = "patchStrategy:\"merge\" patchMergeKey:\"name\"", + (gogoproto.jsontag) = "postCreate,omitempty" + ]; + repeated StepStatus preDelete = 6 [ + (gogoproto.nullable) = false, + (gogoproto.moretags) = "patchStrategy:\"merge\" patchMergeKey:\"name\"", + (gogoproto.jsontag) = "preDelete,omitempty" + ]; +} + +// +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:resource:shortName=rns +// Namespace is the schema of namespace +message Namespace { + k8s.io.apimachinery.pkg.apis.meta.v1.TypeMeta typeMeta = 1 [ + (gogoproto.embed) = true, + (gogoproto.nullable) = false, + (gogoproto.jsontag) = ",inline" + ]; + k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta objectMeta = 2 [ + (gogoproto.embed) = true, + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "metadata,omitempty" + ]; + + NamespaceSpec spec = 3 + [(gogoproto.nullable) = false, (gogoproto.jsontag) = "spec,omitempty"]; + NamespaceStatus status = 4 + [(gogoproto.nullable) = false, (gogoproto.jsontag) = "status,omitempty"]; +} + +// +kubebuilder:object:root=true +// TaskletList contains a list of tasklets +message NamespaceList { + k8s.io.apimachinery.pkg.apis.meta.v1.TypeMeta typeMeta = 1 [ + (gogoproto.embed) = true, + (gogoproto.nullable) = false, + (gogoproto.jsontag) = ",inline" + ]; + + k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta listMeta = 2 [ + (gogoproto.embed) = true, + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "metadata,omitempty" + ]; + + repeated Namespace items = 3 [(gogoproto.nullable) = false]; +} diff --git a/components/common/proto/types/controller/conditions.go b/components/common/proto/types/controller/conditions.go new file mode 100644 index 0000000..f08852a --- /dev/null +++ b/components/common/proto/types/controller/conditions.go @@ -0,0 +1,208 @@ +package controller + +import ( + "time" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +kubebuilder:object:generate=false + +// NewNamespaceConditionFunc is the function signature for creating new namespace condition +type NewNamespaceConditionFunc func(status ConditionStatus, reason string) *NamespaceCondition + +// +kubebuilder:object:generate=false + +// NewTaskletConditionFunc is the function signature for creating new tasklet condition +type NewTaskletConditionFunc func(status ConditionStatus, reason string) *TaskletCondition + +// +kubebuilder:object:generate=false + +// NewTaskConditionFunc is the function signature for creating new task condition +type NewTaskConditionFunc func(status ConditionStatus, reason string) *TaskCondition + +// +kubebuilder:object:generate=false + +// NamespaceConditionFunc checks if condition type is complete +type NamespaceConditionFunc func(n *Namespace) bool + +// +kubebuilder:object:generate=false + +// TaskletConditionFunc checks if condition type is complete +type TaskletConditionFunc func(t *Tasklet) bool + +// +kubebuilder:object:generate=false + +// TaskConditionFunc checks if condition type is complete +type TaskConditionFunc func(t *Task) bool + +// +kubebuilder:object:generate=false + +// GetTaskConditionReasonFunc returns the reason of the task condition +type GetTaskConditionReasonFunc func(t *Task) string + +// +kubebuilder:object:generate=false + +// GetTaskletConditionReasonFunc returns the reason of the tasklet condition +type GetTaskletConditionReasonFunc func(t *Tasklet) string + +// +kubebuilder:object:generate=false + +// GetNamespaceConditionReasonFunc returns the reason for namespace condition +type GetNamespaceConditionReasonFunc func(n *Namespace) string + +// utility methods for creating/checking conditions +var ( + NewNamespaceUpsert NewNamespaceConditionFunc = newNamespaceCondition(NamespaceUpsert) + NewNamespaceInit NewNamespaceConditionFunc = newNamespaceCondition(NamespaceInit) + NewNamespaceCreate NewNamespaceConditionFunc = newNamespaceCondition(NamespaceCreate) + NewNamespacePostCreate NewNamespaceConditionFunc = newNamespaceCondition(NamespacePostCreate) + NewNamespacePreDelete NewNamespaceConditionFunc = newNamespaceCondition(NamespacePreDelete) + NewNamespaceReady NewNamespaceConditionFunc = newNamespaceCondition(NamespaceReady) + + NewTaskletUpsert NewTaskletConditionFunc = newTaskletCondition(TaskletUpsert) + NewTaskletInit NewTaskletConditionFunc = newTaskletCondition(TaskletInit) + NewTaskletInstall NewTaskletConditionFunc = newTaskletCondition(TaskletInstall) + NewTaskletPostInstall NewTaskletConditionFunc = newTaskletCondition(TaskletPostInstall) + NewTaskletPreDelete NewTaskletConditionFunc = newTaskletCondition(TaskletPreDelete) + NewTaskletReady NewTaskletConditionFunc = newTaskletCondition(TaskletReady) + + NewTaskUpsert NewTaskConditionFunc = newTaskCondition(TaskUpsert) + NewTaskInit NewTaskConditionFunc = newTaskCondition(TaskInit) + NewTaskletCreate NewTaskConditionFunc = newTaskCondition(TaskletCreate) + NewTaskPreDelete NewTaskConditionFunc = newTaskCondition(TaskPreDelete) + NewTaskReady NewTaskConditionFunc = newTaskCondition(TaskReady) + + TaskReadyFailedReason GetTaskConditionReasonFunc = getTaskConditionReason(Failed, TaskReady) + TaskConvergeFailedReason GetTaskConditionReasonFunc = getTaskConditionReason(Failed, TaskInit, TaskletCreate) + TaskletReadyFailedReason GetTaskletConditionReasonFunc = getTaskletConditionReason(Failed, TaskletReady) + TaskletFailedReason GetTaskletConditionReasonFunc = getTaskletConditionReason(Failed, TaskletInit, TaskletInstall, TaskletPostInstall, TaskletReady) + + NamespaceConvergeFailedReason GetNamespaceConditionReasonFunc = getNamespaceConditionReason(Failed, NamespaceInit, NamespaceCreate, NamespacePostCreate) + NamespaceReadyReason GetNamespaceConditionReasonFunc = getNamespaceConditionReason(Failed, NamespaceReady) +) + +func newNamespaceCondition(conditionType NamespaceConditionType) func(status ConditionStatus, reason string) *NamespaceCondition { + return func(status ConditionStatus, reason string) *NamespaceCondition { + return &NamespaceCondition{ + Type: string(conditionType), + Status: string(status), + Reason: reason, + LastUpdateTime: &metav1.Time{time.Now()}, + } + } +} + +func newTaskletCondition(conditionType TaskletConditionType) func(status ConditionStatus, reason string) *TaskletCondition { + return func(status ConditionStatus, reason string) *TaskletCondition { + return &TaskletCondition{ + Type: string(conditionType), + Status: string(status), + Reason: reason, + LastUpdateTime: &metav1.Time{time.Now()}, + } + } +} + +func newTaskCondition(conditionType TaskConditionType) func(status ConditionStatus, reason string) *TaskCondition { + return func(status ConditionStatus, reason string) *TaskCondition { + return &TaskCondition{ + Type: string(conditionType), + Status: string(status), + Reason: reason, + LastUpdateTime: &metav1.Time{time.Now()}, + } + } +} + +func getTaskletConditionReason(conditionStatus ConditionStatus, conditionTypes ...TaskletConditionType) func(t *Tasklet) string { + return func(t *Tasklet) string { + for _, condition := range t.Status.Conditions { + for _, conditionType := range conditionTypes { + if condition.Type == string(conditionType) { + if condition.Status == string(conditionStatus) { + return condition.Reason + } + } + + } + } + return "" + } +} + +func getTaskConditionReason(conditionStatus ConditionStatus, conditionTypes ...TaskConditionType) func(t *Task) string { + return func(t *Task) string { + for _, conditionType := range conditionTypes { + for _, condition := range t.Status.Conditions { + if condition.Type == string(conditionType) { + if condition.Status == string(conditionStatus) { + return condition.Reason + } + + } + } + } + + return "" + } +} + +func getNamespaceConditionReason(conditionStatus ConditionStatus, conditionTypes ...NamespaceConditionType) func(n *Namespace) string { + return func(n *Namespace) string { + for _, conditionType := range conditionTypes { + for _, condition := range n.Status.Conditions { + if condition.Type == string(conditionType) { + if condition.Status == string(conditionStatus) { + return condition.Reason + } + + } + } + } + + return "" + } +} + +// SetNamespaceCondition sets namespace condition +func SetNamespaceCondition(n *Namespace, condition NamespaceCondition) { + found := false + for i := range n.Status.Conditions { + if n.Status.Conditions[i].Type == condition.Type { + found = true + n.Status.Conditions[i] = &condition + } + } + if !found { + n.Status.Conditions = append(n.Status.Conditions, &condition) + } +} + +// SetTaskletCondition sets tasklet condition +func SetTaskletCondition(t *Tasklet, condition TaskletCondition) { + found := false + for i := range t.Status.Conditions { + if t.Status.Conditions[i].Type == condition.Type { + found = true + t.Status.Conditions[i] = &condition + } + } + if !found { + t.Status.Conditions = append(t.Status.Conditions, &condition) + } +} + +// SetTaskCondition sets task condition +func SetTaskCondition(t *Task, condition TaskCondition) { + found := false + for i := range t.Status.Conditions { + if t.Status.Conditions[i].Type == condition.Type { + found = true + t.Status.Conditions[i] = &condition + } + } + if !found { + t.Status.Conditions = append(t.Status.Conditions, &condition) + } +} diff --git a/components/common/proto/types/controller/conditions_util.go b/components/common/proto/types/controller/conditions_util.go new file mode 100644 index 0000000..25d2a0f --- /dev/null +++ b/components/common/proto/types/controller/conditions_util.go @@ -0,0 +1,317 @@ +package controller + +type namespaceConditionCheckOptions struct { + conditionStatus ConditionStatus + conditionTypes []NamespaceConditionType + shortCircuit bool +} + +type taskConditionCheckOptions struct { + conditionStatus ConditionStatus + conditionTypes []TaskConditionType + shortCircuit bool +} + +type taskletConditionCheckOptions struct { + conditionStatus ConditionStatus + conditionTypes []TaskletConditionType + shortCircuit bool +} + +type namespaceConditionCheckOption func(*namespaceConditionCheckOptions) +type taskConditionCheckOption func(*taskConditionCheckOptions) +type taskletConditionCheckOption func(*taskletConditionCheckOptions) + +func withNamespaceConditionStatus(status ConditionStatus) namespaceConditionCheckOption { + return func(opts *namespaceConditionCheckOptions) { + opts.conditionStatus = status + } +} + +func withNamespaceConditionType(conditionType NamespaceConditionType) namespaceConditionCheckOption { + return func(opts *namespaceConditionCheckOptions) { + opts.conditionTypes = append(opts.conditionTypes, conditionType) + } +} + +func withNamespaceConditionShortCircuit() namespaceConditionCheckOption { + return func(opts *namespaceConditionCheckOptions) { + opts.shortCircuit = true + } +} + +func withTaskConditionStatus(status ConditionStatus) taskConditionCheckOption { + return func(opts *taskConditionCheckOptions) { + opts.conditionStatus = status + } +} + +func withTaskConditionType(conditionType TaskConditionType) taskConditionCheckOption { + return func(opts *taskConditionCheckOptions) { + opts.conditionTypes = append(opts.conditionTypes, conditionType) + } +} + +func withTaskConditionShortCircuit() taskConditionCheckOption { + return func(opts *taskConditionCheckOptions) { + opts.shortCircuit = true + } +} + +func withTaskletConditionStatus(status ConditionStatus) taskletConditionCheckOption { + return func(opts *taskletConditionCheckOptions) { + opts.conditionStatus = status + } +} + +func withTaskletConditionType(conditionType TaskletConditionType) taskletConditionCheckOption { + return func(opts *taskletConditionCheckOptions) { + opts.conditionTypes = append(opts.conditionTypes, conditionType) + } +} + +func withTaskletConditionShortCircuit() taskletConditionCheckOption { + return func(opts *taskletConditionCheckOptions) { + opts.shortCircuit = true + } +} + +func checkNamespaceConditions(opts ...namespaceConditionCheckOption) NamespaceConditionFunc { + + checkOpts := new(namespaceConditionCheckOptions) + for _, opt := range opts { + opt(checkOpts) + } + + return func(n *Namespace) bool { + if !checkOpts.shortCircuit { + allStatisfied := true + found := false + for _, condition := range n.Status.Conditions { + for _, conditionType := range checkOpts.conditionTypes { + if condition.Type == string(conditionType) { + found = true + if condition.Status != string(checkOpts.conditionStatus) { + allStatisfied = false + } + } + } + } + return found && allStatisfied + } + + for _, condition := range n.Status.Conditions { + for _, conditionType := range checkOpts.conditionTypes { + if condition.Type == string(conditionType) { + if condition.Status == string(checkOpts.conditionStatus) { + return true + } + } + } + } + return false + + } +} + +func checkTaskConditions(opts ...taskConditionCheckOption) TaskConditionFunc { + + checkOpts := new(taskConditionCheckOptions) + for _, opt := range opts { + opt(checkOpts) + } + + return func(n *Task) bool { + if !checkOpts.shortCircuit { + allStatisfied := true + found := false + for _, condition := range n.Status.Conditions { + for _, conditionType := range checkOpts.conditionTypes { + if condition.Type == string(conditionType) { + found = true + if condition.Status != string(checkOpts.conditionStatus) { + allStatisfied = false + } + } + } + } + return found && allStatisfied + } + + for _, condition := range n.Status.Conditions { + for _, conditionType := range checkOpts.conditionTypes { + if condition.Type == string(conditionType) { + if condition.Status == string(checkOpts.conditionStatus) { + return true + } + } + } + } + return false + + } +} + +func checkTaskletConditions(opts ...taskletConditionCheckOption) TaskletConditionFunc { + + checkOpts := new(taskletConditionCheckOptions) + for _, opt := range opts { + opt(checkOpts) + } + + return func(n *Tasklet) bool { + if !checkOpts.shortCircuit { + allStatisfied := true + found := false + for _, condition := range n.Status.Conditions { + for _, conditionType := range checkOpts.conditionTypes { + if condition.Type == string(conditionType) { + found = true + if condition.Status != string(checkOpts.conditionStatus) { + allStatisfied = false + } + } + } + } + return found && allStatisfied + } + + for _, condition := range n.Status.Conditions { + for _, conditionType := range checkOpts.conditionTypes { + if condition.Type == string(conditionType) { + if condition.Status == string(checkOpts.conditionStatus) { + return true + } + } + } + } + return false + + } +} + +// exported namespace condition utils +var ( + IsNamespaceUpserted NamespaceConditionFunc = checkNamespaceConditions( + withNamespaceConditionStatus(Complete), + withNamespaceConditionType(NamespaceUpsert)) + + IsNamespaceInited NamespaceConditionFunc = checkNamespaceConditions( + withNamespaceConditionStatus(Complete), + withNamespaceConditionType(NamespaceInit)) + + IsNamespaceCreated NamespaceConditionFunc = checkNamespaceConditions( + withNamespaceConditionStatus(Complete), + withNamespaceConditionType(NamespaceCreate)) + + IsNamespacePostCreated NamespaceConditionFunc = checkNamespaceConditions( + withNamespaceConditionStatus(Complete), + withNamespaceConditionType(NamespacePostCreate)) + + IsNamespacePreDeleted NamespaceConditionFunc = checkNamespaceConditions( + withNamespaceConditionStatus(Complete), + withNamespaceConditionType(NamespacePreDelete)) + + IsNamespaceReady NamespaceConditionFunc = checkNamespaceConditions( + withNamespaceConditionStatus(Complete), + withNamespaceConditionType(NamespaceReady)) + + IsNamespaceReadyFailed NamespaceConditionFunc = checkNamespaceConditions( + withNamespaceConditionStatus(Failed), + withNamespaceConditionType(NamespaceReady)) + + IsNamespaceConverged NamespaceConditionFunc = checkNamespaceConditions( + withNamespaceConditionStatus(Complete), + withNamespaceConditionType(NamespaceInit), + withNamespaceConditionType(NamespaceCreate), + withNamespaceConditionType(NamespacePostCreate), + ) + + IsNamespaceConvergeFailed NamespaceConditionFunc = checkNamespaceConditions( + withNamespaceConditionStatus(Failed), + withNamespaceConditionType(NamespaceInit), + withNamespaceConditionType(NamespaceCreate), + withNamespaceConditionType(NamespacePostCreate), + withNamespaceConditionShortCircuit(), + ) +) + +// exported task condition utils +var ( + IsTaskUpserted TaskConditionFunc = checkTaskConditions( + withTaskConditionStatus(Complete), + withTaskConditionType(TaskUpsert)) + + IsTaskInited TaskConditionFunc = checkTaskConditions( + withTaskConditionStatus(Complete), + withTaskConditionType(TaskInit)) + + IsTaskletCreated TaskConditionFunc = checkTaskConditions( + withTaskConditionStatus(Complete), + withTaskConditionType(TaskletCreate)) + + IsTaskPreDeleted TaskConditionFunc = checkTaskConditions( + withTaskConditionStatus(Complete), + withTaskConditionType(TaskPreDelete)) + + IsTaskReady TaskConditionFunc = checkTaskConditions( + withTaskConditionStatus(Complete), + withTaskConditionType(TaskReady)) + + IsTaskFailed TaskConditionFunc = checkTaskConditions( + withTaskConditionStatus(Failed), + withTaskConditionType(TaskInit), + withTaskConditionType(TaskletCreate), + withTaskConditionType(TaskReady), + withTaskConditionShortCircuit(), + ) + + IsTaskConverged TaskConditionFunc = checkTaskConditions( + withTaskConditionStatus(Complete), + withTaskConditionType(TaskInit), + withTaskConditionType(TaskletCreate), + ) + + IsTaskConvergeFailed TaskConditionFunc = checkTaskConditions( + withTaskConditionStatus(Failed), + withTaskConditionType(TaskInit), + withTaskConditionType(TaskletCreate), + withTaskConditionShortCircuit(), + ) +) + +// exported tasklet utils +var ( + IsTaskletUpserted TaskletConditionFunc = checkTaskletConditions( + withTaskletConditionStatus(Complete), + withTaskletConditionType(TaskletUpsert)) + + IsTaskletInited TaskletConditionFunc = checkTaskletConditions( + withTaskletConditionStatus(Complete), + withTaskletConditionType(TaskletInit)) + + IsTaskletInstalled TaskletConditionFunc = checkTaskletConditions( + withTaskletConditionStatus(Complete), + withTaskletConditionType(TaskletInstall)) + + IsTaskletPostInstalled TaskletConditionFunc = checkTaskletConditions( + withTaskletConditionStatus(Complete), + withTaskletConditionType(TaskletPostInstall)) + + IsTaskletPreDeleted TaskletConditionFunc = checkTaskletConditions( + withTaskletConditionStatus(Complete), + withTaskletConditionType(TaskletPreDelete)) + + IsTaskletReady TaskletConditionFunc = checkTaskletConditions( + withTaskletConditionStatus(Complete), + withTaskletConditionType(TaskletReady)) + + IsTaskletFailed TaskletConditionFunc = checkTaskletConditions( + withTaskletConditionStatus(Failed), + withTaskletConditionType(TaskletInit), + withTaskletConditionType(TaskletInstall), + withTaskletConditionType(TaskletPostInstall), + withTaskletConditionType(TaskletReady), + withTaskletConditionShortCircuit(), + ) +) diff --git a/components/common/proto/types/controller/conditions_util_test.go b/components/common/proto/types/controller/conditions_util_test.go new file mode 100644 index 0000000..d4eb9cb --- /dev/null +++ b/components/common/proto/types/controller/conditions_util_test.go @@ -0,0 +1,107 @@ +package controller + +import ( + "testing" +) + +func TestCheckNamespaceConditions(t *testing.T) { + namespaceConditionChecker := checkNamespaceConditions( + withNamespaceConditionStatus(Complete), + withNamespaceConditionType(NamespaceInit), + withNamespaceConditionType(NamespaceCreate), + ) + + n := new(Namespace) + n.Status.Conditions = append(n.Status.Conditions, NewNamespaceCreate(Complete, "test"), NewNamespaceInit(Failed, "test")) + + if namespaceConditionChecker(n) { + t.Error("expeted false") + } + + namespaceConditionChecker = checkNamespaceConditions( + withNamespaceConditionStatus(Complete), + withNamespaceConditionType(NamespaceInit), + withNamespaceConditionType(NamespaceCreate), + withNamespaceConditionShortCircuit(), + ) + + if !namespaceConditionChecker(n) { + t.Error("expeted true") + } + + n = new(Namespace) + n.Status.Conditions = append(n.Status.Conditions, NewNamespaceCreate(Complete, "test"), NewNamespaceInit(Complete, "test")) + + if !namespaceConditionChecker(n) { + t.Error("expeted true") + } + +} + +func TestCheckTaskConditions(t *testing.T) { + taskConditionChecker := checkTaskConditions( + withTaskConditionStatus(Complete), + withTaskConditionType(TaskInit), + withTaskConditionType(TaskletCreate), + ) + + task := new(Task) + task.Status.Conditions = append(task.Status.Conditions, NewTaskInit(Complete, "test"), NewTaskletCreate(Failed, "test")) + + if taskConditionChecker(task) { + t.Error("expeted false") + } + + taskConditionChecker = checkTaskConditions( + withTaskConditionStatus(Complete), + withTaskConditionType(TaskInit), + withTaskConditionType(TaskletCreate), + withTaskConditionShortCircuit(), + ) + + if !taskConditionChecker(task) { + t.Error("expeted true") + } + + task = new(Task) + task.Status.Conditions = append(task.Status.Conditions, NewTaskInit(Complete, "test"), NewTaskletCreate(Complete, "test")) + + if !taskConditionChecker(task) { + t.Error("expeted true") + } + +} + +func TestCheckTaskletConditions(t *testing.T) { + taskletConditionChecker := checkTaskletConditions( + withTaskletConditionStatus(Complete), + withTaskletConditionType(TaskletInit), + withTaskletConditionType(TaskletInstall), + ) + + tasklet := new(Tasklet) + tasklet.Status.Conditions = append(tasklet.Status.Conditions, NewTaskletInit(Complete, "test"), NewTaskletInstall(Failed, "test")) + + if taskletConditionChecker(tasklet) { + t.Error("expeted false") + } + + taskletConditionChecker = checkTaskletConditions( + withTaskletConditionStatus(Complete), + withTaskletConditionType(TaskletInit), + withTaskletConditionType(TaskletInstall), + withTaskletConditionShortCircuit(), + ) + + if !taskletConditionChecker(tasklet) { + t.Error("expeted true") + } + + tasklet = new(Tasklet) + tasklet.Status.Conditions = append(tasklet.Status.Conditions, NewTaskletInit(Complete, "test"), NewTaskletInit(Complete, "test")) + + if !taskletConditionChecker(tasklet) { + t.Error("expeted true") + } + +} diff --git a/components/common/proto/types/controller/const.go b/components/common/proto/types/controller/const.go new file mode 100644 index 0000000..a7e3b8d --- /dev/null +++ b/components/common/proto/types/controller/const.go @@ -0,0 +1,115 @@ +package controller + +const ( + // PreDeleteFinalizer is the finalizer for all cluster CRD pre delete + PreDeleteFinalizer = "cluster.rafay.dev.v2.predelete" + // OwnerRef is set if a kubernetes resource is owned by rafay cluster controllers + // this is used in place of k8s owner ref to enable managing namespaced/non namespaced + // resources across namespaces + OwnerRef = "rafay.dev/ownerRef" + + // PrunedSteps is the annotation describing steps pruned from the object + PrunedSteps = "rafay.dev/pruned" + + // OrignalConfig is the annotation which stores the last applied config (this is equivalent to kubectl last applied config) + // on an k8s resource + // this is used to caliculating 3 way merge patches + // Note: Rafay CRDs are not patched, they are updated and all the resouces created through them are patched + OrignalConfig = "rafay.dev/original" +) + +// StepOnFailed determines what should be done when execution of a step fails +// +kubebuilder:validation:Enum=StepBreak;StepContinue +type StepOnFailed string + +// StepObjectState is the state of the object described in the step +// +kubebuilder:validation:Enum=StepObjectNotCreated;StepObjectCreated;StepObjectFailed;StepObjectComplete +type StepObjectState string + +// StepJobState is the state of the job described in the step +// +kubebuilder:validation:Enum=StepJobNotCreated;StepJobCreated;StepJobFailed;StepJobComplete +type StepJobState string + +// StepState is the aggregate state of the step +// +kubebuilder:validation:Enum=StepNotExecuted;StepExecuted;StepFailed;StepComplete +type StepState string + +// ConditionStatus is the status of condition +// +kubebuilder:validation:Enum=Pending;InProgress;Configured;Complete;Failed +type ConditionStatus string + +// NamespaceConditionType is the condition type of namespace +// +kubebuilder:validation:Enum=NamespaceInit;NamespaceCreate;NamespacePostCreate;NamespacePreDelete;NamespaceReady +type NamespaceConditionType string + +// TaskConditionType is the condition type of task +// +kubebuilder:validation:Enum=TaskInit;TaskletCreate;TaskPreDelete;TaskReady +type TaskConditionType string + +// TaskletConditionType is the condition type of task +// +kubebuilder:validation:Enum=TaskletInit;TaskletInstall;TaskletPostInstall;TaskletPreDelete;TaskletReady +type TaskletConditionType string + +// NodeConditionType is the condition type of node +// +kubebuilder:validation:Enum=TaskletInit;TaskletInstall;TaskletPostInstall;TaskletPreDelete;TaskletReady +type NodeConditionType string + +// enum values types +const ( + StepBreak StepOnFailed = "StepBreak" + StepContinue StepOnFailed = "StepContinue" + + StepObjectNotCreated StepObjectState = "StepObjectNotCreated" + StepObjectCreated StepObjectState = "StepObjectCreated" + StepObjectFailed StepObjectState = "StepObjectFailed" + StepObjectComplete StepObjectState = "StepObjectComplete" + StepObjectRetry StepObjectState = "StepObjectRetry" + + StepJobNotCreated StepJobState = "StepJobNotCreated" + StepJobCreated StepJobState = "StepJobCreated" + StepJobFailed StepJobState = "StepJobFailed" + StepJobComplete StepJobState = "StepJobComplete" + + StepNotExecuted StepState = "StepNotExecuted" + StepExecuted StepState = "StepExecuted" + StepFailed StepState = "StepFailed" + StepComplete StepState = "StepComplete" + + Pending ConditionStatus = "Pending" + InProgress ConditionStatus = "InProgress" + Configured ConditionStatus = "Configured" + Complete ConditionStatus = "Complete" + Failed ConditionStatus = "Failed" + + NamespaceUpsert NamespaceConditionType = "NamespaceUpsert" + NamespaceInit NamespaceConditionType = "NamespaceInit" + NamespaceCreate NamespaceConditionType = "NamespaceCreate" + NamespacePostCreate NamespaceConditionType = "NamespacePostCreate" + NamespacePreDelete NamespaceConditionType = "NamespacePreDelete" + NamespaceReady NamespaceConditionType = "NamespaceReady" + + TaskUpsert TaskConditionType = "TaskUpsert" + TaskInit TaskConditionType = "TaskInit" + TaskletCreate TaskConditionType = "TaskletCreate" + TaskPreDelete TaskConditionType = "TaskPreDelete" + TaskReady TaskConditionType = "TaskReady" + + TaskletUpsert TaskletConditionType = "TaskletUpsert" + TaskletInit TaskletConditionType = "TaskletInit" + TaskletInstall TaskletConditionType = "TaskletInstall" + TaskletPostInstall TaskletConditionType = "TaskletPostInstall" + TaskletPreDelete TaskletConditionType = "TaskletPreDelete" + TaskletReady TaskletConditionType = "TaskletReady" + + // NodeReady means kubelet is healthy and ready to accept pods. + NodeReady NodeConditionType = "Ready" + // NodeOutOfDisk means the kubelet will not accept new pods due to insufficient free disk + // space on the node. + NodeOutOfDisk NodeConditionType = "OutOfDisk" + // NodeMemoryPressure means the kubelet is under pressure due to insufficient available memory. + NodeMemoryPressure NodeConditionType = "MemoryPressure" + // NodeDiskPressure means the kubelet is under pressure due to insufficient available disk. + NodeDiskPressure NodeConditionType = "DiskPressure" + // NodeNetworkUnavailable means that network for the node is not correctly configured. + NodeNetworkUnavailable NodeConditionType = "NetworkUnavailable" +) diff --git a/components/common/proto/types/controller/groupversion_info.go b/components/common/proto/types/controller/groupversion_info.go new file mode 100644 index 0000000..6f92238 --- /dev/null +++ b/components/common/proto/types/controller/groupversion_info.go @@ -0,0 +1,20 @@ +// Package v2 contains API Schema definitions for the cluster v2 API group +// +kubebuilder:object:generate=true +// +groupName=cluster.rafay.dev +package controller + +import ( + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/scheme" +) + +var ( + // GroupVersion is group version used to register these objects + GroupVersion = schema.GroupVersion{Group: "cluster.rafay.dev", Version: "v2"} + + // SchemeBuilder is used to add go types to the GroupVersionKind scheme + SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} + + // AddToScheme adds the types in this group-version to the given scheme. + AddToScheme = SchemeBuilder.AddToScheme +) diff --git a/components/common/proto/types/controller/init.go b/components/common/proto/types/controller/init.go new file mode 100644 index 0000000..b1db8d2 --- /dev/null +++ b/components/common/proto/types/controller/init.go @@ -0,0 +1,23 @@ +package controller + +/* +Copyright 2019 Rafay Systems Inc.. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +func init() { + SchemeBuilder.Register(&Task{}, &TaskList{}) + SchemeBuilder.Register(&Tasklet{}, &TaskletList{}) + SchemeBuilder.Register(&Namespace{}, &NamespaceList{}) +} diff --git a/components/common/proto/types/controller/stage.go b/components/common/proto/types/controller/stage.go new file mode 100644 index 0000000..ade4720 --- /dev/null +++ b/components/common/proto/types/controller/stage.go @@ -0,0 +1,7 @@ +package controller + +// StageSpec is a list of steps +type StageSpec = []StepTemplate + +// StageStatus is as list of step status +type StageStatus = []StepStatus diff --git a/components/common/proto/types/controller/step.go b/components/common/proto/types/controller/step.go new file mode 100644 index 0000000..6ed1534 --- /dev/null +++ b/components/common/proto/types/controller/step.go @@ -0,0 +1,34 @@ +package controller + +//jsoniter "github.com/json-iterator/go" +import ( + kjson "sigs.k8s.io/kustomize/pseudo/k8s/apimachinery/pkg/runtime/serializer/json" +) + +var ( + jsonAPI = kjson.CaseSensitiveJsonIterator() +) + +// UnmarshalJSON converts json to object +func (so *StepObject) UnmarshalJSON(b []byte) error { + so.Raw = b + return nil +} + +// MarshalJSON marshals step object into json +func (so *StepObject) MarshalJSON() ([]byte, error) { + return so.Raw, nil +} + +// Accessor returns accessor for the step object +func (so *StepObject) Accessor() (Accessor, error) { + return newAccessor(so.Raw) +} + +// GetStepOnFail returns on failed +func GetStepOnFail(t StepTemplate) StepOnFailed { + if t.OnFailed == "" { + return StepBreak + } + return StepOnFailed(t.OnFailed) +} diff --git a/components/common/proto/types/controller/step_test.go b/components/common/proto/types/controller/step_test.go new file mode 100644 index 0000000..44b7dc3 --- /dev/null +++ b/components/common/proto/types/controller/step_test.go @@ -0,0 +1,66 @@ +package controller + +import ( + "encoding/json" + "fmt" + "io/ioutil" + "os" + "testing" + + sjson "github.com/segmentio/encoding/json" + "sigs.k8s.io/yaml" +) + +func TestMarshalStepStatus(t *testing.T) { + s := StepStatus{ + Name: "default", + State: string(StepComplete), + } + + b, err := json.Marshal(&s) + if err != nil { + t.Error(err) + return + } + + var s1 StepStatus + err = jsonAPI.Unmarshal(b, &s1) + if err != nil { + t.Error(err) + return + } + t.Log(s1) +} + +func getJSONBytes(name string) []byte { + f, err := os.Open(fmt.Sprintf("testdata/%s", name)) + if err != nil { + panic(err) + } + + yb, err := ioutil.ReadAll(f) + if err != nil { + panic(err) + } + + jb, err := yaml.YAMLToJSON(yb) + if err != nil { + panic(err) + } + return jb +} + +func BenchmarkStepObjectJSONUnmarshal(b *testing.B) { + + jb := getJSONBytes("pod.yaml") + + for i := 0; i < b.N; i++ { + var so StepObject + err := sjson.Unmarshal(jb, &so) + if err != nil { + b.Error(err) + return + } + } + +} diff --git a/components/common/proto/types/controller/zz_generated.deepcopy.go b/components/common/proto/types/controller/zz_generated.deepcopy.go new file mode 100644 index 0000000..1464129 --- /dev/null +++ b/components/common/proto/types/controller/zz_generated.deepcopy.go @@ -0,0 +1,843 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Code generated by controller-gen. DO NOT EDIT. + +package controller + +import ( + "k8s.io/api/batch/v1beta1" + "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Namespace) DeepCopyInto(out *Namespace) { + *out = *in + in.state = out.state + if in.unknownFields != nil { + in, out := &in.unknownFields, &out.unknownFields + *out = make([]byte, len(*in)) + copy(*out, *in) + } + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.Spec != nil { + in, out := &in.Spec, &out.Spec + *out = new(NamespaceSpec) + (*in).DeepCopyInto(*out) + } + if in.Status != nil { + in, out := &in.Status, &out.Status + *out = new(NamespaceStatus) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Namespace. +func (in *Namespace) DeepCopy() *Namespace { + if in == nil { + return nil + } + out := new(Namespace) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Namespace) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NamespaceCondition) DeepCopyInto(out *NamespaceCondition) { + *out = *in + in.state = out.state + if in.unknownFields != nil { + in, out := &in.unknownFields, &out.unknownFields + *out = make([]byte, len(*in)) + copy(*out, *in) + } + if in.LastUpdateTime != nil { + in, out := &in.LastUpdateTime, &out.LastUpdateTime + *out = (*in).DeepCopy() + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamespaceCondition. +func (in *NamespaceCondition) DeepCopy() *NamespaceCondition { + if in == nil { + return nil + } + out := new(NamespaceCondition) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NamespaceList) DeepCopyInto(out *NamespaceList) { + *out = *in + in.state = out.state + if in.unknownFields != nil { + in, out := &in.unknownFields, &out.unknownFields + *out = make([]byte, len(*in)) + copy(*out, *in) + } + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]*Namespace, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(Namespace) + (*in).DeepCopyInto(*out) + } + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamespaceList. +func (in *NamespaceList) DeepCopy() *NamespaceList { + if in == nil { + return nil + } + out := new(NamespaceList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *NamespaceList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NamespaceSpec) DeepCopyInto(out *NamespaceSpec) { + *out = *in + in.state = out.state + if in.unknownFields != nil { + in, out := &in.unknownFields, &out.unknownFields + *out = make([]byte, len(*in)) + copy(*out, *in) + } + if in.Init != nil { + in, out := &in.Init, &out.Init + *out = make([]*StepTemplate, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(StepTemplate) + (*in).DeepCopyInto(*out) + } + } + } + if in.NamespaceMeta != nil { + in, out := &in.NamespaceMeta, &out.NamespaceMeta + *out = new(metav1.ObjectMeta) + (*in).DeepCopyInto(*out) + } + if in.PostCreate != nil { + in, out := &in.PostCreate, &out.PostCreate + *out = make([]*StepTemplate, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(StepTemplate) + (*in).DeepCopyInto(*out) + } + } + } + if in.PreDelete != nil { + in, out := &in.PreDelete, &out.PreDelete + *out = make([]*StepTemplate, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(StepTemplate) + (*in).DeepCopyInto(*out) + } + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamespaceSpec. +func (in *NamespaceSpec) DeepCopy() *NamespaceSpec { + if in == nil { + return nil + } + out := new(NamespaceSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NamespaceStatus) DeepCopyInto(out *NamespaceStatus) { + *out = *in + in.state = out.state + if in.unknownFields != nil { + in, out := &in.unknownFields, &out.unknownFields + *out = make([]byte, len(*in)) + copy(*out, *in) + } + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]*NamespaceCondition, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(NamespaceCondition) + (*in).DeepCopyInto(*out) + } + } + } + if in.Init != nil { + in, out := &in.Init, &out.Init + *out = make([]*StepStatus, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(StepStatus) + (*in).DeepCopyInto(*out) + } + } + } + if in.NamespaceRef != nil { + in, out := &in.NamespaceRef, &out.NamespaceRef + *out = new(v1.ObjectReference) + **out = **in + } + if in.PostCreate != nil { + in, out := &in.PostCreate, &out.PostCreate + *out = make([]*StepStatus, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(StepStatus) + (*in).DeepCopyInto(*out) + } + } + } + if in.PreDelete != nil { + in, out := &in.PreDelete, &out.PreDelete + *out = make([]*StepStatus, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(StepStatus) + (*in).DeepCopyInto(*out) + } + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamespaceStatus. +func (in *NamespaceStatus) DeepCopy() *NamespaceStatus { + if in == nil { + return nil + } + out := new(NamespaceStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StepObject) DeepCopyInto(out *StepObject) { + *out = *in + in.state = out.state + if in.unknownFields != nil { + in, out := &in.unknownFields, &out.unknownFields + *out = make([]byte, len(*in)) + copy(*out, *in) + } + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.Raw != nil { + in, out := &in.Raw, &out.Raw + *out = make([]byte, len(*in)) + copy(*out, *in) + } +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *StepObject) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StepObject. +func (in *StepObject) DeepCopy() *StepObject { + if in == nil { + return nil + } + out := new(StepObject) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StepStatus) DeepCopyInto(out *StepStatus) { + *out = *in + in.state = out.state + if in.unknownFields != nil { + in, out := &in.unknownFields, &out.unknownFields + *out = make([]byte, len(*in)) + copy(*out, *in) + } + if in.ObjectRef != nil { + in, out := &in.ObjectRef, &out.ObjectRef + *out = new(v1.ObjectReference) + **out = **in + } + if in.JobRef != nil { + in, out := &in.JobRef, &out.JobRef + *out = new(v1.ObjectReference) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StepStatus. +func (in *StepStatus) DeepCopy() *StepStatus { + if in == nil { + return nil + } + out := new(StepStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StepTemplate) DeepCopyInto(out *StepTemplate) { + *out = *in + in.state = out.state + if in.unknownFields != nil { + in, out := &in.unknownFields, &out.unknownFields + *out = make([]byte, len(*in)) + copy(*out, *in) + } + if in.Object != nil { + in, out := &in.Object, &out.Object + *out = new(StepObject) + (*in).DeepCopyInto(*out) + } + if in.JobTemplate != nil { + in, out := &in.JobTemplate, &out.JobTemplate + *out = new(v1beta1.JobTemplateSpec) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StepTemplate. +func (in *StepTemplate) DeepCopy() *StepTemplate { + if in == nil { + return nil + } + out := new(StepTemplate) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Task) DeepCopyInto(out *Task) { + *out = *in + in.state = out.state + if in.unknownFields != nil { + in, out := &in.unknownFields, &out.unknownFields + *out = make([]byte, len(*in)) + copy(*out, *in) + } + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.Spec != nil { + in, out := &in.Spec, &out.Spec + *out = new(TaskSpec) + (*in).DeepCopyInto(*out) + } + if in.Status != nil { + in, out := &in.Status, &out.Status + *out = new(TaskStatus) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Task. +func (in *Task) DeepCopy() *Task { + if in == nil { + return nil + } + out := new(Task) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Task) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TaskCondition) DeepCopyInto(out *TaskCondition) { + *out = *in + in.state = out.state + if in.unknownFields != nil { + in, out := &in.unknownFields, &out.unknownFields + *out = make([]byte, len(*in)) + copy(*out, *in) + } + if in.LastUpdateTime != nil { + in, out := &in.LastUpdateTime, &out.LastUpdateTime + *out = (*in).DeepCopy() + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskCondition. +func (in *TaskCondition) DeepCopy() *TaskCondition { + if in == nil { + return nil + } + out := new(TaskCondition) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TaskList) DeepCopyInto(out *TaskList) { + *out = *in + in.state = out.state + if in.unknownFields != nil { + in, out := &in.unknownFields, &out.unknownFields + *out = make([]byte, len(*in)) + copy(*out, *in) + } + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]*Task, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(Task) + (*in).DeepCopyInto(*out) + } + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskList. +func (in *TaskList) DeepCopy() *TaskList { + if in == nil { + return nil + } + out := new(TaskList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TaskList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TaskSpec) DeepCopyInto(out *TaskSpec) { + *out = *in + in.state = out.state + if in.unknownFields != nil { + in, out := &in.unknownFields, &out.unknownFields + *out = make([]byte, len(*in)) + copy(*out, *in) + } + if in.Init != nil { + in, out := &in.Init, &out.Init + *out = make([]*StepTemplate, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(StepTemplate) + (*in).DeepCopyInto(*out) + } + } + } + if in.Tasklet != nil { + in, out := &in.Tasklet, &out.Tasklet + *out = new(TaskletTemplate) + (*in).DeepCopyInto(*out) + } + if in.PreDelete != nil { + in, out := &in.PreDelete, &out.PreDelete + *out = make([]*StepTemplate, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(StepTemplate) + (*in).DeepCopyInto(*out) + } + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskSpec. +func (in *TaskSpec) DeepCopy() *TaskSpec { + if in == nil { + return nil + } + out := new(TaskSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TaskStatus) DeepCopyInto(out *TaskStatus) { + *out = *in + in.state = out.state + if in.unknownFields != nil { + in, out := &in.unknownFields, &out.unknownFields + *out = make([]byte, len(*in)) + copy(*out, *in) + } + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]*TaskCondition, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(TaskCondition) + (*in).DeepCopyInto(*out) + } + } + } + if in.Init != nil { + in, out := &in.Init, &out.Init + *out = make([]*StepStatus, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(StepStatus) + (*in).DeepCopyInto(*out) + } + } + } + if in.TaskletRef != nil { + in, out := &in.TaskletRef, &out.TaskletRef + *out = new(v1.ObjectReference) + **out = **in + } + if in.PreDelete != nil { + in, out := &in.PreDelete, &out.PreDelete + *out = make([]*StepStatus, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(StepStatus) + (*in).DeepCopyInto(*out) + } + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskStatus. +func (in *TaskStatus) DeepCopy() *TaskStatus { + if in == nil { + return nil + } + out := new(TaskStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Tasklet) DeepCopyInto(out *Tasklet) { + *out = *in + in.state = out.state + if in.unknownFields != nil { + in, out := &in.unknownFields, &out.unknownFields + *out = make([]byte, len(*in)) + copy(*out, *in) + } + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.Spec != nil { + in, out := &in.Spec, &out.Spec + *out = new(TaskletSpec) + (*in).DeepCopyInto(*out) + } + if in.Status != nil { + in, out := &in.Status, &out.Status + *out = new(TaskletStatus) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Tasklet. +func (in *Tasklet) DeepCopy() *Tasklet { + if in == nil { + return nil + } + out := new(Tasklet) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Tasklet) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TaskletCondition) DeepCopyInto(out *TaskletCondition) { + *out = *in + in.state = out.state + if in.unknownFields != nil { + in, out := &in.unknownFields, &out.unknownFields + *out = make([]byte, len(*in)) + copy(*out, *in) + } + if in.LastUpdateTime != nil { + in, out := &in.LastUpdateTime, &out.LastUpdateTime + *out = (*in).DeepCopy() + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskletCondition. +func (in *TaskletCondition) DeepCopy() *TaskletCondition { + if in == nil { + return nil + } + out := new(TaskletCondition) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TaskletList) DeepCopyInto(out *TaskletList) { + *out = *in + in.state = out.state + if in.unknownFields != nil { + in, out := &in.unknownFields, &out.unknownFields + *out = make([]byte, len(*in)) + copy(*out, *in) + } + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]*Tasklet, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(Tasklet) + (*in).DeepCopyInto(*out) + } + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskletList. +func (in *TaskletList) DeepCopy() *TaskletList { + if in == nil { + return nil + } + out := new(TaskletList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TaskletList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TaskletSpec) DeepCopyInto(out *TaskletSpec) { + *out = *in + in.state = out.state + if in.unknownFields != nil { + in, out := &in.unknownFields, &out.unknownFields + *out = make([]byte, len(*in)) + copy(*out, *in) + } + if in.Init != nil { + in, out := &in.Init, &out.Init + *out = make([]*StepTemplate, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(StepTemplate) + (*in).DeepCopyInto(*out) + } + } + } + if in.Install != nil { + in, out := &in.Install, &out.Install + *out = make([]*StepTemplate, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(StepTemplate) + (*in).DeepCopyInto(*out) + } + } + } + if in.PostInstall != nil { + in, out := &in.PostInstall, &out.PostInstall + *out = make([]*StepTemplate, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(StepTemplate) + (*in).DeepCopyInto(*out) + } + } + } + if in.PreDelete != nil { + in, out := &in.PreDelete, &out.PreDelete + *out = make([]*StepTemplate, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(StepTemplate) + (*in).DeepCopyInto(*out) + } + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskletSpec. +func (in *TaskletSpec) DeepCopy() *TaskletSpec { + if in == nil { + return nil + } + out := new(TaskletSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TaskletStatus) DeepCopyInto(out *TaskletStatus) { + *out = *in + in.state = out.state + if in.unknownFields != nil { + in, out := &in.unknownFields, &out.unknownFields + *out = make([]byte, len(*in)) + copy(*out, *in) + } + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]*TaskletCondition, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(TaskletCondition) + (*in).DeepCopyInto(*out) + } + } + } + if in.Init != nil { + in, out := &in.Init, &out.Init + *out = make([]*StepStatus, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(StepStatus) + (*in).DeepCopyInto(*out) + } + } + } + if in.Install != nil { + in, out := &in.Install, &out.Install + *out = make([]*StepStatus, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(StepStatus) + (*in).DeepCopyInto(*out) + } + } + } + if in.PostInstall != nil { + in, out := &in.PostInstall, &out.PostInstall + *out = make([]*StepStatus, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(StepStatus) + (*in).DeepCopyInto(*out) + } + } + } + if in.PreDelete != nil { + in, out := &in.PreDelete, &out.PreDelete + *out = make([]*StepStatus, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(StepStatus) + (*in).DeepCopyInto(*out) + } + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskletStatus. +func (in *TaskletStatus) DeepCopy() *TaskletStatus { + if in == nil { + return nil + } + out := new(TaskletStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TaskletTemplate) DeepCopyInto(out *TaskletTemplate) { + *out = *in + in.state = out.state + if in.unknownFields != nil { + in, out := &in.unknownFields, &out.unknownFields + *out = make([]byte, len(*in)) + copy(*out, *in) + } + if in.ObjectMeta != nil { + in, out := &in.ObjectMeta, &out.ObjectMeta + *out = new(metav1.ObjectMeta) + (*in).DeepCopyInto(*out) + } + if in.Spec != nil { + in, out := &in.Spec, &out.Spec + *out = new(TaskletSpec) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskletTemplate. +func (in *TaskletTemplate) DeepCopy() *TaskletTemplate { + if in == nil { + return nil + } + out := new(TaskletTemplate) + in.DeepCopyInto(out) + return out +} diff --git a/components/common/proto/types/infrapb/v3/cluster.pb.go b/components/common/proto/types/infrapb/v3/cluster.pb.go index 1fcc044..2978845 100644 --- a/components/common/proto/types/infrapb/v3/cluster.pb.go +++ b/components/common/proto/types/infrapb/v3/cluster.pb.go @@ -13,6 +13,7 @@ import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" + v1 "k8s.io/api/core/v1" reflect "reflect" sync "sync" ) @@ -76,11 +77,11 @@ func (ClusterNodeState) EnumDescriptor() ([]byte, []int) { type ClusterConditionType int32 const ( - ClusterConditionType_ClusterRegister ClusterConditionType = 0 + ClusterConditionType_ClusterBlueprintSync ClusterConditionType = 0 ClusterConditionType_ClusterApprove ClusterConditionType = 1 ClusterConditionType_ClusterCheckIn ClusterConditionType = 2 ClusterConditionType_ClusterNodeSync ClusterConditionType = 3 - ClusterConditionType_ClusterBlueprintSync ClusterConditionType = 4 + ClusterConditionType_ClusterRegister ClusterConditionType = 4 ClusterConditionType_ClusterNamespaceSync ClusterConditionType = 5 ClusterConditionType_ClusterReady ClusterConditionType = 6 ClusterConditionType_ClusterAuxiliaryTaskSync ClusterConditionType = 7 @@ -91,11 +92,11 @@ const ( // Enum value maps for ClusterConditionType. var ( ClusterConditionType_name = map[int32]string{ - 0: "ClusterRegister", + 0: "ClusterBlueprintSync", 1: "ClusterApprove", 2: "ClusterCheckIn", 3: "ClusterNodeSync", - 4: "ClusterBlueprintSync", + 4: "ClusterRegister", 5: "ClusterNamespaceSync", 6: "ClusterReady", 7: "ClusterAuxiliaryTaskSync", @@ -103,11 +104,11 @@ var ( 9: "ClusterDelete", } ClusterConditionType_value = map[string]int32{ - "ClusterRegister": 0, + "ClusterBlueprintSync": 0, "ClusterApprove": 1, "ClusterCheckIn": 2, "ClusterNodeSync": 3, - "ClusterBlueprintSync": 4, + "ClusterRegister": 4, "ClusterNamespaceSync": 5, "ClusterReady": 6, "ClusterAuxiliaryTaskSync": 7, @@ -995,7 +996,7 @@ type ClusterNodeSpec struct { unknownFields protoimpl.UnknownFields Unschedulable bool `protobuf:"varint,1,opt,name=unschedulable,proto3" json:"unschedulable,omitempty"` - Taints []*v3.Taint `protobuf:"bytes,2,rep,name=taints,proto3" json:"taints,omitempty"` + Taints []*v1.Taint `protobuf:"bytes,2,rep,name=taints,proto3" json:"taints,omitempty"` } func (x *ClusterNodeSpec) Reset() { @@ -1037,7 +1038,7 @@ func (x *ClusterNodeSpec) GetUnschedulable() bool { return false } -func (x *ClusterNodeSpec) GetTaints() []*v3.Taint { +func (x *ClusterNodeSpec) GetTaints() []*v1.Taint { if x != nil { return x.Taints } @@ -1050,8 +1051,8 @@ type ClusterNodeStatus struct { unknownFields protoimpl.UnknownFields State ClusterNodeState `protobuf:"varint,1,opt,name=state,proto3,enum=rafay.dev.types.infra.v3.ClusterNodeState" json:"state,omitempty"` - Conditions []*v3.NodeCondition `protobuf:"bytes,2,rep,name=conditions,proto3" json:"conditions,omitempty"` - NodeInfo *v3.NodeSystemInfo `protobuf:"bytes,3,opt,name=nodeInfo,proto3" json:"nodeInfo,omitempty"` + Conditions []*v1.NodeCondition `protobuf:"bytes,2,rep,name=conditions,proto3" json:"conditions,omitempty"` + NodeInfo *v1.NodeSystemInfo `protobuf:"bytes,3,opt,name=nodeInfo,proto3" json:"nodeInfo,omitempty"` Capacity *Resources `protobuf:"bytes,4,opt,name=capacity,proto3" json:"capacity,omitempty"` Allocatable *Resources `protobuf:"bytes,5,opt,name=allocatable,proto3" json:"allocatable,omitempty"` Allocated *Resources `protobuf:"bytes,6,opt,name=allocated,proto3" json:"allocated,omitempty"` @@ -1097,14 +1098,14 @@ func (x *ClusterNodeStatus) GetState() ClusterNodeState { return ClusterNodeState_ClusterNodeCreated } -func (x *ClusterNodeStatus) GetConditions() []*v3.NodeCondition { +func (x *ClusterNodeStatus) GetConditions() []*v1.NodeCondition { if x != nil { return x.Conditions } return nil } -func (x *ClusterNodeStatus) GetNodeInfo() *v3.NodeSystemInfo { +func (x *ClusterNodeStatus) GetNodeInfo() *v1.NodeSystemInfo { if x != nil { return x.NodeInfo } @@ -1241,7 +1242,7 @@ func (x *ClusterCondition) GetType() ClusterConditionType { if x != nil { return x.Type } - return ClusterConditionType_ClusterRegister + return ClusterConditionType_ClusterBlueprintSync } func (x *ClusterCondition) GetStatus() v3.RafayConditionStatus { @@ -1265,6 +1266,85 @@ func (x *ClusterCondition) GetReason() string { return "" } +type Location struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ApiVersion string `protobuf:"bytes,1,opt,name=apiVersion,proto3" json:"apiVersion,omitempty"` + Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"` + Metadata *v3.Metadata `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *Metro `protobuf:"bytes,4,opt,name=spec,proto3" json:"spec,omitempty"` + Status *v3.Status `protobuf:"bytes,5,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *Location) Reset() { + *x = Location{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_infrapb_v3_cluster_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Location) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Location) ProtoMessage() {} + +func (x *Location) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_infrapb_v3_cluster_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Location.ProtoReflect.Descriptor instead. +func (*Location) Descriptor() ([]byte, []int) { + return file_proto_types_infrapb_v3_cluster_proto_rawDescGZIP(), []int{12} +} + +func (x *Location) GetApiVersion() string { + if x != nil { + return x.ApiVersion + } + return "" +} + +func (x *Location) GetKind() string { + if x != nil { + return x.Kind + } + return "" +} + +func (x *Location) GetMetadata() *v3.Metadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *Location) GetSpec() *Metro { + if x != nil { + return x.Spec + } + return nil +} + +func (x *Location) GetStatus() *v3.Status { + if x != nil { + return x.Status + } + return nil +} + type Metro struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1285,7 +1365,7 @@ type Metro struct { func (x *Metro) Reset() { *x = Metro{} if protoimpl.UnsafeEnabled { - mi := &file_proto_types_infrapb_v3_cluster_proto_msgTypes[12] + mi := &file_proto_types_infrapb_v3_cluster_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1298,7 +1378,7 @@ func (x *Metro) String() string { func (*Metro) ProtoMessage() {} func (x *Metro) ProtoReflect() protoreflect.Message { - mi := &file_proto_types_infrapb_v3_cluster_proto_msgTypes[12] + mi := &file_proto_types_infrapb_v3_cluster_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1311,7 +1391,7 @@ func (x *Metro) ProtoReflect() protoreflect.Message { // Deprecated: Use Metro.ProtoReflect.Descriptor instead. func (*Metro) Descriptor() ([]byte, []int) { - return file_proto_types_infrapb_v3_cluster_proto_rawDescGZIP(), []int{12} + return file_proto_types_infrapb_v3_cluster_proto_rawDescGZIP(), []int{13} } func (x *Metro) GetId() string { @@ -1384,6 +1464,77 @@ func (x *Metro) GetStateCode() string { return "" } +type LocationList struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ApiVersion string `protobuf:"bytes,1,opt,name=apiVersion,proto3" json:"apiVersion,omitempty"` + Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"` + Metadata *v3.ListMetadata `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` + Items []*Metro `protobuf:"bytes,4,rep,name=items,proto3" json:"items,omitempty"` +} + +func (x *LocationList) Reset() { + *x = LocationList{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_infrapb_v3_cluster_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LocationList) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LocationList) ProtoMessage() {} + +func (x *LocationList) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_infrapb_v3_cluster_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LocationList.ProtoReflect.Descriptor instead. +func (*LocationList) Descriptor() ([]byte, []int) { + return file_proto_types_infrapb_v3_cluster_proto_rawDescGZIP(), []int{14} +} + +func (x *LocationList) GetApiVersion() string { + if x != nil { + return x.ApiVersion + } + return "" +} + +func (x *LocationList) GetKind() string { + if x != nil { + return x.Kind + } + return "" +} + +func (x *LocationList) GetMetadata() *v3.ListMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *LocationList) GetItems() []*Metro { + if x != nil { + return x.Items + } + return nil +} + type ProvisionParams struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1400,7 +1551,7 @@ type ProvisionParams struct { func (x *ProvisionParams) Reset() { *x = ProvisionParams{} if protoimpl.UnsafeEnabled { - mi := &file_proto_types_infrapb_v3_cluster_proto_msgTypes[13] + mi := &file_proto_types_infrapb_v3_cluster_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1413,7 +1564,7 @@ func (x *ProvisionParams) String() string { func (*ProvisionParams) ProtoMessage() {} func (x *ProvisionParams) ProtoReflect() protoreflect.Message { - mi := &file_proto_types_infrapb_v3_cluster_proto_msgTypes[13] + mi := &file_proto_types_infrapb_v3_cluster_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1426,7 +1577,7 @@ func (x *ProvisionParams) ProtoReflect() protoreflect.Message { // Deprecated: Use ProvisionParams.ProtoReflect.Descriptor instead. func (*ProvisionParams) Descriptor() ([]byte, []int) { - return file_proto_types_infrapb_v3_cluster_proto_rawDescGZIP(), []int{13} + return file_proto_types_infrapb_v3_cluster_proto_rawDescGZIP(), []int{15} } func (x *ProvisionParams) GetEnvironmentProvider() string { @@ -1488,7 +1639,7 @@ type ProxyConfig struct { func (x *ProxyConfig) Reset() { *x = ProxyConfig{} if protoimpl.UnsafeEnabled { - mi := &file_proto_types_infrapb_v3_cluster_proto_msgTypes[14] + mi := &file_proto_types_infrapb_v3_cluster_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1501,7 +1652,7 @@ func (x *ProxyConfig) String() string { func (*ProxyConfig) ProtoMessage() {} func (x *ProxyConfig) ProtoReflect() protoreflect.Message { - mi := &file_proto_types_infrapb_v3_cluster_proto_msgTypes[14] + mi := &file_proto_types_infrapb_v3_cluster_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1514,7 +1665,7 @@ func (x *ProxyConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use ProxyConfig.ProtoReflect.Descriptor instead. func (*ProxyConfig) Descriptor() ([]byte, []int) { - return file_proto_types_infrapb_v3_cluster_proto_rawDescGZIP(), []int{14} + return file_proto_types_infrapb_v3_cluster_proto_rawDescGZIP(), []int{16} } func (x *ProxyConfig) GetHttpProxy() string { @@ -1577,7 +1728,7 @@ type ClusterTokenSpec struct { func (x *ClusterTokenSpec) Reset() { *x = ClusterTokenSpec{} if protoimpl.UnsafeEnabled { - mi := &file_proto_types_infrapb_v3_cluster_proto_msgTypes[15] + mi := &file_proto_types_infrapb_v3_cluster_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1590,7 +1741,7 @@ func (x *ClusterTokenSpec) String() string { func (*ClusterTokenSpec) ProtoMessage() {} func (x *ClusterTokenSpec) ProtoReflect() protoreflect.Message { - mi := &file_proto_types_infrapb_v3_cluster_proto_msgTypes[15] + mi := &file_proto_types_infrapb_v3_cluster_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1603,7 +1754,7 @@ func (x *ClusterTokenSpec) ProtoReflect() protoreflect.Message { // Deprecated: Use ClusterTokenSpec.ProtoReflect.Descriptor instead. func (*ClusterTokenSpec) Descriptor() ([]byte, []int) { - return file_proto_types_infrapb_v3_cluster_proto_rawDescGZIP(), []int{15} + return file_proto_types_infrapb_v3_cluster_proto_rawDescGZIP(), []int{17} } func (x *ClusterTokenSpec) GetTokenType() ClusterTokenType { @@ -1624,7 +1775,7 @@ type ClusterTokenStatus struct { func (x *ClusterTokenStatus) Reset() { *x = ClusterTokenStatus{} if protoimpl.UnsafeEnabled { - mi := &file_proto_types_infrapb_v3_cluster_proto_msgTypes[16] + mi := &file_proto_types_infrapb_v3_cluster_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1637,7 +1788,7 @@ func (x *ClusterTokenStatus) String() string { func (*ClusterTokenStatus) ProtoMessage() {} func (x *ClusterTokenStatus) ProtoReflect() protoreflect.Message { - mi := &file_proto_types_infrapb_v3_cluster_proto_msgTypes[16] + mi := &file_proto_types_infrapb_v3_cluster_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1650,7 +1801,7 @@ func (x *ClusterTokenStatus) ProtoReflect() protoreflect.Message { // Deprecated: Use ClusterTokenStatus.ProtoReflect.Descriptor instead. func (*ClusterTokenStatus) Descriptor() ([]byte, []int) { - return file_proto_types_infrapb_v3_cluster_proto_rawDescGZIP(), []int{16} + return file_proto_types_infrapb_v3_cluster_proto_rawDescGZIP(), []int{18} } func (x *ClusterTokenStatus) GetState() ClusterTokenState { @@ -1675,7 +1826,7 @@ type ClusterToken struct { func (x *ClusterToken) Reset() { *x = ClusterToken{} if protoimpl.UnsafeEnabled { - mi := &file_proto_types_infrapb_v3_cluster_proto_msgTypes[17] + mi := &file_proto_types_infrapb_v3_cluster_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1688,7 +1839,7 @@ func (x *ClusterToken) String() string { func (*ClusterToken) ProtoMessage() {} func (x *ClusterToken) ProtoReflect() protoreflect.Message { - mi := &file_proto_types_infrapb_v3_cluster_proto_msgTypes[17] + mi := &file_proto_types_infrapb_v3_cluster_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1701,7 +1852,7 @@ func (x *ClusterToken) ProtoReflect() protoreflect.Message { // Deprecated: Use ClusterToken.ProtoReflect.Descriptor instead. func (*ClusterToken) Descriptor() ([]byte, []int) { - return file_proto_types_infrapb_v3_cluster_proto_rawDescGZIP(), []int{17} + return file_proto_types_infrapb_v3_cluster_proto_rawDescGZIP(), []int{19} } func (x *ClusterToken) GetApiVersion() string { @@ -1739,6 +1890,69 @@ func (x *ClusterToken) GetStatus() *ClusterTokenStatus { return nil } +type NameHash struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Hash string `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"` + Deleting bool `protobuf:"varint,3,opt,name=deleting,proto3" json:"deleting,omitempty"` +} + +func (x *NameHash) Reset() { + *x = NameHash{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_infrapb_v3_cluster_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NameHash) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NameHash) ProtoMessage() {} + +func (x *NameHash) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_infrapb_v3_cluster_proto_msgTypes[20] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NameHash.ProtoReflect.Descriptor instead. +func (*NameHash) Descriptor() ([]byte, []int) { + return file_proto_types_infrapb_v3_cluster_proto_rawDescGZIP(), []int{20} +} + +func (x *NameHash) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *NameHash) GetHash() string { + if x != nil { + return x.Hash + } + return "" +} + +func (x *NameHash) GetDeleting() bool { + if x != nil { + return x.Deleting + } + return false +} + var File_proto_types_infrapb_v3_cluster_proto protoreflect.FileDescriptor var file_proto_types_infrapb_v3_cluster_proto_rawDesc = []byte{ @@ -1750,13 +1964,13 @@ var file_proto_types_infrapb_v3_cluster_proto_rawDesc = []byte{ 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x70, 0x62, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, - 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, - 0x79, 0x70, 0x65, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x70, 0x62, 0x2f, 0x76, 0x33, - 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, - 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, - 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, + 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x6b, + 0x38, 0x73, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, + 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x96, 0x04, 0x0a, 0x07, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x64, 0x0a, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x44, 0x92, 0x41, 0x41, 0x2a, 0x0b, 0x41, 0x50, 0x49, 0x20, 0x56, 0x65, 0x72, 0x73, @@ -2007,298 +2221,361 @@ var file_proto_types_infrapb_v3_cluster_proto_rawDesc = []byte{ 0x79, 0x70, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0xd0, 0xde, 0x1f, 0x01, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x22, 0x8b, 0x01, 0x0a, 0x0f, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x6f, 0x64, + 0x73, 0x22, 0x84, 0x01, 0x0a, 0x0f, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x70, 0x65, 0x63, 0x12, 0x24, 0x0a, 0x0d, 0x75, 0x6e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x75, 0x6e, - 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x52, 0x0a, 0x06, 0x74, - 0x61, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x72, 0x61, - 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x61, 0x69, 0x6e, 0x74, 0x42, 0x18, 0xc8, - 0xde, 0x1f, 0x00, 0xea, 0xde, 0x1f, 0x10, 0x74, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x2c, 0x6f, 0x6d, - 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x06, 0x74, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x22, - 0xab, 0x04, 0x0a, 0x11, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x40, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, - 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2e, 0x76, 0x33, 0x2e, - 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x4e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x64, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x72, 0x61, - 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x64, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0a, 0x63, 0x6f, 0x6e, - 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x45, 0x0a, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x49, - 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x72, 0x61, 0x66, 0x61, - 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, - 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, - 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3f, - 0x0a, 0x08, 0x63, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x23, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, - 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x08, 0x63, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x12, - 0x45, 0x0a, 0x0b, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x05, + 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x4b, 0x0a, 0x06, 0x74, + 0x61, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6b, 0x38, + 0x73, 0x2e, 0x69, 0x6f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x54, 0x61, 0x69, 0x6e, 0x74, 0x42, 0x18, 0xc8, 0xde, 0x1f, 0x00, 0xea, 0xde, 0x1f, 0x10, + 0x74, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, + 0x52, 0x06, 0x74, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x22, 0x9d, 0x04, 0x0a, 0x11, 0x43, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x40, + 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, + 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, + 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, + 0x12, 0x47, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6b, 0x38, 0x73, 0x2e, 0x69, 0x6f, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6f, + 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0a, 0x63, + 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3e, 0x0a, 0x08, 0x6e, 0x6f, 0x64, + 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6b, 0x38, + 0x73, 0x2e, 0x69, 0x6f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3f, 0x0a, 0x08, 0x63, 0x61, 0x70, + 0x61, 0x63, 0x69, 0x74, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x72, 0x61, + 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x69, 0x6e, + 0x66, 0x72, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, + 0x52, 0x08, 0x63, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x12, 0x45, 0x0a, 0x0b, 0x61, 0x6c, + 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x23, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x73, 0x52, 0x0b, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x61, 0x62, 0x6c, + 0x65, 0x12, 0x41, 0x0a, 0x09, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2e, 0x76, 0x33, 0x2e, - 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x0b, 0x61, 0x6c, 0x6c, 0x6f, 0x63, - 0x61, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x41, 0x0a, 0x09, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x61, - 0x74, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x72, 0x61, 0x66, 0x61, - 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x66, 0x72, - 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x09, - 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x72, 0x0a, 0x03, 0x69, 0x70, 0x73, - 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, - 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2e, 0x76, - 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x50, 0x42, - 0x37, 0xc8, 0xde, 0x1f, 0x00, 0xf2, 0xde, 0x1f, 0x2f, 0x70, 0x61, 0x74, 0x63, 0x68, 0x53, 0x74, - 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x3a, 0x22, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x22, 0x20, 0x70, - 0x61, 0x74, 0x63, 0x68, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x4b, 0x65, 0x79, 0x3a, 0x22, 0x70, 0x72, - 0x69, 0x76, 0x61, 0x74, 0x65, 0x49, 0x50, 0x22, 0x52, 0x03, 0x69, 0x70, 0x73, 0x22, 0x58, 0x0a, - 0x0d, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x50, 0x12, 0x2b, - 0x0a, 0x09, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x49, 0x50, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x0d, 0xea, 0xde, 0x1f, 0x09, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x49, 0x50, - 0x52, 0x09, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x49, 0x50, 0x12, 0x1a, 0x0a, 0x08, 0x70, - 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x50, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, - 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x50, 0x22, 0xf5, 0x03, 0x0a, 0x10, 0x43, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x7e, 0x0a, 0x04, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2e, 0x2e, 0x72, 0x61, 0x66, - 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x66, - 0x72, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, - 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x42, 0x3a, 0x92, 0x41, 0x37, 0x2a, - 0x13, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x20, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x32, 0x20, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x20, 0x73, - 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x85, 0x01, 0x0a, - 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, - 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, - 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x66, 0x61, 0x79, 0x43, - 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x3c, - 0x92, 0x41, 0x39, 0x2a, 0x18, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6e, - 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x32, 0x1d, 0x43, - 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x20, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x20, 0x6f, 0x66, - 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x06, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x12, 0x81, 0x01, 0x0a, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x43, 0x92, 0x41, 0x40, 0x2a, 0x1e, 0x43, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x20, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6c, - 0x61, 0x73, 0x74, 0x20, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x32, 0x1e, 0x43, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x20, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6c, - 0x61, 0x73, 0x74, 0x20, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x52, 0x0b, 0x6c, 0x61, 0x73, - 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x12, 0x55, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, - 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x3d, 0x92, 0x41, 0x3a, 0x2a, 0x1b, 0x52, - 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x20, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0x1b, 0x52, 0x65, 0x61, 0x73, - 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x20, 0x63, 0x6f, - 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x22, - 0xa8, 0x05, 0x0a, 0x05, 0x4d, 0x65, 0x74, 0x72, 0x6f, 0x12, 0x3f, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2f, 0x92, 0x41, 0x2c, 0x2a, 0x0e, 0x49, 0x44, 0x20, 0x6f, - 0x66, 0x20, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0x1a, 0x49, 0x44, 0x20, 0x4c, - 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3a, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x26, 0x92, 0x41, 0x23, 0x2a, 0x08, 0x4c, - 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0x17, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x04, 0x63, 0x69, 0x74, 0x79, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0x92, 0x41, 0x1e, 0x2a, 0x04, 0x43, 0x69, 0x74, 0x79, 0x32, - 0x14, 0x43, 0x69, 0x74, 0x79, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x6f, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x40, 0x01, 0x52, 0x04, 0x63, 0x69, 0x74, 0x79, 0x12, 0x39, 0x0a, - 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x23, 0x92, 0x41, - 0x20, 0x2a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x32, 0x15, 0x53, 0x74, 0x61, 0x74, 0x65, 0x20, - 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x40, - 0x01, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x41, 0x0a, 0x07, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x72, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x27, 0x92, 0x41, 0x24, 0x2a, 0x07, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x32, 0x17, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, - 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x40, 0x01, 0x52, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x3d, 0x0a, 0x06, 0x6c, - 0x6f, 0x63, 0x61, 0x6c, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x25, 0x92, 0x41, 0x22, - 0x2a, 0x06, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x65, 0x32, 0x16, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x65, - 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x40, 0x01, 0x52, 0x06, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x65, 0x12, 0x45, 0x0a, 0x08, 0x6c, 0x61, - 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0x92, 0x41, - 0x26, 0x2a, 0x08, 0x4c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x32, 0x18, 0x4c, 0x61, 0x74, - 0x69, 0x74, 0x75, 0x64, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x6f, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x40, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, - 0x65, 0x12, 0x49, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x08, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x2b, 0x92, 0x41, 0x28, 0x2a, 0x09, 0x4c, 0x6f, 0x6e, 0x67, 0x69, - 0x74, 0x75, 0x64, 0x65, 0x32, 0x19, 0x4c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x20, - 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x40, - 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x51, 0x0a, 0x0b, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x2f, 0x92, 0x41, 0x2c, 0x2a, 0x0b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x43, - 0x6f, 0x64, 0x65, 0x32, 0x1b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x43, 0x6f, 0x64, 0x65, - 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x40, 0x01, 0x52, 0x0b, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x12, - 0x49, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x0a, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x2b, 0x92, 0x41, 0x28, 0x2a, 0x09, 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x6f, - 0x64, 0x65, 0x32, 0x19, 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x20, 0x6f, 0x66, - 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x40, 0x01, 0x52, - 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x22, 0xa0, 0x04, 0x0a, 0x0f, 0x50, - 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x6f, - 0x0a, 0x13, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, - 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x3d, 0x92, 0x41, 0x3a, - 0x2a, 0x13, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, - 0x76, 0x69, 0x64, 0x65, 0x72, 0x32, 0x23, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, - 0x6e, 0x74, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x20, 0x6f, 0x66, 0x20, 0x74, - 0x68, 0x65, 0x20, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x13, 0x65, 0x6e, 0x76, 0x69, - 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, - 0x5c, 0x0a, 0x12, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x50, 0x72, 0x6f, - 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2c, 0x92, 0x41, 0x29, - 0x2a, 0x12, 0x4b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x76, - 0x69, 0x64, 0x65, 0x72, 0x32, 0x13, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, - 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x12, 0x6b, 0x75, 0x62, 0x65, 0x72, - 0x6e, 0x65, 0x74, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x64, 0x0a, - 0x14, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, - 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x30, 0x92, 0x41, 0x2d, - 0x2a, 0x14, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x76, 0x69, 0x72, - 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x32, 0x15, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, - 0x6e, 0x20, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x14, 0x70, - 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, - 0x65, 0x6e, 0x74, 0x12, 0x65, 0x0a, 0x14, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, - 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x31, 0x92, 0x41, 0x2e, 0x2a, 0x14, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, - 0x6e, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x32, 0x16, 0x70, 0x72, - 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x20, - 0x74, 0x79, 0x70, 0x65, 0x52, 0x14, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, - 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x48, 0x0a, 0x0d, 0x70, 0x72, - 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x22, 0x92, 0x41, 0x1f, 0x2a, 0x0d, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, - 0x6e, 0x54, 0x79, 0x70, 0x65, 0x32, 0x0e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, - 0x20, 0x74, 0x79, 0x70, 0x65, 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, - 0x54, 0x79, 0x70, 0x65, 0x12, 0x27, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x11, 0x92, 0x41, 0x0e, 0x2a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x32, - 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0xef, 0x03, - 0x0a, 0x0b, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x38, 0x0a, - 0x09, 0x68, 0x74, 0x74, 0x70, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x1a, 0x92, 0x41, 0x17, 0x2a, 0x09, 0x48, 0x74, 0x74, 0x70, 0x50, 0x72, 0x6f, 0x78, 0x79, - 0x32, 0x0a, 0x68, 0x74, 0x74, 0x70, 0x20, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x52, 0x09, 0x68, 0x74, - 0x74, 0x70, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x12, 0x3c, 0x0a, 0x0a, 0x68, 0x74, 0x74, 0x70, 0x73, - 0x50, 0x72, 0x6f, 0x78, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1c, 0x92, 0x41, 0x19, - 0x2a, 0x0a, 0x48, 0x74, 0x74, 0x70, 0x73, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x32, 0x0b, 0x68, 0x74, - 0x74, 0x70, 0x73, 0x20, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x52, 0x0a, 0x68, 0x74, 0x74, 0x70, 0x73, - 0x50, 0x72, 0x6f, 0x78, 0x79, 0x12, 0x2f, 0x0a, 0x07, 0x6e, 0x6f, 0x50, 0x72, 0x6f, 0x78, 0x79, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x15, 0x92, 0x41, 0x12, 0x2a, 0x07, 0x6e, 0x6f, 0x70, - 0x72, 0x6f, 0x78, 0x79, 0x32, 0x07, 0x6e, 0x6f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x52, 0x07, 0x6e, - 0x6f, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x12, 0x38, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x41, - 0x75, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1a, 0x92, 0x41, 0x17, 0x2a, 0x09, - 0x50, 0x72, 0x6f, 0x78, 0x79, 0x41, 0x75, 0x74, 0x68, 0x32, 0x0a, 0x70, 0x72, 0x6f, 0x78, 0x79, - 0x20, 0x61, 0x75, 0x74, 0x68, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x41, 0x75, 0x74, 0x68, - 0x12, 0x6d, 0x0a, 0x16, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x49, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x72, - 0x65, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, - 0x42, 0x35, 0x92, 0x41, 0x32, 0x2a, 0x16, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x49, 0x6e, 0x73, 0x65, - 0x63, 0x75, 0x72, 0x65, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x32, 0x18, 0x41, - 0x6c, 0x6c, 0x6f, 0x77, 0x20, 0x69, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x65, 0x20, 0x62, 0x6f, - 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x52, 0x16, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x49, 0x6e, - 0x73, 0x65, 0x63, 0x75, 0x72, 0x65, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x12, - 0x2f, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, - 0x42, 0x15, 0x92, 0x41, 0x12, 0x2a, 0x07, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x32, 0x07, - 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, - 0x12, 0x5d, 0x0a, 0x0b, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x43, 0x41, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x3b, 0x92, 0x41, 0x38, 0x2a, 0x0b, 0x42, 0x6f, 0x6f, 0x74, - 0x73, 0x74, 0x72, 0x61, 0x70, 0x43, 0x41, 0x32, 0x29, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, - 0x63, 0x61, 0x74, 0x65, 0x20, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x20, 0x6f, - 0x66, 0x20, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x20, 0x73, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x52, 0x0b, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x43, 0x41, 0x22, - 0x5c, 0x0a, 0x10, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x53, - 0x70, 0x65, 0x63, 0x12, 0x48, 0x0a, 0x09, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x54, 0x79, 0x70, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, - 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2e, 0x76, - 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x54, 0x79, - 0x70, 0x65, 0x52, 0x09, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x22, 0x57, 0x0a, - 0x12, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x12, 0x41, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, - 0x79, 0x70, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, - 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0xb5, 0x04, 0x0a, 0x0c, 0x43, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x64, 0x0a, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, + 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x09, 0x61, 0x6c, 0x6c, 0x6f, 0x63, + 0x61, 0x74, 0x65, 0x64, 0x12, 0x72, 0x0a, 0x03, 0x69, 0x70, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x27, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x50, 0x42, 0x37, 0xc8, 0xde, 0x1f, 0x00, + 0xf2, 0xde, 0x1f, 0x2f, 0x70, 0x61, 0x74, 0x63, 0x68, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, + 0x79, 0x3a, 0x22, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x22, 0x20, 0x70, 0x61, 0x74, 0x63, 0x68, 0x4d, + 0x65, 0x72, 0x67, 0x65, 0x4b, 0x65, 0x79, 0x3a, 0x22, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, + 0x49, 0x50, 0x22, 0x52, 0x03, 0x69, 0x70, 0x73, 0x22, 0x58, 0x0a, 0x0d, 0x43, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x50, 0x12, 0x2b, 0x0a, 0x09, 0x70, 0x72, 0x69, + 0x76, 0x61, 0x74, 0x65, 0x49, 0x50, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xea, 0xde, + 0x1f, 0x09, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x49, 0x50, 0x52, 0x09, 0x70, 0x72, 0x69, + 0x76, 0x61, 0x74, 0x65, 0x49, 0x50, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, + 0x49, 0x50, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, + 0x49, 0x50, 0x22, 0xf5, 0x03, 0x0a, 0x10, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, + 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x7e, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2e, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, + 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2e, 0x76, 0x33, + 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x54, 0x79, 0x70, 0x65, 0x42, 0x3a, 0x92, 0x41, 0x37, 0x2a, 0x13, 0x43, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x20, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, + 0x20, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x20, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x85, 0x01, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, + 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x66, 0x61, 0x79, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x3c, 0x92, 0x41, 0x39, 0x2a, 0x18, + 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x20, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x32, 0x1d, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, + 0x74, 0x20, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, + 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, + 0x81, 0x01, 0x0a, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x42, 0x43, 0x92, 0x41, 0x40, 0x2a, 0x1e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x20, + 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6c, 0x61, 0x73, 0x74, 0x20, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x32, 0x1e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x20, + 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6c, 0x61, 0x73, 0x74, 0x20, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x52, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x64, 0x12, 0x55, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x3d, 0x92, 0x41, 0x3a, 0x2a, 0x1b, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, + 0x20, 0x6f, 0x66, 0x20, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x20, 0x63, 0x6f, 0x6e, 0x64, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0x1b, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x20, 0x6f, 0x66, + 0x20, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x20, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x22, 0x94, 0x04, 0x0a, 0x08, 0x4c, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x64, 0x0a, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x44, 0x92, 0x41, 0x41, 0x2a, 0x0b, 0x41, 0x50, 0x49, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0x1b, 0x41, 0x50, 0x49, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, 0x13, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2e, 0x6b, 0x38, 0x73, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x69, 0x6f, 0x2f, 0x76, 0x33, 0x40, - 0x01, 0x52, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x3e, 0x0a, - 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2a, 0x92, 0x41, 0x27, + 0x01, 0x52, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x3f, 0x0a, + 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2b, 0x92, 0x41, 0x28, 0x2a, 0x04, 0x4b, 0x69, 0x6e, 0x64, 0x32, 0x14, 0x4b, 0x69, 0x6e, 0x64, 0x20, 0x6f, 0x66, 0x20, - 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, 0x07, 0x43, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x40, 0x01, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x68, 0x0a, - 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x23, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, - 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x42, 0x27, 0x92, 0x41, 0x24, 0x2a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x32, 0x18, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x20, 0x6f, 0x66, - 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x6d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x5f, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, + 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, 0x08, 0x4c, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x40, 0x01, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x68, + 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x23, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x27, 0x92, 0x41, 0x24, 0x2a, 0x08, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x32, 0x18, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x20, 0x6f, + 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, + 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x54, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, + 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2e, 0x76, + 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x6f, 0x42, 0x1f, 0x92, 0x41, 0x1c, 0x2a, 0x04, 0x53, 0x70, + 0x65, 0x63, 0x32, 0x14, 0x53, 0x70, 0x65, 0x63, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x60, + 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, + 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x42, 0x25, 0x92, 0x41, 0x22, 0x2a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x32, 0x16, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x40, 0x01, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x3a, 0x3f, 0x92, 0x41, 0x3c, 0x0a, 0x3a, 0x2a, 0x08, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x32, 0x08, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xd2, 0x01, 0x0a, 0x61, 0x70, + 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0xd2, 0x01, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0xd2, + 0x01, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xd2, 0x01, 0x04, 0x73, 0x70, 0x65, + 0x63, 0x22, 0xa8, 0x05, 0x0a, 0x05, 0x4d, 0x65, 0x74, 0x72, 0x6f, 0x12, 0x3f, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2f, 0x92, 0x41, 0x2c, 0x2a, 0x0e, 0x49, 0x44, + 0x20, 0x6f, 0x66, 0x20, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0x1a, 0x49, 0x44, + 0x20, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, + 0x20, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3a, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x26, 0x92, 0x41, 0x23, 0x2a, + 0x08, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0x17, 0x4c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x04, 0x63, 0x69, 0x74, 0x79, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0x92, 0x41, 0x1e, 0x2a, 0x04, 0x43, 0x69, 0x74, + 0x79, 0x32, 0x14, 0x43, 0x69, 0x74, 0x79, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x40, 0x01, 0x52, 0x04, 0x63, 0x69, 0x74, 0x79, 0x12, + 0x39, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x23, + 0x92, 0x41, 0x20, 0x2a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x32, 0x15, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x40, 0x01, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x41, 0x0a, 0x07, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x27, 0x92, 0x41, 0x24, + 0x2a, 0x07, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x32, 0x17, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x72, 0x79, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x40, 0x01, 0x52, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x3d, 0x0a, + 0x06, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x25, 0x92, + 0x41, 0x22, 0x2a, 0x06, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x65, 0x32, 0x16, 0x6c, 0x6f, 0x63, 0x61, + 0x6c, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x40, 0x01, 0x52, 0x06, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x65, 0x12, 0x45, 0x0a, 0x08, + 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, + 0x92, 0x41, 0x26, 0x2a, 0x08, 0x4c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x32, 0x18, 0x4c, + 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x40, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, + 0x75, 0x64, 0x65, 0x12, 0x49, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2b, 0x92, 0x41, 0x28, 0x2a, 0x09, 0x4c, 0x6f, 0x6e, + 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x32, 0x19, 0x4c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, + 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x40, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x51, + 0x0a, 0x0b, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x09, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x2f, 0x92, 0x41, 0x2c, 0x2a, 0x0b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, + 0x79, 0x43, 0x6f, 0x64, 0x65, 0x32, 0x1b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x43, 0x6f, + 0x64, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x40, 0x01, 0x52, 0x0b, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x43, 0x6f, 0x64, + 0x65, 0x12, 0x49, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x0a, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x2b, 0x92, 0x41, 0x28, 0x2a, 0x09, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x43, 0x6f, 0x64, 0x65, 0x32, 0x19, 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x20, + 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x40, + 0x01, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x22, 0x98, 0x03, 0x0a, + 0x0c, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x69, 0x0a, + 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x49, 0x92, 0x41, 0x46, 0x2a, 0x0b, 0x41, 0x50, 0x49, 0x20, 0x56, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x32, 0x20, 0x41, 0x50, 0x49, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, 0x13, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2e, 0x6b, 0x38, 0x73, + 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x69, 0x6f, 0x2f, 0x76, 0x33, 0x40, 0x01, 0x52, 0x0a, 0x61, 0x70, + 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x48, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x34, 0x92, 0x41, 0x31, 0x2a, 0x04, 0x4b, 0x69, 0x6e, + 0x64, 0x32, 0x19, 0x4b, 0x69, 0x6e, 0x64, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, + 0x69, 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, 0x0c, 0x4c, 0x6f, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x40, 0x01, 0x52, 0x04, 0x6b, 0x69, + 0x6e, 0x64, 0x12, 0x77, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, + 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x32, 0x92, + 0x41, 0x2f, 0x2a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x32, 0x1d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, + 0x65, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x40, + 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x5a, 0x0a, 0x05, 0x69, + 0x74, 0x65, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x72, 0x61, 0x66, + 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x66, + 0x72, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x6f, 0x42, 0x23, 0x92, 0x41, 0x20, + 0x2a, 0x05, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x32, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, + 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x40, 0x01, + 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x22, 0xa0, 0x04, 0x0a, 0x0f, 0x50, 0x72, 0x6f, 0x76, + 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x6f, 0x0a, 0x13, 0x65, + 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, + 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x3d, 0x92, 0x41, 0x3a, 0x2a, 0x13, 0x45, + 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, + 0x65, 0x72, 0x32, 0x23, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x20, + 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, + 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x13, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, + 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x5c, 0x0a, 0x12, + 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, + 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2c, 0x92, 0x41, 0x29, 0x2a, 0x12, 0x4b, + 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, + 0x72, 0x32, 0x13, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x20, 0x70, 0x72, + 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x12, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, + 0x65, 0x73, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x64, 0x0a, 0x14, 0x70, 0x72, + 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, + 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x30, 0x92, 0x41, 0x2d, 0x2a, 0x14, 0x50, + 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, + 0x65, 0x6e, 0x74, 0x32, 0x15, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x65, + 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x14, 0x70, 0x72, 0x6f, 0x76, + 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, + 0x12, 0x65, 0x0a, 0x14, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x63, + 0x6b, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, + 0x92, 0x41, 0x2e, 0x2a, 0x14, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x61, + 0x63, 0x6b, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x32, 0x16, 0x70, 0x72, 0x6f, 0x76, 0x69, + 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x20, 0x74, 0x79, 0x70, + 0x65, 0x52, 0x14, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x63, 0x6b, + 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x48, 0x0a, 0x0d, 0x70, 0x72, 0x6f, 0x76, 0x69, + 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x22, + 0x92, 0x41, 0x1f, 0x2a, 0x0d, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, + 0x70, 0x65, 0x32, 0x0e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x79, + 0x70, 0x65, 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x27, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x11, 0x92, 0x41, 0x0e, 0x2a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x32, 0x05, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0xef, 0x03, 0x0a, 0x0b, 0x50, + 0x72, 0x6f, 0x78, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x38, 0x0a, 0x09, 0x68, 0x74, + 0x74, 0x70, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1a, 0x92, + 0x41, 0x17, 0x2a, 0x09, 0x48, 0x74, 0x74, 0x70, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x32, 0x0a, 0x68, + 0x74, 0x74, 0x70, 0x20, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x52, 0x09, 0x68, 0x74, 0x74, 0x70, 0x50, + 0x72, 0x6f, 0x78, 0x79, 0x12, 0x3c, 0x0a, 0x0a, 0x68, 0x74, 0x74, 0x70, 0x73, 0x50, 0x72, 0x6f, + 0x78, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1c, 0x92, 0x41, 0x19, 0x2a, 0x0a, 0x48, + 0x74, 0x74, 0x70, 0x73, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x32, 0x0b, 0x68, 0x74, 0x74, 0x70, 0x73, + 0x20, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x52, 0x0a, 0x68, 0x74, 0x74, 0x70, 0x73, 0x50, 0x72, 0x6f, + 0x78, 0x79, 0x12, 0x2f, 0x0a, 0x07, 0x6e, 0x6f, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x15, 0x92, 0x41, 0x12, 0x2a, 0x07, 0x6e, 0x6f, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x32, 0x07, 0x6e, 0x6f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x52, 0x07, 0x6e, 0x6f, 0x50, 0x72, + 0x6f, 0x78, 0x79, 0x12, 0x38, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x41, 0x75, 0x74, 0x68, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1a, 0x92, 0x41, 0x17, 0x2a, 0x09, 0x50, 0x72, 0x6f, + 0x78, 0x79, 0x41, 0x75, 0x74, 0x68, 0x32, 0x0a, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x20, 0x61, 0x75, + 0x74, 0x68, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x41, 0x75, 0x74, 0x68, 0x12, 0x6d, 0x0a, + 0x16, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x49, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x65, 0x42, 0x6f, + 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x42, 0x35, 0x92, + 0x41, 0x32, 0x2a, 0x16, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x49, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x72, + 0x65, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x32, 0x18, 0x41, 0x6c, 0x6c, 0x6f, + 0x77, 0x20, 0x69, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x65, 0x20, 0x62, 0x6f, 0x6f, 0x74, 0x73, + 0x74, 0x72, 0x61, 0x70, 0x52, 0x16, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x49, 0x6e, 0x73, 0x65, 0x63, + 0x75, 0x72, 0x65, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x12, 0x2f, 0x0a, 0x07, + 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x42, 0x15, 0x92, + 0x41, 0x12, 0x2a, 0x07, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x32, 0x07, 0x65, 0x6e, 0x61, + 0x62, 0x6c, 0x65, 0x64, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x5d, 0x0a, + 0x0b, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x43, 0x41, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x3b, 0x92, 0x41, 0x38, 0x2a, 0x0b, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, + 0x61, 0x70, 0x43, 0x41, 0x32, 0x29, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, + 0x65, 0x20, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x20, 0x6f, 0x66, 0x20, 0x62, + 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x20, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, + 0x0b, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x43, 0x41, 0x22, 0x5c, 0x0a, 0x10, + 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x53, 0x70, 0x65, 0x63, + 0x12, 0x48, 0x0a, 0x09, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, + 0x09, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x22, 0x57, 0x0a, 0x12, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x41, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x2b, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x22, 0xb5, 0x04, 0x0a, 0x0c, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x64, 0x0a, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x44, 0x92, 0x41, 0x41, 0x2a, 0x0b, 0x41, + 0x50, 0x49, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0x1b, 0x41, 0x50, 0x49, 0x20, + 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, 0x13, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2e, 0x6b, + 0x38, 0x73, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x69, 0x6f, 0x2f, 0x76, 0x33, 0x40, 0x01, 0x52, 0x0a, + 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x3e, 0x0a, 0x04, 0x6b, 0x69, + 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2a, 0x92, 0x41, 0x27, 0x2a, 0x04, 0x4b, + 0x69, 0x6e, 0x64, 0x32, 0x14, 0x4b, 0x69, 0x6e, 0x64, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, + 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, 0x07, 0x43, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x40, 0x01, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x68, 0x0a, 0x08, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x72, + 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x42, 0x27, 0x92, 0x41, 0x24, 0x2a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x32, 0x18, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, + 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x12, 0x5f, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x53, 0x70, 0x65, 0x63, 0x42, 0x1f, + 0x92, 0x41, 0x1c, 0x2a, 0x04, 0x53, 0x70, 0x65, 0x63, 0x32, 0x14, 0x53, 0x70, 0x65, 0x63, 0x20, + 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, + 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x6b, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2e, 0x76, 0x33, - 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x53, 0x70, 0x65, - 0x63, 0x42, 0x1f, 0x92, 0x41, 0x1c, 0x2a, 0x04, 0x53, 0x70, 0x65, 0x63, 0x32, 0x14, 0x53, 0x70, - 0x65, 0x63, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x6b, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, - 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, - 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x25, 0x92, 0x41, 0x22, 0x2a, 0x06, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x32, 0x16, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, - 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x40, 0x01, 0x52, 0x06, 0x73, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x3a, 0x47, 0x92, 0x41, 0x44, 0x0a, 0x42, 0x2a, 0x0c, 0x43, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x32, 0x0c, 0x43, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0xd2, 0x01, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0xd2, 0x01, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0xd2, 0x01, 0x08, 0x6d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xd2, 0x01, 0x04, 0x73, 0x70, 0x65, 0x63, 0x2a, 0x5f, - 0x0a, 0x10, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x12, 0x16, 0x0a, 0x12, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x6f, 0x64, - 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x43, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x4e, 0x6f, 0x74, 0x52, 0x65, 0x61, 0x64, - 0x79, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x6f, - 0x64, 0x65, 0x52, 0x65, 0x61, 0x64, 0x79, 0x10, 0x02, 0x1a, 0x04, 0x88, 0xa3, 0x1e, 0x00, 0x2a, - 0x80, 0x02, 0x0a, 0x14, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x64, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x13, 0x0a, 0x0f, 0x43, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x10, 0x00, 0x12, 0x12, 0x0a, - 0x0e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x10, - 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x43, 0x68, 0x65, 0x63, - 0x6b, 0x49, 0x6e, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x79, 0x6e, 0x63, 0x10, 0x03, 0x12, 0x18, 0x0a, 0x14, 0x43, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x42, 0x6c, 0x75, 0x65, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x53, 0x79, - 0x6e, 0x63, 0x10, 0x04, 0x12, 0x18, 0x0a, 0x14, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, - 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x79, 0x6e, 0x63, 0x10, 0x05, 0x12, 0x10, - 0x0a, 0x0c, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x61, 0x64, 0x79, 0x10, 0x06, - 0x12, 0x1c, 0x0a, 0x18, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x41, 0x75, 0x78, 0x69, 0x6c, - 0x69, 0x61, 0x72, 0x79, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x79, 0x6e, 0x63, 0x10, 0x07, 0x12, 0x19, - 0x0a, 0x15, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, - 0x61, 0x70, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x10, 0x08, 0x12, 0x11, 0x0a, 0x0d, 0x43, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x10, 0x09, 0x1a, 0x04, 0x88, 0xa3, - 0x1e, 0x00, 0x2a, 0x49, 0x0a, 0x10, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x68, 0x61, - 0x72, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x53, 0x68, 0x61, 0x72, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x4e, 0x6f, 0x74, 0x53, 0x65, 0x74, - 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x4c, 0x4c, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x43, - 0x55, 0x53, 0x54, 0x4f, 0x4d, 0x10, 0x02, 0x1a, 0x04, 0x88, 0xa3, 0x1e, 0x00, 0x2a, 0x56, 0x0a, - 0x06, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x12, 0x0f, 0x0a, 0x0b, 0x45, 0x44, 0x47, 0x45, 0x5f, - 0x49, 0x47, 0x4e, 0x4f, 0x52, 0x45, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x45, 0x44, 0x47, 0x45, - 0x5f, 0x48, 0x45, 0x41, 0x4c, 0x54, 0x48, 0x59, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x45, 0x44, - 0x47, 0x45, 0x5f, 0x55, 0x4e, 0x48, 0x45, 0x41, 0x4c, 0x54, 0x48, 0x59, 0x10, 0x02, 0x12, 0x15, - 0x0a, 0x11, 0x45, 0x44, 0x47, 0x45, 0x5f, 0x44, 0x49, 0x53, 0x43, 0x4f, 0x4e, 0x4e, 0x45, 0x43, - 0x54, 0x45, 0x44, 0x10, 0x03, 0x2a, 0x2d, 0x0a, 0x10, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x19, 0x0a, 0x15, 0x43, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x54, 0x6f, 0x6b, - 0x65, 0x6e, 0x10, 0x00, 0x2a, 0x34, 0x0a, 0x11, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x54, - 0x6f, 0x6b, 0x65, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x6f, 0x6b, - 0x65, 0x6e, 0x4e, 0x6f, 0x74, 0x55, 0x73, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x54, - 0x6f, 0x6b, 0x65, 0x6e, 0x55, 0x73, 0x65, 0x64, 0x10, 0x01, 0x42, 0x87, 0x02, 0x0a, 0x1c, 0x63, - 0x6f, 0x6d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, - 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2e, 0x76, 0x33, 0x42, 0x0c, 0x43, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x54, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x61, 0x66, 0x61, 0x79, 0x53, 0x79, 0x73, - 0x74, 0x65, 0x6d, 0x73, 0x2f, 0x72, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x62, 0x61, 0x73, 0x65, - 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, - 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x69, - 0x6e, 0x66, 0x72, 0x61, 0x70, 0x62, 0x2f, 0x76, 0x33, 0x3b, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x76, - 0x33, 0xa2, 0x02, 0x04, 0x52, 0x44, 0x54, 0x49, 0xaa, 0x02, 0x18, 0x52, 0x61, 0x66, 0x61, 0x79, - 0x2e, 0x44, 0x65, 0x76, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x49, 0x6e, 0x66, 0x72, 0x61, - 0x2e, 0x56, 0x33, 0xca, 0x02, 0x18, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, - 0x54, 0x79, 0x70, 0x65, 0x73, 0x5c, 0x49, 0x6e, 0x66, 0x72, 0x61, 0x5c, 0x56, 0x33, 0xe2, 0x02, - 0x24, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x54, 0x79, 0x70, 0x65, 0x73, - 0x5c, 0x49, 0x6e, 0x66, 0x72, 0x61, 0x5c, 0x56, 0x33, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1c, 0x52, 0x61, 0x66, 0x61, 0x79, 0x3a, 0x3a, 0x44, - 0x65, 0x76, 0x3a, 0x3a, 0x54, 0x79, 0x70, 0x65, 0x73, 0x3a, 0x3a, 0x49, 0x6e, 0x66, 0x72, 0x61, - 0x3a, 0x3a, 0x56, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x42, 0x25, 0x92, 0x41, 0x22, 0x2a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x32, 0x16, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x40, 0x01, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x3a, 0x47, 0x92, 0x41, 0x44, 0x0a, 0x42, 0x2a, 0x0c, 0x43, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x32, 0x0c, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0xd2, 0x01, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0xd2, 0x01, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0xd2, 0x01, 0x08, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0xd2, 0x01, 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, 0x4e, 0x0a, 0x08, 0x4e, + 0x61, 0x6d, 0x65, 0x48, 0x61, 0x73, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x68, + 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, + 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x08, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x2a, 0x5f, 0x0a, 0x10, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, + 0x16, 0x0a, 0x12, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x64, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x43, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x4e, 0x6f, 0x74, 0x52, 0x65, 0x61, 0x64, 0x79, 0x10, 0x01, + 0x12, 0x14, 0x0a, 0x10, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x52, + 0x65, 0x61, 0x64, 0x79, 0x10, 0x02, 0x1a, 0x04, 0x88, 0xa3, 0x1e, 0x00, 0x2a, 0x80, 0x02, 0x0a, + 0x14, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x42, 0x6c, 0x75, 0x65, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x10, 0x00, 0x12, + 0x12, 0x0a, 0x0e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, + 0x65, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x43, 0x68, + 0x65, 0x63, 0x6b, 0x49, 0x6e, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x43, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x79, 0x6e, 0x63, 0x10, 0x03, 0x12, 0x13, 0x0a, 0x0f, + 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x10, + 0x04, 0x12, 0x18, 0x0a, 0x14, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x79, 0x6e, 0x63, 0x10, 0x05, 0x12, 0x10, 0x0a, 0x0c, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x61, 0x64, 0x79, 0x10, 0x06, 0x12, 0x1c, 0x0a, + 0x18, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x41, 0x75, 0x78, 0x69, 0x6c, 0x69, 0x61, 0x72, + 0x79, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x79, 0x6e, 0x63, 0x10, 0x07, 0x12, 0x19, 0x0a, 0x15, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x41, + 0x67, 0x65, 0x6e, 0x74, 0x10, 0x08, 0x12, 0x11, 0x0a, 0x0d, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x10, 0x09, 0x1a, 0x04, 0x88, 0xa3, 0x1e, 0x00, 0x2a, + 0x49, 0x0a, 0x10, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x68, 0x61, 0x72, 0x65, 0x4d, + 0x6f, 0x64, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x68, + 0x61, 0x72, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x4e, 0x6f, 0x74, 0x53, 0x65, 0x74, 0x10, 0x00, 0x12, + 0x07, 0x0a, 0x03, 0x41, 0x4c, 0x4c, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x55, 0x53, 0x54, + 0x4f, 0x4d, 0x10, 0x02, 0x1a, 0x04, 0x88, 0xa3, 0x1e, 0x00, 0x2a, 0x56, 0x0a, 0x06, 0x48, 0x65, + 0x61, 0x6c, 0x74, 0x68, 0x12, 0x0f, 0x0a, 0x0b, 0x45, 0x44, 0x47, 0x45, 0x5f, 0x49, 0x47, 0x4e, + 0x4f, 0x52, 0x45, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x45, 0x44, 0x47, 0x45, 0x5f, 0x48, 0x45, + 0x41, 0x4c, 0x54, 0x48, 0x59, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x45, 0x44, 0x47, 0x45, 0x5f, + 0x55, 0x4e, 0x48, 0x45, 0x41, 0x4c, 0x54, 0x48, 0x59, 0x10, 0x02, 0x12, 0x15, 0x0a, 0x11, 0x45, + 0x44, 0x47, 0x45, 0x5f, 0x44, 0x49, 0x53, 0x43, 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54, 0x45, 0x44, + 0x10, 0x03, 0x2a, 0x2d, 0x0a, 0x10, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x19, 0x0a, 0x15, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x10, + 0x00, 0x2a, 0x34, 0x0a, 0x11, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x4e, + 0x6f, 0x74, 0x55, 0x73, 0x65, 0x64, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x55, 0x73, 0x65, 0x64, 0x10, 0x01, 0x42, 0x87, 0x02, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x2e, + 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, + 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2e, 0x76, 0x33, 0x42, 0x0c, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x54, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x61, 0x66, 0x61, 0x79, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, + 0x73, 0x2f, 0x72, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x63, 0x6f, + 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x69, 0x6e, 0x66, 0x72, + 0x61, 0x70, 0x62, 0x2f, 0x76, 0x33, 0x3b, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x76, 0x33, 0xa2, 0x02, + 0x04, 0x52, 0x44, 0x54, 0x49, 0xaa, 0x02, 0x18, 0x52, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x44, 0x65, + 0x76, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x49, 0x6e, 0x66, 0x72, 0x61, 0x2e, 0x56, 0x33, + 0xca, 0x02, 0x18, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x54, 0x79, 0x70, + 0x65, 0x73, 0x5c, 0x49, 0x6e, 0x66, 0x72, 0x61, 0x5c, 0x56, 0x33, 0xe2, 0x02, 0x24, 0x52, 0x61, + 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x5c, 0x49, 0x6e, + 0x66, 0x72, 0x61, 0x5c, 0x56, 0x33, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0xea, 0x02, 0x1c, 0x52, 0x61, 0x66, 0x61, 0x79, 0x3a, 0x3a, 0x44, 0x65, 0x76, 0x3a, + 0x3a, 0x54, 0x79, 0x70, 0x65, 0x73, 0x3a, 0x3a, 0x49, 0x6e, 0x66, 0x72, 0x61, 0x3a, 0x3a, 0x56, + 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2314,7 +2591,7 @@ func file_proto_types_infrapb_v3_cluster_proto_rawDescGZIP() []byte { } var file_proto_types_infrapb_v3_cluster_proto_enumTypes = make([]protoimpl.EnumInfo, 6) -var file_proto_types_infrapb_v3_cluster_proto_msgTypes = make([]protoimpl.MessageInfo, 18) +var file_proto_types_infrapb_v3_cluster_proto_msgTypes = make([]protoimpl.MessageInfo, 21) var file_proto_types_infrapb_v3_cluster_proto_goTypes = []interface{}{ (ClusterNodeState)(0), // 0: rafay.dev.types.infra.v3.ClusterNodeState (ClusterConditionType)(0), // 1: rafay.dev.types.infra.v3.ClusterConditionType @@ -2334,61 +2611,69 @@ var file_proto_types_infrapb_v3_cluster_proto_goTypes = []interface{}{ (*ClusterNodeStatus)(nil), // 15: rafay.dev.types.infra.v3.ClusterNodeStatus (*ClusterNodeIP)(nil), // 16: rafay.dev.types.infra.v3.ClusterNodeIP (*ClusterCondition)(nil), // 17: rafay.dev.types.infra.v3.ClusterCondition - (*Metro)(nil), // 18: rafay.dev.types.infra.v3.Metro - (*ProvisionParams)(nil), // 19: rafay.dev.types.infra.v3.ProvisionParams - (*ProxyConfig)(nil), // 20: rafay.dev.types.infra.v3.ProxyConfig - (*ClusterTokenSpec)(nil), // 21: rafay.dev.types.infra.v3.ClusterTokenSpec - (*ClusterTokenStatus)(nil), // 22: rafay.dev.types.infra.v3.ClusterTokenStatus - (*ClusterToken)(nil), // 23: rafay.dev.types.infra.v3.ClusterToken - (*v3.Metadata)(nil), // 24: rafay.dev.types.common.v3.Metadata - (*v3.Status)(nil), // 25: rafay.dev.types.common.v3.Status - (*v3.ListMetadata)(nil), // 26: rafay.dev.types.common.v3.ListMetadata - (*v3.Taint)(nil), // 27: rafay.dev.types.common.v3.Taint - (*v3.NodeCondition)(nil), // 28: rafay.dev.types.common.v3.NodeCondition - (*v3.NodeSystemInfo)(nil), // 29: rafay.dev.types.common.v3.NodeSystemInfo - (v3.RafayConditionStatus)(0), // 30: rafay.dev.types.common.v3.RafayConditionStatus - (*timestamppb.Timestamp)(nil), // 31: google.protobuf.Timestamp + (*Location)(nil), // 18: rafay.dev.types.infra.v3.Location + (*Metro)(nil), // 19: rafay.dev.types.infra.v3.Metro + (*LocationList)(nil), // 20: rafay.dev.types.infra.v3.LocationList + (*ProvisionParams)(nil), // 21: rafay.dev.types.infra.v3.ProvisionParams + (*ProxyConfig)(nil), // 22: rafay.dev.types.infra.v3.ProxyConfig + (*ClusterTokenSpec)(nil), // 23: rafay.dev.types.infra.v3.ClusterTokenSpec + (*ClusterTokenStatus)(nil), // 24: rafay.dev.types.infra.v3.ClusterTokenStatus + (*ClusterToken)(nil), // 25: rafay.dev.types.infra.v3.ClusterToken + (*NameHash)(nil), // 26: rafay.dev.types.infra.v3.NameHash + (*v3.Metadata)(nil), // 27: rafay.dev.types.common.v3.Metadata + (*v3.Status)(nil), // 28: rafay.dev.types.common.v3.Status + (*v3.ListMetadata)(nil), // 29: rafay.dev.types.common.v3.ListMetadata + (*v1.Taint)(nil), // 30: k8s.io.api.core.v1.Taint + (*v1.NodeCondition)(nil), // 31: k8s.io.api.core.v1.NodeCondition + (*v1.NodeSystemInfo)(nil), // 32: k8s.io.api.core.v1.NodeSystemInfo + (v3.RafayConditionStatus)(0), // 33: rafay.dev.types.common.v3.RafayConditionStatus + (*timestamppb.Timestamp)(nil), // 34: google.protobuf.Timestamp } var file_proto_types_infrapb_v3_cluster_proto_depIdxs = []int32{ - 24, // 0: rafay.dev.types.infra.v3.Cluster.metadata:type_name -> rafay.dev.types.common.v3.Metadata + 27, // 0: rafay.dev.types.infra.v3.Cluster.metadata:type_name -> rafay.dev.types.common.v3.Metadata 8, // 1: rafay.dev.types.infra.v3.Cluster.spec:type_name -> rafay.dev.types.infra.v3.ClusterSpec - 25, // 2: rafay.dev.types.infra.v3.Cluster.status:type_name -> rafay.dev.types.common.v3.Status - 26, // 3: rafay.dev.types.infra.v3.ClusterList.metadata:type_name -> rafay.dev.types.common.v3.ListMetadata + 28, // 2: rafay.dev.types.infra.v3.Cluster.status:type_name -> rafay.dev.types.common.v3.Status + 29, // 3: rafay.dev.types.infra.v3.ClusterList.metadata:type_name -> rafay.dev.types.common.v3.ListMetadata 6, // 4: rafay.dev.types.infra.v3.ClusterList.items:type_name -> rafay.dev.types.infra.v3.Cluster - 18, // 5: rafay.dev.types.infra.v3.ClusterSpec.metro:type_name -> rafay.dev.types.infra.v3.Metro - 19, // 6: rafay.dev.types.infra.v3.ClusterSpec.params:type_name -> rafay.dev.types.infra.v3.ProvisionParams + 19, // 5: rafay.dev.types.infra.v3.ClusterSpec.metro:type_name -> rafay.dev.types.infra.v3.Metro + 21, // 6: rafay.dev.types.infra.v3.ClusterSpec.params:type_name -> rafay.dev.types.infra.v3.ProvisionParams 2, // 7: rafay.dev.types.infra.v3.ClusterSpec.shareMode:type_name -> rafay.dev.types.infra.v3.ClusterShareMode - 20, // 8: rafay.dev.types.infra.v3.ClusterSpec.proxyConfig:type_name -> rafay.dev.types.infra.v3.ProxyConfig + 22, // 8: rafay.dev.types.infra.v3.ClusterSpec.proxyConfig:type_name -> rafay.dev.types.infra.v3.ProxyConfig 9, // 9: rafay.dev.types.infra.v3.ClusterSpec.clusterData:type_name -> rafay.dev.types.infra.v3.ClusterData 3, // 10: rafay.dev.types.infra.v3.ClusterData.health:type_name -> rafay.dev.types.infra.v3.Health 13, // 11: rafay.dev.types.infra.v3.ClusterData.nodes:type_name -> rafay.dev.types.infra.v3.ClusterNode 12, // 12: rafay.dev.types.infra.v3.ClusterData.projects:type_name -> rafay.dev.types.infra.v3.ProjectCluster 10, // 13: rafay.dev.types.infra.v3.ClusterData.cluster_status:type_name -> rafay.dev.types.infra.v3.ClusterStatus 17, // 14: rafay.dev.types.infra.v3.ClusterStatus.conditions:type_name -> rafay.dev.types.infra.v3.ClusterCondition - 24, // 15: rafay.dev.types.infra.v3.ClusterNode.metadata:type_name -> rafay.dev.types.common.v3.Metadata + 27, // 15: rafay.dev.types.infra.v3.ClusterNode.metadata:type_name -> rafay.dev.types.common.v3.Metadata 14, // 16: rafay.dev.types.infra.v3.ClusterNode.spec:type_name -> rafay.dev.types.infra.v3.ClusterNodeSpec 15, // 17: rafay.dev.types.infra.v3.ClusterNode.status:type_name -> rafay.dev.types.infra.v3.ClusterNodeStatus - 27, // 18: rafay.dev.types.infra.v3.ClusterNodeSpec.taints:type_name -> rafay.dev.types.common.v3.Taint + 30, // 18: rafay.dev.types.infra.v3.ClusterNodeSpec.taints:type_name -> k8s.io.api.core.v1.Taint 0, // 19: rafay.dev.types.infra.v3.ClusterNodeStatus.state:type_name -> rafay.dev.types.infra.v3.ClusterNodeState - 28, // 20: rafay.dev.types.infra.v3.ClusterNodeStatus.conditions:type_name -> rafay.dev.types.common.v3.NodeCondition - 29, // 21: rafay.dev.types.infra.v3.ClusterNodeStatus.nodeInfo:type_name -> rafay.dev.types.common.v3.NodeSystemInfo + 31, // 20: rafay.dev.types.infra.v3.ClusterNodeStatus.conditions:type_name -> k8s.io.api.core.v1.NodeCondition + 32, // 21: rafay.dev.types.infra.v3.ClusterNodeStatus.nodeInfo:type_name -> k8s.io.api.core.v1.NodeSystemInfo 11, // 22: rafay.dev.types.infra.v3.ClusterNodeStatus.capacity:type_name -> rafay.dev.types.infra.v3.Resources 11, // 23: rafay.dev.types.infra.v3.ClusterNodeStatus.allocatable:type_name -> rafay.dev.types.infra.v3.Resources 11, // 24: rafay.dev.types.infra.v3.ClusterNodeStatus.allocated:type_name -> rafay.dev.types.infra.v3.Resources 16, // 25: rafay.dev.types.infra.v3.ClusterNodeStatus.ips:type_name -> rafay.dev.types.infra.v3.ClusterNodeIP 1, // 26: rafay.dev.types.infra.v3.ClusterCondition.type:type_name -> rafay.dev.types.infra.v3.ClusterConditionType - 30, // 27: rafay.dev.types.infra.v3.ClusterCondition.status:type_name -> rafay.dev.types.common.v3.RafayConditionStatus - 31, // 28: rafay.dev.types.infra.v3.ClusterCondition.lastUpdated:type_name -> google.protobuf.Timestamp - 4, // 29: rafay.dev.types.infra.v3.ClusterTokenSpec.tokenType:type_name -> rafay.dev.types.infra.v3.ClusterTokenType - 5, // 30: rafay.dev.types.infra.v3.ClusterTokenStatus.state:type_name -> rafay.dev.types.infra.v3.ClusterTokenState - 24, // 31: rafay.dev.types.infra.v3.ClusterToken.metadata:type_name -> rafay.dev.types.common.v3.Metadata - 21, // 32: rafay.dev.types.infra.v3.ClusterToken.spec:type_name -> rafay.dev.types.infra.v3.ClusterTokenSpec - 22, // 33: rafay.dev.types.infra.v3.ClusterToken.status:type_name -> rafay.dev.types.infra.v3.ClusterTokenStatus - 34, // [34:34] is the sub-list for method output_type - 34, // [34:34] is the sub-list for method input_type - 34, // [34:34] is the sub-list for extension type_name - 34, // [34:34] is the sub-list for extension extendee - 0, // [0:34] is the sub-list for field type_name + 33, // 27: rafay.dev.types.infra.v3.ClusterCondition.status:type_name -> rafay.dev.types.common.v3.RafayConditionStatus + 34, // 28: rafay.dev.types.infra.v3.ClusterCondition.lastUpdated:type_name -> google.protobuf.Timestamp + 27, // 29: rafay.dev.types.infra.v3.Location.metadata:type_name -> rafay.dev.types.common.v3.Metadata + 19, // 30: rafay.dev.types.infra.v3.Location.spec:type_name -> rafay.dev.types.infra.v3.Metro + 28, // 31: rafay.dev.types.infra.v3.Location.status:type_name -> rafay.dev.types.common.v3.Status + 29, // 32: rafay.dev.types.infra.v3.LocationList.metadata:type_name -> rafay.dev.types.common.v3.ListMetadata + 19, // 33: rafay.dev.types.infra.v3.LocationList.items:type_name -> rafay.dev.types.infra.v3.Metro + 4, // 34: rafay.dev.types.infra.v3.ClusterTokenSpec.tokenType:type_name -> rafay.dev.types.infra.v3.ClusterTokenType + 5, // 35: rafay.dev.types.infra.v3.ClusterTokenStatus.state:type_name -> rafay.dev.types.infra.v3.ClusterTokenState + 27, // 36: rafay.dev.types.infra.v3.ClusterToken.metadata:type_name -> rafay.dev.types.common.v3.Metadata + 23, // 37: rafay.dev.types.infra.v3.ClusterToken.spec:type_name -> rafay.dev.types.infra.v3.ClusterTokenSpec + 24, // 38: rafay.dev.types.infra.v3.ClusterToken.status:type_name -> rafay.dev.types.infra.v3.ClusterTokenStatus + 39, // [39:39] is the sub-list for method output_type + 39, // [39:39] is the sub-list for method input_type + 39, // [39:39] is the sub-list for extension type_name + 39, // [39:39] is the sub-list for extension extendee + 0, // [0:39] is the sub-list for field type_name } func init() { file_proto_types_infrapb_v3_cluster_proto_init() } @@ -2542,7 +2827,7 @@ func file_proto_types_infrapb_v3_cluster_proto_init() { } } file_proto_types_infrapb_v3_cluster_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Metro); i { + switch v := v.(*Location); i { case 0: return &v.state case 1: @@ -2554,7 +2839,7 @@ func file_proto_types_infrapb_v3_cluster_proto_init() { } } file_proto_types_infrapb_v3_cluster_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ProvisionParams); i { + switch v := v.(*Metro); i { case 0: return &v.state case 1: @@ -2566,7 +2851,7 @@ func file_proto_types_infrapb_v3_cluster_proto_init() { } } file_proto_types_infrapb_v3_cluster_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ProxyConfig); i { + switch v := v.(*LocationList); i { case 0: return &v.state case 1: @@ -2578,7 +2863,7 @@ func file_proto_types_infrapb_v3_cluster_proto_init() { } } file_proto_types_infrapb_v3_cluster_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ClusterTokenSpec); i { + switch v := v.(*ProvisionParams); i { case 0: return &v.state case 1: @@ -2590,7 +2875,7 @@ func file_proto_types_infrapb_v3_cluster_proto_init() { } } file_proto_types_infrapb_v3_cluster_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ClusterTokenStatus); i { + switch v := v.(*ProxyConfig); i { case 0: return &v.state case 1: @@ -2602,6 +2887,30 @@ func file_proto_types_infrapb_v3_cluster_proto_init() { } } file_proto_types_infrapb_v3_cluster_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ClusterTokenSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_infrapb_v3_cluster_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ClusterTokenStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_infrapb_v3_cluster_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ClusterToken); i { case 0: return &v.state @@ -2613,6 +2922,18 @@ func file_proto_types_infrapb_v3_cluster_proto_init() { return nil } } + file_proto_types_infrapb_v3_cluster_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NameHash); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -2620,7 +2941,7 @@ func file_proto_types_infrapb_v3_cluster_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_proto_types_infrapb_v3_cluster_proto_rawDesc, NumEnums: 6, - NumMessages: 18, + NumMessages: 21, NumExtensions: 0, NumServices: 0, }, diff --git a/components/common/proto/types/infrapb/v3/cluster.proto b/components/common/proto/types/infrapb/v3/cluster.proto index 18180de..300b56d 100644 --- a/components/common/proto/types/infrapb/v3/cluster.proto +++ b/components/common/proto/types/infrapb/v3/cluster.proto @@ -3,9 +3,9 @@ package rafay.dev.types.infra.v3; import "google/protobuf/timestamp.proto"; import "proto/types/commonpb/v3/common.proto"; -import "proto/types/commonpb/v3/kube.proto"; import "protoc-gen-openapiv2/options/annotations.proto"; import "gogoproto/gogo.proto"; +import "k8s.io/api/core/v1/generated.proto"; message Cluster { option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { @@ -248,7 +248,7 @@ message ClusterNode { message ClusterNodeSpec { bool unschedulable = 1; - repeated rafay.dev.types.common.v3.Taint taints = 2 [ + repeated k8s.io.api.core.v1.Taint taints = 2 [ (gogoproto.nullable) = false, (gogoproto.jsontag) = "taints,omitempty" ]; @@ -256,10 +256,10 @@ message ClusterNodeSpec { message ClusterNodeStatus { ClusterNodeState state = 1; - repeated rafay.dev.types.common.v3.NodeCondition conditions = 2 [ + repeated k8s.io.api.core.v1.NodeCondition conditions = 2 [ (gogoproto.nullable) = false ]; - rafay.dev.types.common.v3.NodeSystemInfo nodeInfo = 3; + k8s.io.api.core.v1.NodeSystemInfo nodeInfo = 3; Resources capacity = 4; Resources allocatable = 5; Resources allocated = 6; @@ -310,11 +310,11 @@ enum ClusterConditionType { // disable enum prefix option (gogoproto.goproto_enum_prefix) = false; - ClusterRegister = 0; + ClusterBlueprintSync = 0; ClusterApprove = 1; ClusterCheckIn = 2; ClusterNodeSync = 3; - ClusterBlueprintSync = 4; + ClusterRegister = 4; ClusterNamespaceSync = 5; ClusterReady = 6; ClusterAuxiliaryTaskSync = 7; @@ -338,6 +338,46 @@ enum Health { EDGE_DISCONNECTED = 3; } +message Location { + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { + json_schema : { + title : "Location" + description : "Location" + required : [ "apiVersion", "kind", "metadata", "spec" ] + } + }; + string apiVersion = 1 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "API Version", + description : "API Version of the resource" + default : "infra.k8smgmt.io/v3" + read_only : true + } ]; + string kind = 2 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Kind", + description : "Kind of the resource" + default : "Location" + read_only : true + } ]; + rafay.dev.types.common.v3.Metadata metadata = 3 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Metadata", + description : "Metadata of the resource" + } ]; + Metro spec = 4 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Spec", + description : "Spec of the resource" + } ]; + rafay.dev.types.common.v3.Status status = 5 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Status", + description : "Status of the resource" + read_only : true + } ]; + } + message Metro { string id = 1 [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { @@ -398,6 +438,35 @@ message Metro { read_only : true } ]; } + +message LocationList { + string apiVersion = 1 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "API Version", + description : "API Version of the list resource" + default : "infra.k8smgmt.io/v3" + read_only : true + } ]; + string kind = 2 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Kind", + description : "Kind of the list resource" + default : "LocationList" + read_only : true + } ]; + rafay.dev.types.common.v3.ListMetadata metadata = 3 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "ListMetadata", + description : "Metadata of the list resource" + read_only : true + } ]; + repeated Metro items = 4 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Items", + description : "List of the resources" + read_only : true + } ]; + } message ProvisionParams { string environmentProvider = 1 @@ -526,3 +595,9 @@ message ClusterToken { read_only : true } ]; } + +message NameHash { + string name = 1; + string hash = 2; + bool deleting = 3; + } diff --git a/components/common/proto/types/infrapb/v3/clusterconditiontype.enum.go b/components/common/proto/types/infrapb/v3/clusterconditiontype.enum.go new file mode 100644 index 0000000..b40c61d --- /dev/null +++ b/components/common/proto/types/infrapb/v3/clusterconditiontype.enum.go @@ -0,0 +1,42 @@ +// Code generated by go generate; DO NOT EDIT. +package infrav3 + +import ( + bytes "bytes" + driver "database/sql/driver" +) + +// Scan converts database string to ClusterConditionType +func (e *ClusterConditionType) Scan(value interface{}) error { + s := value.([]byte) + *e = ClusterConditionType(ClusterConditionType_value[string(s)]) + return nil +} + +// Value converts ClusterConditionType into database string +func (e ClusterConditionType) Value() (driver.Value, error) { + return ClusterConditionType_name[int32(e)], nil +} + +// MarshalJSON converts ClusterConditionType to JSON +func (e ClusterConditionType) MarshalJSON() ([]byte, error) { + buffer := bytes.NewBufferString("\"") + buffer.WriteString(e.String()) + buffer.WriteString("\"") + return buffer.Bytes(), nil +} + +// UnmarshalJSON converts ClusterConditionType from JSON +func (e *ClusterConditionType) UnmarshalJSON(b []byte) error { + if b != nil { + var length int + if len(b) > 1 { length = len(b) - 1 } else { length = len(b) } + *e = ClusterConditionType(ClusterConditionType_value[string(b[1:length])]) + } + return nil +} + +// implement proto enum interface +func (e ClusterConditionType) IsEnum() { +} + diff --git a/components/common/proto/types/infrapb/v3/clusternodestate.enum.go b/components/common/proto/types/infrapb/v3/clusternodestate.enum.go new file mode 100644 index 0000000..6792d0e --- /dev/null +++ b/components/common/proto/types/infrapb/v3/clusternodestate.enum.go @@ -0,0 +1,41 @@ + +// Code generated by go generate; DO NOT EDIT. +package infrav3 + +import ( + driver "database/sql/driver" + bytes "bytes" +) + +// Scan converts database string to ClusterNodeState +func (e *ClusterNodeState) Scan(value interface{}) error { + s := value.([]byte) + *e = ClusterNodeState(ClusterNodeState_value[string(s)]) + return nil +} + +// Value converts ClusterNodeState into database string +func (e ClusterNodeState) Value() (driver.Value, error) { + return ClusterNodeState_name[int32(e)], nil +} + +// MarshalJSON converts ClusterNodeState to JSON +func (e ClusterNodeState) MarshalJSON() ([]byte, error) { + buffer := bytes.NewBufferString("\"") + buffer.WriteString(e.String()) + buffer.WriteString("\"") + return buffer.Bytes(), nil +} + +// UnmarshalJSON converts ClusterNodeState from JSON +func (e *ClusterNodeState) UnmarshalJSON(b []byte) error { + if b != nil { + *e = ClusterNodeState(ClusterNodeState_value[string(b[1:len(b)-1])]) + } + return nil +} + +// implement proto enum interface +func (e ClusterNodeState) IsEnum() { +} + diff --git a/components/common/proto/types/infrapb/v3/clustersharemode.enum.go b/components/common/proto/types/infrapb/v3/clustersharemode.enum.go new file mode 100644 index 0000000..1987fac --- /dev/null +++ b/components/common/proto/types/infrapb/v3/clustersharemode.enum.go @@ -0,0 +1,41 @@ + +// Code generated by go generate; DO NOT EDIT. +package infrav3 + +import ( + driver "database/sql/driver" + bytes "bytes" +) + +// Scan converts database string to ClusterShareMode +func (e *ClusterShareMode) Scan(value interface{}) error { + s := value.([]byte) + *e = ClusterShareMode(ClusterShareMode_value[string(s)]) + return nil +} + +// Value converts ClusterShareMode into database string +func (e ClusterShareMode) Value() (driver.Value, error) { + return ClusterShareMode_name[int32(e)], nil +} + +// MarshalJSON converts ClusterShareMode to JSON +func (e ClusterShareMode) MarshalJSON() ([]byte, error) { + buffer := bytes.NewBufferString("\"") + buffer.WriteString(e.String()) + buffer.WriteString("\"") + return buffer.Bytes(), nil +} + +// UnmarshalJSON converts ClusterShareMode from JSON +func (e *ClusterShareMode) UnmarshalJSON(b []byte) error { + if b != nil { + *e = ClusterShareMode(ClusterShareMode_value[string(b[1:len(b)-1])]) + } + return nil +} + +// implement proto enum interface +func (e ClusterShareMode) IsEnum() { +} + diff --git a/components/common/proto/types/infrapb/v3/clustertokenstate.enum.go b/components/common/proto/types/infrapb/v3/clustertokenstate.enum.go new file mode 100644 index 0000000..588469d --- /dev/null +++ b/components/common/proto/types/infrapb/v3/clustertokenstate.enum.go @@ -0,0 +1,41 @@ + +// Code generated by go generate; DO NOT EDIT. +package infrav3 + +import ( + driver "database/sql/driver" + bytes "bytes" +) + +// Scan converts database string to ClusterTokenState +func (e *ClusterTokenState) Scan(value interface{}) error { + s := value.([]byte) + *e = ClusterTokenState(ClusterTokenState_value[string(s)]) + return nil +} + +// Value converts ClusterTokenState into database string +func (e ClusterTokenState) Value() (driver.Value, error) { + return ClusterTokenState_name[int32(e)], nil +} + +// MarshalJSON converts ClusterTokenState to JSON +func (e ClusterTokenState) MarshalJSON() ([]byte, error) { + buffer := bytes.NewBufferString("\"") + buffer.WriteString(e.String()) + buffer.WriteString("\"") + return buffer.Bytes(), nil +} + +// UnmarshalJSON converts ClusterTokenState from JSON +func (e *ClusterTokenState) UnmarshalJSON(b []byte) error { + if b != nil { + *e = ClusterTokenState(ClusterTokenState_value[string(b[1:len(b)-1])]) + } + return nil +} + +// implement proto enum interface +func (e ClusterTokenState) IsEnum() { +} + diff --git a/components/common/proto/types/infrapb/v3/clustertokentype.enum.go b/components/common/proto/types/infrapb/v3/clustertokentype.enum.go new file mode 100644 index 0000000..da89fe9 --- /dev/null +++ b/components/common/proto/types/infrapb/v3/clustertokentype.enum.go @@ -0,0 +1,41 @@ + +// Code generated by go generate; DO NOT EDIT. +package infrav3 + +import ( + driver "database/sql/driver" + bytes "bytes" +) + +// Scan converts database string to ClusterTokenType +func (e *ClusterTokenType) Scan(value interface{}) error { + s := value.([]byte) + *e = ClusterTokenType(ClusterTokenType_value[string(s)]) + return nil +} + +// Value converts ClusterTokenType into database string +func (e ClusterTokenType) Value() (driver.Value, error) { + return ClusterTokenType_name[int32(e)], nil +} + +// MarshalJSON converts ClusterTokenType to JSON +func (e ClusterTokenType) MarshalJSON() ([]byte, error) { + buffer := bytes.NewBufferString("\"") + buffer.WriteString(e.String()) + buffer.WriteString("\"") + return buffer.Bytes(), nil +} + +// UnmarshalJSON converts ClusterTokenType from JSON +func (e *ClusterTokenType) UnmarshalJSON(b []byte) error { + if b != nil { + *e = ClusterTokenType(ClusterTokenType_value[string(b[1:len(b)-1])]) + } + return nil +} + +// implement proto enum interface +func (e ClusterTokenType) IsEnum() { +} + diff --git a/components/common/proto/types/scheduler/namespace.pb.go b/components/common/proto/types/scheduler/namespace.pb.go new file mode 100644 index 0000000..c8569ce --- /dev/null +++ b/components/common/proto/types/scheduler/namespace.pb.go @@ -0,0 +1,740 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc (unknown) +// source: proto/types/scheduler/namespace.proto + +package scheduler + +import ( + v3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/commonpb/v3" + config "github.com/RafaySystems/rcloud-base/components/common/proto/types/config" + controller "github.com/RafaySystems/rcloud-base/components/common/proto/types/controller" + _ "github.com/gogo/protobuf/gogoproto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type ClusterNamespaceConditionType int32 + +const ( + ClusterNamespaceConditionType_ClusterNamespaceAssigned ClusterNamespaceConditionType = 0 + ClusterNamespaceConditionType_ClusterNamespaceConverged ClusterNamespaceConditionType = 1 + ClusterNamespaceConditionType_ClusterNamespaceReady ClusterNamespaceConditionType = 2 + ClusterNamespaceConditionType_ClusterNamespaceDelete ClusterNamespaceConditionType = 3 +) + +// Enum value maps for ClusterNamespaceConditionType. +var ( + ClusterNamespaceConditionType_name = map[int32]string{ + 0: "ClusterNamespaceAssigned", + 1: "ClusterNamespaceConverged", + 2: "ClusterNamespaceReady", + 3: "ClusterNamespaceDelete", + } + ClusterNamespaceConditionType_value = map[string]int32{ + "ClusterNamespaceAssigned": 0, + "ClusterNamespaceConverged": 1, + "ClusterNamespaceReady": 2, + "ClusterNamespaceDelete": 3, + } +) + +func (x ClusterNamespaceConditionType) Enum() *ClusterNamespaceConditionType { + p := new(ClusterNamespaceConditionType) + *p = x + return p +} + +func (x ClusterNamespaceConditionType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ClusterNamespaceConditionType) Descriptor() protoreflect.EnumDescriptor { + return file_proto_types_scheduler_namespace_proto_enumTypes[0].Descriptor() +} + +func (ClusterNamespaceConditionType) Type() protoreflect.EnumType { + return &file_proto_types_scheduler_namespace_proto_enumTypes[0] +} + +func (x ClusterNamespaceConditionType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ClusterNamespaceConditionType.Descriptor instead. +func (ClusterNamespaceConditionType) EnumDescriptor() ([]byte, []int) { + return file_proto_types_scheduler_namespace_proto_rawDescGZIP(), []int{0} +} + +type ClusterNamespaceType int32 + +const ( + ClusterNamespaceType_ClusterNamespaceSystem ClusterNamespaceType = 0 + ClusterNamespaceType_ClusterNamespaceCustom ClusterNamespaceType = 1 +) + +// Enum value maps for ClusterNamespaceType. +var ( + ClusterNamespaceType_name = map[int32]string{ + 0: "ClusterNamespaceSystem", + 1: "ClusterNamespaceCustom", + } + ClusterNamespaceType_value = map[string]int32{ + "ClusterNamespaceSystem": 0, + "ClusterNamespaceCustom": 1, + } +) + +func (x ClusterNamespaceType) Enum() *ClusterNamespaceType { + p := new(ClusterNamespaceType) + *p = x + return p +} + +func (x ClusterNamespaceType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ClusterNamespaceType) Descriptor() protoreflect.EnumDescriptor { + return file_proto_types_scheduler_namespace_proto_enumTypes[1].Descriptor() +} + +func (ClusterNamespaceType) Type() protoreflect.EnumType { + return &file_proto_types_scheduler_namespace_proto_enumTypes[1] +} + +func (x ClusterNamespaceType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ClusterNamespaceType.Descriptor instead. +func (ClusterNamespaceType) EnumDescriptor() ([]byte, []int) { + return file_proto_types_scheduler_namespace_proto_rawDescGZIP(), []int{1} +} + +type ClusterNamespaceSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Type ClusterNamespaceType `protobuf:"varint,1,opt,name=type,proto3,enum=rafay.dev.types.scheduler.ClusterNamespaceType" json:"type,omitempty"` + Namespace *config.NamespaceTemplate `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` + ClusterID string `protobuf:"bytes,3,opt,name=clusterID,proto3" json:"clusterID,omitempty"` +} + +func (x *ClusterNamespaceSpec) Reset() { + *x = ClusterNamespaceSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_scheduler_namespace_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ClusterNamespaceSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClusterNamespaceSpec) ProtoMessage() {} + +func (x *ClusterNamespaceSpec) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_scheduler_namespace_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClusterNamespaceSpec.ProtoReflect.Descriptor instead. +func (*ClusterNamespaceSpec) Descriptor() ([]byte, []int) { + return file_proto_types_scheduler_namespace_proto_rawDescGZIP(), []int{0} +} + +func (x *ClusterNamespaceSpec) GetType() ClusterNamespaceType { + if x != nil { + return x.Type + } + return ClusterNamespaceType_ClusterNamespaceSystem +} + +func (x *ClusterNamespaceSpec) GetNamespace() *config.NamespaceTemplate { + if x != nil { + return x.Namespace + } + return nil +} + +func (x *ClusterNamespaceSpec) GetClusterID() string { + if x != nil { + return x.ClusterID + } + return "" +} + +type ClusterNamespaceCondition struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Type ClusterNamespaceConditionType `protobuf:"varint,1,opt,name=type,proto3,enum=rafay.dev.types.scheduler.ClusterNamespaceConditionType" json:"type,omitempty"` + Status v3.RafayConditionStatus `protobuf:"varint,2,opt,name=status,proto3,enum=rafay.dev.types.common.v3.RafayConditionStatus" json:"status,omitempty"` + LastUpdated *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=lastUpdated,proto3" json:"lastUpdated,omitempty"` + Reason string `protobuf:"bytes,4,opt,name=reason,proto3" json:"reason,omitempty"` +} + +func (x *ClusterNamespaceCondition) Reset() { + *x = ClusterNamespaceCondition{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_scheduler_namespace_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ClusterNamespaceCondition) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClusterNamespaceCondition) ProtoMessage() {} + +func (x *ClusterNamespaceCondition) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_scheduler_namespace_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClusterNamespaceCondition.ProtoReflect.Descriptor instead. +func (*ClusterNamespaceCondition) Descriptor() ([]byte, []int) { + return file_proto_types_scheduler_namespace_proto_rawDescGZIP(), []int{1} +} + +func (x *ClusterNamespaceCondition) GetType() ClusterNamespaceConditionType { + if x != nil { + return x.Type + } + return ClusterNamespaceConditionType_ClusterNamespaceAssigned +} + +func (x *ClusterNamespaceCondition) GetStatus() v3.RafayConditionStatus { + if x != nil { + return x.Status + } + return v3.RafayConditionStatus(0) +} + +func (x *ClusterNamespaceCondition) GetLastUpdated() *timestamppb.Timestamp { + if x != nil { + return x.LastUpdated + } + return nil +} + +func (x *ClusterNamespaceCondition) GetReason() string { + if x != nil { + return x.Reason + } + return "" +} + +type ClusterNamespaceStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Conditions []*ClusterNamespaceCondition `protobuf:"bytes,1,rep,name=conditions,proto3" json:"conditions,omitempty"` + Status *controller.NamespaceStatus `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *ClusterNamespaceStatus) Reset() { + *x = ClusterNamespaceStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_scheduler_namespace_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ClusterNamespaceStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClusterNamespaceStatus) ProtoMessage() {} + +func (x *ClusterNamespaceStatus) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_scheduler_namespace_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClusterNamespaceStatus.ProtoReflect.Descriptor instead. +func (*ClusterNamespaceStatus) Descriptor() ([]byte, []int) { + return file_proto_types_scheduler_namespace_proto_rawDescGZIP(), []int{2} +} + +func (x *ClusterNamespaceStatus) GetConditions() []*ClusterNamespaceCondition { + if x != nil { + return x.Conditions + } + return nil +} + +func (x *ClusterNamespaceStatus) GetStatus() *controller.NamespaceStatus { + if x != nil { + return x.Status + } + return nil +} + +type ClusterNamespace struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ApiVersion string `protobuf:"bytes,1,opt,name=apiVersion,proto3" json:"apiVersion,omitempty"` + Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"` + Metadata *v3.Metadata `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *ClusterNamespaceSpec `protobuf:"bytes,4,opt,name=spec,proto3" json:"spec,omitempty"` + Status *ClusterNamespaceStatus `protobuf:"bytes,5,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *ClusterNamespace) Reset() { + *x = ClusterNamespace{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_scheduler_namespace_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ClusterNamespace) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClusterNamespace) ProtoMessage() {} + +func (x *ClusterNamespace) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_scheduler_namespace_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClusterNamespace.ProtoReflect.Descriptor instead. +func (*ClusterNamespace) Descriptor() ([]byte, []int) { + return file_proto_types_scheduler_namespace_proto_rawDescGZIP(), []int{3} +} + +func (x *ClusterNamespace) GetApiVersion() string { + if x != nil { + return x.ApiVersion + } + return "" +} + +func (x *ClusterNamespace) GetKind() string { + if x != nil { + return x.Kind + } + return "" +} + +func (x *ClusterNamespace) GetMetadata() *v3.Metadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *ClusterNamespace) GetSpec() *ClusterNamespaceSpec { + if x != nil { + return x.Spec + } + return nil +} + +func (x *ClusterNamespace) GetStatus() *ClusterNamespaceStatus { + if x != nil { + return x.Status + } + return nil +} + +type ClusterNamespaceList struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ApiVersion string `protobuf:"bytes,1,opt,name=apiVersion,proto3" json:"apiVersion,omitempty"` + Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"` + Metadata *v3.ListMetadata `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` + Items []*ClusterNamespace `protobuf:"bytes,4,rep,name=items,proto3" json:"items,omitempty"` +} + +func (x *ClusterNamespaceList) Reset() { + *x = ClusterNamespaceList{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_scheduler_namespace_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ClusterNamespaceList) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClusterNamespaceList) ProtoMessage() {} + +func (x *ClusterNamespaceList) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_scheduler_namespace_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClusterNamespaceList.ProtoReflect.Descriptor instead. +func (*ClusterNamespaceList) Descriptor() ([]byte, []int) { + return file_proto_types_scheduler_namespace_proto_rawDescGZIP(), []int{4} +} + +func (x *ClusterNamespaceList) GetApiVersion() string { + if x != nil { + return x.ApiVersion + } + return "" +} + +func (x *ClusterNamespaceList) GetKind() string { + if x != nil { + return x.Kind + } + return "" +} + +func (x *ClusterNamespaceList) GetMetadata() *v3.ListMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *ClusterNamespaceList) GetItems() []*ClusterNamespace { + if x != nil { + return x.Items + } + return nil +} + +var File_proto_types_scheduler_namespace_proto protoreflect.FileDescriptor + +var file_proto_types_scheduler_namespace_proto_rawDesc = []byte{ + 0x0a, 0x25, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x73, 0x63, + 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, + 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, + 0x65, 0x72, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, + 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x70, 0x62, 0x2f, + 0x76, 0x33, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x22, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2f, 0x63, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8f, 0x02, 0x0a, 0x14, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x12, 0x63, 0x0a, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x72, 0x61, + 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x63, + 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x42, 0x1e, 0xea, 0xde, + 0x1f, 0x04, 0x74, 0x79, 0x70, 0x65, 0xf2, 0xde, 0x1f, 0x12, 0x70, 0x67, 0x3a, 0x22, 0x74, 0x79, + 0x70, 0x65, 0x2c, 0x75, 0x73, 0x65, 0x5f, 0x7a, 0x65, 0x72, 0x6f, 0x22, 0x52, 0x04, 0x74, 0x79, + 0x70, 0x65, 0x12, 0x5f, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, + 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x4e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, + 0x42, 0x16, 0xc8, 0xde, 0x1f, 0x00, 0xf2, 0xde, 0x1f, 0x0e, 0x70, 0x67, 0x3a, 0x22, 0x6e, 0x61, + 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x12, 0x31, 0x0a, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x44, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x13, 0xf2, 0xde, 0x1f, 0x0f, 0x70, 0x67, 0x3a, 0x22, + 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x22, 0x52, 0x09, 0x63, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x49, 0x44, 0x22, 0xb4, 0x02, 0x0a, 0x19, 0x43, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x64, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x56, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x38, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, + 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, 0xea, 0xde, + 0x1f, 0x04, 0x74, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x53, 0x0a, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x72, + 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x66, 0x61, 0x79, 0x43, 0x6f, + 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x0a, 0xea, + 0xde, 0x1f, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x12, 0x46, 0x0a, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x0b, 0x6c, 0x61, + 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x12, 0x22, 0x0a, 0x06, 0x72, 0x65, 0x61, + 0x73, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xea, 0xde, 0x1f, 0x06, 0x72, + 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x22, 0x89, 0x02, + 0x0a, 0x16, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x98, 0x01, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, + 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, + 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x42, 0x42, 0xc8, 0xde, 0x1f, 0x00, 0xf2, 0xde, 0x1f, 0x3a, 0x70, 0x61, 0x74, + 0x63, 0x68, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x3a, 0x22, 0x6d, 0x65, 0x72, 0x67, + 0x65, 0x22, 0x20, 0x70, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x4b, 0x65, 0x79, + 0x3a, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x20, 0x70, 0x67, 0x3a, 0x22, 0x63, 0x6f, 0x6e, 0x64, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x12, 0x54, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, + 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x42, 0x0f, 0xf2, 0xde, 0x1f, 0x0b, 0x70, 0x67, 0x3a, 0x22, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x22, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0xab, 0x02, 0x0a, 0x10, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1e, + 0x0a, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x12, + 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x69, + 0x6e, 0x64, 0x12, 0x3f, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, + 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, + 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x12, 0x4d, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2f, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x73, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x70, + 0x65, 0x63, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0xd0, 0xde, 0x1f, 0x01, 0x52, 0x04, 0x73, 0x70, + 0x65, 0x63, 0x12, 0x53, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0xd0, 0xde, 0x1f, 0x01, 0x52, + 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0xd2, 0x01, 0x0a, 0x14, 0x43, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, + 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x43, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, + 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, + 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x41, 0x0a, 0x05, 0x69, 0x74, 0x65, + 0x6d, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, + 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, + 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x2a, 0x99, 0x01, 0x0a, + 0x1d, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c, + 0x0a, 0x18, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x10, 0x00, 0x12, 0x1d, 0x0a, 0x19, + 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x67, 0x65, 0x64, 0x10, 0x01, 0x12, 0x19, 0x0a, 0x15, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, + 0x65, 0x61, 0x64, 0x79, 0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x10, 0x03, 0x1a, 0x04, 0x88, 0xa3, 0x1e, 0x00, 0x2a, 0x54, 0x0a, 0x14, 0x43, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x1a, 0x0a, 0x16, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x16, + 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x10, 0x01, 0x1a, 0x04, 0x88, 0xa3, 0x1e, 0x00, 0x42, 0x98, + 0x02, 0x0a, 0x1d, 0x63, 0x6f, 0x6d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, + 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, + 0x42, 0x0e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x4b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, + 0x61, 0x66, 0x61, 0x79, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x2f, 0x72, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2d, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, + 0x74, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0xa2, + 0x02, 0x04, 0x52, 0x44, 0x54, 0x53, 0xaa, 0x02, 0x19, 0x52, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x44, + 0x65, 0x76, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, + 0x65, 0x72, 0xca, 0x02, 0x19, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x54, + 0x79, 0x70, 0x65, 0x73, 0x5c, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0xe2, 0x02, + 0x25, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x54, 0x79, 0x70, 0x65, 0x73, + 0x5c, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1c, 0x52, 0x61, 0x66, 0x61, 0x79, 0x3a, 0x3a, + 0x44, 0x65, 0x76, 0x3a, 0x3a, 0x54, 0x79, 0x70, 0x65, 0x73, 0x3a, 0x3a, 0x53, 0x63, 0x68, 0x65, + 0x64, 0x75, 0x6c, 0x65, 0x72, 0xc8, 0xe2, 0x1e, 0x01, 0xd0, 0xe2, 0x1e, 0x01, 0xe0, 0xe2, 0x1e, + 0x01, 0xc0, 0xe3, 0x1e, 0x01, 0xc8, 0xe3, 0x1e, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_proto_types_scheduler_namespace_proto_rawDescOnce sync.Once + file_proto_types_scheduler_namespace_proto_rawDescData = file_proto_types_scheduler_namespace_proto_rawDesc +) + +func file_proto_types_scheduler_namespace_proto_rawDescGZIP() []byte { + file_proto_types_scheduler_namespace_proto_rawDescOnce.Do(func() { + file_proto_types_scheduler_namespace_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_types_scheduler_namespace_proto_rawDescData) + }) + return file_proto_types_scheduler_namespace_proto_rawDescData +} + +var file_proto_types_scheduler_namespace_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_proto_types_scheduler_namespace_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_proto_types_scheduler_namespace_proto_goTypes = []interface{}{ + (ClusterNamespaceConditionType)(0), // 0: rafay.dev.types.scheduler.ClusterNamespaceConditionType + (ClusterNamespaceType)(0), // 1: rafay.dev.types.scheduler.ClusterNamespaceType + (*ClusterNamespaceSpec)(nil), // 2: rafay.dev.types.scheduler.ClusterNamespaceSpec + (*ClusterNamespaceCondition)(nil), // 3: rafay.dev.types.scheduler.ClusterNamespaceCondition + (*ClusterNamespaceStatus)(nil), // 4: rafay.dev.types.scheduler.ClusterNamespaceStatus + (*ClusterNamespace)(nil), // 5: rafay.dev.types.scheduler.ClusterNamespace + (*ClusterNamespaceList)(nil), // 6: rafay.dev.types.scheduler.ClusterNamespaceList + (*config.NamespaceTemplate)(nil), // 7: rafay.dev.types.config.NamespaceTemplate + (v3.RafayConditionStatus)(0), // 8: rafay.dev.types.common.v3.RafayConditionStatus + (*timestamppb.Timestamp)(nil), // 9: google.protobuf.Timestamp + (*controller.NamespaceStatus)(nil), // 10: rafay.dev.types.controller.NamespaceStatus + (*v3.Metadata)(nil), // 11: rafay.dev.types.common.v3.Metadata + (*v3.ListMetadata)(nil), // 12: rafay.dev.types.common.v3.ListMetadata +} +var file_proto_types_scheduler_namespace_proto_depIdxs = []int32{ + 1, // 0: rafay.dev.types.scheduler.ClusterNamespaceSpec.type:type_name -> rafay.dev.types.scheduler.ClusterNamespaceType + 7, // 1: rafay.dev.types.scheduler.ClusterNamespaceSpec.namespace:type_name -> rafay.dev.types.config.NamespaceTemplate + 0, // 2: rafay.dev.types.scheduler.ClusterNamespaceCondition.type:type_name -> rafay.dev.types.scheduler.ClusterNamespaceConditionType + 8, // 3: rafay.dev.types.scheduler.ClusterNamespaceCondition.status:type_name -> rafay.dev.types.common.v3.RafayConditionStatus + 9, // 4: rafay.dev.types.scheduler.ClusterNamespaceCondition.lastUpdated:type_name -> google.protobuf.Timestamp + 3, // 5: rafay.dev.types.scheduler.ClusterNamespaceStatus.conditions:type_name -> rafay.dev.types.scheduler.ClusterNamespaceCondition + 10, // 6: rafay.dev.types.scheduler.ClusterNamespaceStatus.status:type_name -> rafay.dev.types.controller.NamespaceStatus + 11, // 7: rafay.dev.types.scheduler.ClusterNamespace.metadata:type_name -> rafay.dev.types.common.v3.Metadata + 2, // 8: rafay.dev.types.scheduler.ClusterNamespace.spec:type_name -> rafay.dev.types.scheduler.ClusterNamespaceSpec + 4, // 9: rafay.dev.types.scheduler.ClusterNamespace.status:type_name -> rafay.dev.types.scheduler.ClusterNamespaceStatus + 12, // 10: rafay.dev.types.scheduler.ClusterNamespaceList.metadata:type_name -> rafay.dev.types.common.v3.ListMetadata + 5, // 11: rafay.dev.types.scheduler.ClusterNamespaceList.items:type_name -> rafay.dev.types.scheduler.ClusterNamespace + 12, // [12:12] is the sub-list for method output_type + 12, // [12:12] is the sub-list for method input_type + 12, // [12:12] is the sub-list for extension type_name + 12, // [12:12] is the sub-list for extension extendee + 0, // [0:12] is the sub-list for field type_name +} + +func init() { file_proto_types_scheduler_namespace_proto_init() } +func file_proto_types_scheduler_namespace_proto_init() { + if File_proto_types_scheduler_namespace_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_proto_types_scheduler_namespace_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ClusterNamespaceSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_scheduler_namespace_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ClusterNamespaceCondition); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_scheduler_namespace_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ClusterNamespaceStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_scheduler_namespace_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ClusterNamespace); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_scheduler_namespace_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ClusterNamespaceList); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_proto_types_scheduler_namespace_proto_rawDesc, + NumEnums: 2, + NumMessages: 5, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_proto_types_scheduler_namespace_proto_goTypes, + DependencyIndexes: file_proto_types_scheduler_namespace_proto_depIdxs, + EnumInfos: file_proto_types_scheduler_namespace_proto_enumTypes, + MessageInfos: file_proto_types_scheduler_namespace_proto_msgTypes, + }.Build() + File_proto_types_scheduler_namespace_proto = out.File + file_proto_types_scheduler_namespace_proto_rawDesc = nil + file_proto_types_scheduler_namespace_proto_goTypes = nil + file_proto_types_scheduler_namespace_proto_depIdxs = nil +} diff --git a/components/common/proto/types/scheduler/namespace.proto b/components/common/proto/types/scheduler/namespace.proto new file mode 100644 index 0000000..47552f7 --- /dev/null +++ b/components/common/proto/types/scheduler/namespace.proto @@ -0,0 +1,87 @@ +syntax = "proto3"; +package rafay.dev.types.scheduler; + +import "google/protobuf/timestamp.proto"; +import "gogoproto/gogo.proto"; +import "proto/types/commonpb/v3/common.proto"; +import "proto/types/config/namespace.proto"; +import "proto/types/controller/cluster_controller.proto"; + +// Enable custom Marshal method. +option (gogoproto.marshaler_all) = true; +// Enable custom Unmarshal method. +option (gogoproto.unmarshaler_all) = true; +// Enable custom Size method (Required by Marshal and Unmarshal). +option (gogoproto.sizer_all) = true; +// Enable registration with golang/protobuf for the grpc-gateway. +option (gogoproto.goproto_registration) = true; +// Enable generation of XXX_MessageName methods for grpc-go/status. +option (gogoproto.messagename_all) = true; + +message ClusterNamespaceSpec { + ClusterNamespaceType type = 1 [ + (gogoproto.moretags) = "pg:\"type,use_zero\"", + (gogoproto.jsontag) = "type" + ]; + rafay.dev.types.config.NamespaceTemplate namespace = 2 [ + (gogoproto.nullable) = false, + (gogoproto.moretags) = "pg:\"namespace\"" + ]; + string clusterID = 3 [ + (gogoproto.moretags) = "pg:\"cluster_id\"" + ]; +} + +enum ClusterNamespaceConditionType { + // disable enum prefix + option (gogoproto.goproto_enum_prefix) = false; + + ClusterNamespaceAssigned = 0; + ClusterNamespaceConverged = 1; + ClusterNamespaceReady = 2; + ClusterNamespaceDelete = 3; +} + +message ClusterNamespaceCondition { + ClusterNamespaceConditionType type = 1 [(gogoproto.jsontag) = "type"]; + rafay.dev.types.common.v3.RafayConditionStatus status = 2 + [(gogoproto.jsontag) = "status"]; + google.protobuf.Timestamp lastUpdated = 3 + [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; + string reason = 4 [(gogoproto.jsontag) = "reason"]; +} + +message ClusterNamespaceStatus { + repeated ClusterNamespaceCondition conditions = 1 [ + (gogoproto.nullable) = false, + (gogoproto.moretags) = + "patchStrategy:\"merge\" patchMergeKey:\"type\" pg:\"conditions\"" + ]; + rafay.dev.types.controller.NamespaceStatus status = 2 + [(gogoproto.moretags) = "pg:\"status\""]; +} + +enum ClusterNamespaceType { + // disable enum prefix + option (gogoproto.goproto_enum_prefix) = false; + + ClusterNamespaceSystem = 0; + ClusterNamespaceCustom = 1; +} + +message ClusterNamespace { + string apiVersion = 1; + string kind = 2; + rafay.dev.types.common.v3.Metadata metadata = 3; + ClusterNamespaceSpec spec = 4 + [(gogoproto.nullable) = false, (gogoproto.embed) = true]; + ClusterNamespaceStatus status = 5 + [(gogoproto.nullable) = false, (gogoproto.embed) = true]; +} + +message ClusterNamespaceList { + string apiVersion = 1; + string kind = 2; + rafay.dev.types.common.v3.ListMetadata metadata = 3; + repeated ClusterNamespace items = 4; +} \ No newline at end of file diff --git a/components/common/proto/types/sentry/account_permission.pb.go b/components/common/proto/types/sentry/account_permission.pb.go new file mode 100644 index 0000000..af02172 --- /dev/null +++ b/components/common/proto/types/sentry/account_permission.pb.go @@ -0,0 +1,558 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc (unknown) +// source: proto/types/sentry/account_permission.proto + +package sentry + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type PermissionURL struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` + Methods []string `protobuf:"bytes,2,rep,name=methods,proto3" json:"methods,omitempty"` +} + +func (x *PermissionURL) Reset() { + *x = PermissionURL{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_sentry_account_permission_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PermissionURL) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PermissionURL) ProtoMessage() {} + +func (x *PermissionURL) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_sentry_account_permission_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PermissionURL.ProtoReflect.Descriptor instead. +func (*PermissionURL) Descriptor() ([]byte, []int) { + return file_proto_types_sentry_account_permission_proto_rawDescGZIP(), []int{0} +} + +func (x *PermissionURL) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +func (x *PermissionURL) GetMethods() []string { + if x != nil { + return x.Methods + } + return nil +} + +type AccountPermission struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AccountID string `protobuf:"bytes,1,opt,name=accountID,proto3" json:"accountID,omitempty"` + ProjectID string `protobuf:"bytes,2,opt,name=projectID,proto3" json:"projectID,omitempty"` + OrganizationID string `protobuf:"bytes,3,opt,name=organizationID,proto3" json:"organizationID,omitempty"` + PartnerID string `protobuf:"bytes,4,opt,name=partnerID,proto3" json:"partnerID,omitempty"` + RoleName string `protobuf:"bytes,5,opt,name=roleName,proto3" json:"roleName,omitempty"` + IsGlobal bool `protobuf:"varint,6,opt,name=isGlobal,proto3" json:"isGlobal,omitempty"` + Scope string `protobuf:"bytes,7,opt,name=scope,proto3" json:"scope,omitempty"` + PermissionName string `protobuf:"bytes,8,opt,name=permissionName,proto3" json:"permissionName,omitempty"` + BaseURL string `protobuf:"bytes,9,opt,name=baseURL,proto3" json:"baseURL,omitempty"` + Urls []*PermissionURL `protobuf:"bytes,10,rep,name=urls,proto3" json:"urls,omitempty"` +} + +func (x *AccountPermission) Reset() { + *x = AccountPermission{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_sentry_account_permission_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AccountPermission) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AccountPermission) ProtoMessage() {} + +func (x *AccountPermission) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_sentry_account_permission_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AccountPermission.ProtoReflect.Descriptor instead. +func (*AccountPermission) Descriptor() ([]byte, []int) { + return file_proto_types_sentry_account_permission_proto_rawDescGZIP(), []int{1} +} + +func (x *AccountPermission) GetAccountID() string { + if x != nil { + return x.AccountID + } + return "" +} + +func (x *AccountPermission) GetProjectID() string { + if x != nil { + return x.ProjectID + } + return "" +} + +func (x *AccountPermission) GetOrganizationID() string { + if x != nil { + return x.OrganizationID + } + return "" +} + +func (x *AccountPermission) GetPartnerID() string { + if x != nil { + return x.PartnerID + } + return "" +} + +func (x *AccountPermission) GetRoleName() string { + if x != nil { + return x.RoleName + } + return "" +} + +func (x *AccountPermission) GetIsGlobal() bool { + if x != nil { + return x.IsGlobal + } + return false +} + +func (x *AccountPermission) GetScope() string { + if x != nil { + return x.Scope + } + return "" +} + +func (x *AccountPermission) GetPermissionName() string { + if x != nil { + return x.PermissionName + } + return "" +} + +func (x *AccountPermission) GetBaseURL() string { + if x != nil { + return x.BaseURL + } + return "" +} + +func (x *AccountPermission) GetUrls() []*PermissionURL { + if x != nil { + return x.Urls + } + return nil +} + +type SSOAccountGroupProjectRoleData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + UserName string `protobuf:"bytes,2,opt,name=userName,proto3" json:"userName,omitempty"` + RoleName string `protobuf:"bytes,3,opt,name=roleName,proto3" json:"roleName,omitempty"` + ProjectID string `protobuf:"bytes,4,opt,name=projectID,proto3" json:"projectID,omitempty"` + ProjectName string `protobuf:"bytes,5,opt,name=projectName,proto3" json:"projectName,omitempty"` + Group string `protobuf:"bytes,6,opt,name=group,proto3" json:"group,omitempty"` + AccountOrganizationID string `protobuf:"bytes,7,opt,name=accountOrganizationID,proto3" json:"accountOrganizationID,omitempty"` + OrganizationID string `protobuf:"bytes,8,opt,name=organizationID,proto3" json:"organizationID,omitempty"` + PartnerID string `protobuf:"bytes,9,opt,name=partnerID,proto3" json:"partnerID,omitempty"` + Scope string `protobuf:"bytes,10,opt,name=scope,proto3" json:"scope,omitempty"` + LastLogin *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=lastLogin,proto3" json:"lastLogin,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,12,opt,name=createdAt,proto3" json:"createdAt,omitempty"` + FirstName string `protobuf:"bytes,13,opt,name=firstName,proto3" json:"firstName,omitempty"` + LastName string `protobuf:"bytes,14,opt,name=lastName,proto3" json:"lastName,omitempty"` + Phone string `protobuf:"bytes,15,opt,name=phone,proto3" json:"phone,omitempty"` + Name string `protobuf:"bytes,16,opt,name=name,proto3" json:"name,omitempty"` + LastLogout *timestamppb.Timestamp `protobuf:"bytes,17,opt,name=lastLogout,proto3" json:"lastLogout,omitempty"` +} + +func (x *SSOAccountGroupProjectRoleData) Reset() { + *x = SSOAccountGroupProjectRoleData{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_sentry_account_permission_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SSOAccountGroupProjectRoleData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SSOAccountGroupProjectRoleData) ProtoMessage() {} + +func (x *SSOAccountGroupProjectRoleData) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_sentry_account_permission_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SSOAccountGroupProjectRoleData.ProtoReflect.Descriptor instead. +func (*SSOAccountGroupProjectRoleData) Descriptor() ([]byte, []int) { + return file_proto_types_sentry_account_permission_proto_rawDescGZIP(), []int{2} +} + +func (x *SSOAccountGroupProjectRoleData) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *SSOAccountGroupProjectRoleData) GetUserName() string { + if x != nil { + return x.UserName + } + return "" +} + +func (x *SSOAccountGroupProjectRoleData) GetRoleName() string { + if x != nil { + return x.RoleName + } + return "" +} + +func (x *SSOAccountGroupProjectRoleData) GetProjectID() string { + if x != nil { + return x.ProjectID + } + return "" +} + +func (x *SSOAccountGroupProjectRoleData) GetProjectName() string { + if x != nil { + return x.ProjectName + } + return "" +} + +func (x *SSOAccountGroupProjectRoleData) GetGroup() string { + if x != nil { + return x.Group + } + return "" +} + +func (x *SSOAccountGroupProjectRoleData) GetAccountOrganizationID() string { + if x != nil { + return x.AccountOrganizationID + } + return "" +} + +func (x *SSOAccountGroupProjectRoleData) GetOrganizationID() string { + if x != nil { + return x.OrganizationID + } + return "" +} + +func (x *SSOAccountGroupProjectRoleData) GetPartnerID() string { + if x != nil { + return x.PartnerID + } + return "" +} + +func (x *SSOAccountGroupProjectRoleData) GetScope() string { + if x != nil { + return x.Scope + } + return "" +} + +func (x *SSOAccountGroupProjectRoleData) GetLastLogin() *timestamppb.Timestamp { + if x != nil { + return x.LastLogin + } + return nil +} + +func (x *SSOAccountGroupProjectRoleData) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *SSOAccountGroupProjectRoleData) GetFirstName() string { + if x != nil { + return x.FirstName + } + return "" +} + +func (x *SSOAccountGroupProjectRoleData) GetLastName() string { + if x != nil { + return x.LastName + } + return "" +} + +func (x *SSOAccountGroupProjectRoleData) GetPhone() string { + if x != nil { + return x.Phone + } + return "" +} + +func (x *SSOAccountGroupProjectRoleData) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *SSOAccountGroupProjectRoleData) GetLastLogout() *timestamppb.Timestamp { + if x != nil { + return x.LastLogout + } + return nil +} + +var File_proto_types_sentry_account_permission_proto protoreflect.FileDescriptor + +var file_proto_types_sentry_account_permission_proto_rawDesc = []byte{ + 0x0a, 0x2b, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x73, 0x65, + 0x6e, 0x74, 0x72, 0x79, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x70, 0x65, 0x72, + 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x72, + 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, + 0x65, 0x6e, 0x74, 0x72, 0x79, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3b, 0x0a, 0x0d, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x55, 0x52, 0x4c, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x74, + 0x68, 0x6f, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x74, 0x68, + 0x6f, 0x64, 0x73, 0x22, 0xe0, 0x02, 0x0a, 0x11, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, + 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x44, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x49, 0x44, 0x12, 0x26, 0x0a, 0x0e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, + 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x1c, 0x0a, + 0x09, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x49, 0x44, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x49, 0x44, 0x12, 0x1a, 0x0a, 0x08, 0x72, + 0x6f, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, + 0x6f, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x73, 0x47, 0x6c, 0x6f, + 0x62, 0x61, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x47, 0x6c, 0x6f, + 0x62, 0x61, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x70, 0x65, 0x72, + 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0e, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, + 0x65, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x61, 0x73, 0x65, 0x55, 0x52, 0x4c, 0x18, 0x09, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x62, 0x61, 0x73, 0x65, 0x55, 0x52, 0x4c, 0x12, 0x39, 0x0a, 0x04, 0x75, + 0x72, 0x6c, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x72, 0x61, 0x66, 0x61, + 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x6e, 0x74, + 0x72, 0x79, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x55, 0x52, 0x4c, + 0x52, 0x04, 0x75, 0x72, 0x6c, 0x73, 0x22, 0xe4, 0x04, 0x0a, 0x1e, 0x53, 0x53, 0x4f, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x44, 0x61, 0x74, 0x61, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, + 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, + 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x6f, 0x6c, 0x65, 0x4e, 0x61, 0x6d, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x6f, 0x6c, 0x65, 0x4e, 0x61, 0x6d, + 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x44, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x44, 0x12, + 0x20, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4e, 0x61, 0x6d, + 0x65, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x34, 0x0a, 0x15, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4f, + 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x26, 0x0a, + 0x0e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, + 0x49, 0x44, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, + 0x72, 0x49, 0x44, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x0a, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x38, 0x0a, 0x09, 0x6c, 0x61, 0x73, + 0x74, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x6c, 0x61, 0x73, 0x74, 0x4c, 0x6f, + 0x67, 0x69, 0x6e, 0x12, 0x38, 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, + 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1c, 0x0a, + 0x09, 0x66, 0x69, 0x72, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x66, 0x69, 0x72, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6c, + 0x61, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, + 0x61, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, + 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x12, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x3a, 0x0a, 0x0a, 0x6c, 0x61, 0x73, 0x74, 0x4c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x18, + 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x52, 0x0a, 0x6c, 0x61, 0x73, 0x74, 0x4c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x42, 0xfa, 0x01, + 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x16, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x48, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x52, 0x61, 0x66, 0x61, 0x79, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x2f, + 0x72, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x70, + 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, + 0xa2, 0x02, 0x04, 0x52, 0x44, 0x54, 0x53, 0xaa, 0x02, 0x16, 0x52, 0x61, 0x66, 0x61, 0x79, 0x2e, + 0x44, 0x65, 0x76, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x65, 0x6e, 0x74, 0x72, 0x79, + 0xca, 0x02, 0x16, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x54, 0x79, 0x70, + 0x65, 0x73, 0x5c, 0x53, 0x65, 0x6e, 0x74, 0x72, 0x79, 0xe2, 0x02, 0x22, 0x52, 0x61, 0x66, 0x61, + 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x5c, 0x53, 0x65, 0x6e, 0x74, + 0x72, 0x79, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, + 0x19, 0x52, 0x61, 0x66, 0x61, 0x79, 0x3a, 0x3a, 0x44, 0x65, 0x76, 0x3a, 0x3a, 0x54, 0x79, 0x70, + 0x65, 0x73, 0x3a, 0x3a, 0x53, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +} + +var ( + file_proto_types_sentry_account_permission_proto_rawDescOnce sync.Once + file_proto_types_sentry_account_permission_proto_rawDescData = file_proto_types_sentry_account_permission_proto_rawDesc +) + +func file_proto_types_sentry_account_permission_proto_rawDescGZIP() []byte { + file_proto_types_sentry_account_permission_proto_rawDescOnce.Do(func() { + file_proto_types_sentry_account_permission_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_types_sentry_account_permission_proto_rawDescData) + }) + return file_proto_types_sentry_account_permission_proto_rawDescData +} + +var file_proto_types_sentry_account_permission_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_proto_types_sentry_account_permission_proto_goTypes = []interface{}{ + (*PermissionURL)(nil), // 0: rafay.dev.types.sentry.PermissionURL + (*AccountPermission)(nil), // 1: rafay.dev.types.sentry.AccountPermission + (*SSOAccountGroupProjectRoleData)(nil), // 2: rafay.dev.types.sentry.SSOAccountGroupProjectRoleData + (*timestamppb.Timestamp)(nil), // 3: google.protobuf.Timestamp +} +var file_proto_types_sentry_account_permission_proto_depIdxs = []int32{ + 0, // 0: rafay.dev.types.sentry.AccountPermission.urls:type_name -> rafay.dev.types.sentry.PermissionURL + 3, // 1: rafay.dev.types.sentry.SSOAccountGroupProjectRoleData.lastLogin:type_name -> google.protobuf.Timestamp + 3, // 2: rafay.dev.types.sentry.SSOAccountGroupProjectRoleData.createdAt:type_name -> google.protobuf.Timestamp + 3, // 3: rafay.dev.types.sentry.SSOAccountGroupProjectRoleData.lastLogout:type_name -> google.protobuf.Timestamp + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_proto_types_sentry_account_permission_proto_init() } +func file_proto_types_sentry_account_permission_proto_init() { + if File_proto_types_sentry_account_permission_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_proto_types_sentry_account_permission_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PermissionURL); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_sentry_account_permission_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AccountPermission); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_sentry_account_permission_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SSOAccountGroupProjectRoleData); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_proto_types_sentry_account_permission_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_proto_types_sentry_account_permission_proto_goTypes, + DependencyIndexes: file_proto_types_sentry_account_permission_proto_depIdxs, + MessageInfos: file_proto_types_sentry_account_permission_proto_msgTypes, + }.Build() + File_proto_types_sentry_account_permission_proto = out.File + file_proto_types_sentry_account_permission_proto_rawDesc = nil + file_proto_types_sentry_account_permission_proto_goTypes = nil + file_proto_types_sentry_account_permission_proto_depIdxs = nil +} diff --git a/components/common/proto/types/sentry/account_permission.proto b/components/common/proto/types/sentry/account_permission.proto new file mode 100644 index 0000000..50ea4d9 --- /dev/null +++ b/components/common/proto/types/sentry/account_permission.proto @@ -0,0 +1,42 @@ +syntax = "proto3"; +package rafay.dev.types.sentry; + +import "google/protobuf/timestamp.proto"; + +message PermissionURL { + string url = 1; + repeated string methods = 2; +} + +message AccountPermission { + string accountID = 1; + string projectID = 2; + string organizationID = 3; + string partnerID = 4; + string roleName = 5; + bool isGlobal = 6; + string scope = 7; + string permissionName = 8; + string baseURL = 9; + repeated PermissionURL urls = 10; +} + +message SSOAccountGroupProjectRoleData { + string id = 1; + string userName = 2; + string roleName = 3; + string projectID = 4; + string projectName = 5; + string group = 6; + string accountOrganizationID = 7; + string organizationID = 8; + string partnerID = 9; + string scope = 10; + google.protobuf.Timestamp lastLogin = 11; + google.protobuf.Timestamp createdAt = 12; + string firstName = 13; + string lastName = 14; + string phone = 15; + string name = 16; + google.protobuf.Timestamp lastLogout = 17; +} \ No newline at end of file diff --git a/components/common/proto/types/sentry/bootstrapagentmode.enum.go b/components/common/proto/types/sentry/bootstrapagentmode.enum.go new file mode 100644 index 0000000..729831c --- /dev/null +++ b/components/common/proto/types/sentry/bootstrapagentmode.enum.go @@ -0,0 +1,41 @@ + +// Code generated by go generate; DO NOT EDIT. +package sentry + +import ( + driver "database/sql/driver" + bytes "bytes" +) + +// Scan converts database string to BootstrapAgentMode +func (e *BootstrapAgentMode) Scan(value interface{}) error { + s := value.([]byte) + *e = BootstrapAgentMode(BootstrapAgentMode_value[string(s)]) + return nil +} + +// Value converts BootstrapAgentMode into database string +func (e BootstrapAgentMode) Value() (driver.Value, error) { + return BootstrapAgentMode_name[int32(e)], nil +} + +// MarshalJSON converts BootstrapAgentMode to JSON +func (e BootstrapAgentMode) MarshalJSON() ([]byte, error) { + buffer := bytes.NewBufferString("\"") + buffer.WriteString(e.String()) + buffer.WriteString("\"") + return buffer.Bytes(), nil +} + +// UnmarshalJSON converts BootstrapAgentMode from JSON +func (e *BootstrapAgentMode) UnmarshalJSON(b []byte) error { + if b != nil { + *e = BootstrapAgentMode(BootstrapAgentMode_value[string(b[1:len(b)-1])]) + } + return nil +} + +// implement proto enum interface +func (e BootstrapAgentMode) IsEnum() { +} + diff --git a/components/common/proto/types/sentry/bootstrapagentstate.enum.go b/components/common/proto/types/sentry/bootstrapagentstate.enum.go new file mode 100644 index 0000000..edc0a81 --- /dev/null +++ b/components/common/proto/types/sentry/bootstrapagentstate.enum.go @@ -0,0 +1,41 @@ + +// Code generated by go generate; DO NOT EDIT. +package sentry + +import ( + driver "database/sql/driver" + bytes "bytes" +) + +// Scan converts database string to BootstrapAgentState +func (e *BootstrapAgentState) Scan(value interface{}) error { + s := value.([]byte) + *e = BootstrapAgentState(BootstrapAgentState_value[string(s)]) + return nil +} + +// Value converts BootstrapAgentState into database string +func (e BootstrapAgentState) Value() (driver.Value, error) { + return BootstrapAgentState_name[int32(e)], nil +} + +// MarshalJSON converts BootstrapAgentState to JSON +func (e BootstrapAgentState) MarshalJSON() ([]byte, error) { + buffer := bytes.NewBufferString("\"") + buffer.WriteString(e.String()) + buffer.WriteString("\"") + return buffer.Bytes(), nil +} + +// UnmarshalJSON converts BootstrapAgentState from JSON +func (e *BootstrapAgentState) UnmarshalJSON(b []byte) error { + if b != nil { + *e = BootstrapAgentState(BootstrapAgentState_value[string(b[1:len(b)-1])]) + } + return nil +} + +// implement proto enum interface +func (e BootstrapAgentState) IsEnum() { +} + diff --git a/components/common/proto/types/sentry/bootstrapagenttemplatetype.enum.go b/components/common/proto/types/sentry/bootstrapagenttemplatetype.enum.go new file mode 100644 index 0000000..7f51912 --- /dev/null +++ b/components/common/proto/types/sentry/bootstrapagenttemplatetype.enum.go @@ -0,0 +1,41 @@ + +// Code generated by go generate; DO NOT EDIT. +package sentry + +import ( + driver "database/sql/driver" + bytes "bytes" +) + +// Scan converts database string to BootstrapAgentTemplateType +func (e *BootstrapAgentTemplateType) Scan(value interface{}) error { + s := value.([]byte) + *e = BootstrapAgentTemplateType(BootstrapAgentTemplateType_value[string(s)]) + return nil +} + +// Value converts BootstrapAgentTemplateType into database string +func (e BootstrapAgentTemplateType) Value() (driver.Value, error) { + return BootstrapAgentTemplateType_name[int32(e)], nil +} + +// MarshalJSON converts BootstrapAgentTemplateType to JSON +func (e BootstrapAgentTemplateType) MarshalJSON() ([]byte, error) { + buffer := bytes.NewBufferString("\"") + buffer.WriteString(e.String()) + buffer.WriteString("\"") + return buffer.Bytes(), nil +} + +// UnmarshalJSON converts BootstrapAgentTemplateType from JSON +func (e *BootstrapAgentTemplateType) UnmarshalJSON(b []byte) error { + if b != nil { + *e = BootstrapAgentTemplateType(BootstrapAgentTemplateType_value[string(b[1:len(b)-1])]) + } + return nil +} + +// implement proto enum interface +func (e BootstrapAgentTemplateType) IsEnum() { +} + diff --git a/components/common/proto/types/sentry/bootstrapagenttype.enum.go b/components/common/proto/types/sentry/bootstrapagenttype.enum.go new file mode 100644 index 0000000..b0cf889 --- /dev/null +++ b/components/common/proto/types/sentry/bootstrapagenttype.enum.go @@ -0,0 +1,41 @@ + +// Code generated by go generate; DO NOT EDIT. +package sentry + +import ( + driver "database/sql/driver" + bytes "bytes" +) + +// Scan converts database string to BootstrapAgentType +func (e *BootstrapAgentType) Scan(value interface{}) error { + s := value.([]byte) + *e = BootstrapAgentType(BootstrapAgentType_value[string(s)]) + return nil +} + +// Value converts BootstrapAgentType into database string +func (e BootstrapAgentType) Value() (driver.Value, error) { + return BootstrapAgentType_name[int32(e)], nil +} + +// MarshalJSON converts BootstrapAgentType to JSON +func (e BootstrapAgentType) MarshalJSON() ([]byte, error) { + buffer := bytes.NewBufferString("\"") + buffer.WriteString(e.String()) + buffer.WriteString("\"") + return buffer.Bytes(), nil +} + +// UnmarshalJSON converts BootstrapAgentType from JSON +func (e *BootstrapAgentType) UnmarshalJSON(b []byte) error { + if b != nil { + *e = BootstrapAgentType(BootstrapAgentType_value[string(b[1:len(b)-1])]) + } + return nil +} + +// implement proto enum interface +func (e BootstrapAgentType) IsEnum() { +} + diff --git a/components/common/proto/types/sentry/bootstrapinfratype.enum.go b/components/common/proto/types/sentry/bootstrapinfratype.enum.go new file mode 100644 index 0000000..d90078a --- /dev/null +++ b/components/common/proto/types/sentry/bootstrapinfratype.enum.go @@ -0,0 +1,41 @@ + +// Code generated by go generate; DO NOT EDIT. +package sentry + +import ( + driver "database/sql/driver" + bytes "bytes" +) + +// Scan converts database string to BootstrapInfraType +func (e *BootstrapInfraType) Scan(value interface{}) error { + s := value.([]byte) + *e = BootstrapInfraType(BootstrapInfraType_value[string(s)]) + return nil +} + +// Value converts BootstrapInfraType into database string +func (e BootstrapInfraType) Value() (driver.Value, error) { + return BootstrapInfraType_name[int32(e)], nil +} + +// MarshalJSON converts BootstrapInfraType to JSON +func (e BootstrapInfraType) MarshalJSON() ([]byte, error) { + buffer := bytes.NewBufferString("\"") + buffer.WriteString(e.String()) + buffer.WriteString("\"") + return buffer.Bytes(), nil +} + +// UnmarshalJSON converts BootstrapInfraType from JSON +func (e *BootstrapInfraType) UnmarshalJSON(b []byte) error { + if b != nil { + *e = BootstrapInfraType(BootstrapInfraType_value[string(b[1:len(b)-1])]) + } + return nil +} + +// implement proto enum interface +func (e BootstrapInfraType) IsEnum() { +} + diff --git a/components/common/proto/types/sentry/bootstraptemplatehosttype.enum.go b/components/common/proto/types/sentry/bootstraptemplatehosttype.enum.go new file mode 100644 index 0000000..e231225 --- /dev/null +++ b/components/common/proto/types/sentry/bootstraptemplatehosttype.enum.go @@ -0,0 +1,41 @@ + +// Code generated by go generate; DO NOT EDIT. +package sentry + +import ( + driver "database/sql/driver" + bytes "bytes" +) + +// Scan converts database string to BootstrapTemplateHostType +func (e *BootstrapTemplateHostType) Scan(value interface{}) error { + s := value.([]byte) + *e = BootstrapTemplateHostType(BootstrapTemplateHostType_value[string(s)]) + return nil +} + +// Value converts BootstrapTemplateHostType into database string +func (e BootstrapTemplateHostType) Value() (driver.Value, error) { + return BootstrapTemplateHostType_name[int32(e)], nil +} + +// MarshalJSON converts BootstrapTemplateHostType to JSON +func (e BootstrapTemplateHostType) MarshalJSON() ([]byte, error) { + buffer := bytes.NewBufferString("\"") + buffer.WriteString(e.String()) + buffer.WriteString("\"") + return buffer.Bytes(), nil +} + +// UnmarshalJSON converts BootstrapTemplateHostType from JSON +func (e *BootstrapTemplateHostType) UnmarshalJSON(b []byte) error { + if b != nil { + *e = BootstrapTemplateHostType(BootstrapTemplateHostType_value[string(b[1:len(b)-1])]) + } + return nil +} + +// implement proto enum interface +func (e BootstrapTemplateHostType) IsEnum() { +} + diff --git a/components/common/proto/types/sentry/constants.go b/components/common/proto/types/sentry/constants.go new file mode 100644 index 0000000..cb1c022 --- /dev/null +++ b/components/common/proto/types/sentry/constants.go @@ -0,0 +1,80 @@ +package sentry + +// rafay specific annotations/labels keys +const ( + ConfigV2Group = "config.rafay.dev/v2" +) + +// kubectl/kubeconfig permissions +const ( + KubeconfigReadPermission = "kubeconfig.read" + KubectlFullAccessPermission = "kubectl.fullaccess" + KubectlClusterReadPermission = "kubectl.cluster.read" + KubectlClusterWritePermission = "kubectl.cluster.write" + KubectlNamespaceReadPermission = "kubectl.namespace.read" + KubectlNamespaceWritePermission = "kubectl.namespace.write" +) + +// GetKubeConfigClusterPermissions list of kubeconfig permissions +func GetKubeConfigClusterPermissions() []string { + return []string{ + KubeconfigReadPermission, + KubectlFullAccessPermission, + KubectlClusterReadPermission, + KubectlClusterWritePermission, + } +} + +// GetKubeConfigNameSpacePermissions list of kubeconfig permissions +func GetKubeConfigNameSpacePermissions() []string { + return []string{ + KubectlNamespaceReadPermission, + KubectlNamespaceWritePermission, + } +} + +// GetKubeConfigPermissionIsRead is read permission +func GetKubeConfigPermissionIsRead(permission string) bool { + switch permission { + case KubeconfigReadPermission: + return true + case KubectlNamespaceReadPermission: + return true + case KubectlClusterReadPermission: + return true + } + return false +} + +// GetKubeConfigPermissionPrivilage privilage order +func GetKubeConfigPermissionPrivilage(permission string) int { + switch permission { + case KubeconfigReadPermission: + return 0 + case KubectlNamespaceReadPermission: + return 1 + case KubectlNamespaceWritePermission: + return 2 + case KubectlClusterReadPermission: + return 3 + case KubectlClusterWritePermission: + return 4 + case KubectlFullAccessPermission: + return 5 + } + return -1 +} + +// kubeconfig setting scope +const ( + KubeconfigSettingOrganizationScope = "ORGANIZATION" + KubeconfigSettingUserScope = "USER" +) + +// Kind is kind of resource +type Kind = string + +// available config kinds +const ( + PartnerKind Kind = "Partner" +) diff --git a/components/common/proto/types/sentry/group_permission.pb.go b/components/common/proto/types/sentry/group_permission.pb.go new file mode 100644 index 0000000..6e56571 --- /dev/null +++ b/components/common/proto/types/sentry/group_permission.pb.go @@ -0,0 +1,280 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc (unknown) +// source: proto/types/sentry/group_permission.proto + +package sentry + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + _ "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GroupPermission struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + GroupID string `protobuf:"bytes,1,opt,name=groupID,proto3" json:"groupID,omitempty"` + ProjectID string `protobuf:"bytes,2,opt,name=projectID,proto3" json:"projectID,omitempty"` + OrganizationID string `protobuf:"bytes,3,opt,name=organizationID,proto3" json:"organizationID,omitempty"` + PartnerID string `protobuf:"bytes,4,opt,name=partnerID,proto3" json:"partnerID,omitempty"` + GroupName string `protobuf:"bytes,5,opt,name=groupName,proto3" json:"groupName,omitempty"` + RoleName string `protobuf:"bytes,6,opt,name=roleName,proto3" json:"roleName,omitempty"` + IsGlobal bool `protobuf:"varint,7,opt,name=isGlobal,proto3" json:"isGlobal,omitempty"` + Scope string `protobuf:"bytes,8,opt,name=scope,proto3" json:"scope,omitempty"` + PermissionName string `protobuf:"bytes,9,opt,name=permissionName,proto3" json:"permissionName,omitempty"` + BaseURL string `protobuf:"bytes,10,opt,name=baseURL,proto3" json:"baseURL,omitempty"` + Urls []*PermissionURL `protobuf:"bytes,11,rep,name=urls,proto3" json:"urls,omitempty"` + ProjectName string `protobuf:"bytes,12,opt,name=projectName,proto3" json:"projectName,omitempty"` +} + +func (x *GroupPermission) Reset() { + *x = GroupPermission{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_sentry_group_permission_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GroupPermission) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GroupPermission) ProtoMessage() {} + +func (x *GroupPermission) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_sentry_group_permission_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GroupPermission.ProtoReflect.Descriptor instead. +func (*GroupPermission) Descriptor() ([]byte, []int) { + return file_proto_types_sentry_group_permission_proto_rawDescGZIP(), []int{0} +} + +func (x *GroupPermission) GetGroupID() string { + if x != nil { + return x.GroupID + } + return "" +} + +func (x *GroupPermission) GetProjectID() string { + if x != nil { + return x.ProjectID + } + return "" +} + +func (x *GroupPermission) GetOrganizationID() string { + if x != nil { + return x.OrganizationID + } + return "" +} + +func (x *GroupPermission) GetPartnerID() string { + if x != nil { + return x.PartnerID + } + return "" +} + +func (x *GroupPermission) GetGroupName() string { + if x != nil { + return x.GroupName + } + return "" +} + +func (x *GroupPermission) GetRoleName() string { + if x != nil { + return x.RoleName + } + return "" +} + +func (x *GroupPermission) GetIsGlobal() bool { + if x != nil { + return x.IsGlobal + } + return false +} + +func (x *GroupPermission) GetScope() string { + if x != nil { + return x.Scope + } + return "" +} + +func (x *GroupPermission) GetPermissionName() string { + if x != nil { + return x.PermissionName + } + return "" +} + +func (x *GroupPermission) GetBaseURL() string { + if x != nil { + return x.BaseURL + } + return "" +} + +func (x *GroupPermission) GetUrls() []*PermissionURL { + if x != nil { + return x.Urls + } + return nil +} + +func (x *GroupPermission) GetProjectName() string { + if x != nil { + return x.ProjectName + } + return "" +} + +var File_proto_types_sentry_group_permission_proto protoreflect.FileDescriptor + +var file_proto_types_sentry_group_permission_proto_rawDesc = []byte{ + 0x0a, 0x29, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x73, 0x65, + 0x6e, 0x74, 0x72, 0x79, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x70, 0x65, 0x72, 0x6d, 0x69, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x72, 0x61, 0x66, + 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x6e, + 0x74, 0x72, 0x79, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2b, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x2f, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x5f, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0x9a, 0x03, 0x0a, 0x0f, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x65, 0x72, 0x6d, 0x69, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x12, + 0x1c, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x44, 0x12, 0x26, 0x0a, + 0x0e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, + 0x49, 0x44, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, + 0x72, 0x49, 0x44, 0x12, 0x1c, 0x0a, 0x09, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x61, 0x6d, 0x65, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x61, 0x6d, + 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x6f, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x6f, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, + 0x08, 0x69, 0x73, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x08, 0x69, 0x73, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, + 0x70, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x12, + 0x26, 0x0a, 0x0e, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, + 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x61, 0x73, 0x65, 0x55, + 0x52, 0x4c, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x62, 0x61, 0x73, 0x65, 0x55, 0x52, + 0x4c, 0x12, 0x39, 0x0a, 0x04, 0x75, 0x72, 0x6c, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x25, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x55, 0x52, 0x4c, 0x52, 0x04, 0x75, 0x72, 0x6c, 0x73, 0x12, 0x20, 0x0a, 0x0b, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x42, 0xf8, + 0x01, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, + 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x14, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x48, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x52, 0x61, 0x66, 0x61, 0x79, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x2f, 0x72, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, + 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0xa2, + 0x02, 0x04, 0x52, 0x44, 0x54, 0x53, 0xaa, 0x02, 0x16, 0x52, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x44, + 0x65, 0x76, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x65, 0x6e, 0x74, 0x72, 0x79, 0xca, + 0x02, 0x16, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x54, 0x79, 0x70, 0x65, + 0x73, 0x5c, 0x53, 0x65, 0x6e, 0x74, 0x72, 0x79, 0xe2, 0x02, 0x22, 0x52, 0x61, 0x66, 0x61, 0x79, + 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x5c, 0x53, 0x65, 0x6e, 0x74, 0x72, + 0x79, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x19, + 0x52, 0x61, 0x66, 0x61, 0x79, 0x3a, 0x3a, 0x44, 0x65, 0x76, 0x3a, 0x3a, 0x54, 0x79, 0x70, 0x65, + 0x73, 0x3a, 0x3a, 0x53, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_proto_types_sentry_group_permission_proto_rawDescOnce sync.Once + file_proto_types_sentry_group_permission_proto_rawDescData = file_proto_types_sentry_group_permission_proto_rawDesc +) + +func file_proto_types_sentry_group_permission_proto_rawDescGZIP() []byte { + file_proto_types_sentry_group_permission_proto_rawDescOnce.Do(func() { + file_proto_types_sentry_group_permission_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_types_sentry_group_permission_proto_rawDescData) + }) + return file_proto_types_sentry_group_permission_proto_rawDescData +} + +var file_proto_types_sentry_group_permission_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_proto_types_sentry_group_permission_proto_goTypes = []interface{}{ + (*GroupPermission)(nil), // 0: rafay.dev.types.sentry.GroupPermission + (*PermissionURL)(nil), // 1: rafay.dev.types.sentry.PermissionURL +} +var file_proto_types_sentry_group_permission_proto_depIdxs = []int32{ + 1, // 0: rafay.dev.types.sentry.GroupPermission.urls:type_name -> rafay.dev.types.sentry.PermissionURL + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_proto_types_sentry_group_permission_proto_init() } +func file_proto_types_sentry_group_permission_proto_init() { + if File_proto_types_sentry_group_permission_proto != nil { + return + } + file_proto_types_sentry_account_permission_proto_init() + if !protoimpl.UnsafeEnabled { + file_proto_types_sentry_group_permission_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GroupPermission); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_proto_types_sentry_group_permission_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_proto_types_sentry_group_permission_proto_goTypes, + DependencyIndexes: file_proto_types_sentry_group_permission_proto_depIdxs, + MessageInfos: file_proto_types_sentry_group_permission_proto_msgTypes, + }.Build() + File_proto_types_sentry_group_permission_proto = out.File + file_proto_types_sentry_group_permission_proto_rawDesc = nil + file_proto_types_sentry_group_permission_proto_goTypes = nil + file_proto_types_sentry_group_permission_proto_depIdxs = nil +} diff --git a/components/common/proto/types/sentry/group_permission.proto b/components/common/proto/types/sentry/group_permission.proto new file mode 100644 index 0000000..deaace8 --- /dev/null +++ b/components/common/proto/types/sentry/group_permission.proto @@ -0,0 +1,20 @@ +syntax = "proto3"; +package rafay.dev.types.sentry; + +import "google/protobuf/timestamp.proto"; +import "proto/types/sentry/account_permission.proto"; + +message GroupPermission { + string groupID = 1; + string projectID = 2; + string organizationID = 3; + string partnerID = 4; + string groupName = 5; + string roleName = 6; + bool isGlobal = 7; + string scope = 8; + string permissionName = 9; + string baseURL = 10; + repeated rafay.dev.types.sentry.PermissionURL urls = 11; + string projectName = 12; +} \ No newline at end of file diff --git a/components/common/proto/types/sentry/kubeconfig_setting.pb.go b/components/common/proto/types/sentry/kubeconfig_setting.pb.go new file mode 100644 index 0000000..35c2e1a --- /dev/null +++ b/components/common/proto/types/sentry/kubeconfig_setting.pb.go @@ -0,0 +1,455 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc (unknown) +// source: proto/types/sentry/kubeconfig_setting.proto + +package sentry + +import ( + _ "github.com/gogo/protobuf/gogoproto" + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type KubeconfigRevocation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + OrganizationID string `protobuf:"bytes,2,opt,name=organizationID,proto3" json:"organizationID,omitempty"` + PartnerID string `protobuf:"bytes,3,opt,name=partnerID,proto3" json:"partnerID,omitempty"` + AccountID string `protobuf:"bytes,4,opt,name=accountID,proto3" json:"accountID,omitempty"` + IsSSOUser bool `protobuf:"varint,5,opt,name=isSSOUser,proto3" json:"isSSOUser,omitempty"` + RevokedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=revokedAt,proto3" json:"revokedAt,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=createdAt,proto3" json:"createdAt,omitempty"` +} + +func (x *KubeconfigRevocation) Reset() { + *x = KubeconfigRevocation{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_sentry_kubeconfig_setting_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *KubeconfigRevocation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*KubeconfigRevocation) ProtoMessage() {} + +func (x *KubeconfigRevocation) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_sentry_kubeconfig_setting_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use KubeconfigRevocation.ProtoReflect.Descriptor instead. +func (*KubeconfigRevocation) Descriptor() ([]byte, []int) { + return file_proto_types_sentry_kubeconfig_setting_proto_rawDescGZIP(), []int{0} +} + +func (x *KubeconfigRevocation) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *KubeconfigRevocation) GetOrganizationID() string { + if x != nil { + return x.OrganizationID + } + return "" +} + +func (x *KubeconfigRevocation) GetPartnerID() string { + if x != nil { + return x.PartnerID + } + return "" +} + +func (x *KubeconfigRevocation) GetAccountID() string { + if x != nil { + return x.AccountID + } + return "" +} + +func (x *KubeconfigRevocation) GetIsSSOUser() bool { + if x != nil { + return x.IsSSOUser + } + return false +} + +func (x *KubeconfigRevocation) GetRevokedAt() *timestamppb.Timestamp { + if x != nil { + return x.RevokedAt + } + return nil +} + +func (x *KubeconfigRevocation) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +type KubeconfigSetting struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + OrganizationID string `protobuf:"bytes,2,opt,name=organizationID,proto3" json:"organizationID,omitempty"` + PartnerID string `protobuf:"bytes,3,opt,name=partnerID,proto3" json:"partnerID,omitempty"` + AccountID string `protobuf:"bytes,4,opt,name=accountID,proto3" json:"accountID,omitempty"` + Scope string `protobuf:"bytes,5,opt,name=scope,proto3" json:"scope,omitempty"` + ValiditySeconds int64 `protobuf:"zigzag64,6,opt,name=validitySeconds,proto3" json:"validitySeconds,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=createdAt,proto3" json:"createdAt,omitempty"` + ModifiedAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=modifiedAt,proto3" json:"modifiedAt,omitempty"` + DeletedAt *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=deletedAt,proto3" json:"deletedAt,omitempty"` + EnableSessionCheck bool `protobuf:"varint,10,opt,name=enableSessionCheck,proto3" json:"enableSessionCheck,omitempty"` + IsSSOUser bool `protobuf:"varint,11,opt,name=isSSOUser,proto3" json:"isSSOUser,omitempty"` + EnablePrivateRelay bool `protobuf:"varint,12,opt,name=enablePrivateRelay,proto3" json:"enablePrivateRelay,omitempty"` + EnforceOrgAdminSecretAccess bool `protobuf:"varint,13,opt,name=enforceOrgAdminSecretAccess,proto3" json:"enforceOrgAdminSecretAccess,omitempty"` + DisableWebKubectl bool `protobuf:"varint,14,opt,name=disableWebKubectl,proto3" json:"disableWebKubectl,omitempty"` + DisableCLIKubectl bool `protobuf:"varint,15,opt,name=disableCLIKubectl,proto3" json:"disableCLIKubectl,omitempty"` +} + +func (x *KubeconfigSetting) Reset() { + *x = KubeconfigSetting{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_sentry_kubeconfig_setting_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *KubeconfigSetting) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*KubeconfigSetting) ProtoMessage() {} + +func (x *KubeconfigSetting) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_sentry_kubeconfig_setting_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use KubeconfigSetting.ProtoReflect.Descriptor instead. +func (*KubeconfigSetting) Descriptor() ([]byte, []int) { + return file_proto_types_sentry_kubeconfig_setting_proto_rawDescGZIP(), []int{1} +} + +func (x *KubeconfigSetting) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *KubeconfigSetting) GetOrganizationID() string { + if x != nil { + return x.OrganizationID + } + return "" +} + +func (x *KubeconfigSetting) GetPartnerID() string { + if x != nil { + return x.PartnerID + } + return "" +} + +func (x *KubeconfigSetting) GetAccountID() string { + if x != nil { + return x.AccountID + } + return "" +} + +func (x *KubeconfigSetting) GetScope() string { + if x != nil { + return x.Scope + } + return "" +} + +func (x *KubeconfigSetting) GetValiditySeconds() int64 { + if x != nil { + return x.ValiditySeconds + } + return 0 +} + +func (x *KubeconfigSetting) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *KubeconfigSetting) GetModifiedAt() *timestamppb.Timestamp { + if x != nil { + return x.ModifiedAt + } + return nil +} + +func (x *KubeconfigSetting) GetDeletedAt() *timestamppb.Timestamp { + if x != nil { + return x.DeletedAt + } + return nil +} + +func (x *KubeconfigSetting) GetEnableSessionCheck() bool { + if x != nil { + return x.EnableSessionCheck + } + return false +} + +func (x *KubeconfigSetting) GetIsSSOUser() bool { + if x != nil { + return x.IsSSOUser + } + return false +} + +func (x *KubeconfigSetting) GetEnablePrivateRelay() bool { + if x != nil { + return x.EnablePrivateRelay + } + return false +} + +func (x *KubeconfigSetting) GetEnforceOrgAdminSecretAccess() bool { + if x != nil { + return x.EnforceOrgAdminSecretAccess + } + return false +} + +func (x *KubeconfigSetting) GetDisableWebKubectl() bool { + if x != nil { + return x.DisableWebKubectl + } + return false +} + +func (x *KubeconfigSetting) GetDisableCLIKubectl() bool { + if x != nil { + return x.DisableCLIKubectl + } + return false +} + +var File_proto_types_sentry_kubeconfig_setting_proto protoreflect.FileDescriptor + +var file_proto_types_sentry_kubeconfig_setting_proto_rawDesc = []byte{ + 0x0a, 0x2b, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x73, 0x65, + 0x6e, 0x74, 0x72, 0x79, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, + 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x72, + 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, + 0x65, 0x6e, 0x74, 0x72, 0x79, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, + 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xad, 0x02, 0x0a, + 0x14, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x76, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x26, 0x0a, 0x0e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, + 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x1c, 0x0a, + 0x09, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x49, 0x44, 0x12, 0x1c, 0x0a, 0x09, 0x61, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x44, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x44, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x73, 0x53, + 0x53, 0x4f, 0x55, 0x73, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, + 0x53, 0x53, 0x4f, 0x55, 0x73, 0x65, 0x72, 0x12, 0x3e, 0x0a, 0x09, 0x72, 0x65, 0x76, 0x6f, 0x6b, + 0x65, 0x64, 0x41, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x04, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x09, 0x72, 0x65, + 0x76, 0x6f, 0x6b, 0x65, 0x64, 0x41, 0x74, 0x12, 0x43, 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x64, 0x41, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x09, 0x92, 0x41, 0x02, 0x40, 0x01, 0x90, 0xdf, 0x1f, + 0x01, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xb4, 0x05, 0x0a, + 0x11, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x65, 0x74, 0x74, 0x69, + 0x6e, 0x67, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, + 0x69, 0x64, 0x12, 0x26, 0x0a, 0x0e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x72, 0x67, 0x61, + 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x61, + 0x72, 0x74, 0x6e, 0x65, 0x72, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, + 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x49, 0x44, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x49, 0x44, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x44, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x28, 0x0a, 0x0f, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x69, 0x74, 0x79, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x12, 0x52, 0x0f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x69, 0x74, 0x79, 0x53, + 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x12, 0x43, 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x64, 0x41, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x09, 0x92, 0x41, 0x02, 0x40, 0x01, 0x90, 0xdf, 0x1f, 0x01, + 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x45, 0x0a, 0x0a, 0x6d, + 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x41, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x09, 0x92, 0x41, 0x02, + 0x40, 0x01, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x0a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, + 0x41, 0x74, 0x12, 0x43, 0x0a, 0x09, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, + 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x42, 0x09, 0x92, 0x41, 0x02, 0x40, 0x01, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x09, 0x64, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x2e, 0x0a, 0x12, 0x65, 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x18, 0x0a, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x12, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x73, 0x53, 0x53, 0x4f, + 0x55, 0x73, 0x65, 0x72, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x53, 0x53, + 0x4f, 0x55, 0x73, 0x65, 0x72, 0x12, 0x2e, 0x0a, 0x12, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x50, + 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x18, 0x0c, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x12, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, + 0x52, 0x65, 0x6c, 0x61, 0x79, 0x12, 0x40, 0x0a, 0x1b, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, + 0x4f, 0x72, 0x67, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x41, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1b, 0x65, 0x6e, 0x66, 0x6f, + 0x72, 0x63, 0x65, 0x4f, 0x72, 0x67, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x53, 0x65, 0x63, 0x72, 0x65, + 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x2c, 0x0a, 0x11, 0x64, 0x69, 0x73, 0x61, 0x62, + 0x6c, 0x65, 0x57, 0x65, 0x62, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x74, 0x6c, 0x18, 0x0e, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x11, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x57, 0x65, 0x62, 0x4b, 0x75, + 0x62, 0x65, 0x63, 0x74, 0x6c, 0x12, 0x2c, 0x0a, 0x11, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, + 0x43, 0x4c, 0x49, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x74, 0x6c, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x11, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x4c, 0x49, 0x4b, 0x75, 0x62, 0x65, + 0x63, 0x74, 0x6c, 0x42, 0xfa, 0x01, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x72, 0x61, 0x66, 0x61, + 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x6e, 0x74, + 0x72, 0x79, 0x42, 0x16, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x65, + 0x74, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x48, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x61, 0x66, 0x61, 0x79, 0x53, 0x79, + 0x73, 0x74, 0x65, 0x6d, 0x73, 0x2f, 0x72, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x62, 0x61, 0x73, + 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, + 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0xa2, 0x02, 0x04, 0x52, 0x44, 0x54, 0x53, 0xaa, 0x02, 0x16, + 0x52, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x44, 0x65, 0x76, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x2e, + 0x53, 0x65, 0x6e, 0x74, 0x72, 0x79, 0xca, 0x02, 0x16, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, + 0x65, 0x76, 0x5c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x5c, 0x53, 0x65, 0x6e, 0x74, 0x72, 0x79, 0xe2, + 0x02, 0x22, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x54, 0x79, 0x70, 0x65, + 0x73, 0x5c, 0x53, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x19, 0x52, 0x61, 0x66, 0x61, 0x79, 0x3a, 0x3a, 0x44, 0x65, + 0x76, 0x3a, 0x3a, 0x54, 0x79, 0x70, 0x65, 0x73, 0x3a, 0x3a, 0x53, 0x65, 0x6e, 0x74, 0x72, 0x79, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_proto_types_sentry_kubeconfig_setting_proto_rawDescOnce sync.Once + file_proto_types_sentry_kubeconfig_setting_proto_rawDescData = file_proto_types_sentry_kubeconfig_setting_proto_rawDesc +) + +func file_proto_types_sentry_kubeconfig_setting_proto_rawDescGZIP() []byte { + file_proto_types_sentry_kubeconfig_setting_proto_rawDescOnce.Do(func() { + file_proto_types_sentry_kubeconfig_setting_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_types_sentry_kubeconfig_setting_proto_rawDescData) + }) + return file_proto_types_sentry_kubeconfig_setting_proto_rawDescData +} + +var file_proto_types_sentry_kubeconfig_setting_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_proto_types_sentry_kubeconfig_setting_proto_goTypes = []interface{}{ + (*KubeconfigRevocation)(nil), // 0: rafay.dev.types.sentry.KubeconfigRevocation + (*KubeconfigSetting)(nil), // 1: rafay.dev.types.sentry.KubeconfigSetting + (*timestamppb.Timestamp)(nil), // 2: google.protobuf.Timestamp +} +var file_proto_types_sentry_kubeconfig_setting_proto_depIdxs = []int32{ + 2, // 0: rafay.dev.types.sentry.KubeconfigRevocation.revokedAt:type_name -> google.protobuf.Timestamp + 2, // 1: rafay.dev.types.sentry.KubeconfigRevocation.createdAt:type_name -> google.protobuf.Timestamp + 2, // 2: rafay.dev.types.sentry.KubeconfigSetting.createdAt:type_name -> google.protobuf.Timestamp + 2, // 3: rafay.dev.types.sentry.KubeconfigSetting.modifiedAt:type_name -> google.protobuf.Timestamp + 2, // 4: rafay.dev.types.sentry.KubeconfigSetting.deletedAt:type_name -> google.protobuf.Timestamp + 5, // [5:5] is the sub-list for method output_type + 5, // [5:5] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_proto_types_sentry_kubeconfig_setting_proto_init() } +func file_proto_types_sentry_kubeconfig_setting_proto_init() { + if File_proto_types_sentry_kubeconfig_setting_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_proto_types_sentry_kubeconfig_setting_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*KubeconfigRevocation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_sentry_kubeconfig_setting_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*KubeconfigSetting); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_proto_types_sentry_kubeconfig_setting_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_proto_types_sentry_kubeconfig_setting_proto_goTypes, + DependencyIndexes: file_proto_types_sentry_kubeconfig_setting_proto_depIdxs, + MessageInfos: file_proto_types_sentry_kubeconfig_setting_proto_msgTypes, + }.Build() + File_proto_types_sentry_kubeconfig_setting_proto = out.File + file_proto_types_sentry_kubeconfig_setting_proto_rawDesc = nil + file_proto_types_sentry_kubeconfig_setting_proto_goTypes = nil + file_proto_types_sentry_kubeconfig_setting_proto_depIdxs = nil +} diff --git a/components/common/proto/types/sentry/kubeconfig_setting.proto b/components/common/proto/types/sentry/kubeconfig_setting.proto new file mode 100644 index 0000000..e2ff031 --- /dev/null +++ b/components/common/proto/types/sentry/kubeconfig_setting.proto @@ -0,0 +1,61 @@ +syntax = "proto3"; +package rafay.dev.types.sentry; + +import "gogoproto/gogo.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; +import "google/protobuf/timestamp.proto"; + +message KubeconfigRevocation { + string id = 1; + string organizationID = 2; + string partnerID = 3; + string accountID = 4; + bool isSSOUser = 5; + google.protobuf.Timestamp revokedAt = 6 [ + (gogoproto.stdtime) = true + ]; + google.protobuf.Timestamp createdAt = 7 [ + (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + read_only : true + }, + (gogoproto.stdtime) = true + ]; +} + +message KubeconfigSetting { + string id = 1; + string organizationID = 2; + string partnerID = 3; + string accountID = 4; + string scope = 5; + sint64 validitySeconds = 6; + google.protobuf.Timestamp createdAt = 7 [ + (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + read_only : true + }, + (gogoproto.stdtime) = true + ]; + google.protobuf.Timestamp modifiedAt = 8 [ + (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + read_only : true + }, + (gogoproto.stdtime) = true + ]; + google.protobuf.Timestamp deletedAt = 9 [ + (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + read_only : true + }, + (gogoproto.stdtime) = true + ]; + bool enableSessionCheck = 10; + + bool isSSOUser = 11; + + bool enablePrivateRelay = 12; + + bool enforceOrgAdminSecretAccess = 13; + + bool disableWebKubectl = 14; + + bool disableCLIKubectl = 15; +} \ No newline at end of file diff --git a/components/common/proto/types/sentry/kubectl_cluster_setting.pb.go b/components/common/proto/types/sentry/kubectl_cluster_setting.pb.go new file mode 100644 index 0000000..045c7c0 --- /dev/null +++ b/components/common/proto/types/sentry/kubectl_cluster_setting.pb.go @@ -0,0 +1,253 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc (unknown) +// source: proto/types/sentry/kubectl_cluster_setting.proto + +package sentry + +import ( + _ "github.com/gogo/protobuf/gogoproto" + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type KubectlClusterSettings struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + OrganizationID string `protobuf:"bytes,2,opt,name=organizationID,proto3" json:"organizationID,omitempty"` + PartnerID string `protobuf:"bytes,3,opt,name=partnerID,proto3" json:"partnerID,omitempty"` + DisableWebKubectl bool `protobuf:"varint,4,opt,name=disableWebKubectl,proto3" json:"disableWebKubectl,omitempty"` + DisableCLIKubectl bool `protobuf:"varint,5,opt,name=disableCLIKubectl,proto3" json:"disableCLIKubectl,omitempty"` + ModifiedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=modifiedAt,proto3" json:"modifiedAt,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=createdAt,proto3" json:"createdAt,omitempty"` + DeletedAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=deletedAt,proto3" json:"deletedAt,omitempty"` +} + +func (x *KubectlClusterSettings) Reset() { + *x = KubectlClusterSettings{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_sentry_kubectl_cluster_setting_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *KubectlClusterSettings) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*KubectlClusterSettings) ProtoMessage() {} + +func (x *KubectlClusterSettings) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_sentry_kubectl_cluster_setting_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use KubectlClusterSettings.ProtoReflect.Descriptor instead. +func (*KubectlClusterSettings) Descriptor() ([]byte, []int) { + return file_proto_types_sentry_kubectl_cluster_setting_proto_rawDescGZIP(), []int{0} +} + +func (x *KubectlClusterSettings) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *KubectlClusterSettings) GetOrganizationID() string { + if x != nil { + return x.OrganizationID + } + return "" +} + +func (x *KubectlClusterSettings) GetPartnerID() string { + if x != nil { + return x.PartnerID + } + return "" +} + +func (x *KubectlClusterSettings) GetDisableWebKubectl() bool { + if x != nil { + return x.DisableWebKubectl + } + return false +} + +func (x *KubectlClusterSettings) GetDisableCLIKubectl() bool { + if x != nil { + return x.DisableCLIKubectl + } + return false +} + +func (x *KubectlClusterSettings) GetModifiedAt() *timestamppb.Timestamp { + if x != nil { + return x.ModifiedAt + } + return nil +} + +func (x *KubectlClusterSettings) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *KubectlClusterSettings) GetDeletedAt() *timestamppb.Timestamp { + if x != nil { + return x.DeletedAt + } + return nil +} + +var File_proto_types_sentry_kubectl_cluster_setting_proto protoreflect.FileDescriptor + +var file_proto_types_sentry_kubectl_cluster_setting_proto_rawDesc = []byte{ + 0x0a, 0x30, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x73, 0x65, + 0x6e, 0x74, 0x72, 0x79, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x63, 0x74, 0x6c, 0x5f, 0x63, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x16, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, + 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0x9f, 0x03, 0x0a, 0x16, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x74, 0x6c, 0x43, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x26, 0x0a, 0x0e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, + 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x74, + 0x6e, 0x65, 0x72, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x72, + 0x74, 0x6e, 0x65, 0x72, 0x49, 0x44, 0x12, 0x2c, 0x0a, 0x11, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, + 0x65, 0x57, 0x65, 0x62, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x74, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x11, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x57, 0x65, 0x62, 0x4b, 0x75, 0x62, + 0x65, 0x63, 0x74, 0x6c, 0x12, 0x2c, 0x0a, 0x11, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x43, + 0x4c, 0x49, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x74, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x11, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x4c, 0x49, 0x4b, 0x75, 0x62, 0x65, 0x63, + 0x74, 0x6c, 0x12, 0x45, 0x0a, 0x0a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x41, 0x74, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x42, 0x09, 0x92, 0x41, 0x02, 0x40, 0x01, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x0a, 0x6d, + 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x41, 0x74, 0x12, 0x43, 0x0a, 0x09, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x09, 0x92, 0x41, 0x02, 0x40, 0x01, 0x90, + 0xdf, 0x1f, 0x01, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x43, + 0x0a, 0x09, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x09, 0x92, + 0x41, 0x02, 0x40, 0x01, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x09, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x64, 0x41, 0x74, 0x42, 0xfe, 0x01, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x72, 0x61, 0x66, 0x61, + 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x6e, 0x74, + 0x72, 0x79, 0x42, 0x1a, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x74, 0x6c, 0x43, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x48, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x61, 0x66, + 0x61, 0x79, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x2f, 0x72, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2d, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, + 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, + 0x70, 0x65, 0x73, 0x2f, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0xa2, 0x02, 0x04, 0x52, 0x44, 0x54, + 0x53, 0xaa, 0x02, 0x16, 0x52, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x44, 0x65, 0x76, 0x2e, 0x54, 0x79, + 0x70, 0x65, 0x73, 0x2e, 0x53, 0x65, 0x6e, 0x74, 0x72, 0x79, 0xca, 0x02, 0x16, 0x52, 0x61, 0x66, + 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x5c, 0x53, 0x65, 0x6e, + 0x74, 0x72, 0x79, 0xe2, 0x02, 0x22, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, + 0x54, 0x79, 0x70, 0x65, 0x73, 0x5c, 0x53, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x5c, 0x47, 0x50, 0x42, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x19, 0x52, 0x61, 0x66, 0x61, 0x79, + 0x3a, 0x3a, 0x44, 0x65, 0x76, 0x3a, 0x3a, 0x54, 0x79, 0x70, 0x65, 0x73, 0x3a, 0x3a, 0x53, 0x65, + 0x6e, 0x74, 0x72, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_proto_types_sentry_kubectl_cluster_setting_proto_rawDescOnce sync.Once + file_proto_types_sentry_kubectl_cluster_setting_proto_rawDescData = file_proto_types_sentry_kubectl_cluster_setting_proto_rawDesc +) + +func file_proto_types_sentry_kubectl_cluster_setting_proto_rawDescGZIP() []byte { + file_proto_types_sentry_kubectl_cluster_setting_proto_rawDescOnce.Do(func() { + file_proto_types_sentry_kubectl_cluster_setting_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_types_sentry_kubectl_cluster_setting_proto_rawDescData) + }) + return file_proto_types_sentry_kubectl_cluster_setting_proto_rawDescData +} + +var file_proto_types_sentry_kubectl_cluster_setting_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_proto_types_sentry_kubectl_cluster_setting_proto_goTypes = []interface{}{ + (*KubectlClusterSettings)(nil), // 0: rafay.dev.types.sentry.KubectlClusterSettings + (*timestamppb.Timestamp)(nil), // 1: google.protobuf.Timestamp +} +var file_proto_types_sentry_kubectl_cluster_setting_proto_depIdxs = []int32{ + 1, // 0: rafay.dev.types.sentry.KubectlClusterSettings.modifiedAt:type_name -> google.protobuf.Timestamp + 1, // 1: rafay.dev.types.sentry.KubectlClusterSettings.createdAt:type_name -> google.protobuf.Timestamp + 1, // 2: rafay.dev.types.sentry.KubectlClusterSettings.deletedAt:type_name -> google.protobuf.Timestamp + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_proto_types_sentry_kubectl_cluster_setting_proto_init() } +func file_proto_types_sentry_kubectl_cluster_setting_proto_init() { + if File_proto_types_sentry_kubectl_cluster_setting_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_proto_types_sentry_kubectl_cluster_setting_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*KubectlClusterSettings); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_proto_types_sentry_kubectl_cluster_setting_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_proto_types_sentry_kubectl_cluster_setting_proto_goTypes, + DependencyIndexes: file_proto_types_sentry_kubectl_cluster_setting_proto_depIdxs, + MessageInfos: file_proto_types_sentry_kubectl_cluster_setting_proto_msgTypes, + }.Build() + File_proto_types_sentry_kubectl_cluster_setting_proto = out.File + file_proto_types_sentry_kubectl_cluster_setting_proto_rawDesc = nil + file_proto_types_sentry_kubectl_cluster_setting_proto_goTypes = nil + file_proto_types_sentry_kubectl_cluster_setting_proto_depIdxs = nil +} diff --git a/components/common/proto/types/sentry/kubectl_cluster_setting.proto b/components/common/proto/types/sentry/kubectl_cluster_setting.proto new file mode 100644 index 0000000..c20b030 --- /dev/null +++ b/components/common/proto/types/sentry/kubectl_cluster_setting.proto @@ -0,0 +1,35 @@ +syntax = "proto3"; +package rafay.dev.types.sentry; + +import "gogoproto/gogo.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; +import "google/protobuf/timestamp.proto"; + +message KubectlClusterSettings { + string name = 1; + string organizationID = 2; + string partnerID = 3; + bool disableWebKubectl = 4; + bool disableCLIKubectl = 5; + + google.protobuf.Timestamp modifiedAt = 6 [ + (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + read_only : true + }, + (gogoproto.stdtime) = true + ]; + + google.protobuf.Timestamp createdAt = 7 [ + (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + read_only : true + }, + (gogoproto.stdtime) = true + ]; + + google.protobuf.Timestamp deletedAt = 8 [ + (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + read_only : true + }, + (gogoproto.stdtime) = true + ]; +} diff --git a/components/common/proto/types/sentry/sentry.pb.go b/components/common/proto/types/sentry/sentry.pb.go new file mode 100644 index 0000000..5a3967b --- /dev/null +++ b/components/common/proto/types/sentry/sentry.pb.go @@ -0,0 +1,1786 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc (unknown) +// source: proto/types/sentry/sentry.proto + +package sentry + +import ( + v3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/commonpb/v3" + _ "github.com/RafaySystems/rcloud-base/components/common/proto/types/config" + _ "github.com/gogo/protobuf/gogoproto" + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type BootstrapInfraType int32 + +const ( + BootstrapInfraType_ClusterBootstrapInfra BootstrapInfraType = 0 +) + +// Enum value maps for BootstrapInfraType. +var ( + BootstrapInfraType_name = map[int32]string{ + 0: "ClusterBootstrapInfra", + } + BootstrapInfraType_value = map[string]int32{ + "ClusterBootstrapInfra": 0, + } +) + +func (x BootstrapInfraType) Enum() *BootstrapInfraType { + p := new(BootstrapInfraType) + *p = x + return p +} + +func (x BootstrapInfraType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (BootstrapInfraType) Descriptor() protoreflect.EnumDescriptor { + return file_proto_types_sentry_sentry_proto_enumTypes[0].Descriptor() +} + +func (BootstrapInfraType) Type() protoreflect.EnumType { + return &file_proto_types_sentry_sentry_proto_enumTypes[0] +} + +func (x BootstrapInfraType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use BootstrapInfraType.Descriptor instead. +func (BootstrapInfraType) EnumDescriptor() ([]byte, []int) { + return file_proto_types_sentry_sentry_proto_rawDescGZIP(), []int{0} +} + +type BootstrapAgentType int32 + +const ( + BootstrapAgentType_RafayConnector BootstrapAgentType = 0 + BootstrapAgentType_RelayAgent BootstrapAgentType = 1 + BootstrapAgentType_PipelineAgent BootstrapAgentType = 2 +) + +// Enum value maps for BootstrapAgentType. +var ( + BootstrapAgentType_name = map[int32]string{ + 0: "RafayConnector", + 1: "RelayAgent", + 2: "PipelineAgent", + } + BootstrapAgentType_value = map[string]int32{ + "RafayConnector": 0, + "RelayAgent": 1, + "PipelineAgent": 2, + } +) + +func (x BootstrapAgentType) Enum() *BootstrapAgentType { + p := new(BootstrapAgentType) + *p = x + return p +} + +func (x BootstrapAgentType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (BootstrapAgentType) Descriptor() protoreflect.EnumDescriptor { + return file_proto_types_sentry_sentry_proto_enumTypes[1].Descriptor() +} + +func (BootstrapAgentType) Type() protoreflect.EnumType { + return &file_proto_types_sentry_sentry_proto_enumTypes[1] +} + +func (x BootstrapAgentType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use BootstrapAgentType.Descriptor instead. +func (BootstrapAgentType) EnumDescriptor() ([]byte, []int) { + return file_proto_types_sentry_sentry_proto_rawDescGZIP(), []int{1} +} + +type BootstrapAgentMode int32 + +const ( + BootstrapAgentMode_InCluster BootstrapAgentMode = 0 + BootstrapAgentMode_OutOfCluster BootstrapAgentMode = 1 +) + +// Enum value maps for BootstrapAgentMode. +var ( + BootstrapAgentMode_name = map[int32]string{ + 0: "InCluster", + 1: "OutOfCluster", + } + BootstrapAgentMode_value = map[string]int32{ + "InCluster": 0, + "OutOfCluster": 1, + } +) + +func (x BootstrapAgentMode) Enum() *BootstrapAgentMode { + p := new(BootstrapAgentMode) + *p = x + return p +} + +func (x BootstrapAgentMode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (BootstrapAgentMode) Descriptor() protoreflect.EnumDescriptor { + return file_proto_types_sentry_sentry_proto_enumTypes[2].Descriptor() +} + +func (BootstrapAgentMode) Type() protoreflect.EnumType { + return &file_proto_types_sentry_sentry_proto_enumTypes[2] +} + +func (x BootstrapAgentMode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use BootstrapAgentMode.Descriptor instead. +func (BootstrapAgentMode) EnumDescriptor() ([]byte, []int) { + return file_proto_types_sentry_sentry_proto_rawDescGZIP(), []int{2} +} + +type BootstrapAgentState int32 + +const ( + BootstrapAgentState_NotSet BootstrapAgentState = 0 + BootstrapAgentState_NotRegistered BootstrapAgentState = 1 + BootstrapAgentState_NotApproved BootstrapAgentState = 2 + BootstrapAgentState_Approved BootstrapAgentState = 3 +) + +// Enum value maps for BootstrapAgentState. +var ( + BootstrapAgentState_name = map[int32]string{ + 0: "NotSet", + 1: "NotRegistered", + 2: "NotApproved", + 3: "Approved", + } + BootstrapAgentState_value = map[string]int32{ + "NotSet": 0, + "NotRegistered": 1, + "NotApproved": 2, + "Approved": 3, + } +) + +func (x BootstrapAgentState) Enum() *BootstrapAgentState { + p := new(BootstrapAgentState) + *p = x + return p +} + +func (x BootstrapAgentState) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (BootstrapAgentState) Descriptor() protoreflect.EnumDescriptor { + return file_proto_types_sentry_sentry_proto_enumTypes[3].Descriptor() +} + +func (BootstrapAgentState) Type() protoreflect.EnumType { + return &file_proto_types_sentry_sentry_proto_enumTypes[3] +} + +func (x BootstrapAgentState) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use BootstrapAgentState.Descriptor instead. +func (BootstrapAgentState) EnumDescriptor() ([]byte, []int) { + return file_proto_types_sentry_sentry_proto_rawDescGZIP(), []int{3} +} + +type BootstrapAgentTemplateType int32 + +const ( + BootstrapAgentTemplateType_TemplateTypeNotSet BootstrapAgentTemplateType = 0 + BootstrapAgentTemplateType_Client BootstrapAgentTemplateType = 1 + BootstrapAgentTemplateType_Server BootstrapAgentTemplateType = 2 + BootstrapAgentTemplateType_Mixed BootstrapAgentTemplateType = 3 +) + +// Enum value maps for BootstrapAgentTemplateType. +var ( + BootstrapAgentTemplateType_name = map[int32]string{ + 0: "TemplateTypeNotSet", + 1: "Client", + 2: "Server", + 3: "Mixed", + } + BootstrapAgentTemplateType_value = map[string]int32{ + "TemplateTypeNotSet": 0, + "Client": 1, + "Server": 2, + "Mixed": 3, + } +) + +func (x BootstrapAgentTemplateType) Enum() *BootstrapAgentTemplateType { + p := new(BootstrapAgentTemplateType) + *p = x + return p +} + +func (x BootstrapAgentTemplateType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (BootstrapAgentTemplateType) Descriptor() protoreflect.EnumDescriptor { + return file_proto_types_sentry_sentry_proto_enumTypes[4].Descriptor() +} + +func (BootstrapAgentTemplateType) Type() protoreflect.EnumType { + return &file_proto_types_sentry_sentry_proto_enumTypes[4] +} + +func (x BootstrapAgentTemplateType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use BootstrapAgentTemplateType.Descriptor instead. +func (BootstrapAgentTemplateType) EnumDescriptor() ([]byte, []int) { + return file_proto_types_sentry_sentry_proto_rawDescGZIP(), []int{4} +} + +type BootstrapTemplateHostType int32 + +const ( + BootstrapTemplateHostType_HostTypeNotSet BootstrapTemplateHostType = 0 + BootstrapTemplateHostType_HostTypeInternal BootstrapTemplateHostType = 1 + BootstrapTemplateHostType_HostTypeExternal BootstrapTemplateHostType = 2 +) + +// Enum value maps for BootstrapTemplateHostType. +var ( + BootstrapTemplateHostType_name = map[int32]string{ + 0: "HostTypeNotSet", + 1: "HostTypeInternal", + 2: "HostTypeExternal", + } + BootstrapTemplateHostType_value = map[string]int32{ + "HostTypeNotSet": 0, + "HostTypeInternal": 1, + "HostTypeExternal": 2, + } +) + +func (x BootstrapTemplateHostType) Enum() *BootstrapTemplateHostType { + p := new(BootstrapTemplateHostType) + *p = x + return p +} + +func (x BootstrapTemplateHostType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (BootstrapTemplateHostType) Descriptor() protoreflect.EnumDescriptor { + return file_proto_types_sentry_sentry_proto_enumTypes[5].Descriptor() +} + +func (BootstrapTemplateHostType) Type() protoreflect.EnumType { + return &file_proto_types_sentry_sentry_proto_enumTypes[5] +} + +func (x BootstrapTemplateHostType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use BootstrapTemplateHostType.Descriptor instead. +func (BootstrapTemplateHostType) EnumDescriptor() ([]byte, []int) { + return file_proto_types_sentry_sentry_proto_rawDescGZIP(), []int{5} +} + +type BootstrapInfraSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + CaCert string `protobuf:"bytes,1,opt,name=caCert,proto3" json:"caCert,omitempty"` + CaKey string `protobuf:"bytes,2,opt,name=caKey,proto3" json:"caKey,omitempty"` + CaKeyPass string `protobuf:"bytes,3,opt,name=caKeyPass,proto3" json:"caKeyPass,omitempty"` +} + +func (x *BootstrapInfraSpec) Reset() { + *x = BootstrapInfraSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_sentry_sentry_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BootstrapInfraSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BootstrapInfraSpec) ProtoMessage() {} + +func (x *BootstrapInfraSpec) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_sentry_sentry_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BootstrapInfraSpec.ProtoReflect.Descriptor instead. +func (*BootstrapInfraSpec) Descriptor() ([]byte, []int) { + return file_proto_types_sentry_sentry_proto_rawDescGZIP(), []int{0} +} + +func (x *BootstrapInfraSpec) GetCaCert() string { + if x != nil { + return x.CaCert + } + return "" +} + +func (x *BootstrapInfraSpec) GetCaKey() string { + if x != nil { + return x.CaKey + } + return "" +} + +func (x *BootstrapInfraSpec) GetCaKeyPass() string { + if x != nil { + return x.CaKeyPass + } + return "" +} + +type BootstrapInfraStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *BootstrapInfraStatus) Reset() { + *x = BootstrapInfraStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_sentry_sentry_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BootstrapInfraStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BootstrapInfraStatus) ProtoMessage() {} + +func (x *BootstrapInfraStatus) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_sentry_sentry_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BootstrapInfraStatus.ProtoReflect.Descriptor instead. +func (*BootstrapInfraStatus) Descriptor() ([]byte, []int) { + return file_proto_types_sentry_sentry_proto_rawDescGZIP(), []int{1} +} + +type BootstrapInfra struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ApiVersion string `protobuf:"bytes,1,opt,name=apiVersion,proto3" json:"apiVersion,omitempty"` + Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"` + Metadata *v3.Metadata `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *BootstrapInfraSpec `protobuf:"bytes,4,opt,name=spec,proto3" json:"spec,omitempty"` + Status *BootstrapInfraStatus `protobuf:"bytes,5,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *BootstrapInfra) Reset() { + *x = BootstrapInfra{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_sentry_sentry_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BootstrapInfra) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BootstrapInfra) ProtoMessage() {} + +func (x *BootstrapInfra) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_sentry_sentry_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BootstrapInfra.ProtoReflect.Descriptor instead. +func (*BootstrapInfra) Descriptor() ([]byte, []int) { + return file_proto_types_sentry_sentry_proto_rawDescGZIP(), []int{2} +} + +func (x *BootstrapInfra) GetApiVersion() string { + if x != nil { + return x.ApiVersion + } + return "" +} + +func (x *BootstrapInfra) GetKind() string { + if x != nil { + return x.Kind + } + return "" +} + +func (x *BootstrapInfra) GetMetadata() *v3.Metadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *BootstrapInfra) GetSpec() *BootstrapInfraSpec { + if x != nil { + return x.Spec + } + return nil +} + +func (x *BootstrapInfra) GetStatus() *BootstrapInfraStatus { + if x != nil { + return x.Status + } + return nil +} + +type BootstrapInfraList struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ApiVersion string `protobuf:"bytes,1,opt,name=apiVersion,proto3" json:"apiVersion,omitempty"` + Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"` + Metadata *v3.ListMetadata `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` + Items []*BootstrapInfra `protobuf:"bytes,4,rep,name=items,proto3" json:"items,omitempty"` +} + +func (x *BootstrapInfraList) Reset() { + *x = BootstrapInfraList{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_sentry_sentry_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BootstrapInfraList) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BootstrapInfraList) ProtoMessage() {} + +func (x *BootstrapInfraList) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_sentry_sentry_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BootstrapInfraList.ProtoReflect.Descriptor instead. +func (*BootstrapInfraList) Descriptor() ([]byte, []int) { + return file_proto_types_sentry_sentry_proto_rawDescGZIP(), []int{3} +} + +func (x *BootstrapInfraList) GetApiVersion() string { + if x != nil { + return x.ApiVersion + } + return "" +} + +func (x *BootstrapInfraList) GetKind() string { + if x != nil { + return x.Kind + } + return "" +} + +func (x *BootstrapInfraList) GetMetadata() *v3.ListMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *BootstrapInfraList) GetItems() []*BootstrapInfra { + if x != nil { + return x.Items + } + return nil +} + +type BootstrapTemplateHost struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"` + Type BootstrapTemplateHostType `protobuf:"varint,2,opt,name=type,proto3,enum=rafay.dev.types.sentry.BootstrapTemplateHostType" json:"type,omitempty"` +} + +func (x *BootstrapTemplateHost) Reset() { + *x = BootstrapTemplateHost{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_sentry_sentry_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BootstrapTemplateHost) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BootstrapTemplateHost) ProtoMessage() {} + +func (x *BootstrapTemplateHost) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_sentry_sentry_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BootstrapTemplateHost.ProtoReflect.Descriptor instead. +func (*BootstrapTemplateHost) Descriptor() ([]byte, []int) { + return file_proto_types_sentry_sentry_proto_rawDescGZIP(), []int{4} +} + +func (x *BootstrapTemplateHost) GetHost() string { + if x != nil { + return x.Host + } + return "" +} + +func (x *BootstrapTemplateHost) GetType() BootstrapTemplateHostType { + if x != nil { + return x.Type + } + return BootstrapTemplateHostType_HostTypeNotSet +} + +type BootstrapAgentTemplateSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + InfraRef string `protobuf:"bytes,1,opt,name=infraRef,proto3" json:"infraRef,omitempty"` + AutoRegister bool `protobuf:"varint,2,opt,name=autoRegister,proto3" json:"autoRegister,omitempty"` + IgnoreMultipleRegister bool `protobuf:"varint,3,opt,name=ignoreMultipleRegister,proto3" json:"ignoreMultipleRegister,omitempty"` + AutoApprove bool `protobuf:"varint,4,opt,name=autoApprove,proto3" json:"autoApprove,omitempty"` + TemplateType BootstrapAgentTemplateType `protobuf:"varint,5,opt,name=templateType,proto3,enum=rafay.dev.types.sentry.BootstrapAgentTemplateType" json:"templateType,omitempty"` + Token string `protobuf:"bytes,6,opt,name=token,proto3" json:"token,omitempty"` + Hosts []*BootstrapTemplateHost `protobuf:"bytes,7,rep,name=hosts,proto3" json:"hosts,omitempty"` + InClusterTemplate string `protobuf:"bytes,8,opt,name=inClusterTemplate,proto3" json:"inClusterTemplate,omitempty"` + OutOfClusterTemplate string `protobuf:"bytes,9,opt,name=outOfClusterTemplate,proto3" json:"outOfClusterTemplate,omitempty"` +} + +func (x *BootstrapAgentTemplateSpec) Reset() { + *x = BootstrapAgentTemplateSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_sentry_sentry_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BootstrapAgentTemplateSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BootstrapAgentTemplateSpec) ProtoMessage() {} + +func (x *BootstrapAgentTemplateSpec) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_sentry_sentry_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BootstrapAgentTemplateSpec.ProtoReflect.Descriptor instead. +func (*BootstrapAgentTemplateSpec) Descriptor() ([]byte, []int) { + return file_proto_types_sentry_sentry_proto_rawDescGZIP(), []int{5} +} + +func (x *BootstrapAgentTemplateSpec) GetInfraRef() string { + if x != nil { + return x.InfraRef + } + return "" +} + +func (x *BootstrapAgentTemplateSpec) GetAutoRegister() bool { + if x != nil { + return x.AutoRegister + } + return false +} + +func (x *BootstrapAgentTemplateSpec) GetIgnoreMultipleRegister() bool { + if x != nil { + return x.IgnoreMultipleRegister + } + return false +} + +func (x *BootstrapAgentTemplateSpec) GetAutoApprove() bool { + if x != nil { + return x.AutoApprove + } + return false +} + +func (x *BootstrapAgentTemplateSpec) GetTemplateType() BootstrapAgentTemplateType { + if x != nil { + return x.TemplateType + } + return BootstrapAgentTemplateType_TemplateTypeNotSet +} + +func (x *BootstrapAgentTemplateSpec) GetToken() string { + if x != nil { + return x.Token + } + return "" +} + +func (x *BootstrapAgentTemplateSpec) GetHosts() []*BootstrapTemplateHost { + if x != nil { + return x.Hosts + } + return nil +} + +func (x *BootstrapAgentTemplateSpec) GetInClusterTemplate() string { + if x != nil { + return x.InClusterTemplate + } + return "" +} + +func (x *BootstrapAgentTemplateSpec) GetOutOfClusterTemplate() string { + if x != nil { + return x.OutOfClusterTemplate + } + return "" +} + +type BootstrapAgentTemplateStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *BootstrapAgentTemplateStatus) Reset() { + *x = BootstrapAgentTemplateStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_sentry_sentry_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BootstrapAgentTemplateStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BootstrapAgentTemplateStatus) ProtoMessage() {} + +func (x *BootstrapAgentTemplateStatus) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_sentry_sentry_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BootstrapAgentTemplateStatus.ProtoReflect.Descriptor instead. +func (*BootstrapAgentTemplateStatus) Descriptor() ([]byte, []int) { + return file_proto_types_sentry_sentry_proto_rawDescGZIP(), []int{6} +} + +type BootstrapAgentTemplate struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ApiVersion string `protobuf:"bytes,1,opt,name=apiVersion,proto3" json:"apiVersion,omitempty"` + Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"` + Metadata *v3.Metadata `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *BootstrapAgentTemplateSpec `protobuf:"bytes,4,opt,name=spec,proto3" json:"spec,omitempty"` + Status *BootstrapAgentTemplateStatus `protobuf:"bytes,5,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *BootstrapAgentTemplate) Reset() { + *x = BootstrapAgentTemplate{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_sentry_sentry_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BootstrapAgentTemplate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BootstrapAgentTemplate) ProtoMessage() {} + +func (x *BootstrapAgentTemplate) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_sentry_sentry_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BootstrapAgentTemplate.ProtoReflect.Descriptor instead. +func (*BootstrapAgentTemplate) Descriptor() ([]byte, []int) { + return file_proto_types_sentry_sentry_proto_rawDescGZIP(), []int{7} +} + +func (x *BootstrapAgentTemplate) GetApiVersion() string { + if x != nil { + return x.ApiVersion + } + return "" +} + +func (x *BootstrapAgentTemplate) GetKind() string { + if x != nil { + return x.Kind + } + return "" +} + +func (x *BootstrapAgentTemplate) GetMetadata() *v3.Metadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *BootstrapAgentTemplate) GetSpec() *BootstrapAgentTemplateSpec { + if x != nil { + return x.Spec + } + return nil +} + +func (x *BootstrapAgentTemplate) GetStatus() *BootstrapAgentTemplateStatus { + if x != nil { + return x.Status + } + return nil +} + +type BootstrapAgentTemplateList struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ApiVersion string `protobuf:"bytes,1,opt,name=apiVersion,proto3" json:"apiVersion,omitempty"` + Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"` + Metadata *v3.ListMetadata `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` + Items []*BootstrapAgentTemplate `protobuf:"bytes,4,rep,name=items,proto3" json:"items,omitempty"` +} + +func (x *BootstrapAgentTemplateList) Reset() { + *x = BootstrapAgentTemplateList{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_sentry_sentry_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BootstrapAgentTemplateList) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BootstrapAgentTemplateList) ProtoMessage() {} + +func (x *BootstrapAgentTemplateList) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_sentry_sentry_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BootstrapAgentTemplateList.ProtoReflect.Descriptor instead. +func (*BootstrapAgentTemplateList) Descriptor() ([]byte, []int) { + return file_proto_types_sentry_sentry_proto_rawDescGZIP(), []int{8} +} + +func (x *BootstrapAgentTemplateList) GetApiVersion() string { + if x != nil { + return x.ApiVersion + } + return "" +} + +func (x *BootstrapAgentTemplateList) GetKind() string { + if x != nil { + return x.Kind + } + return "" +} + +func (x *BootstrapAgentTemplateList) GetMetadata() *v3.ListMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *BootstrapAgentTemplateList) GetItems() []*BootstrapAgentTemplate { + if x != nil { + return x.Items + } + return nil +} + +type BootstrapAgentSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` + TemplateRef string `protobuf:"bytes,2,opt,name=templateRef,proto3" json:"templateRef,omitempty"` + AgentMode BootstrapAgentMode `protobuf:"varint,3,opt,name=agentMode,proto3,enum=rafay.dev.types.sentry.BootstrapAgentMode" json:"agentMode,omitempty"` +} + +func (x *BootstrapAgentSpec) Reset() { + *x = BootstrapAgentSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_sentry_sentry_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BootstrapAgentSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BootstrapAgentSpec) ProtoMessage() {} + +func (x *BootstrapAgentSpec) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_sentry_sentry_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BootstrapAgentSpec.ProtoReflect.Descriptor instead. +func (*BootstrapAgentSpec) Descriptor() ([]byte, []int) { + return file_proto_types_sentry_sentry_proto_rawDescGZIP(), []int{9} +} + +func (x *BootstrapAgentSpec) GetToken() string { + if x != nil { + return x.Token + } + return "" +} + +func (x *BootstrapAgentSpec) GetTemplateRef() string { + if x != nil { + return x.TemplateRef + } + return "" +} + +func (x *BootstrapAgentSpec) GetAgentMode() BootstrapAgentMode { + if x != nil { + return x.AgentMode + } + return BootstrapAgentMode_InCluster +} + +type BootStrapAgentStatus struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TokenState BootstrapAgentState `protobuf:"varint,1,opt,name=tokenState,proto3,enum=rafay.dev.types.sentry.BootstrapAgentState" json:"tokenState,omitempty"` + IpAddress string `protobuf:"bytes,2,opt,name=ipAddress,proto3" json:"ipAddress,omitempty"` + LastCheckedIn *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=lastCheckedIn,proto3" json:"lastCheckedIn,omitempty"` + Fingerprint string `protobuf:"bytes,4,opt,name=fingerprint,proto3" json:"fingerprint,omitempty"` +} + +func (x *BootStrapAgentStatus) Reset() { + *x = BootStrapAgentStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_sentry_sentry_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BootStrapAgentStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BootStrapAgentStatus) ProtoMessage() {} + +func (x *BootStrapAgentStatus) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_sentry_sentry_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BootStrapAgentStatus.ProtoReflect.Descriptor instead. +func (*BootStrapAgentStatus) Descriptor() ([]byte, []int) { + return file_proto_types_sentry_sentry_proto_rawDescGZIP(), []int{10} +} + +func (x *BootStrapAgentStatus) GetTokenState() BootstrapAgentState { + if x != nil { + return x.TokenState + } + return BootstrapAgentState_NotSet +} + +func (x *BootStrapAgentStatus) GetIpAddress() string { + if x != nil { + return x.IpAddress + } + return "" +} + +func (x *BootStrapAgentStatus) GetLastCheckedIn() *timestamppb.Timestamp { + if x != nil { + return x.LastCheckedIn + } + return nil +} + +func (x *BootStrapAgentStatus) GetFingerprint() string { + if x != nil { + return x.Fingerprint + } + return "" +} + +type BootstrapAgent struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ApiVersion string `protobuf:"bytes,1,opt,name=apiVersion,proto3" json:"apiVersion,omitempty"` + Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"` + Metadata *v3.Metadata `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` + Spec *BootstrapAgentSpec `protobuf:"bytes,4,opt,name=spec,proto3" json:"spec,omitempty"` + Status *BootStrapAgentStatus `protobuf:"bytes,5,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *BootstrapAgent) Reset() { + *x = BootstrapAgent{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_sentry_sentry_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BootstrapAgent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BootstrapAgent) ProtoMessage() {} + +func (x *BootstrapAgent) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_sentry_sentry_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BootstrapAgent.ProtoReflect.Descriptor instead. +func (*BootstrapAgent) Descriptor() ([]byte, []int) { + return file_proto_types_sentry_sentry_proto_rawDescGZIP(), []int{11} +} + +func (x *BootstrapAgent) GetApiVersion() string { + if x != nil { + return x.ApiVersion + } + return "" +} + +func (x *BootstrapAgent) GetKind() string { + if x != nil { + return x.Kind + } + return "" +} + +func (x *BootstrapAgent) GetMetadata() *v3.Metadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *BootstrapAgent) GetSpec() *BootstrapAgentSpec { + if x != nil { + return x.Spec + } + return nil +} + +func (x *BootstrapAgent) GetStatus() *BootStrapAgentStatus { + if x != nil { + return x.Status + } + return nil +} + +// BootstrapAgentList is a list of bootstrap agents +type BootstrapAgentList struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ApiVersion string `protobuf:"bytes,1,opt,name=apiVersion,proto3" json:"apiVersion,omitempty"` + Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"` + Metadata *v3.ListMetadata `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` + Items []*BootstrapAgent `protobuf:"bytes,4,rep,name=items,proto3" json:"items,omitempty"` +} + +func (x *BootstrapAgentList) Reset() { + *x = BootstrapAgentList{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_types_sentry_sentry_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BootstrapAgentList) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BootstrapAgentList) ProtoMessage() {} + +func (x *BootstrapAgentList) ProtoReflect() protoreflect.Message { + mi := &file_proto_types_sentry_sentry_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BootstrapAgentList.ProtoReflect.Descriptor instead. +func (*BootstrapAgentList) Descriptor() ([]byte, []int) { + return file_proto_types_sentry_sentry_proto_rawDescGZIP(), []int{12} +} + +func (x *BootstrapAgentList) GetApiVersion() string { + if x != nil { + return x.ApiVersion + } + return "" +} + +func (x *BootstrapAgentList) GetKind() string { + if x != nil { + return x.Kind + } + return "" +} + +func (x *BootstrapAgentList) GetMetadata() *v3.ListMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *BootstrapAgentList) GetItems() []*BootstrapAgent { + if x != nil { + return x.Items + } + return nil +} + +var File_proto_types_sentry_sentry_proto protoreflect.FileDescriptor + +var file_proto_types_sentry_sentry_proto_rawDesc = []byte{ + 0x0a, 0x1f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x73, 0x65, + 0x6e, 0x74, 0x72, 0x79, 0x2f, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x16, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, + 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x24, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x70, 0x62, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, + 0x70, 0x65, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x70, 0x6c, 0x61, 0x63, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x99, 0x01, 0x0a, 0x12, 0x42, + 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x49, 0x6e, 0x66, 0x72, 0x61, 0x53, 0x70, 0x65, + 0x63, 0x12, 0x28, 0x0a, 0x06, 0x63, 0x61, 0x43, 0x65, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x10, 0xf2, 0xde, 0x1f, 0x0c, 0x70, 0x67, 0x3a, 0x22, 0x63, 0x61, 0x5f, 0x63, 0x65, + 0x72, 0x74, 0x22, 0x52, 0x06, 0x63, 0x61, 0x43, 0x65, 0x72, 0x74, 0x12, 0x25, 0x0a, 0x05, 0x63, + 0x61, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0f, 0xf2, 0xde, 0x1f, 0x0b, + 0x70, 0x67, 0x3a, 0x22, 0x63, 0x61, 0x5f, 0x6b, 0x65, 0x79, 0x22, 0x52, 0x05, 0x63, 0x61, 0x4b, + 0x65, 0x79, 0x12, 0x32, 0x0a, 0x09, 0x63, 0x61, 0x4b, 0x65, 0x79, 0x50, 0x61, 0x73, 0x73, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x14, 0xf2, 0xde, 0x1f, 0x10, 0x70, 0x67, 0x3a, 0x22, 0x63, + 0x61, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x22, 0x52, 0x09, 0x63, 0x61, 0x4b, + 0x65, 0x79, 0x50, 0x61, 0x73, 0x73, 0x22, 0x16, 0x0a, 0x14, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, + 0x72, 0x61, 0x70, 0x49, 0x6e, 0x66, 0x72, 0x61, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0xc9, + 0x03, 0x0a, 0x0e, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x49, 0x6e, 0x66, 0x72, + 0x61, 0x12, 0x64, 0x0a, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x44, 0x92, 0x41, 0x41, 0x2a, 0x0b, 0x41, 0x50, 0x49, 0x20, + 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0x1b, 0x41, 0x50, 0x49, 0x20, 0x56, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x3a, 0x13, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2e, 0x6b, 0x38, 0x73, 0x6d, + 0x67, 0x6d, 0x74, 0x2e, 0x69, 0x6f, 0x2f, 0x76, 0x33, 0x40, 0x01, 0x52, 0x0a, 0x61, 0x70, 0x69, + 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x45, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 0x92, 0x41, 0x2e, 0x2a, 0x04, 0x4b, 0x69, 0x6e, 0x64, + 0x32, 0x14, 0x4b, 0x69, 0x6e, 0x64, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, 0x0e, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, + 0x70, 0x49, 0x6e, 0x66, 0x72, 0x61, 0x40, 0x01, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x70, + 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x23, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x2f, 0x92, 0x41, 0x24, 0x2a, 0x08, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x32, 0x18, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x20, 0x6f, + 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0xc8, 0xde, + 0x1f, 0x00, 0xd0, 0xde, 0x1f, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x12, 0x48, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, + 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, + 0x70, 0x49, 0x6e, 0x66, 0x72, 0x61, 0x53, 0x70, 0x65, 0x63, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, + 0xd0, 0xde, 0x1f, 0x01, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x4e, 0x0a, 0x06, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x72, 0x61, 0x66, + 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x6e, + 0x74, 0x72, 0x79, 0x2e, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x49, 0x6e, 0x66, + 0x72, 0x61, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0xd0, 0xde, + 0x1f, 0x01, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x8c, 0x03, 0x0a, 0x12, 0x42, + 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x49, 0x6e, 0x66, 0x72, 0x61, 0x4c, 0x69, 0x73, + 0x74, 0x12, 0x69, 0x0a, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x49, 0x92, 0x41, 0x46, 0x2a, 0x0b, 0x41, 0x50, 0x49, 0x20, + 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0x20, 0x41, 0x50, 0x49, 0x20, 0x56, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x69, 0x73, 0x74, + 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, 0x13, 0x69, 0x6e, 0x66, 0x72, 0x61, + 0x2e, 0x6b, 0x38, 0x73, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x69, 0x6f, 0x2f, 0x76, 0x33, 0x40, 0x01, + 0x52, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x4e, 0x0a, 0x04, + 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x3a, 0x92, 0x41, 0x37, 0x2a, + 0x04, 0x4b, 0x69, 0x6e, 0x64, 0x32, 0x19, 0x4b, 0x69, 0x6e, 0x64, 0x20, 0x6f, 0x66, 0x20, 0x74, + 0x68, 0x65, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x3a, 0x12, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x49, 0x6e, 0x66, 0x72, 0x61, + 0x4c, 0x69, 0x73, 0x74, 0x40, 0x01, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x77, 0x0a, 0x08, + 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, + 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x32, 0x92, 0x41, 0x2f, 0x2a, 0x0c, 0x4c, 0x69, + 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x32, 0x1d, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x69, 0x73, 0x74, + 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x40, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x42, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x04, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, + 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x42, 0x6f, + 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x49, 0x6e, 0x66, 0x72, 0x61, 0x42, 0x04, 0xc8, 0xde, + 0x1f, 0x00, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x22, 0x72, 0x0a, 0x15, 0x42, 0x6f, 0x6f, + 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x48, 0x6f, + 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x45, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, + 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x42, 0x6f, + 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x48, + 0x6f, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0xca, 0x06, + 0x0a, 0x1a, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x41, 0x67, 0x65, 0x6e, 0x74, + 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x53, 0x70, 0x65, 0x63, 0x12, 0x2f, 0x0a, 0x08, + 0x69, 0x6e, 0x66, 0x72, 0x61, 0x52, 0x65, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x13, + 0xf2, 0xde, 0x1f, 0x0f, 0x62, 0x75, 0x6e, 0x3a, 0x22, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x5f, 0x72, + 0x65, 0x66, 0x22, 0x52, 0x08, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x52, 0x65, 0x66, 0x12, 0x4b, 0x0a, + 0x0c, 0x61, 0x75, 0x74, 0x6f, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x08, 0x42, 0x27, 0xea, 0xde, 0x1f, 0x0c, 0x61, 0x75, 0x74, 0x6f, 0x52, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x65, 0x72, 0xf2, 0xde, 0x1f, 0x13, 0x62, 0x75, 0x6e, 0x3a, 0x22, 0x61, 0x75, + 0x74, 0x6f, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x22, 0x52, 0x0c, 0x61, 0x75, + 0x74, 0x6f, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x12, 0x74, 0x0a, 0x16, 0x69, 0x67, + 0x6e, 0x6f, 0x72, 0x65, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x42, 0x3c, 0xea, 0xde, 0x1f, 0x16, + 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x52, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0xf2, 0xde, 0x1f, 0x1e, 0x62, 0x75, 0x6e, 0x3a, 0x22, 0x69, + 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x5f, 0x72, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x22, 0x52, 0x16, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, + 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, + 0x12, 0x47, 0x0a, 0x0b, 0x61, 0x75, 0x74, 0x6f, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x08, 0x42, 0x25, 0xea, 0xde, 0x1f, 0x0b, 0x61, 0x75, 0x74, 0x6f, 0x41, + 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0xf2, 0xde, 0x1f, 0x12, 0x62, 0x75, 0x6e, 0x3a, 0x22, 0x61, + 0x75, 0x74, 0x6f, 0x5f, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x22, 0x52, 0x0b, 0x61, 0x75, + 0x74, 0x6f, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x12, 0x88, 0x01, 0x0a, 0x0c, 0x74, 0x65, + 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x32, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, + 0x72, 0x61, 0x70, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, + 0x54, 0x79, 0x70, 0x65, 0x42, 0x30, 0xea, 0xde, 0x1f, 0x0c, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, + 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0xf2, 0xde, 0x1f, 0x1c, 0x62, 0x75, 0x6e, 0x3a, 0x22, 0x74, + 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x2c, 0x75, 0x73, 0x65, + 0x5f, 0x7a, 0x65, 0x72, 0x6f, 0x22, 0x52, 0x0c, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x25, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x0f, 0xf2, 0xde, 0x1f, 0x0b, 0x62, 0x75, 0x6e, 0x3a, 0x22, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x22, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x5d, 0x0a, 0x05, 0x68, + 0x6f, 0x73, 0x74, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x72, 0x61, 0x66, + 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x6e, + 0x74, 0x72, 0x79, 0x2e, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x54, 0x65, 0x6d, + 0x70, 0x6c, 0x61, 0x74, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x42, 0x18, 0xf2, 0xde, 0x1f, 0x14, 0x62, + 0x75, 0x6e, 0x3a, 0x22, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x2c, 0x75, 0x73, 0x65, 0x5f, 0x7a, 0x65, + 0x72, 0x6f, 0x22, 0x52, 0x05, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x12, 0x68, 0x0a, 0x11, 0x69, 0x6e, + 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x3a, 0xea, 0xde, 0x1f, 0x11, 0x69, 0x6e, 0x43, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0xf2, 0xde, 0x1f, 0x21, + 0x62, 0x75, 0x6e, 0x3a, 0x22, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x74, + 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2c, 0x75, 0x73, 0x65, 0x5f, 0x7a, 0x65, 0x72, 0x6f, + 0x22, 0x52, 0x11, 0x69, 0x6e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x54, 0x65, 0x6d, 0x70, + 0x6c, 0x61, 0x74, 0x65, 0x12, 0x74, 0x0a, 0x14, 0x6f, 0x75, 0x74, 0x4f, 0x66, 0x43, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18, 0x09, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x40, 0xea, 0xde, 0x1f, 0x14, 0x6f, 0x75, 0x74, 0x4f, 0x66, 0x43, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0xf2, 0xde, 0x1f, 0x24, + 0x62, 0x75, 0x6e, 0x3a, 0x22, 0x6f, 0x75, 0x74, 0x6f, 0x66, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2c, 0x75, 0x73, 0x65, 0x5f, 0x7a, + 0x65, 0x72, 0x6f, 0x22, 0x52, 0x14, 0x6f, 0x75, 0x74, 0x4f, 0x66, 0x43, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x22, 0x1e, 0x0a, 0x1c, 0x42, 0x6f, + 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x54, 0x65, 0x6d, 0x70, + 0x6c, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0xe9, 0x03, 0x0a, 0x16, 0x42, + 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x54, 0x65, 0x6d, + 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x64, 0x0a, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x44, 0x92, 0x41, 0x41, 0x2a, 0x0b, + 0x41, 0x50, 0x49, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0x1b, 0x41, 0x50, 0x49, + 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, 0x13, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2e, + 0x6b, 0x38, 0x73, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x69, 0x6f, 0x2f, 0x76, 0x33, 0x40, 0x01, 0x52, + 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x4d, 0x0a, 0x04, 0x6b, + 0x69, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x39, 0x92, 0x41, 0x36, 0x2a, 0x04, + 0x4b, 0x69, 0x6e, 0x64, 0x32, 0x14, 0x4b, 0x69, 0x6e, 0x64, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, + 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, 0x16, 0x42, 0x6f, 0x6f, 0x74, + 0x73, 0x74, 0x72, 0x61, 0x70, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, + 0x74, 0x65, 0x40, 0x01, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x70, 0x0a, 0x08, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x72, + 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x42, 0x2f, 0x92, 0x41, 0x24, 0x2a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x32, 0x18, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, + 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0xc8, 0xde, 0x1f, 0x00, 0xd0, 0xde, + 0x1f, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x50, 0x0a, 0x04, + 0x73, 0x70, 0x65, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x72, 0x61, 0x66, + 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x6e, + 0x74, 0x72, 0x79, 0x2e, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x41, 0x67, 0x65, + 0x6e, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x53, 0x70, 0x65, 0x63, 0x42, 0x08, + 0xc8, 0xde, 0x1f, 0x00, 0xd0, 0xde, 0x1f, 0x01, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x56, + 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, + 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, + 0x70, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0xd0, 0xde, 0x1f, 0x01, 0x52, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0xa4, 0x03, 0x0a, 0x1a, 0x42, 0x6f, 0x6f, 0x74, 0x73, + 0x74, 0x72, 0x61, 0x70, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, + 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x69, 0x0a, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x49, 0x92, 0x41, 0x46, 0x2a, 0x0b, + 0x41, 0x50, 0x49, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0x20, 0x41, 0x50, 0x49, + 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, + 0x6c, 0x69, 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, 0x13, 0x69, + 0x6e, 0x66, 0x72, 0x61, 0x2e, 0x6b, 0x38, 0x73, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x69, 0x6f, 0x2f, + 0x76, 0x33, 0x40, 0x01, 0x52, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x12, 0x56, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x42, + 0x92, 0x41, 0x3f, 0x2a, 0x04, 0x4b, 0x69, 0x6e, 0x64, 0x32, 0x19, 0x4b, 0x69, 0x6e, 0x64, 0x20, + 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x3a, 0x1a, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x41, + 0x67, 0x65, 0x6e, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x73, 0x74, + 0x40, 0x01, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x77, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x72, 0x61, 0x66, + 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x42, 0x32, 0x92, 0x41, 0x2f, 0x2a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x32, 0x1d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x40, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x12, 0x4a, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x2e, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, + 0x72, 0x61, 0x70, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, + 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x22, 0x96, 0x01, + 0x0a, 0x12, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x41, 0x67, 0x65, 0x6e, 0x74, + 0x53, 0x70, 0x65, 0x63, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x74, 0x65, + 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x66, 0x12, 0x48, 0x0a, 0x09, + 0x61, 0x67, 0x65, 0x6e, 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x2a, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, + 0x61, 0x70, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x09, 0x61, 0x67, 0x65, + 0x6e, 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x22, 0xe5, 0x01, 0x0a, 0x14, 0x42, 0x6f, 0x6f, 0x74, 0x53, + 0x74, 0x72, 0x61, 0x70, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, + 0x4b, 0x0a, 0x0a, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x42, 0x6f, 0x6f, + 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x52, 0x0a, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1c, 0x0a, 0x09, + 0x69, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x69, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x40, 0x0a, 0x0d, 0x6c, 0x61, + 0x73, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x49, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0d, 0x6c, + 0x61, 0x73, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x49, 0x6e, 0x12, 0x20, 0x0a, 0x0b, + 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x22, 0xc9, + 0x03, 0x0a, 0x0e, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x41, 0x67, 0x65, 0x6e, + 0x74, 0x12, 0x64, 0x0a, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x44, 0x92, 0x41, 0x41, 0x2a, 0x0b, 0x41, 0x50, 0x49, 0x20, + 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0x1b, 0x41, 0x50, 0x49, 0x20, 0x56, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x3a, 0x13, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2e, 0x6b, 0x38, 0x73, 0x6d, + 0x67, 0x6d, 0x74, 0x2e, 0x69, 0x6f, 0x2f, 0x76, 0x33, 0x40, 0x01, 0x52, 0x0a, 0x61, 0x70, 0x69, + 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x45, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 0x92, 0x41, 0x2e, 0x2a, 0x04, 0x4b, 0x69, 0x6e, 0x64, + 0x32, 0x14, 0x4b, 0x69, 0x6e, 0x64, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, 0x0e, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, + 0x70, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x40, 0x01, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x70, + 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x23, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x2f, 0x92, 0x41, 0x24, 0x2a, 0x08, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x32, 0x18, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x20, 0x6f, + 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0xc8, 0xde, + 0x1f, 0x00, 0xd0, 0xde, 0x1f, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x12, 0x48, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, + 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, + 0x70, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x53, 0x70, 0x65, 0x63, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, + 0xd0, 0xde, 0x1f, 0x01, 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x12, 0x4e, 0x0a, 0x06, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x72, 0x61, 0x66, + 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x6e, + 0x74, 0x72, 0x79, 0x2e, 0x42, 0x6f, 0x6f, 0x74, 0x53, 0x74, 0x72, 0x61, 0x70, 0x41, 0x67, 0x65, + 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0xd0, 0xde, + 0x1f, 0x01, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x8c, 0x03, 0x0a, 0x12, 0x42, + 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, + 0x74, 0x12, 0x69, 0x0a, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x49, 0x92, 0x41, 0x46, 0x2a, 0x0b, 0x41, 0x50, 0x49, 0x20, + 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0x20, 0x41, 0x50, 0x49, 0x20, 0x56, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x69, 0x73, 0x74, + 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, 0x13, 0x69, 0x6e, 0x66, 0x72, 0x61, + 0x2e, 0x6b, 0x38, 0x73, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x69, 0x6f, 0x2f, 0x76, 0x33, 0x40, 0x01, + 0x52, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x4e, 0x0a, 0x04, + 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x3a, 0x92, 0x41, 0x37, 0x2a, + 0x04, 0x4b, 0x69, 0x6e, 0x64, 0x32, 0x19, 0x4b, 0x69, 0x6e, 0x64, 0x20, 0x6f, 0x66, 0x20, 0x74, + 0x68, 0x65, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x3a, 0x12, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x41, 0x67, 0x65, 0x6e, 0x74, + 0x4c, 0x69, 0x73, 0x74, 0x40, 0x01, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x77, 0x0a, 0x08, + 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, + 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x32, 0x92, 0x41, 0x2f, 0x2a, 0x0c, 0x4c, 0x69, + 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x32, 0x1d, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x69, 0x73, 0x74, + 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x40, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x42, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x04, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, + 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x42, 0x6f, + 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x42, 0x04, 0xc8, 0xde, + 0x1f, 0x00, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x2a, 0x35, 0x0a, 0x12, 0x42, 0x6f, 0x6f, + 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x49, 0x6e, 0x66, 0x72, 0x61, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x19, 0x0a, 0x15, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, + 0x72, 0x61, 0x70, 0x49, 0x6e, 0x66, 0x72, 0x61, 0x10, 0x00, 0x1a, 0x04, 0x88, 0xa3, 0x1e, 0x00, + 0x2a, 0x51, 0x0a, 0x12, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x41, 0x67, 0x65, + 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x0e, 0x52, 0x61, 0x66, 0x61, 0x79, 0x43, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x52, 0x65, + 0x6c, 0x61, 0x79, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x50, 0x69, + 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x10, 0x02, 0x1a, 0x04, 0x88, + 0xa3, 0x1e, 0x00, 0x2a, 0x3b, 0x0a, 0x12, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, + 0x41, 0x67, 0x65, 0x6e, 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x0d, 0x0a, 0x09, 0x49, 0x6e, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x4f, 0x75, 0x74, 0x4f, + 0x66, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x10, 0x01, 0x1a, 0x04, 0x88, 0xa3, 0x1e, 0x00, + 0x2a, 0x59, 0x0a, 0x13, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x41, 0x67, 0x65, + 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x4e, 0x6f, 0x74, 0x53, 0x65, + 0x74, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x4e, 0x6f, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x65, 0x72, 0x65, 0x64, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x4e, 0x6f, 0x74, 0x41, 0x70, 0x70, + 0x72, 0x6f, 0x76, 0x65, 0x64, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x41, 0x70, 0x70, 0x72, 0x6f, + 0x76, 0x65, 0x64, 0x10, 0x03, 0x1a, 0x04, 0x88, 0xa3, 0x1e, 0x00, 0x2a, 0x5d, 0x0a, 0x1a, 0x42, + 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x54, 0x65, 0x6d, + 0x70, 0x6c, 0x61, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x12, 0x54, 0x65, 0x6d, + 0x70, 0x6c, 0x61, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x4e, 0x6f, 0x74, 0x53, 0x65, 0x74, 0x10, + 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x10, 0x01, 0x12, 0x0a, 0x0a, + 0x06, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x4d, 0x69, 0x78, + 0x65, 0x64, 0x10, 0x03, 0x1a, 0x04, 0x88, 0xa3, 0x1e, 0x00, 0x2a, 0x61, 0x0a, 0x19, 0x42, 0x6f, + 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x48, + 0x6f, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x0e, 0x48, 0x6f, 0x73, 0x74, 0x54, + 0x79, 0x70, 0x65, 0x4e, 0x6f, 0x74, 0x53, 0x65, 0x74, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x48, + 0x6f, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x10, + 0x01, 0x12, 0x14, 0x0a, 0x10, 0x48, 0x6f, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x45, 0x78, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x10, 0x02, 0x1a, 0x04, 0x88, 0xa3, 0x1e, 0x00, 0x42, 0xef, 0x01, + 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x0b, 0x53, 0x65, + 0x6e, 0x74, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x48, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x61, 0x66, 0x61, 0x79, 0x53, 0x79, 0x73, + 0x74, 0x65, 0x6d, 0x73, 0x2f, 0x72, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x62, 0x61, 0x73, 0x65, + 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x73, + 0x65, 0x6e, 0x74, 0x72, 0x79, 0xa2, 0x02, 0x04, 0x52, 0x44, 0x54, 0x53, 0xaa, 0x02, 0x16, 0x52, + 0x61, 0x66, 0x61, 0x79, 0x2e, 0x44, 0x65, 0x76, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x53, + 0x65, 0x6e, 0x74, 0x72, 0x79, 0xca, 0x02, 0x16, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, + 0x76, 0x5c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x5c, 0x53, 0x65, 0x6e, 0x74, 0x72, 0x79, 0xe2, 0x02, + 0x22, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x54, 0x79, 0x70, 0x65, 0x73, + 0x5c, 0x53, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0xea, 0x02, 0x19, 0x52, 0x61, 0x66, 0x61, 0x79, 0x3a, 0x3a, 0x44, 0x65, 0x76, + 0x3a, 0x3a, 0x54, 0x79, 0x70, 0x65, 0x73, 0x3a, 0x3a, 0x53, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_proto_types_sentry_sentry_proto_rawDescOnce sync.Once + file_proto_types_sentry_sentry_proto_rawDescData = file_proto_types_sentry_sentry_proto_rawDesc +) + +func file_proto_types_sentry_sentry_proto_rawDescGZIP() []byte { + file_proto_types_sentry_sentry_proto_rawDescOnce.Do(func() { + file_proto_types_sentry_sentry_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_types_sentry_sentry_proto_rawDescData) + }) + return file_proto_types_sentry_sentry_proto_rawDescData +} + +var file_proto_types_sentry_sentry_proto_enumTypes = make([]protoimpl.EnumInfo, 6) +var file_proto_types_sentry_sentry_proto_msgTypes = make([]protoimpl.MessageInfo, 13) +var file_proto_types_sentry_sentry_proto_goTypes = []interface{}{ + (BootstrapInfraType)(0), // 0: rafay.dev.types.sentry.BootstrapInfraType + (BootstrapAgentType)(0), // 1: rafay.dev.types.sentry.BootstrapAgentType + (BootstrapAgentMode)(0), // 2: rafay.dev.types.sentry.BootstrapAgentMode + (BootstrapAgentState)(0), // 3: rafay.dev.types.sentry.BootstrapAgentState + (BootstrapAgentTemplateType)(0), // 4: rafay.dev.types.sentry.BootstrapAgentTemplateType + (BootstrapTemplateHostType)(0), // 5: rafay.dev.types.sentry.BootstrapTemplateHostType + (*BootstrapInfraSpec)(nil), // 6: rafay.dev.types.sentry.BootstrapInfraSpec + (*BootstrapInfraStatus)(nil), // 7: rafay.dev.types.sentry.BootstrapInfraStatus + (*BootstrapInfra)(nil), // 8: rafay.dev.types.sentry.BootstrapInfra + (*BootstrapInfraList)(nil), // 9: rafay.dev.types.sentry.BootstrapInfraList + (*BootstrapTemplateHost)(nil), // 10: rafay.dev.types.sentry.BootstrapTemplateHost + (*BootstrapAgentTemplateSpec)(nil), // 11: rafay.dev.types.sentry.BootstrapAgentTemplateSpec + (*BootstrapAgentTemplateStatus)(nil), // 12: rafay.dev.types.sentry.BootstrapAgentTemplateStatus + (*BootstrapAgentTemplate)(nil), // 13: rafay.dev.types.sentry.BootstrapAgentTemplate + (*BootstrapAgentTemplateList)(nil), // 14: rafay.dev.types.sentry.BootstrapAgentTemplateList + (*BootstrapAgentSpec)(nil), // 15: rafay.dev.types.sentry.BootstrapAgentSpec + (*BootStrapAgentStatus)(nil), // 16: rafay.dev.types.sentry.BootStrapAgentStatus + (*BootstrapAgent)(nil), // 17: rafay.dev.types.sentry.BootstrapAgent + (*BootstrapAgentList)(nil), // 18: rafay.dev.types.sentry.BootstrapAgentList + (*v3.Metadata)(nil), // 19: rafay.dev.types.common.v3.Metadata + (*v3.ListMetadata)(nil), // 20: rafay.dev.types.common.v3.ListMetadata + (*timestamppb.Timestamp)(nil), // 21: google.protobuf.Timestamp +} +var file_proto_types_sentry_sentry_proto_depIdxs = []int32{ + 19, // 0: rafay.dev.types.sentry.BootstrapInfra.metadata:type_name -> rafay.dev.types.common.v3.Metadata + 6, // 1: rafay.dev.types.sentry.BootstrapInfra.spec:type_name -> rafay.dev.types.sentry.BootstrapInfraSpec + 7, // 2: rafay.dev.types.sentry.BootstrapInfra.status:type_name -> rafay.dev.types.sentry.BootstrapInfraStatus + 20, // 3: rafay.dev.types.sentry.BootstrapInfraList.metadata:type_name -> rafay.dev.types.common.v3.ListMetadata + 8, // 4: rafay.dev.types.sentry.BootstrapInfraList.items:type_name -> rafay.dev.types.sentry.BootstrapInfra + 5, // 5: rafay.dev.types.sentry.BootstrapTemplateHost.type:type_name -> rafay.dev.types.sentry.BootstrapTemplateHostType + 4, // 6: rafay.dev.types.sentry.BootstrapAgentTemplateSpec.templateType:type_name -> rafay.dev.types.sentry.BootstrapAgentTemplateType + 10, // 7: rafay.dev.types.sentry.BootstrapAgentTemplateSpec.hosts:type_name -> rafay.dev.types.sentry.BootstrapTemplateHost + 19, // 8: rafay.dev.types.sentry.BootstrapAgentTemplate.metadata:type_name -> rafay.dev.types.common.v3.Metadata + 11, // 9: rafay.dev.types.sentry.BootstrapAgentTemplate.spec:type_name -> rafay.dev.types.sentry.BootstrapAgentTemplateSpec + 12, // 10: rafay.dev.types.sentry.BootstrapAgentTemplate.status:type_name -> rafay.dev.types.sentry.BootstrapAgentTemplateStatus + 20, // 11: rafay.dev.types.sentry.BootstrapAgentTemplateList.metadata:type_name -> rafay.dev.types.common.v3.ListMetadata + 13, // 12: rafay.dev.types.sentry.BootstrapAgentTemplateList.items:type_name -> rafay.dev.types.sentry.BootstrapAgentTemplate + 2, // 13: rafay.dev.types.sentry.BootstrapAgentSpec.agentMode:type_name -> rafay.dev.types.sentry.BootstrapAgentMode + 3, // 14: rafay.dev.types.sentry.BootStrapAgentStatus.tokenState:type_name -> rafay.dev.types.sentry.BootstrapAgentState + 21, // 15: rafay.dev.types.sentry.BootStrapAgentStatus.lastCheckedIn:type_name -> google.protobuf.Timestamp + 19, // 16: rafay.dev.types.sentry.BootstrapAgent.metadata:type_name -> rafay.dev.types.common.v3.Metadata + 15, // 17: rafay.dev.types.sentry.BootstrapAgent.spec:type_name -> rafay.dev.types.sentry.BootstrapAgentSpec + 16, // 18: rafay.dev.types.sentry.BootstrapAgent.status:type_name -> rafay.dev.types.sentry.BootStrapAgentStatus + 20, // 19: rafay.dev.types.sentry.BootstrapAgentList.metadata:type_name -> rafay.dev.types.common.v3.ListMetadata + 17, // 20: rafay.dev.types.sentry.BootstrapAgentList.items:type_name -> rafay.dev.types.sentry.BootstrapAgent + 21, // [21:21] is the sub-list for method output_type + 21, // [21:21] is the sub-list for method input_type + 21, // [21:21] is the sub-list for extension type_name + 21, // [21:21] is the sub-list for extension extendee + 0, // [0:21] is the sub-list for field type_name +} + +func init() { file_proto_types_sentry_sentry_proto_init() } +func file_proto_types_sentry_sentry_proto_init() { + if File_proto_types_sentry_sentry_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_proto_types_sentry_sentry_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BootstrapInfraSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_sentry_sentry_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BootstrapInfraStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_sentry_sentry_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BootstrapInfra); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_sentry_sentry_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BootstrapInfraList); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_sentry_sentry_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BootstrapTemplateHost); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_sentry_sentry_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BootstrapAgentTemplateSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_sentry_sentry_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BootstrapAgentTemplateStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_sentry_sentry_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BootstrapAgentTemplate); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_sentry_sentry_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BootstrapAgentTemplateList); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_sentry_sentry_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BootstrapAgentSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_sentry_sentry_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BootStrapAgentStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_sentry_sentry_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BootstrapAgent); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_types_sentry_sentry_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BootstrapAgentList); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_proto_types_sentry_sentry_proto_rawDesc, + NumEnums: 6, + NumMessages: 13, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_proto_types_sentry_sentry_proto_goTypes, + DependencyIndexes: file_proto_types_sentry_sentry_proto_depIdxs, + EnumInfos: file_proto_types_sentry_sentry_proto_enumTypes, + MessageInfos: file_proto_types_sentry_sentry_proto_msgTypes, + }.Build() + File_proto_types_sentry_sentry_proto = out.File + file_proto_types_sentry_sentry_proto_rawDesc = nil + file_proto_types_sentry_sentry_proto_goTypes = nil + file_proto_types_sentry_sentry_proto_depIdxs = nil +} diff --git a/components/common/proto/types/sentry/sentry.proto b/components/common/proto/types/sentry/sentry.proto new file mode 100644 index 0000000..732b0e3 --- /dev/null +++ b/components/common/proto/types/sentry/sentry.proto @@ -0,0 +1,272 @@ +syntax = "proto3"; +package rafay.dev.types.sentry; + +import "gogoproto/gogo.proto"; +import "google/protobuf/timestamp.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; +import "proto/types/commonpb/v3/common.proto"; +import "proto/types/config/placement.proto"; + +enum BootstrapInfraType { + // disable enum prefix + option (gogoproto.goproto_enum_prefix) = false; + ClusterBootstrapInfra = 0; +} + +enum BootstrapAgentType { + // disable enum prefix + option (gogoproto.goproto_enum_prefix) = false; + + RafayConnector = 0; + RelayAgent = 1; + + PipelineAgent = 2; +} + +enum BootstrapAgentMode { + // disable enum prefix + option (gogoproto.goproto_enum_prefix) = false; + + InCluster = 0; + OutOfCluster = 1; +} + +enum BootstrapAgentState { + // disable enum prefix + option (gogoproto.goproto_enum_prefix) = false; + + NotSet = 0; + NotRegistered = 1; + NotApproved = 2; + Approved = 3; +} + +message BootstrapInfraSpec { + string caCert = 1 [ (gogoproto.moretags) = "pg:\"ca_cert\"" ]; + string caKey = 2 [ (gogoproto.moretags) = "pg:\"ca_key\"" ]; + string caKeyPass = 3 [ (gogoproto.moretags) = "pg:\"ca_key_pass\"" ]; +} + +message BootstrapInfraStatus {} + +message BootstrapInfra { + string apiVersion = 1 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "API Version", + description : "API Version of the resource" + default : "infra.k8smgmt.io/v3" + read_only : true + } ]; + string kind = 2 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Kind", + description : "Kind of the resource" + default : "BootstrapInfra" + read_only : true + } ]; + rafay.dev.types.common.v3.Metadata metadata = 3 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Metadata", + description : "Metadata of the resource" + }, + (gogoproto.nullable) = false, (gogoproto.embed) = true ]; + BootstrapInfraSpec spec = 4 + [ (gogoproto.nullable) = false, (gogoproto.embed) = true ]; + BootstrapInfraStatus status = 5 + [ (gogoproto.nullable) = false, (gogoproto.embed) = true ]; +} + +message BootstrapInfraList { + string apiVersion = 1 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "API Version", + description : "API Version of the list resource" + default : "infra.k8smgmt.io/v3" + read_only : true + } ]; + string kind = 2 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Kind", + description : "Kind of the list resource" + default : "BootstrapInfraList" + read_only : true + } ]; + rafay.dev.types.common.v3.ListMetadata metadata = 3 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "ListMetadata", + description : "Metadata of the list resource" + read_only : true + } ]; + repeated BootstrapInfra items = 4 [ (gogoproto.nullable) = false ]; +} + +enum BootstrapAgentTemplateType { + // disable enum prefix + option (gogoproto.goproto_enum_prefix) = false; + + TemplateTypeNotSet = 0; + Client = 1; + Server = 2; + Mixed = 3; +} + +enum BootstrapTemplateHostType { + // disable enum prefix + option (gogoproto.goproto_enum_prefix) = false; + HostTypeNotSet = 0; + HostTypeInternal = 1; + HostTypeExternal = 2; +} + +message BootstrapTemplateHost { + string host = 1; + BootstrapTemplateHostType type = 2; +} + +message BootstrapAgentTemplateSpec { + string infraRef = 1 [ (gogoproto.moretags) = "bun:\"infra_ref\"" ]; + bool autoRegister = 2 [ + (gogoproto.moretags) = "bun:\"auto_register\"", + (gogoproto.jsontag) = "autoRegister" + ]; + bool ignoreMultipleRegister = 3 [ + (gogoproto.moretags) = "bun:\"ignore_multiple_register\"", + (gogoproto.jsontag) = "ignoreMultipleRegister" + ]; + bool autoApprove = 4 [ + (gogoproto.moretags) = "bun:\"auto_approve\"", + (gogoproto.jsontag) = "autoApprove" + ]; + BootstrapAgentTemplateType templateType = 5 [ + (gogoproto.moretags) = "bun:\"template_type,use_zero\"", + (gogoproto.jsontag) = "templateType" + ]; + string token = 6 [ (gogoproto.moretags) = "bun:\"token\"" ]; + repeated BootstrapTemplateHost hosts = 7 [ (gogoproto.moretags) = "bun:\"hosts,use_zero\"" ]; + string inClusterTemplate = 8 [ + (gogoproto.moretags) = "bun:\"incluster_template,use_zero\"", + (gogoproto.jsontag) = "inClusterTemplate" + ]; + string outOfClusterTemplate = 9 [ + (gogoproto.moretags) = "bun:\"outofcluster_template,use_zero\"", + (gogoproto.jsontag) = "outOfClusterTemplate" + ]; +} + +message BootstrapAgentTemplateStatus {} + +message BootstrapAgentTemplate { + string apiVersion = 1 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "API Version", + description : "API Version of the resource" + default : "infra.k8smgmt.io/v3" + read_only : true + } ]; + string kind = 2 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Kind", + description : "Kind of the resource" + default : "BootstrapAgentTemplate" + read_only : true + } ]; + rafay.dev.types.common.v3.Metadata metadata = 3 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Metadata", + description : "Metadata of the resource" + }, + (gogoproto.nullable) = false, (gogoproto.embed) = true ]; + BootstrapAgentTemplateSpec spec = 4 + [ (gogoproto.nullable) = false, (gogoproto.embed) = true ]; + BootstrapAgentTemplateStatus status = 5 + [ (gogoproto.nullable) = false, (gogoproto.embed) = true ]; +} + +message BootstrapAgentTemplateList { + string apiVersion = 1 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "API Version", + description : "API Version of the list resource" + default : "infra.k8smgmt.io/v3" + read_only : true + } ]; + string kind = 2 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Kind", + description : "Kind of the list resource" + default : "BootstrapAgentTemplateList" + read_only : true + } ]; + rafay.dev.types.common.v3.ListMetadata metadata = 3 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "ListMetadata", + description : "Metadata of the list resource" + read_only : true + } ]; + repeated BootstrapAgentTemplate items = 4 [ (gogoproto.nullable) = false ]; +} + +message BootstrapAgentSpec { + string token = 1; + string templateRef = 2; + BootstrapAgentMode agentMode = 3; +} + +message BootStrapAgentStatus { + BootstrapAgentState tokenState = 1; + string ipAddress = 2; + google.protobuf.Timestamp lastCheckedIn = 3; + string fingerprint = 4; +} + +message BootstrapAgent { + string apiVersion = 1 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "API Version", + description : "API Version of the resource" + default : "infra.k8smgmt.io/v3" + read_only : true + } ]; + string kind = 2 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Kind", + description : "Kind of the resource" + default : "BootstrapAgent" + read_only : true + } ]; + rafay.dev.types.common.v3.Metadata metadata = 3 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Metadata", + description : "Metadata of the resource" + }, + (gogoproto.nullable) = false, (gogoproto.embed) = true ]; + BootstrapAgentSpec spec = 4 + [ (gogoproto.nullable) = false, (gogoproto.embed) = true ]; + BootStrapAgentStatus status = 5 + [ (gogoproto.nullable) = false, (gogoproto.embed) = true ]; +} + +// BootstrapAgentList is a list of bootstrap agents +message BootstrapAgentList { + string apiVersion = 1 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "API Version", + description : "API Version of the list resource" + default : "infra.k8smgmt.io/v3" + read_only : true + } ]; + string kind = 2 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "Kind", + description : "Kind of the list resource" + default : "BootstrapAgentList" + read_only : true + } ]; + rafay.dev.types.common.v3.ListMetadata metadata = 3 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "ListMetadata", + description : "Metadata of the list resource" + read_only : true + } ]; + repeated BootstrapAgent items = 4 [ (gogoproto.nullable) = false ]; +} \ No newline at end of file diff --git a/components/usermgmt/gen/openapi/proto/rpc/v3/group.swagger.json b/components/usermgmt/gen/openapi/proto/rpc/v3/group.swagger.json index 822006e..28a0d04 100644 --- a/components/usermgmt/gen/openapi/proto/rpc/v3/group.swagger.json +++ b/components/usermgmt/gen/openapi/proto/rpc/v3/group.swagger.json @@ -90,6 +90,13 @@ "type": "string", "default": "Group" }, + { + "name": "metadata.displayName", + "description": "Display Name. display name of the resource", + "in": "query", + "required": false, + "type": "string" + }, { "name": "metadata.description", "description": "Description. description of the resource", @@ -245,6 +252,13 @@ "type": "string", "default": "Group" }, + { + "name": "metadata.displayName", + "description": "Display Name. display name of the resource", + "in": "query", + "required": false, + "type": "string" + }, { "name": "metadata.description", "description": "Description. description of the resource", @@ -460,6 +474,13 @@ "required": false, "type": "string" }, + { + "name": "metadata.displayName", + "description": "Display Name. display name of the resource", + "in": "query", + "required": false, + "type": "string" + }, { "name": "metadata.description", "description": "Description. description of the resource", @@ -819,6 +840,11 @@ "description": "name of the resource", "title": "Name" }, + "displayName": { + "type": "string", + "description": "display name of the resource", + "title": "Display Name" + }, "description": { "type": "string", "description": "description of the resource", diff --git a/components/usermgmt/gen/openapi/proto/rpc/v3/idp.swagger.json b/components/usermgmt/gen/openapi/proto/rpc/v3/idp.swagger.json index 247536a..4013dd8 100644 --- a/components/usermgmt/gen/openapi/proto/rpc/v3/idp.swagger.json +++ b/components/usermgmt/gen/openapi/proto/rpc/v3/idp.swagger.json @@ -154,6 +154,20 @@ "type": "string", "default": "Idp" }, + { + "name": "metadata.name", + "description": "Name. name of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.displayName", + "description": "Display Name. display name of the resource", + "in": "query", + "required": false, + "type": "string" + }, { "name": "metadata.description", "description": "Description. description of the resource", @@ -369,6 +383,20 @@ "type": "string", "default": "Idp" }, + { + "name": "metadata.name", + "description": "Name. name of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.displayName", + "description": "Display Name. display name of the resource", + "in": "query", + "required": false, + "type": "string" + }, { "name": "metadata.description", "description": "Description. description of the resource", @@ -809,6 +837,11 @@ "description": "name of the resource", "title": "Name" }, + "displayName": { + "type": "string", + "description": "display name of the resource", + "title": "Display Name" + }, "description": { "type": "string", "description": "description of the resource", diff --git a/components/usermgmt/gen/openapi/proto/rpc/v3/oidc_provider.swagger.json b/components/usermgmt/gen/openapi/proto/rpc/v3/oidc_provider.swagger.json index 84aba9e..ce52320 100644 --- a/components/usermgmt/gen/openapi/proto/rpc/v3/oidc_provider.swagger.json +++ b/components/usermgmt/gen/openapi/proto/rpc/v3/oidc_provider.swagger.json @@ -154,6 +154,20 @@ "type": "string", "default": "OIDCProvider" }, + { + "name": "metadata.name", + "description": "Name. name of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.displayName", + "description": "Display Name. display name of the resource", + "in": "query", + "required": false, + "type": "string" + }, { "name": "metadata.description", "description": "Description. description of the resource", @@ -361,6 +375,20 @@ "type": "string", "default": "OIDCProvider" }, + { + "name": "metadata.name", + "description": "Name. name of the resource", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "metadata.displayName", + "description": "Display Name. display name of the resource", + "in": "query", + "required": false, + "type": "string" + }, { "name": "metadata.description", "description": "Description. description of the resource", @@ -679,6 +707,11 @@ "description": "name of the resource", "title": "Name" }, + "displayName": { + "type": "string", + "description": "display name of the resource", + "title": "Display Name" + }, "description": { "type": "string", "description": "description of the resource", diff --git a/components/usermgmt/gen/openapi/proto/rpc/v3/role.swagger.json b/components/usermgmt/gen/openapi/proto/rpc/v3/role.swagger.json index 055b5ef..6e22068 100644 --- a/components/usermgmt/gen/openapi/proto/rpc/v3/role.swagger.json +++ b/components/usermgmt/gen/openapi/proto/rpc/v3/role.swagger.json @@ -90,6 +90,13 @@ "type": "string", "default": "Role" }, + { + "name": "metadata.displayName", + "description": "Display Name. display name of the resource", + "in": "query", + "required": false, + "type": "string" + }, { "name": "metadata.description", "description": "Description. description of the resource", @@ -252,6 +259,13 @@ "type": "string", "default": "Role" }, + { + "name": "metadata.displayName", + "description": "Display Name. display name of the resource", + "in": "query", + "required": false, + "type": "string" + }, { "name": "metadata.description", "description": "Description. description of the resource", @@ -474,6 +488,13 @@ "required": false, "type": "string" }, + { + "name": "metadata.displayName", + "description": "Display Name. display name of the resource", + "in": "query", + "required": false, + "type": "string" + }, { "name": "metadata.description", "description": "Description. description of the resource", @@ -736,6 +757,11 @@ "description": "name of the resource", "title": "Name" }, + "displayName": { + "type": "string", + "description": "display name of the resource", + "title": "Display Name" + }, "description": { "type": "string", "description": "description of the resource", diff --git a/components/usermgmt/gen/openapi/proto/rpc/v3/rolepermission.swagger.json b/components/usermgmt/gen/openapi/proto/rpc/v3/rolepermission.swagger.json index 6ecabdc..1286759 100644 --- a/components/usermgmt/gen/openapi/proto/rpc/v3/rolepermission.swagger.json +++ b/components/usermgmt/gen/openapi/proto/rpc/v3/rolepermission.swagger.json @@ -76,6 +76,13 @@ "required": false, "type": "string" }, + { + "name": "metadata.displayName", + "description": "Display Name. display name of the resource", + "in": "query", + "required": false, + "type": "string" + }, { "name": "metadata.description", "description": "Description. description of the resource", @@ -279,6 +286,11 @@ "description": "name of the resource", "title": "Name" }, + "displayName": { + "type": "string", + "description": "display name of the resource", + "title": "Display Name" + }, "description": { "type": "string", "description": "description of the resource", diff --git a/components/usermgmt/gen/openapi/proto/rpc/v3/user.swagger.json b/components/usermgmt/gen/openapi/proto/rpc/v3/user.swagger.json index 97c84fc..66669b8 100644 --- a/components/usermgmt/gen/openapi/proto/rpc/v3/user.swagger.json +++ b/components/usermgmt/gen/openapi/proto/rpc/v3/user.swagger.json @@ -76,6 +76,13 @@ "type": "string", "default": "User" }, + { + "name": "metadata.displayName", + "description": "Display Name. display name of the resource", + "in": "query", + "required": false, + "type": "string" + }, { "name": "metadata.description", "description": "Description. description of the resource", @@ -266,6 +273,13 @@ "type": "string", "default": "User" }, + { + "name": "metadata.displayName", + "description": "Display Name. display name of the resource", + "in": "query", + "required": false, + "type": "string" + }, { "name": "metadata.description", "description": "Description. description of the resource", @@ -502,6 +516,13 @@ "required": false, "type": "string" }, + { + "name": "metadata.displayName", + "description": "Display Name. display name of the resource", + "in": "query", + "required": false, + "type": "string" + }, { "name": "metadata.description", "description": "Description. description of the resource", @@ -795,6 +816,11 @@ "description": "name of the resource", "title": "Name" }, + "displayName": { + "type": "string", + "description": "display name of the resource", + "title": "Display Name" + }, "description": { "type": "string", "description": "description of the resource", diff --git a/components/usermgmt/go.mod b/components/usermgmt/go.mod index 1830140..b56e8c4 100644 --- a/components/usermgmt/go.mod +++ b/components/usermgmt/go.mod @@ -9,14 +9,14 @@ require ( github.com/crewjam/saml v0.4.6 github.com/gogo/protobuf v1.3.2 github.com/google/uuid v1.3.0 - github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.2 + github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.3 github.com/ory/kratos-client-go v0.8.2-alpha.1 github.com/spf13/viper v1.10.1 - github.com/uptrace/bun v1.0.20 + github.com/uptrace/bun v1.0.21 github.com/uptrace/bun/dialect/pgdialect v1.0.20 github.com/uptrace/bun/driver/pgdriver v1.0.20 github.com/uptrace/bun/extra/bundebug v1.0.20 - google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa + google.golang.org/genproto v0.0.0-20220118154757-00ab72f36ad5 google.golang.org/grpc v1.43.0 google.golang.org/protobuf v1.27.1 sigs.k8s.io/controller-runtime v0.11.0 @@ -24,34 +24,45 @@ require ( require ( github.com/beevik/etree v1.1.0 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/cespare/xxhash/v2 v2.1.2 // indirect github.com/crewjam/httperr v0.2.0 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/evanphx/json-patch v4.12.0+incompatible // indirect github.com/fatih/color v1.13.0 // indirect github.com/fsnotify/fsnotify v1.5.1 // indirect github.com/go-logr/logr v1.2.0 // indirect github.com/golang-jwt/jwt/v4 v4.1.0 // indirect + github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.2 // indirect - github.com/google/go-cmp v0.5.6 // indirect + github.com/google/go-cmp v0.5.7 // indirect github.com/google/gofuzz v1.1.0 // indirect + github.com/googleapis/gnostic v0.5.5 // indirect github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect github.com/hashicorp/hcl v1.0.0 // indirect + github.com/imdario/mergo v0.3.12 // indirect github.com/jinzhu/inflection v1.0.0 // indirect github.com/jonboulle/clockwork v0.2.2 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/julienschmidt/httprouter v1.3.0 // indirect - github.com/klauspost/cpuid/v2 v2.0.6 // indirect github.com/magiconair/properties v1.8.5 // indirect github.com/mattermost/xml-roundtrip-validator v0.1.0 // indirect github.com/mattn/go-colorable v0.1.12 // indirect github.com/mattn/go-isatty v0.0.14 // indirect + github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect github.com/mitchellh/mapstructure v1.4.3 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pelletier/go-toml v1.9.4 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/processout/grpc-go-pool v1.2.1 // indirect + github.com/prometheus/client_golang v1.11.0 // indirect + github.com/prometheus/client_model v0.2.0 // indirect + github.com/prometheus/common v0.28.0 // indirect + github.com/prometheus/procfs v0.6.0 // indirect github.com/russellhaering/goxmldsig v1.1.1 // indirect - github.com/segmentio/asm v1.1.0 // indirect - github.com/segmentio/encoding v0.3.2 // indirect + github.com/segmentio/asm v1.1.3 // indirect + github.com/segmentio/encoding v0.3.3 // indirect github.com/speps/go-hashids v2.0.0+incompatible // indirect github.com/spf13/afero v1.6.0 // indirect github.com/spf13/cast v1.4.1 // indirect @@ -59,28 +70,38 @@ require ( github.com/spf13/pflag v1.0.5 // indirect github.com/subosito/gotenv v1.2.0 // indirect github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc // indirect + github.com/valyala/fastjson v1.6.3 // indirect github.com/vmihailenco/msgpack/v5 v5.3.5 // indirect github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect go.uber.org/atomic v1.7.0 // indirect go.uber.org/multierr v1.6.0 // indirect - go.uber.org/zap v1.19.1 // indirect - golang.org/x/crypto v0.0.0-20220126234351-aa10faf2a1f8 // indirect + go.uber.org/zap v1.20.0 // indirect + golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3 // indirect golang.org/x/net v0.0.0-20211209124913-491a49abca63 // indirect golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect - golang.org/x/sys v0.0.0-20220114195835-da31bd327af9 // indirect + golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e // indirect + golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b // indirect golang.org/x/text v0.3.7 // indirect + golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect + gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect google.golang.org/appengine v1.6.7 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.66.2 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect - k8s.io/apimachinery v0.23.1 // indirect + gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect + k8s.io/api v0.23.2 // indirect + k8s.io/apiextensions-apiserver v0.23.2 // indirect + k8s.io/apimachinery v0.23.2 // indirect + k8s.io/client-go v0.23.2 // indirect + k8s.io/component-base v0.23.2 // indirect k8s.io/klog v1.0.0 // indirect k8s.io/klog/v2 v2.30.0 // indirect + k8s.io/kube-openapi v0.0.0-20220114203427-a0453230fd26 // indirect k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b // indirect mellium.im/sasl v0.2.1 // indirect sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 // indirect sigs.k8s.io/kustomize/pseudo/k8s v0.1.0 // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.2.0 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect sigs.k8s.io/yaml v1.3.0 // indirect ) diff --git a/components/usermgmt/go.sum b/components/usermgmt/go.sum index 87426a4..e0e971a 100644 --- a/components/usermgmt/go.sum +++ b/components/usermgmt/go.sum @@ -77,14 +77,17 @@ github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb0 github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= +github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/antlr/antlr4/runtime/Go/antlr v0.0.0-20210826220005-b48c857c3a0e/go.mod h1:F7bn7fEU90QkQ3tnmaTx3LTKLEDqnwWODIYppRQ5hnY= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= @@ -92,7 +95,12 @@ github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmV github.com/armon/go-metrics v0.3.10/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg= +github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg= +github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= +github.com/aws/aws-sdk-go v1.34.28/go.mod h1:H7NKnBqNVzoTJpGfLrQkkD+ytBA93eiDYi/+8rV9s48= github.com/beevik/etree v1.1.0 h1:T0xke/WvNtMoCqgzPhkX2r4rjY3GDZFi+FjpRZY2Jbs= github.com/beevik/etree v1.1.0/go.mod h1:r8Aw8JqVegEf0w2fDnATrX9VpkMcyFeM0FhwO62wh+A= github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= @@ -100,6 +108,7 @@ github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLj 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= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= @@ -112,8 +121,10 @@ github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/certifi/gocertifi v0.0.0-20191021191039-0944d244cd40/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= github.com/certifi/gocertifi v0.0.0-20200922220541-2c3bb06c6054/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= +github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= @@ -156,9 +167,13 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dchest/uniuri v0.0.0-20200228104902-7aecb25e1fe5/go.mod h1:GgB8SF9nRG+GqaDtLcwJZsQFhcogVCJ79j4EdT0c2V4= +github.com/dgraph-io/ristretto v0.1.0/go.mod h1:fux0lOrBhrVCJd3lcTHsIJhq1T2rokOu6v9Vcb3Q9ug= github.com/denisenkom/go-mssqldb v0.11.0/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/spdystream v0.0.0-20181023171402-6480d4af844c/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= @@ -180,6 +195,7 @@ github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7 github.com/envoyproxy/protoc-gen-validate v0.6.2/go.mod h1:2t7qjJNvHPx8IjnBOzl9E9/baC+qXE/TeeyBRzgJDws= github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ= github.com/evanphx/json-patch v4.5.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84= github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= @@ -196,6 +212,8 @@ github.com/getkin/kin-openapi v0.76.0/go.mod h1:660oXbgy5JFMKreazJaQTw7o+X00qeSy github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= +github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -209,21 +227,129 @@ github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7 github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v1.2.0 h1:QK40JKJyMdUDz+h+xvCsru/bJhvG0UxvePV0ufL/AcE= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/zapr v1.2.0 h1:n4JnPI1T3Qq1SFEi/F8rwLrZERp2bso19PJZDB9dayk= github.com/go-logr/zapr v1.2.0/go.mod h1:Qa4Bsj2Vb+FAVeAKsLD8RLQ+YRJB8YDmOAKxaBQf7Ro= +github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= +github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= +github.com/go-openapi/analysis v0.18.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= +github.com/go-openapi/analysis v0.19.2/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= +github.com/go-openapi/analysis v0.19.4/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= +github.com/go-openapi/analysis v0.19.5/go.mod h1:hkEAkxagaIvIP7VTn8ygJNkd4kAYON2rCu0v0ObL0AU= +github.com/go-openapi/analysis v0.19.10/go.mod h1:qmhS3VNFxBlquFJ0RGoDtylO9y4pgTAUNE9AEEMdlJQ= +github.com/go-openapi/analysis v0.19.16/go.mod h1:GLInF007N83Ad3m8a/CbQ5TPzdnGT7workfHwuVjNVk= +github.com/go-openapi/analysis v0.20.0/go.mod h1:BMchjvaHDykmRMsK40iPtvyOfFdMMxlOmQr9FBZk+Og= +github.com/go-openapi/analysis v0.20.1/go.mod h1:BMchjvaHDykmRMsK40iPtvyOfFdMMxlOmQr9FBZk+Og= +github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= +github.com/go-openapi/errors v0.18.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= +github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= +github.com/go-openapi/errors v0.19.3/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= +github.com/go-openapi/errors v0.19.6/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= +github.com/go-openapi/errors v0.19.7/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= +github.com/go-openapi/errors v0.19.8/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= +github.com/go-openapi/errors v0.19.9/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= +github.com/go-openapi/errors v0.20.1/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= +github.com/go-openapi/errors v0.20.2/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= +github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= +github.com/go-openapi/jsonpointer v0.18.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= +github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= +github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= +github.com/go-openapi/jsonreference v0.18.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= +github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= +github.com/go-openapi/jsonreference v0.19.6/go.mod h1:diGHMEHg2IqXZGKxqyvWdfWU/aim5Dprw5bqpKkTvns= +github.com/go-openapi/loads v0.17.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= +github.com/go-openapi/loads v0.18.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= +github.com/go-openapi/loads v0.19.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= +github.com/go-openapi/loads v0.19.2/go.mod h1:QAskZPMX5V0C2gvfkGZzJlINuP7Hx/4+ix5jWFxsNPs= +github.com/go-openapi/loads v0.19.3/go.mod h1:YVfqhUCdahYwR3f3iiwQLhicVRvLlU/WO5WPaZvcvSI= +github.com/go-openapi/loads v0.19.5/go.mod h1:dswLCAdonkRufe/gSUC3gN8nTSaB9uaS2es0x5/IbjY= +github.com/go-openapi/loads v0.19.6/go.mod h1:brCsvE6j8mnbmGBh103PT/QLHfbyDxA4hsKvYBNEGVc= +github.com/go-openapi/loads v0.19.7/go.mod h1:brCsvE6j8mnbmGBh103PT/QLHfbyDxA4hsKvYBNEGVc= +github.com/go-openapi/loads v0.20.0/go.mod h1:2LhKquiE513rN5xC6Aan6lYOSddlL8Mp20AW9kpviM4= +github.com/go-openapi/loads v0.20.2/go.mod h1:hTVUotJ+UonAMMZsvakEgmWKgtulweO9vYP2bQYKA/o= +github.com/go-openapi/loads v0.21.0/go.mod h1:rHYve9nZrQ4CJhyeIIFJINGCg1tQpx2yJrrNo8sf1ws= +github.com/go-openapi/runtime v0.0.0-20180920151709-4f900dc2ade9/go.mod h1:6v9a6LTXWQCdL8k1AO3cvqx5OtZY/Y9wKTgaoP6YRfA= +github.com/go-openapi/runtime v0.19.0/go.mod h1:OwNfisksmmaZse4+gpV3Ne9AyMOlP1lt4sK4FXt0O64= +github.com/go-openapi/runtime v0.19.4/go.mod h1:X277bwSUBxVlCYR3r7xgZZGKVvBd/29gLDlFGtJ8NL4= +github.com/go-openapi/runtime v0.19.15/go.mod h1:dhGWCTKRXlAfGnQG0ONViOZpjfg0m2gUt9nTQPQZuoo= +github.com/go-openapi/runtime v0.19.16/go.mod h1:5P9104EJgYcizotuXhEuUrzVc+j1RiSjahULvYmlv98= +github.com/go-openapi/runtime v0.19.24/go.mod h1:Lm9YGCeecBnUUkFTxPC4s1+lwrkJ0pthx8YvyjCfkgk= +github.com/go-openapi/runtime v0.21.1/go.mod h1:aQg+kaIQEn+A2CRSY1TxbM8+sT9g2V3aLc1FbIAnbbs= github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= +github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= +github.com/go-openapi/spec v0.18.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= +github.com/go-openapi/spec v0.19.2/go.mod h1:sCxk3jxKgioEJikev4fgkNmwS+3kuYdJtcsZsD5zxMY= +github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= +github.com/go-openapi/spec v0.19.6/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= +github.com/go-openapi/spec v0.19.8/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= +github.com/go-openapi/spec v0.19.15/go.mod h1:+81FIL1JwC5P3/Iuuozq3pPE9dXdIEGxFutcFKaVbmU= +github.com/go-openapi/spec v0.20.0/go.mod h1:+81FIL1JwC5P3/Iuuozq3pPE9dXdIEGxFutcFKaVbmU= +github.com/go-openapi/spec v0.20.1/go.mod h1:93x7oh+d+FQsmsieroS4cmR3u0p/ywH649a3qwC9OsQ= +github.com/go-openapi/spec v0.20.3/go.mod h1:gG4F8wdEDN+YPBMVnzE85Rbhf+Th2DTvA9nFPQ5AYEg= +github.com/go-openapi/spec v0.20.4/go.mod h1:faYFR1CvsJZ0mNsmsphTMSoRrNV3TEDoAM7FOEWeq8I= +github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= +github.com/go-openapi/strfmt v0.18.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= +github.com/go-openapi/strfmt v0.19.0/go.mod h1:+uW+93UVvGGq2qGaZxdDeJqSAqBqBdl+ZPMF/cC8nDY= +github.com/go-openapi/strfmt v0.19.2/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= +github.com/go-openapi/strfmt v0.19.3/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= +github.com/go-openapi/strfmt v0.19.4/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk= +github.com/go-openapi/strfmt v0.19.5/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk= +github.com/go-openapi/strfmt v0.19.11/go.mod h1:UukAYgTaQfqJuAFlNxxMWNvMYiwiXtLsF2VwmoFtbtc= +github.com/go-openapi/strfmt v0.20.0/go.mod h1:UukAYgTaQfqJuAFlNxxMWNvMYiwiXtLsF2VwmoFtbtc= +github.com/go-openapi/strfmt v0.20.2/go.mod h1:43urheQI9dNtE5lTZQfuFJvjYJKPrxicATpEfZwHUNk= +github.com/go-openapi/strfmt v0.21.0/go.mod h1:ZRQ409bWMj+SOgXofQAGTIo2Ebu72Gs+WaRADcS5iNg= +github.com/go-openapi/strfmt v0.21.1/go.mod h1:I/XVKeLc5+MM5oPNN7P6urMOpuLXEcNrCX/rPGuWb0k= github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= +github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= +github.com/go-openapi/swag v0.18.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= +github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.7/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY= +github.com/go-openapi/swag v0.19.9/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY= +github.com/go-openapi/swag v0.19.12/go.mod h1:eFdyEBkTdoAf/9RXBvj4cr1nH7GD8Kzo5HTt47gr72M= +github.com/go-openapi/swag v0.19.13/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= +github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= +github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= +github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA= +github.com/go-openapi/validate v0.19.3/go.mod h1:90Vh6jjkTn+OT1Eefm0ZixWNFjhtOH7vS9k0lo6zwJo= +github.com/go-openapi/validate v0.19.10/go.mod h1:RKEZTUWDkxKQxN2jDT7ZnZi2bhZlbNMAuKvKB+IaGx8= +github.com/go-openapi/validate v0.19.12/go.mod h1:Rzou8hA/CBw8donlS6WNEUQupNvUZ0waH08tGe6kAQ4= +github.com/go-openapi/validate v0.19.15/go.mod h1:tbn/fdOwYHgrhPBzidZfJC2MIVvs9GA7monOmWBbeCI= +github.com/go-openapi/validate v0.20.1/go.mod h1:b60iJT+xNNLfaQJUqLI7946tYiFEOuE9E4k54HpKcJ0= +github.com/go-openapi/validate v0.20.3/go.mod h1:goDdqVGiigM3jChcrYJxD2joalke3ZXeftD16byIjA4= github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= -github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= 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/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= +github.com/gobuffalo/attrs v0.0.0-20190224210810-a9411de4debd/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0= +github.com/gobuffalo/depgen v0.0.0-20190329151759-d478694a28d3/go.mod h1:3STtPUQYuzV0gBVOY3vy6CfMm/ljR4pABfrTeHNLHUY= +github.com/gobuffalo/depgen v0.1.0/go.mod h1:+ifsuy7fhi15RWncXQQKjWS9JPkdah5sZvtHc2RXGlg= +github.com/gobuffalo/envy v1.6.15/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= +github.com/gobuffalo/envy v1.7.0/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= +github.com/gobuffalo/flect v0.1.0/go.mod h1:d2ehjJqGOH/Kjqcoz+F7jHTBbmDb38yXA598Hb50EGs= +github.com/gobuffalo/flect v0.1.1/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= +github.com/gobuffalo/flect v0.1.3/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= +github.com/gobuffalo/genny v0.0.0-20190329151137-27723ad26ef9/go.mod h1:rWs4Z12d1Zbf19rlsn0nurr75KqhYp52EAGGxTbBhNk= +github.com/gobuffalo/genny v0.0.0-20190403191548-3ca520ef0d9e/go.mod h1:80lIj3kVJWwOrXWWMRzzdhW3DsrdjILVil/SFKBzF28= +github.com/gobuffalo/genny v0.1.0/go.mod h1:XidbUqzak3lHdS//TPu2OgiFB+51Ur5f7CSnXZ/JDvo= +github.com/gobuffalo/genny v0.1.1/go.mod h1:5TExbEyY48pfunL4QSXxlDOmdsD44RRq4mVZ0Ex28Xk= +github.com/gobuffalo/gitgen v0.0.0-20190315122116-cc086187d211/go.mod h1:vEHJk/E9DmhejeLeNt7UVvlSGv3ziL+djtTr3yyzcOw= +github.com/gobuffalo/gogen v0.0.0-20190315121717-8f38393713f5/go.mod h1:V9QVDIxsgKNZs6L2IYiGR8datgMhB577vzTDqypH360= +github.com/gobuffalo/gogen v0.1.0/go.mod h1:8NTelM5qd8RZ15VjQTFkAW6qOMx5wBbW4dSCS3BY8gg= +github.com/gobuffalo/gogen v0.1.1/go.mod h1:y8iBtmHmGc4qa3urIyo1shvOD8JftTtfcKi+71xfDNE= +github.com/gobuffalo/logger v0.0.0-20190315122211-86e12af44bc2/go.mod h1:QdxcLw541hSGtBnhUc4gaNIXRjiDppFGaDqzbrBd3v8= +github.com/gobuffalo/mapi v1.0.1/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= +github.com/gobuffalo/mapi v1.0.2/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= +github.com/gobuffalo/packd v0.0.0-20190315124812-a385830c7fc0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= +github.com/gobuffalo/packd v0.1.0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= +github.com/gobuffalo/packr/v2 v2.0.9/go.mod h1:emmyGweYTm6Kdper+iywB6YK5YzuKchGtJQZ0Odn4pQ= +github.com/gobuffalo/packr/v2 v2.2.0/go.mod h1:CaAwI0GPIAv+5wKLtv8Afwl+Cm78K/I/VCm/3ptBN+0= +github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= @@ -242,6 +368,7 @@ github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4er github.com/golang/groupcache v0.0.0-20191027212112-611e8accdfc9/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= @@ -271,6 +398,7 @@ github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaS github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= @@ -288,8 +416,9 @@ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o= +github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= github.com/google/gofuzz v0.0.0-20161122191042-44d81051d367/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= @@ -313,6 +442,7 @@ github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= 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.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= @@ -323,6 +453,7 @@ github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pf github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU= +github.com/googleapis/gnostic v0.5.5 h1:9fHAtK0uDfpveeqqo1hkEZJcFvYXAiCN3UutL8F9xHw= github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97DwqyJO1AENw9kA= github.com/gophercloud/gophercloud v0.6.0/go.mod h1:GICNByuaEBibcjmjvI7QvYJSZEbGkcYwAR7EZK2WMqM= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= @@ -336,8 +467,8 @@ github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgf github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.2 h1:I/pwhnUln5wbMnTyRbzswA0/JxpK8sZj0aUfI3TV1So= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.2/go.mod h1:lsuH8kb4GlMdSlI4alNIBBSAt5CHJtg3i+0WuN9J5YM= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.3 h1:I8MsauTJQXZ8df8qJvEln0kYNc3bSapuaSsEsnFdEFU= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.3/go.mod h1:lZdb/YAJUSj9OqrCHs2ihjtoO3+xK3G53wTYXFWRGDo= github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= github.com/hashicorp/consul/api v1.12.0/go.mod h1:6pVBMo0ebnYdt2S3H87XhekM/HHrUoTD2XXb/VrZVy0= github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= @@ -379,6 +510,7 @@ github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47 github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/jackc/chunkreader v1.0.0/go.mod h1:RT6O25fNZIuasFJRyZ4R/Y2BbhasbmZXF9QQ7T3kePo= @@ -420,6 +552,9 @@ github.com/jackc/puddle v1.1.3/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dv github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E= github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= +github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= +github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= github.com/jinzhu/now v1.1.1/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= github.com/jinzhu/now v1.1.2/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= github.com/jinzhu/now v1.1.4/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= @@ -442,12 +577,14 @@ github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfV github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0 h1:U0609e9tgbseu3rBINet9P48AI/D3oJs4dN7jwJOQ1U= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= +github.com/karrick/godirwalk v1.8.0/go.mod h1:H5KPZjojv4lE+QYImBI8xVtrBRgYrIVsaRPx4tDPEn4= +github.com/karrick/godirwalk v1.10.3/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= 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/cpuid/v2 v2.0.6 h1:dQ5ueTiftKxp0gyjKSx5+8BtPWkyQbd95m8Gys/RarI= -github.com/klauspost/cpuid/v2 v2.0.6/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= +github.com/klauspost/compress v1.9.5/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= +github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= @@ -472,9 +609,14 @@ github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czP github.com/magiconair/properties v1.8.5 h1:b6kJs+EmPFMYGkow9GiUyCyOvIwYetYJ3fSaWak/Gls= github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.7.1/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= +github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= github.com/mattermost/xml-roundtrip-validator v0.1.0 h1:RXbVD2UAl7A7nOTR4u7E3ILa4IbtvKBHw64LDsmu9hU= github.com/mattermost/xml-roundtrip-validator v0.1.0/go.mod h1:qccnGMcpgwcNaBnxqpJpWWUiPNr5H3O8eDgGV9gT5To= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= @@ -494,6 +636,7 @@ github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Ky github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= @@ -507,6 +650,9 @@ github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS4 github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.3.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.4.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.3 h1:OVowDSCllw/YjdLkam3/sm7wEtOy59d8ndGgCcyj8cs= github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= @@ -520,6 +666,7 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= @@ -543,11 +690,15 @@ github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1y github.com/onsi/gomega v1.17.0 h1:9Luw4uT5HTjHTN8+aNcSThgH1vdXnmdJ8xIfZ4wyTRE= github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/ory/kratos-client-go v0.8.2-alpha.1 h1:YlKhGOSZjounlB9iY4xSWlqHbyLYkeLzlLk8ZL7/nEM= github.com/ory/kratos-client-go v0.8.2-alpha.1/go.mod h1:dOQIsar76K07wMPJD/6aMhrWyY+sFGEagLDLso1CpsA= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pelletier/go-toml v1.4.0/go.mod h1:PN7xzY2wHTK0K9p34ErDQMlFxa51Fk0OUruD3k1mMwo= +github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pelletier/go-toml v1.9.4 h1:tjENF6MfZAg8e4ZmZTeWaWiT2vXtsoO6+iuOjFhECwM= github.com/pelletier/go-toml v1.9.4/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= @@ -571,10 +722,12 @@ github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDf github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= +github.com/prometheus/client_golang v1.11.0 h1:HNkLOAEQMIDv/K+04rukrLx6ch7msSRwf3/SASFAGtQ= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= @@ -582,22 +735,26 @@ github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y8 github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= +github.com/prometheus/common v0.28.0 h1:vGVfV9KrDTvWt5boZO0I19g2E3CsWfpPPKZM9dt3mEw= github.com/prometheus/common v0.28.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.6.0 h1:mxy4L2jP6qMonqmq+aTtOx1ifVWUgG/TAmntgbh3xv4= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-charset v0.0.0-20180617210344-2471d30d28b4/go.mod h1:qgYeAmZ5ZIpBWTGllZSQnw97Dj+woV0toclVaRGI8pc= +github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.8.0 h1:FCbCCtXNOY3UtUuHUYaghJg4y7Fd14rXifAYUAtL9R8= github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= -github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= +github.com/rs/xid v1.3.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU= github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc= github.com/russellhaering/goxmldsig v1.1.1 h1:vI0r2osGF1A9PLvsGdPUAGwEIrKa4Pj5sesSBsebIxM= @@ -607,14 +764,16 @@ github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb github.com/sagikazarmark/crypt v0.4.0/go.mod h1:ALv2SRj7GxYV4HO9elxH9nS6M9gW+xDNxqmyJ6RfDFM= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/segmentio/asm v1.1.0 h1:fkVr8k5J4sKoFjTGVD6r1yKvDKqmvrEh3K7iyVxgBs8= -github.com/segmentio/asm v1.1.0/go.mod h1:4EUJGaKsB8ImLUwOGORVsNd9vTRDeh44JGsY4aKp5I4= -github.com/segmentio/encoding v0.3.2 h1:gkXXteOfNaPPlrXTEf/e5tWvaQGVJWnvT3LqMzUeH7U= -github.com/segmentio/encoding v0.3.2/go.mod h1:waft2p6XI4z2pk07M0YzZV4wEiqaRvsBSyWNHxVx4gU= -github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= -github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= +github.com/segmentio/asm v1.1.3 h1:WM03sfUOENvvKexOLp+pCqgb/WDjsi7EK8gIsICtzhc= +github.com/segmentio/asm v1.1.3/go.mod h1:Ld3L4ZXGNcSLRg4JBsZ3//1+f/TjYl0Mzen/DQy1EJg= +github.com/segmentio/encoding v0.3.3 h1:VG1HceOLwHkSDdkxshlu9pD4FftWkScmHc8RDQ+w9uM= +github.com/segmentio/encoding v0.3.3/go.mod h1:n0JeuIqEQrQoPDGsjo8UNd1iA0U8d8+oHAA4E3G3OxM= +github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= +github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= @@ -636,6 +795,7 @@ github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkU github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.4.1 h1:s0hze+J0196ZfEMTs80N7UlFt0BDuQ7Q+JDnHiMWKdA= github.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= @@ -663,24 +823,35 @@ github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5Cc github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= +github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc h1:9lRDQMhESg+zvGYmW5DyG0UqvY96Bu5QYsTLvCHdrgo= github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc/go.mod h1:bciPuU6GHm1iF1pBvUfxfsH0Wmnc2VbpgvbI9ZWuIRs= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= -github.com/uptrace/bun v1.0.20 h1:/T4p9C9tEN75U3cFMBr5njlP+rBfs4An8BmlQQPbcfE= github.com/uptrace/bun v1.0.20/go.mod h1:Uv7z0z+7dXnUS9P5hMF0hdiM/4M+xOUHQCrZpyDrpRc= +github.com/uptrace/bun v1.0.21 h1:5ek4bnrEmZo6wvY/RHt1dJNXzOPOnrfJeZMoZfZt9Io= +github.com/uptrace/bun v1.0.21/go.mod h1:u+QsgCgjGFwshy3euGAN1CLEO9RMf42lga5jQ/ezYsc= github.com/uptrace/bun/dialect/pgdialect v1.0.20 h1:1Yajz0M2AhOzvxFEQSAQ8TpqzSRFxYOg+saksIQ0dmU= github.com/uptrace/bun/dialect/pgdialect v1.0.20/go.mod h1:Z2UoOgTKHXgFOuInXsJKkNQJiFIaPkCvsj0EayOI2yk= github.com/uptrace/bun/driver/pgdriver v1.0.20 h1:CEWHL5NS5FQIJAJxY40t0llwe8XxVlsblbgi9Upm0fA= github.com/uptrace/bun/driver/pgdriver v1.0.20/go.mod h1:KAONvCIiI4A6HdMTZ8zCdGxh7P6+23Todz+bL8HRzV4= github.com/uptrace/bun/extra/bundebug v1.0.20 h1:lwuGUMiqujR3NuGDKgJu1j7XL3LsULSv1MDFHlYBAGs= github.com/uptrace/bun/extra/bundebug v1.0.20/go.mod h1:tDoi/zmjHkumthaCujwfI2+mni0G41HfJD4HC2oMdpk= +github.com/valyala/fastjson v1.6.3 h1:tAKFnnwmeMGPbwJ7IwxcTPCNr3uIzoIj3/Fh90ra4xc= +github.com/valyala/fastjson v1.6.3/go.mod h1:CLCAqky6SMuOcxStkYQvblddUtoRxhYMGLrsQns1aXY= +github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw= github.com/vmihailenco/msgpack/v5 v5.3.5 h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9znI5mJU= github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= +github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= +github.com/xdg-go/scram v1.0.2/go.mod h1:1WAq6h33pAW+iRreB34OORO2Nf7qel3VV3fjBj+hCSs= +github.com/xdg-go/stringprep v1.0.2/go.mod h1:8F9zXuvzgwmyT5DUm4GUfZGDdT3W+LCvS6+da4O5kxM= +github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I= +github.com/xdg/stringprep v0.0.0-20180714160509-73f8eece6fdc/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -701,6 +872,16 @@ go.etcd.io/etcd/client/v3 v3.5.0/go.mod h1:AIKXXVX/DQXtfTEqBryiLTUXwON+GuvO6Z7lL go.etcd.io/etcd/pkg/v3 v3.5.0/go.mod h1:UzJGatBQ1lXChBkQF0AuAtkRQMYnHubxAEYIrC3MSsE= go.etcd.io/etcd/raft/v3 v3.5.0/go.mod h1:UFOHSIvO/nKwd4lhkwabrTD3cqW5yVyYYf/KlD00Szc= go.etcd.io/etcd/server/v3 v3.5.0/go.mod h1:3Ah5ruV+M+7RZr0+Y/5mNLwC+eQlni+mQmOVdCRJoS4= +go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= +go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= +go.mongodb.org/mongo-driver v1.3.0/go.mod h1:MSWZXKOynuguX+JSvwP8i+58jYCXxbia8HS3gZBapIE= +go.mongodb.org/mongo-driver v1.3.4/go.mod h1:MSWZXKOynuguX+JSvwP8i+58jYCXxbia8HS3gZBapIE= +go.mongodb.org/mongo-driver v1.4.3/go.mod h1:WcMNYLx/IlOxLe6JRJiv2uXuCz6zBLndR4SoGjYphSc= +go.mongodb.org/mongo-driver v1.4.4/go.mod h1:WcMNYLx/IlOxLe6JRJiv2uXuCz6zBLndR4SoGjYphSc= +go.mongodb.org/mongo-driver v1.4.6/go.mod h1:WcMNYLx/IlOxLe6JRJiv2uXuCz6zBLndR4SoGjYphSc= +go.mongodb.org/mongo-driver v1.5.1/go.mod h1:gRXCHX4Jo7J0IJ1oDQyUxF7jfy19UfxniMS4xxMmUqw= +go.mongodb.org/mongo-driver v1.7.3/go.mod h1:NqaYOwnXWr5Pm7AOpO5QFxKJ503nbMse/R79oO62zWg= +go.mongodb.org/mongo-driver v1.7.5/go.mod h1:VXEWRZ6URJIkUq2SCAyapmhH0ZLRBP+FT4xhp5Zvxng= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= @@ -728,6 +909,7 @@ go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= +go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.1.12 h1:gZAh5/EyT/HQwlpkCy6wTpqfH9H8Lz8zbm3dZh+OyzA= go.uber.org/goleak v1.1.12/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= @@ -741,8 +923,9 @@ go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= -go.uber.org/zap v1.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI= go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= +go.uber.org/zap v1.20.0 h1:N4oPlghZwYG55MlU6LXk/Zp00FVNE9X9wrYO8CEs4lc= +go.uber.org/zap v1.20.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180910181607-0e37d006457b/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -750,10 +933,14 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190411191339-88737f569e3a/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190530122614-20be4c3c3ed5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201203163018-be400aefbc4c/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= @@ -805,6 +992,7 @@ golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73r 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-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -812,6 +1000,7 @@ golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190320064053-1272bf9dcd53/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -835,6 +1024,7 @@ golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/ golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200602114024-627f9648deb9/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= @@ -843,11 +1033,13 @@ golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= +golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= @@ -881,6 +1073,7 @@ golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190412183630-56d357773e84/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -899,12 +1092,16 @@ golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190321052220-f7bb7a8bee54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190419153524-e8e3143a4f4a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190531175056-4c3a928424d2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -954,6 +1151,7 @@ golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210420072515-93ed5bcd2bfe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -971,6 +1169,7 @@ golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211029165221-6e7872819dc8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211110154304-99a53858aa08/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211123173158-ef496fb156ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -979,6 +1178,7 @@ golang.org/x/sys v0.0.0-20220114195835-da31bd327af9 h1:XfKQ4OlFl8okEOr5UvAqFRVj8 golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b h1:9zKuko04nR4gjZ4+DNjHqRlAJqbJETHwiNKDqTfOjfE= golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -995,22 +1195,30 @@ golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac h1:7zkz7BUtwNFFqcowJ+RIgu2MaV/MapERkDIy+mwPyjs= golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190125232054-d66bd3c5d5a6/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190329151228-23e29df326fe/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190416151739-9c9e1878f421/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190420181800-aa740d480789/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190425163242-31fd60d6bfdc/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190531172133-b3315ee88b7d/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190617190820-da514acc4774/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= @@ -1072,6 +1280,7 @@ golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +gomodules.xyz/jsonpatch/v2 v2.2.0 h1:4pT439QV83L+G9FkcCriY6EkpcK6r6bK+A5FBUMI7qY= gomodules.xyz/jsonpatch/v2 v2.2.0/go.mod h1:WXp+iVDkoLQqPudfQ9GBlwB2eZ5DKOnjQZCYdOS8GPY= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= @@ -1177,8 +1386,9 @@ google.golang.org/genproto v0.0.0-20211008145708-270636b82663/go.mod h1:5CzLGKJ6 google.golang.org/genproto v0.0.0-20211028162531-8db9c33dc351/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa h1:I0YcKz0I7OAhddo7ya8kMnvprhcWM045PmkBdMO9zN0= google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220118154757-00ab72f36ad5 h1:zzNejm+EgrbLfDZ6lu9Uud2IVvHySPl8vQzf04laR5Q= +google.golang.org/genproto v0.0.0-20220118154757-00ab72f36ad5/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -1254,6 +1464,7 @@ gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= @@ -1280,14 +1491,24 @@ honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt 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.23.0/go.mod h1:8wmDdLBHBNxtOIytwLstXt5E9PddnZb0GaMcqsvDBpg= +k8s.io/api v0.23.2 h1:62cpzreV3dCuj0hqPi8r4dyWh48ogMcyh+ga9jEGij4= +k8s.io/api v0.23.2/go.mod h1:sYuDb3flCtRPI8ghn6qFrcK5ZBu2mhbElxRE95qpwlI= k8s.io/apiextensions-apiserver v0.23.0/go.mod h1:xIFAEEDlAZgpVBl/1VSjGDmLoXAWRG40+GsWhKhAxY4= +k8s.io/apiextensions-apiserver v0.23.2 h1:N6CIVAhmF0ahgFKUMDdV/AUyckhUb4nIyVPohPtdUPk= +k8s.io/apiextensions-apiserver v0.23.2/go.mod h1:9cs7avT6+GfzbB0pambTvH11wcaR85QQg4ovl9s15UU= k8s.io/apimachinery v0.23.0/go.mod h1:fFCTTBKvKcwTPFzjlcxp91uPFZr+JA0FubU4fLzzFYc= -k8s.io/apimachinery v0.23.1 h1:sfBjlDFwj2onG0Ijx5C+SrAoeUscPrmghm7wHP+uXlo= -k8s.io/apimachinery v0.23.1/go.mod h1:SADt2Kl8/sttJ62RRsi9MIV4o8f5S3coArm0Iu3fBno= +k8s.io/apimachinery v0.23.2 h1:dBmjCOeYBdg2ibcQxMuUq+OopZ9fjfLIR5taP/XKeTs= +k8s.io/apimachinery v0.23.2/go.mod h1:zDqeV0AK62LbCI0CI7KbWCAYdLg+E+8UXJ0rIz5gmS8= k8s.io/apiserver v0.23.0/go.mod h1:Cec35u/9zAepDPPFyT+UMrgqOCjgJ5qtfVJDxjZYmt4= +k8s.io/apiserver v0.23.2/go.mod h1:Kdt8gafkPev9Gfh+H6lCPbmRu42f7BfhOfHKKa3dtyU= k8s.io/client-go v0.23.0/go.mod h1:hrDnpnK1mSr65lHHcUuIZIXDgEbzc7/683c6hyG4jTA= +k8s.io/client-go v0.23.2 h1:BNbOcxa99jxHH8mM1cPKGIrrKRnCSAfAtyonYGsbFtE= +k8s.io/client-go v0.23.2/go.mod h1:k3YbsWg6GWdHF1THHTQP88X9RhB1DWPo3Dq7KfU/D1c= k8s.io/code-generator v0.23.0/go.mod h1:vQvOhDXhuzqiVfM/YHp+dmg10WDZCchJVObc9MvowsE= +k8s.io/code-generator v0.23.2/go.mod h1:S0Q1JVA+kSzTI1oUvbKAxZY/DYbA/ZUb4Uknog12ETk= k8s.io/component-base v0.23.0/go.mod h1:DHH5uiFvLC1edCpvcTDV++NKULdYYU6pR9Tt3HIKMKI= +k8s.io/component-base v0.23.2 h1:dAYmUhWIBWO762etTjBEEKtYYHi5CoQInSLtK6LM1Zs= +k8s.io/component-base v0.23.2/go.mod h1:wS9Z03MO3oJ0RU8bB/dbXTiluGju+SC/F5i660gxB8c= k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= @@ -1300,6 +1521,8 @@ k8s.io/klog/v2 v2.30.0 h1:bUO6drIvCIsvZ/XFgfxoGFQU/a4Qkh0iAlvUR7vlHJw= k8s.io/klog/v2 v2.30.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E= k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65/go.mod h1:sX9MT8g7NVZM5lVL/j8QyCCJe8YSMW30QvGZWaCIDIk= +k8s.io/kube-openapi v0.0.0-20220114203427-a0453230fd26 h1:2G24ndYyfk0l23ZrGutxb0s9TRe4m1ZjFlcu4cEU1zA= +k8s.io/kube-openapi v0.0.0-20220114203427-a0453230fd26/go.mod h1:sX9MT8g7NVZM5lVL/j8QyCCJe8YSMW30QvGZWaCIDIk= k8s.io/utils v0.0.0-20191030222137-2b95a09bc58d/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b h1:wxEMGetGMur3J1xuGLQY7GEQYg9bZxKn3tKo5k/eYcs= @@ -1310,6 +1533,7 @@ rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8 rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.25/go.mod h1:Mlj9PNLmG9bZ6BHFwFKDo5afkpWyUISkb9Me0GnK66I= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.27/go.mod h1:tq2nT0Kx7W+/f2JVE+zxYtUhdjuELJkVpNz+x/QN5R4= sigs.k8s.io/controller-runtime v0.11.0 h1:DqO+c8mywcZLFJWILq4iktoECTyn30Bkj0CwgqMpZWQ= sigs.k8s.io/controller-runtime v0.11.0/go.mod h1:KKwLiTooNGu+JmLZGn9Sl3Gjmfj66eMbCQznLP5zcqA= sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 h1:fD1pz4yfdADVNfFmcP2aBEtudwUQ1AlLnRBALr33v3s= @@ -1320,8 +1544,9 @@ sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e h1:4Z09Hglb sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/structured-merge-diff/v4 v4.1.2/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= -sigs.k8s.io/structured-merge-diff/v4 v4.2.0 h1:kDvPBbnPk+qYmkHmSo8vKGp438IASWofnbbUKDE/bv0= sigs.k8s.io/structured-merge-diff/v4 v4.2.0/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= +sigs.k8s.io/structured-merge-diff/v4 v4.2.1 h1:bKCqE9GvQ5tiVHn5rfn1r+yao3aLQEaLzkkmAkf+A6Y= +sigs.k8s.io/structured-merge-diff/v4 v4.2.1/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= diff --git a/go.mod b/go.mod index 29fa961..05f0c74 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,5 @@ module github.com/RafaySystems/rcloud-base go 1.17 + +require github.com/gogo/protobuf v1.3.2 // indirect diff --git a/go.sum b/go.sum index e69de29..faf43b7 100644 --- a/go.sum +++ b/go.sum @@ -0,0 +1,31 @@ +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +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/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/persistence/migrations/admindb/000008_authsrv_resourcepermission.down.sql b/persistence/migrations/admindb/000008_authsrv_resourcepermission.down.sql index 60b7470..52d4d52 100644 --- a/persistence/migrations/admindb/000008_authsrv_resourcepermission.down.sql +++ b/persistence/migrations/admindb/000008_authsrv_resourcepermission.down.sql @@ -1,2 +1 @@ -DROP TABLE IF EXISTS authsrv_resourcepermission; -DROP SEQUENCE IF EXISTS authsrv_resourcepermission_id_seq; \ No newline at end of file +DROP TABLE IF EXISTS authsrv_resourcepermission; \ No newline at end of file diff --git a/persistence/migrations/admindb/000018_sentry_bootstrap_infra.down.sql b/persistence/migrations/admindb/000018_sentry_bootstrap_infra.down.sql new file mode 100644 index 0000000..16aff97 --- /dev/null +++ b/persistence/migrations/admindb/000018_sentry_bootstrap_infra.down.sql @@ -0,0 +1 @@ +DROP TABLE IF EXISTS sentry_bootstrap_infra; \ No newline at end of file diff --git a/persistence/migrations/admindb/000018_sentry_bootstrap_infra.up.sql b/persistence/migrations/admindb/000018_sentry_bootstrap_infra.up.sql new file mode 100644 index 0000000..98bc4af --- /dev/null +++ b/persistence/migrations/admindb/000018_sentry_bootstrap_infra.up.sql @@ -0,0 +1,25 @@ +CREATE TABLE IF NOT EXISTS sentry_bootstrap_infra ( + -- database id fields + name character varying(256) NOT NULL, + organization_id uuid, + partner_id uuid, + project_id uuid, + -- rafay meta fields + display_name character varying(256) NOT NULL, + created_at timestamp WITH time zone NOT NULL, + modified_at timestamp WITH time zone, + deleted_at timestamp with time zone, + trash boolean NOT NULL default false, + labels jsonb NOT NULL DEFAULT '{}' ::jsonb, + annotations jsonb NOT NULL DEFAULT '{}' ::jsonb, + -- infra spec + ca_cert text NOT NULL, + ca_key text NOT NULL +); + +ALTER TABLE sentry_bootstrap_infra OWNER TO admindbuser; + +ALTER TABLE ONLY sentry_bootstrap_infra ADD CONSTRAINT sentry_bootstrap_infra_pkey PRIMARY KEY (name); + +ALTER TABLE ONLY sentry_bootstrap_infra + ADD CONSTRAINT sentry_bootstrap_infra_name_partner_id_organization_id_proj_key UNIQUE (name, partner_id, organization_id, project_id); \ No newline at end of file diff --git a/persistence/migrations/admindb/000019_sentry_bootstrap_agent_template.down.sql b/persistence/migrations/admindb/000019_sentry_bootstrap_agent_template.down.sql new file mode 100644 index 0000000..41d630e --- /dev/null +++ b/persistence/migrations/admindb/000019_sentry_bootstrap_agent_template.down.sql @@ -0,0 +1 @@ +DROP TABLE IF EXISTS sentry_bootstrap_agent_template; \ No newline at end of file diff --git a/persistence/migrations/admindb/000019_sentry_bootstrap_agent_template.up.sql b/persistence/migrations/admindb/000019_sentry_bootstrap_agent_template.up.sql new file mode 100644 index 0000000..e3834e1 --- /dev/null +++ b/persistence/migrations/admindb/000019_sentry_bootstrap_agent_template.up.sql @@ -0,0 +1,39 @@ +CREATE TABLE IF NOT EXISTS sentry_bootstrap_agent_template ( + -- database id fields + name character varying(256) NOT NULL, + organization_id uuid, + partner_id uuid, + project_id uuid, + infra_ref character varying(256) NOT NULL, + -- rafay meta fields + display_name character varying(256) NOT NULL, + created_at timestamp WITH time zone NOT NULL, + modified_at timestamp WITH time zone, + deleted_at timestamp with time zone, + labels jsonb NOT NULL DEFAULT '{}' ::jsonb, + annotations jsonb NOT NULL DEFAULT '{}' ::jsonb, + trash boolean NOT NULL default false, + -- template spec + auto_register boolean NOT NULL DEFAULT FALSE, + ignore_multiple_register boolean NOT NULL DEFAULT FALSE, + auto_approve boolean NOT NULL DEFAULT FALSE, + template_type character varying(512) NOT NULL, + hosts jsonb NOT NULL DEFAULT '[]'::jsonb, + token character varying(256) NOT NULL, + incluster_template text NOT NULL, + outofcluster_template text NOT NULL +); + +ALTER TABLE sentry_bootstrap_agent_template OWNER TO admindbuser; + +ALTER TABLE ONLY sentry_bootstrap_agent_template ADD CONSTRAINT sentry_bootstrap_agent_template_pkey PRIMARY KEY (name); + +ALTER TABLE ONLY sentry_bootstrap_agent_template + ADD CONSTRAINT sentry_bootstrap_agent_templa_name_partner_id_organization__key UNIQUE (name, partner_id, organization_id, project_id); + +ALTER TABLE ONLY sentry_bootstrap_agent_template + ADD CONSTRAINT sentry_bootstrap_agent_template_token_key UNIQUE (token); + +ALTER TABLE ONLY sentry_bootstrap_agent_template + ADD CONSTRAINT sentry_bootstrap_agent_template_infra_ref_fkey FOREIGN KEY (infra_ref) + REFERENCES sentry_bootstrap_infra(name); \ No newline at end of file diff --git a/persistence/migrations/admindb/000020_sentry_bootstrap_agent.down.sql b/persistence/migrations/admindb/000020_sentry_bootstrap_agent.down.sql new file mode 100644 index 0000000..4440529 --- /dev/null +++ b/persistence/migrations/admindb/000020_sentry_bootstrap_agent.down.sql @@ -0,0 +1 @@ +DROP TABLE IF EXISTS sentry_bootstrap_agent; \ No newline at end of file diff --git a/persistence/migrations/admindb/000020_sentry_bootstrap_agent.up.sql b/persistence/migrations/admindb/000020_sentry_bootstrap_agent.up.sql new file mode 100644 index 0000000..68c6952 --- /dev/null +++ b/persistence/migrations/admindb/000020_sentry_bootstrap_agent.up.sql @@ -0,0 +1,38 @@ +CREATE TABLE IF NOT EXISTS sentry_bootstrap_agent ( + -- database id fields + id uuid NOT NULL default uuid_generate_v4(), + name character varying(256) NOT NULL, + organization_id uuid, + partner_id uuid, + project_id uuid, + template_ref character varying(256) NOT NULL, + agent_mode character varying(512) NOT NULL, + -- rafay meta fields + display_name character varying(256) NOT NULL, + created_at timestamp WITH time zone NOT NULL, + modified_at timestamp WITH time zone, + deleted_at timestamp with time zone, + labels jsonb NOT NULL DEFAULT '{}' ::jsonb, + annotations jsonb NOT NULL DEFAULT '{}' ::jsonb, + -- bootstrap token spec fields + token character varying(256) NOT NULL, + -- bootstrap token status fields + token_state character varying(256) NOT NULL, + ip_address character varying(20) NOT NULL, + last_checked_in timestamp with time zone, + fingerprint character varying(256) NOT NULL +); + +ALTER TABLE sentry_bootstrap_agent OWNER TO admindbuser; + +ALTER TABLE ONLY sentry_bootstrap_agent ADD CONSTRAINT sentry_bootstrap_agent_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY sentry_bootstrap_agent + ADD CONSTRAINT sentry_bootstrap_agent_name_templateref_organization_id_partner UNIQUE (name, template_ref, organization_id, partner_id, project_id); + +ALTER TABLE ONLY sentry_bootstrap_agent + ADD CONSTRAINT sentry_bootstrap_agent_token_key UNIQUE (token); + +ALTER TABLE ONLY sentry_bootstrap_agent + ADD CONSTRAINT sentry_bootstrap_agent_template_ref_fkey FOREIGN KEY (template_ref) + REFERENCES sentry_bootstrap_agent_template(name); \ No newline at end of file diff --git a/persistence/migrations/admindb/000021_sentry_account_permission.down.sql b/persistence/migrations/admindb/000021_sentry_account_permission.down.sql new file mode 100644 index 0000000..dbc6fea --- /dev/null +++ b/persistence/migrations/admindb/000021_sentry_account_permission.down.sql @@ -0,0 +1 @@ +DROP VIEW IF EXISTS sentry_account_permission; \ No newline at end of file diff --git a/persistence/migrations/admindb/000021_sentry_account_permission.up.sql b/persistence/migrations/admindb/000021_sentry_account_permission.up.sql new file mode 100644 index 0000000..7c17f38 --- /dev/null +++ b/persistence/migrations/admindb/000021_sentry_account_permission.up.sql @@ -0,0 +1,122 @@ +CREATE OR REPLACE VIEW sentry_account_permission AS +SELECT + apr.account_id, + apr.project_id, + apr.organization_id, + apr.partner_id, + rbu.role_name, + rbu.is_global, + rbu.scope, + rbu.permission_name, + rbu.base_url, + rbu.urls +FROM ( + SELECT + ga.account_id, + null project_id, + gr.role_id, + gr.organization_id, + gr.partner_id + FROM + authsrv_groupaccount ga + INNER JOIN authsrv_grouprole gr ON ga.group_id = gr.group_id + WHERE + ga.trash = FALSE + AND gr.trash = FALSE + UNION + SELECT + account_id, + null project_id, + role_id, + organization_id, + partner_id + FROM + authsrv_accountresourcerole + WHERE + trash = FALSE + UNION + SELECT + ga.account_id, + pgr.project_id::text, + pgr.role_id, + pgr.organization_id, + pgr.partner_id + FROM + authsrv_projectgrouprole pgr + INNER JOIN authsrv_groupaccount ga ON pgr.group_id = ga.group_id + WHERE + pgr.trash = FALSE + AND ga.trash = FALSE + UNION + SELECT + account_id, + project_id::text, + role_id, + organization_id, + partner_id + FROM + authsrv_projectaccountresourcerole + WHERE + trash = FALSE + UNION + SELECT + account_id, + project_id::text, + role_id, + organization_id, + partner_id + FROM + authsrv_projectaccountnamespacerole + WHERE + trash = FALSE + UNION + SELECT + ga.account_id, + pgnr.project_id::text, + pgnr.role_id, + pgnr.organization_id, + pgnr.partner_id + FROM + authsrv_projectgroupnamespacerole pgnr + INNER JOIN authsrv_groupaccount ga ON pgnr.group_id = ga.group_id + WHERE + pgnr.trash = FALSE + AND ga.trash = FALSE) AS apr + INNER JOIN ( + SELECT + rp.role_id, + rr.role_name, + rr.is_global, + rr.scope, + p.permission_name, + p.base_url, + p.urls + FROM ( + SELECT + resource_role_id AS role_id, + resource_permission_id AS permission_id + FROM + authsrv_resourcerolepermission + WHERE + trash = FALSE) rp + INNER JOIN ( + SELECT + rp.id AS permission_id, + rp.base_url, + rp.name AS permission_name, + rp.resource_urls || rp.resource_action_urls AS urls + FROM + authsrv_resourcepermission rp) p ON rp.permission_id = p.permission_id + INNER JOIN ( + SELECT + id, + name AS role_name, + is_global, + scope + FROM + authsrv_resourcerole + WHERE + trash = FALSE) rr ON rr.id = rp.role_id) rbu ON apr.role_id = rbu.role_id + INNER JOIN identities ON identities.id = apr.account_id +WHERE + lower(identities.state) = 'active'; \ No newline at end of file diff --git a/persistence/migrations/admindb/000022_sentry_group_permission.down.sql b/persistence/migrations/admindb/000022_sentry_group_permission.down.sql new file mode 100644 index 0000000..4de4001 --- /dev/null +++ b/persistence/migrations/admindb/000022_sentry_group_permission.down.sql @@ -0,0 +1 @@ +DROP VIEW IF EXISTS sentry_group_permission; \ No newline at end of file diff --git a/persistence/migrations/admindb/000022_sentry_group_permission.up.sql b/persistence/migrations/admindb/000022_sentry_group_permission.up.sql new file mode 100644 index 0000000..b2329e3 --- /dev/null +++ b/persistence/migrations/admindb/000022_sentry_group_permission.up.sql @@ -0,0 +1,96 @@ +CREATE OR REPLACE VIEW sentry_group_permission AS +SELECT + gpr.group_id, + gpr.project_id, + gpr.organization_id, + gpr.partner_id, + gpr.group_name, + rbu.role_name, + rbu.is_global, + rbu.scope, + rbu.permission_name, + rbu.base_url, + rbu.urls, + gpr.project_name +FROM ( + SELECT + gr.group_id, + g.organization_id, + g.partner_id, + g.name AS group_name, + null project_id, + '' AS project_name, + gr.role_id + FROM + authsrv_group g + INNER JOIN authsrv_grouprole gr ON g.id = gr.group_id + WHERE + g.trash = FALSE + AND gr.trash = FALSE + UNION + SELECT + pgr.group_id, + g.organization_id, + g.partner_id, + g.name AS group_name, + pgr.project_id::text, + pj.name AS project_name, + pgr.role_id + FROM + authsrv_projectgrouprole pgr + INNER JOIN authsrv_group g ON pgr.group_id = g.id + INNER JOIN authsrv_project pj ON pgr.project_id = pj.id + WHERE + pgr.trash = FALSE + AND g.trash = FALSE + UNION + SELECT + pgnr.group_id, + g.organization_id, + g.partner_id, + g.name AS group_name, + pgnr.project_id::text, + pj.name AS project_name, + pgnr.role_id + FROM + authsrv_projectgroupnamespacerole pgnr + INNER JOIN authsrv_group g ON pgnr.group_id = g.id + INNER JOIN authsrv_project pj ON pgnr.project_id = pj.id + WHERE + pgnr.trash = FALSE + AND g.trash = FALSE) AS gpr + INNER JOIN ( + SELECT + rp.role_id, + rr.role_name, + rr.is_global, + rr.scope, + p.permission_name, + p.base_url, + p.urls + FROM ( + SELECT + resource_role_id AS role_id, + resource_permission_id AS permission_id + FROM + authsrv_resourcerolepermission + WHERE + trash = FALSE) rp + INNER JOIN ( + SELECT + rp.id AS permission_id, + rp.base_url, + rp.name AS permission_name, + rp.resource_urls || rp.resource_action_urls AS urls + FROM + authsrv_resourcepermission rp) p ON rp.permission_id = p.permission_id + INNER JOIN ( + SELECT + id, + name AS role_name, + is_global, + scope + FROM + authsrv_resourcerole + WHERE + trash = FALSE) rr ON rr.id = rp.role_id) rbu ON gpr.role_id = rbu.role_id; \ No newline at end of file diff --git a/persistence/migrations/admindb/000023_sentry_bootstrap_template_host.down.sql b/persistence/migrations/admindb/000023_sentry_bootstrap_template_host.down.sql new file mode 100644 index 0000000..28cc5bd --- /dev/null +++ b/persistence/migrations/admindb/000023_sentry_bootstrap_template_host.down.sql @@ -0,0 +1 @@ +DROP VIEW IF EXISTS sentry_bootstrap_template_host; \ No newline at end of file diff --git a/persistence/migrations/admindb/000023_sentry_bootstrap_template_host.up.sql b/persistence/migrations/admindb/000023_sentry_bootstrap_template_host.up.sql new file mode 100644 index 0000000..daa052e --- /dev/null +++ b/persistence/migrations/admindb/000023_sentry_bootstrap_template_host.up.sql @@ -0,0 +1,18 @@ +CREATE OR REPLACE VIEW sentry_bootstrap_template_host AS +SELECT + a.name, + split_part((h::jsonb) ->> 'host', ':', 1) AS host +FROM ( + SELECT + name, + jsonb_array_elements( + CASE jsonb_typeof(hosts) + WHEN 'array' THEN + hosts + ELSE + '[]' + END) AS h + FROM + sentry_bootstrap_agent_template) AS a +WHERE + a.h ->> 'type' = 'HostTypeExternal'; \ No newline at end of file diff --git a/persistence/migrations/admindb/000024_sentry_kubeconfig_revocation.down.sql b/persistence/migrations/admindb/000024_sentry_kubeconfig_revocation.down.sql new file mode 100644 index 0000000..27a8604 --- /dev/null +++ b/persistence/migrations/admindb/000024_sentry_kubeconfig_revocation.down.sql @@ -0,0 +1 @@ +DROP TABLE IF EXISTS sentry_kubeconfig_revocation; \ No newline at end of file diff --git a/persistence/migrations/admindb/000024_sentry_kubeconfig_revocation.up.sql b/persistence/migrations/admindb/000024_sentry_kubeconfig_revocation.up.sql new file mode 100644 index 0000000..02b153e --- /dev/null +++ b/persistence/migrations/admindb/000024_sentry_kubeconfig_revocation.up.sql @@ -0,0 +1,16 @@ +CREATE TABLE IF NOT EXISTS sentry_kubeconfig_revocation ( + id uuid NOT NULL default uuid_generate_v4(), + organization_id uuid NOT NULL, + partner_id uuid NOT NULL, + account_id uuid NOT NULL, + revoked_at timestamp WITH time zone, + created_at timestamp WITH time zone NOT NULL, + is_sso_user boolean default FALSE +); + +ALTER TABLE sentry_kubeconfig_revocation OWNER TO admindbuser; + +ALTER TABLE ONLY sentry_kubeconfig_revocation ADD CONSTRAINT sentry_kubeconfig_revocation_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY sentry_kubeconfig_revocation + ADD CONSTRAINT sentry_kubeconfig_revocation_acc_org_sso_key UNIQUE (organization_id, account_id, is_sso_user); \ No newline at end of file diff --git a/persistence/migrations/admindb/000025_sentry_kubeconfig_setting.down.sql b/persistence/migrations/admindb/000025_sentry_kubeconfig_setting.down.sql new file mode 100644 index 0000000..2a2960a --- /dev/null +++ b/persistence/migrations/admindb/000025_sentry_kubeconfig_setting.down.sql @@ -0,0 +1 @@ +DROP TABLE IF EXISTS sentry_kubeconfig_setting; \ No newline at end of file diff --git a/persistence/migrations/admindb/000025_sentry_kubeconfig_setting.up.sql b/persistence/migrations/admindb/000025_sentry_kubeconfig_setting.up.sql new file mode 100644 index 0000000..25d3abc --- /dev/null +++ b/persistence/migrations/admindb/000025_sentry_kubeconfig_setting.up.sql @@ -0,0 +1,26 @@ +CREATE TABLE IF NOT EXISTS sentry_kubeconfig_setting ( + id uuid NOT NULL default uuid_generate_v4(), + organization_id uuid NOT NULL, + partner_id uuid NOT NULL, + account_id uuid NOT NULL, + scope character varying(256) NOT NULL, + validity_seconds integer NOT NULL DEFAULT 0, + created_at timestamp WITH time zone NOT NULL, + modified_at timestamp WITH time zone, + deleted_at timestamp WITH time zone, + enforce_rsid boolean default false, + disable_all_audit boolean default false, + disable_cmd_audit boolean default false, + is_sso_user boolean default false, + disable_web_kubectl boolean default false, + disable_cli_kubectl boolean default false, + enable_privaterelay boolean default false, + enforce_orgadmin_secret_access boolean default false +); + +ALTER TABLE sentry_kubeconfig_setting OWNER TO admindbuser; + +ALTER TABLE ONLY sentry_kubeconfig_setting ADD CONSTRAINT sentry_kubeconfig_setting_pkey PRIMARY KEY (id); + +ALTER TABLE ONLY sentry_kubeconfig_setting + ADD CONSTRAINT sentry_kubeconfig_setting_acc_org_sso_key UNIQUE (organization_id, account_id, is_sso_user); \ No newline at end of file diff --git a/persistence/migrations/admindb/000026_sentry_ssoaccount_group_project_roles.down.sql b/persistence/migrations/admindb/000026_sentry_ssoaccount_group_project_roles.down.sql new file mode 100644 index 0000000..ff48591 --- /dev/null +++ b/persistence/migrations/admindb/000026_sentry_ssoaccount_group_project_roles.down.sql @@ -0,0 +1 @@ +DROP VIEW IF EXISTS sentry_ssoaccount_group_project_roles; \ No newline at end of file diff --git a/persistence/migrations/admindb/000026_sentry_ssoaccount_group_project_roles.up.sql b/persistence/migrations/admindb/000026_sentry_ssoaccount_group_project_roles.up.sql new file mode 100644 index 0000000..5bd6e64 --- /dev/null +++ b/persistence/migrations/admindb/000026_sentry_ssoaccount_group_project_roles.up.sql @@ -0,0 +1,24 @@ +CREATE OR REPLACE VIEW sentry_ssoaccount_group_project_roles AS +SELECT + a.id, + a.username, + gp.role_name, + gp.project_id, + gp.project_name, + gp.group_name, + a.organization_id as account_organization_id, + gp.organization_id, + gp.partner_id, + string_agg(distinct gp.scope,',') as scope, + a.last_login, + a.created_at, + a.first_name, + a.last_name, + a.phone, + a.name, + a.last_logout +FROM + authsrv_ssoaccount a + INNER JOIN sentry_group_permission gp ON a.groups ? gp.group_name AND a.organization_id = gp.organization_id +WHERE + a.trash=false group by a.id,gp.project_id,gp.role_name,gp.organization_id,gp.partner_id,gp.group_name,gp.project_name; diff --git a/persistence/migrations/admindb/000027_sentry_kubectl_cluster_settings.down.sql b/persistence/migrations/admindb/000027_sentry_kubectl_cluster_settings.down.sql new file mode 100644 index 0000000..dc50857 --- /dev/null +++ b/persistence/migrations/admindb/000027_sentry_kubectl_cluster_settings.down.sql @@ -0,0 +1 @@ +DROP TABLE IF EXISTS sentry_kubectl_cluster_settings; \ No newline at end of file diff --git a/persistence/migrations/admindb/000027_sentry_kubectl_cluster_settings.up.sql b/persistence/migrations/admindb/000027_sentry_kubectl_cluster_settings.up.sql new file mode 100644 index 0000000..c08608f --- /dev/null +++ b/persistence/migrations/admindb/000027_sentry_kubectl_cluster_settings.up.sql @@ -0,0 +1,17 @@ +CREATE TABLE IF NOT EXISTS sentry_kubectl_cluster_settings ( + name varchar NOT NULL, + organization_id uuid NOT NULL, + partner_id uuid NOT NULL, + disable_web_kubectl boolean NOT NULL DEFAULT FALSE, + disable_cli_kubectl boolean NOT NULL DEFAULT FALSE, + modified_at timestamp WITH time zone, + created_at timestamp WITH time zone NOT NULL, + deleted_at timestamp WITH time zone +); + +ALTER TABLE sentry_kubectl_cluster_settings OWNER TO admindbuser; + +ALTER TABLE ONLY sentry_kubectl_cluster_settings ADD CONSTRAINT sentry_kubectl_cluster_settings_pkey PRIMARY KEY (name); + +ALTER TABLE ONLY sentry_kubectl_cluster_settings + ADD CONSTRAINT sentry_kubectl_cluster_settin_name_partner_id_organization__key UNIQUE (name, partner_id, organization_id); \ No newline at end of file diff --git a/persistence/migrations/clusterdb/000007_cluster_nodes.down.sql b/persistence/migrations/clusterdb/000007_cluster_nodes.down.sql deleted file mode 100644 index ad6e514..0000000 --- a/persistence/migrations/clusterdb/000007_cluster_nodes.down.sql +++ /dev/null @@ -1 +0,0 @@ -DROP TABLE IF EXISTS cluster_nodes; \ No newline at end of file diff --git a/persistence/migrations/clusterdb/000007_cluster_nodes.up.sql b/persistence/migrations/clusterdb/000007_cluster_nodes.up.sql deleted file mode 100644 index 64cf4df..0000000 --- a/persistence/migrations/clusterdb/000007_cluster_nodes.up.sql +++ /dev/null @@ -1,33 +0,0 @@ -CREATE TABLE IF NOT EXISTS cluster_nodes ( - cluster_id uuid NOT NULL, - organization_id uuid not null, - partner_id uuid not null, - project_id uuid not null, - name varchar NOT NULL, - display_name varchar NOT NULL, - created_at timestamp WITH time zone NOT NULL, - modified_at timestamp WITH time zone, - deleted_at timestamp with time zone, - labels jsonb NOT NULL DEFAULT '{}'::jsonb, - annotations jsonb NOT NULL DEFAULT '{}'::jsonb, - unschedulable bool NOT NULL DEFAULT FALSE, - taints jsonb NOT NULL DEFAULT '[]'::jsonb, - conditions jsonb NOT NULL DEFAULT '[]'::jsonb, - node_info jsonb NOT NULL DEFAULT '{}'::jsonb, - state varchar NOT NULL, - capacity jsonb NOT NULL DEFAULT '{}'::jsonb, - allocatable jsonb NOT NULL DEFAULT '{}'::jsonb, - allocated jsonb NOT NULL DEFAULT '{}'::jsonb, - ips jsonb NOT NULL DEFAULT '[]'::jsonb, - id uuid NOT NULL default uuid_generate_v4() -); - -ALTER TABLE cluster_nodes OWNER TO clusterdbuser; - -ALTER TABLE ONLY cluster_nodes ADD CONSTRAINT cluster_nodes_name_cluster_id_key PRIMARY KEY (name, cluster_id); - -CREATE INDEX idx_nodes_lables ON cluster_nodes USING GIN (labels jsonb_path_ops); - -ALTER TABLE ONLY cluster_nodes - ADD CONSTRAINT cluster_nodes_cluster_id_fkey FOREIGN KEY (cluster_id) - REFERENCES cluster_clusters(id) DEFERRABLE INITIALLY DEFERRED; diff --git a/persistence/migrations/clusterdb/000008_cluster_placements.down.sql b/persistence/migrations/clusterdb/000008_cluster_placements.down.sql deleted file mode 100644 index 3f3c84b..0000000 --- a/persistence/migrations/clusterdb/000008_cluster_placements.down.sql +++ /dev/null @@ -1 +0,0 @@ -DROP TABLE IF EXISTS cluster_placements; \ No newline at end of file diff --git a/persistence/migrations/clusterdb/000008_cluster_placements.up.sql b/persistence/migrations/clusterdb/000008_cluster_placements.up.sql deleted file mode 100644 index 31d94f2..0000000 --- a/persistence/migrations/clusterdb/000008_cluster_placements.up.sql +++ /dev/null @@ -1,30 +0,0 @@ -CREATE TABLE IF NOT EXISTS cluster_placements( - id uuid NOT NULL default uuid_generate_v4(), - organization_id uuid not null, - partner_id uuid not null, - project_id uuid not null, - name varchar NOT NULL, - display_name varchar NOT NULL, - created_at timestamp WITH time zone NOT NULL, - modified_at timestamp WITH time zone, - deleted_at timestamp with time zone, - labels jsonb NOT NULL DEFAULT '{}'::jsonb, - annotations jsonb NOT NULL DEFAULT '{}'::jsonb, - artifact_type varchar NOT NULL, - spec jsonb NOT NULL, - deployment_plan jsonb NOT NULL, - workload_id integer NOT NULL default 0, - revision integer NOT NULL default 0, - generation varchar NOT NULL default '', - last_reconciled_at timestamp WITH time zone NOT NULL, - conditions jsonb NOT NULL, - pipeline_meta jsonb -); - -ALTER TABLE cluster_placements OWNER TO clusterdbuser; - -ALTER TABLE ONLY cluster_placements ADD CONSTRAINT cluster_placements_pkey PRIMARY KEY (id); - -CREATE INDEX cluster_placements_name_organization_id_partner_id_project__key ON cluster_placements USING btree (name, organization_id, partner_id, project_id); - -CREATE INDEX idx_placement_lables ON cluster_placements USING GIN (labels jsonb_path_ops); \ No newline at end of file