Skip to content

How should container version/revision and replica/instance be modeled for the dashboard proto? #1857

@samsp-msft

Description

@samsp-msft

When hosting containers, there are 2 aspects we should consider in the model:

a) Scale out - my service is busy so there are N instances running - they should probably all have the same name, but a different field to represent the instance/replica info
b) Versioning - each change to a container in ACA will create a new revision, and depending on the model selected for the resource, it may be running old and new revisions at the same time, with a portion of the traffic between them.

These could be modeled using the ResourceProperty - but ideally the UI should know the meaning of these properties so it can group the instances togther, and provide operations that apply to all instances of the service, or to specific versions etc. Should these be top level properties on the Resource definition?

message ResourceProperty {
    // Name of the data item, e.g. "container.id", "executable.pid", "project.path", ...
    string name = 1;
    // TODO move display_name to reference data, sent once when the connection starts
    // Optional display name, may be localized
    optional string display_name = 2;
    // The data value. May be null, a number, a string, a boolean, a dictionary of values (Struct), or a list of values (ValueList).
    google.protobuf.Value value = 3;
}

// Models the full state of an resource (container, executable, project, etc) at a particular point in time.
message Resource {
    string name = 1;
    string resource_type = 2;
    string display_name = 3;
    string uid = 4;
    optional string state = 5;
    optional google.protobuf.Timestamp created_at = 6;
    repeated EnvironmentVariable environment = 7;
    optional int32 expected_endpoints_count = 8;
    repeated Endpoint endpoints = 9;
    repeated Service services = 10;
    repeated ResourceCommandRequest commands = 11;

    // Properties holding data not modeled directly on the message.
    //
    // For:
    // - Containers: image, container_id, ports
    // - Executables: process_id, executable_path, working_directory, arguments
    // - Projects: process_id, project_path
    repeated ResourceProperty properties = 12;
}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions