Skip to content

Commit c5fd572

Browse files
committed
Make resources case-insensitive
1 parent 5343790 commit c5fd572

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/wellknown/utils.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ limitations under the License.
1717
package wellknown
1818

1919
import (
20+
"strings"
21+
2022
"k8s.io/apimachinery/pkg/runtime/schema"
2123
)
2224

@@ -37,6 +39,7 @@ func init() {
3739
// CorrectGroupResource returns the corrected GroupResource and namespaced
3840
func CorrectGroupResource(target schema.GroupResource) (gr schema.GroupResource, namespaced bool, found bool) {
3941
var r *resource
42+
target.Resource = strings.ToLower(target.Resource)
4043
if target.Group == "" {
4144
r, found = nameToResource[target.Resource]
4245
} else {

0 commit comments

Comments
 (0)