devel: remove stale nixidy stuff

This commit is contained in:
2025-06-19 16:46:01 +02:00
parent d1148a6df8
commit 7cd6cc352b
6 changed files with 0 additions and 54273 deletions
-13
View File
@@ -1,13 +0,0 @@
_:
{
config = {
apps = {
env = "prod";
autoSync = false;
prune = false;
atlantis.enable = true;
openfga.enable = true;
};
};
}
-17
View File
@@ -1,17 +0,0 @@
_:
{
config = {
apps = {
env = "staging";
autoSync = true;
prune = true;
atlantis = {
enable = true;
autoSync = true;
prune = false;
};
openfga.enable = true;
};
};
}
File diff suppressed because it is too large Load Diff
-79
View File
@@ -1,79 +0,0 @@
{ lib, config, ... }:
let
cfg = config.apps;
in
{
imports = [];
options.apps = with lib; {
env = mkOption {
type = types.str;
default = "prod";
description = "Enable";
};
autoSync = mkOption {
type = types.bool;
default = true;
description = "Auto sync";
};
prune = mkOption {
type = types.bool;
default = false;
description = "Prune";
};
selfHeal = mkOption {
type = types.bool;
default = false;
description = "Self-heal";
};
serverSideDiff = mkOption {
type = types.bool;
default = true;
description = "Enable server-side diffing";
};
};
config = {
nixidy = {
target = {
repository = "https://gitlab.com/oveanbox/manifests.git";
branch = "main";
rootPath = "_manifests/${config.apps.env}";
};
resourceImports = [
./cilium-crd.nix
./kyverno-crd.nix
];
chartsDir = ../charts;
defaults = {
syncPolicy = {
autoSync = {
enabled = cfg.autoSync;
prune = cfg.prune;
selfHeal = cfg.selfHeal;
};
};
# Many helm chars will render all resources with the
# following labels.
# This produces huge diffs when the charts are updated
# because the values of these labels change each release.
# Here we add a transformer that strips them out after
# templating the helm charts in each application.
helm.transformer = map (
lib.kube.removeLabels [
"app.kubernetes.io/version"
"helm.sh/chart"
]
);
};
};
};
}
File diff suppressed because it is too large Load Diff
-93
View File
@@ -1,93 +0,0 @@
{ pkgs, kube }:
{
appOptions = opts: with pkgs.lib; {
enable = mkOption {
type = types.bool;
default = true;
description = "Enable";
};
autoSync = mkOption {
type = types.bool;
default = true;
description = "Auto sync";
};
prune = mkOption {
type = types.bool;
default = false;
description = "Prune";
};
serverSideDiff = mkOption {
type = types.bool;
default = true;
description = "Enable server-side diffing";
};
name = mkOption {
type = types.nullOr types.str;
default = null;
description = "Application name";
};
namespace = mkOption {
type = types.nullOr types.str;
default = null;
description = "Namespace";
};
project = mkOption {
type = types.str;
default = "default";
description = "Project";
};
cluster = mkOption {
type = types.str;
default = "https://kubernetes.default.svc";
description = "Cluster";
};
values = mkOption {
type = types.attrsOf types.anything;
default = {};
description = "Values";
};
} // opts;
appConfig = cfg: name: conf:
with pkgs.lib;
let
app = conf // {
name = if builtins.isNull cfg.name then name else cfg.name;
project = cfg.project;
destination.server = cfg.cluster;
createNamespace = true;
compareOptions = {
serverSideDiff = cfg.serverSideDiff;
};
syncPolicy = {
syncOptions = {
applyOutOfSyncOnly = true;
};
autoSync = mkIf cfg.autoSync {
prune = cfg.prune;
selfHeal = false;
};
};
} // (if builtins.isNull cfg.namespace then {} else { namespace = cfg.namespace; });
in mkIf cfg.enable { applications.${name} = app; };
appValues = with pkgs.lib; { env, base, extraValues}:
attrsets.mergeAttrsList (lists.flatten [
(kube.fromYAML (builtins.readFile "${base}/values.yaml"))
(kube.fromYAML (builtins.readFile "${base}/values-${env}.yaml"))
[ extraValues ]
]);
}