HoustonPutman commented on code in PR #520:
URL: https://github.com/apache/solr-operator/pull/520#discussion_r1084366285


##########
controllers/util/solr_util.go:
##########
@@ -594,6 +594,21 @@ func generateSolrSetupInitContainers(solrCloud 
*solr.SolrCloud, solrCloudStatus
        }
        setupCommands := []string{"cp /tmp/solr.xml /tmp-config/solr.xml"}
 
+       // Figure out the solrUser and solrGroup to use
+       solrUser := DefaultSolrUser
+       solrGroup := DefaultSolrGroup
+       solrPodSecurityContext := 
solrCloud.Spec.CustomSolrKubeOptions.PodOptions.PodSecurityContext
+
+       if solrPodSecurityContext.RunAsUser != nil {
+               solrUser = int(*solrPodSecurityContext.RunAsUser)
+
+               if solrPodSecurityContext.RunAsGroup != nil {

Review Comment:
   The user might specify a `runAsGroup` without a `runAsUser`, so we probably 
want to keep these two checks separate right? Or am I thinking about this 
incorrectly?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to