-
Notifications
You must be signed in to change notification settings - Fork 217
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add pod to initialize ditto logs directory on host vm;
extend securityContext with user and group; Signed-off-by: Stefan Maute <stefan.maute@bosch.io>
- Loading branch information
Stefan Maute
committed
Jun 2, 2021
1 parent
8270f5a
commit 816cab0
Showing
3 changed files
with
41 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
deployment/kubernetes/deploymentFiles/ditto/ditto-log-files.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
|
||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: ditto-logs-initiator | ||
labels: | ||
name: ditto-logs-initiator | ||
spec: | ||
volumes: | ||
- name: ditto-logs-directory | ||
hostPath: | ||
path: /var/log/ditto | ||
type: DirectoryOrCreate | ||
restartPolicy: OnFailure | ||
containers: | ||
- name: change-volume-owner | ||
image: busybox | ||
command: [ "sh", "-c", "chown -R 1000:1000 /var/log/ditto && echo 'changed ownership of /var/log/ditto to 1000:1000'" ] | ||
volumeMounts: | ||
- name: ditto-logs-directory | ||
mountPath: /var/log/ditto |