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,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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue