You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by GitBox <gi...@apache.org> on 2021/04/09 15:40:15 UTC

[GitHub] [solr-operator] HoustonPutman commented on a change in pull request #253: Allow users to supply ACL credentials for provided ZK ensembles to configure Solr to set ACLs on znodes

HoustonPutman commented on a change in pull request #253:
URL: https://github.com/apache/solr-operator/pull/253#discussion_r610719245



##########
File path: api/v1beta1/solrcloud_types.go
##########
@@ -556,6 +556,17 @@ func (ref *ZookeeperRef) withDefaults() (changed bool) {
 	return changed
 }
 
+func (ref *ZookeeperRef) GetACLs() (allACL *ZookeeperACL, readOnlyACL *ZookeeperACL) {
+	if ref.ConnectionInfo != nil {
+		allACL = ref.ConnectionInfo.AllACL
+		readOnlyACL = ref.ConnectionInfo.ReadOnlyACL
+	} else if ref.ProvidedZookeeper != nil {
+		allACL = ref.ProvidedZookeeper.AllACL
+		readOnlyACL = ref.ProvidedZookeeper.ReadOnlyACL
+	}
+	return

Review comment:
       very cool, did not know about this syntax

##########
File path: controllers/util/prometheus_exporter_util.go
##########
@@ -103,7 +103,7 @@ func GenerateSolrPrometheusExporterDeployment(solrPrometheusExporter *solr.SolrP
 		exporterArgs = append(exporterArgs, "-z", solrConnectionInfo.CloudZkConnnectionInfo.ZkConnectionString())
 
 		// Add ACL information, if given, through Env Vars
-		if hasACLs, aclEnvs := AddACLsToEnv(solrConnectionInfo.CloudZkConnnectionInfo); hasACLs {
+		if hasACLs, aclEnvs := AddACLsToEnv(solrConnectionInfo.CloudZkConnnectionInfo.AllACL, solrConnectionInfo.CloudZkConnnectionInfo.ReadOnlyACL); hasACLs {

Review comment:
       Do we want to get this out of the SolrCloud object if they do a SolrCloudReference by name in the **same** namespace? Not sure we do, and could be a fix for the future if so.

##########
File path: controllers/util/zk_util.go
##########
@@ -85,6 +85,10 @@ func GenerateZookeeperCluster(solrCloud *solr.SolrCloud, zkSpec *solr.ZookeeperS
 		zkCluster.Spec.Pod.NodeSelector = zkSpec.ZookeeperPod.NodeSelector
 	}
 
+	if zkSpec.ZookeeperPod.Env != nil {
+		zkCluster.Spec.Pod.Env = zkSpec.ZookeeperPod.Env

Review comment:
       Think you need to add this field to `CopyZookeeperClusterFields`




-- 
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.

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



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