Skip to content

Commit 8bc1efb

Browse files
committed
Merge branch 'feat/federated-deployment-scheduling' into feat/datumctl-compute-plugin
2 parents 69c7ff5 + 82955e2 commit 8bc1efb

36 files changed

Lines changed: 1843 additions & 110 deletions

.claude/settings.local.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"permissions": {
3+
"allow": [
4+
"WebSearch",
5+
"WebFetch(domain:unikraft.cloud)",
6+
"WebFetch(domain:unikraft.com)",
7+
"WebFetch(domain:arxiv.org)",
8+
"WebFetch(domain:unikraft.org)",
9+
"WebFetch(domain:shixiongqi.uky.edu)",
10+
"Bash(go mod tidy:*)"
11+
]
12+
}
13+
}

api/v1alpha/instance_types.go

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,26 @@ type SandboxContainer struct {
107107
// +kubebuilder:validation:Required
108108
Image string `json:"image"`
109109

110+
// Entrypoint array to run in the container image, overriding the image's
111+
// ENTRYPOINT. Each element is a separate token, not a shell command — to run a
112+
// shell command use: ["sh", "-c", "my command"].
113+
//
114+
// If not provided, the container image's own ENTRYPOINT is used.
115+
//
116+
// +kubebuilder:validation:Optional
117+
Command []string `json:"command,omitempty"`
118+
119+
// Arguments to the entrypoint, overriding the image's CMD. Combined with
120+
// Command: when Command is also set the resulting invocation is
121+
// append(Command, Args...). When only Args is set it overrides CMD while
122+
// preserving the image's ENTRYPOINT.
123+
//
124+
// If neither Command nor Args is set, the image's own ENTRYPOINT and CMD
125+
// are used unchanged.
126+
//
127+
// +kubebuilder:validation:Optional
128+
Args []string `json:"args,omitempty"`
129+
110130
// List of environment variables to set in the container.
111131
//
112132
// +kubebuilder:validation:Optional

api/v1alpha/labels.go

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,15 @@ const (
1515

1616
InstanceIndexLabel = LabelNamespace + "/instance-index"
1717

18-
// CityCodeLabel carries the city code (e.g. "DFW") that the Instance is
19-
// scheduled to. Stamped at creation time and immutable.
18+
// CityCodeLabel carries the city code of the WorkloadDeployment that owns
19+
// an Instance, matching WorkloadDeploymentSpec.CityCode.
2020
CityCodeLabel = LabelNamespace + "/city-code"
2121

22-
// WorkloadNameLabel carries the name of the Workload that owns this
23-
// Instance. Stamped at creation time and immutable.
22+
// WorkloadNameLabel carries the name of the Workload that an Instance
23+
// ultimately belongs to, sourced from WorkloadDeploymentSpec.WorkloadRef.Name.
2424
WorkloadNameLabel = LabelNamespace + "/workload-name"
2525

26-
// PlacementNameLabel carries the name of the placement entry within the
27-
// Workload spec that produced this Instance. Stamped at creation time and
28-
// immutable.
26+
// PlacementNameLabel carries the placement name from the Workload that drove
27+
// this Instance's deployment, sourced from WorkloadDeploymentSpec.PlacementName.
2928
PlacementNameLabel = LabelNamespace + "/placement-name"
3029
)

api/v1alpha/workloaddeployment_types.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ package v1alpha
22

33
import (
44
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
5+
6+
networkingv1alpha "go.datum.net/network-services-operator/api/v1alpha"
57
)
68

79
// WorkloadDeploymentSpec defines the desired state of WorkloadDeployment
@@ -35,6 +37,11 @@ type WorkloadDeploymentSpec struct {
3537

3638
// WorkloadDeploymentStatus defines the observed state of WorkloadDeployment
3739
type WorkloadDeploymentStatus struct {
40+
// The location which the deployment has been scheduled to
41+
//
42+
// +kubebuilder:validation:Optional
43+
Location *networkingv1alpha.LocationReference `json:"location,omitempty"`
44+
3845
// Represents the observations of a deployment's current state.
3946
// Known condition types are: "Available", "Progressing"
4047
Conditions []metav1.Condition `json:"conditions,omitempty"`
@@ -73,6 +80,8 @@ const (
7380
// +kubebuilder:printcolumn:name="Ready",type=string,JSONPath=`.status.readyReplicas`
7481
// +kubebuilder:printcolumn:name="Desired",type=string,JSONPath=`.status.desiredReplicas`
7582
// +kubebuilder:printcolumn:name="Up-to-date",type=string,JSONPath=`.status.currentReplicas`
83+
// +kubebuilder:printcolumn:name="Location Namespace",type=string,JSONPath=`.status.location.namespace`,priority=1
84+
// +kubebuilder:printcolumn:name="Location Name",type=string,JSONPath=`.status.location.name`,priority=1
7685
type WorkloadDeployment struct {
7786
metav1.TypeMeta `json:",inline"`
7887
metav1.ObjectMeta `json:"metadata,omitempty"`

api/v1alpha/zz_generated.deepcopy.go

Lines changed: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/base/crd/bases/compute.datumapis.com_instances.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,28 @@ spec:
266266
description: A list of containers to run within the sandbox.
267267
items:
268268
properties:
269+
args:
270+
description: |-
271+
Arguments to the entrypoint, overriding the image's CMD. Combined with
272+
Command: when Command is also set the resulting invocation is
273+
append(Command, Args...). When only Args is set it overrides CMD while
274+
preserving the image's ENTRYPOINT.
275+
276+
If neither Command nor Args is set, the image's own ENTRYPOINT and CMD
277+
are used unchanged.
278+
items:
279+
type: string
280+
type: array
281+
command:
282+
description: |-
283+
Entrypoint array to run in the container image, overriding the image's
284+
ENTRYPOINT. Each element is a separate token, not a shell command — to run a
285+
shell command use: ["sh", "-c", "my command"].
286+
287+
If not provided, the container image's own ENTRYPOINT is used.
288+
items:
289+
type: string
290+
type: array
269291
env:
270292
description: |-
271293
List of environment variables to set in the container.

config/base/crd/bases/compute.datumapis.com_workloaddeployments.yaml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,14 @@ spec:
3737
- jsonPath: .status.currentReplicas
3838
name: Up-to-date
3939
type: string
40+
- jsonPath: .status.location.namespace
41+
name: Location Namespace
42+
priority: 1
43+
type: string
44+
- jsonPath: .status.location.name
45+
name: Location Name
46+
priority: 1
47+
type: string
4048
name: v1alpha
4149
schema:
4250
openAPIV3Schema:
@@ -367,6 +375,28 @@ spec:
367375
sandbox.
368376
items:
369377
properties:
378+
args:
379+
description: |-
380+
Arguments to the entrypoint, overriding the image's CMD. Combined with
381+
Command: when Command is also set the resulting invocation is
382+
append(Command, Args...). When only Args is set it overrides CMD while
383+
preserving the image's ENTRYPOINT.
384+
385+
If neither Command nor Args is set, the image's own ENTRYPOINT and CMD
386+
are used unchanged.
387+
items:
388+
type: string
389+
type: array
390+
command:
391+
description: |-
392+
Entrypoint array to run in the container image, overriding the image's
393+
ENTRYPOINT. Each element is a separate token, not a shell command — to run a
394+
shell command use: ["sh", "-c", "my command"].
395+
396+
If not provided, the container image's own ENTRYPOINT is used.
397+
items:
398+
type: string
399+
type: array
370400
env:
371401
description: |-
372402
List of environment variables to set in the container.
@@ -1065,6 +1095,20 @@ spec:
10651095
description: The desired number of instances
10661096
format: int32
10671097
type: integer
1098+
location:
1099+
description: The location which the deployment has been scheduled
1100+
to
1101+
properties:
1102+
name:
1103+
description: Name of a datum location
1104+
type: string
1105+
namespace:
1106+
description: Namespace for the datum location
1107+
type: string
1108+
required:
1109+
- name
1110+
- namespace
1111+
type: object
10681112
readyReplicas:
10691113
description: The number of instances which are ready.
10701114
format: int32

config/base/crd/bases/compute.datumapis.com_workloads.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,28 @@ spec:
385385
sandbox.
386386
items:
387387
properties:
388+
args:
389+
description: |-
390+
Arguments to the entrypoint, overriding the image's CMD. Combined with
391+
Command: when Command is also set the resulting invocation is
392+
append(Command, Args...). When only Args is set it overrides CMD while
393+
preserving the image's ENTRYPOINT.
394+
395+
If neither Command nor Args is set, the image's own ENTRYPOINT and CMD
396+
are used unchanged.
397+
items:
398+
type: string
399+
type: array
400+
command:
401+
description: |-
402+
Entrypoint array to run in the container image, overriding the image's
403+
ENTRYPOINT. Each element is a separate token, not a shell command — to run a
404+
shell command use: ["sh", "-c", "my command"].
405+
406+
If not provided, the container image's own ENTRYPOINT is used.
407+
items:
408+
type: string
409+
type: array
388410
env:
389411
description: |-
390412
List of environment variables to set in the container.

datumctl-compute

48.1 MB
Binary file not shown.

dist/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
## Changelog
2+
* 69c7ff5388c6f6e876d279286a2a7cee563ee7c7 fix: wait for instances to be ready before reporting rollout complete

0 commit comments

Comments
 (0)