zalando / zalando/postgres-operator

Load Balancer for PG Master missing Selectors

Open
#340 20 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

discussion
Dominant language
Go
Stars
5.2k
Forks
1.1k
Avg merge
2d 16h
Merged PRs (30d)
3

Description

Problem

When deploying a new cluster using the operator, I dee that the cluster comes up and spilo roles are assigned to them master and replica node(s).

I also see the load balancer for the replica nodes come up.

However, the load balancer for the master node gets created but never gets a external IP. Looking at the ressource created, I see that the LB is missing a "selector" in it's spec. Editing the ressource online and adding the selector for the master spilo-role "fixes" the load balancer.

I've looked at the code in k8res.go and indeed the selectors are only added for the replica load balancer there.

Am I missing something?

Versions Used

I'm testing the operator on GKE running 4 nodes and kubernetes 1.10. I'm using the current master of the postgres-operator.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in pkg/cluster/k8sres.go around the selector construction referenced near line 957, comparing the replica load balancer with the master load balancer. Confirm that the master service receives the selector for the master Spilo role, then verify that the resulting load balancer obtains an external IP on Kubernetes/GKE.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes, postgresql
Domain
databases, infrastructure
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.