Implement replicaLoadBalancer boolean flag. (#38)

The flag adds a replica service with the name cluster_name-repl and
a DNS name that defaults to {cluster}-repl.{team}.{hostedzone}.

The implementation converted Service field of the cluster into a map
with one or two elements and deals with the cases when the new flag
is changed on a running cluster
(the update and the sync should create or delete the replica service).
In order to pick up master and replica service and master endpoint
when listing cluster resources.

* Update the spec when updating the cluster.
This commit is contained in:
Oleksii Kliukin
2017-06-07 13:54:17 +02:00
committed by GitHub
parent 7b0ca31bfb
commit dc36c4ca12
26 changed files with 329 additions and 166 deletions
+1
View File
@@ -1,5 +1,6 @@
package constants
// Names and values in Kubernetes annotation for services, statefulsets and volumes
const (
ZalandoDNSNameAnnotation = "external-dns.alpha.kubernetes.io/hostname"
ElbTimeoutAnnotationName = "service.beta.kubernetes.io/aws-load-balancer-connection-idle-timeout"
+4 -1
View File
@@ -2,8 +2,11 @@ package constants
import "time"
// AWS specific constants used by other modules
const (
AWS_REGION = "eu-central-1"
// default region for AWS. TODO: move it to the operator configuration
AWS_REGION = "eu-central-1"
// EBS related constants
EBSVolumeIDStart = "/vol-"
EBSProvisioner = "kubernetes.io/aws-ebs"
//https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_VolumeModification.html
+1
View File
@@ -2,6 +2,7 @@ package constants
import "time"
// General kubernetes-related constants
const (
ListClustersURITemplate = "/apis/" + TPRVendor + "/" + TPRApiVersion + "/namespaces/%s/" + ResourceName // Namespace
WatchClustersURITemplate = "/apis/" + TPRVendor + "/" + TPRApiVersion + "/watch/namespaces/%s/" + ResourceName // Namespace
+1
View File
@@ -1,5 +1,6 @@
package constants
// Different properties of the PostgreSQL Third Party Resources
const (
TPRName = "postgresql"
TPRVendor = "acid.zalan.do"
+1
View File
@@ -1,5 +1,6 @@
package constants
// Measurement-unit definitions
const (
Gigabyte = 1073741824
)