Easily add a $DS_PROMETHEUS datasource variable with its templating to a Grafana dashboard with jq or Jsonnet.
./templatize_dashboard_datasource.jq dasboard.json >dashboard-new.jsonThis short Go program uses a Fist-fit-decreasing Bin Packing algorithm to assign Kubernetes clusters to different Argo CD Application Controller shard based on their resources count. It bases its calculations on the output of the argocd-util cluster stats command. The output can be used to update the undocumented shard key of the cluster secrets.
argocd-util cluster stats --namespace=argocd | go run reshard.go| #!/bin/sh | |
| set -eu | |
| PYTHON_EXE='python3' | |
| VIRTUALENVWRAPPER='virtualenvwrapper.sh' | |
| echo '>>> Sourcing virtualenvwrapper...' | |
| . "${VIRTUALENVWRAPPER}" | |
| echo '>>> Starting migration from virtualenvwrapper to pyenv-virtualenv...' |
| #!/usr/bin/env python | |
| from distutils.sysconfig import get_python_lib | |
| from glob import iglob | |
| from modulefinder import ModuleFinder | |
| EXCLUDED_DEPENDENCIES = [ | |
| # Standard libraries | |
| 'distutils', | |
| 'func', |