Skip to content

Commit 9bc1c67

Browse files
Cluster Node App Instance Affinity
Expand DesignatedNodeId to allow for multiple affinity types. Preferred will attempt to place on requested node but not guaranteed. App will also failover upon node failure. Required will only run app on requested node id, failover disabled. Signed-off-by: Andrew Durbin <andrewd@zededa.com>
1 parent df11a8a commit 9bc1c67

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

proto/config/appconfig.proto

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,13 @@ message SnapshotConfig {
9292
repeated SnapshotDesc snapshots = 4;
9393
}
9494

95+
// Type of app instance affinity
96+
enum AffinityType {
97+
AFFINITY_TYPE_UNSPECIFIED = 0;
98+
AFFINITY_TYPE_PREFERRED = 1; // Node ID preferred at app instance boot time
99+
AFFINITY_TYPE_REQUIRED = 2; // Node ID required at app instance boot time
100+
}
101+
95102
// The complete configuration for an Application Instance
96103
// When changing key fields such as the drives/volumeRefs or the number
97104
// of interfaces, the controller is required to issue a purge command i.e.,
@@ -217,6 +224,11 @@ message AppInstanceConfig {
217224

218225
// AppRuntimeType - to indicate the types of Application Runtime Deployment
219226
AppRuntimeType runtime_type = 28;
227+
228+
// Affinity is used for cluster nodes to determine
229+
// preferred or required node scheduling for app instances.
230+
// Node Id for scheduling is defined in designated_node_id.
231+
AffinityType affinity = 29;
220232
}
221233

222234
message PatchEnvelopeRef {

0 commit comments

Comments
 (0)