Freeze deployments
Set freeze windows for deployments.
This topic covers the Harness deployment freeze feature, including how to configure freeze windows, access controls, notifications, and best practices.
What you will learn from this topic
How to create a freeze window
How deployment freeze affects automated pipeline rollback
How to set up role-based access to freeze windows by environment type
Before you begin
Before you begin, make sure you have the following:
Deployment freeze is a CD-only feature. Go to Freeze windows only apply to CD stages to review their scope.
Your Harness user account must use a role with the Deployment Freeze permissions described in Access control.
Deployment freeze limitations
Deployment freeze has the following limitations:
Deployment freeze does not apply to Harness GitOps PR pipelines.
You cannot edit enabled deployment freeze windows. If the deployment freeze window you want to change is enabled, you must first disable it, make your changes, and then re-enable it.
Account admins will always be able to bypass deployment freeze windows.
Deployment freeze summary
If you are new to deployment freezes, review the following summary.
Harness freeze windows
In Harness, you set up a deployment freeze as a freeze window.
A freeze window is defined using one or more rules and a schedule. The rules define the Harness orgs, projects, services, and environments to freeze.

The schedule defines when to freeze deployments and the recurrence, if any (yearly, monthly, etc.).

Freeze window scope
Freeze windows can be set at the Harness account, org, or project levels, with the following differences:
Account: Rules can apply to specific, multiple, or all services or environments in the account.
Org: Rules can apply to specific, multiple, or all services or environments in the org.
Project: Rules can apply to specific, multiple, or all services, environments, or pipelines in the project.
Exceptions
For each scope level, you can select all subordinate entities and then add exceptions. For example, you can select All Projects at the org level, but then select one or more projects as exceptions.
Exceptions save you the time of selecting multiple subordinate entities individually.
Freeze by infrastructure definition
By default, a rule that targets a specific environment freezes every infrastructure definition in that environment. Freeze by infrastructure narrows a rule to one or more specific infrastructure definitions within an environment, so deployments to the rest of the environment's infrastructure definitions are not affected.
This helps when multiple teams share an environment but own different infrastructure definitions within it. You can freeze the infrastructure definitions one team owns without blocking deployments to the infrastructure definitions other teams own in the same environment.
In a rule, after you select one or more specific environments (not All Environments), an Infrastructures row appears below each selected environment.
To freeze every infrastructure definition in the environment, leave All Infrastructures checked. This is the existing environment-level freeze behavior.
To freeze only specific infrastructure definitions, clear All Infrastructures, and then select the infrastructure definitions to freeze in the box that appears.
Add an Infrastructure entity to the rule. An infrastructure definition has no scope of its own, so its reference combines the environment reference and the infrastructure identifier, separated by a dot: <environmentReference>.<infrastructureIdentifier>.
Prefix the reference with org. or account. to reference an environment at the org or account scope, for example org.staging.primary or account.staging.primary.
Pipelines already running
If a pipeline is running and a freeze occurs, it will continue to run until the current stage has executed. Once that stage executes, the freeze is implemented, and no further stages will execute.
Pipelines that become frozen during execution and cannot complete all stages are marked as Aborted By Freeze. Hovering over the pipeline status in its execution history displays the associated freeze windows that caused the pipeline to fail.

