File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ const (
68
68
podMonitorName string = "patroni"
69
69
walGExporterName string = "wal-g-exporter"
70
70
walGExporterPort int32 = 9351
71
- podMonitorPort string = " 8008"
71
+ podMonitorPort int32 = 8008
72
72
initDBName string = "postgres-initdb"
73
73
initDBSQLDummy string = `SELECT 'NOOP';`
74
74
debugLogLevel int = 1
@@ -1688,7 +1688,8 @@ func (r *PostgresReconciler) createOrUpdatePatroniPodMonitor(ctx context.Context
1688
1688
1689
1689
pm .Spec .PodMetricsEndpoints = []coreosv1.PodMetricsEndpoint {
1690
1690
{
1691
- Port : ptr .To (podMonitorPort ),
1691
+ PortNumber : ptr .To (podMonitorPort ),
1692
+ TargetPort : ptr .To (intstr .FromInt32 (podMonitorPort )),
1692
1693
},
1693
1694
}
1694
1695
pm .Spec .NamespaceSelector = coreosv1.NamespaceSelector {
@@ -2241,7 +2242,7 @@ func (r *PostgresReconciler) createOrUpdateWalGExporterPodMonitor(log logr.Logge
2241
2242
2242
2243
s .Spec .PodMetricsEndpoints = []coreosv1.PodMetricsEndpoint {
2243
2244
{
2244
- Port : ptr .To (strconv . Itoa ( int ( walGExporterPort )) ),
2245
+ Port : ptr .To (walGExporterName ),
2245
2246
},
2246
2247
}
2247
2248
selector := map [string ]string {
You can’t perform that action at this time.
0 commit comments