@cofy-x/axern-sdk 0.5.1 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +39 -52
- package/dist/client/index.d.ts +12 -11
- package/dist/client/index.js +64 -65
- package/dist/config/index.d.ts +0 -1
- package/dist/config/index.js +2 -4
- package/dist/generated/proto.js +0 -1
- package/dist/index.d.ts +6 -5
- package/dist/index.js +2 -2
- package/dist/network-policy.d.ts +41 -0
- package/dist/network-policy.js +132 -0
- package/dist/node/attached_process.d.ts +1 -2
- package/dist/node/attached_process.js +12 -26
- package/dist/node/client.d.ts +4 -6
- package/dist/node/client.js +2 -9
- package/dist/node/exec.d.ts +1 -3
- package/dist/node/exec.js +0 -43
- package/dist/proto/axern/control/admin/v1/access.proto +12 -5
- package/dist/proto/axern/control/admin/v1/audit.proto +14 -16
- package/dist/proto/axern/control/admin/v1/node.proto +23 -67
- package/dist/proto/axern/control/admin/v1/reliability.proto +11 -78
- package/dist/proto/axern/control/capability/v1/capability.proto +35 -90
- package/dist/proto/axern/control/common/v1/common.proto +72 -102
- package/dist/proto/axern/control/environment/v1/environment.proto +42 -26
- package/dist/proto/axern/control/gateway/v1/gateway.proto +18 -59
- package/dist/proto/axern/control/identity/v1/identity.proto +1 -1
- package/dist/proto/axern/control/namespace/v1/namespace.proto +2 -3
- package/dist/proto/axern/control/quota/v1/quota.proto +22 -32
- package/dist/proto/axern/control/run/v1/run.proto +26 -22
- package/dist/proto/axern/control/secret/v1/secret.proto +1 -3
- package/dist/proto/axern/control/tunnel/v1/tunnel.proto +18 -25
- package/dist/proto/axern/node/sandbox/v1/node.proto +59 -375
- package/dist/sandbox/index.d.ts +5 -9
- package/dist/sandbox/index.js +14 -22
- package/dist/sandbox/lifecycle.d.ts +1 -1
- package/dist/sandbox/lifecycle.js +55 -17
- package/dist/tunnel/connector.js +1 -1
- package/dist/tunnel/control.d.ts +0 -1
- package/dist/tunnel/control.js +0 -1
- package/dist/tunnel/runtime.d.ts +0 -1
- package/dist/tunnel/runtime.js +0 -1
- package/dist/tunnel/types.d.ts +0 -1
- package/dist/types.d.ts +4 -21
- package/dist/types.js +1 -3
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/proto/axern/control/admin/v1/allocation_lifecycle.proto +0 -91
- package/dist/proto/axern/control/admin/v1/service.proto +0 -18
- package/dist/proto/axern/control/admin/v1/storage.proto +0 -81
- package/dist/proto/axern/control/agentprofile/v1/agent_profile.proto +0 -169
- package/dist/proto/axern/control/catalog/v1/catalog.proto +0 -127
- package/dist/proto/axern/control/function/v1/function.proto +0 -130
- package/dist/proto/axern/control/function/v1/function_types.proto +0 -233
- package/dist/proto/axern/control/node/v1/node_control.proto +0 -443
- package/dist/proto/axern/control/rollout/v1/rollout.proto +0 -344
- package/dist/proto/axern/control/service/v1/service.proto +0 -96
- package/dist/proto/axern/control/service/v1/service_event.proto +0 -47
- package/dist/proto/axern/control/service/v1/service_replica.proto +0 -78
- package/dist/proto/axern/control/service/v1/service_types.proto +0 -155
- package/dist/proto/axern/control/storage/v1/storage.proto +0 -107
- package/dist/proto/axern/control/storage/v1/storage_types.proto +0 -125
- package/dist/proto/axern/data/artifact/v1/artifact.proto +0 -19
|
@@ -26,45 +26,8 @@ enum ConsistencyIssueSeverity {
|
|
|
26
26
|
|
|
27
27
|
enum ConsistencyIssueCode {
|
|
28
28
|
CONSISTENCY_ISSUE_CODE_UNSPECIFIED = 0;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
CONSISTENCY_ISSUE_CODE_ACTIVE_RESERVATION_ALLOCATION_MISMATCH = 3;
|
|
32
|
-
CONSISTENCY_ISSUE_CODE_ACTIVE_LEASE_MISSING_ALLOCATION = 4;
|
|
33
|
-
CONSISTENCY_ISSUE_CODE_ACTIVE_LEASE_ON_ENDED_ALLOCATION = 5;
|
|
34
|
-
CONSISTENCY_ISSUE_CODE_ACTIVE_LEASE_ALLOCATION_NODE_MISMATCH = 6;
|
|
35
|
-
CONSISTENCY_ISSUE_CODE_ACTIVE_TUNNEL_MISSING_ALLOCATION = 7;
|
|
36
|
-
CONSISTENCY_ISSUE_CODE_ACTIVE_TUNNEL_ON_ENDED_ALLOCATION = 8;
|
|
37
|
-
CONSISTENCY_ISSUE_CODE_ACTIVE_TUNNEL_ALLOCATION_NODE_MISMATCH = 9;
|
|
38
|
-
CONSISTENCY_ISSUE_CODE_SERVICE_REFERENCE_MISSING_ALLOCATION = 10;
|
|
39
|
-
CONSISTENCY_ISSUE_CODE_SERVICE_REFERENCE_ENDED_ALLOCATION = 11;
|
|
40
|
-
CONSISTENCY_ISSUE_CODE_SERVICE_REFERENCE_OWNER_MISMATCH = 12;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
enum ConsistencyRepairOwner {
|
|
44
|
-
CONSISTENCY_REPAIR_OWNER_UNSPECIFIED = 0;
|
|
45
|
-
CONSISTENCY_REPAIR_OWNER_WORKLOAD_CONTROLLER = 1;
|
|
46
|
-
CONSISTENCY_REPAIR_OWNER_NODE_LIFECYCLE = 2;
|
|
47
|
-
CONSISTENCY_REPAIR_OWNER_TUNNEL_CONTROLLER = 3;
|
|
48
|
-
CONSISTENCY_REPAIR_OWNER_SERVICE_CONTROLLER = 4;
|
|
49
|
-
CONSISTENCY_REPAIR_OWNER_ADMIN_OPERATOR_TRIAGE = 5;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
enum ConsistencyRepairAction {
|
|
53
|
-
CONSISTENCY_REPAIR_ACTION_UNSPECIFIED = 0;
|
|
54
|
-
CONSISTENCY_REPAIR_ACTION_WORKLOAD_CLEANUP = 1;
|
|
55
|
-
CONSISTENCY_REPAIR_ACTION_WORKLOAD_CLEANUP_AND_READMIT = 2;
|
|
56
|
-
CONSISTENCY_REPAIR_ACTION_NODE_LIFECYCLE_RECONCILE = 3;
|
|
57
|
-
CONSISTENCY_REPAIR_ACTION_TUNNEL_LIFECYCLE_RECONCILE = 4;
|
|
58
|
-
CONSISTENCY_REPAIR_ACTION_SERVICE_RECONCILE = 5;
|
|
59
|
-
CONSISTENCY_REPAIR_ACTION_ADMIN_TRIAGE = 6;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
enum ConsistencyRepairTargetType {
|
|
63
|
-
CONSISTENCY_REPAIR_TARGET_TYPE_UNSPECIFIED = 0;
|
|
64
|
-
CONSISTENCY_REPAIR_TARGET_TYPE_ALLOCATION = 1;
|
|
65
|
-
CONSISTENCY_REPAIR_TARGET_TYPE_RUN = 2;
|
|
66
|
-
CONSISTENCY_REPAIR_TARGET_TYPE_SERVICE = 3;
|
|
67
|
-
CONSISTENCY_REPAIR_TARGET_TYPE_TUNNEL_SESSION = 4;
|
|
29
|
+
CONSISTENCY_ISSUE_CODE_ACTIVE_ACCESS_GRANT_ON_ENDED_ALLOCATION = 1;
|
|
30
|
+
CONSISTENCY_ISSUE_CODE_ACTIVE_TUNNEL_ON_ENDED_ALLOCATION = 2;
|
|
68
31
|
}
|
|
69
32
|
|
|
70
33
|
enum AdminReliabilitySignalCode {
|
|
@@ -72,14 +35,12 @@ enum AdminReliabilitySignalCode {
|
|
|
72
35
|
ADMIN_RELIABILITY_SIGNAL_CODE_CONSISTENCY_ISSUES = 1;
|
|
73
36
|
ADMIN_RELIABILITY_SIGNAL_CODE_ALLOCATION_LIFECYCLE_RETRIES = 2;
|
|
74
37
|
ADMIN_RELIABILITY_SIGNAL_CODE_RECONCILE_FAILURES = 3;
|
|
75
|
-
|
|
76
|
-
ADMIN_RELIABILITY_SIGNAL_CODE_NODE_VOLUME_MANAGERS = 5;
|
|
77
|
-
ADMIN_RELIABILITY_SIGNAL_CODE_NODE_FLEET = 6;
|
|
38
|
+
ADMIN_RELIABILITY_SIGNAL_CODE_NODE_FLEET = 4;
|
|
78
39
|
}
|
|
79
40
|
|
|
80
41
|
message ConsistencyCounts {
|
|
81
|
-
int64
|
|
82
|
-
int64
|
|
42
|
+
int64 active_allocations = 1;
|
|
43
|
+
int64 active_access_grants = 2;
|
|
83
44
|
int64 active_tunnels = 3;
|
|
84
45
|
int64 allocation_lifecycle_retries = 4;
|
|
85
46
|
int64 issues = 5;
|
|
@@ -89,16 +50,10 @@ message ConsistencyIssue {
|
|
|
89
50
|
ConsistencyIssueCode code = 1;
|
|
90
51
|
ConsistencyIssueSeverity severity = 2;
|
|
91
52
|
string allocation_id = 3;
|
|
92
|
-
string
|
|
93
|
-
string
|
|
94
|
-
string
|
|
95
|
-
string
|
|
96
|
-
string detail = 8;
|
|
97
|
-
ConsistencyRepairOwner repair_owner = 9;
|
|
98
|
-
ConsistencyRepairAction repair_action = 10;
|
|
99
|
-
bool automatic_repair = 11;
|
|
100
|
-
ConsistencyRepairTargetType repair_target_type = 12;
|
|
101
|
-
string repair_target_id = 13;
|
|
53
|
+
string run_id = 4;
|
|
54
|
+
string node_id = 5;
|
|
55
|
+
string status = 6;
|
|
56
|
+
string detail = 7;
|
|
102
57
|
}
|
|
103
58
|
|
|
104
59
|
message ConsistencySnapshot {
|
|
@@ -120,10 +75,8 @@ message AdminReliabilityHealth {
|
|
|
120
75
|
int64 due_allocation_lifecycle_retries = 4;
|
|
121
76
|
int64 reconcile_unhealthy_components = 5;
|
|
122
77
|
repeated AdminReliabilitySignal signals = 6;
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
repeated ReconcileComponentHealth reconcile_components = 9;
|
|
126
|
-
AdminNodeFleetHealth node_fleet_health = 10;
|
|
78
|
+
repeated ReconcileComponentHealth reconcile_components = 7;
|
|
79
|
+
AdminNodeFleetHealth node_fleet_health = 8;
|
|
127
80
|
}
|
|
128
81
|
|
|
129
82
|
message ReconcileComponentHealth {
|
|
@@ -148,14 +101,6 @@ message GetAdminReliabilityHealthResponse {
|
|
|
148
101
|
AdminReliabilityHealth health = 1;
|
|
149
102
|
}
|
|
150
103
|
|
|
151
|
-
message AdminNodeVolumeHealth {
|
|
152
|
-
int64 unhealthy_nodes = 1;
|
|
153
|
-
int64 published_volumes = 2;
|
|
154
|
-
int64 last_reconcile_stale_allocations = 3;
|
|
155
|
-
int64 last_reconcile_invalid_volumes = 4;
|
|
156
|
-
string error = 5;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
104
|
message AdminNodeFleetHealth {
|
|
160
105
|
int64 active_nodes = 1;
|
|
161
106
|
int64 ready_nodes = 2;
|
|
@@ -166,18 +111,6 @@ message AdminNodeFleetHealth {
|
|
|
166
111
|
string error = 7;
|
|
167
112
|
}
|
|
168
113
|
|
|
169
|
-
message AdminStorageBindingHealth {
|
|
170
|
-
bool unavailable = 1;
|
|
171
|
-
string error = 2;
|
|
172
|
-
int64 failed_bindings = 3;
|
|
173
|
-
int64 releasing_bindings = 4;
|
|
174
|
-
int64 stuck_releasing_bindings = 5;
|
|
175
|
-
int64 inconsistent_claims = 6;
|
|
176
|
-
int64 invalid_bindings = 7;
|
|
177
|
-
int64 deleting_claims = 8;
|
|
178
|
-
int64 stuck_deleting_claims = 9;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
114
|
service AdminReliability {
|
|
182
115
|
rpc CheckConsistency(CheckConsistencyRequest) returns (CheckConsistencyResponse) {}
|
|
183
116
|
rpc GetAdminReliabilityHealth(GetAdminReliabilityHealthRequest) returns (GetAdminReliabilityHealthResponse) {}
|
|
@@ -11,23 +11,22 @@ import "google/protobuf/timestamp.proto";
|
|
|
11
11
|
// claims; only the owning observed-capability provider may publish them.
|
|
12
12
|
enum PlatformCapability {
|
|
13
13
|
PLATFORM_CAPABILITY_UNSPECIFIED = 0;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
PLATFORM_CAPABILITY_RUNC_EPHEMERAL_STORAGE_HARD_LIMIT = 9;
|
|
23
|
-
PLATFORM_CAPABILITY_RUNSC_EPHEMERAL_STORAGE_HARD_LIMIT = 10;
|
|
24
|
-
PLATFORM_CAPABILITY_ROOTFS_LOWER_EROFS = 11;
|
|
25
|
-
// Provider facts consumed by the catalog's derived workload capabilities.
|
|
14
|
+
PLATFORM_CAPABILITY_NETWORK_BRIDGE = 1;
|
|
15
|
+
PLATFORM_CAPABILITY_NETWORK_BPFNET = 2;
|
|
16
|
+
PLATFORM_CAPABILITY_CGROUP_V2_MEMORY_CONTROLLER = 3;
|
|
17
|
+
PLATFORM_CAPABILITY_RUNSC_MEMORY_HARD_LIMIT = 4;
|
|
18
|
+
PLATFORM_CAPABILITY_FILESTORE_OVERLAYFS_UPPER = 5;
|
|
19
|
+
PLATFORM_CAPABILITY_RUNSC_EPHEMERAL_STORAGE_HARD_LIMIT = 6;
|
|
20
|
+
PLATFORM_CAPABILITY_ROOTFS_LOWER_EROFS = 7;
|
|
21
|
+
// Provider facts consumed by derived workload capability definitions.
|
|
26
22
|
// They are not valid workload requirements on their own.
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
23
|
+
PLATFORM_CAPABILITY_RUNSC_MEMORY_ENFORCEMENT_SELF_TEST = 8;
|
|
24
|
+
PLATFORM_CAPABILITY_RUNSC_EPHEMERAL_ENFORCEMENT_SELF_TEST = 9;
|
|
25
|
+
PLATFORM_CAPABILITY_EGRESSD_DNS_POLICY_SELF_TEST = 10;
|
|
26
|
+
PLATFORM_CAPABILITY_EGRESSD_STRICT_EGRESS_SELF_TEST = 11;
|
|
27
|
+
// Workload-facing capabilities derived from the egressd self-test facts.
|
|
28
|
+
PLATFORM_CAPABILITY_DNS_POLICY_ENFORCEMENT = 12;
|
|
29
|
+
PLATFORM_CAPABILITY_STRICT_EGRESS_ENFORCEMENT = 13;
|
|
31
30
|
}
|
|
32
31
|
|
|
33
32
|
message ExtensionCapability {
|
|
@@ -58,10 +57,9 @@ enum CapabilityProvider {
|
|
|
58
57
|
CAPABILITY_PROVIDER_CONFIG = 1;
|
|
59
58
|
CAPABILITY_PROVIDER_HOST_CGROUP = 2;
|
|
60
59
|
CAPABILITY_PROVIDER_FILESTORE = 3;
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
CAPABILITY_PROVIDER_DERIVED = 7;
|
|
60
|
+
CAPABILITY_PROVIDER_RUNSC_SELF_TEST = 4;
|
|
61
|
+
CAPABILITY_PROVIDER_NETWORK_HEALTH = 5;
|
|
62
|
+
CAPABILITY_PROVIDER_DERIVED = 6;
|
|
65
63
|
}
|
|
66
64
|
|
|
67
65
|
enum CapabilityReasonCode {
|
|
@@ -77,10 +75,6 @@ enum CapabilityReasonCode {
|
|
|
77
75
|
CAPABILITY_REASON_CODE_ENFORCEMENT_LOST = 9;
|
|
78
76
|
}
|
|
79
77
|
|
|
80
|
-
message ConfigEvidenceIdentity {
|
|
81
|
-
string config_digest = 1;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
78
|
message BootEvidenceIdentity {
|
|
85
79
|
string boot_id = 1;
|
|
86
80
|
}
|
|
@@ -92,72 +86,35 @@ message MountEvidenceIdentity {
|
|
|
92
86
|
|
|
93
87
|
message RuntimeEvidenceIdentity {
|
|
94
88
|
string boot_id = 1;
|
|
95
|
-
string
|
|
96
|
-
string
|
|
97
|
-
string runtime_config_digest = 4;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
message DerivedEvidenceIdentity {
|
|
101
|
-
string catalog_digest = 1;
|
|
102
|
-
// Canonical digest of the typed evidence identities for every catalog
|
|
103
|
-
// dependency. This makes the derived subject change when its mount,
|
|
104
|
-
// runtime, boot, or config subjects change without treating a normal TTL
|
|
105
|
-
// refresh as a new identity.
|
|
106
|
-
string dependency_evidence_digest = 2;
|
|
89
|
+
string runtime_binary_digest = 2;
|
|
90
|
+
string runtime_config_digest = 3;
|
|
107
91
|
}
|
|
108
92
|
|
|
109
|
-
// CapabilityEvidence identifies the concrete subject that was
|
|
110
|
-
//
|
|
111
|
-
//
|
|
93
|
+
// CapabilityEvidence identifies the concrete host subject that was inspected.
|
|
94
|
+
// It is descriptive evidence, not an identity, version, or cryptographic
|
|
95
|
+
// proof. Derived and configuration capabilities need no additional evidence.
|
|
112
96
|
message CapabilityEvidence {
|
|
113
|
-
string evidence_id = 1;
|
|
114
97
|
oneof identity {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
RuntimeEvidenceIdentity runtime = 5;
|
|
119
|
-
DerivedEvidenceIdentity derived = 6;
|
|
98
|
+
BootEvidenceIdentity boot = 1;
|
|
99
|
+
MountEvidenceIdentity mount = 2;
|
|
100
|
+
RuntimeEvidenceIdentity runtime = 3;
|
|
120
101
|
}
|
|
121
102
|
}
|
|
122
103
|
|
|
123
|
-
|
|
124
|
-
// from a snapshot. Dependencies are represented as one bounded flat proof set
|
|
125
|
-
// so persistence and validation remain bounded.
|
|
126
|
-
message CapabilityObservationProof {
|
|
104
|
+
message CapabilityObservation {
|
|
127
105
|
CapabilityKey key = 1;
|
|
128
|
-
|
|
106
|
+
CapabilityState state = 2;
|
|
129
107
|
CapabilityProvider provider = 3;
|
|
130
108
|
google.protobuf.Timestamp observed_at = 4;
|
|
131
109
|
google.protobuf.Timestamp valid_until = 5;
|
|
132
110
|
CapabilityEvidence evidence = 6;
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
message CapabilityObservation {
|
|
136
|
-
CapabilityKey key = 1;
|
|
137
|
-
CapabilityState state = 2;
|
|
138
|
-
CapabilityProvider provider = 3;
|
|
139
|
-
string observation_id = 4;
|
|
140
|
-
google.protobuf.Timestamp observed_at = 5;
|
|
141
|
-
google.protobuf.Timestamp valid_until = 6;
|
|
142
|
-
CapabilityEvidence evidence = 7;
|
|
143
|
-
repeated CapabilityObservationProof dependencies = 8;
|
|
144
|
-
CapabilityReasonCode reason_code = 9;
|
|
145
|
-
string reason = 10;
|
|
111
|
+
CapabilityReasonCode reason_code = 7;
|
|
112
|
+
string reason = 8;
|
|
146
113
|
}
|
|
147
114
|
|
|
148
115
|
message CapabilitySnapshot {
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
string snapshot_id = 3;
|
|
152
|
-
google.protobuf.Timestamp collected_at = 4;
|
|
153
|
-
repeated CapabilityObservation observations = 5;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
message CapabilitySnapshotReference {
|
|
157
|
-
string node_instance_id = 1;
|
|
158
|
-
int64 sequence = 2;
|
|
159
|
-
string snapshot_id = 3;
|
|
160
|
-
google.protobuf.Timestamp collected_at = 4;
|
|
116
|
+
google.protobuf.Timestamp collected_at = 1;
|
|
117
|
+
repeated CapabilityObservation observations = 2;
|
|
161
118
|
}
|
|
162
119
|
|
|
163
120
|
message ExtensionCapabilityRequirement {
|
|
@@ -171,18 +128,9 @@ enum CapabilityLossPolicy {
|
|
|
171
128
|
CAPABILITY_LOSS_POLICY_FAIL_STOP = 3;
|
|
172
129
|
}
|
|
173
130
|
|
|
174
|
-
message
|
|
131
|
+
message CapabilityRequirement {
|
|
175
132
|
CapabilityKey key = 1;
|
|
176
133
|
CapabilityLossPolicy loss_policy = 2;
|
|
177
|
-
CapabilitySnapshotReference selected_snapshot = 3;
|
|
178
|
-
CapabilityObservationProof selected_observation = 4;
|
|
179
|
-
repeated CapabilityObservationProof dependency_observations = 5;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
// CapabilityDependencySet is the durable representation stored with an
|
|
183
|
-
// allocation. A wrapper keeps JSON persistence on the canonical proto shape.
|
|
184
|
-
message CapabilityDependencySet {
|
|
185
|
-
repeated CapabilityDependency dependencies = 1;
|
|
186
134
|
}
|
|
187
135
|
|
|
188
136
|
enum CapabilityConditionState {
|
|
@@ -198,12 +146,9 @@ message CapabilityCondition {
|
|
|
198
146
|
CapabilityConditionState state = 2;
|
|
199
147
|
CapabilityReasonCode reason_code = 3;
|
|
200
148
|
string message = 4;
|
|
201
|
-
google.protobuf.Timestamp observed_at = 5;
|
|
202
|
-
CapabilityObservationProof proof = 6;
|
|
203
149
|
}
|
|
204
150
|
|
|
205
151
|
message CapabilityConditionSet {
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
repeated CapabilityCondition conditions = 3;
|
|
152
|
+
google.protobuf.Timestamp observed_at = 1;
|
|
153
|
+
repeated CapabilityCondition conditions = 2;
|
|
209
154
|
}
|
|
@@ -4,21 +4,18 @@ package axern.control.common.v1;
|
|
|
4
4
|
|
|
5
5
|
option go_package = "github.com/cofy-x/axern/sdk/go/gen/axern/control/common/v1;commonv1";
|
|
6
6
|
|
|
7
|
-
import "google/protobuf/timestamp.proto";
|
|
8
7
|
import "axern/control/capability/v1/capability.proto";
|
|
9
|
-
import "axern/control/storage/v1/storage_types.proto";
|
|
10
8
|
|
|
11
9
|
message ResourceQuantity {
|
|
12
10
|
int64 cpu_milli = 1;
|
|
13
11
|
// Total sandbox memory budget. requests.memory_bytes is the placement,
|
|
14
|
-
//
|
|
12
|
+
// node-capacity charge and namespace-quota commitment. limits.memory_bytes is the
|
|
15
13
|
// host cgroup v2 hard boundary and includes runtime processes, guest
|
|
16
14
|
// accounting, kernel memory, shmem, and charged file/page cache.
|
|
17
15
|
int64 memory_bytes = 2;
|
|
18
16
|
// Sandbox-lifetime node-local disposable storage managed by Axern. The
|
|
19
17
|
// current accounting scope is the runtime writable root overlay and its
|
|
20
|
-
// metadata/copy-up/whiteouts;
|
|
21
|
-
// are excluded.
|
|
18
|
+
// metadata/copy-up/whiteouts; immutable image data is excluded.
|
|
22
19
|
int64 ephemeral_storage_bytes = 3;
|
|
23
20
|
}
|
|
24
21
|
|
|
@@ -27,19 +24,6 @@ message ResourceSpec {
|
|
|
27
24
|
ResourceQuantity limits = 2;
|
|
28
25
|
}
|
|
29
26
|
|
|
30
|
-
enum PortProtocol {
|
|
31
|
-
PORT_PROTOCOL_UNSPECIFIED = 0;
|
|
32
|
-
PORT_PROTOCOL_TCP = 1;
|
|
33
|
-
PORT_PROTOCOL_UDP = 2;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
message PortSpec {
|
|
37
|
-
string name = 1;
|
|
38
|
-
PortProtocol protocol = 2;
|
|
39
|
-
int32 container_port = 3;
|
|
40
|
-
int32 host_port = 4;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
27
|
enum NetworkMode {
|
|
44
28
|
NETWORK_MODE_UNSPECIFIED = 0;
|
|
45
29
|
NETWORK_MODE_DEFAULT = 1;
|
|
@@ -49,6 +33,49 @@ enum NetworkMode {
|
|
|
49
33
|
|
|
50
34
|
message NetworkSpec {
|
|
51
35
|
NetworkMode mode = 1;
|
|
36
|
+
NetworkEgressPolicy egress_policy = 2;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// NetworkEgressPolicy deliberately separates strict enforcement from the
|
|
40
|
+
// DNS-only convenience policy. Callers must not treat dns_deny as an egress
|
|
41
|
+
// security boundary: direct IP traffic, encrypted DNS, and already-known
|
|
42
|
+
// addresses remain outside that policy.
|
|
43
|
+
message NetworkEgressPolicy {
|
|
44
|
+
oneof policy {
|
|
45
|
+
StrictEgressPolicy strict = 1;
|
|
46
|
+
DnsDenyPolicy dns_deny = 2;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// StrictEgressPolicy is default-deny. Domain grants authorize HTTP and HTTPS
|
|
51
|
+
// only, on TCP ports 80 and 443, and require controlled DNS plus matching HTTP
|
|
52
|
+
// Host or TLS SNI. Other protocols require an explicit CIDR rule.
|
|
53
|
+
message StrictEgressPolicy {
|
|
54
|
+
repeated string allowed_domains = 1;
|
|
55
|
+
repeated CIDREgressRule allowed_cidrs = 2;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// DnsDenyPolicy returns REFUSED for matching conventional UDP/TCP DNS queries.
|
|
59
|
+
// It does not block direct IP traffic, DoH, DoT, or previously resolved IPs.
|
|
60
|
+
message DnsDenyPolicy {
|
|
61
|
+
repeated string denied_domains = 1;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
enum EgressProtocol {
|
|
65
|
+
EGRESS_PROTOCOL_UNSPECIFIED = 0;
|
|
66
|
+
EGRESS_PROTOCOL_TCP = 1;
|
|
67
|
+
EGRESS_PROTOCOL_UDP = 2;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
message PortRange {
|
|
71
|
+
uint32 start = 1;
|
|
72
|
+
uint32 end = 2;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
message CIDREgressRule {
|
|
76
|
+
string cidr = 1;
|
|
77
|
+
EgressProtocol protocol = 2;
|
|
78
|
+
repeated PortRange ports = 3;
|
|
52
79
|
}
|
|
53
80
|
|
|
54
81
|
message PlacementConstraints {
|
|
@@ -70,71 +97,38 @@ message SecretFile {
|
|
|
70
97
|
bool optional = 5;
|
|
71
98
|
}
|
|
72
99
|
|
|
73
|
-
message ServiceVolumeMount {
|
|
74
|
-
string name = 1;
|
|
75
|
-
string target = 2;
|
|
76
|
-
bool readonly = 3;
|
|
77
|
-
repeated string options = 4;
|
|
78
|
-
axern.control.storage.v1.VolumeReclaimPolicy reclaim_policy = 5;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
100
|
message ImageMount {
|
|
82
101
|
string image = 1;
|
|
83
102
|
string target = 2;
|
|
84
103
|
bool readonly = 3;
|
|
85
104
|
}
|
|
86
105
|
|
|
87
|
-
message WorkspaceImageVariant {
|
|
88
|
-
string format = 1;
|
|
89
|
-
string image = 2;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
message WorkspaceImageSource {
|
|
93
|
-
repeated WorkspaceImageVariant variants = 1;
|
|
94
|
-
string source_path = 2;
|
|
95
|
-
string target = 3;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
// WorkspacePreparationFacts records the node-observed preparation result for
|
|
99
|
-
// one allocation's immutable TaskSet workspace. These facts describe the
|
|
100
|
-
// variant that was actually selected by the node, not the variant preference
|
|
101
|
-
// declared by the client.
|
|
102
|
-
message WorkspacePreparationFacts {
|
|
103
|
-
string payload_format = 1;
|
|
104
|
-
string payload_digest = 2;
|
|
105
|
-
bool cache_hit = 3;
|
|
106
|
-
int64 image_resolve_ms = 4;
|
|
107
|
-
int64 image_pull_ms = 5;
|
|
108
|
-
int64 cow_prepare_ms = 6;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
106
|
message ExecutionConfig {
|
|
112
107
|
repeated string argv = 1;
|
|
113
108
|
map<string, string> env = 2;
|
|
114
109
|
string cwd = 3;
|
|
115
110
|
ResourceSpec resources = 4;
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
repeated
|
|
121
|
-
repeated
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
ALLOCATION_STATUS_RELEASED = 8;
|
|
111
|
+
NetworkSpec network = 5;
|
|
112
|
+
repeated axern.control.capability.v1.ExtensionCapabilityRequirement extension_capability_requirements = 6;
|
|
113
|
+
PlacementConstraints placement = 7;
|
|
114
|
+
repeated SecretEnvVar secret_env = 8;
|
|
115
|
+
repeated SecretFile secret_files = 9;
|
|
116
|
+
repeated ImageMount image_mounts = 10;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
// AllocationLifecycleState tracks only placement and infrastructure cleanup.
|
|
120
|
+
// Workload outcome, exit status, diagnostics, and user-visible status belong to
|
|
121
|
+
// the owning Run.
|
|
122
|
+
enum AllocationLifecycleState {
|
|
123
|
+
ALLOCATION_LIFECYCLE_STATE_UNSPECIFIED = 0;
|
|
124
|
+
ALLOCATION_LIFECYCLE_STATE_BOUND = 1;
|
|
125
|
+
ALLOCATION_LIFECYCLE_STATE_STARTING = 2;
|
|
126
|
+
ALLOCATION_LIFECYCLE_STATE_ACTIVE = 3;
|
|
127
|
+
// STOPPED is a node observation. Controld transitions it atomically to
|
|
128
|
+
// RELEASING when it commits the owning Run result and cleanup work.
|
|
129
|
+
ALLOCATION_LIFECYCLE_STATE_STOPPED = 4;
|
|
130
|
+
ALLOCATION_LIFECYCLE_STATE_RELEASING = 5;
|
|
131
|
+
ALLOCATION_LIFECYCLE_STATE_RELEASED = 6;
|
|
138
132
|
}
|
|
139
133
|
|
|
140
134
|
enum WorkloadDiagnosticCode {
|
|
@@ -145,34 +139,10 @@ enum WorkloadDiagnosticCode {
|
|
|
145
139
|
WORKLOAD_DIAGNOSTIC_CODE_NODE_SELECTION_ERROR = 4;
|
|
146
140
|
WORKLOAD_DIAGNOSTIC_CODE_RUNTIME_START_ERROR = 5;
|
|
147
141
|
WORKLOAD_DIAGNOSTIC_CODE_PROCESS_EXITED = 6;
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
WORKLOAD_DIAGNOSTIC_CODE_VOLUME_SPEC_CONFLICT = 13;
|
|
155
|
-
WORKLOAD_DIAGNOSTIC_CODE_CAPABILITY_ENFORCEMENT_LOST = 14;
|
|
156
|
-
WORKLOAD_DIAGNOSTIC_CODE_MEMORY_LIMIT_EXCEEDED = 15;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
enum LeaseType {
|
|
160
|
-
LEASE_TYPE_UNSPECIFIED = 0;
|
|
161
|
-
LEASE_TYPE_RUN = 1;
|
|
162
|
-
LEASE_TYPE_SERVICE = 2;
|
|
163
|
-
LEASE_TYPE_INVOKE = 3;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
message ExecutionLease {
|
|
167
|
-
string lease_id = 1;
|
|
168
|
-
string allocation_id = 2;
|
|
169
|
-
string node_id = 3;
|
|
170
|
-
int64 attempt = 4;
|
|
171
|
-
LeaseType lease_type = 5;
|
|
172
|
-
string plaintext_token = 6;
|
|
173
|
-
int64 revision = 7;
|
|
174
|
-
google.protobuf.Timestamp expires_at = 8;
|
|
175
|
-
bool revoked = 9;
|
|
176
|
-
string node_target = 10;
|
|
177
|
-
string validation_token_hash = 11;
|
|
142
|
+
WORKLOAD_DIAGNOSTIC_CODE_ADMISSION_BLOCKED = 7;
|
|
143
|
+
WORKLOAD_DIAGNOSTIC_CODE_CAPABILITY_ENFORCEMENT_LOST = 8;
|
|
144
|
+
WORKLOAD_DIAGNOSTIC_CODE_MEMORY_LIMIT_EXCEEDED = 9;
|
|
145
|
+
WORKLOAD_DIAGNOSTIC_CODE_EXECUTION_LEASE_EXPIRED = 10;
|
|
146
|
+
WORKLOAD_DIAGNOSTIC_CODE_OPERATOR_FORCE_TERMINATED = 11;
|
|
147
|
+
WORKLOAD_DIAGNOSTIC_CODE_OPERATOR_FORCE_CLEANUP = 12;
|
|
178
148
|
}
|
|
@@ -4,14 +4,45 @@ package axern.control.environment.v1;
|
|
|
4
4
|
|
|
5
5
|
option go_package = "github.com/cofy-x/axern/sdk/go/gen/axern/control/environment/v1;environmentv1";
|
|
6
6
|
|
|
7
|
-
import "axern/control/catalog/v1/catalog.proto";
|
|
8
7
|
import "google/protobuf/timestamp.proto";
|
|
9
8
|
|
|
9
|
+
message EnvironmentMount {
|
|
10
|
+
string type = 1;
|
|
11
|
+
string source = 2;
|
|
12
|
+
string target = 3;
|
|
13
|
+
repeated string options = 4;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
message OciImageDescriptor {
|
|
17
|
+
string digest = 1;
|
|
18
|
+
string media_type = 2;
|
|
19
|
+
int64 size_bytes = 3;
|
|
20
|
+
map<string, string> annotations = 4;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
message OciBaselinePolicy {
|
|
24
|
+
repeated string capabilities = 1;
|
|
25
|
+
uint64 no_file_limit = 2;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
message OciExecutionProfile {
|
|
29
|
+
OciBaselinePolicy baseline = 1;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
message ResolvedEnvironmentSpec {
|
|
33
|
+
bool rootfs_readonly = 1;
|
|
34
|
+
repeated string image_default_argv = 2;
|
|
35
|
+
string default_cwd = 3;
|
|
36
|
+
map<string, string> default_env = 4;
|
|
37
|
+
repeated EnvironmentMount mounts = 5;
|
|
38
|
+
OciImageDescriptor image_descriptor = 6;
|
|
39
|
+
OciExecutionProfile execution_profile = 7;
|
|
40
|
+
}
|
|
41
|
+
|
|
10
42
|
message EnvironmentImageSource {
|
|
11
43
|
string ref = 1;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
string registry_credential_id = 4;
|
|
44
|
+
bool rootfs_readonly = 2;
|
|
45
|
+
string registry_credential_id = 3;
|
|
15
46
|
}
|
|
16
47
|
|
|
17
48
|
message EnvironmentSpec {
|
|
@@ -21,35 +52,20 @@ message EnvironmentSpec {
|
|
|
21
52
|
EnvironmentImageSource image = 4;
|
|
22
53
|
}
|
|
23
54
|
|
|
24
|
-
enum EnvironmentStatus {
|
|
25
|
-
ENVIRONMENT_STATUS_UNSPECIFIED = 0;
|
|
26
|
-
ENVIRONMENT_STATUS_PENDING = 1;
|
|
27
|
-
ENVIRONMENT_STATUS_READY = 2;
|
|
28
|
-
ENVIRONMENT_STATUS_FAILED = 3;
|
|
29
|
-
ENVIRONMENT_STATUS_DELETING = 4;
|
|
30
|
-
ENVIRONMENT_STATUS_DELETED = 5;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
55
|
message Environment {
|
|
34
56
|
string id = 1;
|
|
35
57
|
string namespace = 2;
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
string
|
|
39
|
-
|
|
40
|
-
map<string, string> labels = 7;
|
|
41
|
-
int64 version = 8;
|
|
42
|
-
google.protobuf.Timestamp created_at = 9;
|
|
43
|
-
google.protobuf.Timestamp updated_at = 10;
|
|
44
|
-
string message = 11;
|
|
58
|
+
EnvironmentSpec spec = 3;
|
|
59
|
+
ResolvedEnvironmentSpec resolved_spec = 4;
|
|
60
|
+
map<string, string> labels = 5;
|
|
61
|
+
google.protobuf.Timestamp created_at = 6;
|
|
45
62
|
}
|
|
46
63
|
|
|
47
64
|
message ListFilter {
|
|
48
65
|
string namespace = 1;
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
int32 page_size = 5;
|
|
66
|
+
map<string, string> labels = 2;
|
|
67
|
+
string cursor = 3;
|
|
68
|
+
int32 page_size = 4;
|
|
53
69
|
}
|
|
54
70
|
|
|
55
71
|
message CreateEnvironmentRequest {
|