Commit f9908992 authored by Daniel Smith's avatar Daniel Smith

fix annoying 'please check...' messages; remove v1beta1&2 ref

parent 369a1e77
...@@ -262,6 +262,16 @@ const ( ...@@ -262,6 +262,16 @@ const (
ObjectNameField = "metadata.name" ObjectNameField = "metadata.name"
PodHost = "spec.host" PodHost = "spec.host"
SecretType = "type" SecretType = "type"
EventReason = "reason"
EventSource = "source"
EventInvolvedKind = "involvedObject.kind"
EventInvolvedNamespace = "involvedObject.namespace"
EventInvolvedName = "involvedObject.name"
EventInvolvedUID = "involvedObject.uid"
EventInvolvedAPIVersion = "involvedObject.apiVersion"
EventInvolvedResourceVersion = "involvedObject.resourceVersion"
EventInvolvedFieldPath = "involvedObject.fieldPath"
) )
type clientFieldNameToAPIVersionFieldName map[string]string type clientFieldNameToAPIVersionFieldName map[string]string
...@@ -302,45 +312,41 @@ func (v versionToResourceToFieldMapping) filterField(apiVersion, resourceType, f ...@@ -302,45 +312,41 @@ func (v versionToResourceToFieldMapping) filterField(apiVersion, resourceType, f
} }
var fieldMappings = versionToResourceToFieldMapping{ var fieldMappings = versionToResourceToFieldMapping{
"v1beta1": resourceTypeToFieldMapping{ "v1beta3": resourceTypeToFieldMapping{
"nodes": clientFieldNameToAPIVersionFieldName{ "nodes": clientFieldNameToAPIVersionFieldName{
ObjectNameField: "name", ObjectNameField: "metadata.name",
NodeUnschedulable: "unschedulable", NodeUnschedulable: "spec.unschedulable",
}, },
"minions": clientFieldNameToAPIVersionFieldName{ "minions": clientFieldNameToAPIVersionFieldName{
ObjectNameField: "name", ObjectNameField: "metadata.name",
NodeUnschedulable: "unschedulable", NodeUnschedulable: "spec.unschedulable",
}, },
"pods": clientFieldNameToAPIVersionFieldName{ "pods": clientFieldNameToAPIVersionFieldName{
PodHost: "DesiredState.Host", PodHost: "spec.host",
}, },
"secrets": clientFieldNameToAPIVersionFieldName{ "secrets": clientFieldNameToAPIVersionFieldName{
SecretType: "type", SecretType: "type",
}, },
"serviceAccounts": clientFieldNameToAPIVersionFieldName{ "serviceAccounts": clientFieldNameToAPIVersionFieldName{
ObjectNameField: "name", ObjectNameField: "metadata.name",
},
},
"v1beta2": resourceTypeToFieldMapping{
"nodes": clientFieldNameToAPIVersionFieldName{
ObjectNameField: "name",
NodeUnschedulable: "unschedulable",
},
"minions": clientFieldNameToAPIVersionFieldName{
ObjectNameField: "name",
NodeUnschedulable: "unschedulable",
},
"pods": clientFieldNameToAPIVersionFieldName{
PodHost: "DesiredState.Host",
}, },
"secrets": clientFieldNameToAPIVersionFieldName{ "endpoints": clientFieldNameToAPIVersionFieldName{
SecretType: "type", ObjectNameField: "metadata.name",
}, },
"serviceAccounts": clientFieldNameToAPIVersionFieldName{ "events": clientFieldNameToAPIVersionFieldName{
ObjectNameField: "name", ObjectNameField: "metadata.name",
EventReason: "reason",
EventSource: "source",
EventInvolvedKind: "involvedObject.kind",
EventInvolvedNamespace: "involvedObject.namespace",
EventInvolvedName: "involvedObject.name",
EventInvolvedUID: "involvedObject.uid",
EventInvolvedAPIVersion: "involvedObject.apiVersion",
EventInvolvedResourceVersion: "involvedObject.resourceVersion",
EventInvolvedFieldPath: "involvedObject.fieldPath",
}, },
}, },
"v1beta3": resourceTypeToFieldMapping{ "v1": resourceTypeToFieldMapping{
"nodes": clientFieldNameToAPIVersionFieldName{ "nodes": clientFieldNameToAPIVersionFieldName{
ObjectNameField: "metadata.name", ObjectNameField: "metadata.name",
NodeUnschedulable: "spec.unschedulable", NodeUnschedulable: "spec.unschedulable",
...@@ -358,6 +364,21 @@ var fieldMappings = versionToResourceToFieldMapping{ ...@@ -358,6 +364,21 @@ var fieldMappings = versionToResourceToFieldMapping{
"serviceAccounts": clientFieldNameToAPIVersionFieldName{ "serviceAccounts": clientFieldNameToAPIVersionFieldName{
ObjectNameField: "metadata.name", ObjectNameField: "metadata.name",
}, },
"endpoints": clientFieldNameToAPIVersionFieldName{
ObjectNameField: "metadata.name",
},
"events": clientFieldNameToAPIVersionFieldName{
ObjectNameField: "metadata.name",
EventReason: "reason",
EventSource: "source",
EventInvolvedKind: "involvedObject.kind",
EventInvolvedNamespace: "involvedObject.namespace",
EventInvolvedName: "involvedObject.name",
EventInvolvedUID: "involvedObject.uid",
EventInvolvedAPIVersion: "involvedObject.apiVersion",
EventInvolvedResourceVersion: "involvedObject.resourceVersion",
EventInvolvedFieldPath: "involvedObject.fieldPath",
},
}, },
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment