Skip to content

GitOps manual (static) labels: support Fleet host ID #32014

Description

@noahtalerman

Goal

User story
As an IT admin using a public GitOps repository,
I want to assign manual labels to specific hosts using hosts' Fleet ID
so that I can avoid exposing sensitive info, like serial number or UUID, and avoid relying on mutable fields like hostname.

Roadmap item

None.

Original requests

Context

Changes

Product

Engineering

  • Test plan is finalized
  • Contributor API changes: No
  • Feature guide changes: Update the labels guide
  • Database schema migrations: Probably not
  • Load testing: no need
  • Load testing/osquery-perf improvements: no need

ℹ️  Please read this issue carefully and understand it. Pay special attention to UI wireframes, especially "dev notes".

QA

Risk assessment

  • Requires load testing: No
  • Risk level: Low
  • Risk description: Gitops missing hosts due to a bug in the new implementation (low risk)

Test plan

Make sure to go through the list and consider all events that might be related to this story, so we catch edge cases earlier.

  • Add a manual label via GitOps by specifying a list of host ID's, as integers, in the hosts array. See GitOps design here: [YAML design] GitOps manual (static) labels: support Fleet host ID #32456
  • Try adding a manual label by specifying a list of host ID's as strings in the hosts array. Verify that only hosts with a matching hardware_serial, uuid, or hostname are added to the label.
  • Edit the manual label by removing/adding host ID's. Verify that the label is edited.
  • Try specifying all combinations of more than one of query, hosts, or criteria. Verify you see the same easy to understand error message each time.
  • Try specifying platform with both label_membership_type set to manual and criteria. Verify you see an easy to understand error message.
  • Try specifying an invalid platform. Verify you see an easy to understand error message.
  • Add a manual label with a mix of host identifiers (id, hardware_serial, uuid, or hostname). Verify the label is added.
  • Add a manual label with a mix of host identifiers (id, hardware_serial, uuid, or hostname) and at least two of the different identifiers are for the same host. Verify the label is added and the host that was specified twice is a member of the label.
  • fleetctl generate-gitops: Verify that the manual labels generated use host IDs for the hosts list.

Testing notes

Confirmation

  1. Engineer: Added comment to user story confirming successful completion of test plan.
  2. QA: Added comment to user story confirming successful completion of test plan.

Metadata

Metadata

Assignees

Labels

#g-orchestrationOrchestration product group:productProduct Design department (shows up on 🦢 Drafting board)storyA user story defining an entire feature

Type

No type

Projects

Status
Done
Status
Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions