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

Add ability to skip resources within template when applying #18490

Closed
3 of 4 tasks
jsteenb2 opened this issue Jun 12, 2020 · 1 comment · Fixed by #18595
Closed
3 of 4 tasks

Add ability to skip resources within template when applying #18490

jsteenb2 opened this issue Jun 12, 2020 · 1 comment · Fixed by #18595
Assignees
Labels
area/templates influxdb templates and pkger related issues team/user-tools

Comments

@jsteenb2
Copy link
Contributor

jsteenb2 commented Jun 12, 2020

As a user,
I want the ability to select/unselect resources from a template on application,
so that I can install only the resources I am interested in

Acceptance Criteria

  • HTTP API is extended with the following root field
{
  ... existing fields
  "selection": [
      {
           action: "skipResource",
           properties: {
                resourceTemplateName: RESOURCE_TYPE_NAME,
                kind: RESOURCE_KIND,
           }
      },
      {
           action: "skipKind",
           properties: {
                kind: RESOURCE_KIND,
           }
      },
      ...
   ]
}

note: I really don't like the key selection here... tbd what that key will be

  • each resource provided in the selection collection that has an action "skipResource" will be skipped when applying the pkg
  • all resources matched in the selection collection that has an action "skipKind" will be skipped when applying the pkg

worth exploring before making a decision

  • saving selections of last application in stack (doubting we need this, think the merging of templates makes this likely though)

punting on stack saving it, creates more problems than it solves atm


note: this enables the checkboxes in the template UI experience

@jsteenb2 jsteenb2 added area/templates influxdb templates and pkger related issues team/user-tools labels Jun 12, 2020
@jsteenb2 jsteenb2 self-assigned this Jun 12, 2020
@jsteenb2
Copy link
Contributor Author

jsteenb2 commented Jun 12, 2020

I really like the shape of this API, not specifically what I wrote out above, but the overarching ability to provide selection criteria for resources. There has been an ask for converging resources together (common labels), which we can do transparently, but what we don't have an answer for, until now potentially, is the ability to merge dashboards together from different templates(@samhld / @rbetts have mentioned before). The enabling of skipping of a resource paves the way for that possibility. It could look something like the following:

{
  "selection": [
      {
           "action": "mergeResources",
           "properties": {
                "kind": "Dashboard",
                "resourceTemplateNames": [
                      "DASH_TEMPLATE_NAME_1",
                      "DASH_TEMPLATE_NAME_2"
               ]
           }
      }
   ]
}

In the example above is a simplified(not fully baked out) API for allowing dashboards to be merged, by this I mean the cells can be merged.

jsteenb2 added a commit that referenced this issue Jun 17, 2020
this work is primarily to introduce the state changes internally within
the state coordinator. The coordinator can be unit tested effectively to
verify the actions are being heard.

references: #18490
jsteenb2 added a commit that referenced this issue Jun 17, 2020
this work is primarily to introduce the state changes internally within
the state coordinator. The coordinator can be unit tested effectively to
verify the actions are being heard.

references: #18490
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/templates influxdb templates and pkger related issues team/user-tools
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant