Skip to content

Commit d78ef80

Browse files
committed
Stop printing InstanceState for OpenStackMachine
`InstanceState` was copied to the `OpenStackServer` API and the `OpenStackMachine` controller doesn't care about this field anymore. The field still exists for backward compatibility but it was decided long time ago (when we worked on the `OpenStackServer` API) that it wouldn't be populated anymore. We missed to stop printing this field when listing the `OpenStackMachines`. Also, we now document that the field is not populated anymore. This was also a miss.
1 parent 811167b commit d78ef80

File tree

4 files changed

+10
-9
lines changed

4 files changed

+10
-9
lines changed

api/v1beta1/openstackmachine_types.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,8 @@ type OpenStackMachineStatus struct {
199199
Addresses []corev1.NodeAddress `json:"addresses,omitempty"`
200200

201201
// InstanceState is the state of the OpenStack instance for this machine.
202+
// This field is not set anymore by the OpenStackMachine controller.
203+
// Instead, it's set by the OpenStackServer controller.
202204
// +optional
203205
InstanceState *InstanceState `json:"instanceState,omitempty"`
204206

@@ -241,7 +243,6 @@ type OpenStackMachineStatus struct {
241243
// +kubebuilder:resource:path=openstackmachines,scope=Namespaced,categories=cluster-api,shortName=osm
242244
// +kubebuilder:subresource:status
243245
// +kubebuilder:printcolumn:name="Cluster",type="string",JSONPath=".metadata.labels.cluster\\.x-k8s\\.io/cluster-name",description="Cluster to which this OpenStackMachine belongs"
244-
// +kubebuilder:printcolumn:name="InstanceState",type="string",JSONPath=".status.instanceState",description="OpenStack instance state"
245246
// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.ready",description="Machine ready status"
246247
// +kubebuilder:printcolumn:name="ProviderID",type="string",JSONPath=".spec.providerID",description="OpenStack instance ID"
247248
// +kubebuilder:printcolumn:name="Machine",type="string",JSONPath=".metadata.ownerReferences[?(@.kind==\"Machine\")].name",description="Machine object which owns with this OpenStackMachine"

cmd/models-schema/zz_generated.openapi.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/bases/infrastructure.cluster.x-k8s.io_openstackmachines.yaml

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

docs/book/src/api/v1beta1/api.md

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)