helmfile HCL templates add CIDR functions
Introduced 2026-03-02 · score 0.97
HOW TO USE IT
When templating IP addresses or subnet ranges from HCL in Helmfile v1.4.0, use `cidrhost`, `cidrnetmask`, `cidrsubnet`, or `cidrsubnets` with the required arguments for the calculation. [HCL Functions](https://github.com/helmfile/helmfile/blob/v1.4.0/docs/hcl_funcs.md)
cidrhost("10.0.0.0/8", 2)cidrsubnet("10.0.0.0/8", 8, 2)cidrsubnets("10.0.0.0/8", 4, 4)WHY THIS HELPS
Template static IP addresses or subnet ranges for Kubernetes resources from HCL in a Helmfile repository.
REQUIREMENTS AND LIMITATIONS
- Version: v1.4.0
- cidrhost(prefix, hostnum): `prefix` (required): IP network address prefix.
- cidrhost(prefix, hostnum): `hostnum` (required): Host number within the prefix.
- cidrnetmask(prefix): `prefix` (required): IPv4 address prefix in CIDR notation.
- cidrsubnet(prefix, newbits, netnum): `prefix` (required): IP network address prefix.
- cidrsubnet(prefix, newbits, netnum): `newbits` (required): Number of bits used to extend the prefix.
- cidrsubnet(prefix, newbits, netnum): `netnum` (required): Subnet number within the prefix.
- cidrsubnets(prefix, newbits...): `prefix` (required): CIDR prefix containing the consecutive ranges.
- cidrsubnets(prefix, newbits...): `newbits...` (required): One or more bit counts for the ranges to calculate.
- The release describes these functions as additions to Helmfile's supported HCL functions.
FIRST-PARTY EVIDENCE
- https://github.com/helmfile/helmfile/releases/tag/v1.4.0
- https://github.com/helmfile/helmfile/pull/2426
- https://github.com/helmfile/helmfile/blob/v1.4.0/docs/hcl_funcs.md
Check the installed version and the source before using it. Entry JSON