Skip to content
Kubernetes RenderingAuthoring Local Components

Authoring Local Components

Local components are standard Helm charts placed under configured component search roots.

Each component must exist at:

<components_search_path>/<apiVersion>/<kind>/
Chart.yaml
values.yaml
templates/

With default configuration:

[project]
components_search_paths = ["components"]

A component example/v1/Nginx resolves to:

components/example/v1/Nginx/Chart.yaml
Terminal window
nyl create component example/v1 Nginx

This scaffolds:

components/example/v1/Nginx/
Chart.yaml
values.yaml
values.schema.json
templates/deployment.yaml
apiVersion: components.k8s.nyl/v1
kind: example/v1/Nginx
metadata:
name: web
namespace: default
spec:
replicaCount: 3
image:
repository: nginx

spec is passed to Helm as values, merged on top of chart defaults from values.yaml.

A nyl-component.yaml next to Chart.yaml can declare value imports: selections of the effective Cluster and DeploymentTarget values that become chart value defaults. Invocations then supply only their own settings and overrides.

  • Keep component manifests separate from chart templates. nyl render accepts a file path, not a directory.
  • Use nyl validate --strict in CI to catch missing search paths early.
  • Prefer stable apiVersion/kind naming for internal component APIs.