You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: cmd/hubagent/options/options.go
+8Lines changed: 8 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -98,6 +98,10 @@ type Options struct {
98
98
EnableStagedUpdateRunAPIsbool
99
99
// EnableEvictionAPIs enables to agents to watch the eviction and placement disruption budget CRs.
100
100
EnableEvictionAPIsbool
101
+
// EnablePprof enables the pprof profiling.
102
+
EnablePprofbool
103
+
// PprofPort is the port for pprof profiling.
104
+
PprofPortint
101
105
// DenyModifyMemberClusterLabels indicates if the member cluster labels cannot be modified by groups (excluding system:masters)
102
106
DenyModifyMemberClusterLabelsbool
103
107
}
@@ -117,6 +121,8 @@ func NewOptions() *Options {
117
121
EnableV1Alpha1APIs: false,
118
122
EnableClusterInventoryAPIs: true,
119
123
EnableStagedUpdateRunAPIs: true,
124
+
EnablePprof: false,
125
+
PprofPort: 6065,
120
126
}
121
127
}
122
128
@@ -160,6 +166,8 @@ func (o *Options) AddFlags(flags *flag.FlagSet) {
160
166
flags.DurationVar(&o.ForceDeleteWaitTime.Duration, "force-delete-wait-time", 15*time.Minute, "The duration the hub agent waits before force deleting a member cluster.")
161
167
flags.BoolVar(&o.EnableStagedUpdateRunAPIs, "enable-staged-update-run-apis", true, "If set, the agents will watch for the ClusterStagedUpdateRun APIs.")
162
168
flags.BoolVar(&o.EnableEvictionAPIs, "enable-eviction-apis", true, "If set, the agents will watch for the Eviction and PlacementDisruptionBudget APIs.")
169
+
flags.BoolVar(&o.EnablePprof, "enable-pprof", false, "If set, the pprof profiling is enabled.")
170
+
flags.IntVar(&o.PprofPort, "pprof-port", 6065, "The port for pprof profiling.")
163
171
flags.BoolVar(&o.DenyModifyMemberClusterLabels, "deny-modify-member-cluster-labels", false, "If set, users not in the system:masters cannot modify member cluster labels.")
Copy file name to clipboardExpand all lines: cmd/memberagent/main.go
+7Lines changed: 7 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -91,6 +91,9 @@ var (
91
91
driftDetectionInterval=flag.Int("drift-detection-interval", 15, "The interval in seconds between attempts to detect configuration drifts in the cluster.")
92
92
watchWorkWithPriorityQueue=flag.Bool("enable-watch-work-with-priority-queue", false, "If set, the apply_work controller will watch/reconcile work objects that are created new or have recent updates")
93
93
watchWorkReconcileAgeMinutes=flag.Int("watch-work-reconcile-age", 60, "maximum age (in minutes) of work objects for apply_work controller to watch/reconcile")
0 commit comments