mirror of
https://github.com/helm/helm.git
synced 2026-05-28 04:35:48 -04:00
Consider namespace when comparing resources
Fixes #6857 Signed-off-by: Fabian Ruff <fabian.ruff@sap.com>
This commit is contained in:
parent
bf8318ea0b
commit
7f7e90b407
3 changed files with 3 additions and 3 deletions
|
|
@ -415,5 +415,5 @@ func recreate(cfg *Configuration, resources kube.ResourceList) error {
|
|||
|
||||
func objectKey(r *resource.Info) string {
|
||||
gvk := r.Object.GetObjectKind().GroupVersionKind()
|
||||
return fmt.Sprintf("%s/%s/%s", gvk.GroupVersion().String(), gvk.Kind, r.Name)
|
||||
return fmt.Sprintf("%s/%s/%s/%s", gvk.GroupVersion().String(), gvk.Kind, r.Namespace, r.Name)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -167,7 +167,7 @@ func (c *Client) Update(original, target ResourceList, force bool) (*Result, err
|
|||
}
|
||||
|
||||
kind := info.Mapping.GroupVersionKind.Kind
|
||||
c.Log("Created a new %s called %q\n", kind, info.Name)
|
||||
c.Log("Created a new %s called %q in %s\n", kind, info.Name, info.Namespace)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -81,5 +81,5 @@ func (r ResourceList) Intersect(rs ResourceList) ResourceList {
|
|||
|
||||
// isMatchingInfo returns true if infos match on Name and GroupVersionKind.
|
||||
func isMatchingInfo(a, b *resource.Info) bool {
|
||||
return a.Name == b.Name && a.Mapping.GroupVersionKind.Kind == b.Mapping.GroupVersionKind.Kind
|
||||
return a.Name == b.Name && a.Namespace == b.Namespace && a.Mapping.GroupVersionKind.Kind == b.Mapping.GroupVersionKind.Kind
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue