Skip to content

Add Helm chart with full component support and docs#45

Merged
nissessenap merged 9 commits into
mainfrom
helm
Mar 4, 2026
Merged

Add Helm chart with full component support and docs#45
nissessenap merged 9 commits into
mainfrom
helm

Conversation

@nissessenap

Copy link
Copy Markdown
Owner

Summary

  • Helm chart for all Shepherd components (operator, API server, web frontend, GitHub adapter) with OCI registry publishing (ghcr.io/nissessenap/helm-charts/shepherd)
  • CRDs managed via templates/ with helm.sh/resource-policy: keep so they upgrade with the chart but survive uninstall
  • GitHub adapter as an optional component (githubAdapter.enabled: false by default) with full secret mounting and callback configuration
  • Production features: PodDisruptionBudgets, HorizontalPodAutoscalers, configurable security contexts, RBAC, and extraObjects for arbitrary additional resources
  • values-quickstart.yaml for local Kind development with NodePort services (30080/30081) and 1 replica
  • Helm-first documentation: quickstart and deployment guide rewritten to use helm install with released OCI images instead of kustomize/ko
  • Helm values reference page symlinked into Hugo docs site from the helm-docs generated README.md
  • Release workflow updated with OCI chart publish job

Details

Chart structure

charts/shepherd/
├── Chart.yaml
├── README.md / README.md.gotmpl     # helm-docs generated
├── values.yaml                       # full defaults
├── values-quickstart.yaml            # Kind dev overrides
├── files/
│   ├── crds/                         # AgentTask CRD YAML
│   └── rbac.yaml                     # Operator ClusterRole rules
└── templates/
    ├── _helpers.tpl                   # naming, labels, image helpers
    ├── crds.yaml                      # CRD installer
    ├── extraobjects.yaml              # user-supplied extra resources
    ├── api/                           # API server (deploy, svc, sa, rbac, hpa, pdb)
    ├── operator/                      # Operator (deploy, sa, rbac)
    ├── web/                           # Web frontend (deploy, svc, sa, configmap-nginx, hpa, pdb)
    └── github-adapter/                # GitHub adapter (deploy, svc, sa, hpa, pdb)

Documentation changes

  • Quickstart: Prerequisites reduced to Docker, Kind, kubectl, Helm (no more ko, Go, Node.js). Uses official agent-sandbox release manifests, inline SandboxTemplate, and helm install from OCI registry
  • Deployment guide: Helm-based production guide replacing all kustomize content. Five clear steps: agent-sandbox → secrets → SandboxTemplate → Helm install → verify
  • Helm values page: Symlink from docs/content/docs/setup/helm-values.md to the generated chart README with Hugo frontmatter

Test plan

  • helm template test charts/shepherd/ renders without errors
  • helm template test charts/shepherd/ -f charts/shepherd/values-quickstart.yaml --set githubAdapter.enabled=false renders NodePort services, no adapter
  • helm template test charts/shepherd/ -f charts/shepherd/values-quickstart.yaml renders all components including adapter
  • hugo --minify in docs/ builds successfully with the new symlinked page
  • make helm-docs regenerates README.md with frontmatter
  • Deploy to Kind cluster with values-quickstart.yaml and verify pods come up

🤖 Generated with Claude Code

nissessenap and others added 8 commits March 3, 2026 20:52
Adds deployment, service, and serviceaccount templates for the GitHub
adapter, disabled by default. When enabled, mounts GitHub App credentials
from an existing secret and connects to the API internal port.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…m-values page

- Add Hugo frontmatter to README.md.gotmpl so generated README works as a Hugo page
- Create symlink docs/setup/helm-values.md → charts/shepherd/README.md
- Add values-quickstart.yaml with 1 replica, NodePort extraObjects for Kind
- Rewrite quickstart to use Helm + released images (removed ko/Go/Node.js prereqs)
- Rewrite deployment guide as Helm-based, remove all kustomize content

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

@nissessenap nissessenap left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor comments

{{- toYaml . | nindent 4 }}
{{- end }}
spec:
replicas: {{ .Values.api.replicas }}

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If hpa enabled we shouldn't say replicas.

- name: api
securityContext:
{{- toYaml .Values.api.securityContext | nindent 12 }}
image: {{ include "shepherd.image" (dict "service" .Values.api.image "global" .Values.global.image "defaultVersion" .Chart.AppVersion) }}

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we build repo and registry? If not we should

{{- end }}
volumeMounts:
- name: nginx-config
mountPath: /etc/nginx/conf.d/nginx.default.conf

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it really /etc since we are running rootless image from chainguard?

- name: nginx-tmp
mountPath: /var/lib/nginx/tmp
- name: nginx-run
mountPath: /var/run

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume this is needed due to not allowing to write to root. Are we sure that is how chainguard works + is path correct?

Comment thread charts/shepherd/values-quickstart.yaml Outdated
# values-quickstart.yaml — Local Kind development only. DO NOT use in production.
#
# Usage:
# Part 1 (no GitHub):

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit why is part 1 without GitHub? Call it no GitHub or similar, don't mention part

Comment thread charts/shepherd/values.yaml Outdated
pdb:
# -- Enable PodDisruptionBudget for the API
enabled: false
# -- Minimum available pods (mutually exclusive with maxUnavailable)

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a note that hpa/replica count always have to be +1 compared to minimum pdb. Or stuff will hang

nodes:
- role: control-plane
extraPortMappings:
- containerPort: 30080

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should have a nodeport for GitHub as well, the majority of users want to have it

```

The test overlay deploys all Shepherd components with NodePort services and **no GitHub App requirement**. This is the fastest way to explore the system.
Install Shepherd without the GitHub adapter:

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Show how to do it with GitHub adapter

Comment thread docs/content/docs/setup/deployment.md Outdated
---

This guide covers deploying Shepherd to a Kubernetes cluster. If you're looking to run locally for development, see the [Quickstart](../../getting-started/quickstart/) instead.
This guide covers deploying Shepherd to a Kubernetes cluster with Helm. If you're looking to run locally for development, see the [Quickstart](../../getting-started/quickstart/) instead.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For a quick test. For development they should read contributing


```bash
kubectl apply -f config/samples/sandbox-template-runner.yaml -n shepherd-system
EOF

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should add info that it's possible to do warm agent as well

…arnings

- Omit spec.replicas when HPA is enabled to prevent scale fights on helm upgrade
- Fix Chainguard nginx mount paths: /var/run → /run (pid), add /var/log/nginx
- Add PDB minAvailable + replicas warning to all three component sections
- Add GitHub adapter NodePort (30082) to quickstart values and Kind config
- Show helm install with GitHub adapter in quickstart docs
- Rename Part 1/Part 2 to descriptive headings (no GitHub / with GitHub)
- Fix deployment guide: quick test vs development (link to CONTRIBUTING.md)
- Add warm sandbox callout to deployment guide

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@nissessenap nissessenap merged commit 187f362 into main Mar 4, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant