Skip to content

unnecessary reconcile because of dependent HPA resource #465

@andrascz

Description

@andrascz

Using the 0.8.0 version of the plugin.

I have a helm chart with HPA resources in it. While no change is made on the HPA resource, still a reconciliation is triggered, because when comparing old and updated, the metadata.managedFields.["subresource" == "status"].time field differs.

The status and metadata.resourceVersion fields are already removed before comparison. I think the object with subresource == 'status' should be also removed from metadata.managedFields before comparison.
See: https://github.com/operator-framework/helm-operator-plugins/blob/v0.8.0/pkg/internal/predicate/predicates.go#L72

I am not sure if fixing by this would be correct.

	unstructured.RemoveNestedField(old.Object, "metadata", "managedFields")
	unstructured.RemoveNestedField(updated.Object, "metadata", "managedFields")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions