fleet/articles/gitops-mode-software.md

2.7 KiB

Manage software using GitOps

This guide is a walkthrough on how to manage software using GitOps. In Fleet, there are three types of software: Fleet-maintained apps, app store apps, and custom packages.

When using GitOps, you can optionally put Fleet in GitOps mode. This prevents you from making changes in the UI that would be overridden by GitOps workflows.

Custom packages

To manage custom packages via GitOps, please see the packages in Fleet's GitOps docs.

For script packages (.sh and .ps1 files), the install_script, uninstall_script, post_install_script, and pre_install_query fields are not supported and will be ignored. The script file's contents become the install script. Learn more in the deploy software guide.

If you want to use Fleet to host custom packages instead of a third-party package hosting tool (ex. Artifactory), first turn GitOps mode on in Settings > Integration > Change management

  1. Navigate to Software and select a fleet. Then select Add Software > Custom package
  2. Select a fleet and choose a file to upload and select Add software
  3. A modal will appear with YAML instructions.
    1. Create a YAML file with the suggested filename and populate it with the contents below.
    2. Save this file to your repository.
    3. Make sure that the package YAML is referenced from your fleet YAML.
    4. Download the additional queries and scripts that are linked in the modal and add them to your repository. Make sure to use the paths listed in the contents area above.

App store apps

To manage Apple App Store (VPP) or Android Google Play apps via GitOps, please see the app_store_apps in Fleet's best practice GitOps docs. Note that VPP apps must first be added to Apple Business Manager.

Fleet-maintained apps

To manage Fleet-maintained apps via GitOps, please see the fleet_maintained_apps in Fleet's best practice GitOps docs.