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

Conversation

mittachaitu
Copy link

@mittachaitu mittachaitu commented Aug 11, 2020

This PR does the following changes:

  • Removes the omitempty tag on CSPI status fields.
    If omitempty tag is provided then default values are
    not shown in the output of kubectl get cspi <cspi_name> -o yaml.
  • Set the priority value as 1 for ALLOCATED and TYPE printer columns.

Without this PR output of cspi:

kubectl get cspi -n openebs
NAME                     HOSTNAME    ALLOCATED   FREE    CAPACITY     READONLY   PROVISIONEDREPLICAS   HEALTHYREPLICAS   TYPE     STATUS   AGE
cstor-sparse-cspc-bwtn   127.0.0.1   81500       9630M   9630081500                                                      mirror   ONLINE   12m

With changes in this PR:

kubectl get cspi -n openebs
NAME                     HOSTNAME          FREE     CAPACITY     READONLY   PROVISIONEDREPLICAS   HEALTHYREPLICAS   STATUS   AGE
cstor-sparse-cspc-bwtn   centos-worker-1   9630M    9630084500   false      0                     0                 ONLINE   24m

For more information about the pool:

kubectl get cspi -n openebs -o wide
 kubectl get cspi -n openebs -o wide
NAME                     HOSTNAME          ALLOCATED   FREE     CAPACITY    READONLY   PROVISIONEDREPLICAS   HEALTHYREPLICAS   TYPE     STATUS   AGE
sparse-based-pool-n5q7   centos-worker-1   89k         9630M    9630089k    false      0                     0                 stripe   ONLINE   28m

Note to reviewers:

  • Deployed the cstor-operator of 1.12.0 version YAMLs and CRDs.
  • Provisioned the CSPC based pool.
  • Upgraded the control plane to use modified CRDs and images(images were built locally).
    Observation: No errors were shown on the logs and able to create CSPI without status.
  • Upgraded the CSPC to the latest version. CSPC was upgraded and no errors were shown

Signed-off-by: mittachaitu sai.chaithanya@mayadata.io

Signed-off-by: mittachaitu <sai.chaithanya@mayadata.io>
Copy link
Contributor

@shubham14bajpai shubham14bajpai left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Contributor

@prateekpandey14 prateekpandey14 left a comment

Choose a reason for hiding this comment

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

lgtm
Zero-values and nil pointers are considered empty. If we want to output a 0, we should have used pointer types something like *int32 , *bool.

…columns

Signed-off-by: mittachaitu <sai.chaithanya@mayadata.io>
@mittachaitu mittachaitu self-assigned this Aug 13, 2020
Copy link
Contributor

@prateekpandey14 prateekpandey14 left a comment

Choose a reason for hiding this comment

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

lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants