Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions api/clusters/v1alpha1/cluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ type ClusterStatus struct {
// Phase is the current phase of the cluster.
Phase ClusterPhase `json:"phase"`

// APIServer is the API server endpoint of the cluster.
// +optional
APIServer string `json:"apiServer,omitempty"`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the field is optional, should the string rather be *string?

Suggested change
APIServer string `json:"apiServer,omitempty"`
APIServer *string `json:"apiServer,omitempty"`

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the +optional doesn't do anything in this case.
I would prefer to work with string instead of *string, because it is easier (one doesn't have to check for nil pointers all the time).


// ProviderStatus is the provider-specific status of the cluster.
// x-kubernetes-preserve-unknown-fields: true
// +optional
Expand Down
3 changes: 3 additions & 0 deletions api/crds/manifests/clusters.openmcp.cloud_clusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,9 @@ spec:
status:
description: ClusterStatus defines the observed state of Cluster
properties:
apiServer:
description: APIServer is the API server endpoint of the cluster.
type: string
conditions:
description: Conditions contains the conditions.
items:
Expand Down