Releases: arnarg/nixidy
v0.18.1
v0.18.0
Features
- Add new experimental Python-based CLI. 7a18380
- Add
fromChartCRDgenerator for CRD resources. 58b9247 (docs) - Add
syncPolicy.syncOptions.createNamespaceoption to create namespaces without tracking. #67 @kalbasit - Add
syncPolicy.retryconfiguration for ArgoCD applications. #67 @kalbasit - Add
syncPolicy.managedNamespaceMetadatafor managing namespace metadata. #67 @kalbasit - Support append env suffix to all application names with
nixidy.appendNameWithEnv. #65 @kalbasit - Allow setting destination for appOfApps bootstrap in multi-cluster environments. #62 @kalbasit
- Implement Application.spec.destination.name for cluster name-based deployment. #61 @kalbasit
- Allow setting helm.extraOpts for all applications. #72 @kalbasit
Bug Fixes
- Exclude namespaces created with
createNamespacefrom pruning. 4070e1d - Handle spec.selector.matchLabels in
lib.kube.removeLabelsfor DaemonSet, ReplicaSet, and StatefulSet. #69 @kalbasit - Allow container resource request/limits be string, int or float. 5e14658
- Allow skipping coerceToList in generator. 1a5d112
- Allow multiple docs in one yaml. #58 @mirosval
- Allow
_[a-zA-Z]+string for an attr key. #55 @rfuwa14
Improvements
- Generate k8s resource options for v1.34. 0ecda82
- Change to nixfmt-rfc-style formatting. #57 @rfuwa14
Special thanks to all contributors who helped improve nixidy.
v0.17.0
Features
Template System: Introduce reusable configuration templates for your applications! This drastically reduces duplication and promotes consistency across your deployments. Define a template once, then instantiate it multiple times within a single or different applications.
Learn more: Templates User Guide
Enhancements
We now have a logo! I hope you all like it!
v0.16.0
Features
- Direct Kubernetes Deployments: A new
nixidy applycommand has been introduced, allowing you to directly deploy your nixidy-defined Kubernetes applications without first commiting them to a git repository or use Argo CD at all. This command generates and applies Kubernetes manifests, including Custom Resource Definitions (CRDs), Namespaces, and other resources, usingkubectl apply --prune. This helps manage the full lifecycle of your applications directly from your nixidy configuration.
Improvements
- Resource Options Generation Enhancements: The
fromCRDresource options generator has received some bug-fixes:
Documentation
- New Documentation Domain: The project documentation is now accessible on its new domain: nixidy.dev.
v0.15.0
Features
• Customizable CRD Attribute Naming: You can now explicitly override the generated Nix attribute names for CRDs using the new attrNameOverrides option in nixidy.generators.fromCRD. This is particularly useful for resolving naming conflicts or tailoring names for better ergonomics. See the updated documentation for details. @schradert #43
• Automatic Flattening of Kubernetes List Objects: Helm and Kustomize outputs will now automatically flatten Kubernetes List objects (e.g., ConfigMapList) into their individual component resources. Custom CRDs with kind ending with List will remain untouched. @schradert #46
• Environment Naming Option: A new nixidy.env option has been added, allowing you to specify a clear environment name for your configuration. This improves clarity for various generated outputs and build artifacts. @schradert #45
Improvements
• Enhanced CRD Attribute Name Generation: The internal logic for generating attribute names from CRDs (e.g., NetworkPolicy -> networkPolicies) has been refined to better handle leading acronyms (e.g., HTTPRoute -> httpRoutes), resulting in more consistent and intuitive names by default. @schradert #44
• Optimized Manifest Generation: Previously every single manifest was its own derivation and application derivations would symlink all the YAML manifest derivations. Now application derivations contain all manifests. This results in a lot fewer derivations built during nixidy build.
• More Robust Label Filtering: Improved the internal logic for handling metadata label transformations to be more resilient, correctly applying updates even when the metadata.labels path might not initially exist. @schradert #41
v0.14.0
Features
- Resolve Naming Conflicts for Custom Resources: The
fromCRDfunction now supports a newnamePrefixargument. This allows users to resolve potential naming conflicts that arise when multiple Custom Resource Definitions (CRDs) define resources with the samekind(e.g.,Database). By specifying anamePrefix, generated attribute names can be made unique (e.g.,resources.postgresDatabasesandresources.mysqlDatabases).- For more details, refer to the updated section in the User Guide for Typed Resources.
Bug Fixes
- Optional Protocol for Service Ports: Fixed an issue where the
protocolfield was implicitly required forServicePortdefinitions when using an attribute set for ports. Theprotocolfield is now correctly treated as optional, aligning with Kubernetes API behavior. This allows defining ports likeports = { http = { containerPort = 80; }; }without explicitly specifying a protocol. @aserowy #35
Improvements
- CRD Generator Enhancements: The
fromCRDgenerator has improved handling for OpenAPI schema constructs, such asanyOfandx-kubernetes-int-or-string. @schradert #37
New Contributors
- @aserowy made their first contribution in #35
- @schradert made their first contribution in #37
v0.13.0
Features
-
Enhanced
nixidy.extraFilesOption:- The
nixidy.extraFilesoption has been improved to offer more flexibility. - You can now specify an existing file path using the new
sourcesub-option, in addition to providing inlinetext. - Example:
nixidy.extraFiles = { "README.md".text = '' # Manifests Rendered manifests live here. Run `./scripts/setup.sh`. ''; "scripts/setup.sh".source = ./path/to/my-script.sh; };
- The
-
New
nixidy.bootstrapManifest.enableOption:- A new convenience option
nixidy.bootstrapManifest.enablehas been added. - When set to
true, Nixidy will automatically generate abootstrap.yamlfile in your build output. This file contains the Argo CD Application manifest for your main "app of apps". - This is the same Application manifest as is output from
nixidy bootstrap .#<env>but allows you to runkubectl apply -f ./path/to/env/bootstrap.yamlinstead.
- A new convenience option
Internal Improvements & Refactorings
- Improved Kubernetes Resource Options Generation:
- The generation now leverages Kubernetes discovery APIs to dynamically identify namespaced resources, making the automatic namespace assignment feature possible for all supported versions of Kubernetes.
- Removed
namespaced.nixmodule:- The manually created
modules/applications/namespaced.nixfile has been removed as its functionality is now superseded by the automatic namespace assignment feature in the generated Kubernetes resource options.
- The manually created
v0.12.0
This release introduces significant improvements to how Kubernetes resource definitions are managed and exposed within nixidy, primarily by deprecating the external kubenix dependency in favor of an internal generation mechanism. This change allows for greater control over supported Kubernetes API versions and more reliable access to up-to-date resource schemas.
New Features
- Configurable Kubernetes API Version (
nixidy.k8sVersion): You can now explicitly select the Kubernetes API version to use for generated resource options.- A new
nixidy.k8sVersionoption has been added to specify the desired Kubernetes API version. - Currently supported versions include
1.30,1.31,1.32, and1.33. For example, settingnixidy.k8sVersion = "1.33";will use Kubernetes 1.33 definitions.
- A new
Improvements
- Self-Contained Kubernetes Resource Generation: The dependency on the external
kubenixproject for Kubernetes resource definitions has been removed.- nixidy now includes an internal generator for Kubernetes API objects, directly fetching and processing OpenAPI specifications from the official Kubernetes repository.
- This was needed to support new versions of Kubernetes which have not been added to kubenix.
v0.11.0
✨ Features
-
Argo CD v3.0.0 Support: The generated Nix options for Argo CD CRDs have been updated from version
v2.14.2tov3.0.0. This provides typed access to the latest features and options available in Argo CD. -
Selective Diffing with
ignoreDifferences: A newapplications.<name>.ignoreDifferencesoption has been added. This allows you to specify resource fields that Argo CD should ignore during comparison, preventing out-of-sync states for fields managed by in-cluster controllers. This is a powerful feature for fine-tuning your GitOps workflow. @adamchol #33- For more details, see the Argo CD documentation on diffing.
-
Improved Container Port Definition: You can now define container ports without explicitly specifying the protocol (which defaults to TCP). This simplifies configurations for the most common use cases.
Before:
ports.http = { containerPort = 80; protocol = "TCP"; };
After:
ports.http.containerPort = 80;
New Contributors
Full Changelog: v0.10.0...v0.11.0
v0.10.0
Features:
- Update
fromCRDgenerator to handle special case ofanyOfwhere the type can be either string or int. #30 Thanks @zaninime ! lib.kube.removeLabelsalso removes fromspec.selector.matchLabelsin deployments. 5b9dea2
Changes
- Rename 3 options, these use
mkRenamedOptionsModuleso the old form will still work but print a warning message. a2ba791nixidy.resourceImports->nixidy.applicationImportsnixidy.defaults.syncPolicy.autoSync.enabled->nixidy.defaults.syncPolicy.autoSync.enableapplications.*.syncPolicy.autoSync.enabled->applications.*.syncPolicy.autoSync.enable