Create and manage environments
Create and manage environments to track SDLC for Argo CD applications
Creating and managing environments
Environments provide a structured way to manage Argo CD applications across different stages of development and deployment. By defining environments, teams can control how applications are deployed, tested, and promoted. Environments in Codefresh GitOps integrate with products and applications, providing visibility and governance over deployments.
This article describes how to create and manage environments.
Create environments
Create one or more environments corresponding to stages in your development and deployment lifecycle.
Define an environment with a unique name, intended usage, and any number of clusters and namespaces.
Environments are automatically populated with the applications deployed in the clusters and namespaces mapped to them.
- In the Codefresh UI, from the sidebar, select Environments, and then click Add Environment.
- Define the following:
- Name: A unique name for your GitOps Environment, which is meaningful in the context of your development and deployment cycle.
- Kind: The purpose of this GitOps Environment, and can be either Production for live deployments, or Non-production for development, testing, or staging.
- Clusters and Namespaces: Single or multiple clusters and namespaces to map to the environment in any combination.
To include all namespaces in a cluster, leave the Namespaces field empty.
Adding a cluster with one or more namespaces automatically populates the environment with applications deployed in those namespaces.
- Click Add. The environment is displayed in the Environments dashboard.
Managing environments
Once created, environments appear in the Environments dashboard, which consolidates all environments, along with the products and applications associated with them.
Reorder environments with drag-and-drop
Change the order of the environments in the Environments dashboard through simple drag and drop. By default, environments are displayed in the order they were created.
For example, if you have two non-production and one production environment for an e-commerce application, you can reorder them to reflect their progression: non-production environments first, followed by production.
- In the Codefresh UI, from the sidebar, select Environments.
- Mouse over the column with the environment to move.
- Click
and drag the column to the required location.
Edit environments
Update an environment’s settings as needed. You can change all settings for an environment, including the name.
For example, if you add new infrastructure or deploy additional applications, update the environment by adding the relevant cluster or namespace.
- In the Codefresh UI, from the sidebar, select Environments.
- Mouse over the column with the environment to edit, and click
.
- Edit the settings as required.
Delete environments
Remove unused or legacy environments to keep your dashboard organized. Deleting an environment removes it from the Environments dashboard, but does not delete underlying resources, configurations, or applications.
- In the Codefresh UI, from the sidebar, select Environments.
- Mouse over the column with the environment to delete.
- Click
, type the name of the environment to confirm Delete.
Related articles
Environments dashboard
Manage products and applications in environments
About environments