mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-09-30 11:27:17 +02:00
Add a missing file.
This commit is contained in:
committed by
Murat Kabilov
parent
e5e0e3a148
commit
b3a9516bae
@@ -23,9 +23,9 @@ type SpiloOperator struct {
|
||||
}
|
||||
|
||||
|
||||
func getEtcdServiceName(cls *kubernetes.Clientset, config *rest.Config, is_in_cluster bool) (etcdServiceName string) {
|
||||
func getEtcdServiceName(cls *kubernetes.Clientset, config *rest.Config, isInCluster bool) (etcdServiceName string) {
|
||||
etcdService, _ := cls.Services("default").Get("etcd-client")
|
||||
if is_in_cluster {
|
||||
if isInCluster {
|
||||
if len(etcdService.Spec.Ports) != 1 {
|
||||
log.Fatal("Can't find Etcd service named 'etcd-client'")
|
||||
}
|
||||
@@ -42,7 +42,7 @@ func getEtcdServiceName(cls *kubernetes.Clientset, config *rest.Config, is_in_cl
|
||||
}
|
||||
|
||||
func New(options Options) *SpiloOperator {
|
||||
config, is_in_cluster := KubernetesConfig(options)
|
||||
config, isInCluster := KubernetesConfig(options)
|
||||
|
||||
spiloClient, err := newKubernetesSpiloClient(config)
|
||||
if err != nil {
|
||||
@@ -54,7 +54,7 @@ func New(options Options) *SpiloOperator {
|
||||
log.Fatalf("Couldn't create Kubernetes client: %s", err)
|
||||
}
|
||||
|
||||
etcdClient := etcd.NewEctdClient(getEtcdServiceName(clientSet, config, is_in_cluster))
|
||||
etcdClient := etcd.NewEctdClient(getEtcdServiceName(clientSet, config, isInCluster))
|
||||
|
||||
operator := &SpiloOperator{
|
||||
Options: options,
|
||||
|
||||
Reference in New Issue
Block a user