Skip to content

Commit

Permalink
set dynamic interval (stolostron#967)
Browse files Browse the repository at this point in the history
Signed-off-by: Marco [email protected]
  • Loading branch information
marcolan018 authored Mar 24, 2022
1 parent f2505f6 commit cf5c7ad
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ func createDeployment(clusterID string, clusterType string,
if fmt.Sprint(obsAddonSpec.Interval) == "" {
interval = defaultInterval
}
evaluateInterval := "30s"
if obsAddonSpec.Interval < 30 {
evaluateInterval = interval
}

volumes := []corev1.Volume{
{
Expand Down Expand Up @@ -116,6 +120,7 @@ func createDeployment(clusterID string, clusterType string,
"--to-upload-cert=/tlscerts/certs/tls.crt",
"--to-upload-key=/tlscerts/certs/tls.key",
"--interval=" + interval,
"--evaluate-interval=" + evaluateInterval,
"--limit-bytes=" + strconv.Itoa(limitBytes),
fmt.Sprintf("--label=\"cluster=%s\"", hubInfo.ClusterName),
fmt.Sprintf("--label=\"clusterID=%s\"", clusterID),
Expand Down

0 comments on commit cf5c7ad

Please sign in to comment.