|
30 | 30 | command: [ "sh", "-c" ] |
31 | 31 | args: |
32 | 32 | - mkdir -p /etc/puppetlabs/code/environments; |
| 33 | + mkdir -p /etc/puppetlabs/puppet/keys; |
| 34 | + mkdir -p /etc/puppetlabs/puppet/manifests; |
33 | 35 | chown -R puppet:puppet /etc/puppetlabs; |
| 36 | + {{- if .Values.hiera.config }} |
| 37 | + cp /etc/puppetlabs/puppet/configmap/hiera.yaml /etc/puppetlabs/puppet/hiera.yaml; |
| 38 | + chown puppet:puppet /etc/puppetlabs/puppet/hiera.yaml; |
| 39 | + {{- end }} |
| 40 | + cp /etc/puppetlabs/puppet/configmap/site.pp /etc/puppetlabs/puppet/manifests/site.pp; |
| 41 | + chown puppet:puppet /etc/puppetlabs/puppet/manifests/site.pp; |
| 42 | + {{- if .Values.hiera.eyaml.private_key }} |
| 43 | + cp /etc/puppetlabs/puppet/configmap/private_key.pkcs7.pem /etc/puppetlabs/puppet/keys/private_key.pkcs7.pem; |
| 44 | + chown puppet:puppet /etc/puppetlabs/puppet/keys/private_key.pkcs7.pem; |
| 45 | + {{- end }} |
| 46 | + {{- if .Values.hiera.eyaml.public_key }} |
| 47 | + cp /etc/puppetlabs/puppet/configmap/public_key.pkcs7.pem /etc/puppetlabs/puppet/keys/public_key.pkcs7.pem; |
| 48 | + chown puppet:puppet /etc/puppetlabs/puppet/keys/public_key.pkcs7.pem; |
| 49 | + {{- end }} |
34 | 50 | chmod -R 0777 /tmp; |
35 | 51 | securityContext: |
36 | 52 | runAsUser: 0 |
|
39 | 55 | volumeMounts: |
40 | 56 | - name: puppet-code-storage |
41 | 57 | mountPath: /etc/puppetlabs/code/ |
| 58 | + - name: puppet-puppet-storage |
| 59 | + mountPath: /etc/puppetlabs/puppet/ |
| 60 | + {{- if .Values.hiera.config }} |
| 61 | + - name: hiera-volume |
| 62 | + mountPath: /etc/puppetlabs/puppet/configmap/hiera.yaml |
| 63 | + subPath: hiera.yaml |
| 64 | + {{- end }} |
| 65 | + - name: manifests-volume |
| 66 | + mountPath: /etc/puppetlabs/puppet/configmap/site.pp |
| 67 | + subPath: site.pp |
| 68 | + {{- if .Values.hiera.eyaml.public_key }} |
| 69 | + - name: eyamlpub-volume |
| 70 | + mountPath: /etc/puppetlabs/puppet/configmap/public_key.pkcs7.pem |
| 71 | + subPath: public_key.pkcs7.pem |
| 72 | + {{- end }} |
| 73 | + {{- if .Values.hiera.eyaml.private_key }} |
| 74 | + - name: eyamlpriv-volume |
| 75 | + mountPath: /etc/puppetlabs/puppet/configmap/private_key.pkcs7.pem |
| 76 | + subPath: private_key.pkcs7.pem |
| 77 | + {{- end }} |
42 | 78 | - name: puppet-hiera-storage |
43 | 79 | mountPath: /tmp/ |
44 | 80 | containers: |
@@ -69,24 +105,6 @@ spec: |
69 | 105 | mountPath: /opt/puppetlabs/server/data/puppetserver/ |
70 | 106 | - name: puppet-hiera-storage |
71 | 107 | mountPath: /hiera |
72 | | - {{- if .Values.hiera.config }} |
73 | | - - name: hiera-volume |
74 | | - mountPath: /etc/puppetlabs/puppet/hiera.yaml |
75 | | - subPath: hiera.yaml |
76 | | - {{- end }} |
77 | | - - name: manifests-volume |
78 | | - mountPath: /etc/puppetlabs/puppet/manifests/site.pp |
79 | | - subPath: site.pp |
80 | | - {{- if .Values.hiera.eyaml.public_key }} |
81 | | - - name: eyamlpub-volume |
82 | | - mountPath: /etc/puppetlabs/puppet/keys/public_key.pkcs7.pem |
83 | | - subPath: public_key.pkcs7.pem |
84 | | - {{- end }} |
85 | | - {{- if .Values.hiera.eyaml.private_key }} |
86 | | - - name: eyamlpriv-volume |
87 | | - mountPath: /etc/puppetlabs/puppet/keys/private_key.pkcs7.pem |
88 | | - subPath: private_key.pkcs7.pem |
89 | | - {{- end }} |
90 | 108 | {{- if .Values.hiera.hieradataurl }} |
91 | 109 | - name: git-sync-hiera |
92 | 110 | image: "{{.Values.git_sync.image}}:{{.Values.git_sync.tag}}" |
|
0 commit comments