Skip to content

Releases: arnarg/nixidy

v0.18.1

11 Dec 13:41

Choose a tag to compare

This is a small bugfix release.

Bug Fixes

  • Workaround a PyYAML issue where some CRDs could not be processed by fromCRD and fromChartCRD. #76

v0.18.0

21 Nov 21:40

Choose a tag to compare

Features

  • Add new experimental Python-based CLI. 7a18380
  • Add fromChartCRD generator for CRD resources. 58b9247 (docs)
  • Add syncPolicy.syncOptions.createNamespace option to create namespaces without tracking. #67 @kalbasit
  • Add syncPolicy.retry configuration for ArgoCD applications. #67 @kalbasit
  • Add syncPolicy.managedNamespaceMetadata for 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 createNamespace from pruning. 4070e1d
  • Handle spec.selector.matchLabels in lib.kube.removeLabels for 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

05 Sep 13:42

Choose a tag to compare

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!

nixidy logo

v0.16.0

19 Aug 06:50

Choose a tag to compare

Features

  • Direct Kubernetes Deployments: A new nixidy apply command 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, using kubectl apply --prune. This helps manage the full lifecycle of your applications directly from your nixidy configuration.

Improvements

  • Resource Options Generation Enhancements: The fromCRD resource options generator has received some bug-fixes:
    • It now automatically includes apiVersion, kind, and metadata fields when generating from CRDs without those fields. #51 @ryotafuwa-dev
    • Improved handling of x-kubernetes-int-or-string. #49 @ryotafuwa-dev

Documentation

  • New Documentation Domain: The project documentation is now accessible on its new domain: nixidy.dev.

v0.15.0

04 Aug 06:18

Choose a tag to compare

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

04 Jul 20:29

Choose a tag to compare

Features

  • Resolve Naming Conflicts for Custom Resources: The fromCRD function now supports a new namePrefix argument. This allows users to resolve potential naming conflicts that arise when multiple Custom Resource Definitions (CRDs) define resources with the same kind (e.g., Database). By specifying a namePrefix, generated attribute names can be made unique (e.g., resources.postgresDatabases and resources.mysqlDatabases).

Bug Fixes

  • Optional Protocol for Service Ports: Fixed an issue where the protocol field was implicitly required for ServicePort definitions when using an attribute set for ports. The protocol field is now correctly treated as optional, aligning with Kubernetes API behavior. This allows defining ports like ports = { http = { containerPort = 80; }; } without explicitly specifying a protocol. @aserowy #35

Improvements

  • CRD Generator Enhancements: The fromCRD generator has improved handling for OpenAPI schema constructs, such as anyOf and x-kubernetes-int-or-string. @schradert #37

New Contributors

v0.13.0

24 Jun 14:49

Choose a tag to compare

Features

  • Enhanced nixidy.extraFiles Option:

    • The nixidy.extraFiles option has been improved to offer more flexibility.
    • You can now specify an existing file path using the new source sub-option, in addition to providing inline text.
    • Example:
      nixidy.extraFiles = {
        "README.md".text = ''
          # Manifests
      
          Rendered manifests live here. Run `./scripts/setup.sh`.
        '';
        "scripts/setup.sh".source = ./path/to/my-script.sh;
      };
  • New nixidy.bootstrapManifest.enable Option:

    • A new convenience option nixidy.bootstrapManifest.enable has been added.
    • When set to true, Nixidy will automatically generate a bootstrap.yaml file 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 run kubectl apply -f ./path/to/env/bootstrap.yaml instead.

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.nix module:
    • The manually created modules/applications/namespaced.nix file has been removed as its functionality is now superseded by the automatic namespace assignment feature in the generated Kubernetes resource options.

v0.12.0

23 Jun 14:34

Choose a tag to compare

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.k8sVersion option has been added to specify the desired Kubernetes API version.
    • Currently supported versions include 1.30, 1.31, 1.32, and 1.33. For example, setting nixidy.k8sVersion = "1.33"; will use Kubernetes 1.33 definitions.

Improvements

  • Self-Contained Kubernetes Resource Generation: The dependency on the external kubenix project 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

17 Jun 15:36

Choose a tag to compare

✨ Features

  • Argo CD v3.0.0 Support: The generated Nix options for Argo CD CRDs have been updated from version v2.14.2 to v3.0.0. This provides typed access to the latest features and options available in Argo CD.

  • Selective Diffing with ignoreDifferences: A new applications.<name>.ignoreDifferences option 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

  • 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

28 Feb 13:12

Choose a tag to compare

Features:

  • Update fromCRD generator to handle special case of anyOf where the type can be either string or int. #30 Thanks @zaninime !
  • lib.kube.removeLabels also removes from spec.selector.matchLabels in deployments. 5b9dea2

Changes

  • Rename 3 options, these use mkRenamedOptionsModule so the old form will still work but print a warning message. a2ba791
    • nixidy.resourceImports -> nixidy.applicationImports
    • nixidy.defaults.syncPolicy.autoSync.enabled -> nixidy.defaults.syncPolicy.autoSync.enable
    • applications.*.syncPolicy.autoSync.enabled -> applications.*.syncPolicy.autoSync.enable