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

Commit28264bf

Browse files
authored
Add new task to rename appset (#904)
* Add new task to rename appsetAdded new procedure and screenshots for renaming appset* Update rename applicationsetUpdated change owner command and added required screenshots* Update manage-application.mdAdded link to rename app set in overview* Update manage-application.mdFixed command* Update manage-application.md* Update manage-application.md* Update manage-application.md
1 parent5d46430 commit28264bf

File tree

7 files changed

+100
-2
lines changed

7 files changed

+100
-2
lines changed

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

Lines changed: 100 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,11 @@ There are two aspects to managing and optimizing Argo CD applications in Codefre
4444
*[Rollback Argo CD applications](#rollback-aro-cd-applications)
4545
Rollback applications to previous deployment versions.
4646

47-
4847
*[Manage rollouts for deployments](#manage-rollouts-for-argo-cd-application-deployments)
49-
Control ongoing rollouts by resuming indefinitely paused steps, promoting rollouts, aborting, restarting and retrying rollouts.
48+
Control ongoing rollouts by resuming indefinitely paused steps, promoting rollouts, aborting, restarting and retrying rollouts.
49+
50+
*[Rename an ApplicationSet](#rename-an-application-set)
51+
Change the name of an existing ApplicationSet and point all its applications to the new ApplicationSet.
5052

5153
*[Delete Argo CD applications](#delete-argo-cd-applications)
5254
Delete unused or legacy applications to avoid clutter and remove unnecessary resources.
@@ -544,6 +546,102 @@ The table describes the options for the `Rollout` resource.
544546
|**Retry**| Retry a rollout that has been aborted. Available only when a rollout has been aborted.|
545547
|**Skip-current-step**| Skip executing the current step, and continue with the next step.|
546548

549+
##Rename an Application Set
550+
Rename an Application Set and point all existing applications to the Application Set.
551+
552+
1. In the Codefresh UI, from the sidebar, select[**GitOps Apps**](https://g.codefresh.io/2.0/applications-dashboard/list){:target="\_blank"}.
553+
1. Click the Git Source application with the Application Set.
554+
555+
{% include
556+
image.html
557+
lightbox="true"
558+
file="/images/applications/rename-appset/appset-view.png"
559+
url="/images/applications/rename-appset/appset-view.png"
560+
alt="GitOps Apps dashboard with example ApplicationSet"
561+
caption="GitOps Apps dashboard with example ApplicationSet"
562+
max-width="70%"
563+
%}
564+
565+
{:start="3"}
566+
1. From the Application Header, click the link in Source to go the repo in your Shared Configuration Repository.
567+
568+
{% include
569+
image.html
570+
lightbox="true"
571+
file="/images/applications/rename-appset/source-repo-link.png"
572+
url="/images/applications/rename-appset/source-repo-link.png"
573+
alt="Link to source repo in Application Header"
574+
caption="Link to source repo in Application Header"
575+
max-width="50%"
576+
%}
577+
578+
{:start="4"}
579+
1. In Git, open the`appset.yaml`, click**Edit**, and do the following:
580+
* Rename the ApplicationSet as needed.
581+
* Disable auto-sync by commenting out the lines with sync options.
582+
* Commit the changes.
583+
584+
{% include
585+
image.html
586+
lightbox="true"
587+
file="/images/applications/rename-appset/auto-sync-rename-appset.png"
588+
url="/images/applications/rename-appset/auto-sync-rename-appset.png"
589+
alt="Rename ApplicationSet and comment out sync options"
590+
caption="Rename ApplicationSet and comment out sync options"
591+
max-width="50%"
592+
%}
593+
594+
{:start="5"}
595+
1. Go back to the**GitOps Apps** dashboard in the Codefresh UI, and verify that the**Current State** tab displays the renamed ApplicationSet.
596+
As you can see in the picture below, the Current State tab displays the new ApplicationSet, but the applications still point to the old ApplicationSet.
597+
598+
{% include
599+
image.html
600+
lightbox="true"
601+
file="/images/applications/rename-appset/renamed-appset-current-state.png"
602+
url="/images/applications/rename-appset/renamed-appset-current-state.png"
603+
alt="Renamed ApplicationSet as new ApplicationSet in Current State tab"
604+
caption="Renamed ApplicationSet as new ApplicationSet in Current State tab"
605+
max-width="50%"
606+
%}
607+
608+
{:start="6"}
609+
1. Go to the cluster with the applications, and change Owner Reference of the existing applications to point them to the new ApplicationSet by running:
610+
```
611+
kubectl get applications -o=json -n <namespace> | jq -r '.items[] | select(.metadata.ownerReferences[0].name == "<orginal-appset-name>") | .metadata.name' | xargs -I {} kubectl patch application {} --type="json" -p='[{"op": "replace", "path": "/metadata/ownerReferences/0/name", "value": "<new-appset-name>"}]' -n <namespace>
612+
```
613+
where:
614+
*`<namespace>` is the namespace on the cluster where the applications are deployed, for example,`argocd`.
615+
*`<orginal-appset-name>` is the_old name_ of the ApplicationSet, for example,`"example-appset-v4"`.
616+
*`<new-appset-name>` is the_new name_ of the renamed ApplicationSet, for example,`"example-appset-v5"`.
617+
618+
{:start="7"}
619+
1. Go back to the GitOps dashboard in the Codefresh UI, and in the Current State tab make sure that the applications are now linked to the renamed (new) ApplicationSet.
620+
621+
{% include
622+
image.html
623+
lightbox="true"
624+
file="/images/applications/rename-appset/apps-point-to-new-appset.png"
625+
url="/images/applications/rename-appset/apps-point-to-new-appset.png"
626+
alt="Applications linked to new ApplicationSet in Current State tab"
627+
caption="Applications linked to new ApplicationSet in Current State tab"
628+
max-width="50%"
629+
%}
630+
631+
{:start="8"}
632+
1. Click**Synchronize** and wait for the synchronization to complete.
633+
1. Delete the old ApplicationSet, as described in[Delete Argo CD applications](#delete-argo-cd-applications) in this article.
634+
635+
{% include
636+
image.html
637+
lightbox="true"
638+
file="/images/applications/rename-appset/delete-old-appset.png"
639+
url="/images/applications/rename-appset/delete-old-appset.png"
640+
alt="Delete old ApplicationSet"
641+
caption="Delete old ApplicationSet"
642+
max-width="50%"
643+
%}
644+
547645
##Delete Argo CD applications
548646
Delete an Argo CD application from Codefresh. Deleting an application deletes the manifest from the Git repository, and then from the cluster where it is deployed. When deleted from the cluster, the application is removed from the GitOps Apps dashboard in Codefresh.
549647

225 KB
Loading
94.3 KB
Loading
81.4 KB
Loading
261 KB
Loading
225 KB
Loading
218 KB
Loading

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp