GitOpsHQ Docs
Deployment

Projects and Environments

Complete guide to project creation, initialization, environment policies, settings, and access management.

A Project is the primary delivery unit in GitOpsHQ. It groups environments, tenants, workloads, releases, and a hosted Git repository into a single manageable scope. Everything you deploy flows through a project.


Project Concept

Each project encapsulates:

ComponentPurpose
EnvironmentsOrdered deployment stages (inherited from org environments)
TenantsBusiness customers or deployment targets linked from the org tenant registry
WorkloadsHelm chart-based service definitions
Kustomize BindingsKustomize base assignments with per-binding overlays
Manifest BindingsRaw manifest bundle assignments with per-binding overlays
ReleasesVersioned change sets that move through the deploy workflow
HQ VariablesScoped key-value configuration for templating
Hosted Git RepoIn-app Git repository storing all delivery manifests
Loading diagram…

Creating a Project

Define Project Identity

Navigate to Projects (/projects) and click Create Project. Provide:

  • Name: Human-readable project name (e.g., "Payment Gateway")
  • Slug: URL-safe identifier (e.g., payment-gateway). Used in all URLs and API paths.
  • Description (optional): A brief description of what this project delivers.

Select Plan Features

Based on your org plan, certain features (promotion pipelines, notifications, approval policies) may be available. These can be configured later in project settings.

Project Created

The project appears in the project list at /projects. It is in an uninitialized state until the hosted Git repository and environments are set up.


Project Initialization

After creation, a project needs to be initialized before it can be used for delivery. The project detail page guides you through these steps:

Initialize Hosted Git Repository

GitOpsHQ creates a Git repository for the project. This repo stores all generated delivery manifests, user-authored overlays, and Helm values. The repo is fully managed — you interact with it through the UI, in-app editor, or API.

Set Up Environments

Project environments are inherited from the organization's environment definitions. Each project environment gets a reference to the org environment and can have project-specific policies (deploy policy, version policy, freeze state).

Configure Workloads

Add workloads by selecting Helm charts from the org chart registry. Each workload represents a deployable service unit.

Link org tenants to the project. Each tenant can then be assigned to specific environments, creating the tenant-environment matrix where bindings live.

The initialization wizard tracks your progress. You can complete steps in any order, and the project detail page shows which steps are pending.


Project Detail Page

The project detail page (/projects/:slug) is the command center for a project. It surfaces all key information and provides quick access to sub-pages.

Overview Section

The overview shows at a glance:

MetricDescription
TenantsCount of linked tenants and their status
WorkloadsCount of workload definitions and their chart versions
BindingsTotal binding count across all types (workload, kustomize, manifest)
DriftNumber of bindings with detected drift from desired state
Pending UpdatesWorkloads with newer chart versions available
Recent ActivityLatest commits, releases, and deployment events

Quick Actions

ActionRouteDescription
Editor/projects/:slug/editorMonaco-based in-app code editor for the hosted Git repo
Git/projects/:slug/gitFile browser, commit history, and blame view
Compare/projects/:slug/compareDiff viewer for comparing branches or commits
Charts/projects/:slug/chartsManage chart references and versions
Delivery/projects/:slug/deliveryView generated delivery outputs and sync status
Variables/projects/:slug/variablesManage HQ Variables at all scope levels
Settings/projects/:slug/settingsProject configuration and policies

Access Sub-Pages

Sub-PageRouteDescription
IAM/projects/:slug/accessResource permissions, API keys, webhooks
Approvals/projects/:slug/approvalsPending and historical approval requests

Environments

Environments define the ordered stages through which deployments progress. They are the backbone of the promotion pipeline.

Organization vs Project Environments

LevelDefinitionManagement
Org EnvironmentsGlobal stage definitions (e.g., dev, staging, production)Managed in Org Settings
Project EnvironmentsInherited from org + project-specific policiesManaged in Project Settings

Org environments define the canonical set of stages. When a project is created, it inherits these environments. Project environments then add configuration specific to this project's delivery needs.

Per-Environment Policies

Each project environment has three configurable policies:

Controls how deployments reach this environment.

PolicyBehavior
auto-deployChanges are deployed automatically after generation
manual-deployChanges require explicit deploy action from an operator
approval-requiredChanges require approval from designated approvers before deploy

Recommended configuration:

  • dev: auto-deploy (fast iteration)
  • staging: manual-deploy (controlled validation)
  • production: approval-required (governed releases)

Controls which chart versions are eligible for deployment.

PolicyBehavior
latestAlways use the latest chart version available in the registry
pinnedLock to a specific chart version; ignore newer versions
semver-rangeAccept versions matching a semver range (e.g., ^2.0.0)

Recommended configuration:

  • dev: latest (always test newest)
  • staging: semver-range (controlled updates within major version)
  • production: pinned (explicit version control)

Environment freeze blocks all deployments to this environment.

StateEffect
UnfrozenNormal operations; deployments proceed according to deploy policy
FrozenAll deployments are blocked; release creation and promotion into this environment are rejected

When freezing, you must provide a reason (e.g., "Holiday code freeze", "Incident investigation"). The freeze reason is visible on the environment card and in API responses.

Freezing an environment affects all tenants in that environment. There is no per-tenant freeze; it is an environment-wide lock.

Environment Ordering

Environments are ordered. This order defines the promotion direction:

Loading diagram…

You can reorder environments in the project settings. The order affects:

  • Which environment a release can be promoted to (always the next in order)
  • How the promotion pipeline is visualized in the UI
  • The default sequence for bulk operations

Project Settings

Project settings are available at /projects/:slug/settings and organized into tabs.

General Tab

SettingDescription
NameEdit the project display name
DescriptionEdit the project description
Delete ProjectPermanently delete the project and all its resources. May require approval on Enterprise plans.

Pipeline Tab

The pipeline tab provides a visual pipeline editor built with React Flow. It defines the promotion topology:

  • Which environments promote to which
  • Parallel vs sequential promotion paths
  • Gate conditions between stages
Loading diagram…

The visual editor allows drag-and-drop connections between environment nodes, making it easy to model complex promotion flows.

Notifications Tab (Pro)

Configure notification preferences for project events:

EventChannels
Release createdSlack, Discord, Microsoft Teams, Webhook
Deployment succeededSlack, Discord, Microsoft Teams, Webhook
Deployment failedSlack, Discord, Microsoft Teams, Webhook
Approval requestedSlack, Discord, Microsoft Teams, Webhook
Drift detectedSlack, Discord, Microsoft Teams, Webhook
Environment frozen/unfrozenSlack, Discord, Microsoft Teams, Webhook

Escalation policies can route critical events (deployment failures, drift) to dedicated channels or on-call integrations.

IAM Tab

SettingDescription
API KeysProject-scoped API keys for CI/CD integration
WebhooksOutbound webhook targets for project events
Project EnvironmentsPer-environment cluster targeting and policy configuration
Resource PermissionsWho can read, write, and operate within this project

Project Access Management

Resource Permissions

Project access is controlled through resource grants (see Organization and Governance). Common grant presets for projects:

PresetTypical AssigneeActions
project.readViewers, auditorsView project, environments, releases, git
project.authorDevelopersRead + edit values, commit to git, create workloads
project.operatorDevOps engineersAuthor + create releases, manage bindings, deploy
project.approverTech leads, SREsRead + approve/reject releases and promotions
project.adminPlatform leadsFull control including settings and deletion

API Key Management

Project-scoped API keys allow CI/CD pipelines to interact with the project without a user session:

Create API Key

Navigate to Project Settings > IAM > API Keys and create a new key. Specify a name, expiry date, and allowed actions.

Use in CI/CD

Include the API key in your pipeline configuration:

curl -X POST \
  -H "Authorization: Bearer pk_01H5K..." \
  -H "Content-Type: application/json" \
  -d '{"environment":"staging","tenantId":"tenant_01H5K...","title":"Deploy v2.3.1"}' \
  https://app.gitopshq.io/api/v2/projects/{slug}/releases

Monitor Usage

The API key list shows last-used timestamps and IP addresses. Rotate or revoke keys that are no longer needed.

Webhook Configuration

Outbound webhooks notify external systems when project events occur. Each webhook target specifies:

  • URL: The endpoint to receive the webhook payload
  • Events: Which events trigger the webhook
  • Secret: HMAC secret for payload signature verification
  • Active: Enable/disable toggle

Project Git Repository

Every project has a hosted Git repository managed by GitOpsHQ. This repo is the source of truth for all delivery configuration.

File Browser

Navigate to /projects/:slug/git to browse the repository contents. The file browser shows:

  • Directory tree with file/folder navigation
  • File content viewer with syntax highlighting
  • Commit history per file

In-App Editor

The in-app editor (/projects/:slug/editor) is a full-featured Monaco-based code editor:

FeatureDescription
Syntax highlightingYAML, JSON, HCL, and Helm template support
Schema validationReal-time validation against Helm chart schemas
Multi-file editingOpen multiple files in tabs
Batch file writesCommit changes to multiple files in a single operation
Chart scaffoldingGenerate chart boilerplate from templates
HQ Variable insertQuick-insert variable placeholders (e.g., {{hq.var.DB_HOST}})

Git Operations

OperationDescription
CommitCreate a commit with a message (via editor or API)
HistoryView commit log with author, timestamp, and message
Blame (Pro)See line-by-line attribution for any file
DiffCompare any two commits or branches
Batch writeWrite multiple files in a single atomic commit

All changes made through the UI editor, API, or webhooks result in Git commits. The commit history is the complete audit trail of every configuration change.


Common Patterns

PatternProjectsTenantsEnvironmentsDescription
Single-Tenant App11 (default)devstagingprodOne workload set, promoted through stages
Multi-Tenant SaaS1Many (per customer)devstagingprodSame workloads, per-tenant Helm values
Platform TeamMultipleShared across projectsShared org environmentsIndependent projects, centralized governance

Error Reference


Best Practices

  1. Name environments consistently across all projects. Use the org environment definitions as the single source of truth.
  2. Use approval-required for production. Even if your team is small, approval workflows create an audit trail and a pause point for review.
  3. Freeze early, unfreeze explicitly. Use environment freezes during maintenance windows, holidays, and incident investigations.
  4. Keep project scope focused. One project per deployable application or bounded service group. Avoid monolithic projects with dozens of unrelated workloads.
  5. Use the visual pipeline editor to model promotion flows. It makes the deployment topology visible to the entire team.
  6. Rotate API keys on a regular schedule and scope them to the minimum required actions.

On this page