mirror of
https://github.com/TECHNOFAB11/kubenix.git
synced 2025-12-12 16:10:05 +01:00
docs: cleanup, fix links, add comments
This commit is contained in:
parent
8d10d79cfe
commit
95504f4c3b
12 changed files with 65 additions and 82 deletions
|
|
@ -1,9 +1,12 @@
|
|||
{kubenix ? import ../../../..}:
|
||||
kubenix.evalModules.x86_64-linux {
|
||||
module = {kubenix, ...}: {
|
||||
imports = [./module.nix];
|
||||
{ kubenix ? import ../../../.. }:
|
||||
kubenix.evalModules.${builtins.currentSystem} {
|
||||
module = { kubenix, ... }: {
|
||||
# instead of defining everything inline, let's import it
|
||||
imports = [ ./module.nix ];
|
||||
|
||||
# annotate the generated resources with a project name
|
||||
kubenix.project = "example";
|
||||
# define a target api version to validate output
|
||||
kubernetes.version = "1.24";
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,5 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
kubenix,
|
||||
...
|
||||
}: {
|
||||
imports = with kubenix.modules; [k8s];
|
||||
{ kubenix, ... }: {
|
||||
imports = [ kubenix.modules.k8s ];
|
||||
|
||||
kubernetes.resources = {
|
||||
deployments.nginx.spec = {
|
||||
|
|
@ -56,13 +50,11 @@
|
|||
};
|
||||
|
||||
services.nginx.spec = {
|
||||
ports = [
|
||||
{
|
||||
name = "http";
|
||||
port = 80;
|
||||
}
|
||||
];
|
||||
selector.app = "nginx";
|
||||
ports = [{
|
||||
name = "http";
|
||||
port = 80;
|
||||
}];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue