Created
February 20, 2023 05:21
-
-
Save suresh-sendinblue/2e31319cd4e4be321ac064df76d5fb91 to your computer and use it in GitHub Desktop.
Revisions
-
suresh-sendinblue created this gist
Feb 20, 2023 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ #!/bin/bash ### Get ArgoCD token curl -s --location -H "CF-Access-Client-Id: <xxxxxxxx>" -H "CF-Access-Client-Secret: <xxxxxxx>" -d $'{"username":"<xxxxx>","password":"<xxxxx>"}' https://argocd.example.com/api/v1/session ### Restart k8s resource curl --location --request POST 'https://argocd.example.com/api/v1/applications/<application-name>/resource/actions?namespace=<app namespace>&resourceName=<resourse to restart>&version=v1&kind=<kind of the resource>&group=apps' \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --header 'Cookie: CF_Authorization=<cloudflare-generated-auth>' \ --data-urlencode '"restart"='