mirror of
https://github.com/TECHNOFAB11/kubenix.git
synced 2025-12-12 16:10:05 +01:00
docs reset
This commit is contained in:
parent
43371dba54
commit
b874fce232
10 changed files with 225 additions and 28 deletions
59
docs/examples/nginx-deployment/default.nix
Normal file
59
docs/examples/nginx-deployment/default.nix
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
{
|
||||
evalModules,
|
||||
registry,
|
||||
}: let
|
||||
# evaluated configuration
|
||||
inherit
|
||||
((evalModules {
|
||||
module = {kubenix, ...}: {
|
||||
imports = [
|
||||
kubenix.modules.testing
|
||||
./module.nix
|
||||
];
|
||||
|
||||
# commonalities
|
||||
kubenix.project = "nginx-deployment-example";
|
||||
docker.registry.url = registry;
|
||||
kubernetes.version = "1.21";
|
||||
|
||||
testing = {
|
||||
tests = [./test.nix];
|
||||
docker.registryUrl = "";
|
||||
# testing commonalities for tests that exhibit the respective feature
|
||||
common = [
|
||||
{
|
||||
features = ["k8s"];
|
||||
options = {
|
||||
kubernetes.version = "1.20";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}))
|
||||
config
|
||||
;
|
||||
in {
|
||||
inherit config;
|
||||
|
||||
# config checks
|
||||
checks = config.testing.success;
|
||||
|
||||
# TODO: e2e test
|
||||
# test = config.testing.result;
|
||||
|
||||
# nixos test script for running the test
|
||||
test-script = config.testing.testsByName.nginx-deployment.script;
|
||||
|
||||
# genreated kubernetes List object
|
||||
inherit (config.kubernetes) generated;
|
||||
|
||||
# JSON file you can deploy to kubernetes
|
||||
inherit (config.kubernetes) result;
|
||||
|
||||
# Exported docker images
|
||||
images = config.docker.export;
|
||||
|
||||
# script to push docker images to registry
|
||||
pushDockerImages = config.docker.copyScript;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue