Skip to content

Commit

Permalink
Merge pull request #737 from parth-gr/csi-fix-logrotate-downstream1
Browse files Browse the repository at this point in the history
Bug 2315733: csi: add sc privileged to logrotate sidecar container
  • Loading branch information
travisn authored Oct 1, 2024
2 parents d49443c + 7721db4 commit 36d6ce5
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ spec:
# This is necessary for the Bidirectional mount propagation
securityContext:
privileged: true
capabilities:
drop: ["ALL"]
image: {{ .CSIPluginImage }}
command:
- "/bin/sh"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,8 @@ spec:
{{ if and .Privileged .CSILogRotation }}
securityContext:
privileged: true
capabilities:
drop: ["ALL"]
{{ end }}
volumeMounts:
- name: socket-dir
Expand Down
6 changes: 6 additions & 0 deletions pkg/operator/ceph/csi/template/csi-logrotate-sidecar.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ command:
image: {{ .CSIPluginImage }}
imagePullPolicy: IfNotPresent
name: log-collector
{{ if .Privileged }}
securityContext:
privileged: true
capabilities:
drop: ["ALL"]
{{ end }}
volumeMounts:
- mountPath: {{ .CsiLogRootPath }}/logrotate-config/{{ .CsiComponentName }}
name: csi-logs-logrotate
Expand Down
2 changes: 2 additions & 0 deletions pkg/operator/ceph/csi/template/nfs/csi-nfsplugin-holder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ spec:
# This is necessary for the Bidirectional mount propagation
securityContext:
privileged: true
capabilities:
drop: ["ALL"]
image: {{ .CSIPluginImage }}
command:
- "/bin/sh"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@ spec:
{{ if and .Privileged .CSILogRotation }}
securityContext:
privileged: true
capabilities:
drop: ["ALL"]
{{ end }}
volumeMounts:
- name: socket-dir
Expand Down
2 changes: 2 additions & 0 deletions pkg/operator/ceph/csi/template/rbd/csi-rbdplugin-holder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ spec:
# This is necessary for the Bidirectional mount propagation
securityContext:
privileged: true
capabilities:
drop: ["ALL"]
image: {{ .CSIPluginImage }}
command:
- "/bin/sh"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,8 @@ spec:
{{ if and .Privileged .CSILogRotation }}
securityContext:
privileged: true
capabilities:
drop: ["ALL"]
{{ end }}
volumeMounts:
- name: socket-dir
Expand Down Expand Up @@ -263,6 +265,8 @@ spec:
{{ if and .Privileged .CSILogRotation }}
securityContext:
privileged: true
capabilities:
drop: ["ALL"]
{{ end }}
volumeMounts:
- name: socket-dir
Expand Down

0 comments on commit 36d6ce5

Please sign in to comment.