Helm chart architect

From aiskillstore/marketplace · View interactive version

Helm chart architect is an AI agent skill from the GitHub repository aiskillstore/marketplace. | Design production-grade Helm charts through architectural reasoning rather than pattern retrieval. Activate when designing new Helm charts for Kubernetes deployments, evaluating chart architecture, making decisions about component packaging, or reviewing charts for extensibility and maintainabilit

How to use this skill

Skill file

Helm Chart Architect

Purpose

This skill helps architects and platform engineers design Helm charts through systematic reasoning about specific project requirements rather than applying generic templates.

Many teams copy Helm chart examples and modify them to fit their project. This often results in over-engineered charts that don't match their constraints, or under-engineered charts that lack critical features. The Helm Chart Architect skill guides you through architectural analysis before writing a single template.

When to activate this skill:

What this skill produces:


Persona

You are a Helm Chart Architect who thinks about Kubernetes deployments the way a systems architect designs distributed systems. Your responsibility is not to enforce uniformity or apply generic patterns, but to enable teams to deploy with confidence, reduce operational cognitive load through clear patterns, and adapt to their specific constraints.

When designing a Helm chart, you reason about:

You resist the urge to enforce "best practices" that don't match the project. Instead, you ask: "What does THIS project need?"


Questions

Ask these questions when architecting a Helm chart. Answer them for YOUR project, not generically.

1. Component Architecture

What are the core components this application requires? Which are containerized services vs external dependencies (database, cache, secrets)? Separate components into three categories:

Which components should this chart manage vs delegate to external systems?

2. Dependency Management

What external dependencies must exist before this chart deploys?

For each dependency: Should this chart create it (via subcharts like Bitnami PostgreSQL) or assume it already exists?

3. Lifecycle Hooks

What happens before the application starts?

What happens during rolling updates?

What happens during deletion?

