puppetlabs / puppetserver-helm-chart

The Helm Chart for Puppet Server
Apache License 2.0
52 stars 56 forks source link

Run 'puppet generate types' when appropriate #145

Open bjvrielink opened 1 year ago

bjvrielink commented 1 year ago

Use Case

I get 'Could not autoload' errors in Puppet.

Describe the Solution You Would Like

I would like to run the command 'puppet generate types --environment $environment' when needed (for example, in r10k postrun)

Describe Alternatives You've Considered

I have naively tried to add a postrun in the r10k config myself, until I realized that there is no puppet installed in the r10k container.

Additional Context

What is the best approach? Multiple containers have access to /etc/puppetlabs/code, but the one that knows when to run generate types does not have puppet and the one that has the puppet command does not know when to run generate types.

davidphay commented 1 year ago

We use the officiel R10K image, so if puppet is not installed we can't do anything.

You still can build a custom image with puppet and update the downloaded image in the values.yaml ( r10k.image and r10k.tag ).

Then you can use postrun to execute what you need.

Unless you have a better idea, feel free to send our way a PR !