Skip to content

Commit

Permalink
Replace chmod with find in initContainer (#805)
Browse files Browse the repository at this point in the history
* Replace last chmod with find in initContainer

* Set maxdepth=1

* Move -maxdepth as the first command-line flag.
  • Loading branch information
robertodauria authored May 24, 2023
1 parent 4778526 commit a8f8bde
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion k8s/daemonsets/templates.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@ local setDataDirOwnership(name) = {
command: [
'/bin/sh',
'-c',
'cd ' + dataDir + ' && chown -R 65534:65534 . && chmod 2775 . && chmod 2775 *',
'cd ' + dataDir + ' && chown -R 65534:65534 . && ' +
'find . -maxdepth 1 -type d -exec chmod 2775 {} +',
],
securityContext: {
runAsUser: 0,
Expand Down

0 comments on commit a8f8bde

Please sign in to comment.