How sysdiglabs/charts works
Project type and purpose
• Type: This is an “infrastructure tooling” repo—specifically the official Sysdig Helm charts plus an accompanying Kubernetes Operator (rh-shield-operator).
• Purpose:
– Store and version multiple Helm charts (charts/sysdig, agent, admission-controller, etc.)
– Run chart-unit and integration tests on each change
– Automate packaging & publishing of charts to a Helm repository (gh-pages)
– Build and bundle the rh-shield Kubernetes Operator (CRDs, controller image, OLM bundle)
File structure
• Top-level directories:
– .github/workflows → GitHub Actions definitions (lint, unit tests, release workflows)
– charts/ → Dozens of subfolders, each a standalone Helm chart (templates, tests, values, docs)
– rh-shield-operator/ → Kubernetes operator code, CRD definitions, Dockerfiles, OLM bundle
– scripts/ → Helper scripts for version bumps, kubeconfig generation, docs-links checking
– .chglog/ → Configuration for changelog automation
• Patterns:
– Each chart subfolder follows Helm conventions (Chart.yaml, templates/, tests/)
– Tests use helm-unittest plugin + chart-testing for CI integration
– GitHub Actions drive lint → unit tests → integration tests → release
– Chart Releaser Action publishes chart packages & updates index.yaml on gh-pages
Key insights from README.md
• Repository hosts official Sysdig charts, automatically published when version changes
• Contribution guidelines reference .github workflows and pre-commit hooks
• Describes two test types: helm-unittest and chart-testing integration
• Outlines release process: detect new chart version → create GitHub Release → update index
Main components
a. Source Code Host (GitHub)
– Repo contents: charts/, rh-shield-operator/, scripts/, .chglog, .github/workflows
b. CI/CD Layer (GitHub Actions)
– Lint & Pre-commit checks
– Chart unit tests (helm-unittest)
– Integration tests (chart-testing)
– Release workflows (chart-releaser, operator image build)
c. Packaging & Repository
– Chart Releaser Action
– GitHub Releases (packaged .tgz artifacts)
– gh-pages branch hosting index.yaml & docs (charts.sysdig.com)
d. Runtime Targets
– Kubernetes clusters (end users install charts & operator via Helm/OLM)
e. External Services & Tools
– Chart-unittest plugin
– Chart-testing tool
– Helm CLI
– Docker registry (for operator images)
– OLM (Operator Lifecycle Manager)
Relationships & Data Flow
1. Developer pushes commits → triggers GitHub Actions
2. Workflows run lint → unit tests → integration tests
3. On chart version bump: Chart Releaser packages chart → GitHub Release → index.yaml updated on gh-pages
4. On operator change: Docker build → push image → OLM bundle packaged
5. End users add Helm repo (https://charts.sysdig.com) → helm install <chart>
6. Kubernetes cluster(s) pull charts/images → deploy components (Pods, Deployments, CRDs)
Architectural patterns & design principles
• Modular decomposition: Each chart is a self-contained unit with its own templates, values, tests
• GitOps/CICD: GitHub as single source of truth; workflows fully automated on push to main
• Immutable artifacts: Charts packaged as versioned tarballs; operator image versioned via Git tags
• Separation of concerns:
– charts/ for packaging only
– rh-shield-operator/ for runtime controller logic
– scripts/ for miscellaneous automation
• Declarative infrastructure: Everything expressed as YAML (Helm templates, CRDs, Kustomize in operator)
Essential details, avoid unnecessary zoom-in
• You don’t need to list every chart; group them as “Sysdig Helm Charts (20+ subcharts)”
• Operator’s CRDs and OLM bundle as a separate deployable