mirror of
https://github.com/TECHNOFAB11/kubenix.git
synced 2025-12-12 16:10:05 +01:00
chore: remove old examples
This commit is contained in:
parent
fc9abaa519
commit
d7150a9df8
2 changed files with 0 additions and 90 deletions
|
|
@ -1,67 +0,0 @@
|
||||||
{ config, lib, pkgs, kubenix, k8s, submodule, ... }:
|
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
let
|
|
||||||
name = submodule.name;
|
|
||||||
in {
|
|
||||||
imports = [
|
|
||||||
kubenix.k8s
|
|
||||||
];
|
|
||||||
|
|
||||||
options.args = {
|
|
||||||
replicas = mkOption {
|
|
||||||
type = types.int;
|
|
||||||
description = "Number of nginx replicas to run";
|
|
||||||
default = 1;
|
|
||||||
};
|
|
||||||
|
|
||||||
simpleAuth = k8s.mkSecretOption {
|
|
||||||
description = "Simple auth";
|
|
||||||
default = {
|
|
||||||
key = "name";
|
|
||||||
name = "value";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
image = mkOption {
|
|
||||||
description = "Image";
|
|
||||||
type = types.str;
|
|
||||||
default = "nginx";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = {
|
|
||||||
submodule = {
|
|
||||||
name = "nginx";
|
|
||||||
version = "1.0.0";
|
|
||||||
description = "Nginx module";
|
|
||||||
passthru = {
|
|
||||||
kubernetes.objects = config.kubernetes.objects;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
kubernetes.api.deployments.nginx = {
|
|
||||||
metadata = {
|
|
||||||
name = name;
|
|
||||||
labels = {
|
|
||||||
module = config.submodule.name;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
spec = {
|
|
||||||
replicas = config.args.replicas;
|
|
||||||
selector.matchLabels.app = "nginx";
|
|
||||||
template.metadata.labels.app = "nginx";
|
|
||||||
template.spec = {
|
|
||||||
containers.nginx = {
|
|
||||||
image = config.args.image;
|
|
||||||
env = {
|
|
||||||
SIMPLE_AUTH = k8s.secretToEnv config.args.simpleAuth;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
||||||
{
|
|
||||||
kubernetes.resources.deployments.nginx = {
|
|
||||||
metadata.labels.app = "nginx";
|
|
||||||
spec = {
|
|
||||||
replicas = 3;
|
|
||||||
selector.matchLabels.app = "nginx";
|
|
||||||
template = {
|
|
||||||
metadata.labels.app = "nginx";
|
|
||||||
spec.containers.nginx = {
|
|
||||||
name = "nginx";
|
|
||||||
image = "nginx:1.7.9";
|
|
||||||
ports."80" = {};
|
|
||||||
resources.requests.cpu = "100m";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
kubernetes.resources.services.nginx = {
|
|
||||||
spec.selector.app = "nginx";
|
|
||||||
spec.ports."80".targetPort = 80;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue