feat: initial back compatibility for kubenix 1.0

This commit is contained in:
Jaka Hudoklin 2019-09-27 18:29:54 +02:00
parent 2f3669a961
commit ff59c7d905
No known key found for this signature in database
GPG key ID: 11AA2A62319E4968
3 changed files with 203 additions and 0 deletions

View file

@ -30,6 +30,7 @@ let
./k8s/order.nix
./k8s/submodule.nix
./k8s/imports.nix
./k8s/v1/modules.nix
./helm/simple.nix
./istio/bookinfo.nix
./submodules/simple.nix

33
tests/k8s/v1/modules.nix Normal file
View file

@ -0,0 +1,33 @@
{ config, lib, kubenix, pkgs, k8sVersion, ... }: {
imports = with kubenix.modules; [ test k8s v1.modules ];
test = {
name = "k8s-v1-modules";
description = "Simple test tesing CRD";
assertions = [];
};
kubernetes.version = k8sVersion;
kubernetes.moduleDefinitions.app.module = { config, k8s, ... }: {
kubernetes.resources.deployments.app = {
spec = {
replicas = 2;
selector = {
matchLabels.app = "app";
};
template.spec = {
containers.app = {
image = "hello-world";
};
};
};
};
};
kubernetes.modules.myapp = {
module = "app";
namespace = "test";
};
}