generated from kubernetes/kubernetes-template-project
-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add support for ttl after finished controller for cleaning up finishe…
…d jobsets
- Loading branch information
Showing
20 changed files
with
867 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
19 changes: 14 additions & 5 deletions
19
client-go/applyconfiguration/jobset/v1alpha2/jobsetspec.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package metrics | ||
|
||
import ( | ||
"github.com/prometheus/client_golang/prometheus" | ||
"sigs.k8s.io/controller-runtime/pkg/metrics" | ||
) | ||
|
||
// TTLAfterFinishedSubsystem - subsystem name used for this controller. | ||
const TTLAfterFinishedSubsystem = "ttl_after_finished_controller" | ||
|
||
var ( | ||
// JobSetDeletionDurationSeconds tracks the time it took to delete the jobset since it | ||
// became eligible for deletion. | ||
JobSetDeletionDurationSeconds = prometheus.NewHistogram( | ||
prometheus.HistogramOpts{ | ||
Subsystem: TTLAfterFinishedSubsystem, | ||
Name: "jobset_deletion_duration_seconds", | ||
Help: "The time it took to delete the jobset since it became eligible for deletion", | ||
// Start with 100ms with the last bucket being [~27m, Inf). | ||
Buckets: prometheus.ExponentialBuckets(0.1, 2, 14), | ||
}, | ||
) | ||
) | ||
|
||
func init() { | ||
// Register custom metrics with the global prometheus registry | ||
metrics.Registry.MustRegister(JobSetDeletionDurationSeconds) | ||
} |
Oops, something went wrong.