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
commit 78df56def6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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