Skip to content
This repository was archived by the owner on Jul 29, 2026. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 24 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,39 @@
# Fleet GitOps

This is the starter repository for using [Fleet](https://fleetdm.com) with a GitOps workflow.
> [!IMPORTANT]
> **This repository is deprecated and will be archived.** The recommended way to start a Fleet GitOps repository is now the `fleetctl new` command, which generates an up-to-date starter directory with CI/CD workflows for GitHub Actions and GitLab.
>
> Repositories already cloned from here keep working, and this repo stays available for reference, but it no longer receives updates. New repositories should use `fleetctl new` (see [Getting started](#getting-started) below).

This was the starter repository for using [Fleet](https://fleetdm.com) with a GitOps workflow.

[Why use GitOps?](https://fleetdm.com/guides/sysadmin-diaries-gitops-a-strategic-advantage)

## GitHub setup
## Getting started

To start a new Fleet GitOps repository, install [`fleetctl`](https://fleetdm.com/guides/fleetctl#installing-fleetctl) and run `fleetctl new`. The [manage devices as code](https://fleetdm.com/docs/configuration/yaml-files) reference in the Fleet docs walks through the full setup and every configuration option.

## GitOps mode

Once you're set up with GitOps in Fleet, you can optionally put the UI in GitOps mode. This prevents you from making changes in the UI that would be overridden by GitOps workflows.

An admin can enable GitOps mode in **Settings** > **Integrations** > **Change management**.

Note that this is a UI-only setting. API permissions are restricted based on user role.

## Legacy setup

The steps below apply to repositories that were already cloned from this starter. New repositories should use `fleetctl new` instead.

### GitHub setup

1. Clone the [GitHub repository](https://github.com/fleetdm/fleet-gitops), create your own GitHub repository, and push your clone to your new repo. Note that a workflow will run once and fail because the required variables haven't been added (step 2).

2. Add `FLEET_URL` and `FLEET_API_TOKEN` secrets to your new repository's secrets. Learn how [here](https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions#creating-secrets-for-a-repository). Set `FLEET_URL` to your Fleet instance's URL (ex. https://organization.fleet.com). [Create an API-only user](https://fleetdm.com/docs/using-fleet/fleetctl-cli#create-api-only-user) with the "GitOps" role and set `FLEET_API_TOKEN` to your user's API token. If you're using Fleet Free, set the API-only user's role to global admin.

3. In GitHub, enable the `Apply latest configuration to Fleet` GitHub Actions workflow, and run workflow manually. Now, when anyone pushes a new commit to the default branch, the action will run and update Fleet. For pull requests, the workflow will do a dry run only.

## GitLab setup
### GitLab setup

1. Clone the [GitLab repository](https://gitlab.com/fleetdm/fleet-gitops), create your own GitLab repository, and push your clone to your new repo. Note that a pipeline will run once and fail because the required variables haven't been added (step 2).

Expand All @@ -29,15 +50,3 @@ This is the starter repository for using [Fleet](https://fleetdm.com) with a Git
- **Interval pattern**: e.g., Custom: `0 6 * * *` (runs nightly at 6AM UTC)
- **Target branch or tag**: your default branch (e.g., `main`)
- Click **Create pipeline schedule**.

## Configuration options

For all configuration options, go to the [YAML files reference](https://fleetdm.com/docs/using-fleet/gitops) in the Fleet docs.

## GitOps mode

Once you're set up with GitOps in Fleet, you can optionally put the UI in GitOps mode. This prevents you from making changes in the UI that would be overridden by GitOps workflows.

An admin can enable GitOps mode in **Settings** > **Integrations** > **Change management**.

Note that this is a UI-only setting. API permissions are restricted based on user role.
Loading