Skip to content

Commit ffab34c

Browse files
author
Jeff McCormick
committed
update config, add DEBUG flag check to apiserver, remove unused pgo.yaml config lines
1 parent 353a6ba commit ffab34c

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

apiserver.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,19 @@ import (
1717
"github.com/gorilla/mux"
1818
//"io/ioutil"
1919
"net/http"
20-
//"os"
20+
"os"
2121
)
2222

2323
func main() {
2424

25+
debugFlag := os.Getenv("DEBUG")
26+
if debugFlag == "true" {
27+
log.SetLevel(log.DebugLevel)
28+
log.Debug("debug flag set to true")
29+
} else {
30+
log.Info("debug flag set to false")
31+
}
32+
2533
log.Infoln("postgres-operator apiserver starts")
2634
r := mux.NewRouter()
2735
r.HandleFunc("/version", versionservice.VersionHandler)

conf/apiserver/pgo.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@ ReplicaStorage:
2525
Size: 200M
2626
StorageType: create
2727
Pgo:
28-
APIServerUrl: http://localhost:8080
2928
LSPVCTemplate: /config/pgo.lspvc-template.json
3029
CSVLoadTemplate: /config/pgo.csvload-template.json
3130
COImagePrefix: crunchydata
3231
COImageTag: centos7-2.2
33-
Debug: true

docs/config.asciidoc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ Pgo:
5353
APIServerUrl: http://localhost:8080
5454
LSPVCTemplate: /config/pgo.lspvc-template.json
5555
CSVLoadTemplate: /config/pgo.csvload-template.json
56+
COImagePrefix: crunchydata
5657
COImageTag: centos7-2.1
5758
Debug: true
5859
....
@@ -98,8 +99,8 @@ Values in the pgo configuration file have the following meaning:
9899
|BackupStorage.SupplementalGroups | optional, if set, will cause a SecurityContext to be added to generated Pod and Deployment definitions
99100
|Pgo.LSPVCTemplate | the PVC lspvc template file that lists PVC contents
100101
|Pgo.CSVLoadTemplate | the CSV load template file used for load jobs
101-
|Pgo.COImageTag | image tag to use for the PostgreSQL operator containers
102-
|Pgo.Debug | set to true if you want to see debug messages from the pgo client
102+
|Pgo.COImagePrefix | image tag prefix to use for the Operator containers
103+
|Pgo.COImageTag | image tag to use for the Operator containers
103104
|======================
104105

105106
*NOTE*: Regarding the PVC access mode variable; this is automatically set to ReadWriteMany but

0 commit comments

Comments
 (0)