api.proto 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668
  1. // To regenerate api.pb.go run hack/update-generated-runtime.sh
  2. syntax = 'proto2';
  3. package runtime;
  4. // Runtime service defines the public APIs for remote container runtimes
  5. service RuntimeService {
  6. // Version returns the runtime name, runtime version and runtime API version
  7. rpc Version(VersionRequest) returns (VersionResponse) {}
  8. // CreatePodSandbox creates a pod-level sandbox.
  9. // The definition of PodSandbox is at https://github.com/kubernetes/kubernetes/pull/25899
  10. rpc CreatePodSandbox(CreatePodSandboxRequest) returns (CreatePodSandboxResponse) {}
  11. // StopPodSandbox stops the running sandbox. If there are any running
  12. // containers in the sandbox, they should be forcibly terminated.
  13. rpc StopPodSandbox(StopPodSandboxRequest) returns (StopPodSandboxResponse) {}
  14. // RemovePodSandbox removes the sandbox. If there are any running containers in the
  15. // sandbox, they should be forcibly removed.
  16. // It should return success if the sandbox has already been removed.
  17. rpc RemovePodSandbox(RemovePodSandboxRequest) returns (RemovePodSandboxResponse) {}
  18. // PodSandboxStatus returns the status of the PodSandbox.
  19. rpc PodSandboxStatus(PodSandboxStatusRequest) returns (PodSandboxStatusResponse) {}
  20. // ListPodSandbox returns a list of SandBox.
  21. rpc ListPodSandbox(ListPodSandboxRequest) returns (ListPodSandboxResponse) {}
  22. // CreateContainer creates a new container in specified PodSandbox
  23. rpc CreateContainer(CreateContainerRequest) returns (CreateContainerResponse) {}
  24. // StartContainer starts the container.
  25. rpc StartContainer(StartContainerRequest) returns (StartContainerResponse) {}
  26. // StopContainer stops a running container with a grace period (i.e., timeout).
  27. rpc StopContainer(StopContainerRequest) returns (StopContainerResponse) {}
  28. // RemoveContainer removes the container. If the container is running, the
  29. // container should be forcibly removed.
  30. // It should return success if the container has already been removed.
  31. rpc RemoveContainer(RemoveContainerRequest) returns (RemoveContainerResponse) {}
  32. // ListContainers lists all containers by filters.
  33. rpc ListContainers(ListContainersRequest) returns (ListContainersResponse) {}
  34. // ContainerStatus returns status of the container.
  35. rpc ContainerStatus(ContainerStatusRequest) returns (ContainerStatusResponse) {}
  36. // Exec executes the command in the container.
  37. rpc Exec(stream ExecRequest) returns (stream ExecResponse) {}
  38. }
  39. // Image service defines the public APIs for managing images
  40. service ImageService {
  41. // ListImages lists existing images.
  42. rpc ListImages(ListImagesRequest) returns (ListImagesResponse) {}
  43. // ImageStatus returns the status of the image.
  44. rpc ImageStatus(ImageStatusRequest) returns (ImageStatusResponse) {}
  45. // PullImage pulls an image with authentication config.
  46. rpc PullImage(PullImageRequest) returns (PullImageResponse) {}
  47. // RemoveImage removes the image.
  48. // It should return success if the image has already been removed.
  49. rpc RemoveImage(RemoveImageRequest) returns (RemoveImageResponse) {}
  50. }
  51. message VersionRequest {
  52. // The version of kubelet runtime API.
  53. optional string version = 1;
  54. }
  55. message VersionResponse {
  56. // The version of the kubelet runtime API.
  57. optional string version = 1;
  58. // The name of the container runtime.
  59. optional string runtime_name = 2;
  60. // The version of the container runtime.
  61. optional string runtime_version = 3;
  62. // The API version of the container runtime.
  63. optional string runtime_api_version = 4;
  64. }
  65. // DNSOption specifies the DNS servers and search domains.
  66. message DNSOption {
  67. // List of DNS servers of the cluster.
  68. repeated string servers = 1;
  69. // List of DNS search domains of the cluster.
  70. repeated string searches = 2;
  71. }
  72. enum Protocol {
  73. TCP = 0;
  74. UDP = 1;
  75. }
  76. // PortMapping specifies the port mapping configurations of sandbox
  77. message PortMapping {
  78. // The name of the port mapping
  79. optional string name = 1;
  80. // The protocol of the port mapping.
  81. optional Protocol protocol = 2;
  82. // The port number within the container.
  83. optional int32 container_port = 3;
  84. // The port number on the host.
  85. optional int32 host_port = 4;
  86. // The host IP.
  87. optional string host_ip = 5;
  88. }
  89. // Mount specifies the volume mount for the sandbox
  90. message Mount {
  91. // The name of the volume mount.
  92. optional string name = 1;
  93. // The path of the mount within the container.
  94. optional string container_path = 2;
  95. // The path of the mount on the host.
  96. optional string host_path = 3;
  97. // If set, the mount is read-only.
  98. optional bool readonly = 4;
  99. // If set, the mount needs SELinux relabeling
  100. optional bool selinux_relabel = 5;
  101. }
  102. // NamespaceOption provides options for Linux namespaces.
  103. message NamespaceOption {
  104. // If set, use the host's network namespace.
  105. optional bool host_network = 1;
  106. // If set, use the host's pid namesapce.
  107. optional bool host_pid = 2;
  108. // If set, use the host's ipc namespace.
  109. optional bool host_ipc = 3;
  110. }
  111. // LinuxPodSandboxConfig holds platform-specific configuraions for Linux
  112. // host platforms and Linux-based containers.
  113. message LinuxPodSandboxConfig {
  114. // The parent cgroup of the pod sandbox.
  115. // The cgroupfs style syntax will be used, but the container runtime can
  116. // convert it to systemd semantices if needed.
  117. optional string cgroup_parent = 1;
  118. // The configurations for the sandbox's namespaces.
  119. // This will be used only if the PodSandbox uses namespace for isolation.
  120. optional NamespaceOption namespace_options = 2;
  121. }
  122. // PodSandboxMetadata holds all necessary information for building the sandbox name.
  123. // The container runtime is encouraged to expose the metadata associated with the
  124. // PodSandbox in its user interface for better user experience. E.g., runtime can
  125. // construct a unique PodSandboxName based on the metadata.
  126. message PodSandboxMetadata {
  127. // The pod name of the sandbox. Same as the pod name in the PodSpec.
  128. optional string name = 1;
  129. // The pod uid of the sandbox. Same as the pod UID in the PodSpec.
  130. optional string uid = 2;
  131. // The pod namespace of the sandbox. Same as the pod namespace in the PodSpec.
  132. optional string namespace = 3;
  133. // The attempt number of creating the sandbox.
  134. optional uint32 attempt = 4;
  135. }
  136. // PodSandboxConfig holds all the required and optional fields for creating a
  137. // sandbox.
  138. message PodSandboxConfig {
  139. // The metadata of the sandbox. This information will uniquely identify
  140. // the sandbox, and the runtime should leverage this to ensure correct
  141. // operation. The runtime may also use this information to improve UX, such
  142. // as by constructing a readable name.
  143. optional PodSandboxMetadata metadata = 1;
  144. // The hostname of the sandbox.
  145. optional string hostname = 2;
  146. // Path to the directory on the host in which container log files are
  147. // stored.
  148. // By default the log of a container going into the LogDirectory will be
  149. // hooked up to STDOUT and STDERR. However, the LogDirectory may contain
  150. // binary log files with structured logging data from the individual
  151. // containers. For example, the files might be newline separated JSON
  152. // structured logs, systemd-journald journal files, gRPC trace files, etc.
  153. // E.g.,
  154. // PodSandboxConfig.LogDirectory = `/var/log/pods/<podUID>/`
  155. // ContainerConfig.LogPath = `containerName_Instance#.log`
  156. //
  157. // WARNING: Log management and how kubelet should interface with the
  158. // container logs are under active discussion in
  159. // https://issues.k8s.io/24677. There *may* be future change of direction
  160. // for logging as the discussion carries on.
  161. optional string log_directory = 3;
  162. // The DNS options for the sandbox.
  163. optional DNSOption dns_options = 4;
  164. // The port mappings for the sandbox.
  165. repeated PortMapping port_mappings = 5;
  166. // Labels are key value pairs that may be used to scope and select individual resources.
  167. map<string, string> labels = 6;
  168. // Annotations is an unstructured key value map that may be set by external
  169. // tools to store and retrieve arbitrary metadata.
  170. map<string, string> annotations = 7;
  171. // Optional configurations specific to Linux hosts.
  172. optional LinuxPodSandboxConfig linux = 8;
  173. }
  174. message CreatePodSandboxRequest {
  175. // The configuration for creating a PodSandBox.
  176. optional PodSandboxConfig config = 1;
  177. }
  178. message CreatePodSandboxResponse {
  179. // The id of the PodSandBox
  180. optional string pod_sandbox_id = 1;
  181. }
  182. message StopPodSandboxRequest {
  183. // The id of the PodSandBox
  184. optional string pod_sandbox_id = 1;
  185. }
  186. message StopPodSandboxResponse {}
  187. message RemovePodSandboxRequest {
  188. // The id of the PodSandBox
  189. optional string pod_sandbox_id = 1;
  190. }
  191. message RemovePodSandboxResponse {}
  192. message PodSandboxStatusRequest {
  193. // The id of the PodSandBox
  194. optional string pod_sandbox_id = 1;
  195. }
  196. // PodSandboxNetworkStatus is the status of the network for a PodSandbox.
  197. message PodSandboxNetworkStatus {
  198. // The IP address of the PodSandbox
  199. optional string ip = 1;
  200. }
  201. // Namespace contains paths to the namespaces.
  202. message Namespace {
  203. // Network is the path to the network namespace.
  204. optional string network = 1;
  205. // Options is the namespace options for linux namespaces
  206. optional NamespaceOption options = 2;
  207. }
  208. // LinuxSandBoxStatus contains status specific to Linux sandboxes.
  209. message LinuxPodSandboxStatus {
  210. // Namespaces contains paths to the sandbox's namespaces.
  211. optional Namespace namespaces = 1;
  212. }
  213. enum PodSandBoxState {
  214. READY = 0;
  215. NOTREADY = 1;
  216. }
  217. // PodSandboxStatus contains the status of the PodSandbox.
  218. message PodSandboxStatus {
  219. // ID of the sandbox.
  220. optional string id = 1;
  221. // Metadata of the sandbox.
  222. optional PodSandboxMetadata metadata = 2;
  223. // State of the sandbox.
  224. optional PodSandBoxState state = 3;
  225. // Creation timestamp of the sandbox
  226. optional int64 created_at = 4;
  227. // Network contains network status if network is handled by the runtime.
  228. optional PodSandboxNetworkStatus network = 5;
  229. // Linux specific status to a pod sandbox.
  230. optional LinuxPodSandboxStatus linux = 6;
  231. // Labels are key value pairs that may be used to scope and select individual resources.
  232. map<string, string> labels = 7;
  233. // Annotations is an unstructured key value map that may be set by external
  234. // tools to store and retrieve arbitrary metadata.
  235. map<string, string> annotations = 8;
  236. }
  237. message PodSandboxStatusResponse {
  238. // The status of the PodSandbox
  239. optional PodSandboxStatus status = 1;
  240. }
  241. // PodSandboxFilter is used to filter a list of PodSandboxes.
  242. // All those fields are combined with 'AND'
  243. message PodSandboxFilter {
  244. // Name of the sandbox.
  245. optional string name = 1;
  246. // ID of the sandbox.
  247. optional string id = 2;
  248. // State of the sandbox.
  249. optional PodSandBoxState state = 3;
  250. // LabelSelector to select matches.
  251. // Only api.MatchLabels is supported for now and the requirements
  252. // are ANDed. MatchExpressions is not supported yet.
  253. map<string, string> label_selector = 4;
  254. }
  255. message ListPodSandboxRequest {
  256. // PodSandboxFilter to filter a list of PodSandboxes.
  257. optional PodSandboxFilter filter = 1;
  258. }
  259. // PodSandbox contains minimal information about a sandbox.
  260. message PodSandbox {
  261. // The id of the PodSandbox
  262. optional string id = 1;
  263. // Metadata of the sandbox
  264. optional PodSandboxMetadata metadata = 2;
  265. // The state of the PodSandbox
  266. optional PodSandBoxState state = 3;
  267. // Creation timestamps of the sandbox
  268. optional int64 created_at = 4;
  269. // The labels of the PodSandbox
  270. map<string, string> labels = 5;
  271. }
  272. message ListPodSandboxResponse {
  273. // List of PodSandbox
  274. repeated PodSandbox items = 1;
  275. }
  276. // ImageSpec is an internal representation of an image. Currently, it wraps the
  277. // value of a Container's Image field (e.g. imageName, imageName:tag, or
  278. // imageName:digest), but in the future it will include more detailed
  279. // information about the different image types.
  280. message ImageSpec {
  281. optional string image = 1;
  282. }
  283. message KeyValue {
  284. optional string key = 1;
  285. optional string value = 2;
  286. }
  287. // LinuxContainerResources specifies Linux specific configuration for
  288. // resources.
  289. // TODO: Consider using Resources from opencontainers/runtime-spec/specs-go
  290. // directly.
  291. message LinuxContainerResources {
  292. // CPU CFS (Completely Fair Scheduler) period
  293. optional int64 cpu_period = 1;
  294. // CPU CFS (Completely Fair Scheduler) quota
  295. optional int64 cpu_quota = 2;
  296. // CPU shares (relative weight vs. other containers)
  297. optional int64 cpu_shares = 3;
  298. // Memory limit in bytes
  299. optional int64 memory_limit_in_bytes = 4;
  300. // OOMScoreAdj adjusts the oom-killer score.
  301. optional int64 oom_score_adj = 5;
  302. }
  303. // SELinuxOption are the labels to be applied to the container.
  304. message SELinuxOption {
  305. optional string user = 1;
  306. optional string role = 2;
  307. optional string type = 3;
  308. optional string level = 4;
  309. }
  310. // Capability contains the container capabilities to add or drop
  311. message Capability {
  312. // List of capabilities to add.
  313. repeated string add_capabilities = 1;
  314. // List of capabilities to drop.
  315. repeated string drop_capabilities = 2;
  316. }
  317. // LinuxContainerConfig contains platform-specific configuration for
  318. // Linux-based containers.
  319. message LinuxContainerConfig {
  320. // Resources specification for the container.
  321. optional LinuxContainerResources resources = 1;
  322. // Capabilities to add or drop.
  323. optional Capability capabilities = 2;
  324. // Optional SELinux context to be applied.
  325. optional SELinuxOption selinux_options = 3;
  326. // User contains the user for the container process.
  327. optional LinuxUser user = 4;
  328. }
  329. message LinuxUser {
  330. // uid specifies the user ID the container process has.
  331. optional int64 uid = 1;
  332. // gid specifies the group ID the container process has.
  333. optional int64 gid = 2;
  334. // additional_gids specifies additional GIDs the container process has.
  335. repeated int64 additional_gids = 3;
  336. }
  337. // ContainerMetadata holds all necessary information for building the container
  338. // name. The container runtime is encouraged to expose the metadata in its user
  339. // interface for better user experience. E.g., runtime can construct a unique
  340. // container name based on the metadata. Note that (name, attempt) is unique
  341. // within a sandbox for the entire lifetime of the sandbox.
  342. message ContainerMetadata {
  343. // The name of the container. Same as the container name in the PodSpec.
  344. optional string name = 1;
  345. // The attempt number of creating the container.
  346. optional uint32 attempt = 2;
  347. }
  348. // ContainerConfig holds all the required and optional fields for creating a
  349. // container.
  350. message ContainerConfig {
  351. // The metadata of the container. This information will uniquely identify
  352. // the container, and the runtime should leverage this to ensure correct
  353. // operation. The runtime may also use this information to improve UX, such
  354. // as by constructing a readable name.
  355. optional ContainerMetadata metadata = 1 ;
  356. // Image to use.
  357. optional ImageSpec image = 2;
  358. // Command to execute (i.e., entrypoint for docker)
  359. repeated string command = 3;
  360. // Args for the Command (i.e., command for docker)
  361. repeated string args = 4;
  362. // Current working directory of the command.
  363. optional string working_dir = 5;
  364. // List of environment variable to set in the container
  365. repeated KeyValue envs = 6;
  366. // Mounts specifies mounts for the container
  367. repeated Mount mounts = 7;
  368. // Labels are key value pairs that may be used to scope and select individual resources.
  369. // Label keys are of the form:
  370. // label-key ::= prefixed-name | name
  371. // prefixed-name ::= prefix '/' name
  372. // prefix ::= DNS_SUBDOMAIN
  373. // name ::= DNS_LABEL
  374. map<string, string> labels = 8;
  375. // Annotations is an unstructured key value map that may be set by external
  376. // tools to store and retrieve arbitrary metadata.
  377. map<string, string> annotations = 9;
  378. // If set, run container in privileged mode.
  379. // Processes in privileged containers are essentially equivalent to root on the host.
  380. optional bool privileged = 10;
  381. // If set, the root filesystem of the container is read-only.
  382. optional bool readonly_rootfs = 11;
  383. // Path relative to PodSandboxConfig.LogDirectory for container to store
  384. // the log (STDOUT and STDERR) on the host.
  385. // E.g.,
  386. // PodSandboxConfig.LogDirectory = `/var/log/pods/<podUID>/`
  387. // ContainerConfig.LogPath = `containerName_Instance#.log`
  388. //
  389. // WARNING: Log management and how kubelet should interface with the
  390. // container logs are under active discussion in
  391. // https://issues.k8s.io/24677. There *may* be future change of direction
  392. // for logging as the discussion carries on.
  393. optional string log_path = 12;
  394. // The hash of container config
  395. // Variables for interactive containers, these have very specialized
  396. // use-cases (e.g. debugging).
  397. // TODO: Determine if we need to continue supporting these fields that are
  398. // part of Kubernetes's Container Spec.
  399. optional bool stdin = 13;
  400. optional bool stdin_once = 14;
  401. optional bool tty = 15;
  402. // Linux contains configuration specific to Linux containers.
  403. optional LinuxContainerConfig linux = 16;
  404. }
  405. message CreateContainerRequest {
  406. // The id of the PodSandbox
  407. optional string pod_sandbox_id = 1;
  408. // The config of the container
  409. optional ContainerConfig config = 2;
  410. // The config of the PodSandbox
  411. optional PodSandboxConfig sandbox_config = 3;
  412. }
  413. message CreateContainerResponse {
  414. // The id of the created container
  415. optional string container_id = 1;
  416. }
  417. message StartContainerRequest {
  418. // The id of the container
  419. optional string container_id = 1;
  420. }
  421. message StartContainerResponse {}
  422. message StopContainerRequest {
  423. // The id of the container
  424. optional string container_id = 1;
  425. // Timeout in seconds to stop the container
  426. optional int64 timeout = 2;
  427. }
  428. message StopContainerResponse {}
  429. message RemoveContainerRequest {
  430. // The id of the container
  431. optional string container_id = 1;
  432. }
  433. message RemoveContainerResponse {}
  434. enum ContainerState {
  435. CREATED = 0;
  436. RUNNING = 1;
  437. EXITED = 2;
  438. UNKNOWN = 3;
  439. }
  440. // ContainerFilter is used to filter containers.
  441. // All those fields are combined with 'AND'
  442. message ContainerFilter {
  443. // Name of the container.
  444. optional string name = 1;
  445. // ID of the container.
  446. optional string id = 2;
  447. // State of the container.
  448. optional ContainerState state = 3;
  449. // The id of the pod sandbox
  450. optional string pod_sandbox_id = 4;
  451. // LabelSelector to select matches.
  452. // Only api.MatchLabels is supported for now and the requirements
  453. // are ANDed. MatchExpressions is not supported yet.
  454. map<string, string> label_selector = 5;
  455. }
  456. message ListContainersRequest {
  457. optional ContainerFilter filter = 1;
  458. }
  459. // Container provides the runtime information for a container, such as ID, hash,
  460. // state of the container.
  461. message Container {
  462. // The ID of the container, used by the container runtime to identify
  463. // a container.
  464. optional string id = 1;
  465. // The metadata of the container.
  466. optional ContainerMetadata metadata = 2;
  467. // The spec of the image
  468. optional ImageSpec image = 3;
  469. // Reference to the image in use. For most runtimes, this should be an
  470. // image ID.
  471. optional string image_ref = 4;
  472. // State is the state of the container.
  473. optional ContainerState state = 5;
  474. // Labels are key value pairs that may be used to scope and select individual resources.
  475. map<string, string> labels = 6;
  476. // Annotations is an unstructured key value map that may be set by external
  477. // tools to store and retrieve arbitrary metadata.
  478. map<string, string> annotations = 7;
  479. }
  480. message ListContainersResponse {
  481. // List of containers
  482. repeated Container containers = 1;
  483. }
  484. message ContainerStatusRequest {
  485. // The id of the container
  486. optional string container_id = 1;
  487. }
  488. // ContainerStatus represents the status of a container.
  489. message ContainerStatus {
  490. // ID of the container.
  491. optional string id = 1;
  492. // Metadata of the container.
  493. optional ContainerMetadata metadata = 2;
  494. // Status of the container.
  495. optional ContainerState state = 3;
  496. // Creation time of the container.
  497. optional int64 created_at = 4;
  498. // Start time of the container.
  499. optional int64 started_at = 5;
  500. // Finish time of the container.
  501. optional int64 finished_at = 6;
  502. // Exit code of the container.
  503. optional int32 exit_code = 7;
  504. // The spec of the image
  505. optional ImageSpec image = 8;
  506. // Reference to the image in use. For most runtimes, this should be an
  507. // image ID
  508. optional string image_ref = 9;
  509. // A string explains why container is in such a status.
  510. optional string reason = 10;
  511. // Labels are key value pairs that may be used to scope and select individual resources.
  512. map<string,string> labels = 11;
  513. // Annotations is an unstructured key value map.
  514. map<string,string> annotations = 12;
  515. // Mounts specifies mounts for the container
  516. repeated Mount mounts = 13;
  517. }
  518. message ContainerStatusResponse {
  519. // The status of the container
  520. optional ContainerStatus status = 1;
  521. }
  522. message ExecRequest {
  523. // The id of the container
  524. optional string container_id = 1;
  525. // The cmd to execute
  526. repeated string cmd = 2;
  527. // Whether use tty
  528. optional bool tty = 3;
  529. // Streaming stdin
  530. optional bytes stdin = 4;
  531. }
  532. message ExecResponse {
  533. // Streaming stdout
  534. optional bytes stdout = 1;
  535. // Streaming stderr
  536. optional bytes stderr = 2;
  537. }
  538. message ImageFilter {
  539. // The spec of the image
  540. optional ImageSpec image = 1;
  541. }
  542. message ListImagesRequest {
  543. // The filter to list images
  544. optional ImageFilter filter = 1;
  545. }
  546. // Basic information about a container image.
  547. message Image {
  548. // ID of the image.
  549. optional string id = 1;
  550. // Other names by which this image is known.
  551. repeated string repo_tags = 2;
  552. // Digests by which this image is known.
  553. repeated string repo_digests = 3;
  554. // The size of the image in bytes.
  555. optional uint64 size = 4;
  556. }
  557. message ListImagesResponse {
  558. // List of images
  559. repeated Image images = 1;
  560. }
  561. message ImageStatusRequest {
  562. // The spec of the image
  563. optional ImageSpec image = 1;
  564. }
  565. message ImageStatusResponse {
  566. // The status of the image
  567. optional Image image = 1;
  568. }
  569. // AuthConfig contains authorization information for connecting to a registry.
  570. message AuthConfig {
  571. optional string username = 1;
  572. optional string password = 2;
  573. optional string auth = 3;
  574. optional string server_address = 4;
  575. // IdentityToken is used to authenticate the user and get
  576. // an access token for the registry.
  577. optional string identity_token = 5;
  578. // RegistryToken is a bearer token to be sent to a registry
  579. optional string registry_token = 6;
  580. }
  581. message PullImageRequest {
  582. // The spec of the image
  583. optional ImageSpec image = 1;
  584. // The auth config for pulling image
  585. optional AuthConfig auth = 2;
  586. // The config of the PodSandbox, which is used to pull image in PodSandbox context
  587. optional PodSandboxConfig sandbox_config = 3;
  588. }
  589. message PullImageResponse {}
  590. message RemoveImageRequest {
  591. // The spec of the image
  592. optional ImageSpec image = 1;
  593. }
  594. message RemoveImageResponse {}