Skip to content

Commit

Permalink
Merge pull request #203 from aojea/bugselector
Browse files Browse the repository at this point in the history
expose the index 0 pod for minimal service
  • Loading branch information
vsoch authored Aug 28, 2023
2 parents ce1f440 + 9100899 commit e924c04
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions controllers/flux/minicluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,10 @@ func (r *MiniClusterReconciler) ensureMiniCluster(
// Create headless service for the MiniCluster OR single service for the broker
selector := map[string]string{"job-name": cluster.Name}

// If we are adding a minimal service to the index 0 pod only
// If we are adding a minimal service expose the index 0 pod only
// LabelSelectors are ANDed
if cluster.Spec.Flux.MinimalService {
selector = map[string]string{"job-index": "0"}
selector["job-index"] = "0"
}

result, err = r.exposeServices(ctx, cluster, cluster.Spec.Network.HeadlessName, selector)
Expand Down

0 comments on commit e924c04

Please sign in to comment.