-
Notifications
You must be signed in to change notification settings - Fork 244
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add e2e test for binding Signed-off-by: anandrkskd <[email protected]> * fails on testing binding's Signed-off-by: anandrkskd <[email protected]> * update e2e test Signed-off-by: anandrkskd <[email protected]> * remove FIt Signed-off-by: anandrkskd <[email protected]> * incorporate requested changes Signed-off-by: anandrkskd <[email protected]> * incorporate requested changes Signed-off-by: anandrkskd <[email protected]> * dont run go sec on example directory Signed-off-by: anandrkskd <[email protected]> * fix flaky behaviour Signed-off-by: anandrkskd <[email protected]> * fix flaky behaviour Signed-off-by: anandrkskd <[email protected]> * nit: cleanup Signed-off-by: anandrkskd <[email protected]> * Apply suggestions from code review Signed-off-by: anandrkskd <[email protected]> Co-authored-by: Armel Soro <[email protected]>
- Loading branch information
1 parent
c987520
commit 6172a16
Showing
9 changed files
with
584 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
apiVersion: postgresql.k8s.enterprisedb.io/v1 | ||
kind: Cluster | ||
metadata: | ||
name: cluster-example-initdb | ||
spec: | ||
instances: 1 | ||
bootstrap: | ||
initdb: | ||
database: appdb | ||
owner: appuser | ||
secret: | ||
name: appuser-secret | ||
postInitApplicationSQL: | ||
- create table users (userid SERIAL PRIMARY KEY, name TEXT, age INT, location TEXT) | ||
storage: | ||
size: 1Gi | ||
--- | ||
apiVersion: v1 | ||
stringData: | ||
username: appuser | ||
password: test-12password! | ||
kind: Secret | ||
metadata: | ||
name: appuser-secret | ||
type: kubernetes.io/basic-auth | ||
--- | ||
apiVersion: v1 | ||
stringData: | ||
username: appuser | ||
password: test-12password! | ||
kind: Secret | ||
metadata: | ||
name: cluster-example-initdb-appuser | ||
type: kubernetes.io/basic-auth |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
module go-postgres | ||
|
||
require ( | ||
github.com/gorilla/mux v1.7.4 | ||
github.com/joho/godotenv v1.3.0 | ||
github.com/lib/pq v1.3.0 | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
github.com/gorilla/mux v1.7.4 h1:VuZ8uybHlWmqV03+zRzdwKL4tUnIp1MAQtp1mIFE1bc= | ||
github.com/gorilla/mux v1.7.4/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= | ||
github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc= | ||
github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= | ||
github.com/lib/pq v1.3.0 h1:/qkRGz8zljWiDcFvgpwUpwIAPu3r07TDvs3Rws+o/pU= | ||
github.com/lib/pq v1.3.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package main | ||
|
||
import ( | ||
"fmt" | ||
"go-postgres/router" | ||
"log" | ||
"net/http" | ||
) | ||
|
||
func main() { | ||
r := router.Router() | ||
fmt.Println("Starting server on the port 8080...") | ||
|
||
log.Fatal(http.ListenAndServe(":8080", r)) | ||
} |
Oops, something went wrong.