mirror of
https://github.com/TECHNOFAB11/kubenix.git
synced 2025-12-12 08:00:06 +01:00
feat: initial helm integration (thanks to @matejc)
helm2json was first implemented by matejc in https://github.com/matejc/helm2json and incorperated in this project, big thanks to @matejc for making this possible
This commit is contained in:
parent
a5f9639258
commit
ba1144a8df
7 changed files with 296 additions and 0 deletions
|
|
@ -32,6 +32,7 @@ let
|
|||
./k8s/1.13/crd.nix
|
||||
./k8s/submodule.nix
|
||||
./k8s/defaults.nix
|
||||
./helm/simple.nix
|
||||
./istio/bookinfo.nix
|
||||
./submodules/simple.nix
|
||||
./submodules/defaults.nix
|
||||
|
|
|
|||
40
tests/helm/simple.nix
Normal file
40
tests/helm/simple.nix
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
{ config, test, kubenix, k8s, helm, ... }:
|
||||
|
||||
with k8s;
|
||||
|
||||
let
|
||||
corev1 = config.kubernetes.api.core.v1;
|
||||
appsv1beta2 = config.kubernetes.api.apps.v1beta2;
|
||||
in {
|
||||
imports = [
|
||||
kubenix.helm
|
||||
];
|
||||
|
||||
test = {
|
||||
name = "helm-simple";
|
||||
description = "Simple k8s testing wheter name, apiVersion and kind are preset";
|
||||
assertions = [{
|
||||
message = "should have generated resources";
|
||||
assertion =
|
||||
appsv1beta2.StatefulSet ? "app-psql-postgreql" &&
|
||||
corev1.ConfigMap ? "app-psql-postgresql-init-scripts" &&
|
||||
corev1.Secret ? "app-psql-postgresql" &&
|
||||
corev1.Service ? "app-psql-postgresql-headless" ;
|
||||
} {
|
||||
message = "should have namespace defined";
|
||||
assertion =
|
||||
appsv1beta2.StatefulSet.app-psql-postgresql.metadata.namespace == "test-namespace";
|
||||
}];
|
||||
};
|
||||
|
||||
kubernetes.api.namespaces.test-namespace = {};
|
||||
|
||||
kubernetes.helm.instances.app-psql = {
|
||||
namespace = "test-namespace";
|
||||
chart = helm.fetch {
|
||||
chart = "stable/postgresql";
|
||||
version = "3.0.0";
|
||||
sha256 = "0icnnpcqvf1hqn7fc9niyifd0amlm9jfrx3iks0y360rk8wndbch";
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue