Skip to content

Resources

Nyl provides Kubernetes-style custom resources for declarative configuration and deployment.

  • NylRelease: Defines release metadata (name, namespace) for deployments
  • Component: Compact chart-backed resource using dynamic kind lookup
  • HelmChart: Declarative Helm chart deployment with templating support
  • RemoteManifest: Fetch and include manifests from a remote HTTPS URL
  • Kyverno Policies: Apply Kyverno mutation and validation policies at render time

All Nyl resources follow Kubernetes resource conventions:

apiVersion: <api-version>
kind: <resource-kind>
metadata:
name: <name>
namespace: <namespace> # Optional
spec:
# Resource-specific fields
  • nyl.niklasrosenstein.github.com/v1: Core Nyl resources (NylRelease, HelmChart)
    • Includes: NylRelease, HelmChart, RemoteManifest
  • argocd.nyl.niklasrosenstein.github.com/v1: ArgoCD integration resources (ApplicationGenerator)
  • components.nyl.niklasrosenstein.github.com/v1: Component resources (dynamic kind path/shortcut)

Regular Kubernetes resources (ConfigMap, Deployment, etc.) are passed through unchanged during nyl render.

Nyl resources are processed based on their kind:

  • NylRelease: Extracted and removed from output (provides metadata only)
  • Component: Resolved to a chart reference and rendered via Helm, replaced with rendered manifests
  • HelmChart: Rendered using Helm templating, replaced with rendered manifests
  • RemoteManifest: Fetched via HTTPS and parsed into documents, then processed recursively
  • ApplicationGenerator: Processed to generate ArgoCD Applications, removed from output

Nyl supports YAML multi-document files with --- separators:

apiVersion: nyl.niklasrosenstein.github.com/v1
kind: NylRelease
metadata:
name: myapp
namespace: default
---
apiVersion: v1
kind: ConfigMap
metadata:
name: myapp-config
data:
key: value
---
apiVersion: v1
kind: Service
metadata:
name: myapp-svc
spec:
ports:
- port: 80

Processing:

  1. NylRelease is extracted (provides name and namespace)
  2. ConfigMap and Service are output as-is