Resources
Nyl provides Kubernetes-style custom resources for declarative configuration and deployment.
Resource Types
Section titled “Resource Types”Core Resources
Section titled “Core Resources”- NylRelease: Defines release metadata (name, namespace) for deployments
- Component: Compact chart-backed resource using dynamic
kindlookup - HelmChart: Declarative Helm chart deployment with templating support
- RemoteManifest: Fetch and include manifests from a remote HTTPS URL
ArgoCD Resources
Section titled “ArgoCD Resources”- ApplicationGenerator: Automatically generates ArgoCD Applications from NylRelease files
Policy Resources
Section titled “Policy Resources”- Kyverno Policies: Apply Kyverno mutation and validation policies at render time
Resource Format
Section titled “Resource Format”All Nyl resources follow Kubernetes resource conventions:
apiVersion: <api-version>kind: <resource-kind>metadata: name: <name> namespace: <namespace> # Optionalspec: # Resource-specific fieldsAPI Versions
Section titled “API Versions”nyl.niklasrosenstein.github.com/v1: Core Nyl resources (NylRelease, HelmChart)- Includes:
NylRelease,HelmChart,RemoteManifest
- Includes:
argocd.nyl.niklasrosenstein.github.com/v1: ArgoCD integration resources (ApplicationGenerator)components.nyl.niklasrosenstein.github.com/v1: Component resources (dynamickindpath/shortcut)
Processing Behavior
Section titled “Processing Behavior”Regular Kubernetes Resources
Section titled “Regular Kubernetes Resources”Regular Kubernetes resources (ConfigMap, Deployment, etc.) are passed through unchanged during nyl render.
Nyl Resources
Section titled “Nyl Resources”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
Multi-Document Files
Section titled “Multi-Document Files”Nyl supports YAML multi-document files with --- separators:
apiVersion: nyl.niklasrosenstein.github.com/v1kind: NylReleasemetadata: name: myapp namespace: default---apiVersion: v1kind: ConfigMapmetadata: name: myapp-configdata: key: value---apiVersion: v1kind: Servicemetadata: name: myapp-svcspec: ports: - port: 80Processing:
- NylRelease is extracted (provides name and namespace)
- ConfigMap and Service are output as-is