mirror of
https://github.com/TECHNOFAB11/kubenix.git
synced 2025-12-12 16:10:05 +01:00
feat: remove old tests
This commit is contained in:
parent
4d08da78e0
commit
ef63459d96
2 changed files with 1 additions and 152 deletions
|
|
@ -1,2 +1,2 @@
|
|||
language: nix
|
||||
script: nix-build release.nix -A test -A test-old -A generate.istio -A generate.k8s
|
||||
script: nix-build release.nix -A test -A generate.istio -A generate.k8s
|
||||
|
|
|
|||
151
release.nix
151
release.nix
|
|
@ -48,155 +48,4 @@ in {
|
|||
tests = import ./tests {
|
||||
inherit pkgs lib kubenix;
|
||||
};
|
||||
|
||||
test-old = kubenix.buildResources ({
|
||||
module = {lib, config, kubenix, ...}: with lib; {
|
||||
imports = [
|
||||
kubenix.k8s
|
||||
kubenix.submodules
|
||||
kubenix.istio
|
||||
];
|
||||
|
||||
config = {
|
||||
kubernetes.version = "1.10";
|
||||
|
||||
kubernetes.api.defaults.all.metadata.namespace = mkDefault "my-namespace";
|
||||
|
||||
submodules.defaults = {config, parentConfig, ...}: {
|
||||
kubernetes = mkIf (hasAttr "kubernetes" config) {
|
||||
version = mkDefault parentConfig.kubernetes.version;
|
||||
api.defaults = mkDefault parentConfig.kubernetes.api.defaults;
|
||||
};
|
||||
};
|
||||
|
||||
submodules.imports = [
|
||||
# import nginx submodule
|
||||
./examples/module/nginx.nix
|
||||
|
||||
# import of patched nginx submodule
|
||||
{
|
||||
modules = [./examples/module/nginx.nix ({config, ...}: {
|
||||
config = {
|
||||
submodule.version = mkForce "1.0-xtruder";
|
||||
args.image = "xtruder/nginx";
|
||||
|
||||
submodules.instances.test2 = {
|
||||
submodule = "test";
|
||||
};
|
||||
|
||||
kubernetes.objects = config.submodules.instances.test2.config.kubernetes.objects;
|
||||
};
|
||||
})];
|
||||
}
|
||||
|
||||
# definition of test submodule
|
||||
{
|
||||
module = {submodule, ...}: {
|
||||
submodule.name = "test";
|
||||
|
||||
imports = [
|
||||
kubenix.k8s
|
||||
];
|
||||
|
||||
kubernetes.api.pods.my-pod = {
|
||||
metadata.name = submodule.name;
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
|
||||
submodules.instances.nginx-default = {
|
||||
submodule = "nginx";
|
||||
};
|
||||
|
||||
submodules.instances.nginx-xtruder = {
|
||||
submodule = "nginx";
|
||||
version = "1.0-xtruder";
|
||||
|
||||
config = {
|
||||
args.replicas = 9;
|
||||
kubernetes.api.deployments.nginx.metadata.namespace = "other-namespace";
|
||||
};
|
||||
};
|
||||
|
||||
submodules.instances.test = {
|
||||
submodule = "test";
|
||||
};
|
||||
|
||||
kubernetes.api."networking.istio.io"."v1alpha3".Gateway.test.spec = {
|
||||
selector.istio = "ingressgateway";
|
||||
servers = [{
|
||||
port = {
|
||||
number = 80;
|
||||
name = "http";
|
||||
protocol = "HTTP";
|
||||
};
|
||||
hosts = ["host.example.com"];
|
||||
tls.httpsRedirect = true;
|
||||
} {
|
||||
port = {
|
||||
number = 443;
|
||||
name = "https";
|
||||
protocol = "HTTPS";
|
||||
};
|
||||
hosts = ["host.example.com"];
|
||||
tls = {
|
||||
mode = "SIMPLE";
|
||||
serverCertificate = "/path/to/server.crt";
|
||||
privateKey = "/path/to/private.key";
|
||||
caCertificates = "/path/to/ca.crt";
|
||||
};
|
||||
}];
|
||||
};
|
||||
|
||||
#kubernetes.api."cloud.google.com".v1beta1.BackendConfig.my-backend = {
|
||||
#};
|
||||
|
||||
#modules.nginx1 = {
|
||||
#args = {
|
||||
#replicas = 2;
|
||||
#};
|
||||
|
||||
#kubernetes.api.defaults.deployments = {
|
||||
#spec.replicas = mkForce 3;
|
||||
#};
|
||||
|
||||
#kubernetes.customResources = [{
|
||||
#group = "cloud.google.com";
|
||||
#version = "v1beta1";
|
||||
#kind = "BackendConfig";
|
||||
#plural = "backendconfigs";
|
||||
#description = "Custom resource";
|
||||
#module = {
|
||||
#options.spec = {
|
||||
#cdn = mkOption {
|
||||
#description = "My cdn";
|
||||
#type = types.str;
|
||||
#default = "test";
|
||||
#};
|
||||
#};
|
||||
#};
|
||||
#}];
|
||||
#};
|
||||
|
||||
#modules.nginx2 = {
|
||||
#args = {
|
||||
#replicas = 2;
|
||||
#};
|
||||
|
||||
#kubernetes.api.defaults.deployments = {
|
||||
#spec.replicas = mkForce 3;
|
||||
#};
|
||||
#};
|
||||
|
||||
kubernetes.objects = mkMerge [
|
||||
config.submodules.instances.nginx-default.config.kubernetes.objects
|
||||
config.submodules.instances.nginx-xtruder.config.kubernetes.objects
|
||||
config.submodules.instances.test.config.kubernetes.objects
|
||||
];
|
||||
|
||||
#kubernetes.customResources = config.modules.nginx1.kubernetes.customResources;
|
||||
};
|
||||
};
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue