Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 43c5c62

Browse files
authoredMar 7, 2023
Improvements to feature gate handling (CrunchyData#3599)
a) improve deploy-dev to allow user to easily set b) print feature gates on startup
1 parent 9eb1237 commit 43c5c62

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed
 

‎Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,13 +132,14 @@ undeploy: ## Undeploy the PostgreSQL Operator
132132

133133
.PHONY: deploy-dev
134134
deploy-dev: ## Deploy the PostgreSQL Operator locally
135+
deploy-dev: PGO_FEATURE_GATES ?= "TablespaceVolumes=true"
135136
deploy-dev: build-postgres-operator
136137
deploy-dev: createnamespaces
137138
kubectl apply --server-side -k ./config/dev
138139
hack/create-kubeconfig.sh postgres-operator pgo
139140
env \
140141
CRUNCHY_DEBUG=true \
141-
PGO_FEATURE_GATES="TablespaceVolumes=true" \
142+
PGO_FEATURE_GATES="${PGO_FEATURE_GATES}" \
142143
CHECK_FOR_UPGRADES='$(if $(CHECK_FOR_UPGRADES),$(CHECK_FOR_UPGRADES),false)' \
143144
KUBECONFIG=hack/.kube/postgres-operator/pgo \
144145
PGO_NAMESPACE='postgres-operator' \

‎cmd/postgres-operator/main.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ func main() {
7070
log := logging.FromContext(ctx)
7171
log.V(1).Info("debug flag set to true")
7272

73+
log.Info("feature gates enabled",
74+
"PGO_FEATURE_GATES", os.Getenv("PGO_FEATURE_GATES"))
75+
7376
cruntime.SetLogger(log)
7477

7578
cfg, err := runtime.GetConfig()

0 commit comments

Comments
 (0)
Please sign in to comment.