mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-30 23:37:45 +00:00
Merge pull request #11632 from burgerdev/codegen
runtime: reproducible generation of Golang proto bindings
This commit is contained in:
commit
82f141a02e
33
.github/workflows/static-checks.yaml
vendored
33
.github/workflows/static-checks.yaml
vendored
@ -150,3 +150,36 @@ jobs:
|
||||
needs: skipper
|
||||
if: ${{ needs.skipper.outputs.skip_static != 'yes' }}
|
||||
uses: ./.github/workflows/govulncheck.yaml
|
||||
|
||||
codegen:
|
||||
runs-on: ubuntu-22.04
|
||||
needs: skipper
|
||||
if: ${{ needs.skipper.outputs.skip_static != 'yes' }}
|
||||
permissions:
|
||||
contents: read # for checkout
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
persist-credentials: false
|
||||
- name: generate
|
||||
run: make -C src/agent generate-protocols
|
||||
- name: check for diff
|
||||
run: |
|
||||
diff=$(git diff)
|
||||
if [[ -z "${diff}" ]]; then
|
||||
echo "No diff detected."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
cat << EOF >> "${GITHUB_STEP_SUMMARY}"
|
||||
Run \`make -C src/agent generate-protocols\` to update protobuf bindings.
|
||||
|
||||
\`\`\`diff
|
||||
${diff}
|
||||
\`\`\`
|
||||
EOF
|
||||
|
||||
echo "::error::Golang protobuf bindings need to be regenerated (see Github step summary for diff)."
|
||||
exit 1
|
||||
|
@ -217,4 +217,11 @@ codecov-html: check_tarpaulin
|
||||
|
||||
##TARGET generate-protocols: generate/update grpc agent protocols
|
||||
generate-protocols:
|
||||
image=$$(docker build -q \
|
||||
--build-arg GO_VERSION=$$(yq '.languages.golang.version' $(CURDIR)/../../versions.yaml) \
|
||||
--build-arg PROTOC_VERSION=$$(yq '.externals.protoc.version' $(CURDIR)/../../versions.yaml | grep -oE "[0-9.]+") \
|
||||
--build-arg PROTOC_GEN_GO_VERSION=$$(yq '.externals.protoc-gen-go.version' $(CURDIR)/../../versions.yaml) \
|
||||
--build-arg TTRPC_VERSION=$$(yq '.externals.ttrpc.version' $(CURDIR)/../../versions.yaml) \
|
||||
$(CURDIR)/../../tools/packaging/static-build/codegen) && \
|
||||
docker run --rm --workdir /kata/src/agent -v $(CURDIR)/../..:/kata --user $(shell id -u) $$image \
|
||||
../libs/protocols/hack/update-generated-proto.sh all
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -35,6 +35,8 @@ type AgentServiceService interface {
|
||||
GetIPTables(context.Context, *GetIPTablesRequest) (*GetIPTablesResponse, error)
|
||||
SetIPTables(context.Context, *SetIPTablesRequest) (*SetIPTablesResponse, error)
|
||||
GetMetrics(context.Context, *GetMetricsRequest) (*Metrics, error)
|
||||
MemAgentMemcgSet(context.Context, *MemAgentMemcgConfig) (*emptypb.Empty, error)
|
||||
MemAgentCompactSet(context.Context, *MemAgentCompactConfig) (*emptypb.Empty, error)
|
||||
CreateSandbox(context.Context, *CreateSandboxRequest) (*emptypb.Empty, error)
|
||||
DestroySandbox(context.Context, *DestroySandboxRequest) (*emptypb.Empty, error)
|
||||
OnlineCPUMem(context.Context, *OnlineCPUMemRequest) (*emptypb.Empty, error)
|
||||
@ -45,6 +47,7 @@ type AgentServiceService interface {
|
||||
CopyFile(context.Context, *CopyFileRequest) (*emptypb.Empty, error)
|
||||
GetOOMEvent(context.Context, *GetOOMEventRequest) (*OOMEvent, error)
|
||||
AddSwap(context.Context, *AddSwapRequest) (*emptypb.Empty, error)
|
||||
AddSwapPath(context.Context, *AddSwapPathRequest) (*emptypb.Empty, error)
|
||||
GetVolumeStats(context.Context, *VolumeStatsRequest) (*VolumeStatsResponse, error)
|
||||
ResizeVolume(context.Context, *ResizeVolumeRequest) (*emptypb.Empty, error)
|
||||
SetPolicy(context.Context, *SetPolicyRequest) (*emptypb.Empty, error)
|
||||
@ -228,6 +231,20 @@ func RegisterAgentServiceService(srv *ttrpc.Server, svc AgentServiceService) {
|
||||
}
|
||||
return svc.GetMetrics(ctx, &req)
|
||||
},
|
||||
"MemAgentMemcgSet": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
|
||||
var req MemAgentMemcgConfig
|
||||
if err := unmarshal(&req); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return svc.MemAgentMemcgSet(ctx, &req)
|
||||
},
|
||||
"MemAgentCompactSet": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
|
||||
var req MemAgentCompactConfig
|
||||
if err := unmarshal(&req); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return svc.MemAgentCompactSet(ctx, &req)
|
||||
},
|
||||
"CreateSandbox": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
|
||||
var req CreateSandboxRequest
|
||||
if err := unmarshal(&req); err != nil {
|
||||
@ -298,6 +315,13 @@ func RegisterAgentServiceService(srv *ttrpc.Server, svc AgentServiceService) {
|
||||
}
|
||||
return svc.AddSwap(ctx, &req)
|
||||
},
|
||||
"AddSwapPath": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
|
||||
var req AddSwapPathRequest
|
||||
if err := unmarshal(&req); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return svc.AddSwapPath(ctx, &req)
|
||||
},
|
||||
"GetVolumeStats": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
|
||||
var req VolumeStatsRequest
|
||||
if err := unmarshal(&req); err != nil {
|
||||
@ -533,6 +557,22 @@ func (c *agentserviceClient) GetMetrics(ctx context.Context, req *GetMetricsRequ
|
||||
return &resp, nil
|
||||
}
|
||||
|
||||
func (c *agentserviceClient) MemAgentMemcgSet(ctx context.Context, req *MemAgentMemcgConfig) (*emptypb.Empty, error) {
|
||||
var resp emptypb.Empty
|
||||
if err := c.client.Call(ctx, "grpc.AgentService", "MemAgentMemcgSet", req, &resp); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &resp, nil
|
||||
}
|
||||
|
||||
func (c *agentserviceClient) MemAgentCompactSet(ctx context.Context, req *MemAgentCompactConfig) (*emptypb.Empty, error) {
|
||||
var resp emptypb.Empty
|
||||
if err := c.client.Call(ctx, "grpc.AgentService", "MemAgentCompactSet", req, &resp); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &resp, nil
|
||||
}
|
||||
|
||||
func (c *agentserviceClient) CreateSandbox(ctx context.Context, req *CreateSandboxRequest) (*emptypb.Empty, error) {
|
||||
var resp emptypb.Empty
|
||||
if err := c.client.Call(ctx, "grpc.AgentService", "CreateSandbox", req, &resp); err != nil {
|
||||
@ -613,6 +653,14 @@ func (c *agentserviceClient) AddSwap(ctx context.Context, req *AddSwapRequest) (
|
||||
return &resp, nil
|
||||
}
|
||||
|
||||
func (c *agentserviceClient) AddSwapPath(ctx context.Context, req *AddSwapPathRequest) (*emptypb.Empty, error) {
|
||||
var resp emptypb.Empty
|
||||
if err := c.client.Call(ctx, "grpc.AgentService", "AddSwapPath", req, &resp); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &resp, nil
|
||||
}
|
||||
|
||||
func (c *agentserviceClient) GetVolumeStats(ctx context.Context, req *VolumeStatsRequest) (*VolumeStatsResponse, error) {
|
||||
var resp VolumeStatsResponse
|
||||
if err := c.client.Call(ctx, "grpc.AgentService", "GetVolumeStats", req, &resp); err != nil {
|
||||
|
@ -817,10 +817,14 @@ type Hook struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Path string `protobuf:"bytes,1,opt,name=Path,proto3" json:"Path,omitempty"`
|
||||
Args []string `protobuf:"bytes,2,rep,name=Args,proto3" json:"Args,omitempty"`
|
||||
Env []string `protobuf:"bytes,3,rep,name=Env,proto3" json:"Env,omitempty"`
|
||||
Timeout int64 `protobuf:"varint,4,opt,name=Timeout,proto3" json:"Timeout,omitempty"`
|
||||
// Path is the absolute path to the container's root filesystem.
|
||||
Path string `protobuf:"bytes,1,opt,name=Path,proto3" json:"Path,omitempty"`
|
||||
// Arguments used for the binary, including the binary name itself.
|
||||
Args []string `protobuf:"bytes,2,rep,name=Args,proto3" json:"Args,omitempty"`
|
||||
// Additional `key=value` environment variables.
|
||||
Env []string `protobuf:"bytes,3,rep,name=Env,proto3" json:"Env,omitempty"`
|
||||
// Timeout is the number of seconds before aborting the hook. If set, timeout MUST be greater than zero.
|
||||
Timeout int64 `protobuf:"varint,4,opt,name=Timeout,proto3" json:"Timeout,omitempty"`
|
||||
}
|
||||
|
||||
func (x *Hook) Reset() {
|
||||
|
@ -7,8 +7,8 @@
|
||||
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.32.0
|
||||
// protoc v5.29.3
|
||||
// protoc-gen-go v1.28.1
|
||||
// protoc v3.21.12
|
||||
// source: types.proto
|
||||
|
||||
package protocols
|
||||
@ -392,6 +392,13 @@ func (x *Route) GetFlags() uint32 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *Route) GetMtu() uint32 {
|
||||
if x != nil {
|
||||
return x.Mtu
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type ARPNeighbor struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
@ -481,7 +488,7 @@ var file_types_proto_rawDesc = []byte{
|
||||
0x6c, 0x79, 0x52, 0x06, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64,
|
||||
0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64,
|
||||
0x72, 0x65, 0x73, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x03, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x04, 0x6d, 0x61, 0x73, 0x6b, 0x22, 0xe0, 0x01, 0x0a, 0x09, 0x49, 0x6e, 0x74,
|
||||
0x28, 0x09, 0x52, 0x04, 0x6d, 0x61, 0x73, 0x6b, 0x22, 0xe6, 0x01, 0x0a, 0x09, 0x49, 0x6e, 0x74,
|
||||
0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x12, 0x12,
|
||||
0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61,
|
||||
@ -491,44 +498,46 @@ var file_types_proto_rawDesc = []byte{
|
||||
0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x74, 0x75, 0x18, 0x04, 0x20,
|
||||
0x01, 0x28, 0x04, 0x52, 0x03, 0x6d, 0x74, 0x75, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x77, 0x41, 0x64,
|
||||
0x64, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x68, 0x77, 0x41, 0x64, 0x64, 0x72,
|
||||
0x12, 0x18, 0x0a, 0x07, 0x70, 0x63, 0x69, 0x50, 0x61, 0x74, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x07, 0x70, 0x63, 0x69, 0x50, 0x61, 0x74, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79,
|
||||
0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1b,
|
||||
0x0a, 0x09, 0x72, 0x61, 0x77, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28,
|
||||
0x0d, 0x52, 0x08, 0x72, 0x61, 0x77, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x22, 0xba, 0x01, 0x0a, 0x05,
|
||||
0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x61, 0x74,
|
||||
0x65, 0x77, 0x61, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x61, 0x74, 0x65,
|
||||
0x77, 0x61, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x18, 0x03, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73,
|
||||
0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x75,
|
||||
0x72, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01,
|
||||
0x28, 0x0d, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x27, 0x0a, 0x06, 0x66, 0x61, 0x6d,
|
||||
0x69, 0x6c, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x74, 0x79, 0x70, 0x65,
|
||||
0x73, 0x2e, 0x49, 0x50, 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x52, 0x06, 0x66, 0x61, 0x6d, 0x69,
|
||||
0x6c, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28,
|
||||
0x0d, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x22, 0x9d, 0x01, 0x0a, 0x0b, 0x41, 0x52, 0x50,
|
||||
0x4e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72, 0x12, 0x32, 0x0a, 0x0b, 0x74, 0x6f, 0x49, 0x50,
|
||||
0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e,
|
||||
0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x49, 0x50, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52,
|
||||
0x0b, 0x74, 0x6f, 0x49, 0x50, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06,
|
||||
0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x65,
|
||||
0x76, 0x69, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x6c, 0x61, 0x64, 0x64, 0x72, 0x18, 0x03,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6c, 0x6c, 0x61, 0x64, 0x64, 0x72, 0x12, 0x14, 0x0a, 0x05,
|
||||
0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x74, 0x61,
|
||||
0x74, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x2a, 0x1a, 0x0a, 0x08, 0x49, 0x50, 0x46, 0x61,
|
||||
0x6d, 0x69, 0x6c, 0x79, 0x12, 0x06, 0x0a, 0x02, 0x76, 0x34, 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02,
|
||||
0x76, 0x36, 0x10, 0x01, 0x2a, 0x35, 0x0a, 0x13, 0x46, 0x53, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x43,
|
||||
0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x0a, 0x0a, 0x06, 0x41,
|
||||
0x6c, 0x77, 0x61, 0x79, 0x73, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x4f, 0x6e, 0x52, 0x6f, 0x6f,
|
||||
0x74, 0x4d, 0x69, 0x73, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x10, 0x01, 0x42, 0x5b, 0x5a, 0x59, 0x67,
|
||||
0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x61, 0x74, 0x61, 0x2d, 0x63,
|
||||
0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x73, 0x2f, 0x6b, 0x61, 0x74, 0x61, 0x2d, 0x63,
|
||||
0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x73, 0x2f, 0x73, 0x72, 0x63, 0x2f, 0x72, 0x75,
|
||||
0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x69, 0x72, 0x74, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69,
|
||||
0x6e, 0x65, 0x72, 0x73, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2f, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68, 0x18, 0x06,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68,
|
||||
0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
|
||||
0x74, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x61, 0x77, 0x5f, 0x66, 0x6c, 0x61, 0x67,
|
||||
0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x72, 0x61, 0x77, 0x46, 0x6c, 0x61, 0x67,
|
||||
0x73, 0x22, 0xcc, 0x01, 0x0a, 0x05, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64,
|
||||
0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x65, 0x73, 0x74, 0x12,
|
||||
0x18, 0x0a, 0x07, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x07, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x65, 0x76,
|
||||
0x69, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x65, 0x76, 0x69, 0x63,
|
||||
0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f,
|
||||
0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x12,
|
||||
0x27, 0x0a, 0x06, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32,
|
||||
0x0f, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x49, 0x50, 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x79,
|
||||
0x52, 0x06, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67,
|
||||
0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x10,
|
||||
0x0a, 0x03, 0x6d, 0x74, 0x75, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x6d, 0x74, 0x75,
|
||||
0x22, 0x9d, 0x01, 0x0a, 0x0b, 0x41, 0x52, 0x50, 0x4e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72,
|
||||
0x12, 0x32, 0x0a, 0x0b, 0x74, 0x6f, 0x49, 0x50, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x49, 0x50,
|
||||
0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x0b, 0x74, 0x6f, 0x49, 0x50, 0x41, 0x64, 0x64,
|
||||
0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x18, 0x02,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06,
|
||||
0x6c, 0x6c, 0x61, 0x64, 0x64, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6c, 0x6c,
|
||||
0x61, 0x64, 0x64, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6c,
|
||||
0x61, 0x67, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73,
|
||||
0x2a, 0x1a, 0x0a, 0x08, 0x49, 0x50, 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x12, 0x06, 0x0a, 0x02,
|
||||
0x76, 0x34, 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, 0x76, 0x36, 0x10, 0x01, 0x2a, 0x35, 0x0a, 0x13,
|
||||
0x46, 0x53, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x6f, 0x6c,
|
||||
0x69, 0x63, 0x79, 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x6c, 0x77, 0x61, 0x79, 0x73, 0x10, 0x00, 0x12,
|
||||
0x12, 0x0a, 0x0e, 0x4f, 0x6e, 0x52, 0x6f, 0x6f, 0x74, 0x4d, 0x69, 0x73, 0x6d, 0x61, 0x74, 0x63,
|
||||
0x68, 0x10, 0x01, 0x42, 0x5b, 0x5a, 0x59, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f,
|
||||
0x6d, 0x2f, 0x6b, 0x61, 0x74, 0x61, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72,
|
||||
0x73, 0x2f, 0x6b, 0x61, 0x74, 0x61, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72,
|
||||
0x73, 0x2f, 0x73, 0x72, 0x63, 0x2f, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x69,
|
||||
0x72, 0x74, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x73, 0x2f, 0x70, 0x6b, 0x67,
|
||||
0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73,
|
||||
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
@ -260,3 +260,15 @@ func (p *HybridVSockTTRPCMockImp) SetIPTables(ctx context.Context, req *pb.SetIP
|
||||
func (p *HybridVSockTTRPCMockImp) SetPolicy(ctx context.Context, req *pb.SetPolicyRequest) (*gpb.Empty, error) {
|
||||
return &gpb.Empty{}, nil
|
||||
}
|
||||
|
||||
func (p *HybridVSockTTRPCMockImp) AddSwapPath(ctx context.Context, req *pb.AddSwapPathRequest) (*gpb.Empty, error) {
|
||||
return emptyResp, nil
|
||||
}
|
||||
|
||||
func (p *HybridVSockTTRPCMockImp) MemAgentCompactSet(ctx context.Context, req *pb.MemAgentCompactConfig) (*gpb.Empty, error) {
|
||||
return emptyResp, nil
|
||||
}
|
||||
|
||||
func (p *HybridVSockTTRPCMockImp) MemAgentMemcgSet(ctx context.Context, req *pb.MemAgentMemcgConfig) (*gpb.Empty, error) {
|
||||
return emptyResp, nil
|
||||
}
|
||||
|
23
tools/packaging/static-build/codegen/Dockerfile
Normal file
23
tools/packaging/static-build/codegen/Dockerfile
Normal file
@ -0,0 +1,23 @@
|
||||
# Copyright (c) 2025 Edgeless Systems gmbH
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
ARG GO_VERSION=
|
||||
|
||||
FROM busybox:1.37.0 AS resources
|
||||
|
||||
WORKDIR /usr/local
|
||||
|
||||
ARG PROTOC_VERSION=
|
||||
RUN wget -O /tmp/protoc.zip https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip && \
|
||||
unzip /tmp/protoc.zip
|
||||
|
||||
FROM golang:${GO_VERSION}
|
||||
|
||||
COPY --from=resources /usr/local /usr
|
||||
|
||||
ARG PROTOC_GEN_GO_VERSION=
|
||||
RUN go install google.golang.org/protobuf/cmd/protoc-gen-go@${PROTOC_GEN_GO_VERSION}
|
||||
ARG TTRPC_VERSION=
|
||||
RUN go install github.com/containerd/ttrpc/cmd/protoc-gen-go-ttrpc@${TTRPC_VERSION}
|
||||
RUN go install github.com/containerd/ttrpc/cmd/protoc-gen-gogottrpc@${TTRPC_VERSION}
|
@ -374,6 +374,21 @@ externals:
|
||||
package: "ArmVirtPkg/ArmVirtQemu.dsc"
|
||||
package_output_dir: "ArmVirtQemu-AARCH64"
|
||||
|
||||
protoc:
|
||||
description: "Protobuf compiler"
|
||||
url: "https://github.com/protocolbuffers/protobuf/releases"
|
||||
version: "v21.12"
|
||||
|
||||
protoc-gen-go:
|
||||
description: "Protobuf Go compiler"
|
||||
url: "https://github.com/protocolbuffers/protobuf-go/releases"
|
||||
version: "v1.28.1"
|
||||
|
||||
ttrpc:
|
||||
description: "ttRPC libary and code generation utilities"
|
||||
url: "https://github.com/containerd/ttrpc/releases"
|
||||
version: "v1.2.7"
|
||||
|
||||
virtiofsd:
|
||||
description: "vhost-user virtio-fs device backend written in Rust"
|
||||
url: "https://gitlab.com/virtio-fs/virtiofsd"
|
||||
|
Loading…
Reference in New Issue
Block a user