-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #149 from cgwalters/drop-kube
Drop k8s-openapi and kube crates
- Loading branch information
Showing
5 changed files
with
72 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
//! Subset of API definitions for selected Kubernetes API types. | ||
//! We avoid dragging in all of k8s-openapi because it's *huge*. | ||
use std::collections::BTreeMap; | ||
|
||
use serde::{Deserialize, Serialize}; | ||
|
||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq)] | ||
#[serde(rename_all = "camelCase")] | ||
pub struct Resource { | ||
pub api_version: String, | ||
pub kind: String, | ||
#[serde(default)] | ||
pub metadata: ObjectMeta, | ||
} | ||
|
||
#[derive(Serialize, Deserialize, Default, Debug, Clone, PartialEq, Eq)] | ||
#[serde(rename_all = "camelCase")] | ||
pub struct ObjectMeta { | ||
#[serde(skip_serializing_if = "Option::is_none")] | ||
pub annotations: Option<BTreeMap<String, String>>, | ||
#[serde(skip_serializing_if = "Option::is_none")] | ||
pub labels: Option<BTreeMap<String, String>>, | ||
#[serde(skip_serializing_if = "Option::is_none")] | ||
pub name: Option<String>, | ||
#[serde(skip_serializing_if = "Option::is_none")] | ||
pub namespace: Option<String>, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters