Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions nebius/compute/v1/image.proto
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ message ImageSpec {
string source_disk_id = 4 [(field_behavior) = IMMUTABLE];

SourceStorage source_storage = 11 [(field_behavior) = IMMUTABLE];

string source_disk_snapshot_id = 12 [(field_behavior) = IMMUTABLE];
}

// CPU architecture supported by the image
Expand Down
28 changes: 18 additions & 10 deletions nebius/mk8s/v1/cluster.proto
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,20 @@ option java_outer_classname = "ClusterProto";
option java_package = "ai.nebius.pub.mk8s.v1";

message Cluster {
common.v1.ResourceMetadata metadata = 1 [(buf.validate.field) = {
cel: [
{
id: "metadata_name"
message: "'name' must be 1 to 63 characters long and use only letters, digits, '-', or '_', starting and ending with a letter or digit"
expression: "size(this.name) >= 1 && size(this.name) <= 63 && this.name.matches('^(([A-Za-z0-9][-A-Za-z0-9_]*)?[A-Za-z0-9])?$')"
}
]
}];
common.v1.ResourceMetadata metadata = 1 [
(buf.validate.field) = {
cel: [
{
id: "metadata_name"
message: "'name' must be 1 to 63 characters long and use only letters, digits, '-', or '_', starting and ending with a letter or digit"
expression: "size(this.name) >= 1 && size(this.name) <= 63 && this.name.matches('^(([A-Za-z0-9][-A-Za-z0-9_]*)?[A-Za-z0-9])?$')"
}
]
},
(nid) = {
parent_resource: ["project"]
}
];

ClusterSpec spec = 2;

Expand All @@ -46,7 +51,10 @@ message ControlPlaneSpec {
// Also will be default NodeGroup subnet.
string subnet_id = 2 [
(buf.validate.field).required = true,
(field_behavior) = IMMUTABLE
(field_behavior) = IMMUTABLE,
(nid) = {
resource: ["vpcsubnet"]
}
];

// Specification of endpoints of cluster control plane.
Expand Down
53 changes: 39 additions & 14 deletions nebius/mk8s/v1/cluster_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -40,29 +40,44 @@ service ClusterService {
}

message CreateClusterRequest {
common.v1.ResourceMetadata metadata = 1 [(buf.validate.field) = {
cel: [
{
id: "metadata_name"
message: "'name' must be 1 to 63 characters long and use only letters, digits, '-', or '_', starting and ending with a letter or digit"
expression: "size(this.name) >= 1 && size(this.name) <= 63 && this.name.matches('^(([A-Za-z0-9][-A-Za-z0-9_]*)?[A-Za-z0-9])?$')"
}
]
required: true
}];
common.v1.ResourceMetadata metadata = 1 [
(buf.validate.field) = {
cel: [
{
id: "metadata_name"
message: "'name' must be 1 to 63 characters long and use only letters, digits, '-', or '_', starting and ending with a letter or digit"
expression: "size(this.name) >= 1 && size(this.name) <= 63 && this.name.matches('^(([A-Za-z0-9][-A-Za-z0-9_]*)?[A-Za-z0-9])?$')"
}
]
required: true
},
(nid) = {
parent_resource: ["project"]
}
];

ClusterSpec spec = 2 [(buf.validate.field).required = true];
}

message GetClusterRequest {
string id = 1 [(buf.validate.field).required = true];
string id = 1 [
(buf.validate.field).required = true,
(nid) = {
resource: ["mk8scluster"]
}
];

string resource_version = 2;
}

message ListClustersRequest {
// ID of the IAM container we are listing the resources in.
string parent_id = 1 [(buf.validate.field).required = true];
string parent_id = 1 [
(buf.validate.field).required = true,
(nid) = {
resource: ["project"]
}
];

// Specifies the maximum number of items to return in the response.
int64 page_size = 2;
Expand All @@ -80,14 +95,24 @@ message ListClustersResponse {
message UpdateClusterRequest {
// Metadata associated with the instance.
// Includes ID of the instance to update.
common.v1.ResourceMetadata metadata = 1 [(buf.validate.field).required = true];
common.v1.ResourceMetadata metadata = 1 [
(buf.validate.field).required = true,
(nid) = {
parent_resource: ["project"]
}
];

// Updated specifications for the instance.
ClusterSpec spec = 2;
}

message DeleteClusterRequest {
string id = 1 [(buf.validate.field).required = true];
string id = 1 [
(buf.validate.field).required = true,
(nid) = {
resource: ["mk8scluster"]
}
];
}

message ListClusterControlPlaneVersionsRequest {}
Expand Down
60 changes: 44 additions & 16 deletions nebius/mk8s/v1/node_group.proto
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,20 @@ option java_package = "ai.nebius.pub.mk8s.v1";
// A Node is a Nebius Compute Instance created in Cluster.metadata.parent_id container, running kubelet
// that registers in Kubernetes API and a Node object created.
message NodeGroup {
common.v1.ResourceMetadata metadata = 1 [(buf.validate.field) = {
cel: [
{
id: "metadata_name"
message: "'name' must be 1 to 63 characters long and use only letters, digits, '-', or '_', starting and ending with a letter or digit"
expression: "size(this.name) >= 1 && size(this.name) <= 63 && this.name.matches('^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$')"
}
]
}];
common.v1.ResourceMetadata metadata = 1 [
(buf.validate.field) = {
cel: [
{
id: "metadata_name"
message: "'name' must be 1 to 63 characters long and use only letters, digits, '-', or '_', starting and ending with a letter or digit"
expression: "size(this.name) >= 1 && size(this.name) <= 63 && this.name.matches('^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$')"
}
]
},
(nid) = {
parent_resource: ["mk8scluster"]
}
];

NodeGroupSpec spec = 2;

Expand Down Expand Up @@ -141,7 +146,9 @@ message NodeTemplate {
// This service account is also used to make requests to container registry.
//
// `resource.serviceaccount.issueAccessToken` permission is required to use this field.
string service_account_id = 10;
string service_account_id = 10 [(nid) = {
resource: ["serviceaccount"]
}];

// Configures whether the nodes in the group are preemptible.
// Set to empty value to enable preemptible nodes.
Expand Down Expand Up @@ -175,7 +182,12 @@ message NVLinkSpec {
option (buf.validate.oneof).required = true;

// Existing NVLInstanceGroup ID to use.
string nvl_instance_group_id = 2 [(field_behavior) = IMMUTABLE];
string nvl_instance_group_id = 2 [
(field_behavior) = IMMUTABLE,
(nid) = {
resource: ["computenvlinstancegroup"]
}
];
}
}

Expand Down Expand Up @@ -211,7 +223,9 @@ message GpuSettings {
}

message GpuClusterSpec {
string id = 1;
string id = 1 [(nid) = {
resource: ["computegpucluster"]
}];
}

message NetworkInterfaceTemplate {
Expand All @@ -222,7 +236,12 @@ message NetworkInterfaceTemplate {
// Nebius VPC Subnet ID that will be attached to a node cloud instance network interface.
// By default Cluster control plane subnet_id used.
// Subnet should be located in the same network with control plane.
string subnet_id = 3 [(field_behavior) = NON_EMPTY_DEFAULT];
string subnet_id = 3 [
(field_behavior) = NON_EMPTY_DEFAULT,
(nid) = {
resource: ["vpcsubnet"]
}
];

// User provided VPC Security Groups which will be assigned to all nodes of this NodeGroup.
repeated SecurityGroup security_groups = 7;
Expand All @@ -232,7 +251,9 @@ message NetworkInterfaceTemplate {
message PublicIPAddress {}

message SecurityGroup {
string id = 1;
string id = 1 [(nid) = {
resource: ["vpcsecuritygroup"]
}];
}

message AttachedFilesystemSpec {
Expand All @@ -257,7 +278,12 @@ message AttachedFilesystemSpec {
}

message ExistingFilesystem {
string id = 1 [(buf.validate.field).required = true];
string id = 1 [
(buf.validate.field).required = true,
(nid) = {
resource: ["computefilesystem"]
}
];
}

message NodeGroupAutoscalingSpec {
Expand Down Expand Up @@ -442,7 +468,9 @@ message ReservationPolicy {
Policy policy = 1;

// Capacity block groups, order matters
repeated string reservation_ids = 2;
repeated string reservation_ids = 2 [(nid) = {
resource: ["computereservation"]
}];
}

message LocalDisksSpec {
Expand Down
60 changes: 45 additions & 15 deletions nebius/mk8s/v1/node_group_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -67,29 +67,44 @@ message NodeGroupCompatibilityVersionItem {
}

message CreateNodeGroupRequest {
common.v1.ResourceMetadata metadata = 1 [(buf.validate.field) = {
cel: [
{
id: "metadata_name"
message: "'name' must be 1 to 63 characters long and use only letters, digits, '-', or '_', starting and ending with a letter or digit"
expression: "size(this.name) >= 1 && size(this.name) <= 63 && this.name.matches('^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$')"
}
]
required: true
}];
common.v1.ResourceMetadata metadata = 1 [
(buf.validate.field) = {
cel: [
{
id: "metadata_name"
message: "'name' must be 1 to 63 characters long and use only letters, digits, '-', or '_', starting and ending with a letter or digit"
expression: "size(this.name) >= 1 && size(this.name) <= 63 && this.name.matches('^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$')"
}
]
required: true
},
(nid) = {
parent_resource: ["mk8scluster"]
}
];

NodeGroupSpec spec = 2 [(buf.validate.field).required = true];
}

message GetNodeGroupRequest {
string id = 1 [(buf.validate.field).required = true];
string id = 1 [
(buf.validate.field).required = true,
(nid) = {
resource: ["mk8snodegroup"]
}
];

string resource_version = 2;
}

message ListNodeGroupsRequest {
// ID of the parent Cluster.
string parent_id = 1 [(buf.validate.field).required = true];
string parent_id = 1 [
(buf.validate.field).required = true,
(nid) = {
resource: ["mk8scluster"]
}
];

// Specifies the maximum number of items to return in the response.
int64 page_size = 2;
Expand All @@ -105,17 +120,32 @@ message ListNodeGroupsResponse {
}

message UpdateNodeGroupRequest {
common.v1.ResourceMetadata metadata = 1 [(buf.validate.field).required = true];
common.v1.ResourceMetadata metadata = 1 [
(buf.validate.field).required = true,
(nid) = {
parent_resource: ["mk8scluster"]
}
];

NodeGroupSpec spec = 2;
}

message DeleteNodeGroupRequest {
string id = 1 [(buf.validate.field).required = true];
string id = 1 [
(buf.validate.field).required = true,
(nid) = {
resource: ["mk8snodegroup"]
}
];
}

message UpgradeNodeGroupRequest {
string id = 1 [(buf.validate.field).required = true];
string id = 1 [
(buf.validate.field).required = true,
(nid) = {
resource: ["mk8snodegroup"]
}
];

oneof upgrade_type {
option (buf.validate.oneof).required = true;
Expand Down
28 changes: 18 additions & 10 deletions nebius/mk8s/v1alpha1/cluster.proto
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,20 @@ option java_package = "ai.nebius.pub.mk8s.v1alpha1";
option (file_deprecation_details) = {description: "migrate to v1"};

message Cluster {
common.v1.ResourceMetadata metadata = 1 [(buf.validate.field) = {
cel: [
{
id: "metadata_name"
message: "'name' must be 1 to 63 characters long and use only letters, digits, '-', or '.', starting and ending with a letter or digit"
expression: "size(this.name) >= 1 && size(this.name) <= 63 && this.name.matches('^(([A-Za-z0-9][-A-Za-z0-9.]*)?[A-Za-z0-9])?$')"
}
]
}];
common.v1.ResourceMetadata metadata = 1 [
(buf.validate.field) = {
cel: [
{
id: "metadata_name"
message: "'name' must be 1 to 63 characters long and use only letters, digits, '-', or '.', starting and ending with a letter or digit"
expression: "size(this.name) >= 1 && size(this.name) <= 63 && this.name.matches('^(([A-Za-z0-9][-A-Za-z0-9.]*)?[A-Za-z0-9])?$')"
}
]
},
(nid) = {
parent_resource: ["project"]
}
];

ClusterSpec spec = 2;

Expand All @@ -45,7 +50,10 @@ message ControlPlaneSpec {
// Subnet ID where control plane instances will be located.
string subnet_id = 2 [
(buf.validate.field).required = true,
(field_behavior) = IMMUTABLE
(field_behavior) = IMMUTABLE,
(nid) = {
resource: ["vpcsubnet"]
}
];

ControlPlaneEndpointsSpec endpoints = 3;
Expand Down
Loading