Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(crd): remove omitempty tag from CSPI status fields #63

Merged
merged 2 commits into from
Aug 13, 2020
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
6 changes: 6 additions & 0 deletions config/crds/all-crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,7 @@ spec:
description: The amount of storage space within the pool that has been physically
allocated
name: Allocated
priority: 1
type: string
- JSONPath: .status.capacity.free
description: The amount of usable free space available in the pool
Expand All @@ -533,6 +534,7 @@ spec:
- JSONPath: .spec.poolConfig.dataRaidGroupType
description: Represents the type of the storage pool
name: Type
priority: 1
type: string
- JSONPath: .status.phase
description: Identifies the current health of the pool
Expand Down Expand Up @@ -884,6 +886,10 @@ spec:
readOnly:
description: ReadOnly if pool is readOnly or not
type: boolean
required:
- healthyReplicas
- provisionedReplicas
- readOnly
type: object
versionDetails:
description: VersionDetails is the openebs version.
Expand Down
6 changes: 6 additions & 0 deletions config/crds/bases/cstor.openebs.io_cstorpoolinstances.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ spec:
description: The amount of storage space within the pool that has been physically
allocated
name: Allocated
priority: 1
type: string
- JSONPath: .status.capacity.free
description: The amount of usable free space available in the pool
Expand All @@ -41,6 +42,7 @@ spec:
- JSONPath: .spec.poolConfig.dataRaidGroupType
description: Represents the type of the storage pool
name: Type
priority: 1
type: string
- JSONPath: .status.phase
description: Identifies the current health of the pool
Expand Down Expand Up @@ -392,6 +394,10 @@ spec:
readOnly:
description: ReadOnly if pool is readOnly or not
type: boolean
required:
- healthyReplicas
- provisionedReplicas
- readOnly
type: object
versionDetails:
description: VersionDetails is the openebs version.
Expand Down
10 changes: 5 additions & 5 deletions pkg/apis/cstor/v1/cstorpoolinstance.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ import (
// +kubebuilder:object:root=true
// +kubebuilder:resource:scope=Namespaced,shortName=cspi
// +kubebuilder:printcolumn:name="HostName",type=string,JSONPath=`.spec.hostName`,description="Host name where cstorpool instances scheduled"
// +kubebuilder:printcolumn:name="Allocated",type=string,JSONPath=`.status.capacity.used`,description="The amount of storage space within the pool that has been physically allocated"
// +kubebuilder:printcolumn:name="Allocated",type=string,JSONPath=`.status.capacity.used`,description="The amount of storage space within the pool that has been physically allocated",priority=1
// +kubebuilder:printcolumn:name="Free",type=string,JSONPath=`.status.capacity.free`,description="The amount of usable free space available in the pool"
// +kubebuilder:printcolumn:name="Capacity",type=string,JSONPath=`.status.capacity.total`,description="Total amount of usable space in pool"
// +kubebuilder:printcolumn:name="ReadOnly",type=boolean,JSONPath=`.status.readOnly`,description="Identifies the pool read only mode"
// +kubebuilder:printcolumn:name="ProvisionedReplicas",type=integer,JSONPath=`.status.provisionedReplicas`,description="Represents no.of replicas present in the pool"
// +kubebuilder:printcolumn:name="HealthyReplicas",type=integer,JSONPath=`.status.healthyReplicas`,description="Represents no.of healthy replicas present in the pool"
// +kubebuilder:printcolumn:name="Type",type=string,JSONPath=`.spec.poolConfig.dataRaidGroupType`,description="Represents the type of the storage pool"
// +kubebuilder:printcolumn:name="Type",type=string,JSONPath=`.spec.poolConfig.dataRaidGroupType`,description="Represents the type of the storage pool",priority=1
// +kubebuilder:printcolumn:name="Status",type=string,JSONPath=`.status.phase`,description="Identifies the current health of the pool"
// +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`,description="Age of CStorPoolInstance"
type CStorPoolInstance struct {
Expand Down Expand Up @@ -117,13 +117,13 @@ type CStorPoolInstanceStatus struct {
// Capacity describes the capacity details of a cstor pool
Capacity CStorPoolInstanceCapacity `json:"capacity,omitempty"`
//ReadOnly if pool is readOnly or not
ReadOnly bool `json:"readOnly,omitempty"`
ReadOnly bool `json:"readOnly"`
// ProvisionedReplicas describes the total count of Volume Replicas
// present in the cstor pool
ProvisionedReplicas int32 `json:"provisionedReplicas,omitempty"`
ProvisionedReplicas int32 `json:"provisionedReplicas"`
// HealthyReplicas describes the total count of healthy Volume Replicas
// in the cstor pool
HealthyReplicas int32 `json:"healthyReplicas,omitempty"`
HealthyReplicas int32 `json:"healthyReplicas"`
}

// CStorPoolInstanceCapacity stores the pool capacity related attributes.
Expand Down