Skip to content

Commit

Permalink
Merge pull request #36 from projectsyn/template-sync
Browse files Browse the repository at this point in the history
Update from component template
  • Loading branch information
simu authored Jan 7, 2025
2 parents e3eace9 + 6b5ef2a commit 453cb93
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .cruft.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"template": "https://github.com/projectsyn/commodore-component-template.git",
"commit": "d4de63246df6d971a866ce5ddee808dceb5effa8",
"commit": "98d16f99766e6c6d97322dbe42e058f0e2bf73d0",
"checkout": "main",
"context": {
"cookiecutter": {
Expand Down
3 changes: 2 additions & 1 deletion class/defaults.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
parameters:
vertical_pod_autoscaler:
=_metadata: {}
=_metadata:
multi_tenant: true
namespace: syn-vertical-pod-autoscaler

manifestVersion: vertical-pod-autoscaler-1.2.1
Expand Down
2 changes: 1 addition & 1 deletion class/vertical-pod-autoscaler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ parameters:
- input_paths:
- ${_base_directory}/component/app.jsonnet
input_type: jsonnet
output_path: apps/
output_path: .
- input_paths:
- ${_base_directory}/component/main.jsonnet
input_type: jsonnet
Expand Down
6 changes: 5 additions & 1 deletion component/app.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ local argocd = import 'lib/argocd.libjsonnet';

local app = argocd.App('vertical-pod-autoscaler', params.namespace);

local appPath =
local project = std.get(std.get(app, 'spec', {}), 'project', 'syn');
if project == 'syn' then 'apps' else 'apps-%s' % project;

{
'vertical-pod-autoscaler': app,
['%s/vertical-pod-autoscaler' % appPath]: app,
}

0 comments on commit 453cb93

Please sign in to comment.