From f844ae779b16da19e2651168989f6ff92979fbf4 Mon Sep 17 00:00:00 2001 From: Philipp Eberle Date: Wed, 8 Jul 2026 11:37:39 +0200 Subject: [PATCH 1/3] Remove the default 0.0.0.0/0 source range --- cmd/postgres.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/postgres.go b/cmd/postgres.go index c11fdbea..c94e0aa9 100644 --- a/cmd/postgres.go +++ b/cmd/postgres.go @@ -266,7 +266,7 @@ postgres=# postgresCreateCmd.Flags().StringP("partition", "", "", "partition where the database should be created") postgresCreateCmd.Flags().IntP("replicas", "", 1, "replicas of the database") postgresCreateCmd.Flags().StringP("version", "", "", "version of the database") - postgresCreateCmd.Flags().StringSliceP("sources", "", []string{"0.0.0.0/0"}, "networks which should be allowed to connect in CIDR notation") + postgresCreateCmd.Flags().StringSliceP("sources", "", []string{}, "networks which should be allowed to connect in CIDR notation") postgresCreateCmd.Flags().StringSliceP("labels", "", []string{}, "labels to add to that postgres database") postgresCreateCmd.Flags().StringP("cpu", "", "500m", "cpus for the database") postgresCreateCmd.Flags().StringP("memoryfactor", "", "", "the memoryfactor to use [optional]") @@ -334,7 +334,7 @@ postgres=# // Update postgresUpdateCmd.Flags().IntP("replicas", "", 1, "replicas of the database [optional]") - postgresUpdateCmd.Flags().StringSliceP("sources", "", []string{"0.0.0.0/0"}, "networks which should be allowed to connect in CIDR notation [optional]") + postgresUpdateCmd.Flags().StringSliceP("sources", "", []string{}, "networks which should be allowed to connect in CIDR notation [optional]") postgresUpdateCmd.Flags().StringSliceP("labels", "", []string{}, "labels to add to that postgres database [optional]") postgresUpdateCmd.Flags().StringP("cpu", "", "500m", "cpus for the database [optional]") postgresUpdateCmd.Flags().StringP("buffer", "", "64Mi", "shared buffer for the database [optional]") From e43b91822b4f00a7782c912b024aa6e76591a23b Mon Sep 17 00:00:00 2001 From: Philipp Eberle Date: Wed, 8 Jul 2026 11:42:18 +0200 Subject: [PATCH 2/3] source ranges are now a required flag --- cmd/postgres.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/postgres.go b/cmd/postgres.go index c94e0aa9..fc5f38ef 100644 --- a/cmd/postgres.go +++ b/cmd/postgres.go @@ -286,6 +286,7 @@ postgres=# genericcli.Must(postgresCreateCmd.MarkFlagRequired("partition")) genericcli.Must(postgresCreateCmd.MarkFlagRequired("backup-config")) genericcli.Must(postgresCreateCmd.MarkFlagRequired("version")) + genericcli.Must(postgresCreateCmd.MarkFlagRequired("sources")) genericcli.Must(postgresCreateCmd.RegisterFlagCompletionFunc("project", c.comp.ProjectListCompletion)) genericcli.Must(postgresCreateCmd.RegisterFlagCompletionFunc("partition", c.comp.PostgresListPartitionsCompletion)) genericcli.Must(postgresCreateCmd.RegisterFlagCompletionFunc("version", c.comp.PostgresListVersionsCompletion)) From fbbe2a93e75139951be69ccf34bfcf7706aa20e1 Mon Sep 17 00:00:00 2001 From: Philipp Eberle Date: Wed, 8 Jul 2026 13:34:04 +0200 Subject: [PATCH 3/3] Backend still defaults to 0.0.0.0/0, so for now default to 255.255.255.255/32 --- cmd/postgres.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/postgres.go b/cmd/postgres.go index fc5f38ef..48b171f2 100644 --- a/cmd/postgres.go +++ b/cmd/postgres.go @@ -266,7 +266,7 @@ postgres=# postgresCreateCmd.Flags().StringP("partition", "", "", "partition where the database should be created") postgresCreateCmd.Flags().IntP("replicas", "", 1, "replicas of the database") postgresCreateCmd.Flags().StringP("version", "", "", "version of the database") - postgresCreateCmd.Flags().StringSliceP("sources", "", []string{}, "networks which should be allowed to connect in CIDR notation") + postgresCreateCmd.Flags().StringSliceP("sources", "", []string{"255.255.255.255/32"}, "networks which should be allowed to connect in CIDR notation") postgresCreateCmd.Flags().StringSliceP("labels", "", []string{}, "labels to add to that postgres database") postgresCreateCmd.Flags().StringP("cpu", "", "500m", "cpus for the database") postgresCreateCmd.Flags().StringP("memoryfactor", "", "", "the memoryfactor to use [optional]")