Files
kata-containers/src/libs/protocols/protos/runtimeoptions.proto
Fabiano Fidêncio 34199b09eb runtime-rs: Properly parse containerd runtime options to extract ConfigPath
The runtime-rs shim was failing to load its configuration when deployed
via kata-deploy because it couldn't correctly parse the ConfigPath passed
by containerd. The previous implementation naively skipped the first 2
bytes of the options and interpreted the rest as a UTF-8 string, which
doesn't work since containerd passes a properly serialized protobuf
message of type runtimeoptions.v1.Options.

This change adds the runtimeoptions.proto definition to the protocols
crate and updates the load_config function to correctly deserialize the
protobuf message and extract the config_path field, matching how the Go
runtime handles this via typeurl.UnmarshalAny.

Signed-off-by: Fabiano Fidêncio <ffidencio@nvidia.com>
2026-02-10 18:12:17 +01:00

21 lines
722 B
Protocol Buffer

// Copyright (c) 2024 The containerd Authors
// SPDX-License-Identifier: Apache-2.0
//
// This proto definition is based on containerd's runtimeoptions/v1/api.proto
// https://github.com/containerd/containerd/blob/main/api/types/runtimeoptions/v1/api.proto
syntax = "proto3";
package runtimeoptions.v1;
message Options {
// TypeUrl specifies the type of the content inside the config file.
string type_url = 1;
// ConfigPath specifies the filesystem location of the config file
// used by the runtime.
string config_path = 2;
// Blob specifies an in-memory TOML blob passed from containerd's configuration section
// for this runtime. This will be used if config_path is not specified.
bytes config_body = 3;
}