mirror of
https://github.com/TECHNOFAB11/kubenix.git
synced 2025-12-12 16:10:05 +01:00
feat(examples): add nginx deployment
This commit is contained in:
parent
5d8b66f8a0
commit
432cc9e347
6 changed files with 140 additions and 0 deletions
33
examples/nginx-deployment/default.nix
Normal file
33
examples/nginx-deployment/default.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{ kubenix ? import ../.. {} }:
|
||||
|
||||
with kubenix.lib;
|
||||
|
||||
let
|
||||
registy = "docker.io/gatehub";
|
||||
in rec {
|
||||
# evaluated configuration
|
||||
config = (kubenix.evalModules {
|
||||
modules = [
|
||||
./module.nix
|
||||
{ docker.registry.url = registy; }
|
||||
];
|
||||
}).config;
|
||||
|
||||
# list of kubernetes objects
|
||||
objects = config.kubernetes.objects;
|
||||
|
||||
# hashed kubernetes List object
|
||||
listObject = k8s.mkHashedList { items = config.kubernetes.objects; };
|
||||
|
||||
# YAML file you can deploy to kubernetes
|
||||
yaml = toYAML listObject;
|
||||
|
||||
# Exported docker images
|
||||
images = config.docker.export;
|
||||
|
||||
# script to push docker images to registry
|
||||
pushDockerImages = docker.copyDockerImages {
|
||||
inherit images;
|
||||
dest = "docker://${registy}";
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue