Skip to content

Commit

Permalink
fix: change how namespaces & argocd applications are handled
Browse files Browse the repository at this point in the history
  • Loading branch information
oliver-ni committed Jul 7, 2024
1 parent 856d208 commit 7099fe5
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 46 deletions.
6 changes: 3 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@
})
(builtins.readDir ./hosts);

# =======================
# Transpire Configuration
# =======================

fs = nixpkgs.lib.fileset;
allNixFiles = fs.fileFilter (file: file.hasExt "nix") ./.;

Expand Down
29 changes: 29 additions & 0 deletions kubernetes/apply-manually/applicationset.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: poketwo
namespace: argocd
spec:
generators:
- git:
directories:
- path: '*'
repoURL: https://github.com/poketwo/nix.git
revision: cluster
template:
metadata:
name: poketwo-{{path.basename}}
namespace: argocd
spec:
destination:
namespace: '{{path.basename}}'
server: https://kubernetes.default.svc
project: default
source:
path: '{{path}}'
repoURL: https://github.com/poketwo/nix.git
targetRevision: cluster
syncPolicy:
automated: {}
syncOptions:
- CreateNamespace=true
30 changes: 0 additions & 30 deletions kubernetes/core/argocd.nix
Original file line number Diff line number Diff line change
Expand Up @@ -45,35 +45,5 @@
};
};
};

resources."argoproj.io/v1alpha1".ApplicationSet.poketwo.spec = {
generators = [{
git = {
repoURL = "https://github.com/poketwo/nix.git";
revision = "cluster";
directories = [{ path = "*"; }];
};
}];

template = {
metadata = {
name = "poketwo-{{path.basename}}";
namespace = "argocd";
};
spec = {
project = "default";
source = {
repoURL = "https://github.com/poketwo/nix.git";
targetRevision = "cluster";
path = "{{path}}";
};
destination = {
server = "https://kubernetes.default.svc";
namespace = "{{path.basename}}";
};
syncPolicy.automated = { };
};
};
};
};
}
13 changes: 0 additions & 13 deletions kubernetes/extras/namespaces-first.nix

This file was deleted.

0 comments on commit 7099fe5

Please sign in to comment.