Skip to content

Commit

Permalink
Make the created statefulset have the new reconciled solr cloud status (
Browse files Browse the repository at this point in the history
#47)

Signed-off-by: Tim Terlegård <[email protected]>
  • Loading branch information
timterle authored and HoustonPutman committed Dec 4, 2019
1 parent 3f56e1c commit 59a2324
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion controllers/solrcloud_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ func (r *SolrCloudReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error) {

if !blockReconciliationOfStatefulSet {
// Generate StatefulSet
statefulSet := util.GenerateStatefulSet(instance, IngressBaseUrl, hostNameIpMap)
statefulSet := util.GenerateStatefulSet(instance, &newStatus, IngressBaseUrl, hostNameIpMap)
if err := controllerutil.SetControllerReference(instance, statefulSet, r.scheme); err != nil {
return reconcile.Result{}, err
}
Expand Down
4 changes: 2 additions & 2 deletions controllers/util/solr_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const (
// replicas: the number of replicas for the SolrCloud instance
// storage: the size of the storage for the SolrCloud instance (e.g. 100Gi)
// zkConnectionString: the connectionString of the ZK instance to connect to
func GenerateStatefulSet(solrCloud *solr.SolrCloud, ingressBaseDomain string, hostNameIPs map[string]string) *appsv1.StatefulSet {
func GenerateStatefulSet(solrCloud *solr.SolrCloud, solrCloudStatus *solr.SolrCloudStatus, ingressBaseDomain string, hostNameIPs map[string]string) *appsv1.StatefulSet {
gracePeriodTerm := int64(10)
fsGroup := int64(SolrClientPort)
defaultMode := int32(420)
Expand Down Expand Up @@ -217,7 +217,7 @@ func GenerateStatefulSet(solrCloud *solr.SolrCloud, ingressBaseDomain string, ho
},
{
Name: "ZK_HOST",
Value: solrCloud.ZkConnectionString(),
Value: solrCloudStatus.ZkConnectionString(),
},
{
Name: "SOLR_LOG_LEVEL",
Expand Down

0 comments on commit 59a2324

Please sign in to comment.