diff --git a/plugins/README.md b/plugins/README.md index 29cd9ce9..7a217b0e 100644 --- a/plugins/README.md +++ b/plugins/README.md @@ -7,6 +7,7 @@ Following is an example of some plugin files in this directory. Other files are | Plugin-Name | Description | Available on Views | Shortcut | Kubectl plugin, external dependencies | | ------------------------------ | ---------------------------------------------------------------------------- | ----------------------------------- |-----------| ------------------------------------------------------------------------------------- | | ai-incident-investigation.yaml | Run AI investigation on application issues to find the root cause in seconds | all | Shift-h/o | [HolmesGPT](https://github.com/robusta-dev/holmesgpt) | +| argocd.yaml | Perform argocd operation quickly | applications | Shift-r | [ArgoCD](https://argo-cd.readthedocs.io/en/stable/getting_started/) | | debug-container.yaml | Add [ephemeral debug container](1)
([nicolaka/netshoot](2)) | containers | Shift-d | | | dive.yaml | Dive image layers | containers | d | [Dive](https://github.com/wagoodman/dive) | | external-secrets.yaml | Refresh external/push-secrets | externalsecrets/pushsecrets | Shift-R | | diff --git a/plugins/argocd.yaml b/plugins/argocd.yaml index f69fadde..38d3d4d6 100644 --- a/plugins/argocd.yaml +++ b/plugins/argocd.yaml @@ -13,3 +13,49 @@ plugins: - $NAMESPACE background: true confirm: true + + refresh-apps: + shortCut: Shift-R + confirm: false + scopes: + - apps + description: Refresh a argocd app hard + command: bash + background: false + args: + - -c + - "kubectl annotate applications -n argocd $NAME argocd.argoproj.io/refresh=hard" + + disable-auto-sync: + shortCut: Shift-J + confirm: false + scopes: + - apps + description: Disable argocd sync + command: kubectl + background: false + args: + - patch + - applications + - -n + - argocd + - $NAME + - "--type=json" + - '-p=[{"op":"replace", "path": "/spec/syncPolicy", "value": {}}]' + + enable-auto-sync: + shortCut: Shift-B + confirm: false + scopes: + - apps + description: Enable argocd sync + command: kubectl + background: false + args: + - patch + - applications + - -n + - argocd + - $NAME + - --type=merge + - '-p={"spec":{"syncPolicy":{"automated":{"prune":true,"selfHeal":true},"syncOptions":["ApplyOutOfSyncOnly=true","CreateNamespace=true","PruneLast=true","PrunePropagationPolicy=foreground"]}}}'