get_secret fails with random provider
Closed this issue · 0 comments
AFriemann commented
running gen/validate with get_secrets fails when using the random provider
---
# Source: secret.yaml.j2
Traceback (most recent call last):
File "/home/aljosha/.local/bin/k8t", line 8, in <module>
sys.exit(main())
File "/home/aljosha/.local/lib/python3.8/site-packages/k8t/cli.py", line 294, in main
root() # pylint: disable=no-value-for-parameter
File "/home/aljosha/.local/lib/python3.8/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/home/aljosha/.local/lib/python3.8/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/home/aljosha/.local/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/aljosha/.local/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/aljosha/.local/lib/python3.8/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/home/aljosha/.local/lib/python3.8/site-packages/k8t/cli.py", line 138, in cli_gen
print(eng.get_template(template_path).render(vals))
File "/usr/lib/python3.8/site-packages/jinja2/asyncsupport.py", line 76, in render
return original_render(self, *args, **kwargs)
File "/usr/lib/python3.8/site-packages/jinja2/environment.py", line 1008, in render
return self.environment.handle_exception(exc_info, True)
File "/usr/lib/python3.8/site-packages/jinja2/environment.py", line 780, in handle_exception
reraise(exc_type, exc_value, tb)
File "/usr/lib/python3.8/site-packages/jinja2/_compat.py", line 37, in reraise
raise value.with_traceback(tb)
File "/home/aljosha/temporary/templates/secret.yaml.j2", line 10, in <module>
# certificate.pem: "{{ get_secret('/foobar') | b64encode }}"
File "/home/aljosha/.local/lib/python3.8/site-packages/k8t/filters.py", line 89, in get_secret
return provider(
TypeError: random() takes from 1 to 2 positional arguments but 3 were given