Repository: redhat-developer/service-binding-operator
Pull request #137 (2019-08-21 09:47:28)

Move PostgreSQL Operator to samples repo
This PR:
* Reflects moving the PostgreSQL Operator to https://github.com/operator-backing-service-samples/postgresql-operator repo.

openshift-ci-robot: [APPROVALNOTIFIER] This PR is **NOT APPROVED**

This pull-request has been approved by:
To complete the [pull request process](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process), please assign **akashshinde**
You can assign the PR to them by writing `/assign @akashshinde` in a comment when ready.

The full list of commands accepted by this bot can be found [here](https://go.k8s.io/bot-commands?repo=redhat-developer%2Fservice-binding-operator).

<details open>
Needs approval from an approver in each of these files:

- **[OWNERS](https://github.com/redhat-developer/service-binding-operator/blob/master/OWNERS)**

Approvers can indicate their approval by writing `/approve` in a comment
Approvers can cancel approval by writing `/approve cancel` in a comment
</details>
<!-- META={"approvers":["akashshinde"]} -->
DhritiShikhar: /lgtm
DhritiShikhar: /approve
openshift-ci-robot: [APPROVALNOTIFIER] This PR is **APPROVED**

This pull-request has been approved by: *<a href="https://github.com/redhat-developer/service-binding-operator/pull/137#issuecomment-523397676" title="Approved">DhritiShikhar</a>*

The full list of commands accepted by this bot can be found [here](https://go.k8s.io/bot-commands?repo=redhat-developer%2Fservice-binding-operator).

The pull request process is described [here](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process)

<details >
Needs approval from an approver in each of these files:

- ~~[OWNERS](https://github.com/redhat-developer/service-binding-operator/blob/master/OWNERS)~~ [DhritiShikhar]

Approvers can indicate their approval by writing `/approve` in a comment
Approvers can cancel approval by writing `/approve cancel` in a comment
</details>
<!-- META={"approvers":[]} -->

Patch:
diff --git a/examples/bind_imported_app_to_incluster_operator_managed_PostgreSQL_db/README.md b/examples/bind_imported_app_to_incluster_operator_managed_PostgreSQL_db/README.md
index 3b216106..f7283cda 100644
--- a/examples/bind_imported_app_to_incluster_operator_managed_PostgreSQL_db/README.md
+++ b/examples/bind_imported_app_to_incluster_operator_managed_PostgreSQL_db/README.md
@@ -21,7 +21,7 @@ The cluster admin needs to install 2 operators into the cluster:
 A Backing Service Operator that is "bind-able," in other
 words a Backing Service Operator that exposes binding information in secrets, config maps, status, and/or spec
 attributes. The Backing Service Operator may represent a database or other services required by
-applications. We'll use [postgresql-operator](https://github.com/baijum/postgresql-operator) to
+applications. We'll use [postgresql-operator](https://github.com/operator-backing-service-samples/postgresql-operator) to
 demonstrate a sample use case.
 
 ### Install the Service Binding Operator using an `OperatorSource`
diff --git a/go.mod b/go.mod
index 1aa92741..f04b92fb 100644
--- a/go.mod
+++ b/go.mod
@@ -1,7 +1,6 @@
 module github.com/redhat-developer/service-binding-operator
 
 require (
-	github.com/baijum/postgresql-operator v0.0.0-20190701114131-f72b43994f54
 	github.com/coreos/go-semver v0.3.0 // indirect
 	github.com/emicklei/go-restful v2.9.6+incompatible // indirect
 	github.com/evanphx/json-patch v4.5.0+incompatible // indirect
@@ -14,6 +13,7 @@ require (
 	github.com/onsi/ginkgo v1.8.0 // indirect
 	github.com/onsi/gomega v1.5.0 // indirect
 	github.com/openshift/api v3.9.0+incompatible
+	github.com/operator-backing-service-samples/postgresql-operator v0.0.0-20190821075443-840d192264ec
 	github.com/operator-framework/operator-lifecycle-manager v3.11.0+incompatible
 	github.com/operator-framework/operator-sdk v0.10.0
 	github.com/prometheus/client_golang v1.0.0 // indirect
diff --git a/go.sum b/go.sum
index 969e61d6..4068deb7 100644
--- a/go.sum
+++ b/go.sum
@@ -41,8 +41,6 @@ github.com/appscode/jsonpatch v0.0.0-20190108182946-7c0e3b262f30 h1:Kn3rqvbUFqSe
 github.com/appscode/jsonpatch v0.0.0-20190108182946-7c0e3b262f30/go.mod h1:4AJxUpXUhv4N+ziTvIcWWXgeorXpxPZOfk9HdEVr96M=
 github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8=
 github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY=
-github.com/baijum/postgresql-operator v0.0.0-20190701114131-f72b43994f54 h1:uy8YL0ktzO+vlh+MADX90NzUBGWioQjehcRRA4czZ9s=
-github.com/baijum/postgresql-operator v0.0.0-20190701114131-f72b43994f54/go.mod h1:lxAyEZLeOyGTn2hDaXfK0lNK7F8QLl2l8ojWbaHRSj0=
 github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973 h1:xJ4a3vCFaGF/jqvzLMYoU8P317H5OQ+Via4RmuPwCS0=
 github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
 github.com/beorn7/perks v1.0.0 h1:HWo1m869IqiPhD389kmkxeTalrjNbbJTC8LXupb+sl0=
@@ -305,6 +303,8 @@ github.com/openshift/origin v0.0.0-20160503220234-8f127d736703/go.mod h1:0Rox5r9
 github.com/openzipkin/zipkin-go v0.1.1/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8=
 github.com/openzipkin/zipkin-go v0.1.3/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8=
 github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw=
+github.com/operator-backing-service-samples/postgresql-operator v0.0.0-20190821075443-840d192264ec h1:6JB0Y4/7pXUObJ/XKUSpyYTG7HjBndUaQiwoNalp2Ho=
+github.com/operator-backing-service-samples/postgresql-operator v0.0.0-20190821075443-840d192264ec/go.mod h1:ZiQVVOlOL7XB3sUN7M7cHUEP2Pv5hKxIzbv2S9guUjc=
 github.com/operator-framework/operator-lifecycle-manager v0.0.0-20181023032605-e838f7fb2186/go.mod h1:Ma5ZXd4S1vmMyewWlF7aO8CZiokR7Sd8dhSfkGkNU4U=
 github.com/operator-framework/operator-lifecycle-manager v0.0.0-20190105193533-81104ffdc4fb/go.mod h1:XMyE4n2opUK4N6L45YGQkXXi8F9fD7XDYFv/CsS6V5I=
 github.com/operator-framework/operator-lifecycle-manager v0.0.0-20190128024246-5eb7ae5bdb7a/go.mod h1:vq6TTFvg6ti1Bn6ACsZneZTmjTsURgDD6tQtVDbEgsU=
diff --git a/vendor/github.com/baijum/postgresql-operator/LICENSE b/vendor/github.com/operator-backing-service-samples/postgresql-operator/LICENSE
similarity index 100%
rename from vendor/github.com/baijum/postgresql-operator/LICENSE
rename to vendor/github.com/operator-backing-service-samples/postgresql-operator/LICENSE
diff --git a/vendor/github.com/baijum/postgresql-operator/pkg/apis/addtoscheme_postgresql_v1alpha1.go b/vendor/github.com/operator-backing-service-samples/postgresql-operator/pkg/apis/addtoscheme_postgresql_v1alpha1.go
similarity index 69%
rename from vendor/github.com/baijum/postgresql-operator/pkg/apis/addtoscheme_postgresql_v1alpha1.go
rename to vendor/github.com/operator-backing-service-samples/postgresql-operator/pkg/apis/addtoscheme_postgresql_v1alpha1.go
index 536cfc4f..5e6cbb0f 100644
--- a/vendor/github.com/baijum/postgresql-operator/pkg/apis/addtoscheme_postgresql_v1alpha1.go
+++ b/vendor/github.com/operator-backing-service-samples/postgresql-operator/pkg/apis/addtoscheme_postgresql_v1alpha1.go
@@ -1,7 +1,7 @@
 package apis
 
 import (
-	"github.com/baijum/postgresql-operator/pkg/apis/postgresql/v1alpha1"
+	"github.com/operator-backing-service-samples/postgresql-operator/pkg/apis/postgresql/v1alpha1"
 )
 
 func init() {
diff --git a/vendor/github.com/baijum/postgresql-operator/pkg/apis/apis.go b/vendor/github.com/operator-backing-service-samples/postgresql-operator/pkg/apis/apis.go
similarity index 100%
rename from vendor/github.com/baijum/postgresql-operator/pkg/apis/apis.go
rename to vendor/github.com/operator-backing-service-samples/postgresql-operator/pkg/apis/apis.go
diff --git a/vendor/github.com/baijum/postgresql-operator/pkg/apis/postgresql/v1alpha1/database_types.go b/vendor/github.com/operator-backing-service-samples/postgresql-operator/pkg/apis/postgresql/v1alpha1/database_types.go
similarity index 95%
rename from vendor/github.com/baijum/postgresql-operator/pkg/apis/postgresql/v1alpha1/database_types.go
rename to vendor/github.com/operator-backing-service-samples/postgresql-operator/pkg/apis/postgresql/v1alpha1/database_types.go
index ea4bc584..9a9c2911 100644
--- a/vendor/github.com/baijum/postgresql-operator/pkg/apis/postgresql/v1alpha1/database_types.go
+++ b/vendor/github.com/operator-backing-service-samples/postgresql-operator/pkg/apis/postgresql/v1alpha1/database_types.go
@@ -28,8 +28,9 @@ type DatabaseStatus struct {
 	// Add custom validation using kubebuilder tags: https://book.kubebuilder.io/beyond_basics/generating_crd.html
 	DBCredentials    string `json:"dbCredentials"`
 	DBConnectionIP   string `json:"dbConnectionIP"`
-	DBConnectionPort int32  `json:"dbConnectionPort"`
+	DBConnectionPort int64  `json:"dbConnectionPort"`
 	DBName           string `json:"dbName"`
+	DBConfigMap      string `json:"dbConfigMap"`
 }
 
 // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
diff --git a/vendor/github.com/baijum/postgresql-operator/pkg/apis/postgresql/v1alpha1/doc.go b/vendor/github.com/operator-backing-service-samples/postgresql-operator/pkg/apis/postgresql/v1alpha1/doc.go
similarity index 100%
rename from vendor/github.com/baijum/postgresql-operator/pkg/apis/postgresql/v1alpha1/doc.go
rename to vendor/github.com/operator-backing-service-samples/postgresql-operator/pkg/apis/postgresql/v1alpha1/doc.go
diff --git a/vendor/github.com/baijum/postgresql-operator/pkg/apis/postgresql/v1alpha1/register.go b/vendor/github.com/operator-backing-service-samples/postgresql-operator/pkg/apis/postgresql/v1alpha1/register.go
similarity index 100%
rename from vendor/github.com/baijum/postgresql-operator/pkg/apis/postgresql/v1alpha1/register.go
rename to vendor/github.com/operator-backing-service-samples/postgresql-operator/pkg/apis/postgresql/v1alpha1/register.go
diff --git a/vendor/github.com/baijum/postgresql-operator/pkg/apis/postgresql/v1alpha1/zz_generated.deepcopy.go b/vendor/github.com/operator-backing-service-samples/postgresql-operator/pkg/apis/postgresql/v1alpha1/zz_generated.deepcopy.go
similarity index 100%
rename from vendor/github.com/baijum/postgresql-operator/pkg/apis/postgresql/v1alpha1/zz_generated.deepcopy.go
rename to vendor/github.com/operator-backing-service-samples/postgresql-operator/pkg/apis/postgresql/v1alpha1/zz_generated.deepcopy.go
diff --git a/vendor/github.com/baijum/postgresql-operator/pkg/apis/postgresql/v1alpha1/zz_generated.openapi.go b/vendor/github.com/operator-backing-service-samples/postgresql-operator/pkg/apis/postgresql/v1alpha1/zz_generated.openapi.go
similarity index 71%
rename from vendor/github.com/baijum/postgresql-operator/pkg/apis/postgresql/v1alpha1/zz_generated.openapi.go
rename to vendor/github.com/operator-backing-service-samples/postgresql-operator/pkg/apis/postgresql/v1alpha1/zz_generated.openapi.go
index 47d17d80..b1aefff9 100644
--- a/vendor/github.com/baijum/postgresql-operator/pkg/apis/postgresql/v1alpha1/zz_generated.openapi.go
+++ b/vendor/github.com/operator-backing-service-samples/postgresql-operator/pkg/apis/postgresql/v1alpha1/zz_generated.openapi.go
@@ -13,9 +13,9 @@ import (
 
 func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition {
 	return map[string]common.OpenAPIDefinition{
-		"github.com/baijum/postgresql-operator/pkg/apis/postgresql/v1alpha1.Database":       schema_pkg_apis_postgresql_v1alpha1_Database(ref),
-		"github.com/baijum/postgresql-operator/pkg/apis/postgresql/v1alpha1.DatabaseSpec":   schema_pkg_apis_postgresql_v1alpha1_DatabaseSpec(ref),
-		"github.com/baijum/postgresql-operator/pkg/apis/postgresql/v1alpha1.DatabaseStatus": schema_pkg_apis_postgresql_v1alpha1_DatabaseStatus(ref),
+		"github.com/operator-backing-service-samples/postgresql-operator/pkg/apis/postgresql/v1alpha1.Database":       schema_pkg_apis_postgresql_v1alpha1_Database(ref),
+		"github.com/operator-backing-service-samples/postgresql-operator/pkg/apis/postgresql/v1alpha1.DatabaseSpec":   schema_pkg_apis_postgresql_v1alpha1_DatabaseSpec(ref),
+		"github.com/operator-backing-service-samples/postgresql-operator/pkg/apis/postgresql/v1alpha1.DatabaseStatus": schema_pkg_apis_postgresql_v1alpha1_DatabaseStatus(ref),
 	}
 }
 
@@ -46,19 +46,19 @@ func schema_pkg_apis_postgresql_v1alpha1_Database(ref common.ReferenceCallback)
 					},
 					"spec": {
 						SchemaProps: spec.SchemaProps{
-							Ref: ref("github.com/baijum/postgresql-operator/pkg/apis/postgresql/v1alpha1.DatabaseSpec"),
+							Ref: ref("github.com/operator-backing-service-samples/postgresql-operator/pkg/apis/postgresql/v1alpha1.DatabaseSpec"),
 						},
 					},
 					"status": {
 						SchemaProps: spec.SchemaProps{
-							Ref: ref("github.com/baijum/postgresql-operator/pkg/apis/postgresql/v1alpha1.DatabaseStatus"),
+							Ref: ref("github.com/operator-backing-service-samples/postgresql-operator/pkg/apis/postgresql/v1alpha1.DatabaseStatus"),
 						},
 					},
 				},
 			},
 		},
 		Dependencies: []string{
-			"github.com/baijum/postgresql-operator/pkg/apis/postgresql/v1alpha1.DatabaseSpec", "github.com/baijum/postgresql-operator/pkg/apis/postgresql/v1alpha1.DatabaseStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"},
+			"github.com/operator-backing-service-samples/postgresql-operator/pkg/apis/postgresql/v1alpha1.DatabaseSpec", "github.com/operator-backing-service-samples/postgresql-operator/pkg/apis/postgresql/v1alpha1.DatabaseStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"},
 	}
 }
 
diff --git a/vendor/modules.txt b/vendor/modules.txt
index 9331df12..4555426f 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -17,9 +17,6 @@ github.com/PuerkitoBio/purell
 github.com/PuerkitoBio/urlesc
 # github.com/appscode/jsonpatch v0.0.0-20190108182946-7c0e3b262f30
 github.com/appscode/jsonpatch
-# github.com/baijum/postgresql-operator v0.0.0-20190701114131-f72b43994f54
-github.com/baijum/postgresql-operator/pkg/apis
-github.com/baijum/postgresql-operator/pkg/apis/postgresql/v1alpha1
 # github.com/beorn7/perks v1.0.0
 github.com/beorn7/perks/quantile
 # github.com/census-instrumentation/opencensus-proto v0.2.0
@@ -137,6 +134,9 @@ github.com/modern-go/concurrent
 github.com/modern-go/reflect2
 # github.com/openshift/api v3.9.0+incompatible
 github.com/openshift/api/apps/v1
+# github.com/operator-backing-service-samples/postgresql-operator v0.0.0-20190821075443-840d192264ec
+github.com/operator-backing-service-samples/postgresql-operator/pkg/apis
+github.com/operator-backing-service-samples/postgresql-operator/pkg/apis/postgresql/v1alpha1
 # github.com/operator-framework/operator-lifecycle-manager v3.11.0+incompatible
 github.com/operator-framework/operator-lifecycle-manager/pkg/api/apis/operators/v1alpha1
 github.com/operator-framework/operator-lifecycle-manager/pkg/controller/install
@@ -368,13 +368,13 @@ k8s.io/apimachinery/pkg/runtime
 k8s.io/apimachinery/pkg/apis/meta/v1
 k8s.io/apimachinery/pkg/runtime/schema
 k8s.io/apimachinery/pkg/api/errors
+k8s.io/apimachinery/pkg/api/meta
 k8s.io/apimachinery/pkg/apis/meta/v1/unstructured
 k8s.io/apimachinery/pkg/labels
 k8s.io/apimachinery/pkg/types
-k8s.io/apimachinery/pkg/util/wait
 k8s.io/apimachinery/pkg/runtime/serializer
 k8s.io/apimachinery/pkg/watch
-k8s.io/apimachinery/pkg/api/meta
+k8s.io/apimachinery/pkg/util/wait
 k8s.io/apimachinery/pkg/util/runtime
 k8s.io/apimachinery/pkg/api/resource
 k8s.io/apimachinery/pkg/runtime/serializer/streaming
@@ -389,6 +389,7 @@ k8s.io/apimachinery/pkg/util/naming
 k8s.io/apimachinery/pkg/fields
 k8s.io/apimachinery/pkg/selection
 k8s.io/apimachinery/pkg/util/validation/field
+k8s.io/apimachinery/pkg/apis/meta/v1beta1
 k8s.io/apimachinery/pkg/util/validation
 k8s.io/apimachinery/pkg/runtime/serializer/versioning
 k8s.io/apimachinery/pkg/version
@@ -397,7 +398,6 @@ k8s.io/apimachinery/pkg/runtime/serializer/recognizer
 k8s.io/apimachinery/pkg/util/cache
 k8s.io/apimachinery/pkg/util/clock
 k8s.io/apimachinery/pkg/util/diff
-k8s.io/apimachinery/pkg/apis/meta/v1beta1
 k8s.io/apimachinery/pkg/util/yaml
 k8s.io/apimachinery/pkg/util/strategicpatch
 k8s.io/apimachinery/pkg/util/uuid


Test patch:
diff --git a/test/e2e/servicebindingrequest_test.go b/test/e2e/servicebindingrequest_test.go
index e1a40195..3d5c435b 100644
--- a/test/e2e/servicebindingrequest_test.go
+++ b/test/e2e/servicebindingrequest_test.go
@@ -5,8 +5,8 @@ import (
 	"testing"
 	"time"
 
-	pgsqlapis "github.com/baijum/postgresql-operator/pkg/apis"
-	pgv1alpha1 "github.com/baijum/postgresql-operator/pkg/apis/postgresql/v1alpha1"
+	pgsqlapis "github.com/operator-backing-service-samples/postgresql-operator/pkg/apis"
+	pgv1alpha1 "github.com/operator-backing-service-samples/postgresql-operator/pkg/apis/postgresql/v1alpha1"
 	olmv1alpha1 "github.com/operator-framework/operator-lifecycle-manager/pkg/api/apis/operators/v1alpha1"
 	framework "github.com/operator-framework/operator-sdk/pkg/test"
 	"github.com/operator-framework/operator-sdk/pkg/test/e2eutil"
diff --git a/test/mocks/fake.go b/test/mocks/fake.go
index bcf2efc6..39298c43 100644
--- a/test/mocks/fake.go
+++ b/test/mocks/fake.go
@@ -3,8 +3,8 @@ package mocks
 import (
 	"testing"
 
-	pgapis "github.com/baijum/postgresql-operator/pkg/apis"
-	pgv1alpha1 "github.com/baijum/postgresql-operator/pkg/apis/postgresql/v1alpha1"
+	pgapis "github.com/operator-backing-service-samples/postgresql-operator/pkg/apis"
+	pgv1alpha1 "github.com/operator-backing-service-samples/postgresql-operator/pkg/apis/postgresql/v1alpha1"
 	olmv1alpha1 "github.com/operator-framework/operator-lifecycle-manager/pkg/api/apis/operators/v1alpha1"
 	"github.com/stretchr/testify/require"
 	appsv1 "k8s.io/api/apps/v1"
diff --git a/test/mocks/mocks.go b/test/mocks/mocks.go
index 0c3759c8..4207d782 100644
--- a/test/mocks/mocks.go
+++ b/test/mocks/mocks.go
@@ -4,7 +4,7 @@ import (
 	"encoding/json"
 	"fmt"
 
-	pgv1alpha1 "github.com/baijum/postgresql-operator/pkg/apis/postgresql/v1alpha1"
+	pgv1alpha1 "github.com/operator-backing-service-samples/postgresql-operator/pkg/apis/postgresql/v1alpha1"
 	olmv1alpha1 "github.com/operator-framework/operator-lifecycle-manager/pkg/api/apis/operators/v1alpha1"
 	olminstall "github.com/operator-framework/operator-lifecycle-manager/pkg/controller/install"
 	appsv1 "k8s.io/api/apps/v1"