How stanleytho/support-tools works
Project type and purpose
• This is an open-source “support-tools” monorepo for Rancher clusters. It bundles multiple independent scripts, Dockerized utilities, Helm charts and YAML manifests used for collecting data, troubleshooting, maintenance (cleanup, rotation), and cluster-level diagnostics.
• Its primary use case is to equip Rancher Support engineers (or any operator) with repeatable, scriptable workflows to diagnose, collect logs, inspect etcd, rotate tokens, clean up resources, and deploy lightweight helper workloads via Helm or static manifests.
File structure
• Top-level directories:
• collection – non-mutating scripts to gather cluster/node information and logs
• files – static payloads (curl-format.txt, etc.) used by scripts
• charts – Helm charts (rancher-support utilities as pods in-cluster)
• troubleshooting-scripts – targeted checks for etcd, kube-apiserver, scheduler, leader election
• dozens of standalone tool folders (e.g., bad-ingress-scanner, rotate-tokens, etc.) each containing a small shell script or Dockerfile plus readme
• Other artifacts:
• _config.yml, .drone.yml – CI/CD config
• Dockerfiles and run.sh wrappers – indicate containerized execution for many modules
• example-deployment.yml – pattern for deploying scripts as jobs or DaemonSets
README for additional insights
• Confirms two high-level categories: “collection” (non-destructive) and “files” (shared assets).
• Implies that most other directories are “mutating” or “maintenance” tools that should be used cautiously.
a. Main components:
• Operator Workstation (CLI) – where shell scripts or Helm CLI are run
• Container Registry – hosts images built via Dockerfiles in each tool’s folder
• Kubernetes Cluster(s) – target clusters under support, running Rancher
– Rancher Server API
– etcd Cluster
– Kube-API Server, Scheduler, Controller Manager
• Helm Tiller/Helm-v3 client – for deploying charts from /charts
• Support-Tool Pods (deployments/Jobs) – containers from charts or manual YAMLs
• Local file assets – “files/” used by scripts
b. Relationships and interactions:
• Operator triggers script or helm install from Workstation →
– local scripts call kubectl / helm / curl against Kubernetes API or Rancher API
• Kubernetes API → schedules Support-Tool Pods (via Job/Deployment) → these pods mount ConfigMaps/Secrets (from templates) → collect data or perform tasks → write results to stdout or to mounted volume
• Scripts with Dockerfiles: Operator builds image → pushes to registry → scripts deploy containers via run.sh or provided YAML → interact with cluster
• troubleshooting-scripts run either on operator node (local) or as pods, invoking cluster-internal endpoints
c. Architectural patterns / design principles:
• Modular tool-per-folder pattern: each script is its own micro-utility
• Separation between “collection” (read-only) vs “mutating” tools
• Infrastructure-as-code: manifests and Helm charts describe in-cluster components
• Containerization for consistency across environments
d. Key technologies:
• Kubernetes (Jobs/Deployments, ConfigMaps, ServiceAccounts)
• Helm (charts in /charts)
• Shell scripting (bash, sh), PowerShell for Windows collectors
• Docker (for containerizing tools)
• Rancher API / kubectl / etcdctl / curl / jq