mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-10 21:50:05 +00:00
Check for an empty value in validateField
reflect.TypeOf() can take a nil (it then returns a nil), but Kind() panics on a nil. Fixes #20627
This commit is contained in:
20
hack/testdata/invalid-rc-with-empty-args.yaml
vendored
Normal file
20
hack/testdata/invalid-rc-with-empty-args.yaml
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
apiVersion: v1
|
||||
kind: ReplicationController
|
||||
metadata:
|
||||
name: kube-dns-v10
|
||||
namespace: kube-system
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
k8s-app: kube-dns
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
k8s-app: kube-dns
|
||||
spec:
|
||||
containers:
|
||||
- name: carbon-relay
|
||||
image: banno/carbon-relay
|
||||
args:
|
||||
-
|
||||
# above is the empty arg string.
|
Reference in New Issue
Block a user