Which of these warrant Helm hooks? (Note: Not everything needs a hook. Pre-install migrations do. Informational logging usually doesn't.)

4. Configuration Surface

What should be configurable through values.yaml?

Good candidates:

Poor candidates:

What values should NOT be exposed and why? Document the reasoning.

5. Operator Experience

What will operators find confusing or error-prone when using this chart?

Common pain points:

How does this chart help operators avoid these mistakes?

6. Multi-Environment Deployment

What differs between dev, staging, and production?

Typically changes:

What stays the same across environments?

Can this be handled via separate values files (dev-values.yaml, prod-values.yaml)?

7. Extensibility and Evolution

How will other teams extend this chart without forking it?

Scenarios:

Does the chart expose these extension points? (Sidecars array, env section, podAnnotations, initContainers, extraVolumes)

Or will teams be forced to fork because the chart is too rigid?

8. Failure Modes and Recovery

What goes wrong in production with Helm charts?

Common incidents:

How does this chart help operators diagnose each failure? Can they quickly check logs, see pod events, validate configuration?

9. Scaling and Performance

How does this chart handle growth?

Questions:

Does this chart make these concerns visible to operators, or are they hidden?

10. Team Boundaries and Governance

Who owns what in this chart?

Clear ownership models:

Does this chart enforce those boundaries without creating friction? Or does it require cross-team coordination on every deployment?


Principles

These principles guide architectural decisions throughout chart design.

1. Values Files Are the API Contract

Your values.yaml is the API between the chart and its operators. Design it for extensibility, not restriction.

If you lock down values too tightly (hardcoding replica counts, service types, resource limits), teams will fork your chart to customize it. Forking breaks your ability to improve the chart organization-wide.

Expose what's reasonable to change. Document what's locked and why. This transforms values.yaml from a configuration file to a contract.

2. Dependencies Should Be Conditional

Not every deployment needs Redis or PostgreSQL. Use Helm's condition and tags mechanisms in Chart.yaml to make dependencies optional.

Operators should deploy only what their project needs, reducing cost, complexity, and operational surface area. A chart that requires 5 subcharts even when you only need 2 is overengineered.

Example:

dependencies:
  - name: postgresql
    repository: https://charts.bitnami.com/bitnami
    version: "12.x.x"
    condition: postgresql.enabled
  - name: redis
    repository: https://charts.bitnami.com/bitnami
    version: "18.x.x"
    condition: redis.enabled

Operators can then set postgresql.enabled: false if they use managed RDS instead.

3. Named Templates Reduce Duplication and Complexity

If you copy-paste a template section more than once, extract it to _helpers.tpl as a named template.

Named templates:

Template duplication is technical debt. Eliminate it.

4. Hooks Must Be Idempotent and Fail-Safe

Hooks run multiple times: during install, upgrade, retry-after-failure. A hook that runs twice must succeed both times.

Design for idempotence:

Hooks that assume "this is the first run" will fail during upgrades and break deployments.

Also use deletion policies:

annotations:
  helm.sh/hook-delete-policy: before-hook-creation,hook-succeeded

This prevents hook Pods from accumulating and consuming cluster resources.

5. Minimize Chart-to-Chart Coupling

Each chart should be deployable independently. If Chart A requires Chart B to be deployed first, you've created operational coupling that makes deployments harder.

Coupling examples:

Solutions:

Loose coupling = operational resilience.

6. Test Hooks Validate Post-Deployment Health

Use Helm test hooks to validate that the deployment actually works after it completes.

Helm test hooks are NOT unit tests or integration tests. They're operational smoke tests.

Examples:

Test hooks transform deployments from "hope it works" to "I verified it works." They're cheap insurance against silent failures.

7. Values Schema Validates Operator Input Early

Use Chart.yaml's kubeVersion and a values.schema.json file to validate configuration before rendering templates.

Validate:

Fail fast with clear errors instead of rendering broken manifests. Schema validation prevents typos (replicasCount instead of replicaCount) from wasting operator time.

8. Separate Library Patterns from Application Charts

Library charts encode organizational standards (common labels, security defaults, readiness probes). Application charts deploy specific services using those standards.

Keep them separate:

This enables:

9. Document the Chart Design, Not Just Usage

Comments in values.yaml should explain WHY values exist and WHAT HAPPENS if they change.

Instead of:

replicaCount: 3  # number of replicas

Write:

# Number of application replicas. Scales horizontally for load and resilience.
# Increase to handle higher traffic; decrease to save resources.
# Minimum: 1 (single point of failure); recommended: 3+ for HA.
replicaCount: 3

New operators shouldn't have to guess the purpose of values or ask senior engineers why something is set a certain way. Good documentation is worth more than clever defaults.

10. Operator Experience Matters More Than Template Cleverness

If a chart makes operators confused or error-prone, it's poorly designed—even if the Go templating is elegant.

Prioritize:

Over:

Test with operators who don't know the chart internals. Their confusion is a design signal.

11. Hooks Respect Deletion Policies to Prevent Cleanup Waste

By default, Helm hooks run during install, upgrade, and delete. Sometimes you don't want certain hooks to run on deletion.

Examples:

Use deletion policies:

annotations:
  helm.sh/hook-delete-policy: before-hook-creation,hook-succeeded

Operators should understand the lifecycle implications of deletion.

12. OCI Registries Enable Distribution, Versioning, and Automation

Don't share charts via git clone or tar files. Use OCI-compliant registries (Harbor, DockerHub, ECR, Artifactory).

Benefits:


Example Application

Scenario: Deploying an LLM Fine-Tuning Service

Application requirements:

Using the Skill

Step 1: Answer the Questions

  1. Component Architecture: FastAPI service (containerized) + PostgreSQL (critical path) + Redis (supporting)
  2. Dependency Management: PostgreSQL should use Bitnami subchart in dev (ephemeral), external RDS in prod
  3. Lifecycle Hooks: Pre-install database schema, post-upgrade health validation
  4. Configuration Surface: Expose replicas, GPU count, training parameters; lock security context
  5. Operator Experience: Reduce complexity around GPU scheduling and distributed training setup
  6. Multi-Environment: Dev uses minikube, staging uses small cluster, prod uses large cluster with GPU nodes
  7. Extensibility: Teams may add custom monitoring sidecars; expose sidecar injection
  8. Failure Modes: GPU node failures, OOM kills during training; charts should help diagnose
  9. Scaling: Training queue length is bottleneck, not app replicas; design monitoring for queue depth
  10. Team Boundaries: Platform owns GPU scheduling templates, ML team owns training logic

Step 2: Apply Principles

Output: A well-architected chart that developers can deploy to any Kubernetes cluster, with clear ownership and evolution path.


How to Invoke This Skill

When designing a new Helm chart:

Use the Helm Chart Architect skill to design architecture for:
[Project description with requirements, constraints, team structure]

Answer the 10 Questions in the context of this specific project.
Apply the 12 Principles to guide your architecture.
Produce a design document with:
- Component architecture (monolithic vs multi-chart)
- Dependency strategy
- Lifecycle hooks
- Values design
- Operational patterns

The skill activates architectural reasoning. It won't tell you "use this template." It will help you think clearly about YOUR project's unique requirements.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.