Skip to content

Commit 20ed1a1

Browse files
committed
Update optional fields in controller contracts
1 parent 1917d52 commit 20ed1a1

File tree

4 files changed

+20
-4
lines changed

4 files changed

+20
-4
lines changed

docs/book/src/developer/architecture/controllers/cluster.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ The `status` object **may** define several fields that do not affect functionali
4444

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

4853
Example:
4954
```yaml

docs/book/src/developer/architecture/controllers/machine.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,12 @@ The `spec` object **must** at least one field defined:
8181

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

84+
#### Optional `spec` fields
85+
86+
The `spec` object **may** define several fields that do not affect functionality if missing:
87+
88+
* `failureDomain` - is a string identifying the failure domain the instance is running in.
89+
8490
#### Required `status` fields
8591

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

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

97108
Example:
98109
```yaml

docs/book/src/developer/providers/cluster-infrastructure.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ A cluster infrastructure provider must define an API type for "infrastructure cl
3030
meant to be suitable for programmatic interpretation
3131
2. `failureMessage` (string): indicates there is a fatal problem reconciling the provider's infrastructure;
3232
meant to be a more descriptive value than `failureReason`
33-
3. `failureDomains` (`failureDomains`): the failure domains that machines should be placed in. `failureDomains`
33+
3. `failureDomains` (`FailureDomains`): the failure domains that machines should be placed in. `FailureDomains`
3434
is a map, defined as `map[string]FailureDomainSpec`. A unique key must be used for each `FailureDomainSpec`.
3535
`FailureDomainSpec` is defined as:
3636
- `controlPlane` (bool): indicates if failure domain is appropriate for running control plane instances.

docs/book/src/developer/providers/machine-infrastructure.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ A machine infrastructure provider must define an API type for "infrastructure ma
3737
meant to be suitable for programmatic interpretation
3838
2. `failureMessage` (string): indicates there is a fatal problem reconciling the provider's infrastructure;
3939
meant to be a more descriptive value than `failureReason`
40-
3. `addresses` (`MachineAddress`): a list of the host names, external IP addresses, internal IP addresses,
40+
3. `addresses` (`MachineAddresses`): a list of the host names, external IP addresses, internal IP addresses,
4141
external DNS names, and/or internal DNS names for the provider's machine instance. `MachineAddress` is
4242
defined as:
43-
- `type` (string): one of `Hostname`, `ExternalIP`, `InternalIP`, `ExternalDNS`, `InternalDNS`
44-
- `address` (string)
43+
- `type` (string): one of `Hostname`, `ExternalIP`, `InternalIP`, `ExternalDNS`, `InternalDNS`
44+
- `address` (string)
4545
7. Should have a conditions field with the following:
4646
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.
4747

0 commit comments

Comments
 (0)