Skip to content

Commit

Permalink
Improvements to feature gate handling (#3599)
Browse files Browse the repository at this point in the history
a) improve deploy-dev to allow user to easily set
b) print feature gates on startup
  • Loading branch information
benjaminjb committed Mar 7, 2023
1 parent 9eb1237 commit 43c5c62
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -132,13 +132,14 @@ undeploy: ## Undeploy the PostgreSQL Operator

.PHONY: deploy-dev
deploy-dev: ## Deploy the PostgreSQL Operator locally
deploy-dev: PGO_FEATURE_GATES ?= "TablespaceVolumes=true"
deploy-dev: build-postgres-operator
deploy-dev: createnamespaces
kubectl apply --server-side -k ./config/dev
hack/create-kubeconfig.sh postgres-operator pgo
env \
CRUNCHY_DEBUG=true \
PGO_FEATURE_GATES="TablespaceVolumes=true" \
PGO_FEATURE_GATES="${PGO_FEATURE_GATES}" \
CHECK_FOR_UPGRADES='$(if $(CHECK_FOR_UPGRADES),$(CHECK_FOR_UPGRADES),false)' \
KUBECONFIG=hack/.kube/postgres-operator/pgo \
PGO_NAMESPACE='postgres-operator' \
Expand Down
3 changes: 3 additions & 0 deletions cmd/postgres-operator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ func main() {
log := logging.FromContext(ctx)
log.V(1).Info("debug flag set to true")

log.Info("feature gates enabled",
"PGO_FEATURE_GATES", os.Getenv("PGO_FEATURE_GATES"))

cruntime.SetLogger(log)

cfg, err := runtime.GetConfig()
Expand Down

0 comments on commit 43c5c62

Please sign in to comment.