-
- Downloads
Configure load balancer on a per-cluster and operator-wide level (#57)
* Deny all requests to the load balancer by default. * Operator-wide toggle for the load-balancer. * Define per-cluster useLoadBalancer option. If useLoadBalancer is not set - then operator-wide defaults take place. If it is true - the load balancer is created, otherwise a service type clusterIP is created. Internally, we have to completely replace the service if the service type changes. We cannot patch, since some fields from the old service that will remain after patch are incompatible with the new one, and handling them explicitly when updating the service is ugly and error-prone. We cannot update the service because of the immutable fields, that leaves us the only option of deleting the old service and creating the new one. Unfortunately, there is still an issue of unnecessary removal of endpoints associated with the service, it will be addressed in future commits. * Revert the unintended effect of go fmt * Recreate endpoints on service update. When the service type is changed, the service is deleted and then the one with the new type is created. Unfortnately, endpoints are deleted as well. Re-create them afterwards, preserving the original addresses stored in them. * Improve error messages and comments. Use generate instead of gen in names.
Showing
- manifests/configmap.yaml 1 addition, 0 deletionsmanifests/configmap.yaml
- manifests/testpostgresql.yaml 1 addition, 0 deletionsmanifests/testpostgresql.yaml
- pkg/cluster/cluster.go 7 additions, 3 deletionspkg/cluster/cluster.go
- pkg/cluster/k8sres.go 52 additions, 26 deletionspkg/cluster/k8sres.go
- pkg/cluster/resources.go 43 additions, 5 deletionspkg/cluster/resources.go
- pkg/cluster/sync.go 2 additions, 2 deletionspkg/cluster/sync.go
- pkg/cluster/util.go 2 additions, 2 deletionspkg/cluster/util.go
- pkg/spec/postgresql.go 4 additions, 2 deletionspkg/spec/postgresql.go
- pkg/spec/types.go 1 addition, 0 deletionspkg/spec/types.go
- pkg/util/config/config.go 1 addition, 0 deletionspkg/util/config/config.go
- pkg/util/constants/annotations.go 6 additions, 6 deletionspkg/util/constants/annotations.go
Loading
Please register or sign in to comment