kubenix/docs/examples/nginx-deployment/default.nix

60 lines
1.3 KiB
Nix
Raw Normal View History

2022-04-02 12:40:35 -07:00
{
evalModules,
registry,
}: let
2019-03-07 18:03:51 +01:00
# evaluated configuration
2022-04-02 14:42:22 -07:00
inherit
((evalModules {
2022-04-02 12:40:35 -07:00
module = {kubenix, ...}: {
imports = [
kubenix.modules.testing
./module.nix
];
# commonalities
kubenix.project = "nginx-deployment-example";
docker.registry.url = registry;
kubernetes.version = "1.21";
testing = {
2022-04-02 12:40:35 -07:00
tests = [./test.nix];
docker.registryUrl = "";
# testing commonalities for tests that exhibit the respective feature
common = [
{
2022-04-02 12:40:35 -07:00
features = ["k8s"];
options = {
kubernetes.version = "1.20";
};
}
];
};
};
2022-04-02 14:42:22 -07:00
}))
config
;
2022-04-02 12:40:35 -07:00
in {
2021-05-28 20:26:17 -05:00
inherit config;
# config checks
checks = config.testing.success;
# TODO: e2e test
# test = config.testing.result;
# nixos test script for running the test
2021-05-28 20:26:17 -05:00
test-script = config.testing.testsByName.nginx-deployment.script;
2019-03-07 18:03:51 +01:00
2020-01-14 19:13:33 +00:00
# genreated kubernetes List object
2022-04-02 13:43:57 -07:00
inherit (config.kubernetes) generated;
2019-03-07 18:03:51 +01:00
2020-01-14 19:13:33 +00:00
# JSON file you can deploy to kubernetes
2022-04-02 13:43:57 -07:00
inherit (config.kubernetes) result;
2019-03-07 18:03:51 +01:00
# Exported docker images
images = config.docker.export;
# script to push docker images to registry
pushDockerImages = config.docker.copyScript;
2019-03-07 18:03:51 +01:00
}