Skip to content

Commit

Permalink
Update optional fields in controller contracts
Browse files Browse the repository at this point in the history
  • Loading branch information
Jont828 committed Oct 21, 2022
1 parent 1917d52 commit 20ed1a1
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 4 deletions.
5 changes: 5 additions & 0 deletions docs/book/src/developer/architecture/controllers/cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ The `status` object **may** define several fields that do not affect functionali

* `failureReason` - is a string that explains why a fatal error has occurred, if possible.
* `failureMessage` - is a string that holds the message contained by the error.
* `failureDomains` - is a `FailureDomains` type indicating the failure domains that machines should be placed in. `FailureDomains`
is a map, defined as `map[string]FailureDomainSpec`. A unique key must be used for each `FailureDomainSpec`.
`FailureDomainSpec` is defined as:
- `controlPlane` (bool): indicates if failure domain is appropriate for running control plane instances.
- `attributes` (`map[string]string`): arbitrary attributes for users to apply to a failure domain.

Example:
```yaml
Expand Down
11 changes: 11 additions & 0 deletions docs/book/src/developer/architecture/controllers/machine.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,12 @@ The `spec` object **must** at least one field defined:

* `providerID` - a cloud provider ID identifying the machine.

#### Optional `spec` fields

The `spec` object **may** define several fields that do not affect functionality if missing:

* `failureDomain` - is a string identifying the failure domain the instance is running in.

#### Required `status` fields

The `status` object **must** at least one field defined:
Expand All @@ -93,6 +99,11 @@ The `status` object **may** define several fields that do not affect functionali

* `failureReason` - is a string that explains why a fatal error has occurred, if possible.
* `failureMessage` - is a string that holds the message contained by the error.
* `addresses` - is a `MachineAddresses` (a list of `MachineAddress`) which represents host names, external IP addresses, internal IP addresses,
external DNS names, and/or internal DNS names for the provider's machine instance. `MachineAddress` is
defined as:
- `type` (string): one of `Hostname`, `ExternalIP`, `InternalIP`, `ExternalDNS`, `InternalDNS`
- `address` (string)

Example:
```yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ A cluster infrastructure provider must define an API type for "infrastructure cl
meant to be suitable for programmatic interpretation
2. `failureMessage` (string): indicates there is a fatal problem reconciling the provider's infrastructure;
meant to be a more descriptive value than `failureReason`
3. `failureDomains` (`failureDomains`): the failure domains that machines should be placed in. `failureDomains`
3. `failureDomains` (`FailureDomains`): the failure domains that machines should be placed in. `FailureDomains`
is a map, defined as `map[string]FailureDomainSpec`. A unique key must be used for each `FailureDomainSpec`.
`FailureDomainSpec` is defined as:
- `controlPlane` (bool): indicates if failure domain is appropriate for running control plane instances.
Expand Down
6 changes: 3 additions & 3 deletions docs/book/src/developer/providers/machine-infrastructure.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ A machine infrastructure provider must define an API type for "infrastructure ma
meant to be suitable for programmatic interpretation
2. `failureMessage` (string): indicates there is a fatal problem reconciling the provider's infrastructure;
meant to be a more descriptive value than `failureReason`
3. `addresses` (`MachineAddress`): a list of the host names, external IP addresses, internal IP addresses,
3. `addresses` (`MachineAddresses`): a list of the host names, external IP addresses, internal IP addresses,
external DNS names, and/or internal DNS names for the provider's machine instance. `MachineAddress` is
defined as:
- `type` (string): one of `Hostname`, `ExternalIP`, `InternalIP`, `ExternalDNS`, `InternalDNS`
- `address` (string)
- `type` (string): one of `Hostname`, `ExternalIP`, `InternalIP`, `ExternalDNS`, `InternalDNS`
- `address` (string)
7. Should have a conditions field with the following:
1. A Ready condition to represent the overall operational state of the component. It can be based on the summary of more detailed conditions existing on the same object, e.g. instanceReady, SecurityGroupsReady conditions.

Expand Down

0 comments on commit 20ed1a1

Please sign in to comment.