-
Notifications
You must be signed in to change notification settings - Fork 747
Add support for Fleet-maintained app slugs in policies via GitOps #37717
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
Draft
allenhouchins
wants to merge
7
commits into
main
Choose a base branch
from
34492-add-ability-to-set-a-fleet-maintained-app-as-an-install-software-automation-in-a-policy-via-gitops
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
+212
−13
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This update allows specifying a Fleet-maintained app via the 'slug' field in the 'install_software' section of policy YAML, in addition to existing options. Documentation and validation logic are updated to reflect this, and relevant code paths now resolve slugs to software_title_id for policy application. Tests are added to ensure correct validation and behavior.
install_software section of policies
Updated policy validation to ensure 'slug' and 'hash_sha256' cannot be set together in install_software. Added corresponding test coverage. Improved logging in client to only warn about missing Fleet-maintained app slugs if the fetch succeeded, avoiding false warnings when license errors occur.
install_software section of policies
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #37717 +/- ##
==========================================
- Coverage 65.88% 65.87% -0.01%
==========================================
Files 2361 2361
Lines 187305 187363 +58
Branches 8011 8011
==========================================
+ Hits 123401 123423 +22
- Misses 52622 52650 +28
- Partials 11282 11290 +8
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request adds support for referencing Fleet-maintained apps (FMAs) in policy-driven software installation using a new
slugfield in theinstall_softwaresection of policy YAML. It updates the GitOps tooling, validation, documentation, and supporting code to enable FMAs to be installed automatically via policies, alongside existing options (custom packages and App Store apps). It also ensures correct validation, mapping, and error handling for the new field.GitOps and Policy Processing Enhancements:
slugfield in theinstall_softwaresection of policy YAML, allowing policies to trigger installation of Fleet-maintained apps by referencing their slug (e.g.,intune-company-portal/darwin). The code ensures only one ofpackage_path,app_store_id, orslugcan be specified. [1] [2]slugvalues to software title IDs using a newFMASlugMap, and to output the correct YAML for FMAs. [1] [2] [3] [4]slugvalues to the correct software title IDs, with proper error handling and logging if the slug is not found or FMAs are not available for the team. [1] [2]ListFleetMaintainedAppsto retrieve available FMAs for a team. [1] [2]Validation and Testing:
slugis only used on team policies, cannot be combined with other install options, and is required if no other install fields are set.slugfield in policy specs. [1] [2]Documentation Updates:
slugoption ininstall_software, with examples and instructions for using FMAs in policies. [1] [2] [3] [4]These changes make it possible to automate the installation of Fleet-maintained apps via policies using a simple and consistent workflow.
Related issue: Resolves #34492
Checklist for submitter
If some of the following don't apply, delete the relevant line.
Changes file added for user-visible changes in
changes/,orbit/changes/oree/fleetd-chrome/changes.See Changes files for more information.
Input data is properly validated,
SELECT *is avoided, SQL injection is prevented (using placeholders for values in statements)If paths of existing endpoints are modified without backwards compatibility, checked the frontend/CLI for any necessary changes
Testing
Added/updated automated tests
Where appropriate, automated tests simulate multiple hosts and test for host isolation (updates to one hosts's records do not affect another)
QA'd all new/changed functionality manually
For unreleased bug fixes in a release candidate, one of:
Database migrations
COLLATE utf8mb4_unicode_ci).New Fleet configuration settings
If you didn't check the box above, follow this checklist for GitOps-enabled settings:
fleetctl generate-gitopsfleetd/orbit/Fleet Desktop
runtime.GOOSis used as needed to isolate changes