KLI
KLI — Kraken "Command" Line Interface for reporting / managing ArgoCD applications
Overview
KLI is distributed through the published packages in the kraken-releases repository.
Packages
- Browse releases and published artifacts: https://github.com/kraken-teknologies/kraken-releases
Notes
Kraken (Command) Line Interface (KLI) is a command line interface for managing ArgoCD applications. This allows you to create a simple config file and setup ArgoCD context to scan the ArgoCD Service for items such as status health, version of ArgoCD and its deployed apps. It also allowes you to hard refresh a single app or all apps.
To get started:
- Download the latest release from the releases page
- Unzip the release and run the
klibinary- Currently the bin is not signed so if running on mac you will need to run
xattr -d com.apple.quarantine kli - This will be fixed in later releases
- Currently the bin is not signed so if running on mac you will need to run
- run
kli --helpfor more information - To initialize the config file run
kli init- This creates a config file in
~/.kraken/config.yaml - This file is used to store the ArgoCD context and other settings
- Curently the config file is not encrypted so be careful with it
- This creates a config file in
-
Config structure
argocd: default: home # default context, will be used unless changed or overriden servers: home: server: http://server.local # address of ArgoCD server api_base: /api # REQUIRED: set to /api or /api/v1 token: "${KLI_ARGOCD_TOKEN_HOME}" # Token required if needed, leave blank if not needed insecure: false # false is https, true if http plain_http: true # true if http timeout: 10s # set the time out; large ArgoCD instances can take a while to scan - See all contexts run
kli contexts - Change default context run
kli context default <context> - Get ArgoCD status run
kli status- if you want the apps status include add ‘–apps=true’
- Get status for all ArgoCD apps run
kli status all- if you want the apps status include add ‘–apps=true’
Examples output:
ArgoCD: OK
Context: home (default: home)
Server: http://argocd.homeserver.local
API Base: http://argocd.homeserver.local/api
Version: v2.11.3+3f344d5
Timeout: 10s
Applications: 7
NAME PROJECT NAMESPACE HEALTH SYNC SOURCE
cert-manager operations cert-manager Healthy OutOfSync https://charts.jetstack.io (chart: cert-manager)
csi-driver-smb operations kube-system Healthy OutOfSync https://raw.githubusercontent.com/kubernetes-csi/csi-driver-smb/master/charts (chart: csi-driver-smb)
metrics-server operations kube-system Healthy Synced https://kubernetes-sigs.github.io/metrics-server/ (chart: metrics-server)