File tree 2 files changed +7
-0
lines changed
cmd/package-server-manager
2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ const (
28
28
defaultNamespace = "openshift-operator-lifecycle-manager"
29
29
defaultMetricsPort = "0"
30
30
defaultHealthCheckPort = ":8080"
31
+ defaultPprofPort = ":6060"
31
32
leaderElectionConfigmapName = "packageserver-controller-lock"
32
33
)
33
34
@@ -57,6 +58,10 @@ func run(cmd *cobra.Command, args []string) error {
57
58
if err != nil {
58
59
return err
59
60
}
61
+ pprofAddr , err := cmd .Flags ().GetString ("pprof" )
62
+ if err != nil {
63
+ return err
64
+ }
60
65
61
66
ctrl .SetLogger (zap .New (zap .UseDevMode (true )))
62
67
setupLog := ctrl .Log .WithName ("setup" )
@@ -76,6 +81,7 @@ func run(cmd *cobra.Command, args []string) error {
76
81
RenewDeadline : & le .RenewDeadline .Duration ,
77
82
RetryPeriod : & le .RetryPeriod .Duration ,
78
83
HealthProbeBindAddress : healthCheckAddr ,
84
+ PprofBindAddress : pprofAddr ,
79
85
Cache : cache.Options {
80
86
ByObject : map [client.Object ]cache.ByObject {
81
87
& olmv1alpha1.ClusterServiceVersion {}: {
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ func newStartCmd() *cobra.Command {
15
15
cmd .Flags ().String ("name" , defaultName , "configures the metadata.name for the packageserver csv resource" )
16
16
cmd .Flags ().String ("namespace" , defaultNamespace , "configures the metadata.namespace that contains the packageserver csv resource" )
17
17
cmd .Flags ().String ("health" , defaultHealthCheckPort , "configures the health check port that the kubelet is configured to probe" )
18
+ cmd .Flags ().String ("pprof" , defaultPprofPort , "configures the pprof port that the process exposes" )
18
19
cmd .Flags ().Bool ("disable-leader-election" , false , "configures whether leader election will be disabled" )
19
20
20
21
return cmd
You can’t perform that action at this time.
0 commit comments