Skip to content

PushSecret panics on existing resource policy comparison (AWS SecretsManager) #5620

@cmoscofian

Description

@cmoscofian

Describe the bug
When creating a PushSecret with a defined resourcePolicy against a pre-existing secret with an existing resource policy, the operator panics on the reconciliation due to malformed policy comparison.

To Reproduce
Steps to reproduce the behavior:

  1. Create a secret in AWS secrets manager with a resource policy defined.
  2. Use the following manifests and apply then
  3. Operator version v1.0.0

Expected behavior
Expected to reconcile the existing secret and metadata against the provided manifest.

Screenshots
Image

Additional context
I have a fix in the works locally, that relies on comparing the parsed maps by doing canonical comparison. If you are open to it, I can open a PR with the proposed fix and we could take it up from there.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions