wip: add openfga app with direct helm render
This commit is contained in:
+3
-3
@@ -1,6 +1,6 @@
|
||||
_manifest.yaml
|
||||
_resources.yaml
|
||||
*.tgz
|
||||
_build/
|
||||
_*/
|
||||
.direnv/
|
||||
.pre-commit-config.yaml
|
||||
_manifest.yaml
|
||||
_resources.yaml
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
{
|
||||
imports = [
|
||||
./atlantis.nix
|
||||
./openfga.nix
|
||||
];
|
||||
|
||||
config = {
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
{ lib, config, charts, ... }:
|
||||
let
|
||||
cfg = config.services.openfga;
|
||||
|
||||
namespace = "openfga";
|
||||
env = "prod";
|
||||
project = "aux";
|
||||
cluster = "https://kubernetes.default.svc";
|
||||
|
||||
values = lib.attrsets.recursiveUpdate {} cfg.values;
|
||||
in
|
||||
{
|
||||
options.services.openfga = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
description = "Enable";
|
||||
};
|
||||
autoSync = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
description = "Auto sync";
|
||||
};
|
||||
prune = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Prune";
|
||||
};
|
||||
values = lib.mkOption {
|
||||
type = lib.types.attrsOf lib.types.anything;
|
||||
default = {};
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
applications.openfga = {
|
||||
inherit namespace;
|
||||
inherit project;
|
||||
|
||||
name = "${env}-openfga";
|
||||
destination.server = cluster;
|
||||
|
||||
helm.releases.openfga = {
|
||||
inherit values;
|
||||
chart = lib.helm.downloadHelmChart {
|
||||
repo = "https://openfga.github.io/helm-charts";
|
||||
chart = "openfga";
|
||||
version = "0.2.12";
|
||||
chartHash = "sha256-7yLcw9/oNPvCePrtTJwKAG88t0Ym5Dl/S83Gz+gQdDU=";
|
||||
};
|
||||
};
|
||||
|
||||
annotations = {
|
||||
"argocd.argoproj.io/compare-options" = "ServerSideDiff=true";
|
||||
};
|
||||
|
||||
syncPolicy = {
|
||||
syncOptions = {
|
||||
applyOutOfSyncOnly = true;
|
||||
};
|
||||
autoSync = lib.mkIf cfg.autoSync {
|
||||
prune = cfg.prune;
|
||||
selfHeal = false;
|
||||
};
|
||||
};
|
||||
|
||||
resources = {};
|
||||
};
|
||||
};
|
||||
}
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
target = {
|
||||
repository = "https://gitlab.com/oveanbox/manifests.git";
|
||||
branch = "main";
|
||||
rootPath = "_build";
|
||||
rootPath = "_manifests";
|
||||
};
|
||||
|
||||
resourceImports = [
|
||||
|
||||
Reference in New Issue
Block a user