# Add an Ingress Template to a Helm Chart

Yes. An agent adds an opt-in Ingress template with hosts, paths, TLS and class name to your Helm chart, keeps the default render identical, and opens a PR.

[Run this on Rush](https://cloud.getrush.ai/run/add-ingress/helm/). Opens the console with this prompt ready to send, in a Project that has your repository.

## What the agent does

The agent reads the chart and its checks first. In a repository like helm/examples, `charts/hello-world/` is a small application chart: `Chart.yaml` at version `0.1.0` with `appVersion` `1.16.0`, a `values.yaml` with `replicaCount`, an `image` block for `nginx`, `nameOverride`, `fullnameOverride`, a `serviceAccount` block and a `service` block of type `ClusterIP` on port 80, and three templates, `deployment.yaml`, `service.yaml` and `serviceaccount.yaml`, built on the `hello-world.fullname`, `hello-world.labels` and `hello-world.selectorLabels` helpers in `_helpers.tpl`. The Deployment names its container port `http`, and `NOTES.txt` branches on the Service type to print a URL. There is no `ingress.yaml`, no `kubeVersion` in `Chart.yaml`, and `ct.yaml` plus `.github/workflows/lint-test.yaml` run `ct lint` and `ct install` on a kind cluster for every changed chart.

It writes `templates/ingress.yaml` wrapped in `{{- if .Values.ingress.enabled }}`, with `apiVersion: networking.k8s.io/v1`, the chart's standard labels, `ingressClassName` from `.Values.ingress.className` when set, annotations from `.Values.ingress.annotations`, a `tls` block rendered from `.Values.ingress.tls`, and a `rules` loop over `.Values.ingress.hosts` and each host's `paths`, each with a `pathType` and a backend pointing at the Service name from `hello-world.fullname` and the port from `.Values.service.port`. `values.yaml` gains an `ingress` block with `enabled: false`, an empty `className`, empty `annotations`, one example host with a `/` path of type `ImplementationSpecific`, and an empty `tls` list, so the default render is byte-for-byte what it was.

`NOTES.txt` gets a first branch for `.Values.ingress.enabled` that prints `http://` or `https://` plus each host and path depending on whether the host appears in `tls`, so `helm install` tells the user where the app is. Because `ct lint` fails a changed chart whose version did not move and the release workflow publishes by version, `Chart.yaml` goes to `0.2.0`, and the chart's `README.md` gets the new values in its table.

Then the agent proves the default did not change. It runs `helm lint charts/hello-world`, renders `helm template ahoy charts/hello-world` before and after and diffs the output to show nothing moved, renders again with `--set ingress.enabled=true` and a host to show the Ingress object with the right Service name and port, and runs `ct lint --charts charts/hello-world` with the repository's `ct.yaml`. The sandbox has no Docker, so `ct install` on kind is opt-in: on request it installs `docker.io`, starts `dockerd`, creates a kind cluster and runs the same install step the workflow does.

## Start it with one API call

`POST https://api.phoenix.so/o/{org}/sessions`

```json
{
  "agent": "claude",
  "input": "Add an Ingress to the hello-world chart in this repository. Read Chart.yaml, values.yaml, every file under templates/, the chart README, ct.yaml and the lint-test workflow first. Write templates/ingress.yaml guarded by ingress.enabled, using networking.k8s.io/v1, the chart's label helpers, ingressClassName from ingress.className, annotations, a tls block and a rules loop over ingress.hosts and their paths with pathType, with the backend pointing at the Service name from the fullname helper and the port from service.port. Add an ingress block to values.yaml with enabled false and one example host so the default render is unchanged, add an ingress branch to NOTES.txt, bump the chart version, and document the values in the chart README. Run helm lint, diff helm template output before and after with the default values, render once with ingress enabled and a host, run ct lint for the chart, and open a pull request. Do not start a cluster unless asked.",
  "resources": [
    {
      "url": "https://github.com/your-org/your-app"
    }
  ]
}
```

1. **Get an API key.** In the console, open Settings, then API keys, and create a key for your org. Send it in the Authorization header as a Bearer token.
2. **Send the request.** POST the body in request.json to https://api.phoenix.so/o/{org}/sessions, with your repository as the resources URL. The run starts in its own cloud sandbox.
3. **Read what came back.** Follow the run on its live stream or wait for the run.completed webhook, then read the result and its trajectory.

## What comes back

What comes back is a pull request on its own branch adding `charts/hello-world/templates/ingress.yaml`, extending `values.yaml`, `NOTES.txt` and the chart README, and bumping `Chart.yaml`. `deployment.yaml`, `service.yaml`, `serviceaccount.yaml` and `_helpers.tpl` are unchanged.

The description shows the empty diff of the default render, the rendered Ingress with the example host, and the `helm lint` and `ct lint` output. The commands and outputs are in the transcript at `GET /o/{org}/sessions/{id}/messages`.

Before merging, a reviewer sets `ingress.className` and the host they really use in a values file, checks the annotations their controller needs, and lets the repository's own workflow run `ct install` on kind. A follow-up message to the same session can add an `ingress.extraPaths` list or a `kubeVersion` constraint to `Chart.yaml`.

## Run it on every Linear issue labelled chart

A team that files chart work in Linear starts one run per issue from an automation with a `linear` trigger on the `chart` label. The automation adds the issue after this prompt, so an issue that names an ingress class, a hostname or a TLS secret is what the agent reads, and the run starts in the repository the automation names.

Each run opens its own pull request from its own sandbox, and an automation run has its own `max_runs_per_hour` cap. The pull request links the issue and carries the rendered Ingress, so the review is a read of one template and one render.

## Why run it on Rush?

An Ingress template is mostly conditionals, and the ways it goes wrong are a default render that quietly changes, a backend that names the wrong Service, or a chart version that trips the linter. The agent proves each of those with the chart's own tools in a sandbox with Helm and chart-testing installed: an empty diff for the default, a rendered object for the enabled case, and a passing `ct lint`.

The pull request carries those renders and that output, so the reviewer reads evidence rather than re-rendering. Several charts can get the same treatment at once, each in its own sandbox, with one pull request each.

## Frequently asked questions

### Does anything change for people who install the chart today?

No. `ingress.enabled` defaults to `false`, and the agent diffs `helm template` output with the default values before and after to show the rendered manifests are identical. The only visible change is the chart version.

### Why bump the chart version?

`ct lint`, which the repository's `lint-test.yaml` workflow runs on every pull request, fails a changed chart whose version did not increase, and the release workflow packages charts by version. The bump to `0.2.0` is what lets the change pass CI and be released.

### Which Kubernetes versions does the template support?

It uses `networking.k8s.io/v1`, the Ingress API that every supported Kubernetes release serves. The chart sets no `kubeVersion`, and the agent leaves that as it is but notes in the pull request that a constraint could be added if the team targets older clusters.

### How do I set a TLS certificate?

Add an entry under `ingress.tls` with `secretName` and the `hosts` it covers, and the template renders the `tls` block; `NOTES.txt` then prints `https://` for those hosts. Creating the Secret, or annotating the Ingress for a certificate manager, is left to the values file the reviewer writes.

## More Helm jobs

- [Add Kubeconform Validation to CI for a Helm Chart](https://getrush.ai/run/add-kubeconform-to-ci/helm/)
- [Add a NetworkPolicy Option to a Helm Chart](https://getrush.ai/run/add-network-policy/helm/)
- [Add a Pod Disruption Budget to a Helm Chart](https://getrush.ai/run/add-pod-disruption-budgets/helm/)

## The same job on other stacks

- [Add an Ingress to a Kubernetes App](https://getrush.ai/run/add-ingress/kubernetes/)
- [Add an Ingress to a Kustomize App from a Linear Issue](https://getrush.ai/run/add-ingress/kustomize/)

## More jobs like this: Turn a Linear label into a PR

- [Add Input Validation to an Actix Web App from a Linear Issue](https://getrush.ai/run/add-input-validation/actix/)

## Keep reading

- [How a Rush run works on your repository, from request to pull request](https://getrush.ai/cloud/)
- [Compare cloud agents, agent sandboxes and AI code review](https://getrush.ai/compare/)
- [Rush pricing: Free, Pro and Max](https://getrush.ai/pricing/)