Automated pipeline rollback during freeze
By default, deployment freeze also blocks an automated pipeline rollback. If a stage fails during an active freeze window and the failure strategy action is Rollback Pipeline, the rollback cannot start until the freeze window ends or a user with freeze override permissions intervenes. This can leave the deployment in a partially completed state for the duration of the freeze.
This behavior is behind the feature flag CDS_SKIP_FREEZE_CHECK_ON_PIPELINE_ROLLBACK. Contact Harness Support to enable this feature flag. When the feature flag is enabled, the freeze check is skipped for pipeline rollback executions, so the rollback runs immediately after the triggering stage fails, even during an active freeze window.
Go to Rollback pipelines to learn more about the Rollback Pipeline failure strategy action.
Freeze windows only apply to CD stages
Deployment Freeze is a CD-only feature. It does not apply to other module stages, such as CI and Feature Flags.
If a pipeline includes a CD stage and other module stages, such as CI and Feature Flags, the freeze window applies only to the CD stage(s). The other stages in the pipeline will continue to run.
Trigger freeze
You can create triggers in Harness to execute a pipeline under multiple conditions, such as changes to a Helm Chart or an artifact.
When a freeze is running, triggers will not execute frozen pipelines. The trigger invocations are rejected.
You can create a freeze window notification to notify users when a trigger invocation was rejected. Notifications are described below.
API freeze
A freeze window also applies to the Harness API.
If you have set up a deployment freeze on an account, org, or project, you cannot initiate deployment on the frozen entities during the freeze schedule.
Access control
Deployment freeze access control is configured using the Deployment Freeze role permissions.
Manage: Add, edit, or delete freezes at any level.
Override: When a deployment is required during a freeze duration, users with this role can still perform deployments.
Global: Enable or disable freeze across all deployments at the account, org, and project levels.
Create a freeze window
Use the following steps to create a freeze window:
Ensure your Harness user account uses a role with the required permissions.
Freeze windows can be set at the Harness account, org, or project levels.
In Harness, go to Account Settings, Organization Settings, or Project Settings, depending on the scope at which you want to add a freeze window.
In the legacy nav, select Freeze Windows, then select New Freeze Window. In nav 2.0, under Security and Governance, select Freeze Windows, then select New Freeze Window.
In the New Freeze Window, enter a name for the freeze window and click Start.
Next, define the rules for the freeze window.
Define freeze window coverage and schedule
This example looks at an account-level example that applies a freeze to all orgs and projects from July 3rd to 5th and notifies users by email (jsmith@example.com) and Harness user group (All Account Users).
In Overview, click Continue.
In Coverage, click Add rule.
In Name, enter a name for the rule.
Rules are combined. You can add multiple rules, and the freeze window is applied according to the sum of all rules.
The remaining settings will depend on whether this freeze window is being created at the account, org, or project level. This example uses the account level.
To freeze services, in the Services box, select Services, and then select the services that you want to freeze.
If you want to freeze all services, select All Services.
If you want to include all services except a few, select All Services, select Exclude specific Services, select Services in the box that appears, and then select the services that you want to exclude.
To freeze environments, in the Environments box, select Environments, and then select the environments that you want to freeze.
If you want to freeze all environments, select All Environments.
If you want to include all environments except a few, select All Environments, select Exclude specific Environments, select Environments in the box that appears, and then select the environments that you want to exclude.
Click in Organization and select the org you want to freeze.
You can also click Exclude specific Organizations and select the orgs you want to exclude. This can be helpful if you selected All Organizations in Organization.
In Projects, select the projects to freeze in the selected orgs.
You can also click Exclude specific Projects and select the projects you want to exclude. This can be helpful if you selected All Projects in Projects.
In Environment Type, select All Environments, Production, or Pre-Production. For example, this setting allows you to keep deploying pre-production app versions without worrying about production versions being affected.
Click the checkmark to add the rule.
The coverage will look something like this:

coverage Click Continue.
In the Schedule, you define when the freeze window starts and stops.
In Timezone, select a timezone.
In Start Time, select a calendar date and time for the freeze window to start.
In End Time, select a duration (for example
1d) or an end date and time. A minimum of30mis required.
For a duration, you can use:
wfor weeksdfor dayshfor hoursmfor minutes
In Recurrence, select how often to repeat the freeze window and a recurrence end date.
For recurrence, you can select:
Does not repeat: Do not repeat the freeze window.
Daily: Repeat the freeze window daily.
Weekly: Repeat the freeze window weekly.
Monthly: Repeat the freeze window monthly. You can select the number of months between freeze window repetitions. For example, select 3 to repeat the freeze window every three months.
Yearly: Repeat the freeze window yearly.
The schedule will look something like this:

Click Save.
Click YAML.
Paste the following YAML example:
Notify users of freeze window events
You can notify Harness users and people outside your Harness account using freeze-window notifications.
You can notify users of the following freeze window events:
Freeze window is enabled. The notification is sent when you enable the freeze window.
Freeze window is enabled and active. The notification is sent at the configured start time of the deployment freeze, provided that the freeze window is enabled.
Deployments are rejected due to the freeze window. This includes any trigger invocations that are rejected due to a freeze window.
In Freeze Notification Message, you can add a custom notification message.
You can use the following notification methods:
Slack
Email
Harness User Groups
PagerDuty
Microsoft Teams
To enable notifications, do the following:
In a freeze window, click Notify.
Click Notifications.
Enter a name for the notification and click Continue.
In Configure the conditions for which you want to be notified, select the freeze window events that send notifications.
Click Continue.
In Notification Method, configure one of the methods described in Add a Pipeline Notification Strategy.
Click Finish.
Click Apply Changes.
In the freeze window, click YAML.
Enter the freeze window YAML notification events and method. For example, this YAML uses all events and the Email and User Group methods:
For examples of all methods, go to Add a Pipeline Notification Strategy.
Freeze window alert message
You will see an alert message when an account admin or a user with freeze override permissions triggers a pipeline during a freeze window.
The alert explicitly informs you that:
A freeze window is active.
The pipeline can be initiated and will not be aborted because you have freeze override permissions.

