docs: cleanup, fix links, add comments

This commit is contained in:
Bryton Hall 2023-06-03 02:38:28 -04:00
parent 8d10d79cfe
commit 95504f4c3b
12 changed files with 65 additions and 82 deletions

View file

@ -1,12 +1,18 @@
# let's creata a function whose only input is the kubenix package
{kubenix ? import ../../../..}:
{ kubenix ? import ../../../.. }:
# evalModules is our main entrypoint
kubenix.evalModules.${builtins.currentSystem} {
# to it, we pass a module that accepts a (different) kubenix object
module = {kubenix, ...}: {
module = { kubenix, ... }: {
# in order to define options, we need to import their definitions
imports = with kubenix.modules; [k8s];
imports = [ kubenix.modules.k8s ];
# now we have full access to define Kubernetes resources
kubernetes.resources.pods.example.spec.containers.ex.image = "nginx";
kubernetes.resources.pods = {
# "example" is the name of our pod
example.spec.containers = {
# "ex" is the name of the container in our pod
ex.image = "nginx";
};
};
};
}