Closed kalbasit closed 4 years ago
The furthest I got was to nix-build 2> /dev/null | xargs cat | jq .
, which gave me something I could probably apply.
Similar here. I changed the simple example to this and nix-build it
let
kubenix = import(builtins.fetchGit{
url = "https://github.com/xtruder/kubenix.git";
rev = "7287c4ed9ee833ccbce2185038c068bac9c77e7c";
}) {};
in kubenix.buildResources {
configuration = {
kubernetes.resources.deployments.nginx = {
metadata.labels.app = "nginx";
spec = {
replicas = 3;
selector.matchLabels.app = "nginx";
template = {
metadata.labels.app = "nginx";
spec.containers.nginx = {
name = "nginx";
image = "nginx:1.7.9";
ports."80" = {};
resources.requests.cpu = "100m";
};
};
};
};
kubernetes.resources.services.nginx = {
spec.selector.app = "nginx";
spec.ports."80".targetPort = 80;
};
};
}
I am having several updates for kubenix in work, which will improve api and documentation.
@offlinehacker when to expect the changes?
Just to let you know, kubenix
is in a progress of major refactoring, that will implement all ideas and fix all issues we had at @gatehubnet and make it generally available. I will also take into account all the ideas here. Details and progress are in this issue: https://github.com/xtruder/kubenix/issues/9
Let's finally finish this :muscle:
@offlinehacker that's awesome news, and right in time for me as well! Should we close this issue in favor of #9?
Hi!
I'm pretty new to NixOS/Nix and I can't say for certain I'll be able to use this project. It would be awesome to give detailed instructions for installation/usage or even host a full example living in a different repo to highlight how it's used.
Thank you!