NylRelease
The NylRelease resource specifies release metadata (name and namespace) for a deployment. It’s an optional resource that provides context for rendering manifests.
Resource Definition
Section titled “Resource Definition”apiVersion: nyl.niklasrosenstein.github.com/v1kind: NylReleasemetadata: name: string # Release name namespace: string # Target namespacespec: {} # Reserved for future use argocd: # Optional ArgoCD customization applicationOverride: {} # Partial Application override (object)Field Reference
Section titled “Field Reference”metadata.name
Section titled “metadata.name”- Type:
string(required) - Description: The release name
- Usage: Used as the Helm release name when rendering HelmCharts
metadata.namespace
Section titled “metadata.namespace”- Type:
string(required) - Description: The target namespace for this release
- Usage: Resources are deployed to this namespace
spec.argocd.applicationOverride
Section titled “spec.argocd.applicationOverride”- Type:
object(optional) - Description: Partial ArgoCD
Applicationoverride for use withApplicationGeneratorrelease customization policy - Behavior:
- Override fields are applied only if allowed by
ApplicationGenerator.spec.releaseCustomization - Plain keys replace the generated
Applicationvalue at that field path - Keys prefixed with
+append to list-valuedApplicationfields instead of replacing them +<field>uses the canonical field path without+for allow/deny checks- Unsupported or disallowed fields are ignored
- Invalid append operations (for example using
+on a non-list field or with a non-list value) are ignored - Ignored fields are reported as a warning in generated
Application.spec.info
- Override fields are applied only if allowed by
Behavior
Section titled “Behavior”During Rendering
Section titled “During Rendering”When nyl render encounters a NylRelease:
- The resource is extracted from the file
- Metadata is used for rendering other resources in the file
- The NylRelease itself is not included in the output
With ApplicationGenerator
Section titled “With ApplicationGenerator”When ApplicationGenerator scans files:
- Files with a NylRelease are discovered
- An ArgoCD Application is generated per NylRelease
- Application metadata comes from the NylRelease
Singleton Constraint
Section titled “Singleton Constraint”Only one NylRelease is allowed per file. Multiple NylReleases in the same file will cause an error:
Error: Multiple NylRelease resources found in fileExamples
Section titled “Examples”Minimal NylRelease
Section titled “Minimal NylRelease”apiVersion: nyl.niklasrosenstein.github.com/v1kind: NylReleasemetadata: name: myapp namespace: defaultWith Other Resources
Section titled “With Other Resources”apiVersion: nyl.niklasrosenstein.github.com/v1kind: NylReleasemetadata: name: myapp namespace: production---apiVersion: v1kind: ConfigMapmetadata: name: myapp-config namespace: productiondata: environment: production version: "1.0.0"---apiVersion: apps/v1kind: Deploymentmetadata: name: myapp namespace: productionspec: replicas: 3 selector: matchLabels: app: myapp template: metadata: labels: app: myapp spec: containers: - name: myapp image: myapp:1.0.0With HelmChart
Section titled “With HelmChart”apiVersion: nyl.niklasrosenstein.github.com/v1kind: NylReleasemetadata: name: nginx namespace: web---apiVersion: nyl.niklasrosenstein.github.com/v1kind: HelmChartmetadata: name: nginx namespace: webspec: chart: repository: https://charts.bitnami.com/bitnami name: nginx version: "15.4.4" values: replicaCount: 2Use Cases
Section titled “Use Cases”ArgoCD Integration
Section titled “ArgoCD Integration”NylRelease is primarily used for ArgoCD integration:
# app.yaml in Git repositoryapiVersion: nyl.niklasrosenstein.github.com/v1kind: NylReleasemetadata: name: myapp namespace: production---# ... other resources ...ArgoCD Application:
apiVersion: argoproj.io/v1alpha1kind: Applicationspec: source: plugin: name: nyl-v2 env: - name: NYL_RELEASE_NAME value: myapp # From NylRelease.metadata.name - name: NYL_RELEASE_NAMESPACE value: production # From NylRelease.metadata.namespaceAppending Sync Options
Section titled “Appending Sync Options”applicationOverride can append to list-valued Application fields by prefixing the field name with +.
apiVersion: nyl.niklasrosenstein.github.com/v1kind: NylReleasemetadata: name: service-proxies namespace: home-proxyspec: argocd: applicationOverride: spec: syncPolicy: +syncOptions: - RespectIgnoreDifferences=falseWhen combined with an ApplicationGenerator default such as:
syncPolicy: syncOptions: - ServerSideApply=true - ApplyOutOfSyncOnly=truethe generated ArgoCD Application contains all three entries in order:
spec: syncPolicy: syncOptions: - ServerSideApply=true - ApplyOutOfSyncOnly=true - RespectIgnoreDifferences=falseApplicationGenerator Discovery
Section titled “ApplicationGenerator Discovery”ApplicationGenerator scans for NylRelease resources:
apiVersion: argocd.nyl.niklasrosenstein.github.com/v1kind: ApplicationGeneratorspec: source: path: clusters/default # Scans this directoryFor each file in clusters/default/ with a NylRelease, an Application is generated.
Metadata Propagation
Section titled “Metadata Propagation”NylRelease metadata can be used in templates (future enhancement):
apiVersion: v1kind: ConfigMapmetadata: name: {{ .release.name }}-config namespace: {{ .release.namespace }}data: release_name: {{ .release.name }}Validation
Section titled “Validation”Required Fields
Section titled “Required Fields”metadata.namemust be specifiedmetadata.namespacemust be specified
Missing fields cause validation errors:
Error: Invalid NylRelease resource: missing field `metadata.name`Valid Names
Section titled “Valid Names”Names must follow Kubernetes naming conventions:
- Lowercase alphanumeric characters,
-,. - Start and end with alphanumeric
- Max 253 characters
When Not to Use
Section titled “When Not to Use”You don’t need NylRelease if:
- Deploying plain Kubernetes manifests without Helm
- Not using ArgoCD integration
- Rendering manifests locally without release context
In these cases, just use regular Kubernetes resources directly.
See Also
Section titled “See Also”- ApplicationGenerator
- ArgoCD Bootstrapping
- HelmChart Resource (future documentation)