File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -47,4 +47,6 @@ const (
47
47
IONiceClassData = "IONICE_CLASS_DATA"
48
48
49
49
StatusSubresourceEnabled = "ENABLE_STATUS_SUBRESOURCE"
50
+
51
+ PushgatewayURL = "PUSH_GATEWAY_URL"
50
52
)
Original file line number Diff line number Diff line change @@ -27,6 +27,10 @@ func (c *StashController) inputsForBackupConfig(backupConfig api.BackupConfigura
27
27
// always enable cache if nothing specified
28
28
inputs [apis .EnableCache ] = strconv .FormatBool (! backupConfig .Spec .TempDir .DisableCaching )
29
29
30
+ // add PushgatewayURL as input
31
+ metricInputs := c .inputForMetrics ()
32
+ inputs = core_util .UpsertMap (inputs , metricInputs )
33
+
30
34
return inputs , nil
31
35
}
32
36
@@ -48,6 +52,10 @@ func (c *StashController) inputsForRestoreSession(restoreSession api.RestoreSess
48
52
// always enable cache if nothing specified
49
53
inputs [apis .EnableCache ] = strconv .FormatBool (! restoreSession .Spec .TempDir .DisableCaching )
50
54
55
+ // add PushgatewayURL as input
56
+ metricInputs := c .inputForMetrics ()
57
+ inputs = core_util .UpsertMap (inputs , metricInputs )
58
+
51
59
return inputs , nil
52
60
}
53
61
@@ -139,3 +147,9 @@ func (c *StashController) inputsForRetentionPolicy(retentionPolicy apiAlpha.Rete
139
147
}
140
148
return inputs
141
149
}
150
+
151
+ func (c * StashController ) inputForMetrics () map [string ]string {
152
+ return map [string ]string {
153
+ apis .PushgatewayURL : util .PushgatewayURL (),
154
+ }
155
+ }
You can’t perform that action at this time.
0 commit comments