Click to view full size image
When the banner appears
The freeze banner appears reliably when the freeze window scope is broad, such as:
Account-level freezes
Org-level freezes
Project-level freezes
Pipeline-level freezes (targeting specific pipelines)
Global freezes
When the banner may not appear
The freeze banner may not appear before pipeline execution when the freeze window uses entity-specific filters, such as:
Freezes targeting specific services with
filterType: EqualsFreezes targeting specific environments with
filterType: EqualsFreezes with runtime inputs or expressions that cannot be resolved before execution
In these cases, freeze enforcement still works correctly. It aborts the pipeline during execution with the status Aborted By Freeze, but you will not receive a pre-flight warning in the Run Pipeline dialog.
This happens because the pre-flight validation cannot always determine if specific services or environments will be affected when those values depend on runtime resolution.
Turn the freeze windows on and off
You can turn freeze windows on and off in the following ways:
Toggle next to the freeze window name.
Enable/Disable option in the freeze window options.
Select Freeze Window, then click the Enable or Disable button.

Freeze all deployments for an account, org, or project
At the top of Freeze Windows is the option Freeze disabled on all deployments for this [Account/Organization/Project].
This is a global setting in the context of accounts, orgs, and projects. It lets you turn all deployments on or off for an account, org, or project for a specific duration.
By default, the setting is disabled so that all deployments will work except those frozen during active freeze windows.
When you enable this setting, you freeze all deployments. This overrides any active freeze windows.
When you enable this setting, you will see Freeze enabled on all deployments for this [Account/Organization/Project] from [duration].

Role-based access to freeze windows by environment type
Harness supports granular access control to manage Deployment Freeze Windows by environment type for Production and Pre-Production.
You can assign a specific role to freeze deployments only in Production or only in pre-production environments, instead of controlling access only at a higher level (for example, across all environments).
Complete the following sections to set up this access.
Create a resource group for deployment freeze
Use the following steps to create a resource group for deployment freeze:
Navigate to Project Settings → Access Control → Resource Groups.
Click + New Resource Group to create a new resource group.
Provide a name and save the resource group.
In the resource group, scroll to the Shared Resources section and select Deployment Freeze.
Under scope, select the By Env Type checkbox.
Click + Add, then choose the environment types: Production or Pre-Production.
Click Add 1 Deployment Freeze Type to confirm.
Save the resource group.

For more information, go to Resource Groups.
Assign a resource group to a role
Use the following steps to assign a resource group to a role:
Navigate to Project Settings → Access Control → Roles.
Click + New Role to create a new role.
Under Permissions, select Shared Resources.
Choose the permissions required: Manage, Override, or Global, based on the privileges needed.
Click Apply Changes to save the role.
Assign the role to users or user groups
Use the following steps to assign the role to users or user groups:
Navigate to Project Settings → Access Control → Users / User Groups.
Select the user or user group to assign the role to.
Go to the Role Bindings tab and click Manage Role Bindings.
Click + Add, select the previously created Role, and save it.
Create or enable a freeze window
Users can create or enable a deployment freeze window only if they have the necessary permissions for the specified environment type.
For example, a user with resource group access to the Pre-Production environment type can only manage freeze windows for Pre-Production environments.
Similarly, a user with access to Production can only manage freeze windows for Production environments.
Deployment freeze best practices
Here are some best practices for implementing a deployment freeze:
Communicate clearly with all team members about the deployment freeze, including its purpose, duration, and any exceptions that may be made.
Prioritize critical bug fixes and security updates to be made during the deployment freeze, and establish processes for reviewing and approving these changes.
Ensure that all necessary testing has been completed and that the system's current state is stable before implementing the deployment freeze.
Monitor the system closely during the deployment freeze to ensure that it remains stable and that any necessary updates can be made quickly and efficiently.
After the deployment freeze is lifted, conduct a thorough review of the system to ensure that it is functioning properly and that any changes made during the freeze did not introduce any new issues.
Next steps
Go to Add a Pipeline Notification Strategy to configure freeze window notification methods.
Go to Resource Groups to scope freeze window access by environment type.
Last updated
Was this helpful?