Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typed actor annotations #1875

Open
devholic opened this issue Apr 19, 2024 · 0 comments
Open

Typed actor annotations #1875

devholic opened this issue Apr 19, 2024 · 0 comments

Comments

@devholic
Copy link
Member

Background

#1872 introduces kargo.akuity.io/create-actor to track who created the given resource.

As @hiddeco pointed out in #1872 (review), we may want to add contextual information to the annotation.

Suggestions

  • Use JSON encoded typed value instead of an actor string

    {
      "actor": "subject:some-user",
      "controlplane": false
    }
    • controlplane field is to indicate whether the resource is created by controlplane (or we can leverage prefixes like this)
  • Introduce kargo.akuity.io/last-update-actor to track who updated it

    • We may merge create/update actor into single annotation (kargo.akuity.io/actor), but I think it's more clear to have separate annotations and it gives us more flexibility when we decided to change annotation structure.
      {
        "created-by": {...},
        "last-updated-by": {...}
      }

Note

  • We should consider that other MutatingWebhooks may affect the typed information
    • Adding type check in validating webhook will be helpful
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants