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

Automated backport of #983: Extend CreateOrUpdate to allow mutating before create #1001: Add IdentfyingLabels to CreateOrUpdateWithOptions #1005

Commits on Oct 7, 2024

  1. Extend CreateOrUpdate to allow mutating before create

    The user may want to dynamically modify the resource before creating
    instead of populating all fields up front. This is useful if populating
    a field incurs some expense that should only be done if needed.
    
    Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
    tpantelis committed Oct 7, 2024
    Configuration menu
    Copy the full SHA
    2537319 View commit details
    Browse the repository at this point in the history
  2. Add IdentfyingLabels to CreateOrUpdateWithOptions

    If the GenerateName field is set in the target resource, the
    existing resource is searched for by the target's labels. However
    this assumes the labels remain static for the lifetime of the
    resource. If the labels are updated then the existing resource is
    not found and a new one is created. To avoid this, allow the user
    to specify which labels uniquely identify the resource by adding
    an IdentfyingLabels field to CreateOrUpdateOptions.
    
    Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
    tpantelis committed Oct 7, 2024
    Configuration menu
    Copy the full SHA
    184d8f9 View commit details
    Browse the repository at this point in the history