Closed Frederickl78 closed 1 year ago
Adding this to puppetserver-deployment-masters.yaml resolve the issue. The configmap is added as volume but files are not "volumeMounted". Take note that I didnt put any conditions for adding this section files in volumeMount section of r10k-code sidecar.
mountPath: /etc/puppetlabs/code/
- name: puppet-puppet-storage
mountPath: /etc/puppetlabs/puppet/
+ - name: r10k-code-volume
+ mountPath: /etc/puppetlabs/puppet/r10k_code_entrypoint.sh
+ subPath: r10k_code_entrypoint.sh
+ - name: r10k-code-volume
+ mountPath: /etc/puppetlabs/puppet/r10k_code_cronjob.sh
+ subPath: r10k_code_cronjob.sh
+ - name: r10k-code-volume
+ mountPath: /etc/puppetlabs/puppet/r10k_code.yaml
+ subPath: r10k_code.yaml
readinessProbe:
exec:
command: ["/bin/sh", "-ec", "test -f {{ .Values.r10k.code.cronJob.successFile }}"]
@@ -578,6 +587,7 @@ spec:
- name: r10k-code-volume
configMap:
name: {{ template "puppetserver.fullname" . }}-r10k-code-config
+ defaultMode: 0777
{{- end }}
{{- if or (.Values.r10k.hiera.viaSsh.credentials.existingSecret) (and (.Values.r10k.hiera.viaSsh.credentials.ssh.value) (.Values.r10k.hiera.viaSsh.credentials.known_hosts.value)) }}
- name: r10k-hiera-ssh
Sorry for the delay, thnaks for the fix, can you please create a PR I'll review and merge it afterward !
Describe the Bug
/etc/puppetlabs/puppet/r10k_code_entrypoint.sh: not found for r10k-sidecar. A dry-run indiquate that puppetserver-r10k-code-config configmap is created and added as volume to puppetserver pod but files in it are not mounted in destination folder.
Expected Behavior
r10k container should be able to find and execute r10k_code_entrypoint.sh.
Steps to Reproduce
In value file: global.runAsNonRoot: true puppet.masters.ingress: true (with host + tls config) puppetserver.puppeturl: "git@gitlab.com:privateProject1//test/private.git" r10k.code.viaSsh.existingSecret: "r10k-ssh" -> this secret does exists in the namespace and contain correct infos
Environment
Additional Context
Add any other context about the problem here. logs.txt