fix name ref issue
This commit is contained in:
parent
775ef29560
commit
333d6e8ddf
|
|
@ -116,6 +116,8 @@ spec:
|
|||
ports:
|
||||
- containerPort: 80
|
||||
- envFrom:
|
||||
- configMapRef:
|
||||
name: someConfigMap
|
||||
- configMapRef:
|
||||
name: test-infra-app-env-hf26mf2f2f
|
||||
- secretRef:
|
||||
|
|
|
|||
|
|
@ -23,6 +23,8 @@ spec:
|
|||
- name: busybox
|
||||
image: busybox
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: someConfigMap
|
||||
- configMapRef:
|
||||
name: app-env
|
||||
- secretRef:
|
||||
|
|
|
|||
|
|
@ -61,12 +61,6 @@ func (o *NameReferenceTransformer) Transform(
|
|||
}
|
||||
err := mutateField(objMap, path.Path, path.CreateIfNotPresent,
|
||||
o.updateNameReference(referencePathConfig.referencedGVK, m))
|
||||
// Ignore the error when we can't find the GVKN that is being
|
||||
// referenced, because the missing GVKN may be not included in
|
||||
// this manifest and will be created later.
|
||||
if IsNoMatchingGVKNError(err) {
|
||||
continue
|
||||
}
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
@ -116,7 +110,6 @@ func (o *NameReferenceTransformer) updateNameReference(
|
|||
return obj.GetName(), nil
|
||||
}
|
||||
}
|
||||
return nil, NewNoMatchingGVKNError(
|
||||
fmt.Sprintf("no matching for GroupVersionKind %v and Name %v", GVK, s))
|
||||
return in, nil
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue