Merge pull request #101780 from nak3/fix-create-cm

Fix error handling for kubectl create configmap
This commit is contained in:
Kubernetes Prow Robot
2021-05-10 16:39:37 -07:00
committed by GitHub

View File

@@ -215,7 +215,7 @@ func (o *ConfigMapOptions) Validate() error {
func (o *ConfigMapOptions) Run() error {
configMap, err := o.createConfigMap()
if err != nil {
return nil
return err
}
if err := util.CreateOrUpdateAnnotation(o.CreateAnnotation, configMap, scheme.DefaultJSONEncoder()); err != nil {
return err