Make use of kubernetes client-go v4

* client-go v4.0.0-beta0
* remove unnecessary methods for tpr object
* rest client: use interface instead of structure pointer
* proper names for constants; some clean up for log messages
* remove teams api client from controller and make it per cluster
This commit is contained in:
Murat Kabilov
2017-07-25 15:25:17 +02:00
committed by GitHub
parent 4455f1b639
commit 1f8b37f33d
31 changed files with 579 additions and 666 deletions
+4 -4
View File
@@ -95,7 +95,7 @@ func (c *Cluster) syncService(role PostgresRole) error {
if err != nil {
return fmt.Errorf("could not create missing %s service: %v", role, err)
}
c.logger.Infof("Created missing %s service '%s'", role, util.NameFromMeta(svc.ObjectMeta))
c.logger.Infof("Created missing %s service %q", role, util.NameFromMeta(svc.ObjectMeta))
return nil
}
@@ -110,7 +110,7 @@ func (c *Cluster) syncService(role PostgresRole) error {
if err := c.updateService(role, desiredSvc); err != nil {
return fmt.Errorf("could not update %s service to match desired state: %v", role, err)
}
c.logger.Infof("%s service '%s' is in the desired state now", role, util.NameFromMeta(desiredSvc.ObjectMeta))
c.logger.Infof("%s service %q is in the desired state now", role, util.NameFromMeta(desiredSvc.ObjectMeta))
return nil
}
@@ -122,7 +122,7 @@ func (c *Cluster) syncEndpoint() error {
if err != nil {
return fmt.Errorf("could not create missing endpoint: %v", err)
}
c.logger.Infof("Created missing endpoint '%s'", util.NameFromMeta(ep.ObjectMeta))
c.logger.Infof("Created missing endpoint %q", util.NameFromMeta(ep.ObjectMeta))
return nil
}
@@ -151,7 +151,7 @@ func (c *Cluster) syncStatefulSet() error {
if err != nil {
return fmt.Errorf("cluster is not ready: %v", err)
}
c.logger.Infof("Created missing statefulset '%s'", util.NameFromMeta(ss.ObjectMeta))
c.logger.Infof("Created missing statefulset %q", util.NameFromMeta(ss.ObjectMeta))
if !rollUpdate {
return nil
}