Skip to content

Commit

Permalink
Merge pull request #217 from technosophos/fix/199-define-errors-for-s…
Browse files Browse the repository at this point in the history
…erver-worker

be explicit about ports for workers and servers
  • Loading branch information
technosophos authored Oct 15, 2019
2 parents 02bfc59 + a788271 commit 95b4430
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions 3.component_model.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@ A Server is used for long-running, scalable workloads that have a network endpoi
- A Server is daemonized. A runtime MUST attempt to restart replicas that exit regardless of error code.
- A Server has a network endpoint with an automatically assigned virtual IP address (VIP) and DNS name addressable within the network scope to which the component belongs.

> If a Server does not provide at least one `port` on at least one `container`, implementations SHOULD emit an error.

##### Singleton Server
Workload type name: `core.oam.dev/v1alpha1.SingletonServer`

Expand All @@ -143,6 +146,8 @@ A Singleton Server is a special case of the Server workload type that is limited
- A Singleton Server is daemonized. A runtime MUST attempt to restart the singleton replica if it exits regardless of error code.
- A Singleton Server has a network endpoint with an automatically assigned virtual IP address (VIP) and DNS name addressable within the network scope to which the component belongs.

> If a Singleton Server does not provide at least one `port` on at least one `container`, implementations SHOULD emit an error.
##### Worker
Workload type name: `core.oam.dev/v1alpha1.Worker`

Expand All @@ -151,13 +156,16 @@ A worker is used for long-running, scalable workloads that do not have a service
- An application operator can increase or decrease the number of worker replicas by applying and configuring traits when available.
- A worker is daemonized. A runtime MUST attempt to restart replicas that exit regardless of error code.

> If a Worker declares a `port` on any `container`, this SHOULD result in a validation error.
##### Singleton Worker
Workload type name: `core.oam.dev/v1alpha1.SingletonWorker`

A singleton worker is a special case of the worker workload type that is limited to at most one replica. The singleton worker workload type as the following characteristics:
- Defines a container runtime where at most one replica of the same container may be run at a time.
- A singleton worker is daemonized. A runtime MUST attempt to restart the singleton replica if it exits regardless of error code.

> If a Singleton Worker declares a `port` on any `container`, this SHOULD result in a validation error.
##### Task
Workload type name: `core.oam.dev/v1alpha1.Task`
Expand Down

0 comments on commit 95b4430

Please sign in to comment.