-
Notifications
You must be signed in to change notification settings - Fork 22
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
Added Support for Civo Object Store #54
Conversation
return managed.ExternalObservation{ResourceExists: true}, err | ||
} | ||
} | ||
_, err = e.Update(ctx, mg) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should only update if the value of secret's don't match the access key id , etc we got from civo api.
return err | ||
} | ||
objectStore, err := e.civoClient.GetObjectStoreByName(os.Spec.Name) | ||
if err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this function is not idempotent. If the resource does not exist, we should consider it deleted.
// +kubebuilder:resource:shortName="cos" | ||
// +kubebuilder:printcolumn:name="State",type="string",JSONPath=".status.atProvider.status",description="State of the Bucket" | ||
// +kubebuilder:printcolumn:name="Bucket",type="string",JSONPath=".spec.name",description="Name of the Bucket which can be used against S3 API" | ||
// +kubebuilder:printcolumn:name="Size",type="string",JSONPath=".spec.maxSize",description="Size of the Bucket in GB" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it might be better to have used capacity here rather than requested.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again how should we get the used capacity?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's an endpoint at /v2/objectstore/id/stats.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you check if we can display a percentage here? Would be nice to show utilised percentage.
Basically, .status.usedCapacity/.status.maxSize*100
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If not, rather than displaying usedCapacity, let's have utilisedPercentage
in status and drop usedCapacity
UsedCapacity string `json:"usedCapacity"` | ||
|
||
// Status of the Object Store. | ||
Status CivoObjectStoreStatus `json:"status,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Drop this field.
Status CivoObjectStoreStatus `json:"status,omitempty"` | ||
|
||
// Region where the Object Store is located | ||
Region string `json:"region,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we really need this? Isn't it implicit since they've the provider configured to single region?
…r K8s deps. Also…"" This reverts commit 3a288e1.
9c00fea
to
1af7164
Compare
Description of your changes
Fixes #
I have:
make reviewable test
to ensure this PR is ready for review.How has this code been tested