feat: add protobuf encoding/decoding for Go structs

This commit adds the support for encoding/decoding Go structs with `protobuf:<n>` tags.

Closes #5940

Signed-off-by: Dmitriy Matrenichev <dmitry.matrenichev@siderolabs.com>
This commit is contained in:
Dmitriy Matrenichev 2022-08-05 17:32:09 +03:00
parent 00c3ee3ac3
commit 7b80a747bc
No known key found for this signature in database
GPG Key ID: D3363CF894E68892
88 changed files with 1244 additions and 1503 deletions

View File

@ -197,8 +197,6 @@ COPY ./api/cluster/cluster.proto /api/cluster/cluster.proto
RUN protoc -I/api -I/api/vendor/ --go_out=paths=source_relative:/api --go-grpc_out=paths=source_relative:/api --go-vtproto_out=paths=source_relative:/api --go-vtproto_opt=features=marshal+unmarshal+size cluster/cluster.proto
COPY ./api/resource/resource.proto /api/resource/resource.proto
RUN protoc -I/api -I/api/vendor/ --go_out=paths=source_relative:/api --go-grpc_out=paths=source_relative:/api --go-vtproto_out=paths=source_relative:/api --go-vtproto_opt=features=marshal+unmarshal+size resource/resource.proto
COPY ./api/resource/secrets/secrets.proto /api/resource/secrets/secrets.proto
RUN protoc -I/api -I/api/vendor/ --go_out=paths=source_relative:/api --go-grpc_out=paths=source_relative:/api --go-vtproto_out=paths=source_relative:/api --go-vtproto_opt=features=marshal+unmarshal+size resource/secrets/secrets.proto
COPY ./api/inspect/inspect.proto /api/inspect/inspect.proto
RUN protoc -I/api -I/api/vendor/ --go_out=paths=source_relative:/api --go-grpc_out=paths=source_relative:/api --go-vtproto_out=paths=source_relative:/api --go-vtproto_opt=features=marshal+unmarshal+size inspect/inspect.proto
# Goimports and gofumpt generated files to adjust import order
@ -257,7 +255,6 @@ COPY --from=generate-build /api/time/*.pb.go /pkg/machinery/api/time/
COPY --from=generate-build /api/cluster/*.pb.go /pkg/machinery/api/cluster/
COPY --from=generate-build /api/storage/*.pb.go /pkg/machinery/api/storage/
COPY --from=generate-build /api/resource/*.pb.go /pkg/machinery/api/resource/
COPY --from=generate-build /api/resource/secrets/*.pb.go /pkg/machinery/api/resource/secrets/
COPY --from=generate-build /api/inspect/*.pb.go /pkg/machinery/api/inspect/
COPY --from=go-generate /src/pkg/machinery/resources/ /pkg/machinery/resources/
COPY --from=go-generate /src/pkg/machinery/config/types/v1alpha1/ /pkg/machinery/config/types/v1alpha1/

Binary file not shown.

View File

@ -1,30 +0,0 @@
syntax = "proto3";
package resource.secrets;
option go_package = "github.com/talos-systems/talos/pkg/machinery/api/resource/secrets";
message CertAndKeyPEM {
bytes cert = 1;
bytes key = 2;
}
// APISpec describes secrets.API resource.
message APISpec {
bytes ca_pem = 1;
CertAndKeyPEM server = 2;
CertAndKeyPEM client = 3;
}
// OsRootSpec describes secrets.OSRoot resource.
message OsRootSpec {
// this spec is specificlaly incomplete, with protobuf encoding it won't be needed anymore
CertAndKeyPEM ca = 1;
string token = 2;
}
// TrustdSpec describes secrets.Trustd resource.
message TrustdSpec {
bytes ca_pem = 1;
CertAndKeyPEM server = 2;
}

4
go.mod
View File

@ -40,7 +40,7 @@ require (
github.com/containernetworking/plugins v1.1.1
github.com/coreos/go-iptables v0.6.0
github.com/coreos/go-semver v0.3.0
github.com/cosi-project/runtime v0.0.0-20220805151220-a84c278ed996
github.com/cosi-project/runtime v0.0.0-20220809130718-cd5f564066ad
github.com/docker/distribution v2.8.1+incompatible
github.com/docker/docker v20.10.17+incompatible
github.com/docker/go-connections v0.4.0
@ -250,7 +250,7 @@ require (
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b // indirect
github.com/sethgrid/pester v0.0.0-20190127155807-68a33a018ad0 // indirect
github.com/siderolabs/protoenc v0.1.1 // indirect
github.com/siderolabs/protoenc v0.1.2 // indirect
github.com/sirupsen/logrus v1.8.1 // indirect
github.com/spf13/afero v1.6.0 // indirect
github.com/spf13/cast v1.4.1 // indirect

8
go.sum
View File

@ -338,8 +338,8 @@ github.com/coreos/go-systemd/v22 v22.3.2 h1:D9/bQk5vlXQFZ6Kwuu6zaiXJ9oTPe68++AzA
github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
github.com/cosi-project/runtime v0.0.0-20220805151220-a84c278ed996 h1:BOsRGAu+jbVij3O52ZJgpDq5sp0iaIyTULncLCPJZ6w=
github.com/cosi-project/runtime v0.0.0-20220805151220-a84c278ed996/go.mod h1:mFcyeoASjvksjw2YoinkYHRPh1AVFrAoDdvCZ0r/u78=
github.com/cosi-project/runtime v0.0.0-20220809130718-cd5f564066ad h1:eoikVJYpgF497xuHVVWLy78Yw+JejMCApDqETsqS+4E=
github.com/cosi-project/runtime v0.0.0-20220809130718-cd5f564066ad/go.mod h1:USHV71cmUcp4K4X+cBq+ySACihAEZw+xFIfkB3p3X80=
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
@ -1065,8 +1065,8 @@ github.com/siderolabs/go-pcidb v0.1.0 h1:6cJPBBmHlIF4GouYR/1g3JXS/niAON+6lIOfKl/
github.com/siderolabs/go-pcidb v0.1.0/go.mod h1:wT/tUxNZFlKSuGBniVwXL53vlGQq2/CVu16y6sMGIao=
github.com/siderolabs/go-pointer v1.0.0 h1:6TshPKep2doDQJAAtHUuHWXbca8ZfyRySjSBT/4GsMU=
github.com/siderolabs/go-pointer v1.0.0/go.mod h1:HTRFUNYa3R+k0FFKNv11zgkaCLzEkWVzoYZ433P3kHc=
github.com/siderolabs/protoenc v0.1.1 h1:hsa92KZR8wTOXvlCS1UhqdLNn6AOyyQKUB9y9Pa5mkw=
github.com/siderolabs/protoenc v0.1.1/go.mod h1:mu4gc6pJxhdJYpuloacKE4jsJojj87qDXwn8LUvs2bY=
github.com/siderolabs/protoenc v0.1.2 h1:u7tkBcOwByr763I95YY+km9nOFhoIBzHX9XijntDXk8=
github.com/siderolabs/protoenc v0.1.2/go.mod h1:mu4gc6pJxhdJYpuloacKE4jsJojj87qDXwn8LUvs2bY=
github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc=
github.com/sirupsen/logrus v1.0.6/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc=
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=

View File

@ -1,27 +1,250 @@
bazil.org/fuse v0.0.0-20200407214033-5883e5a4b512 h1:SRsZGA7aFnCZETmov57jwPrWuTmaZK6+4R4v5FUe1/c=
cloud.google.com/go/bigquery v1.8.0 h1:PQcPefKFdaIzjQFbiyOgAqyx8q5djaE7x9Sqe712DPA=
cloud.google.com/go/datastore v1.1.0 h1:/May9ojXjRkPBNVrq+oWLqmWCkr4OU5uRY29bu0mRyQ=
cloud.google.com/go/firestore v1.6.1 h1:8rBq3zRjnHx8UtBvaOWqBB1xq9jH6/wltfQLlTMh2Fw=
cloud.google.com/go/pubsub v1.3.1 h1:ukjixP1wl0LpnZ6LWtZJ0mX5tBmjp1f8Sqer8Z2OMUU=
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9 h1:VpgP7xuJadIUuKccphEpTJnWhS2jkQyMt6Y7pJCD7fY=
github.com/AdaLogics/go-fuzz-headers v0.0.0-20210715213245-6c3934b029d8 h1:V8krnnfGj4pV65YLUm3C0/8bl7V5Nry2Pwvy3ru/wLc=
github.com/AlekSi/pointer v1.2.0 h1:glcy/gc4h8HnG2Z3ZECSzZ1IX1x2JxRVuDzaJwQE0+w=
github.com/Azure/azure-sdk-for-go v16.2.1+incompatible h1:KnPIugL51v3N3WwvaSmZbxukD1WuWXOiE9fRdu32f2I=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802 h1:1BDTz0u9nC3//pOCMdNH+CiXJVYJh5UQNCOBG7jbELc=
github.com/Microsoft/hcsshim/test v0.0.0-20210227013316-43a75bb4edd3 h1:4FA+QBaydEHlwxg0lMN3rhwoDaQy6LKhVWR4qvq4BuA=
github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cqUQ3I=
github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE=
github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d h1:UrqY+r/OJnIp5u0s1SbQ8dVfLCZJsnvazdBP5hS4iRs=
github.com/a8m/tree v0.0.0-20210115125333-10a5fd5b637d h1:4E8RufAN3UQ/weB6AnQ4y5miZCO0Yco8ZdGId41WuQs=
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 h1:JYp7IbQjafoB+tBA3gMyHYHrpOtNuDiK/uB5uXxq5wM=
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d h1:UQZhZ2O0vMHr2cI+DC1Mbh0TJxzA3RcLoMsFw+aXw7E=
github.com/alexflint/go-filemutex v1.1.0 h1:IAWuUuRYL2hETx5b8vCgwnD+xSdlsTQY6s2JjBsqLdg=
github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8=
github.com/antihax/optional v1.0.0 h1:xK2lYat7ZLaVVcIuj82J8kIro4V6kDe0AUDFboUCwcg=
github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6 h1:G1bPvciwNyF7IUmKXNt9Ak3m6u9DE1rF+RmtIkBpVdA=
github.com/armon/go-metrics v0.3.10 h1:FR+drcQStOe+32sYyJYyZ7FIdgoGGBnwLl+flodp8Uo=
github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310 h1:BUAU3CGlLvorLI26FmByPp2eC2qla6E1Tw+scpcg/to=
github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a h1:idn718Q4B6AGu/h5Sxe66HYVdqdGu2l9Iebqhi/AEoA=
github.com/aws/aws-sdk-go v1.44.19/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo=
github.com/aws/aws-sdk-go v1.44.56 h1:bT+lExwagH7djxb6InKUVkEKGPAj5aAPnV85/m1fKro=
github.com/aws/aws-sdk-go v1.44.56/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo=
github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY=
github.com/bitly/go-simplejson v0.5.0 h1:6IH+V8/tVMab511d5bn4M7EwGXZf9Hj6i2xSwkNEM+Y=
github.com/bits-and-blooms/bitset v1.2.0 h1:Kn4yilvwNtMACtf1eYDlG8H77R07mZSPbMjLyS07ChA=
github.com/bketelsen/crypt v0.0.4 h1:w/jqZtC9YD4DS/Vp9GhWfWcCpuAL58oTnLoI8vE9YHU=
github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ=
github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 h1:DDGfHa7BWjL4YnC6+E63dPcxHo2sUxDIu8g3QgEJdRY=
github.com/brianvoe/gofakeit/v6 v6.17.0/go.mod h1:Ow6qC71xtwm79anlwKRlWZW6zVq9D2XHE4QSSMP/rU8=
github.com/bshuster-repo/logrus-logstash-hook v0.4.1 h1:pgAtgj+A31JBVtEHu2uHuEx0n+2ukqUJnS2vVe5pQNA=
github.com/buger/jsonparser v1.1.1 h1:2PnMjfWD7wBILjqQbt530v576A/cAbQvEW9gGIpYMUs=
github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd h1:rFt+Y/IK1aEZkEHchZRSq9OQbsSzIT/OrI8YFFmRIng=
github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b h1:otBG+dV+YK+Soembjv71DPz3uX/V/6MMlSyD9JBQ6kQ=
github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0 h1:nvj0OLI3YqYXer/kZD8Ri1aaunCxIEsOst1BVJswV0o=
github.com/c-bata/go-prompt v0.2.6 h1:POP+nrHE+DfLYx370bedwNhsqmpCUynWPxuHi0C5vZI=
github.com/census-instrumentation/opencensus-proto v0.3.0 h1:t/LhUZLVitR1Ow2YOnduCsavhwFUklBMoGVYUCqmCqk=
github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko=
github.com/checkpoint-restore/go-criu/v4 v4.1.0 h1:WW2B2uxx9KWF6bGlHqhm8Okiafwwx7Y2kcpn8lCpjgo=
github.com/checkpoint-restore/go-criu/v5 v5.3.0 h1:wpFFOoomK3389ue2lAb0Boag6XPht5QYpipxmSNL4d8=
github.com/cheggaaa/pb v1.0.27 h1:wIkZHkNfC7R6GI5w7l/PdAdzXzlrbcI3p8OAlnkTsnc=
github.com/chzyer/logex v1.1.10 h1:Swpa1K6QvQznwJRcfTfQJmTE72DqScAa40E+fbHEXEE=
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e h1:fY5BOSpyZCqRo5OhCuC+XN+r/bBCmeuuJtjz+bCNIf8=
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1 h1:q763qf9huN11kDQavWsoZXJNW3xEE4JJyHa5Q25/sd8=
github.com/client9/misspell v0.3.4 h1:ta993UF76GwbvJcIo3Y68y/M3WxlpEHPWIGDkJYwzJI=
github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4 h1:hzAQntlaYRkVSFEfj9OTWlVV1H155FMD8BTKktLv0QI=
github.com/cncf/xds/go v0.0.0-20211130200136-a8f946100490 h1:KwaoQzs/WeUxxJqiJsZ4euOly1Az/IgZXXSxlD/UBNk=
github.com/cncf/xds/go v0.0.0-20211130200136-a8f946100490/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/containerd/aufs v1.0.0 h1:2oeJiwX5HstO7shSrPZjrohJZLzK36wvpdmzDRkL/LY=
github.com/containerd/btrfs v1.0.0 h1:osn1exbzdub9L5SouXO5swW4ea/xVdJZ3wokxN5GrnA=
github.com/containerd/console v1.0.3 h1:lIr7SlA5PxZyMV30bDW0MGbiOPXwc63yRuCP0ARubLw=
github.com/containerd/go-runc v1.0.0 h1:oU+lLv1ULm5taqgV/CJivypVODI4SUz1znWjv3nNYS0=
github.com/containerd/imgcrypt v1.1.4 h1:iKTstFebwy3Ak5UF0RHSeuCTahC5OIrPJa6vjMAM81s=
github.com/containerd/nri v0.1.0 h1:6QioHRlThlKh2RkRTR4kIT3PKAcrLo3gIWnjkM4dQmQ=
github.com/containerd/stargz-snapshotter/estargz v0.4.1 h1:5e7heayhB7CcgdTkqfZqrNaNv15gABwr3Q2jBTbLlt4=
github.com/containerd/zfs v1.0.0 h1:cXLJbx+4Jj7rNsTiqVfm6i+RNLx6FFA2fMmDlEf+Wm8=
github.com/containernetworking/cni v1.1.0/go.mod h1:sDpYKmGVENF3s6uvMvGgldDWeG8dMxakj/u+i9ht9vw=
github.com/containers/ocicrypt v1.1.3 h1:uMxn2wTb4nDR7GqG3rnZSfpJXqWURfzZ7nKydzIeKpA=
github.com/coreos/bbolt v1.3.2 h1:wZwiHHUieZCquLkDL0B8UhzreNWsPHooDAG3q34zk0s=
github.com/coreos/etcd v3.3.13+incompatible h1:8F3hqu9fGYLBifCmRCJsicFqDx/D68Rt3q1JMazcgBQ=
github.com/coreos/go-oidc v2.1.0+incompatible h1:sdJrfw8akMnCuUlaZU3tE/uYXFgfqom8DBE9so9EBsM=
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e h1:Wf6HqHfScWJN9/ZjdUKyjop4mf3Qdd+1TvvltAvM3m8=
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f h1:lBNOc5arjvs8E5mO2tbpBpLoyyu8B6e44T7hJy6potg=
github.com/cpuguy83/go-md2man v1.0.10 h1:BSKMNlYxDvnunlTymqtgONjNnaRV1sTpcovwwjF22jk=
github.com/cyphar/filepath-securejoin v0.2.3 h1:YX6ebbZCZP7VkM3scTTokDgBL2TY741X51MTk3ycuNI=
github.com/d2g/dhcp4 v0.0.0-20170904100407-a1d1b6c41b1c h1:Xo2rK1pzOm0jO6abTPIQwbAmqBIOj132otexc1mmzFc=
github.com/d2g/dhcp4client v1.0.0 h1:suYBsYZIkSlUMEz4TAYCczKf62IA2UWC+O8+KtdOhCo=
github.com/d2g/dhcp4server v0.0.0-20181031114812-7d4a0a7f59a5 h1:+CpLbZIeUn94m02LdEKPcgErLJ347NUwxPKs5u8ieiY=
github.com/d2g/hardwareaddr v0.0.0-20190221164911-e7d9fbe030e4 h1:itqmmf1PFpC4n5JW+j4BU7X4MTfVurhYRTjODoPb2Y8=
github.com/daviddengcn/go-colortext v0.0.0-20160507010035-511bcaf42ccd h1:uVsMphB1eRx7xB1njzL3fuMdWRN8HtVzoUOItHMwv5c=
github.com/denverdino/aliyungo v0.0.0-20190125010748-a747050bb1ba h1:p6poVbjHDkKa+wtC8frBMwQtT3BmqGYBjzMwJ63tuR4=
github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM=
github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954 h1:RMLoZVzv4GliuWafOuPuQDKSm1SJph7uCRnnS61JAn4=
github.com/docker/cli v0.0.0-20191017083524-a8ff7f821017 h1:2HQmlpI3yI9deH18Q6xiSOIjXD4sLI55Y/gfpa8/558=
github.com/docker/docker-credential-helpers v0.6.3 h1:zI2p9+1NQYdnG6sMU26EX4aVGlqbInSQxQXLvzJ4RPQ=
github.com/docker/go-metrics v0.0.1 h1:AgB/0SvBxihN0X8OR4SjsblXkbMvalQ8cjmtKQ2rQV8=
github.com/docker/libtrust v0.0.0-20150114040149-fa567046d9b1 h1:ZClxb8laGDf5arXfYcAtECDFgAgHklGI8CxgjHnXKJ4=
github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96 h1:cenwrSVm+Z7QLSV/BsnenAOcDXdX4cMv4wP0B/5QbPg=
github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815 h1:bWDMxwH3px2JBh6AyO7hdCn/PkvCZXii8TGj7sbtEbQ=
github.com/dougm/pretty v0.0.0-20171025230240-2ee9d7453c02 h1:tR3jsKPiO/mb6ntzk/dJlHZtm37CPfVp1C9KIo534+4=
github.com/dvyukov/go-fuzz v0.0.0-20210103155950-6a8e9d1f2415 h1:q1oJaUPdmpDm/VyXosjgPgr6wS7c5iV2p0PwJD73bUI=
github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1 h1:xvqufLtNVwAhN8NMyWklVgxnWohi+wtMGQMhtxexlm0=
github.com/envoyproxy/protoc-gen-validate v0.6.2 h1:JiO+kJTpmYGjEodY7O1Zk8oZcNz1+f30UtwtXoFUPzE=
github.com/envoyproxy/protoc-gen-validate v0.6.2/go.mod h1:2t7qjJNvHPx8IjnBOzl9E9/baC+qXE/TeeyBRzgJDws=
github.com/fanliao/go-promise v0.0.0-20141029170127-1890db352a72 h1:0eU/faU2oDIB2BkQVM02hgRLJjGzzUuRf19HUhp0394=
github.com/fatih/camelcase v1.0.0 h1:hxNvNX/xYBp0ovncs8WyWZrOrpBNub/JfaMvbURyft8=
github.com/felixge/httpsnoop v1.0.1 h1:lvB5Jl89CsZtGIWuTcDM1E/vkVs49/Ml7JJe07l8SPQ=
github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa h1:RDBNVkRviHZtvDvId8XSGPu3rmpmSe+wKRcEWNgsfWU=
github.com/fvbommel/sortorder v1.0.1 h1:dSnXLt4mJYH25uDDGa3biZNQsozaUWDSWeKJ0qqFfzE=
github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7 h1:LofdAjjjqCSXMwLGgOgnE+rdPuvX9DxCqaHwKy7i/ko=
github.com/getkin/kin-openapi v0.76.0 h1:j77zg3Ec+k+r+GA3d8hBoXpAc6KX9TbBPrwQGBIy2sY=
github.com/gliderlabs/ssh v0.1.2-0.20181113160402-cbabf5414432 h1:DGWE1Z/9om1Ny/BvHHIQB81DOzm95VUkTzwmtGtVzK0=
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1 h1:QbL/5oDUmRBzO9/Z7Seo6zf912W/a6Sr4Eu0G/3Jho0=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4 h1:WtGNWLvXpe6ZudgnXrq0barxBImvnnJoMEhXAzcbM0I=
github.com/go-ini/ini v1.25.4 h1:Mujh4R/dH6YL8bxuISne3xX2+qcQ9p0IxKAP6ExWoUo=
github.com/go-kit/kit v0.9.0 h1:wDJmvq38kDhkVxi50ni9ykkdUr1PKgqKOoi01fa0Mdk=
github.com/go-kit/log v0.1.0 h1:DGJh0Sm43HbOeYDNnVZFl8BvcYVvjD5bqYJvp0REbwQ=
github.com/go-logfmt/logfmt v0.5.0 h1:TrB8swr/68K7m9CcGut2g3UOihhbcbiMAYiuTXdEih4=
github.com/go-logr/zapr v1.2.0 h1:n4JnPI1T3Qq1SFEi/F8rwLrZERp2bso19PJZDB9dayk=
github.com/go-openapi/spec v0.19.3 h1:0XRyw8kguri6Yw4SxhsQA/atC88yqrk0+G4YhI2wabc=
github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk=
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 h1:p104kn46Q8WdvHunIJ9dAyjPVtrBPhSr3KT2yUst43I=
github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e h1:BWhy2j3IXJhjCbC68FptL43tDKIq8FladmaTs3Xs7Z8=
github.com/gojuno/minimock/v3 v3.0.8 h1:+L+WvGoTvPB4YCbkMI5WFyp3Mvz6Z5ubBuTXWMhmwmA=
github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4=
github.com/golang/snappy v0.0.3 h1:fHPg5GQYlCeLIPB9BZqMVR5nR9A+IM5zcgeTdjMYmLA=
github.com/golangplus/testing v0.0.0-20180327235837-af21d9c3145e h1:KhcknUwkWHKZPbFy2P7jH5LKJ3La+0ZeknkkmrSgqb0=
github.com/google/go-containerregistry v0.5.1 h1:/+mFTs4AlwsJ/mJe8NDtKb7BxLtbZFpcn8vDsneEkwQ=
github.com/google/go-tpm v0.3.3 h1:P/ZFNBZYXRxc+z7i5uyd8VP7MaDteuLZInzrH2idRGo=
github.com/google/goexpect v0.0.0-20191001010744-5b6988669ffa h1:PMkmJA8ju9DjqAJjIzrBdrmhuuPsoNnNLYgKQBopWL0=
github.com/google/goterm v0.0.0-20200907032337-555d40f16ae2 h1:CVuJwN34x4xM2aT4sIKhmeib40NeBPhRihNjQmpJsA4=
github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec=
github.com/google/renameio v0.1.0 h1:GOZbcHa3HfsPKPlmyPyN2KEohoMXOhdMbHrvbpl2QaA=
github.com/googleapis/gnostic v0.5.1 h1:A8Yhf6EtqTv9RMsU6MQTyrtV1TjWlR6xU9BsZIwuTCM=
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8=
github.com/gorilla/handlers v0.0.0-20150720190736-60c7bfde3e33 h1:893HsJqtxp9z1SF76gg6hY70hRY1wVlTSnC/h1yUDCo=
github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc=
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho=
github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo=
github.com/hashicorp/consul/api v1.11.0 h1:Hw/G8TtRvOElqxVIhBzXciiSTbapq8hZ2XKZsXk5ZCE=
github.com/hashicorp/consul/sdk v0.1.1 h1:LnuDWGNsoajlhGyHJvuWW6FVqRl8JOTPqS6CPTsYjhY=
github.com/hashicorp/go-hclog v1.0.0 h1:bkKf0BeBXcSYa7f5Fyi9gMuQ8gNsxeiNpZjR6VxNZeo=
github.com/hashicorp/go-msgpack v0.5.3 h1:zKjpN5BK/P5lMYrLmBHdBULWbJ0XpYR+7NGzqkZzoD4=
github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5Oi2viEzc=
github.com/hashicorp/go-sockaddr v1.0.0 h1:GeH6tui99pF4NJgfnhp+L6+FfobzVW3Ah46sLo0ICXs=
github.com/hashicorp/go-syslog v1.0.0 h1:KaodqZuhUoZereWVIYmpUgZysurB1kBLX2j0MwMrUAE=
github.com/hashicorp/go.net v0.0.1 h1:sNCoNyDEvN1xa+X0baata4RdcpKwcMS6DH+xwfqPgjw=
github.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI65Y=
github.com/hashicorp/mdns v1.0.0 h1:WhIgCr5a7AaVH6jPUwjtRuuE7/RDufnUvzIr48smyxs=
github.com/hashicorp/memberlist v0.1.3 h1:EmmoJme1matNzb+hMpDuR/0sbJSUisxyqBGG676r31M=
github.com/hashicorp/serf v0.9.6 h1:uuEX1kLR6aoda1TBttmJQKDLZE1Ob7KN0NPdE7EtCDc=
github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho=
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639 h1:mV02weKRL81bEnm8A0HT1/CAelMQDBuQIfLw8n+d6xI=
github.com/intel-go/cpuid v0.0.0-20200819041909-2aa72927c3e2 h1:h+RKaNPjka7LRJGoeub/IQBdXSoEaJjfADkBq02hvjw=
github.com/intel/goresctrl v0.2.0 h1:JyZjdMQu9Kl/wLXe9xA6s1X+tF6BWsQPFGJMEeCfWzE=
github.com/j-keck/arping v0.0.0-20160618110441-2cf9dc699c56 h1:742eGXur0715JMq73aD95/FU0XpVKXqNuTnEfXsLOYQ=
github.com/joefitzgerald/rainbow-reporter v0.1.0 h1:AuMG652zjdzI0YCCnXAqATtRBpGXMcAnrajcaTrSeuo=
github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA=
github.com/jstemmer/go-junit-report v0.9.1 h1:6QPYqodiu3GuPL+7mfx+NwDdp2eTkp9IfEUpgAwUN0o=
github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo=
github.com/julienschmidt/httprouter v1.3.0 h1:U0609e9tgbseu3rBINet9P48AI/D3oJs4dN7jwJOQ1U=
github.com/kaey/framebuffer v0.0.0-20140402104929-7b385489a1ff h1:eK9dwGbaOkNQ44GPFD571d+51Qa2AGIYAR3kpjsrhLE=
github.com/kevinburke/ssh_config v1.1.0 h1:pH/t1WS9NzT8go394IqZeJTMHVm6Cr6ZJ6AQ+mdNo/o=
github.com/kisielk/errcheck v1.5.0 h1:e8esj/e4R+SAOwFwN+n3zr0nYeCyeweozKfO23MvHzY=
github.com/kisielk/gotool v1.0.0 h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg=
github.com/klauspost/pgzip v1.2.4 h1:TQ7CNpYKovDOmqzRHKxJh0BeaBI7UdQZYc6p7pMQh1A=
github.com/konsorten/go-windows-terminal-sequences v1.0.3 h1:CE8S1cTafDpPvMhIxNJKvHsGVBgn1xWYf1NbHQhywc8=
github.com/kr/fs v0.1.0 h1:Jskdu9ieNAYnjxsi0LbQp1ulIKZV1LAFgK1tWhpZgl8=
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515 h1:T+h1c/A9Gawja4Y9mFVWj2vyii2bbUNDw3kt9VxK2EY=
github.com/kr/pty v1.1.8 h1:AkaSdXYQOWeaO3neb8EM634ahkXXe3jYbVh/F9lq+GI=
github.com/linuxkit/virtsock v0.0.0-20201010232012-f8cee7dfc7a3 h1:jUp75lepDg0phMUJBCmvaeFDldD2N3S1lBuPwUTszio=
github.com/lithammer/dedent v1.1.0 h1:VNzHMVCBNG1j0fh3OrsFRkVUwStdDArbgBWoPAffktY=
github.com/lyft/protoc-gen-star v0.5.3/go.mod h1:V0xaHgaf5oCCqmcxYcWiDfTiKsZsRc87/1qhoTACD8w=
github.com/marstr/guid v1.1.0 h1:/M4H/1G4avsieL6BbUwCOBzulmoeKVP5ux/3mQNnbyI=
github.com/mattn/go-shellwords v1.0.12 h1:M2zGm7EW6UQJvDeQxo4T51eKPurbeFbe8WtebGE2xrk=
github.com/mattn/go-tty v0.0.3 h1:5OfyWorkyO7xP52Mq7tB36ajHDG5OHrmBGIS/DtakQI=
github.com/maxbrunsfeld/counterfeiter/v6 v6.2.2 h1:g+4J5sZg6osfvEfkRZxJ1em0VT95/UOZgi/l7zi1/oE=
github.com/miekg/dns v1.0.14 h1:9jZdLNd/P4+SfEJ0TNyxYpsK8N4GtfylBLqtbYN1sbA=
github.com/miekg/pkcs11 v1.1.1 h1:Ugu9pdy6vAYku5DEpVWVFPYnzV+bxB+iRdbuFSu7TvU=
github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible h1:aKW/4cBs+yK6gpqU3K/oIwk9Q/XICqd3zOX/UFuvqmk=
github.com/mitchellh/cli v1.0.0 h1:iGBIsUe3+HZ/AD/Vd7DErOt5sU9fa8Uj7A2s1aggv1Y=
github.com/mitchellh/gox v0.4.0 h1:lfGJxY7ToLJQjHHwi0EX6uYBdK78egf954SQl13PQJc=
github.com/mitchellh/iochan v1.0.0 h1:C+X3KsSTLFVBr/tK1eYN/vs4rJcvsiLU338UhYPJWeY=
github.com/mitchellh/osext v0.0.0-20151018003038-5e2d6d41470f h1:2+myh5ml7lgEU/51gbeLHfKGNfgEQQIWrlbdaOsidbQ=
github.com/moby/sys/symlink v0.2.0 h1:tk1rOM+Ljp0nFmfOIBtlV3rTDlWOwFRhjEeAhZB0nZc=
github.com/mrunalp/fileutils v0.5.0 h1:NKzVxiH7eSk+OQ4M+ZYW1K6h27RUV3MI6NUTsHhU6Z4=
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU=
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f h1:y5//uYreIhSUg3J1GEMiLbxo1LJaP8RfCpH6pymGZus=
github.com/ncw/swift v1.0.47 h1:4DQRPj35Y41WogBxyhOXlrI37nzGlyEcsforeudyYPQ=
github.com/networkplumbing/go-nft v0.2.0 h1:eKapmyVUt/3VGfhYaDos5yeprm+LPt881UeksmKKZHY=
github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4=
github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec=
github.com/opencontainers/runtime-tools v0.0.0-20181011054405-1d69bd0f9c39 h1:H7DMc6FAjgwZZi8BRqjrAAHWoqEr5e5L6pS4V0ezet4=
github.com/opentracing/opentracing-go v1.1.0 h1:pWlfV3Bxv7k65HYwkikxat0+s3pV4bsqf19k25Ur8rU=
github.com/orangecms/go-framebuffer v0.0.0-20200613202404-a0700d90c330 h1:zJBTzBuTR7EdFzmCGx0xp0pbOOb82sAh0+YUK4JTDEI=
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c h1:Lgl0gzECD8GnQ5QCWA8o6BtfL6mDH5rQgM4/fX3avOs=
github.com/pborman/getopt/v2 v2.1.0 h1:eNfR+r+dWLdWmV8g5OlpyrTYHkhVNxHBdN2cCrJmOEA=
github.com/pierrec/lz4/v4 v4.1.14 h1:+fL8AQEZtz/ijeNnpduH0bROTu0O3NZAlPjQxGn8LwE=
github.com/pkg/sftp v1.10.1 h1:VasscCm72135zRysgrJDKsntdmPN+OuU3+nnHYA9wyc=
github.com/pkg/term v1.2.0-beta.2 h1:L3y/h2jkuBVFdWiJvNfYfKmzcCnILw7mJWm2JQuMppw=
github.com/posener/complete v1.1.1 h1:ccV59UEOTzVDnDUEFdT95ZzHVZ+5+158q8+SJb2QV5w=
github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021 h1:0XM1XL/OFFJjXsYXlG30spTkV/E9+gmd5GD1w2HE8xM=
github.com/prometheus/tsdb v0.7.1 h1:YZcsG11NqnK4czYLrWd9mpEuAJIHVQLwdrleYfszMAA=
github.com/rasky/go-xdr v0.0.0-20170217172119-4930550ba2e2 h1:lbe6PJ3nOQAUvpx9P3GtsQ/jyNBOHLV+cj2++uZrpa4=
github.com/rck/unit v0.0.3 h1:q3/Ui9gcrFKpEneZXw2gNmNEbzv5jLrZnH6qhX1ypZ0=
github.com/rekby/gpt v0.0.0-20200219180433-a930afbc6edc h1:goZGTwEEn8mWLcY012VouWZWkJ8GrXm9tS3VORMxT90=
github.com/rogpeppe/fastuuid v1.2.0 h1:Ppwyp6VYCF1nvBTXL3trRso7mXMlRrw9ooo375wvi2s=
github.com/sagikazarmark/crypt v0.3.0 h1:TV5DVog+pihN4Rr0rN1IClv4ePpkzdg9sPrw7WDofZ8=
github.com/sclevine/spec v1.2.0 h1:1Jwdf9jSfDl9NVmt8ndHqbTZ7XCCPbh1jI3hkDBHVYA=
github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I=
github.com/seccomp/libseccomp-golang v0.9.2-0.20210429002308-3879420cc921 h1:58EBmR2dMNL2n/FnbQewK3D14nXr0V9CObDSvMJLq+Y=
github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo=
github.com/siderolabs/protoenc v0.1.2/go.mod h1:mu4gc6pJxhdJYpuloacKE4jsJojj87qDXwn8LUvs2bY=
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM=
github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s=
github.com/soheilhy/cmux v0.1.5 h1:jjzc5WVemNEDTLwv9tlmemhC73tI08BNOIGwBOo10Js=
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72 h1:qLC7fQah7D6K1B0ujays3HV9gkFtllcxhzImRR7ArPQ=
github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4=
github.com/stefanberger/go-pkcs11uri v0.0.0-20201008174630-78d3cae3a980 h1:lIOOHPEbXzO3vnmx2gok1Tfs31Q8GQqKLc8vVqyQq/I=
github.com/stoewer/go-strcase v1.2.0 h1:Z2iHWqGXH00XYgqDmNgQbIBxf3wrNq0F3feEy0ainaU=
github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals=
github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635 h1:kdXcSzyDtseVEc4yCz2qF8ZrQvIDBJLl4S1c3GCXmoI=
github.com/talos-systems/siderolink v0.1.1/go.mod h1:1PLRyKRx+MAkz1vWJXIP19p5wChF0TejbIbX/CQMWuw=
github.com/tchap/go-patricia v2.2.6+incompatible h1:JvoDL7JSoIP2HDE8AbDH3zC8QBPxmzYe32HHy5yQ+Ck=
github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802 h1:uruHq4dN7GR16kFc5fp3d1RIYzJW5onx8Ybykw2YQFA=
github.com/tv42/httpunix v0.0.0-20191220191345-2ba4b9c3382c h1:u6SKchux2yDvFQnDHS3lPnIRmfVJ5Sxy3ao2SIdysLQ=
github.com/u-root/gobusybox/src v0.0.0-20220728145311-85dc1fd1bc75 h1:pCQLzZyKqQnYn/lTpROHlQJO8LrBQqrHE0gar1TnGOA=
github.com/u-root/iscsinl v0.1.1-0.20210528121423-84c32645822a h1:A0sK7WEodak7eVd21MOEatnh2pfAAwZaEPSIEEsjctQ=
github.com/ugorji/go v1.1.4 h1:j4s+tAvLfL3bZyefP2SEWmhBzmuIlH/eqNuPdFPgngw=
github.com/urfave/cli v1.22.2 h1:gsqYFH8bb9ekPA12kRo0hfjngWQjkJPlN9R0N78BoUo=
github.com/vishvananda/netlink v1.2.0-beta h1:CTNzkunO9iTkRaupF540+w47mexyQgNkA/ibnuKc39w=
github.com/vishvananda/netlink v1.2.0-beta/go.mod h1:twkDnbuQxJYemMlGd4JFIcuhgX83tXhKS2B/PRMpOho=
github.com/vtolstov/go-ioctl v0.0.0-20151206205506-6be9cced4810 h1:X6ps8XHfpQjw8dUStzlMi2ybiKQ2Fmdw7UM+TinwvyM=
github.com/willf/bitset v1.1.11 h1:N7Z7E9UvjW+sGsEl7k/SJrvY2reP1A07MrGuCjIOjRE=
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f h1:J9EGpcZtP0E/raorCMxlFGSTBrsSlaDGf3jU/qvAE2c=
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0=
github.com/xeipuuv/gojsonschema v0.0.0-20180618132009-1d523034197f h1:mvXjJIHRZyhNuGassLTcXTwjiWq7NmjdavZsUnmFybQ=
github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77 h1:ESFSdwYZvkeru3RtdrYueztKhOBCSAAzS4Gf+k0tEow=
github.com/yuin/goldmark v1.4.1 h1:/vn0k+RBvwlxEmP5E7SZMqNxPhfMVFEJiykr15/0XKM=
github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43 h1:+lm10QQTNSBd8DVTNGHx7o/IKu9HYDvLMffDhbyLccI=
github.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50 h1:hlE8//ciYMztlGpl/VA+Zm1AcTPHYkHJPbHqE6WJUXE=
github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f h1:ERexzlUfuTvpE74urLSbIQW0Z/6hF9t8U4NsJLaioAY=
go.etcd.io/etcd v0.5.0-alpha.5.0.20200910180754-dd1b699fc489 h1:1JFLBqwIgdyHN1ZtgjTBwO+blA6gVOmZurpiMEsETKo=
go.mozilla.org/pkcs7 v0.0.0-20200128120323-432b2356ecb1 h1:A/5uWzF44DlIgdm/PQFwfMkW0JX+cIcQi/SwLAmZP5M=
go.opentelemetry.io/contrib v0.20.0 h1:ubFQUn0VCZ0gPwIoJfBJVpeBlyRMxu8Mm/huKWYd9p0=
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0 h1:Q3C9yzW6I9jqEc8sawxzxZmY48fs9u220KXq6d5s3XU=
go.opentelemetry.io/otel/exporters/otlp v0.20.0 h1:PTNgq9MRmQqqJY0REVbZFvwkYOA85vbdQU/nVfxDyqg=
go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.3.0 h1:R/OBkMoGgfy2fLhs2QhkCI1w4HLEQX92GCcJB6SSdNk=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.3.0 h1:giGm8w67Ja7amYNfYMdme7xSp2pIxThWopw8+QP51Yk=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.3.0 h1:VQbUHoJqytHHSJ1OZodPH9tvZZSVzUHjPHpkO85sT6k=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.3.0 h1:Ydage/P0fRrSPpZeCVxzjqGcI6iVmG2xb43+IR8cjqM=
go.opentelemetry.io/otel/metric v0.20.0 h1:4kzhXFP+btKm4jwxpjIqjs41A7MakRFUS86bqLHTIw8=
go.opentelemetry.io/otel/oteltest v0.20.0 h1:HiITxCawalo5vQzdHfKeZurV8x7ljcqAgiWzF6Vaeaw=
go.opentelemetry.io/otel/sdk v1.3.0 h1:3278edCoH89MEJ0Ky8WQXVmDQv3FX4ZJ3Pp+9fJreAI=
go.opentelemetry.io/otel/sdk/export/metric v0.20.0 h1:c5VRjxCXdQlx1HjzwGdQHzZaVI82b5EbBgOu2ljD92g=
go.opentelemetry.io/otel/sdk/metric v0.20.0 h1:7ao1wpzHRVKf0OQ7GIxiQJA6X7DLX9o14gmVon7mMK8=
go.opentelemetry.io/proto/otlp v0.11.0 h1:cLDgIBTf4lLOlztkhzAEdQsJ4Lj+i5Wc9k6Nn0K1VyU=
go.uber.org/goleak v1.1.12/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=
golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6 h1:QE6XYQK6naiK1EPAe1g/ILLxN5RBoH5xkJk3CqlMI/Y=
golang.org/x/image v0.0.0-20190802002840-cff245a6509b h1:+qEpEAPhDZ1o0x3tHzZTQDArnOixOzGD9HUJfcg0mb4=
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 h1:VLliZ0d+/avPrXXH+OakdXhpJuEoBZuwh1m2j7U6Iug=
golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028 h1:4+4C/Iv2U4fMZBiMCc98MG1In4gJY5YRhtpDNeDeHWs=
golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro=
golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20220526153639-5463443f8c37 h1:lUkvobShwKsOesNfWWlCS5q7fnbG1MEliIzwu886fn8=
@ -31,9 +254,23 @@ golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 h1:0A+M6Uqn+Eje4kHMK80dtF3JCXC4ykBgQG4Fe06QRhQ=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.zx2c4.com/go118/netip v0.0.0-20211106132939-9d41d90554dd h1:gUHae7sCd+tFJLcCximWeBFD2b6Jg3O7UaNaPvjIJHc=
golang.zx2c4.com/wintun v0.0.0-20211104114900-415007cec224 h1:Ug9qvr1myri/zFN6xL17LSCBGFDnphBBhzmILHsM5TY=
google.golang.org/cloud v0.0.0-20151119220103-975617b05ea8 h1:Cpp2P6TPjujNoC5M2KHY6g7wfyLYfIWRZaSdIKfDasA=
google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4=
google.golang.org/genproto v0.0.0-20220718134204-073382fd740c h1:xDUAhRezFnKF6wopxkOfdWYvz2XCiRQzndyDdpwFgbc=
google.golang.org/genproto v0.0.0-20220718134204-073382fd740c/go.mod h1:GkXuJDJ6aQ7lnJcRF+SJVgFdQhypqgl3LB1C9vabdRE=
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0 h1:M1YKkFIboKNieVO5DLUEVzQfGwJD30Nv2jfUgzb5UcE=
gopkg.in/airbrake/gobrake.v2 v2.0.9 h1:7z2uVWwn7oVeeugY1DtlPAy5H+KYgB1KeKTnqjNatLo=
gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc=
gopkg.in/cheggaaa/pb.v1 v1.0.27 h1:kJdccidYzt3CaHD1crCFTS1hxyhSi059NhOFUf03YFo=
gopkg.in/errgo.v2 v2.1.0 h1:0vLT13EuvQ0hNvakwLuFZ/jYrLp5F3kcWHXdRggjCE8=
gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4=
gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2 h1:OAj3g0cR6Dx/R07QgQe8wkA9RNjB2u4i700xBkIT4e0=
gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8=
gopkg.in/resty.v1 v1.12.0 h1:CuXP0Pjfw9rOuY6EP+UvtNvt5DSqHpIxILZKT/quCZI=
gopkg.in/square/go-jose.v2 v2.5.1 h1:7odma5RETjNHWJnR32wx8t+Io4djHE1PqxCFx3iiZ2w=
honnef.co/go/tools v0.2.2 h1:MNh1AVMyVX23VUHE2O27jm6lNj3vjO5DexS4A1xvnzk=
k8s.io/api v0.24.2 h1:g518dPU/L7VRLxWfcadQn2OnsiGWVOadTLpdnqgY2OI=
k8s.io/api v0.24.2/go.mod h1:AHqbSkTm6YrQ0ObxjO3Pmp/ubFF/KuM7jU+3khoBsOg=
k8s.io/apimachinery v0.24.2 h1:5QlH9SL2C8KMcrNJPor+LbXVTaZRReml7svPEh4OKDM=
@ -45,13 +282,27 @@ k8s.io/cli-runtime v0.24.2/go.mod h1:1LIhKL2RblkhfG4v5lZEt7FtgFG5mVb8wqv5lE9m5qY
k8s.io/client-go v0.24.2 h1:CoXFSf8if+bLEbinDqN9ePIDGzcLtqhfd6jpfnwGOFA=
k8s.io/client-go v0.24.2/go.mod h1:zg4Xaoo+umDsfCWr4fCnmLEtQXyCNXCvJuSsglNcV30=
k8s.io/code-generator v0.24.2/go.mod h1:dpVhs00hTuTdTY6jvVxvTFCk6gSMrtfRydbhZwHI15w=
k8s.io/code-generator v0.24.3 h1:itd1V1ZAYKM+WT+qQDlFKhU1D/Ff5HcEFL/icfClnZA=
k8s.io/component-base v0.24.2 h1:kwpQdoSfbcH+8MPN4tALtajLDfSfYxBDYlXobNWI6OU=
k8s.io/component-base v0.24.2/go.mod h1:ucHwW76dajvQ9B7+zecZAP3BVqvrHoOxm8olHEg0nmM=
k8s.io/component-helpers v0.24.2/go.mod h1:TRQPBQKfmqkmV6c0HAmUs8cXVNYYYLsXy4zu8eODi9g=
k8s.io/component-helpers v0.24.3 h1:HKZTNf77K96StY2+FAgKvsXvHwoLvexeGDJatyuWlyI=
k8s.io/cri-api v0.24.2 h1:8i65YM7mC/VkeH0EFavTI0oXnxRZaQ4gPgOLJrj8LJs=
k8s.io/cri-api v0.24.2/go.mod h1:t3tImFtGeStN+ES69bQUX9sFg67ek38BM9YIJhMmuig=
k8s.io/gengo v0.0.0-20211129171323-c02415ce4185 h1:TT1WdmqqXareKxZ/oNXEUSwKlLiHzPMyB0t8BaFeBYI=
k8s.io/kubectl v0.24.2 h1:+RfQVhth8akUmIc2Ge8krMl/pt66V7210ka3RE/p0J4=
k8s.io/kubectl v0.24.2/go.mod h1:+HIFJc0bA6Tzu5O/YcuUt45APAxnNL8LeMuXwoiGsPg=
k8s.io/kubelet v0.24.2 h1:VAvULig8RiylCtyxudgHV7nhKsLnNIrdVBCRD4bXQ3Y=
k8s.io/kubelet v0.24.2/go.mod h1:Xm9DkWQjwOs+uGOUIIGIPMvvmenvj0lDVOErvIKOOt0=
k8s.io/kubernetes v1.13.0 h1:qTfB+u5M92k2fCCCVP2iuhgwwSOv1EkAkvQY1tQODD8=
k8s.io/metrics v0.24.2/go.mod h1:5NWURxZ6Lz5gj8TFU83+vdWIVASx7W8lwPpHYCqopMo=
k8s.io/metrics v0.24.3 h1:pXzh+PG8L8ANg0PD3Ce8+yG5oj8BLvzBgsz8yCVEXyg=
mvdan.cc/sh/v3 v3.4.1 h1:sY7JU00i7R0mEm7v0g7Z88l1Hf/6K5wVIdA0o4hoSbo=
pack.ag/tftp v1.0.1-0.20181129014014-07909dfbde3c h1:4DHuGX0VtxRIyjXlVpcjSGEmZ7OnIK7Hvo+INnxI8yk=
rsc.io/binaryregexp v0.2.0 h1:HfqmD5MEmC0zvwBuF187nq9mdnXjXsSivRiXN7SmRkE=
rsc.io/quote/v3 v3.1.0 h1:9JKUTTIUgS6kzR9mK1YuGKv6Nl+DijDNIc0ghT58FaY=
rsc.io/sampler v1.3.0 h1:7uVkIFmeBqHfdjD+gZwtXXI+RODJ2Wc4O7MPEh/QiW4=
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.30 h1:dUk62HQ3ZFhD48Qr8MIXCiKA8wInBQCtuE4QGfFW7yA=
sigs.k8s.io/kustomize/cmd/config v0.10.6 h1:Qjs7z/Q1NrVmW86tavmhM7wZtgWJ7aitLMARlUKrj98=
sigs.k8s.io/kustomize/kustomize/v4 v4.5.4 h1:rzGrL+DA4k8bT6SMz7/U+2z3iiZf1t2RaYJWx8OeTmE=
src.elv.sh v0.16.0-rc1.0.20220116211855-fda62502ad7f h1:pjVeIo9Ba6K1Wy+rlwX91zT7A+xGEmxiNRBdN04gDTQ=

View File

@ -1,397 +0,0 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.1
// protoc v3.19.1
// source: resource/secrets/secrets.proto
package secrets
import (
reflect "reflect"
sync "sync"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
)
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 CertAndKeyPEM struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Cert []byte `protobuf:"bytes,1,opt,name=cert,proto3" json:"cert,omitempty"`
Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
}
func (x *CertAndKeyPEM) Reset() {
*x = CertAndKeyPEM{}
if protoimpl.UnsafeEnabled {
mi := &file_resource_secrets_secrets_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CertAndKeyPEM) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CertAndKeyPEM) ProtoMessage() {}
func (x *CertAndKeyPEM) ProtoReflect() protoreflect.Message {
mi := &file_resource_secrets_secrets_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 CertAndKeyPEM.ProtoReflect.Descriptor instead.
func (*CertAndKeyPEM) Descriptor() ([]byte, []int) {
return file_resource_secrets_secrets_proto_rawDescGZIP(), []int{0}
}
func (x *CertAndKeyPEM) GetCert() []byte {
if x != nil {
return x.Cert
}
return nil
}
func (x *CertAndKeyPEM) GetKey() []byte {
if x != nil {
return x.Key
}
return nil
}
// APISpec describes secrets.API resource.
type APISpec struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
CaPem []byte `protobuf:"bytes,1,opt,name=ca_pem,json=caPem,proto3" json:"ca_pem,omitempty"`
Server *CertAndKeyPEM `protobuf:"bytes,2,opt,name=server,proto3" json:"server,omitempty"`
Client *CertAndKeyPEM `protobuf:"bytes,3,opt,name=client,proto3" json:"client,omitempty"`
}
func (x *APISpec) Reset() {
*x = APISpec{}
if protoimpl.UnsafeEnabled {
mi := &file_resource_secrets_secrets_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *APISpec) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*APISpec) ProtoMessage() {}
func (x *APISpec) ProtoReflect() protoreflect.Message {
mi := &file_resource_secrets_secrets_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 APISpec.ProtoReflect.Descriptor instead.
func (*APISpec) Descriptor() ([]byte, []int) {
return file_resource_secrets_secrets_proto_rawDescGZIP(), []int{1}
}
func (x *APISpec) GetCaPem() []byte {
if x != nil {
return x.CaPem
}
return nil
}
func (x *APISpec) GetServer() *CertAndKeyPEM {
if x != nil {
return x.Server
}
return nil
}
func (x *APISpec) GetClient() *CertAndKeyPEM {
if x != nil {
return x.Client
}
return nil
}
// OsRootSpec describes secrets.OSRoot resource.
type OsRootSpec struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// this spec is specificlaly incomplete, with protobuf encoding it won't be needed anymore
Ca *CertAndKeyPEM `protobuf:"bytes,1,opt,name=ca,proto3" json:"ca,omitempty"`
Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"`
}
func (x *OsRootSpec) Reset() {
*x = OsRootSpec{}
if protoimpl.UnsafeEnabled {
mi := &file_resource_secrets_secrets_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *OsRootSpec) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*OsRootSpec) ProtoMessage() {}
func (x *OsRootSpec) ProtoReflect() protoreflect.Message {
mi := &file_resource_secrets_secrets_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 OsRootSpec.ProtoReflect.Descriptor instead.
func (*OsRootSpec) Descriptor() ([]byte, []int) {
return file_resource_secrets_secrets_proto_rawDescGZIP(), []int{2}
}
func (x *OsRootSpec) GetCa() *CertAndKeyPEM {
if x != nil {
return x.Ca
}
return nil
}
func (x *OsRootSpec) GetToken() string {
if x != nil {
return x.Token
}
return ""
}
// TrustdSpec describes secrets.Trustd resource.
type TrustdSpec struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
CaPem []byte `protobuf:"bytes,1,opt,name=ca_pem,json=caPem,proto3" json:"ca_pem,omitempty"`
Server *CertAndKeyPEM `protobuf:"bytes,2,opt,name=server,proto3" json:"server,omitempty"`
}
func (x *TrustdSpec) Reset() {
*x = TrustdSpec{}
if protoimpl.UnsafeEnabled {
mi := &file_resource_secrets_secrets_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *TrustdSpec) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TrustdSpec) ProtoMessage() {}
func (x *TrustdSpec) ProtoReflect() protoreflect.Message {
mi := &file_resource_secrets_secrets_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 TrustdSpec.ProtoReflect.Descriptor instead.
func (*TrustdSpec) Descriptor() ([]byte, []int) {
return file_resource_secrets_secrets_proto_rawDescGZIP(), []int{3}
}
func (x *TrustdSpec) GetCaPem() []byte {
if x != nil {
return x.CaPem
}
return nil
}
func (x *TrustdSpec) GetServer() *CertAndKeyPEM {
if x != nil {
return x.Server
}
return nil
}
var File_resource_secrets_secrets_proto protoreflect.FileDescriptor
var file_resource_secrets_secrets_proto_rawDesc = []byte{
0x0a, 0x1e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2f, 0x73, 0x65, 0x63, 0x72, 0x65,
0x74, 0x73, 0x2f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x12, 0x10, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x73, 0x65, 0x63, 0x72, 0x65,
0x74, 0x73, 0x22, 0x35, 0x0a, 0x0d, 0x43, 0x65, 0x72, 0x74, 0x41, 0x6e, 0x64, 0x4b, 0x65, 0x79,
0x50, 0x45, 0x4d, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x65, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28,
0x0c, 0x52, 0x04, 0x63, 0x65, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02,
0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x92, 0x01, 0x0a, 0x07, 0x41, 0x50,
0x49, 0x53, 0x70, 0x65, 0x63, 0x12, 0x15, 0x0a, 0x06, 0x63, 0x61, 0x5f, 0x70, 0x65, 0x6d, 0x18,
0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x63, 0x61, 0x50, 0x65, 0x6d, 0x12, 0x37, 0x0a, 0x06,
0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x72,
0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x2e,
0x43, 0x65, 0x72, 0x74, 0x41, 0x6e, 0x64, 0x4b, 0x65, 0x79, 0x50, 0x45, 0x4d, 0x52, 0x06, 0x73,
0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x37, 0x0a, 0x06, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x18,
0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
0x2e, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x41, 0x6e, 0x64,
0x4b, 0x65, 0x79, 0x50, 0x45, 0x4d, 0x52, 0x06, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x22, 0x53,
0x0a, 0x0a, 0x4f, 0x73, 0x52, 0x6f, 0x6f, 0x74, 0x53, 0x70, 0x65, 0x63, 0x12, 0x2f, 0x0a, 0x02,
0x63, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75,
0x72, 0x63, 0x65, 0x2e, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x2e, 0x43, 0x65, 0x72, 0x74,
0x41, 0x6e, 0x64, 0x4b, 0x65, 0x79, 0x50, 0x45, 0x4d, 0x52, 0x02, 0x63, 0x61, 0x12, 0x14, 0x0a,
0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f,
0x6b, 0x65, 0x6e, 0x22, 0x5c, 0x0a, 0x0a, 0x54, 0x72, 0x75, 0x73, 0x74, 0x64, 0x53, 0x70, 0x65,
0x63, 0x12, 0x15, 0x0a, 0x06, 0x63, 0x61, 0x5f, 0x70, 0x65, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28,
0x0c, 0x52, 0x05, 0x63, 0x61, 0x50, 0x65, 0x6d, 0x12, 0x37, 0x0a, 0x06, 0x73, 0x65, 0x72, 0x76,
0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75,
0x72, 0x63, 0x65, 0x2e, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x2e, 0x43, 0x65, 0x72, 0x74,
0x41, 0x6e, 0x64, 0x4b, 0x65, 0x79, 0x50, 0x45, 0x4d, 0x52, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65,
0x72, 0x42, 0x43, 0x5a, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
0x74, 0x61, 0x6c, 0x6f, 0x73, 0x2d, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x2f, 0x74, 0x61,
0x6c, 0x6f, 0x73, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x72,
0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2f, 0x73,
0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_resource_secrets_secrets_proto_rawDescOnce sync.Once
file_resource_secrets_secrets_proto_rawDescData = file_resource_secrets_secrets_proto_rawDesc
)
func file_resource_secrets_secrets_proto_rawDescGZIP() []byte {
file_resource_secrets_secrets_proto_rawDescOnce.Do(func() {
file_resource_secrets_secrets_proto_rawDescData = protoimpl.X.CompressGZIP(file_resource_secrets_secrets_proto_rawDescData)
})
return file_resource_secrets_secrets_proto_rawDescData
}
var file_resource_secrets_secrets_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_resource_secrets_secrets_proto_goTypes = []interface{}{
(*CertAndKeyPEM)(nil), // 0: resource.secrets.CertAndKeyPEM
(*APISpec)(nil), // 1: resource.secrets.APISpec
(*OsRootSpec)(nil), // 2: resource.secrets.OsRootSpec
(*TrustdSpec)(nil), // 3: resource.secrets.TrustdSpec
}
var file_resource_secrets_secrets_proto_depIdxs = []int32{
0, // 0: resource.secrets.APISpec.server:type_name -> resource.secrets.CertAndKeyPEM
0, // 1: resource.secrets.APISpec.client:type_name -> resource.secrets.CertAndKeyPEM
0, // 2: resource.secrets.OsRootSpec.ca:type_name -> resource.secrets.CertAndKeyPEM
0, // 3: resource.secrets.TrustdSpec.server:type_name -> resource.secrets.CertAndKeyPEM
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_resource_secrets_secrets_proto_init() }
func file_resource_secrets_secrets_proto_init() {
if File_resource_secrets_secrets_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_resource_secrets_secrets_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CertAndKeyPEM); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_resource_secrets_secrets_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*APISpec); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_resource_secrets_secrets_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*OsRootSpec); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_resource_secrets_secrets_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*TrustdSpec); 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_resource_secrets_secrets_proto_rawDesc,
NumEnums: 0,
NumMessages: 4,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_resource_secrets_secrets_proto_goTypes,
DependencyIndexes: file_resource_secrets_secrets_proto_depIdxs,
MessageInfos: file_resource_secrets_secrets_proto_msgTypes,
}.Build()
File_resource_secrets_secrets_proto = out.File
file_resource_secrets_secrets_proto_rawDesc = nil
file_resource_secrets_secrets_proto_goTypes = nil
file_resource_secrets_secrets_proto_depIdxs = nil
}

View File

@ -1,929 +0,0 @@
// Code generated by protoc-gen-go-vtproto. DO NOT EDIT.
// protoc-gen-go-vtproto version: v0.2.0
// source: resource/secrets/secrets.proto
package secrets
import (
fmt "fmt"
io "io"
bits "math/bits"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
)
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)
)
func (m *CertAndKeyPEM) MarshalVT() (dAtA []byte, err error) {
if m == nil {
return nil, nil
}
size := m.SizeVT()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBufferVT(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *CertAndKeyPEM) MarshalToVT(dAtA []byte) (int, error) {
size := m.SizeVT()
return m.MarshalToSizedBufferVT(dAtA[:size])
}
func (m *CertAndKeyPEM) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
if m == nil {
return 0, nil
}
i := len(dAtA)
_ = i
var l int
_ = l
if m.unknownFields != nil {
i -= len(m.unknownFields)
copy(dAtA[i:], m.unknownFields)
}
if len(m.Key) > 0 {
i -= len(m.Key)
copy(dAtA[i:], m.Key)
i = encodeVarint(dAtA, i, uint64(len(m.Key)))
i--
dAtA[i] = 0x12
}
if len(m.Cert) > 0 {
i -= len(m.Cert)
copy(dAtA[i:], m.Cert)
i = encodeVarint(dAtA, i, uint64(len(m.Cert)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *APISpec) MarshalVT() (dAtA []byte, err error) {
if m == nil {
return nil, nil
}
size := m.SizeVT()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBufferVT(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *APISpec) MarshalToVT(dAtA []byte) (int, error) {
size := m.SizeVT()
return m.MarshalToSizedBufferVT(dAtA[:size])
}
func (m *APISpec) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
if m == nil {
return 0, nil
}
i := len(dAtA)
_ = i
var l int
_ = l
if m.unknownFields != nil {
i -= len(m.unknownFields)
copy(dAtA[i:], m.unknownFields)
}
if m.Client != nil {
size, err := m.Client.MarshalToSizedBufferVT(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarint(dAtA, i, uint64(size))
i--
dAtA[i] = 0x1a
}
if m.Server != nil {
size, err := m.Server.MarshalToSizedBufferVT(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarint(dAtA, i, uint64(size))
i--
dAtA[i] = 0x12
}
if len(m.CaPem) > 0 {
i -= len(m.CaPem)
copy(dAtA[i:], m.CaPem)
i = encodeVarint(dAtA, i, uint64(len(m.CaPem)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *OsRootSpec) MarshalVT() (dAtA []byte, err error) {
if m == nil {
return nil, nil
}
size := m.SizeVT()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBufferVT(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *OsRootSpec) MarshalToVT(dAtA []byte) (int, error) {
size := m.SizeVT()
return m.MarshalToSizedBufferVT(dAtA[:size])
}
func (m *OsRootSpec) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
if m == nil {
return 0, nil
}
i := len(dAtA)
_ = i
var l int
_ = l
if m.unknownFields != nil {
i -= len(m.unknownFields)
copy(dAtA[i:], m.unknownFields)
}
if len(m.Token) > 0 {
i -= len(m.Token)
copy(dAtA[i:], m.Token)
i = encodeVarint(dAtA, i, uint64(len(m.Token)))
i--
dAtA[i] = 0x12
}
if m.Ca != nil {
size, err := m.Ca.MarshalToSizedBufferVT(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarint(dAtA, i, uint64(size))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *TrustdSpec) MarshalVT() (dAtA []byte, err error) {
if m == nil {
return nil, nil
}
size := m.SizeVT()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBufferVT(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *TrustdSpec) MarshalToVT(dAtA []byte) (int, error) {
size := m.SizeVT()
return m.MarshalToSizedBufferVT(dAtA[:size])
}
func (m *TrustdSpec) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
if m == nil {
return 0, nil
}
i := len(dAtA)
_ = i
var l int
_ = l
if m.unknownFields != nil {
i -= len(m.unknownFields)
copy(dAtA[i:], m.unknownFields)
}
if m.Server != nil {
size, err := m.Server.MarshalToSizedBufferVT(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarint(dAtA, i, uint64(size))
i--
dAtA[i] = 0x12
}
if len(m.CaPem) > 0 {
i -= len(m.CaPem)
copy(dAtA[i:], m.CaPem)
i = encodeVarint(dAtA, i, uint64(len(m.CaPem)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func encodeVarint(dAtA []byte, offset int, v uint64) int {
offset -= sov(v)
base := offset
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return base
}
func (m *CertAndKeyPEM) SizeVT() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Cert)
if l > 0 {
n += 1 + l + sov(uint64(l))
}
l = len(m.Key)
if l > 0 {
n += 1 + l + sov(uint64(l))
}
if m.unknownFields != nil {
n += len(m.unknownFields)
}
return n
}
func (m *APISpec) SizeVT() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.CaPem)
if l > 0 {
n += 1 + l + sov(uint64(l))
}
if m.Server != nil {
l = m.Server.SizeVT()
n += 1 + l + sov(uint64(l))
}
if m.Client != nil {
l = m.Client.SizeVT()
n += 1 + l + sov(uint64(l))
}
if m.unknownFields != nil {
n += len(m.unknownFields)
}
return n
}
func (m *OsRootSpec) SizeVT() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.Ca != nil {
l = m.Ca.SizeVT()
n += 1 + l + sov(uint64(l))
}
l = len(m.Token)
if l > 0 {
n += 1 + l + sov(uint64(l))
}
if m.unknownFields != nil {
n += len(m.unknownFields)
}
return n
}
func (m *TrustdSpec) SizeVT() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.CaPem)
if l > 0 {
n += 1 + l + sov(uint64(l))
}
if m.Server != nil {
l = m.Server.SizeVT()
n += 1 + l + sov(uint64(l))
}
if m.unknownFields != nil {
n += len(m.unknownFields)
}
return n
}
func sov(x uint64) (n int) {
return (bits.Len64(x|1) + 6) / 7
}
func soz(x uint64) (n int) {
return sov(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *CertAndKeyPEM) UnmarshalVT(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflow
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: CertAndKeyPEM: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: CertAndKeyPEM: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Cert", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflow
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLength
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLength
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Cert = append(m.Cert[:0], dAtA[iNdEx:postIndex]...)
if m.Cert == nil {
m.Cert = []byte{}
}
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflow
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLength
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLength
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...)
if m.Key == nil {
m.Key = []byte{}
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skip(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLength
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *APISpec) UnmarshalVT(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflow
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: APISpec: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: APISpec: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field CaPem", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflow
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLength
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLength
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.CaPem = append(m.CaPem[:0], dAtA[iNdEx:postIndex]...)
if m.CaPem == nil {
m.CaPem = []byte{}
}
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Server", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflow
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLength
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLength
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Server == nil {
m.Server = &CertAndKeyPEM{}
}
if err := m.Server.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Client", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflow
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLength
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLength
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Client == nil {
m.Client = &CertAndKeyPEM{}
}
if err := m.Client.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skip(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLength
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *OsRootSpec) UnmarshalVT(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflow
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: OsRootSpec: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: OsRootSpec: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Ca", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflow
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLength
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLength
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Ca == nil {
m.Ca = &CertAndKeyPEM{}
}
if err := m.Ca.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Token", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflow
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLength
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLength
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Token = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skip(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLength
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *TrustdSpec) UnmarshalVT(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflow
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: TrustdSpec: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: TrustdSpec: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field CaPem", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflow
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLength
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLength
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.CaPem = append(m.CaPem[:0], dAtA[iNdEx:postIndex]...)
if m.CaPem == nil {
m.CaPem = []byte{}
}
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Server", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflow
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLength
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLength
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Server == nil {
m.Server = &CertAndKeyPEM{}
}
if err := m.Server.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skip(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLength
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skip(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
depth := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflow
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
wireType := int(wire & 0x7)
switch wireType {
case 0:
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflow
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
iNdEx++
if dAtA[iNdEx-1] < 0x80 {
break
}
}
case 1:
iNdEx += 8
case 2:
var length int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflow
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
length |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if length < 0 {
return 0, ErrInvalidLength
}
iNdEx += length
case 3:
depth++
case 4:
if depth == 0 {
return 0, ErrUnexpectedEndOfGroup
}
depth--
case 5:
iNdEx += 4
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
if iNdEx < 0 {
return 0, ErrInvalidLength
}
if depth == 0 {
return iNdEx, nil
}
}
return 0, io.ErrUnexpectedEOF
}
var (
ErrInvalidLength = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflow = fmt.Errorf("proto: integer overflow")
ErrUnexpectedEndOfGroup = fmt.Errorf("proto: unexpected end of group")
)

View File

@ -22,11 +22,15 @@ type Metadata struct {
}
// Compatibility describes extension compatibility.
//
//gotagsrewrite:gen
type Compatibility struct {
Talos Constraint `yaml:"talos"`
Talos Constraint `yaml:"talos" protobuf:"1"`
}
// Constraint describes compatibility constraint.
//
//gotagsrewrite:gen
type Constraint struct {
Version string `yaml:"version"`
Version string `yaml:"version" protobuf:"1"`
}

View File

@ -8,7 +8,7 @@ replace gopkg.in/yaml.v3 => github.com/unix4ever/yaml v0.0.0-20220527175918-f17b
require (
github.com/containerd/go-cni v1.1.7
github.com/cosi-project/runtime v0.0.0-20220805151220-a84c278ed996
github.com/cosi-project/runtime v0.0.0-20220809130718-cd5f564066ad
github.com/dustin/go-humanize v1.0.0
github.com/evanphx/json-patch v5.6.0+incompatible
github.com/ghodss/yaml v1.0.0
@ -17,6 +17,7 @@ require (
github.com/mdlayher/ethtool v0.0.0-20220213132912-856bd6cb8a38
github.com/opencontainers/runtime-spec v1.0.3-0.20200929063507-e6143ca7d51d
github.com/siderolabs/go-pointer v1.0.0
github.com/siderolabs/protoenc v0.1.2
github.com/stretchr/testify v1.8.0
github.com/talos-systems/crypto v0.3.6-0.20220622130438-e9df1b8ca74c
github.com/talos-systems/go-blockdevice v0.3.4
@ -44,7 +45,6 @@ require (
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/ryanuber/go-glob v1.0.0 // indirect
github.com/siderolabs/protoenc v0.1.1 // indirect
go4.org/intern v0.0.0-20211027215823-ae77deb06f29 // indirect
go4.org/unsafe/assume-no-moving-gc v0.0.0-20220617031537-928513b29760 // indirect
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd // indirect

View File

@ -22,8 +22,8 @@ github.com/containerd/go-cni v1.1.7 h1:1yKpVCQAXI21BJIy8q7Nyk4CWpIgUno6ib7JIDca7
github.com/containerd/go-cni v1.1.7/go.mod h1:Ve4Q0RB2Bw78D90OL0YVyDjqdTL7FKh9W+UPbhWiZXA=
github.com/containernetworking/cni v1.1.1 h1:ky20T7c0MvKvbMOwS/FrlbNwjEoqJEUUYfsL4b0mc4k=
github.com/containernetworking/cni v1.1.1/go.mod h1:sDpYKmGVENF3s6uvMvGgldDWeG8dMxakj/u+i9ht9vw=
github.com/cosi-project/runtime v0.0.0-20220805151220-a84c278ed996 h1:BOsRGAu+jbVij3O52ZJgpDq5sp0iaIyTULncLCPJZ6w=
github.com/cosi-project/runtime v0.0.0-20220805151220-a84c278ed996/go.mod h1:mFcyeoASjvksjw2YoinkYHRPh1AVFrAoDdvCZ0r/u78=
github.com/cosi-project/runtime v0.0.0-20220809130718-cd5f564066ad h1:eoikVJYpgF497xuHVVWLy78Yw+JejMCApDqETsqS+4E=
github.com/cosi-project/runtime v0.0.0-20220809130718-cd5f564066ad/go.mod h1:USHV71cmUcp4K4X+cBq+ySACihAEZw+xFIfkB3p3X80=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
@ -131,8 +131,8 @@ github.com/ryanuber/go-glob v1.0.0 h1:iQh3xXAumdQ+4Ufa5b25cRpC5TYKlno6hsv6Cb3pkB
github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc=
github.com/siderolabs/go-pointer v1.0.0 h1:6TshPKep2doDQJAAtHUuHWXbca8ZfyRySjSBT/4GsMU=
github.com/siderolabs/go-pointer v1.0.0/go.mod h1:HTRFUNYa3R+k0FFKNv11zgkaCLzEkWVzoYZ433P3kHc=
github.com/siderolabs/protoenc v0.1.1 h1:hsa92KZR8wTOXvlCS1UhqdLNn6AOyyQKUB9y9Pa5mkw=
github.com/siderolabs/protoenc v0.1.1/go.mod h1:mu4gc6pJxhdJYpuloacKE4jsJojj87qDXwn8LUvs2bY=
github.com/siderolabs/protoenc v0.1.2 h1:u7tkBcOwByr763I95YY+km9nOFhoIBzHX9XijntDXk8=
github.com/siderolabs/protoenc v0.1.2/go.mod h1:mu4gc6pJxhdJYpuloacKE4jsJojj87qDXwn8LUvs2bY=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0 h1:M2gUjqZET1qApGOWNSnZ49BAIMX4F/1plDv3+l31EJ4=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=

View File

@ -5,7 +5,15 @@
package proto
import (
"encoding/json"
"net/url"
"sync"
"github.com/opencontainers/runtime-spec/specs-go"
"github.com/siderolabs/protoenc"
"github.com/talos-systems/crypto/x509"
"google.golang.org/protobuf/proto" //nolint:depguard
"inet.af/netaddr"
)
// Message is the main interface for protobuf API v2 messages.
@ -45,3 +53,93 @@ func Unmarshal(b []byte, m Message) error {
return proto.Unmarshal(b, m)
}
var once sync.Once
// RegisterDefaultTypes registers the pair of encoders/decoders for common types.
func RegisterDefaultTypes() {
once.Do(func() {
protoenc.RegisterEncoderDecoder(
func(v netaddr.IPPrefix) ([]byte, error) { return v.MarshalText() },
func(slc []byte) (netaddr.IPPrefix, error) {
var result netaddr.IPPrefix
err := result.UnmarshalText(slc)
if err != nil {
return netaddr.IPPrefix{}, err
}
return result, nil
},
)
protoenc.RegisterEncoderDecoder(
func(v netaddr.IPPort) ([]byte, error) { return v.MarshalText() },
func(slc []byte) (netaddr.IPPort, error) {
var result netaddr.IPPort
err := result.UnmarshalText(slc)
if err != nil {
return netaddr.IPPort{}, err
}
return result, nil
},
)
protoenc.RegisterEncoderDecoder(
// TODO(DmitriyMV): use generated proto representation of this
// TODO(DmitriyMV): use ptr version
func(v x509.PEMEncodedCertificateAndKey) ([]byte, error) {
return json.Marshal(v)
},
func(slc []byte) (x509.PEMEncodedCertificateAndKey, error) {
result := x509.PEMEncodedCertificateAndKey{}
err := json.Unmarshal(slc, &result)
if err != nil {
return x509.PEMEncodedCertificateAndKey{}, err
}
return result, nil
},
)
protoenc.RegisterEncoderDecoder(
// TODO(DmitriyMV): use ptr version
func(v url.URL) ([]byte, error) { return []byte(v.String()), nil },
func(slc []byte) (url.URL, error) {
parse, err := url.Parse(string(slc))
if err != nil {
return url.URL{}, err
}
return *parse, nil
},
)
protoenc.RegisterEncoderDecoder(
func(v specs.Mount) ([]byte, error) {
return protoenc.Marshal(Mount(v))
},
func(slc []byte) (specs.Mount, error) {
var result Mount
err := protoenc.Unmarshal(slc, &result)
if err != nil {
return specs.Mount{}, err
}
return specs.Mount(result), nil
},
)
})
}
// Mount specifies a mount for a container.
type Mount struct {
Destination string `protobuf:"1"`
Type string `protobuf:"2"`
Source string `protobuf:"3"`
Options []string `protobuf:"4"`
}

View File

@ -7,10 +7,12 @@ package cluster
import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/resource/meta"
"github.com/cosi-project/runtime/pkg/resource/protobuf"
"github.com/cosi-project/runtime/pkg/resource/typed"
"inet.af/netaddr"
"github.com/talos-systems/talos/pkg/machinery/config/types/v1alpha1/machine"
"github.com/talos-systems/talos/pkg/machinery/proto"
)
//go:generate deep-copy -type AffiliateSpec -type ConfigSpec -type IdentitySpec -type MemberSpec -header-file ../../../../hack/boilerplate.txt -o deep_copy.generated.go .
@ -24,11 +26,13 @@ const AffiliateType = resource.Type("Affiliates.cluster.talos.dev")
type Affiliate = typed.Resource[AffiliateSpec, AffiliateRD]
// KubeSpanAffiliateSpec describes additional information specific for the KubeSpan.
//
//gotagsrewrite:gen
type KubeSpanAffiliateSpec struct {
PublicKey string `yaml:"publicKey"`
Address netaddr.IP `yaml:"address"`
AdditionalAddresses []netaddr.IPPrefix `yaml:"additionalAddresses"`
Endpoints []netaddr.IPPort `yaml:"endpoints"`
PublicKey string `yaml:"publicKey" protobuf:"1"`
Address netaddr.IP `yaml:"address" protobuf:"2"`
AdditionalAddresses []netaddr.IPPrefix `yaml:"additionalAddresses" protobuf:"3"`
Endpoints []netaddr.IPPort `yaml:"endpoints" protobuf:"4"`
}
// NewAffiliate initializes the Affiliate resource.
@ -150,3 +154,12 @@ func (spec *AffiliateSpec) Merge(other *AffiliateSpec) {
}
}
}
func init() {
proto.RegisterDefaultTypes()
err := protobuf.RegisterDynamic[AffiliateSpec](AffiliateType, &Affiliate{})
if err != nil {
panic(err)
}
}

View File

@ -7,8 +7,10 @@ package cluster
import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/resource/meta"
"github.com/cosi-project/runtime/pkg/resource/protobuf"
"github.com/cosi-project/runtime/pkg/resource/typed"
"github.com/talos-systems/talos/pkg/machinery/proto"
"github.com/talos-systems/talos/pkg/machinery/resources/config"
)
@ -55,3 +57,12 @@ func (c ConfigRD) ResourceDefinition(resource.Metadata, ConfigSpec) meta.Resourc
Sensitivity: meta.Sensitive,
}
}
func init() {
proto.RegisterDefaultTypes()
err := protobuf.RegisterDynamic[ConfigSpec](ConfigType, &Config{})
if err != nil {
panic(err)
}
}

View File

@ -7,7 +7,10 @@ package cluster
import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/resource/meta"
"github.com/cosi-project/runtime/pkg/resource/protobuf"
"github.com/cosi-project/runtime/pkg/resource/typed"
"github.com/talos-systems/talos/pkg/machinery/proto"
)
// IdentityType is type of Identity resource.
@ -56,3 +59,12 @@ func (c IdentityRD) ResourceDefinition(resource.Metadata, IdentitySpec) meta.Res
},
}
}
func init() {
proto.RegisterDefaultTypes()
err := protobuf.RegisterDynamic[IdentitySpec](IdentityType, &Identity{})
if err != nil {
panic(err)
}
}

View File

@ -7,10 +7,12 @@ package cluster
import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/resource/meta"
"github.com/cosi-project/runtime/pkg/resource/protobuf"
"github.com/cosi-project/runtime/pkg/resource/typed"
"inet.af/netaddr"
"github.com/talos-systems/talos/pkg/machinery/config/types/v1alpha1/machine"
"github.com/talos-systems/talos/pkg/machinery/proto"
)
// MemberType is type of Member resource.
@ -69,3 +71,12 @@ func (MemberRD) ResourceDefinition(resource.Metadata, MemberSpec) meta.ResourceD
},
}
}
func init() {
proto.RegisterDefaultTypes()
err := protobuf.RegisterDynamic[MemberSpec](MemberType, &Member{})
if err != nil {
panic(err)
}
}

View File

@ -7,7 +7,10 @@ package cri
import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/resource/meta"
"github.com/cosi-project/runtime/pkg/resource/protobuf"
"github.com/cosi-project/runtime/pkg/resource/typed"
"github.com/talos-systems/talos/pkg/machinery/proto"
)
//nolint:lll
@ -47,3 +50,12 @@ func (SeccompProfileRD) ResourceDefinition(resource.Metadata, SeccompProfileSpec
PrintColumns: []meta.PrintColumn{},
}
}
func init() {
proto.RegisterDefaultTypes()
err := protobuf.RegisterDynamic[SeccompProfileSpec](SeccompProfileType, &SeccompProfile{})
if err != nil {
panic(err)
}
}

View File

@ -7,7 +7,10 @@ package etcd
import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/resource/meta"
"github.com/cosi-project/runtime/pkg/resource/protobuf"
"github.com/cosi-project/runtime/pkg/resource/typed"
"github.com/talos-systems/talos/pkg/machinery/proto"
)
// ConfigType is type of Config resource.
@ -54,3 +57,12 @@ func (ConfigRD) ResourceDefinition(resource.Metadata, ConfigSpec) meta.ResourceD
},
}
}
func init() {
proto.RegisterDefaultTypes()
err := protobuf.RegisterDynamic[ConfigSpec](ConfigType, &Config{})
if err != nil {
panic(err)
}
}

View File

@ -7,7 +7,10 @@ package etcd
import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/resource/meta"
"github.com/cosi-project/runtime/pkg/resource/protobuf"
"github.com/cosi-project/runtime/pkg/resource/typed"
"github.com/talos-systems/talos/pkg/machinery/proto"
)
// PKIStatusType is type of PKIStatus resource.
@ -56,3 +59,12 @@ func (PKIStatusRD) ResourceDefinition(resource.Metadata, PKIStatusSpec) meta.Res
},
}
}
func init() {
proto.RegisterDefaultTypes()
err := protobuf.RegisterDynamic[PKIStatusSpec](PKIStatusType, &PKIStatus{})
if err != nil {
panic(err)
}
}

View File

@ -9,7 +9,10 @@ import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/resource/meta"
"github.com/cosi-project/runtime/pkg/resource/protobuf"
"github.com/cosi-project/runtime/pkg/resource/typed"
"github.com/talos-systems/talos/pkg/machinery/proto"
)
// SpecType is type of Spec resource.
@ -61,3 +64,12 @@ func (SpecRD) ResourceDefinition(resource.Metadata, SpecSpec) meta.ResourceDefin
},
}
}
func init() {
proto.RegisterDefaultTypes()
err := protobuf.RegisterDynamic[SpecSpec](SpecType, &Spec{})
if err != nil {
panic(err)
}
}

View File

@ -9,7 +9,10 @@ import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/resource/meta"
"github.com/cosi-project/runtime/pkg/resource/protobuf"
"github.com/cosi-project/runtime/pkg/resource/typed"
"github.com/talos-systems/talos/pkg/machinery/proto"
)
//go:generate deep-copy -type EtcFileSpecSpec -type EtcFileStatusSpec -header-file ../../../../hack/boilerplate.txt -o deep_copy.generated.go .
@ -48,3 +51,12 @@ func (EtcFileSpecMD) ResourceDefinition(resource.Metadata, EtcFileSpecSpec) meta
PrintColumns: []meta.PrintColumn{},
}
}
func init() {
proto.RegisterDefaultTypes()
err := protobuf.RegisterDynamic[EtcFileSpecSpec](EtcFileSpecType, &EtcFileSpec{})
if err != nil {
panic(err)
}
}

View File

@ -7,7 +7,10 @@ package files
import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/resource/meta"
"github.com/cosi-project/runtime/pkg/resource/protobuf"
"github.com/cosi-project/runtime/pkg/resource/typed"
"github.com/talos-systems/talos/pkg/machinery/proto"
)
// EtcFileStatusType is type of EtcFile resource.
@ -43,3 +46,12 @@ func (EtcFileStatusMD) ResourceDefinition(resource.Metadata, EtcFileStatusSpec)
PrintColumns: []meta.PrintColumn{},
}
}
func init() {
proto.RegisterDefaultTypes()
err := protobuf.RegisterDynamic[EtcFileStatusSpec](EtcFileStatusType, &EtcFileStatus{})
if err != nil {
panic(err)
}
}

View File

@ -7,7 +7,10 @@ package hardware
import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/resource/meta"
"github.com/cosi-project/runtime/pkg/resource/protobuf"
"github.com/cosi-project/runtime/pkg/resource/typed"
"github.com/talos-systems/talos/pkg/machinery/proto"
)
// MemoryModuleType is type of MemoryModule resource.
@ -66,3 +69,12 @@ func (c MemoryModuleRD) ResourceDefinition(resource.Metadata, MemoryModuleSpec)
},
}
}
func init() {
proto.RegisterDefaultTypes()
err := protobuf.RegisterDynamic[MemoryModuleSpec](MemoryModuleType, &MemoryModule{})
if err != nil {
panic(err)
}
}

View File

@ -7,7 +7,10 @@ package hardware
import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/resource/meta"
"github.com/cosi-project/runtime/pkg/resource/protobuf"
"github.com/cosi-project/runtime/pkg/resource/typed"
"github.com/talos-systems/talos/pkg/machinery/proto"
)
// ProcessorType is type of Processor resource.
@ -76,3 +79,12 @@ func (c ProcessorRD) ResourceDefinition(resource.Metadata, ProcessorSpec) meta.R
},
}
}
func init() {
proto.RegisterDefaultTypes()
err := protobuf.RegisterDynamic[ProcessorSpec](ProcessorType, &Processor{})
if err != nil {
panic(err)
}
}

View File

@ -7,7 +7,10 @@ package hardware
import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/resource/meta"
"github.com/cosi-project/runtime/pkg/resource/protobuf"
"github.com/cosi-project/runtime/pkg/resource/typed"
"github.com/talos-systems/talos/pkg/machinery/proto"
)
// SystemInformationType is type of SystemInformation resource.
@ -85,3 +88,12 @@ func (c SystemInformationRD) ResourceDefinition(resource.Metadata, SystemInforma
},
}
}
func init() {
proto.RegisterDefaultTypes()
err := protobuf.RegisterDynamic[SystemInformationSpec](SystemInformationType, &SystemInformation{})
if err != nil {
panic(err)
}
}

View File

@ -10,7 +10,10 @@ package k8s
import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/resource/meta"
"github.com/cosi-project/runtime/pkg/resource/protobuf"
"github.com/cosi-project/runtime/pkg/resource/typed"
"github.com/talos-systems/talos/pkg/machinery/proto"
)
//nolint:lll
@ -55,3 +58,12 @@ func (AdmissionControlConfigRD) ResourceDefinition(_ resource.Metadata, _ Admiss
DefaultNamespace: ControlPlaneNamespaceName,
}
}
func init() {
proto.RegisterDefaultTypes()
err := protobuf.RegisterDynamic[AdmissionControlConfigSpec](AdmissionControlConfigType, &AdmissionControlConfig{})
if err != nil {
panic(err)
}
}

View File

@ -10,7 +10,10 @@ package k8s
import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/resource/meta"
"github.com/cosi-project/runtime/pkg/resource/protobuf"
"github.com/cosi-project/runtime/pkg/resource/typed"
"github.com/talos-systems/talos/pkg/machinery/proto"
)
// APIServerConfigType is type of APIServerConfig resource.
@ -66,3 +69,12 @@ func (APIServerConfigRD) ResourceDefinition(_ resource.Metadata, _ APIServerConf
DefaultNamespace: ControlPlaneNamespaceName,
}
}
func init() {
proto.RegisterDefaultTypes()
err := protobuf.RegisterDynamic[APIServerConfigSpec](APIServerConfigType, &APIServerConfig{})
if err != nil {
panic(err)
}
}

View File

@ -10,7 +10,10 @@ package k8s
import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/resource/meta"
"github.com/cosi-project/runtime/pkg/resource/protobuf"
"github.com/cosi-project/runtime/pkg/resource/typed"
"github.com/talos-systems/talos/pkg/machinery/proto"
)
// ConfigStatusType is type of ConfigStatus resource.
@ -59,3 +62,12 @@ func (ConfigStatusRD) ResourceDefinition(resource.Metadata, ConfigStatusSpec) me
},
}
}
func init() {
proto.RegisterDefaultTypes()
err := protobuf.RegisterDynamic[ConfigStatusSpec](ConfigStatusType, &ConfigStatus{})
if err != nil {
panic(err)
}
}

View File

@ -10,7 +10,10 @@ package k8s
import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/resource/meta"
"github.com/cosi-project/runtime/pkg/resource/protobuf"
"github.com/cosi-project/runtime/pkg/resource/typed"
"github.com/talos-systems/talos/pkg/machinery/proto"
)
// ControllerManagerConfigType is type of ControllerManagerConfig resource.
@ -53,3 +56,12 @@ func (ControllerManagerConfigRD) ResourceDefinition(_ resource.Metadata, _ Contr
DefaultNamespace: ControlPlaneNamespaceName,
}
}
func init() {
proto.RegisterDefaultTypes()
err := protobuf.RegisterDynamic[ControllerManagerConfigSpec](ControllerManagerConfigType, &ControllerManagerConfig{})
if err != nil {
panic(err)
}
}

View File

@ -9,10 +9,12 @@ import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/resource/meta"
"github.com/cosi-project/runtime/pkg/resource/protobuf"
"github.com/cosi-project/runtime/pkg/resource/typed"
"inet.af/netaddr"
"github.com/talos-systems/talos/pkg/machinery/generic/slices"
"github.com/talos-systems/talos/pkg/machinery/proto"
)
// EndpointType is type of Endpoint resource.
@ -84,3 +86,12 @@ func (l EndpointList) Merge(endpoint *Endpoint) EndpointList {
func (l EndpointList) Strings() []string {
return slices.Map(l, netaddr.IP.String)
}
func init() {
proto.RegisterDefaultTypes()
err := protobuf.RegisterDynamic[EndpointSpec](EndpointType, &Endpoint{})
if err != nil {
panic(err)
}
}

View File

@ -10,7 +10,10 @@ package k8s
import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/resource/meta"
"github.com/cosi-project/runtime/pkg/resource/protobuf"
"github.com/cosi-project/runtime/pkg/resource/typed"
"github.com/talos-systems/talos/pkg/machinery/proto"
)
// ExtraManifestsConfigType is type of ExtraManifestsConfig resource.
@ -55,3 +58,12 @@ func (ExtraManifestsConfigRD) ResourceDefinition(_ resource.Metadata, _ ExtraMan
DefaultNamespace: ControlPlaneNamespaceName,
}
}
func init() {
proto.RegisterDefaultTypes()
err := protobuf.RegisterDynamic[ExtraManifestsConfigSpec](ExtraManifestsConfigType, &ExtraManifestsConfig{})
if err != nil {
panic(err)
}
}

View File

@ -7,8 +7,11 @@ package k8s
import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/resource/meta"
"github.com/cosi-project/runtime/pkg/resource/protobuf"
"github.com/cosi-project/runtime/pkg/resource/typed"
"github.com/opencontainers/runtime-spec/specs-go"
"github.com/talos-systems/talos/pkg/machinery/proto"
)
// KubeletConfigType is type of KubeletConfig resource.
@ -54,3 +57,12 @@ func (KubeletConfigRD) ResourceDefinition(resource.Metadata, KubeletConfigSpec)
DefaultNamespace: NamespaceName,
}
}
func init() {
proto.RegisterDefaultTypes()
err := protobuf.RegisterDynamic[KubeletConfigSpec](KubeletConfigType, &KubeletConfig{})
if err != nil {
panic(err)
}
}

View File

@ -7,7 +7,10 @@ package k8s
import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/resource/meta"
"github.com/cosi-project/runtime/pkg/resource/protobuf"
"github.com/cosi-project/runtime/pkg/resource/typed"
"github.com/talos-systems/talos/pkg/machinery/proto"
)
// KubeletLifecycleType is type of KubeletLifecycle resource.
@ -47,3 +50,12 @@ func (KubeletLifecycleRD) ResourceDefinition(resource.Metadata, KubeletLifecycle
DefaultNamespace: NamespaceName,
}
}
func init() {
proto.RegisterDefaultTypes()
err := protobuf.RegisterDynamic[KubeletLifecycleSpec](KubeletLifecycleType, &KubeletLifecycle{})
if err != nil {
panic(err)
}
}

View File

@ -7,8 +7,11 @@ package k8s
import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/resource/meta"
"github.com/cosi-project/runtime/pkg/resource/protobuf"
"github.com/cosi-project/runtime/pkg/resource/typed"
"github.com/opencontainers/runtime-spec/specs-go"
"github.com/talos-systems/talos/pkg/machinery/proto"
)
// KubeletSpecType is type of KubeletSpec resource.
@ -47,3 +50,12 @@ func (KubeletSpecRD) ResourceDefinition(resource.Metadata, KubeletSpecSpec) meta
DefaultNamespace: NamespaceName,
}
}
func init() {
proto.RegisterDefaultTypes()
err := protobuf.RegisterDynamic[KubeletSpecSpec](KubeletSpecType, &KubeletSpec{})
if err != nil {
panic(err)
}
}

View File

@ -7,7 +7,10 @@ package k8s
import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/resource/meta"
"github.com/cosi-project/runtime/pkg/resource/protobuf"
"github.com/cosi-project/runtime/pkg/resource/typed"
"github.com/talos-systems/talos/pkg/machinery/proto"
)
// ManifestType is type of Manifest resource.
@ -47,3 +50,12 @@ func (ManifestRD) ResourceDefinition(resource.Metadata, ManifestSpec) meta.Resou
DefaultNamespace: ControlPlaneNamespaceName,
}
}
func init() {
proto.RegisterDefaultTypes()
err := protobuf.RegisterDynamic[ManifestSpec](ManifestType, &Manifest{})
if err != nil {
panic(err)
}
}

View File

@ -7,7 +7,10 @@ package k8s
import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/resource/meta"
"github.com/cosi-project/runtime/pkg/resource/protobuf"
"github.com/cosi-project/runtime/pkg/resource/typed"
"github.com/talos-systems/talos/pkg/machinery/proto"
)
// ManifestStatusType is type of ManifestStatus resource.
@ -45,3 +48,12 @@ func (ManifestStatusRD) ResourceDefinition(resource.Metadata, ManifestStatusSpec
DefaultNamespace: ControlPlaneNamespaceName,
}
}
func init() {
proto.RegisterDefaultTypes()
err := protobuf.RegisterDynamic[ManifestStatusSpec](ManifestStatusType, &ManifestStatus{})
if err != nil {
panic(err)
}
}

View File

@ -10,7 +10,10 @@ package k8s
import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/resource/meta"
"github.com/cosi-project/runtime/pkg/resource/protobuf"
"github.com/cosi-project/runtime/pkg/resource/typed"
"github.com/talos-systems/talos/pkg/machinery/proto"
)
// BootstrapManifestsConfigType is type of BootstrapManifestsConfig resource.
@ -67,3 +70,12 @@ func (BootstrapManifestsConfigRD) ResourceDefinition(_ resource.Metadata, _ Boot
DefaultNamespace: ControlPlaneNamespaceName,
}
}
func init() {
proto.RegisterDefaultTypes()
err := protobuf.RegisterDynamic[BootstrapManifestsConfigSpec](BootstrapManifestsConfigType, &BootstrapManifestsConfig{})
if err != nil {
panic(err)
}
}

View File

@ -7,8 +7,11 @@ package k8s
import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/resource/meta"
"github.com/cosi-project/runtime/pkg/resource/protobuf"
"github.com/cosi-project/runtime/pkg/resource/typed"
"inet.af/netaddr"
"github.com/talos-systems/talos/pkg/machinery/proto"
)
// NodeIPType is type of NodeIP resource.
@ -43,3 +46,12 @@ func (NodeIPRD) ResourceDefinition(resource.Metadata, NodeIPSpec) meta.ResourceD
DefaultNamespace: NamespaceName,
}
}
func init() {
proto.RegisterDefaultTypes()
err := protobuf.RegisterDynamic[NodeIPSpec](NodeIPType, &NodeIP{})
if err != nil {
panic(err)
}
}

View File

@ -7,7 +7,10 @@ package k8s
import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/resource/meta"
"github.com/cosi-project/runtime/pkg/resource/protobuf"
"github.com/cosi-project/runtime/pkg/resource/typed"
"github.com/talos-systems/talos/pkg/machinery/proto"
)
// NodeIPConfigType is type of NodeIPConfig resource.
@ -43,3 +46,12 @@ func (NodeIPConfigRD) ResourceDefinition(resource.Metadata, NodeIPConfigSpec) me
DefaultNamespace: NamespaceName,
}
}
func init() {
proto.RegisterDefaultTypes()
err := protobuf.RegisterDynamic[NodeIPConfigSpec](NodeIPConfigType, &NodeIPConfig{})
if err != nil {
panic(err)
}
}

View File

@ -7,7 +7,10 @@ package k8s
import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/resource/meta"
"github.com/cosi-project/runtime/pkg/resource/protobuf"
"github.com/cosi-project/runtime/pkg/resource/typed"
"github.com/talos-systems/talos/pkg/machinery/proto"
)
// NodenameType is type of Nodename resource.
@ -52,3 +55,12 @@ func (NodenameRD) ResourceDefinition(resource.Metadata, NodenameSpec) meta.Resou
},
}
}
func init() {
proto.RegisterDefaultTypes()
err := protobuf.RegisterDynamic[NodenameSpec](NodenameType, &Nodename{})
if err != nil {
panic(err)
}
}

View File

@ -10,7 +10,10 @@ package k8s
import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/resource/meta"
"github.com/cosi-project/runtime/pkg/resource/protobuf"
"github.com/cosi-project/runtime/pkg/resource/typed"
"github.com/talos-systems/talos/pkg/machinery/proto"
)
// SchedulerConfigType is type of SchedulerConfig resource.
@ -50,3 +53,12 @@ func (SchedulerConfigRD) ResourceDefinition(_ resource.Metadata, _ SchedulerConf
DefaultNamespace: ControlPlaneNamespaceName,
}
}
func init() {
proto.RegisterDefaultTypes()
err := protobuf.RegisterDynamic[SchedulerConfigSpec](SchedulerConfigType, &SchedulerConfig{})
if err != nil {
panic(err)
}
}

View File

@ -10,7 +10,10 @@ package k8s
import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/resource/meta"
"github.com/cosi-project/runtime/pkg/resource/protobuf"
"github.com/cosi-project/runtime/pkg/resource/typed"
"github.com/talos-systems/talos/pkg/machinery/proto"
)
// SecretsStatusType is type of SecretsStatus resource.
@ -59,3 +62,12 @@ func (SecretsStatusRD) ResourceDefinition(resource.Metadata, SecretsStatusSpec)
},
}
}
func init() {
proto.RegisterDefaultTypes()
err := protobuf.RegisterDynamic[SecretsStatusSpec](SecretsStatusType, &SecretsStatus{})
if err != nil {
panic(err)
}
}

View File

@ -7,7 +7,10 @@ package k8s
import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/resource/meta"
"github.com/cosi-project/runtime/pkg/resource/protobuf"
"github.com/cosi-project/runtime/pkg/resource/typed"
"github.com/talos-systems/talos/pkg/machinery/proto"
)
// StaticPodType is type of StaticPod resource.
@ -47,3 +50,12 @@ func (StaticPodRD) ResourceDefinition(resource.Metadata, StaticPodSpec) meta.Res
DefaultNamespace: NamespaceName,
}
}
func init() {
proto.RegisterDefaultTypes()
err := protobuf.RegisterDynamic[StaticPodSpec](StaticPodType, &StaticPod{})
if err != nil {
panic(err)
}
}

View File

@ -7,7 +7,10 @@ package k8s
import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/resource/meta"
"github.com/cosi-project/runtime/pkg/resource/protobuf"
"github.com/cosi-project/runtime/pkg/resource/typed"
"github.com/talos-systems/talos/pkg/machinery/proto"
)
// StaticPodStatusType is type of StaticPodStatus resource.
@ -53,3 +56,12 @@ func (StaticPodStatusRD) ResourceDefinition(resource.Metadata, StaticPodStatusSp
},
}
}
func init() {
proto.RegisterDefaultTypes()
err := protobuf.RegisterDynamic[StaticPodStatusSpec](StaticPodStatusType, &StaticPodStatus{})
if err != nil {
panic(err)
}
}

View File

@ -7,8 +7,10 @@ package kubeaccess
import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/resource/meta"
"github.com/cosi-project/runtime/pkg/resource/protobuf"
"github.com/cosi-project/runtime/pkg/resource/typed"
"github.com/talos-systems/talos/pkg/machinery/proto"
"github.com/talos-systems/talos/pkg/machinery/resources/config"
)
@ -68,3 +70,12 @@ func (c ConfigRD) ResourceDefinition(resource.Metadata, ConfigSpec) meta.Resourc
Sensitivity: meta.NonSensitive,
}
}
func init() {
proto.RegisterDefaultTypes()
err := protobuf.RegisterDynamic[ConfigSpec](ConfigType, &Config{})
if err != nil {
panic(err)
}
}

View File

@ -7,8 +7,10 @@ package kubespan
import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/resource/meta"
"github.com/cosi-project/runtime/pkg/resource/protobuf"
"github.com/cosi-project/runtime/pkg/resource/typed"
"github.com/talos-systems/talos/pkg/machinery/proto"
"github.com/talos-systems/talos/pkg/machinery/resources/config"
)
@ -58,3 +60,12 @@ func (ConfigRD) ResourceDefinition(resource.Metadata, ConfigSpec) meta.ResourceD
Sensitivity: meta.Sensitive,
}
}
func init() {
proto.RegisterDefaultTypes()
err := protobuf.RegisterDynamic[ConfigSpec](ConfigType, &Config{})
if err != nil {
panic(err)
}
}

View File

@ -7,8 +7,11 @@ package kubespan
import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/resource/meta"
"github.com/cosi-project/runtime/pkg/resource/protobuf"
"github.com/cosi-project/runtime/pkg/resource/typed"
"inet.af/netaddr"
"github.com/talos-systems/talos/pkg/machinery/proto"
)
// EndpointType is type of Endpoint resource.
@ -56,3 +59,12 @@ func (EndpointRD) ResourceDefinition(resource.Metadata, EndpointSpec) meta.Resou
},
}
}
func init() {
proto.RegisterDefaultTypes()
err := protobuf.RegisterDynamic[EndpointSpec](EndpointType, &Endpoint{})
if err != nil {
panic(err)
}
}

View File

@ -7,8 +7,11 @@ package kubespan
import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/resource/meta"
"github.com/cosi-project/runtime/pkg/resource/protobuf"
"github.com/cosi-project/runtime/pkg/resource/typed"
"inet.af/netaddr"
"github.com/talos-systems/talos/pkg/machinery/proto"
)
// IdentityType is type of Identity resource.
@ -65,3 +68,12 @@ func (IdentityRD) ResourceDefinition(resource.Metadata, IdentitySpec) meta.Resou
Sensitivity: meta.Sensitive,
}
}
func init() {
proto.RegisterDefaultTypes()
err := protobuf.RegisterDynamic[IdentitySpec](IdentityType, &Identity{})
if err != nil {
panic(err)
}
}

View File

@ -7,8 +7,11 @@ package kubespan
import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/resource/meta"
"github.com/cosi-project/runtime/pkg/resource/protobuf"
"github.com/cosi-project/runtime/pkg/resource/typed"
"inet.af/netaddr"
"github.com/talos-systems/talos/pkg/machinery/proto"
)
// PeerSpecType is type of PeerSpec resource.
@ -58,3 +61,12 @@ func (PeerSpecRD) ResourceDefinition(resource.Metadata, PeerSpecSpec) meta.Resou
},
}
}
func init() {
proto.RegisterDefaultTypes()
err := protobuf.RegisterDynamic[PeerSpecSpec](PeerSpecType, &PeerSpec{})
if err != nil {
panic(err)
}
}

View File

@ -9,8 +9,11 @@ import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/resource/meta"
"github.com/cosi-project/runtime/pkg/resource/protobuf"
"github.com/cosi-project/runtime/pkg/resource/typed"
"inet.af/netaddr"
"github.com/talos-systems/talos/pkg/machinery/proto"
)
// PeerStatusType is type of PeerStatus resource.
@ -82,3 +85,12 @@ func (PeerStatusRD) ResourceDefinition(resource.Metadata, PeerStatusSpec) meta.R
},
}
}
func init() {
proto.RegisterDefaultTypes()
err := protobuf.RegisterDynamic[PeerStatusSpec](PeerStatusType, &PeerStatus{})
if err != nil {
panic(err)
}
}

View File

@ -7,10 +7,12 @@ package network
import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/resource/meta"
"github.com/cosi-project/runtime/pkg/resource/protobuf"
"github.com/cosi-project/runtime/pkg/resource/typed"
"inet.af/netaddr"
"github.com/talos-systems/talos/pkg/machinery/nethelpers"
"github.com/talos-systems/talos/pkg/machinery/proto"
)
//nolint:lll
@ -55,3 +57,12 @@ func (AddressSpecRD) ResourceDefinition(resource.Metadata, AddressSpecSpec) meta
PrintColumns: []meta.PrintColumn{},
}
}
func init() {
proto.RegisterDefaultTypes()
err := protobuf.RegisterDynamic[AddressSpecSpec](AddressSpecType, &AddressSpec{})
if err != nil {
panic(err)
}
}

View File

@ -7,10 +7,12 @@ package network
import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/resource/meta"
"github.com/cosi-project/runtime/pkg/resource/protobuf"
"github.com/cosi-project/runtime/pkg/resource/typed"
"inet.af/netaddr"
"github.com/talos-systems/talos/pkg/machinery/nethelpers"
"github.com/talos-systems/talos/pkg/machinery/proto"
)
// AddressStatusType is type of AddressStatus resource.
@ -64,3 +66,12 @@ func (AddressStatusRD) ResourceDefinition(resource.Metadata, AddressStatusSpec)
},
}
}
func init() {
proto.RegisterDefaultTypes()
err := protobuf.RegisterDynamic[AddressStatusSpec](AddressStatusType, &AddressStatus{})
if err != nil {
panic(err)
}
}

View File

@ -55,3 +55,5 @@ func (DeviceConfigSpecRD) ResourceDefinition(resource.Metadata, DeviceConfigSpec
Sensitivity: meta.Sensitive,
}
}
// TODO(DmitriyMV): decide how to register DeviceConfigSpecSpec

View File

@ -7,9 +7,11 @@ package network
import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/resource/meta"
"github.com/cosi-project/runtime/pkg/resource/protobuf"
"github.com/cosi-project/runtime/pkg/resource/typed"
"github.com/talos-systems/talos/pkg/machinery/nethelpers"
"github.com/talos-systems/talos/pkg/machinery/proto"
)
// HardwareAddrType is type of HardwareAddr resource.
@ -52,3 +54,12 @@ func (HardwareAddrRD) ResourceDefinition(resource.Metadata, HardwareAddrSpec) me
PrintColumns: []meta.PrintColumn{},
}
}
func init() {
proto.RegisterDefaultTypes()
err := protobuf.RegisterDynamic[HardwareAddrSpec](HardwareAddrType, &HardwareAddr{})
if err != nil {
panic(err)
}
}

View File

@ -10,7 +10,10 @@ import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/resource/meta"
"github.com/cosi-project/runtime/pkg/resource/protobuf"
"github.com/cosi-project/runtime/pkg/resource/typed"
"github.com/talos-systems/talos/pkg/machinery/proto"
)
// HostnameSpecType is type of HostnameSpec resource.
@ -88,3 +91,12 @@ func (HostnameSpecRD) ResourceDefinition(resource.Metadata, HostnameSpecSpec) me
PrintColumns: []meta.PrintColumn{},
}
}
func init() {
proto.RegisterDefaultTypes()
err := protobuf.RegisterDynamic[HostnameSpecSpec](HostnameSpecType, &HostnameSpec{})
if err != nil {
panic(err)
}
}

View File

@ -7,7 +7,10 @@ package network
import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/resource/meta"
"github.com/cosi-project/runtime/pkg/resource/protobuf"
"github.com/cosi-project/runtime/pkg/resource/typed"
"github.com/talos-systems/talos/pkg/machinery/proto"
)
// HostnameStatusType is type of HostnameStatus resource.
@ -73,3 +76,12 @@ func (HostnameStatusRD) ResourceDefinition(resource.Metadata, HostnameStatusSpec
},
}
}
func init() {
proto.RegisterDefaultTypes()
err := protobuf.RegisterDynamic[HostnameStatusSpec](HostnameStatusType, &HostnameStatus{})
if err != nil {
panic(err)
}
}

View File

@ -55,33 +55,41 @@ type BondMasterSpec struct {
}
// BridgeMasterSpec describes bridge settings if Kind == "bridge".
//
//gotagsrewrite:gen
type BridgeMasterSpec struct {
STP STPSpec `yaml:"stp,omitempty"`
STP STPSpec `yaml:"stp,omitempty" protobuf:"1"`
}
// STPSpec describes Spanning Tree Protocol (STP) settings of a bridge.
//
//gotagsrewrite:gen
type STPSpec struct {
Enabled bool `yaml:"enabled"`
Enabled bool `yaml:"enabled" protobuf:"1"`
}
// WireguardSpec describes Wireguard settings if Kind == "wireguard".
//
//gotagsrewrite:gen
type WireguardSpec struct {
// PrivateKey is used to configure the link, present only in the LinkSpec.
PrivateKey string `yaml:"privateKey,omitempty"`
PrivateKey string `yaml:"privateKey,omitempty" protobuf:"1"`
// PublicKey is only used in LinkStatus to show the link status.
PublicKey string `yaml:"publicKey,omitempty"`
ListenPort int `yaml:"listenPort"`
FirewallMark int `yaml:"firewallMark"`
Peers []WireguardPeer `yaml:"peers"`
PublicKey string `yaml:"publicKey,omitempty" protobuf:"2"`
ListenPort int `yaml:"listenPort" protobuf:"3"`
FirewallMark int `yaml:"firewallMark" protobuf:"4"`
Peers []WireguardPeer `yaml:"peers" protobuf:"5"`
}
// WireguardPeer describes a single peer.
//
//gotagsrewrite:gen
type WireguardPeer struct {
PublicKey string `yaml:"publicKey"`
PresharedKey string `yaml:"presharedKey"`
Endpoint string `yaml:"endpoint"`
PersistentKeepaliveInterval time.Duration `yaml:"persistentKeepaliveInterval"`
AllowedIPs []netaddr.IPPrefix `yaml:"allowedIPs"`
PublicKey string `yaml:"publicKey" protobuf:"1"`
PresharedKey string `yaml:"presharedKey" protobuf:"2"`
Endpoint string `yaml:"endpoint" protobuf:"3"`
PersistentKeepaliveInterval time.Duration `yaml:"persistentKeepaliveInterval" protobuf:"4"`
AllowedIPs []netaddr.IPPrefix `yaml:"allowedIPs" protobuf:"5"`
}
// ID Returns the VID for type VLANSpec.

View File

@ -7,7 +7,10 @@ package network
import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/resource/meta"
"github.com/cosi-project/runtime/pkg/resource/protobuf"
"github.com/cosi-project/runtime/pkg/resource/typed"
"github.com/talos-systems/talos/pkg/machinery/proto"
)
// LinkRefreshType is type of LinkRefresh resource.
@ -54,3 +57,12 @@ func (LinkRefreshRD) ResourceDefinition(resource.Metadata, LinkRefreshSpec) meta
PrintColumns: []meta.PrintColumn{},
}
}
func init() {
proto.RegisterDefaultTypes()
err := protobuf.RegisterDynamic[LinkRefreshSpec](LinkRefreshType, &LinkRefresh{})
if err != nil {
panic(err)
}
}

View File

@ -7,9 +7,11 @@ package network
import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/resource/meta"
"github.com/cosi-project/runtime/pkg/resource/protobuf"
"github.com/cosi-project/runtime/pkg/resource/typed"
"github.com/talos-systems/talos/pkg/machinery/nethelpers"
"github.com/talos-systems/talos/pkg/machinery/proto"
)
// LinkSpecType is type of LinkSpec resource.
@ -138,3 +140,12 @@ func (LinkSpecRD) ResourceDefinition(resource.Metadata, LinkSpecSpec) meta.Resou
Sensitivity: meta.Sensitive,
}
}
func init() {
proto.RegisterDefaultTypes()
err := protobuf.RegisterDynamic[LinkSpecSpec](LinkSpecType, &LinkSpec{})
if err != nil {
panic(err)
}
}

View File

@ -9,10 +9,12 @@ import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/resource/meta"
"github.com/cosi-project/runtime/pkg/resource/protobuf"
"github.com/cosi-project/runtime/pkg/resource/typed"
"inet.af/netaddr"
"github.com/talos-systems/talos/pkg/machinery/generic/slices"
"github.com/talos-systems/talos/pkg/machinery/proto"
)
// NodeAddressType is type of NodeAddress resource.
@ -79,3 +81,12 @@ func (spec *NodeAddressSpec) IPs() []netaddr.IP {
func FilteredNodeAddressID(kind resource.ID, filterID string) resource.ID {
return fmt.Sprintf("%s-%s", kind, filterID)
}
func init() {
proto.RegisterDefaultTypes()
err := protobuf.RegisterDynamic[NodeAddressSpec](NodeAddressType, &NodeAddress{})
if err != nil {
panic(err)
}
}

View File

@ -7,8 +7,11 @@ package network
import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/resource/meta"
"github.com/cosi-project/runtime/pkg/resource/protobuf"
"github.com/cosi-project/runtime/pkg/resource/typed"
"inet.af/netaddr"
"github.com/talos-systems/talos/pkg/machinery/proto"
)
// NodeAddressFilterType is type of NodeAddressFilter resource.
@ -56,3 +59,12 @@ func (NodeAddressFilterRD) ResourceDefinition(resource.Metadata, NodeAddressFilt
},
}
}
func init() {
proto.RegisterDefaultTypes()
err := protobuf.RegisterDynamic[NodeAddressFilterSpec](NodeAddressFilterType, &NodeAddressFilter{})
if err != nil {
panic(err)
}
}

View File

@ -7,8 +7,11 @@ package network
import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/resource/meta"
"github.com/cosi-project/runtime/pkg/resource/protobuf"
"github.com/cosi-project/runtime/pkg/resource/typed"
"inet.af/netaddr"
"github.com/talos-systems/talos/pkg/machinery/proto"
)
// OperatorSpecType is type of OperatorSpec resource.
@ -97,3 +100,12 @@ func (OperatorSpecRD) ResourceDefinition(resource.Metadata, OperatorSpecSpec) me
Sensitivity: meta.Sensitive,
}
}
func init() {
proto.RegisterDefaultTypes()
err := protobuf.RegisterDynamic[OperatorSpecSpec](OperatorSpecType, &OperatorSpec{})
if err != nil {
panic(err)
}
}

View File

@ -7,8 +7,11 @@ package network
import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/resource/meta"
"github.com/cosi-project/runtime/pkg/resource/protobuf"
"github.com/cosi-project/runtime/pkg/resource/typed"
"inet.af/netaddr"
"github.com/talos-systems/talos/pkg/machinery/proto"
)
// ResolverSpecType is type of ResolverSpec resource.
@ -48,3 +51,12 @@ func (ResolverSpecRD) ResourceDefinition(resource.Metadata, ResolverSpecSpec) me
PrintColumns: []meta.PrintColumn{},
}
}
func init() {
proto.RegisterDefaultTypes()
err := protobuf.RegisterDynamic[ResolverSpecSpec](ResolverSpecType, &ResolverSpec{})
if err != nil {
panic(err)
}
}

View File

@ -7,8 +7,11 @@ package network
import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/resource/meta"
"github.com/cosi-project/runtime/pkg/resource/protobuf"
"github.com/cosi-project/runtime/pkg/resource/typed"
"inet.af/netaddr"
"github.com/talos-systems/talos/pkg/machinery/proto"
)
// ResolverStatusType is type of ResolverStatus resource.
@ -49,3 +52,12 @@ func (ResolverStatusRD) ResourceDefinition(resource.Metadata, ResolverStatusSpec
},
}
}
func init() {
proto.RegisterDefaultTypes()
err := protobuf.RegisterDynamic[ResolverStatusSpec](ResolverStatusType, &ResolverStatus{})
if err != nil {
panic(err)
}
}

View File

@ -7,10 +7,12 @@ package network
import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/resource/meta"
"github.com/cosi-project/runtime/pkg/resource/protobuf"
"github.com/cosi-project/runtime/pkg/resource/typed"
"inet.af/netaddr"
"github.com/talos-systems/talos/pkg/machinery/nethelpers"
"github.com/talos-systems/talos/pkg/machinery/proto"
)
// RouteSpecType is type of RouteSpec resource.
@ -87,3 +89,12 @@ func (RouteSpecRD) ResourceDefinition(resource.Metadata, RouteSpecSpec) meta.Res
PrintColumns: []meta.PrintColumn{},
}
}
func init() {
proto.RegisterDefaultTypes()
err := protobuf.RegisterDynamic[RouteSpecSpec](RouteSpecType, &RouteSpec{})
if err != nil {
panic(err)
}
}

View File

@ -7,10 +7,12 @@ package network
import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/resource/meta"
"github.com/cosi-project/runtime/pkg/resource/protobuf"
"github.com/cosi-project/runtime/pkg/resource/typed"
"inet.af/netaddr"
"github.com/talos-systems/talos/pkg/machinery/nethelpers"
"github.com/talos-systems/talos/pkg/machinery/proto"
)
// RouteStatusType is type of RouteStatus resource.
@ -74,3 +76,12 @@ func (RouteStatusRD) ResourceDefinition(resource.Metadata, RouteStatusSpec) meta
},
}
}
func init() {
proto.RegisterDefaultTypes()
err := protobuf.RegisterDynamic[RouteStatusSpec](RouteStatusType, &RouteStatus{})
if err != nil {
panic(err)
}
}

View File

@ -7,7 +7,10 @@ package network
import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/resource/meta"
"github.com/cosi-project/runtime/pkg/resource/protobuf"
"github.com/cosi-project/runtime/pkg/resource/typed"
"github.com/talos-systems/talos/pkg/machinery/proto"
)
// StatusType is type of Status resource.
@ -49,3 +52,12 @@ func (StatusRD) ResourceDefinition(resource.Metadata, StatusSpec) meta.ResourceD
PrintColumns: []meta.PrintColumn{},
}
}
func init() {
proto.RegisterDefaultTypes()
err := protobuf.RegisterDynamic[StatusSpec](StatusType, &Status{})
if err != nil {
panic(err)
}
}

View File

@ -7,7 +7,10 @@ package network
import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/resource/meta"
"github.com/cosi-project/runtime/pkg/resource/protobuf"
"github.com/cosi-project/runtime/pkg/resource/typed"
"github.com/talos-systems/talos/pkg/machinery/proto"
)
// TimeServerSpecType is type of TimeServerSpec resource.
@ -47,3 +50,12 @@ func (TimeServerSpecRD) ResourceDefinition(resource.Metadata, TimeServerSpecSpec
PrintColumns: []meta.PrintColumn{},
}
}
func init() {
proto.RegisterDefaultTypes()
err := protobuf.RegisterDynamic[TimeServerSpecSpec](TimeServerSpecType, &TimeServerSpec{})
if err != nil {
panic(err)
}
}

View File

@ -7,7 +7,10 @@ package network
import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/resource/meta"
"github.com/cosi-project/runtime/pkg/resource/protobuf"
"github.com/cosi-project/runtime/pkg/resource/typed"
"github.com/talos-systems/talos/pkg/machinery/proto"
)
// TimeServerStatusType is type of TimeServerStatus resource.
@ -48,3 +51,12 @@ func (TimeServerStatusRD) ResourceDefinition(resource.Metadata, TimeServerStatus
},
}
}
func init() {
proto.RegisterDefaultTypes()
err := protobuf.RegisterDynamic[TimeServerStatusSpec](TimeServerStatusType, &TimeServerStatus{})
if err != nil {
panic(err)
}
}

View File

@ -7,7 +7,10 @@ package perf
import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/resource/meta"
"github.com/cosi-project/runtime/pkg/resource/protobuf"
"github.com/cosi-project/runtime/pkg/resource/typed"
"github.com/talos-systems/talos/pkg/machinery/proto"
)
//nolint:lll
@ -81,3 +84,12 @@ func (CPURD) ResourceDefinition(resource.Metadata, CPUSpec) meta.ResourceDefinit
},
}
}
func init() {
proto.RegisterDefaultTypes()
err := protobuf.RegisterDynamic[CPUSpec](CPUType, &CPU{})
if err != nil {
panic(err)
}
}

View File

@ -7,7 +7,10 @@ package perf
import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/resource/meta"
"github.com/cosi-project/runtime/pkg/resource/protobuf"
"github.com/cosi-project/runtime/pkg/resource/typed"
"github.com/talos-systems/talos/pkg/machinery/proto"
)
// MemoryType is type of Etcd resource.
@ -102,3 +105,12 @@ func (MemoryRD) ResourceDefinition(resource.Metadata, MemorySpec) meta.ResourceD
},
}
}
func init() {
proto.RegisterDefaultTypes()
err := protobuf.RegisterDynamic[MemorySpec](MemoryType, &Memory{})
if err != nil {
panic(err)
}
}

View File

@ -7,9 +7,11 @@ package runtime
import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/resource/meta"
"github.com/cosi-project/runtime/pkg/resource/protobuf"
"github.com/cosi-project/runtime/pkg/resource/typed"
"github.com/talos-systems/talos/pkg/machinery/extensions"
"github.com/talos-systems/talos/pkg/machinery/proto"
)
// ExtensionStatusType is type of Extension resource.
@ -50,3 +52,12 @@ func (ExtensionStatusRD) ResourceDefinition(resource.Metadata, ExtensionStatusSp
},
}
}
func init() {
proto.RegisterDefaultTypes()
err := protobuf.RegisterDynamic[ExtensionStatusSpec](ExtensionStatusType, &ExtensionStatus{})
if err != nil {
panic(err)
}
}

View File

@ -7,7 +7,10 @@ package runtime
import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/resource/meta"
"github.com/cosi-project/runtime/pkg/resource/protobuf"
"github.com/cosi-project/runtime/pkg/resource/typed"
"github.com/talos-systems/talos/pkg/machinery/proto"
)
// KernelModuleSpecType is type of KernelModuleSpec resource.
@ -43,3 +46,12 @@ func (KernelModuleSpecRD) ResourceDefinition(resource.Metadata, KernelModuleSpec
DefaultNamespace: NamespaceName,
}
}
func init() {
proto.RegisterDefaultTypes()
err := protobuf.RegisterDynamic[KernelModuleSpecSpec](KernelModuleSpecType, &KernelModuleSpec{})
if err != nil {
panic(err)
}
}

View File

@ -7,8 +7,10 @@ package runtime
import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/resource/meta"
"github.com/cosi-project/runtime/pkg/resource/protobuf"
"github.com/cosi-project/runtime/pkg/resource/typed"
"github.com/talos-systems/talos/pkg/machinery/proto"
"github.com/talos-systems/talos/pkg/machinery/resources/v1alpha1"
)
@ -84,3 +86,17 @@ func (KernelParamDefaultSpecRD) ResourceDefinition(resource.Metadata, KernelPara
PrintColumns: []meta.PrintColumn{},
}
}
func init() {
proto.RegisterDefaultTypes()
err := protobuf.RegisterDynamic[KernelParamSpecSpec](KernelParamSpecType, &KernelParamSpec{})
if err != nil {
panic(err)
}
err = protobuf.RegisterDynamic[KernelParamDefaultSpecSpec](KernelParamDefaultSpecType, &KernelParamDefaultSpec{})
if err != nil {
panic(err)
}
}

View File

@ -7,7 +7,10 @@ package runtime
import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/resource/meta"
"github.com/cosi-project/runtime/pkg/resource/protobuf"
"github.com/cosi-project/runtime/pkg/resource/typed"
"github.com/talos-systems/talos/pkg/machinery/proto"
)
// KernelParamStatusType is type of KernelParam resource.
@ -58,3 +61,12 @@ func (KernelParamStatusRD) ResourceDefinition(resource.Metadata, KernelParamStat
},
}
}
func init() {
proto.RegisterDefaultTypes()
err := protobuf.RegisterDynamic[KernelParamStatusSpec](KernelParamStatusType, &KernelParamStatus{})
if err != nil {
panic(err)
}
}

View File

@ -7,7 +7,10 @@ package runtime
import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/resource/meta"
"github.com/cosi-project/runtime/pkg/resource/protobuf"
"github.com/cosi-project/runtime/pkg/resource/typed"
"github.com/talos-systems/talos/pkg/machinery/proto"
)
// MachineStatusType is type of MachineStatus resource.
@ -72,3 +75,12 @@ func (MachineStatusRD) ResourceDefinition(resource.Metadata, MachineStatusSpec)
},
}
}
func init() {
proto.RegisterDefaultTypes()
err := protobuf.RegisterDynamic[MachineStatusSpec](MachineStatusType, &MachineStatus{})
if err != nil {
panic(err)
}
}

View File

@ -7,7 +7,10 @@ package runtime
import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/resource/meta"
"github.com/cosi-project/runtime/pkg/resource/protobuf"
"github.com/cosi-project/runtime/pkg/resource/typed"
"github.com/talos-systems/talos/pkg/machinery/proto"
)
// MountStatusType is type of Mount resource.
@ -59,3 +62,12 @@ func (MountStatusRD) ResourceDefinition(resource.Metadata, MountStatusSpec) meta
},
}
}
func init() {
proto.RegisterDefaultTypes()
err := protobuf.RegisterDynamic[MountStatusSpec](MountStatusType, &MountStatus{})
if err != nil {
panic(err)
}
}

View File

@ -11,7 +11,6 @@ import (
"github.com/cosi-project/runtime/pkg/resource/typed"
"github.com/talos-systems/crypto/x509"
secretspb "github.com/talos-systems/talos/pkg/machinery/api/resource/secrets"
"github.com/talos-systems/talos/pkg/machinery/proto"
)
@ -41,48 +40,6 @@ func NewAPI() *API {
)
}
// MarshalProto implements ProtoMarshaler.
func (spec APICertsSpec) MarshalProto() ([]byte, error) {
protoSpec := secretspb.APISpec{
CaPem: spec.CA.Crt,
Client: &secretspb.CertAndKeyPEM{
Cert: spec.Client.Crt,
Key: spec.Client.Key,
},
Server: &secretspb.CertAndKeyPEM{
Cert: spec.Server.Crt,
Key: spec.Server.Key,
},
}
return proto.Marshal(&protoSpec)
}
// UnmarshalProto implements protobuf.ResourceUnmarshaler.
func (spec *APICertsSpec) UnmarshalProto(protoBytes []byte) error {
protoSpec := secretspb.APISpec{}
if err := proto.Unmarshal(protoBytes, &protoSpec); err != nil {
return err
}
*spec = APICertsSpec{
CA: &x509.PEMEncodedCertificateAndKey{
Crt: protoSpec.CaPem,
},
Client: &x509.PEMEncodedCertificateAndKey{
Crt: protoSpec.Client.Cert,
Key: protoSpec.Client.Key,
},
Server: &x509.PEMEncodedCertificateAndKey{
Crt: protoSpec.Server.Cert,
Key: protoSpec.Server.Key,
},
}
return nil
}
// APIRD provides auxiliary methods for API.
type APIRD struct{}
@ -97,7 +54,9 @@ func (APIRD) ResourceDefinition(resource.Metadata, APICertsSpec) meta.ResourceDe
}
func init() {
if err := protobuf.RegisterResource(APIType, &API{}); err != nil {
proto.RegisterDefaultTypes()
if err := protobuf.RegisterDynamic[APICertsSpec](APIType, &API{}); err != nil {
panic(err)
}
}

View File

@ -10,10 +10,12 @@ import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/resource/meta"
"github.com/cosi-project/runtime/pkg/resource/protobuf"
"github.com/cosi-project/runtime/pkg/resource/typed"
"inet.af/netaddr"
"github.com/talos-systems/talos/pkg/machinery/generic/slices"
"github.com/talos-systems/talos/pkg/machinery/proto"
)
// CertSANType is type of CertSAN resource.
@ -133,3 +135,12 @@ func (spec *CertSANSpec) Sort() {
sort.Strings(spec.DNSNames)
sort.Slice(spec.IPs, func(i, j int) bool { return spec.IPs[i].Compare(spec.IPs[j]) < 0 })
}
func init() {
proto.RegisterDefaultTypes()
err := protobuf.RegisterDynamic[CertSANSpec](CertSANType, &CertSAN{})
if err != nil {
panic(err)
}
}

View File

@ -7,8 +7,11 @@ package secrets
import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/resource/meta"
"github.com/cosi-project/runtime/pkg/resource/protobuf"
"github.com/cosi-project/runtime/pkg/resource/typed"
"github.com/talos-systems/crypto/x509"
"github.com/talos-systems/talos/pkg/machinery/proto"
)
// EtcdType is type of Etcd resource.
@ -50,3 +53,12 @@ func (EtcdRD) ResourceDefinition(resource.Metadata, EtcdCertsSpec) meta.Resource
Sensitivity: meta.Sensitive,
}
}
func init() {
proto.RegisterDefaultTypes()
err := protobuf.RegisterDynamic[EtcdCertsSpec](EtcdType, &Etcd{})
if err != nil {
panic(err)
}
}

View File

@ -7,8 +7,11 @@ package secrets
import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/resource/meta"
"github.com/cosi-project/runtime/pkg/resource/protobuf"
"github.com/cosi-project/runtime/pkg/resource/typed"
"github.com/talos-systems/crypto/x509"
"github.com/talos-systems/talos/pkg/machinery/proto"
)
// EtcdRootType is type of EtcdRoot secret resource.
@ -47,3 +50,12 @@ func (EtcdRootRD) ResourceDefinition(resource.Metadata, EtcdRootSpec) meta.Resou
Sensitivity: meta.Sensitive,
}
}
func init() {
proto.RegisterDefaultTypes()
err := protobuf.RegisterDynamic[EtcdRootSpec](EtcdRootType, &EtcdRoot{})
if err != nil {
panic(err)
}
}

View File

@ -9,8 +9,11 @@ import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/resource/meta"
"github.com/cosi-project/runtime/pkg/resource/protobuf"
"github.com/cosi-project/runtime/pkg/resource/typed"
"github.com/talos-systems/crypto/x509"
"github.com/talos-systems/talos/pkg/machinery/proto"
)
// KubeletType is type of Kubelet secret resource.
@ -54,3 +57,12 @@ func (KubeletRD) ResourceDefinition(resource.Metadata, KubeletSpec) meta.Resourc
Sensitivity: meta.Sensitive,
}
}
func init() {
proto.RegisterDefaultTypes()
err := protobuf.RegisterDynamic[KubeletSpec](KubeletType, &Kubelet{})
if err != nil {
panic(err)
}
}

View File

@ -7,8 +7,11 @@ package secrets
import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/resource/meta"
"github.com/cosi-project/runtime/pkg/resource/protobuf"
"github.com/cosi-project/runtime/pkg/resource/typed"
"github.com/talos-systems/crypto/x509"
"github.com/talos-systems/talos/pkg/machinery/proto"
)
// KubernetesType is type of Kubernetes resource.
@ -56,3 +59,12 @@ func (KubernetesRD) ResourceDefinition(resource.Metadata, KubernetesCertsSpec) m
Sensitivity: meta.Sensitive,
}
}
func init() {
proto.RegisterDefaultTypes()
err := protobuf.RegisterDynamic[KubernetesCertsSpec](KubernetesType, &Kubernetes{})
if err != nil {
panic(err)
}
}

View File

@ -10,8 +10,11 @@ import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/resource/meta"
"github.com/cosi-project/runtime/pkg/resource/protobuf"
"github.com/cosi-project/runtime/pkg/resource/typed"
"github.com/talos-systems/crypto/x509"
"github.com/talos-systems/talos/pkg/machinery/proto"
)
// KubernetesRootType is type of KubernetesRoot secret resource.
@ -64,3 +67,12 @@ func (KubernetesRootRD) ResourceDefinition(resource.Metadata, KubernetesRootSpec
Sensitivity: meta.Sensitive,
}
}
func init() {
proto.RegisterDefaultTypes()
err := protobuf.RegisterDynamic[KubernetesRootSpec](KubernetesRootType, &KubernetesRoot{})
if err != nil {
panic(err)
}
}

View File

@ -12,7 +12,6 @@ import (
"github.com/talos-systems/crypto/x509"
"inet.af/netaddr"
secretspb "github.com/talos-systems/talos/pkg/machinery/api/resource/secrets"
"github.com/talos-systems/talos/pkg/machinery/proto"
)
@ -44,38 +43,6 @@ func NewOSRoot(id resource.ID) *OSRoot {
)
}
// MarshalProto implements ProtoMarshaler.
func (spec OSRootSpec) MarshalProto() ([]byte, error) {
protoSpec := secretspb.OsRootSpec{
Ca: &secretspb.CertAndKeyPEM{
Cert: spec.CA.Crt,
Key: spec.CA.Key,
},
Token: spec.Token,
}
return proto.Marshal(&protoSpec)
}
// UnmarshalProto implements protobuf.ResourceUnmarshaler.
func (spec *OSRootSpec) UnmarshalProto(protoBytes []byte) error {
protoSpec := secretspb.OsRootSpec{}
if err := proto.Unmarshal(protoBytes, &protoSpec); err != nil {
return err
}
*spec = OSRootSpec{
CA: &x509.PEMEncodedCertificateAndKey{
Crt: protoSpec.Ca.Cert,
Key: protoSpec.Ca.Key,
},
Token: protoSpec.Token,
}
return nil
}
// OSRootRD provides auxiliary methods for OSRoot.
type OSRootRD struct{}
@ -90,7 +57,9 @@ func (OSRootRD) ResourceDefinition(resource.Metadata, OSRootSpec) meta.ResourceD
}
func init() {
if err := protobuf.RegisterResource(OSRootType, &OSRoot{}); err != nil {
proto.RegisterDefaultTypes()
if err := protobuf.RegisterDynamic[OSRootSpec](OSRootType, &OSRoot{}); err != nil {
panic(err)
}
}

View File

@ -11,7 +11,6 @@ import (
"github.com/cosi-project/runtime/pkg/resource/typed"
"github.com/talos-systems/crypto/x509"
secretspb "github.com/talos-systems/talos/pkg/machinery/api/resource/secrets"
"github.com/talos-systems/talos/pkg/machinery/proto"
)
@ -40,40 +39,6 @@ func NewTrustd() *Trustd {
)
}
// MarshalProto implements ProtoMarshaler.
func (spec TrustdCertsSpec) MarshalProto() ([]byte, error) {
protoSpec := secretspb.TrustdSpec{
CaPem: spec.CA.Crt,
Server: &secretspb.CertAndKeyPEM{
Cert: spec.Server.Crt,
Key: spec.Server.Key,
},
}
return proto.Marshal(&protoSpec)
}
// UnmarshalProto implements protobuf.ResourceUnmarshaler.
func (spec *TrustdCertsSpec) UnmarshalProto(protoBytes []byte) error {
protoSpec := secretspb.TrustdSpec{}
if err := proto.Unmarshal(protoBytes, &protoSpec); err != nil {
return err
}
*spec = TrustdCertsSpec{
CA: &x509.PEMEncodedCertificateAndKey{
Crt: protoSpec.CaPem,
},
Server: &x509.PEMEncodedCertificateAndKey{
Crt: protoSpec.Server.Cert,
Key: protoSpec.Server.Key,
},
}
return nil
}
// TrustdRD provides auxiliary methods for Trustd.
type TrustdRD struct{}
@ -88,7 +53,9 @@ func (TrustdRD) ResourceDefinition(resource.Metadata, TrustdCertsSpec) meta.Reso
}
func init() {
if err := protobuf.RegisterResource(TrustdType, &Trustd{}); err != nil {
proto.RegisterDefaultTypes()
if err := protobuf.RegisterDynamic[TrustdCertsSpec](TrustdType, &Trustd{}); err != nil {
panic(err)
}
}

View File

@ -7,8 +7,10 @@ package time
import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/resource/meta"
"github.com/cosi-project/runtime/pkg/resource/protobuf"
"github.com/cosi-project/runtime/pkg/resource/typed"
"github.com/talos-systems/talos/pkg/machinery/proto"
"github.com/talos-systems/talos/pkg/machinery/resources/v1alpha1"
)
@ -63,3 +65,12 @@ func (r StatusRD) ResourceDefinition(resource.Metadata, StatusSpec) meta.Resourc
},
}
}
func init() {
proto.RegisterDefaultTypes()
err := protobuf.RegisterDynamic[StatusSpec](StatusType, &Status{})
if err != nil {
panic(err)
}
}

View File

@ -7,7 +7,10 @@ package v1alpha1
import (
"github.com/cosi-project/runtime/pkg/resource"
"github.com/cosi-project/runtime/pkg/resource/meta"
"github.com/cosi-project/runtime/pkg/resource/protobuf"
"github.com/cosi-project/runtime/pkg/resource/typed"
"github.com/talos-systems/talos/pkg/machinery/proto"
)
//nolint:lll
@ -61,3 +64,12 @@ func (ServiceRD) ResourceDefinition(resource.Metadata, ServiceSpec) meta.Resourc
},
}
}
func init() {
proto.RegisterDefaultTypes()
err := protobuf.RegisterDynamic[ServiceSpec](ServiceType, &Service{})
if err != nil {
panic(err)
}
}