Skip to content

Commit

Permalink
PWX-32177: Removes unnecessary permissions from diag collector pods
Browse files Browse the repository at this point in the history
  • Loading branch information
Pure-AdamuKaapan committed Jul 20, 2023
1 parent c07d550 commit 03ec822
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions pkg/controller/portworxdiag/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ func volumeMounts() []v1.VolumeMount {
}

func makeDiagPodTemplate(cluster *corev1.StorageCluster, diag *portworxv1.PortworxDiag, ns string, nodeName string, nodeID string) (*v1.PodTemplateSpec, error) {
svcLinks := true
terminationGP := int64(10)
privileged := true

Expand Down Expand Up @@ -79,11 +78,8 @@ func makeDiagPodTemplate(cluster *corev1.StorageCluster, diag *portworxv1.Portwo
},
Spec: v1.PodSpec{
NodeName: nodeName,
HostPID: true, // We *do* need this
HostNetwork: true, // Do we need this?: https://portworx.atlassian.net/browse/PWX-32177
RestartPolicy: v1.RestartPolicyOnFailure, //
DNSPolicy: v1.DNSClusterFirst, // Do we need this? https://portworx.atlassian.net/browse/PWX-32177
EnableServiceLinks: &svcLinks, // Do we need this? https://portworx.atlassian.net/browse/PWX-32177
HostPID: true,
RestartPolicy: v1.RestartPolicyOnFailure,

Check warning on line 82 in pkg/controller/portworxdiag/pod.go

View check run for this annotation

Codecov / codecov/patch

pkg/controller/portworxdiag/pod.go#L81-L82

Added lines #L81 - L82 were not covered by tests
ServiceAccountName: pxutil.PortworxServiceAccountName(cluster),
TerminationGracePeriodSeconds: &terminationGP,
Volumes: volumes(),
Expand Down

0 comments on commit 03ec822

Please sign in to comment.