puppetlabs / puppetserver-helm-chart

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

Choice between g10k and r10k #190

Open ldaneliukas opened 10 months ago

ldaneliukas commented 10 months ago

Use Case

I'd like to use g10k instead of r10k. The way that the chart is made right now, does not allow you to not use r10k. Changing the r10k image to g10k will not work due to configuration differences. Utilizing g10k with webhooks is also not possible since you need an ingress exposed, leaving you to deploy g10k alongside your puppetserver as an independent deployment.

The issue with the latter is that r10k can't be disabled and you need to change the command it uses to basically do nothing in an infinite loop.

r10k is usually fine, but in setups with a control repository that is used by a lot of different people it simply does not cut it as it is really slow.

Describe the Solution You Would Like

Ideally: A choice for whether you want to use g10k or r10k and the possibility to utilize webhooks (with g10k) by exposing an ingress as this is by far the fastest way to deploy environments.

Okey: A choice for whether you want to use g10k or r10k.

At least: Possibility to disable r10k entirely if the user opts to manage his code/environments independently.

Describe Alternatives You've Considered

Currently overcoming this limitation by deploying g10k independently and setting the following values for r10k:

  r10k:
    code:
      # There is no option to disable r10k. Sleep until interrputed (helm delete/upgrade/etc)
      command: ["/bin/sh"]
      args: ["-c", "trap : TERM INT; sleep 9999999999d & wait"]
      cronJob:
        enabled: false
      readinessProbe:
        - /bin/true
    hiera:
      cronJob:
        enabled: false

Additional Context

I can create a PR for this.

Xtigyro commented 10 months ago

Yeah - please create a PR. Sounds reasonable to me. Maybe @davidphay can comment here too.