Add "componentstatus" to API for easier cluster health check.

This commit is contained in:
Fabio Yeon
2015-04-15 12:23:02 -07:00
parent aca8452a21
commit 951a125751
26 changed files with 700 additions and 46 deletions

View File

@@ -96,17 +96,19 @@ func (e ShortcutExpander) VersionAndKindForResource(resource string) (defaultVer
// indeed a shortcut. Otherwise, will return resource unmodified.
func expandResourceShortcut(resource string) string {
shortForms := map[string]string{
"po": "pods",
"rc": "replicationcontrollers",
// DEPRECATED: will be removed before 1.0
"se": "services",
"svc": "services",
"mi": "minions",
// Please keep this alphabetized
"cs": "componentstatus",
"ev": "events",
"limits": "limitRanges",
"quota": "resourceQuotas",
"mi": "minions",
"po": "pods",
"pv": "persistentVolumes",
"pvc": "persistentVolumeClaims",
"quota": "resourceQuotas",
"rc": "replicationcontrollers",
// DEPRECATED: will be removed before 1.0
"se": "services",
"svc": "services",
}
if expanded, ok := shortForms[resource]; ok {
return expanded