Skip to content

Commit 7f10009

Browse files
committed
KAL: Enable statusoptional and fix
Ensure all status fields have only optional first children. Signed-off-by: Lennart Jern <lennart.jern@est.tech>
1 parent 6111e85 commit 7f10009

4 files changed

Lines changed: 5 additions & 1 deletion

File tree

.golangci-kal.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ linters:
3333
# - "optionalorrequired" # Every field should be marked as optional or required.
3434
# - "requiredfields" # Required fields should not be pointers, and should not have omitempty.
3535
# - "ssatags" # Ensure array fields have the appropriate listType markers.
36-
# - "statusoptional" # Ensure all first children within status should be optional.
36+
- "statusoptional" # Ensure all first children within status should be optional.
3737
- "statussubresource" # All root objects that have a status field should have a status subresource.
3838
- "uniquemarkers" # Ensure that types and fields do not contain more than a single definition of a marker that should only be present once.
3939
- "nophase" # Phase fields are discouraged by the Kube API conventions, use conditions instead.

api/v1beta2/openstackcluster_types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@ type OpenStackClusterStatus struct {
229229
APIServerLoadBalancer *LoadBalancer `json:"apiServerLoadBalancer,omitempty"`
230230

231231
// failureDomains represent OpenStack availability zones
232+
// +optional
232233
FailureDomains []clusterv1.FailureDomain `json:"failureDomains,omitempty"`
233234

234235
// controlPlaneSecurityGroup contains the information about the

api/v1beta2/openstackmachine_types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@ type OpenStackMachineStatus struct {
204204
InstanceID optional.String `json:"instanceID,omitempty"`
205205

206206
// addresses contains the OpenStack instance associated addresses.
207+
// +optional
207208
Addresses []corev1.NodeAddress `json:"addresses,omitempty"`
208209

209210
// instanceState is the state of the OpenStack instance for this machine.

docs/book/src/api/v1beta2/api.md

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)