Skip to content

feat: add provider for kiln - #369

Merged
knadh merged 4 commits into
knadh:masterfrom
Thunderbottom:feat/kiln-provider
Jul 12, 2025
Merged

feat: add provider for kiln#369
knadh merged 4 commits into
knadh:masterfrom
Thunderbottom:feat/kiln-provider

Conversation

@Thunderbottom

Copy link
Copy Markdown
Contributor

Add support for loading encrypted environment variables from kiln files with age/SSH encryption.

import (
    // ...
    "github.com/knadh/koanf/providers/kiln"
)

// Load encrypted environment variables with transformations
k.Load(kiln.Provider("kiln.toml", "", "production", kiln.Opt{
    Prefix: "API_",
    TransformFunc: func(k, v string) (string, any) {
        return strings.ToLower(strings.ReplaceAll(k, "_", ".")), v
    },
}), nil)

Provides the same API as the env provider but reads from encrypted files instead of environment variables.

repository: https://github.com/thunderbottom/kiln

allows loading encrypted environment variables directly into go applications

Signed-off-by: Chinmay D. Pai <[email protected]>
requires initializing the kiln key, configuration, and setting a few
variables described in examples/read-kiln/main.go

Signed-off-by: Chinmay D. Pai <[email protected]>
@knadh knadh added the enhancement New feature or request label Jul 12, 2025
@knadh
knadh merged commit 73703f1 into knadh:master Jul 12, 2025
0 of 2 checks passed
schwarlex pushed a commit to la-demos/vcluster-workshop-prep that referenced this pull request Feb 11, 2026
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [github.com/knadh/koanf/v2](https://github.com/knadh/koanf) | require | minor | `v2.2.2` -> `v2.3.0` |

---

### Release Notes

<details>
<summary>knadh/koanf (github.com/knadh/koanf/v2)</summary>

### [`v2.3.0`](https://github.com/knadh/koanf/releases/tag/v2.3.0)

[Compare Source](knadh/koanf@v2.2.2...v2.3.0)

#### What's Changed

- feat: add provider for kiln by [@&#8203;Thunderbottom](https://github.com/Thunderbottom) in [#&#8203;369](knadh/koanf#369)
- Fix rendering of header and add it to the table of contents by [@&#8203;remyzandwijk](https://github.com/remyzandwijk) in [#&#8203;373](knadh/koanf#373)
- Bump github.com/go-viper/mapstructure/v2 from 2.0.0-alpha.1 to 2.4.0 in /examples by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;375](knadh/koanf#375)
- feat: add HUML parser support by [@&#8203;rhnvrm](https://github.com/rhnvrm) in [#&#8203;374](knadh/koanf#374)
- Bump github.com/go-viper/mapstructure/v2 from 2.2.1 to 2.4.0 in /tests by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;376](knadh/koanf#376)
- Bump github.com/go-viper/mapstructure/v2 from 2.2.1 to 2.4.0 in /providers/cliflagv3 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;378](knadh/koanf#378)
- Bump github.com/go-viper/mapstructure/v2 from 2.3.0 to 2.4.0 in /providers/cliflagv2 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;380](knadh/koanf#380)
- Add thread safety to resolve race conditions in Issues [#&#8203;305](knadh/koanf#305) and [#&#8203;335](knadh/koanf#335) by [@&#8203;rhnvrm](https://github.com/rhnvrm) in [#&#8203;377](knadh/koanf#377)
- fix: bump mapstructure version by [@&#8203;rostislaved](https://github.com/rostislaved) in [#&#8203;381](knadh/koanf#381)

#### New Contributors

- [@&#8203;remyzandwijk](https://github.com/remyzandwijk) made their first contribution in [#&#8203;373](knadh/koanf#373)
- [@&#8203;rostislaved](https://github.com/rostislaved) made their first contribution in [#&#8203;381](knadh/koanf#381)

**Full Changelog**: <knadh/koanf@v2.2.2...v2.3.0>

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS4xMjcuMiIsInVwZGF0ZWRJblZlciI6IjQxLjEyNy4yIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIiwibGFiZWxzIjpbXX0=-->

Reviewed-on: https://kubara.git.onstackit.cloud/STACKIT/kubara/pulls/98
Co-authored-by: Matthias_Huether <[email protected]>
Co-committed-by: Matthias_Huether <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants