Implement PR-1 review comments

This commit is contained in:
faizanahmad055
2018-07-11 20:20:48 +05:00
parent ade1e48e34
commit 848745f40a
8 changed files with 257 additions and 191 deletions

View File

@@ -5,19 +5,6 @@ import (
"k8s.io/apimachinery/pkg/runtime"
)
const (
DefaultResource = "default"
)
// MapToRuntimeObject maps the resource type string to the actual resource
func MapToRuntimeObject(resourceType string) runtime.Object {
rType, ok := ResourceMap[resourceType]
if !ok {
return ResourceMap[DefaultResource]
}
return rType
}
// ResourceMap are resources from where changes are going to be detected
var ResourceMap = map[string]runtime.Object{
"configMaps": &v1.ConfigMap{},