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

introduce group option to apply descendants in groups #234

Merged
merged 1 commit into from
Sep 25, 2023

Conversation

mruoss
Copy link
Collaborator

@mruoss mruoss commented Sep 25, 2023

Adds a group option to Bonny.Axn.register_descendant/3. This option controls in what group the descendant is applied. Groups are applied in ascending order. Resources within a group are applied simultaneously.

This option only needs to be specified if some resources must exist before others can be applied.

Example

  ns = %{
    "apiVersion" => "v1",
    "kind" => "namespace",
    "metadata" => %{"name" => "my_ns"}
  }
  pod = %{
    "apiVersion" => "v1",
    "kind" => "pod",
    "metadata" => %{"namespace" => "my_ns", "name" => "my_pod"},
    ...
  }

  axn
  |> Bonny.Axn.register_descendant(resource, ns, group: -1, omit_owner_ref: true)
  |> Bonny.Axn.register_descendant(resource, pod)

Solves #232.

@mruoss mruoss linked an issue Sep 25, 2023 that may be closed by this pull request
@mruoss mruoss merged commit 60d888b into master Sep 25, 2023
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error with dependent resources
1 participant