Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit98966d0

Browse files
authored
Gitops apps custom rollout actions (#1268)
* Update rollout managementAdded new configuration specs for rollouts with BYOA and streamlined section content and structure* Add argo cd doc reference to resource actions* Update manage-application.md* Add warning for resource action customization
1 parent544dd3a commit98966d0

File tree

1 file changed

+86
-60
lines changed

1 file changed

+86
-60
lines changed

‎_docs/deployments/gitops/manage-application.md‎

Lines changed: 86 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -479,19 +479,76 @@ max-width="70%"
479479
%}
480480

481481
## Manage rollouts for Argo CD application deployments
482-
Control ongoing rollouts by resuming indefinitely paused steps, promoting rollouts, aborting, restarting and retrying rollouts.
482+
A rollout represents the progressive deployment of a new version of an application, allowing controlled updates with rollback capabilities.
483483

484+
##### Rollout controls
485+
View rollout progress in the Timeline tab, and manage rollouts through multiple controls:
486+
* **Timeline tab**: Pause and resume ongoing rollouts.
487+
* **Rollout Player**: Offers additional controls, including custom actions such as skipping steps during rollouts.
488+
* **Rollout resources in Current State tab**: Offers the same controls as the Rollout Player.
484489

490+
##### Custom action configuration
491+
For GitOps Runtimes with existing Argo CD instances, to enable actions in the Rollout Player and in the Current State tab for the Rollout entity, you must configure custom actions in the Argo CD config map (`argocd-cm`).
492+
See [Argo CD's official documentation on resource actions](https://argo-cd.readthedocs.io/en/stable/operator-manual/resource_actions/#define-a-custom-resource-action-in-argocd-cm-configmap){:target="\_blank"}.
485493

486-
### Pause/resume ongoing rollouts
487-
Pause and resume ongoing rollouts directly from the Timeline tab in the GitOps Apps dashboard.
488-
If the rollout is already automatically paused as result of a step definition, this action pauses the rollout even after the pause duration.
494+
### Controls for ongoing rollouts
495+
The table describes the controls available to manage rollouts.
489496

497+
{: .table .table-bordered .table-hover}
498+
| Rollout control | Description | Available in |
499+
| -------------- | ------------| ----------------|
500+
| **Rollback** | Rolls back to the previous deployment. See also [Prerequisites for rollback](#prerequisites-for-rollback). | {::nomarkdown}<ul><li>Timeline</li><li>Rollback Player</li><li>Current State</li>{:/} |
501+
| **Abort** | Terminate the current rollout. | {::nomarkdown}<ul><li>Rollback Player</li><li>Current State</li>{:/} |
502+
| **Pause** | Pause the rollout. If the rollout is already automatically paused as the result of a step definition, clicking Pause continues pausing the rollout also after the pause duration configured. | {::nomarkdown}<ul><li>Timeline</li><li>Rollback Player</li><li>Current State</li>{:/} |
503+
| **Resume** | Resume a rollout that was paused either manually by clicking Pause, or automatically through the step's definition. | {::nomarkdown}<ul><li>Timeline</li><li>Rollback Player</li><li>Current State</li>{:/} |
504+
|**Retry** | Retry a rollout that has been aborted. Restarts the rollout from the beginning. Available only when a rollout has been aborted. | {::nomarkdown}<ul><li>Rollback Player</li><li>Current State</li>{:/} |
505+
| **Skip step** | Skip execution of current step. Such steps are marked as Skipped in the rollout visualization. | {::nomarkdown}<ul><li>Rollback Player</li><li>Current State</li>{:/} |
506+
| **Promote full** | Skip all remaining steps, and deploy the current image. | {::nomarkdown}<ul><li>Rollback Player</li><li>Current State</li>{:/}|
507+
508+
### Configure custom actions for Rollout entities
509+
For Runtime installations with existing Argo CD instances, configure custom rollout actions in Argo CD's config map. Otherwise, rollout controls such as **Pause** and **Skip Current Step** are disabled in the Rollout Player and in the Current State tab.
490510

491-
1. In the Codefresh UI, from the sidebar, select **GitOps Apps**.
492-
1. Select the application and go to the Timelines tab.
493-
1. In the deployment record for the ongoing rollout, expand **Updated Services**.
494-
1. Based on the current state of the rollout, click **Pause** or **Resume**, as relevant.
511+
{{site.data.callout.callout_warning}}
512+
**Argo CD warning**
513+
By default, defining a resource action customization will override any built-in action for this resource kind. As of Argo CD version 2.13.0, if you want to retain the built-in actions, you can set the `mergeBuiltinActions` key to `true`. Your custom actions will have precedence over the built-in actions.
514+
{{site.data.callout.end}}
515+
516+
* Add the following to the `argocd-cm`:
517+
518+
```yaml
519+
resource.customizations.actions.argoproj.io_Rollout: |
520+
mergeBuiltinActions: true
521+
discovery.lua: |
522+
actions = {}
523+
local fullyPromoted = obj.status.currentPodHash == obj.status.stableRS
524+
actions["pause"] = {["disabled"] = fullyPromoted or obj.spec.paused == true}
525+
actions["skip-current-step"] = {["disabled"] = obj.spec.strategy.canary == nil or obj.spec.strategy.canary.steps == nil or obj.status.currentStepIndex == table.getn(obj.spec.strategy.canary.steps)}
526+
return actions
527+
definitions:
528+
- name: pause
529+
action.lua: |
530+
obj.spec.paused = true
531+
return obj
532+
- name: skip-current-step
533+
action.lua: |
534+
if obj.status ~= nil then
535+
if obj.spec.strategy.canary ~= nil and obj.spec.strategy.canary.steps ~= nil and obj.status.currentStepIndex < table.getn(obj.spec.strategy.canary.steps) then
536+
if obj.status.pauseConditions ~= nil and table.getn(obj.status.pauseConditions) > 0 then
537+
obj.status.pauseConditions = nil
538+
end
539+
obj.status.currentStepIndex = obj.status.currentStepIndex + 1
540+
end
541+
end
542+
return obj
543+
```
544+
545+
546+
### Accessing rollout controls
547+
Manage rollouts from different locations in the GitOps Apps dashboard.
548+
549+
#### Timeline tab
550+
* **Where:**
551+
**GitOps Apps** > Selected application > **Timelines** > Deployment record > **Updated Services**
495552

496553
{% include
497554
image.html
@@ -504,15 +561,9 @@ If the rollout is already automatically paused as result of a step definition, t
504561
%}
505562

506563

507-
508-
### Manage an ongoing rollout with the Rollout Player
509-
Manage an ongoing rollout using the controls in the Rollout Player to skip steps, and promote rollouts.
510-
511-
1. In the Codefresh UI, from the sidebar, select **GitOps Apps**.
512-
1. Select the application and go to the Timelines tab.
513-
1. In the deployment record for the ongoing rollout, click the name of the rollout.
514-
1. Select the required option in the Rollout Player.
515-
564+
#### Rollout Player
565+
* **Where:**
566+
**GitOps Apps** > Selected application > **Timelines** > Deployment record > Rollout name
516567

517568
{% include
518569
image.html
@@ -524,68 +575,43 @@ caption="Rollout Player controls for an ongoing rollout"
524575
max-width="50%"
525576
%}
526577

527-
528-
The table describes the controls in the Rollout Player.
578+
#### Current State tab
579+
* **Where:**
580+
**GitOps Apps** > Selected application > **Current State** > Rollout resource's context menu
581+
582+
{% include
583+
image.html
584+
lightbox="true"
585+
file="/images/applications/rollout-resource-context-menu.png"
586+
url="/images/applications/rollout-resource-context-menu.png"
587+
alt="Options for `rollout` resource in the Current State tab"
588+
caption="Options for `rollout` resource in the Current State tab"
589+
max-width="50%"
590+
%}
529591

530-
{: .table .table-bordered .table-hover}
531-
| Rollback player option | Description |
532-
| -------------- | ------------|
533-
| **Rollback** | Rolls back to the previous deployment. See also [Prerequisites for rollback](#prerequisites-for-rollback). |
534-
|**Abort** | Terminate the current rollout. |
535-
| **Pause** | Pause the rollout. If the rollout is already automatically paused as the result of a step definition, clicking Pause pauses the rollout also after the pause duration. |
536-
| **Resume** <!---{::nomarkdown}<img src="../../../images/icons/rollout-resume.png" display=inline-block"> {:/}-->| Resume a rollout that was paused either manually by clicking Pause, or automatically through the step's definition. |
537-
|**Retry** | Retry a rollout that has been aborted. Restarts the rollout from the beginning. Available only when a rollout has been aborted. |
538-
| **Skip step** <!---{::nomarkdown}<img src="../../../images/icons/rollout-skip-step.png" display=inline-block"> {:/}--> | Skip execution of current step. Such steps are marked as Skipped in the rollout visualization. |
539-
| **Promote full** <!---{::nomarkdown}<img src="../../../images/icons/rollout-promote-full.png" display=inline-block"> {:/} --> | Skip all remaining steps, and deploy the current image. |
540592

541593

542594

543595
### Manually rollback completed rollout to previous revision
544596
<!--- add screenshots -->
545-
Manually rollback a completed rollout to a previous revision when and if needed. If after a successful analysis run and rollout, your application is not functioning as it should, you can rollback to a prior revision from the Rollout’s revision history. The revision depth is determined by the `spec.revisionHistoryLimit` parameter in the [Rollout Specification](https://argoproj.github.io/argo-rollouts/features/specification/#rollout-specification){:target="\_blank"}.
597+
Manually rollback a completed rollout to a previous revision when and if needed. If after a successful analysis run and rollout, your application is not functioning as it should, you can rollback to a prior revision from the Rollout’s revision history.
598+
599+
The revision depth is determined by the `spec.revisionHistoryLimit` parameter in the [Rollout Specification](https://argoproj.github.io/argo-rollouts/features/specification/#rollout-specification){:target="\_blank"}.
546600
Manual rollback changes the live state of the rollout resource to the state in the previous commit that you select.
547601

548602
1. In the Codefresh UI, from the sidebar, select **GitOps Apps**.
549603
1. Select the application and select the **Timeline** tab.
550604
1. Click the name of the rollout to rollback.
551-
1. From the **Choose version toRollabck** dropdown, select the revision to rollback to.
605+
1. From the **Choose version toRollback** dropdown, select the revision to rollback to.
552606
1. Review the changes in the revision.
553607
1. In the Rollout Player, click **Rollback to**.
554608

555609

556-
### Manage the Rollout resource
557-
558-
Control the rollout through the options available for the Rollout resource in the Current State tab.
559-
560-
1. In the Codefresh UI, from the sidebar, select **GitOps Apps**.
561-
1. Select the application and go to the Current State tab.
562-
1. Open the context menu of the `Rollout` resource, and select the relevant option.
563-
564-
{% include
565-
image.html
566-
lightbox="true"
567-
file="/images/applications/rollout-resource-context-menu.png"
568-
url="/images/applications/rollout-resource-context-menu.png"
569-
alt="Options for `rollout` resource in the Current State tab"
570-
caption="Options for `rollout` resource in the Current State tab"
571-
max-width="50%"
572-
%}
573610

574-
The table describes the options for the `Rollout` resource.
575611

576-
{: .table .table-bordered .table-hover}
577-
| Option | Description |
578-
| -------------- | -------------- |
579-
|**Abort** | Terminate the current rollout. |
580-
|**Pause** | Pause the current rollout. |
581-
|**Promote-full** | Promote the current rollout by skipping all remaining stages in the rollout, and deploy the current image. |
582-
|**Restart** | Manually restart the pods of the rollout.|
583-
|**Resume** | Resume a rollout that has been paused. |
584-
|**Retry** | Retry a rollout that has been aborted. Available only when a rollout has been aborted. |
585-
|**Skip-current-step** | Skip executing the current step, and continue with the next step. |
586612

587613
## Rename an Application Set
588-
Rename an Application Set and point all existing applications to the Application Set.
614+
Rename an Application Set and point all existing applications to therenamedApplication Set.
589615

590616
1. In the Codefresh UI, from the sidebar, select **GitOps Apps**.
591617
1. Click the Git Source application with the Application Set.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp