-
-
Notifications
You must be signed in to change notification settings - Fork 307
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
client.request should also return the statuscode #28
Comments
Have brute-forced this in. I'm assuming it's hideable by #23 for an easier interface. |
Need to rethink this a bit for 0.8.0. The tuple is awkward in most cases. It seems that delete_collection + delete is super weird: https://docs.rs/k8s-openapi/0.4.0/src/k8s_openapi/v1_13/api/apps/v1/deployment.rs.html pub enum DeleteNamespacedDeploymentResponse {
OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status),
OkValue(crate::v1_13::api::apps::v1::Deployment),
Accepted(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status),
Unauthorized,
Other,
}
pub enum DeleteNamespacedDeploymentResponse {
OkStatus(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status),
OkValue(crate::v1_13::api::apps::v1::Deployment),
Accepted(crate::v1_13::apimachinery::pkg::apis::meta::v1::Status),
Unauthorized,
Other,
}
pub enum CreateNamespacedDeploymentResponse {
Ok(crate::v1_13::api::apps::v1::Deployment),
Created(crate::v1_13::api::apps::v1::Deployment),
Accepted(crate::v1_13::api::apps::v1::Deployment),
Unauthorized,
Other,
}
pub enum ReplaceNamespacedDeploymentResponse { // dittof for DeploymentStatus
Ok(crate::v1_13::api::apps::v1::Deployment),
Created(crate::v1_13::api::apps::v1::Deployment),
Unauthorized,
Other,
} need to find appropriate kube docs to cross-reference.. |
OkStatus is actually not that weird! It's what we've called By reading the api conventions doc we can see that it's actually returned on successful deletes as well! Although I've not actually seen an API call return that. Probably need some better tests. |
We often need a way to distinguish from
CREATED
,ACCEPTED
, andOK
as these often map to kube notions such as "configured", "created", "unchanged".Document the common results in
.create()
,.replace()
etc.The text was updated successfully, but these errors were encountered: