mirror of
https://github.com/stakater/Reloader.git
synced 2026-02-14 18:09:50 +00:00
Implement PR-1 review comments
This commit is contained in:
@@ -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{},
|
||||
|
||||
Reference in New Issue
Block a user