mirror of
https://github.com/TECHNOFAB11/kubenix.git
synced 2025-12-11 23:50:06 +01:00
fmt
This commit is contained in:
parent
ee38caab0e
commit
7ba59d844f
4 changed files with 24 additions and 14 deletions
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
deployment = import ./deployment { };
|
||||
testing = import ./testing { };
|
||||
deployment = import ./deployment {};
|
||||
testing = import ./testing {};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,13 +1,18 @@
|
|||
{ kubenix ? import ../../../.. }:
|
||||
{kubenix ? import ../../../..}:
|
||||
kubenix.evalModules.${builtins.currentSystem} {
|
||||
module = {kubenix, config, pkgs, ...}: {
|
||||
module = {
|
||||
kubenix,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
imports = with kubenix.modules; [k8s docker];
|
||||
docker = {
|
||||
registry.url = "docker.somewhere.io";
|
||||
images.example.image = pkgs.callPackage ./image.nix {};
|
||||
images.example.image = pkgs.callPackage ./image.nix {};
|
||||
};
|
||||
kubernetes.resources.pods.example.spec.containers = {
|
||||
custom.image = config.docker.images.example.path;
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
11
flake.nix
11
flake.nix
|
|
@ -147,12 +147,11 @@
|
|||
inherit pkgs;
|
||||
options =
|
||||
(self.evalModules.${system} {
|
||||
modules =
|
||||
builtins.attrValues (builtins.removeAttrs
|
||||
# the submodules module currently doesn't evaluate:
|
||||
# error: No module found ‹name›/latest
|
||||
# not sure how important that documentation is a this time
|
||||
self.nixosModules.kubenix ["submodule" "submodules"]);
|
||||
modules = builtins.attrValues (builtins.removeAttrs
|
||||
# the submodules module currently doesn't evaluate:
|
||||
# error: No module found ‹name›/latest
|
||||
# not sure how important that documentation is a this time
|
||||
self.nixosModules.kubenix ["submodule" "submodules"]);
|
||||
})
|
||||
.options;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -34,13 +34,19 @@ in {
|
|||
name = mkOption {
|
||||
description = "Desired docker image name";
|
||||
type = types.str;
|
||||
default = if config.image != null then builtins.unsafeDiscardStringContext config.image.imageName else "";
|
||||
default =
|
||||
if config.image != null
|
||||
then builtins.unsafeDiscardStringContext config.image.imageName
|
||||
else "";
|
||||
};
|
||||
|
||||
tag = mkOption {
|
||||
description = "Desired docker image tag";
|
||||
type = types.str;
|
||||
default = if config.image != null then builtins.unsafeDiscardStringContext config.image.imageTag else "";
|
||||
default =
|
||||
if config.image != null
|
||||
then builtins.unsafeDiscardStringContext config.image.imageTag
|
||||
else "";
|
||||
};
|
||||
|
||||
registry = mkOption {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue