-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes the K8s-cronjob to a sidecar #206
Conversation
Fixes puppetlabs#204 by migrating the r10k cronjobs to sidecars The sidecar is using crond, while still respecting all values.yaml options from the cronjob
Hey @sistason - thank you very much for the nice contribution! We agree that this is the way to go though it will be utilized usefully only when the support for multiple Puppet masters running on different K8s nodes lands in the chart. We're gonna review the PR in the coming days. Thank you once more! It's appreciated! |
Hey @sistason - I tested it today but I couldn't make it work. /opt # ls -ltrah /etc/puppetlabs/code/environments/production/
total 8
drwxr-xr-x 3 puppet ping 4.0K Apr 11 19:08 ..
drwxr-x--- 2 puppet ping 4.0K Apr 11 19:08 . And it appears not to be able to clone a remote repo: /home/puppet # /opt/r10k.cronjob.sh
ERROR -> Unable to determine current branches for Git source 'puppet_repo' (/etc/puppetlabs/code/environments)
Original exception:
Command exited with non-zero exit code:
Command: git clone --mirror [email protected]:Xtigyro/puppet-control-repo.git /etc/puppetlabs/code/r10k_cache/[email protected]
Stderr:
Cloning into bare repository '/etc/puppetlabs/code/r10k_cache/[email protected]'...
Host key verification failed.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Exit code: 128
1 Secondly, using Do you think you can try to work on those points? Or can we work together? Let me know please - so we organize our efforts efficiently. And thanks once again for the contribution! |
@sistason I've started the work here: https://github.com/Xtigyro/puppetserver-helm-chart/tree/v310 |
@underscorgan @sistason It appears we can achieve running An issue has been filed to the creators of that awesome tool: aptible/supercronic#60 |
For reference purposes - the PR which adds |
I won't be able to put much time in here, also since I have no idea of puppet, just K8s...
|
No worries - the issues have been overcome. Thanks for the reply and your time. CC - @slconley @underscorgan |
The issues overcome? via supercronic? Could you tell me again what I can contribute here, so we're on the same page? :) |
Via r10k:
image: xtigyro/r10k
tag: 0.2 |
i did test the code in the v310 branch and the r10k image but we have still the same issue. the cronjob tries to attach a pvc which is already bound to the puppetserver. |
@kubicgruenfeld Are you sure you've tested the code from that branch? There's no cronjob in it. |
Maybe I missed something. Will check again. |
@Xtigyro i tested again and you were right, i was on the wrong branch. But there are still some bits not working as expected. I have the configmap r10k-code-config but the mount to /etc/puppetlabs/puppet/r10k.yaml does not seem to be working. I had a look through the code and as far as i can tell, this should work. And if running ~/.r10k_code_cronjob.out i also get this, which seems strange:
|
@kubicgruenfeld Could you please verify whether a Puppet Agent can connect and deploy your Puppet/Hiera code? There's a section in the README which you can literally copy-paste to test it, too: https://github.com/Xtigyro/puppetserver-helm-chart/tree/v310#testing-the-deployed-chart-resources |
@kubicgruenfeld In the meantime, I'll try to fix the non-working |
@kubicgruenfeld Both issues should be fixed. Could you please re-test? |
Found one other small issue which was related to the previous two ones - fixed. The chart |
@underscorgan @slconley @kubicgruenfeld @sistason @baurmatt |
@sistason Could you please review the following PR in your fork: syseleven#1 |
Closing this as the chart has been moved to its own GitHub repo at: https://github.com/puppetlabs/puppetserver-helm-chart |
Fixes #204 by migrating the r10k cronjobs to sidecars
The sidecar is using crond, while still respecting all values.yaml options from the cronjob