xtruder / kubenix

Replaced by https://github.com/hall/kubenix
MIT License
300 stars 34 forks source link

installation instructions? usage? #4

Closed kalbasit closed 4 years ago

kalbasit commented 6 years ago

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!

pkoch commented 5 years ago

The furthest I got was to nix-build 2> /dev/null | xargs cat | jq ., which gave me something I could probably apply.

kalbasit commented 5 years ago

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;
    };
  };
}
offlinehacker commented 5 years ago

I am having several updates for kubenix in work, which will improve api and documentation.

kalbasit commented 5 years ago

@offlinehacker when to expect the changes?

offlinehacker commented 5 years ago

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:

kalbasit commented 5 years ago

@offlinehacker that's awesome news, and right in time for me as well! Should we close this issue in favor of #9?