Skip to content

Commit

Permalink
try lazy inventory
Browse files Browse the repository at this point in the history
  • Loading branch information
Danny Heinrich committed Sep 9, 2022
1 parent 11a9165 commit 0fb8bab
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .kapitan
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 0.30.0
version: 0.31.0rc0
compile:
prune: true
embed-refs: true
6 changes: 3 additions & 3 deletions components/generators/argocd/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import os

from kapitan.cached import args
from kapitan.inputs.kadet import BaseObj, Dict
from kapitan.inputs.kadet import BaseObj, inventory
from kapitan.utils import render_jinja2_file

search_paths = args.get('search_paths')
Expand All @@ -14,7 +14,7 @@
def j2(filename, ctx):
return render_jinja2_file(filename, ctx, search_paths=search_paths)

inv = Dict()
inv = inventory(lazy=True)

def merge(source, destination):
for key, value in source.items():
Expand Down Expand Up @@ -321,4 +321,4 @@ def main(input_params):
whitelisted_functions = ['generate_manifests']
function = input_params.get('function', 'generate_manifests')
if function in whitelisted_functions:
return globals()[function](input_params)
return globals()[function](input_params)
4 changes: 2 additions & 2 deletions components/generators/kubernetes/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
import os

from kapitan.cached import args
from kadet import ABORT_EXCEPTION_TYPE, BaseObj, Dict
from kapitan.inputs.kadet import BaseObj, inventory
from kapitan.utils import render_jinja2_file

from . import k8s

search_paths = args.get('search_paths')

inv = Dict()
inv = inventory(lazy=True)


def j2(filename, ctx):
Expand Down
4 changes: 2 additions & 2 deletions components/generators/rabbitmq/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import os

from kapitan.cached import args
from kadet import ABORT_EXCEPTION_TYPE, BaseObj, Dict
from kadet import ABORT_EXCEPTION_TYPE, BaseObj, inventory
from kapitan.utils import render_jinja2_file

search_paths = args.get('search_paths')
Expand All @@ -14,7 +14,7 @@
def j2(filename, ctx):
return render_jinja2_file(filename, ctx, search_paths=search_paths)

inv = Dict()
inv = inventory(lazy=True)

def merge(source, destination):
for key, value in source.items():
Expand Down
4 changes: 2 additions & 2 deletions components/generators/terraform/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from kadet import ABORT_EXCEPTION_TYPE, BaseObj, Dict
from kadet import ABORT_EXCEPTION_TYPE, BaseObj, inventory

inv = Dict()
inv = inventory()


def main(input_params):
Expand Down

0 comments on commit 0fb8bab

Please sign in to comment.