Documentation ¶
Index ¶
Constants ¶
const ( // DefaultTaskrunLevel determines to what level to aggregate metrics // when it isn't specified in configmap DefaultTaskrunLevel = TaskrunLevelAtTask // TaskrunLevelAtTask specify that aggregation will be done at task level TaskrunLevelAtTask = "task" // TaskrunLevelAtNS specify that aggregation will be done at namespace level TaskrunLevelAtNS = "namespace" // DefaultPipelinerunLevel determines to what level to aggregate metrics // when it isn't specified in configmap DefaultPipelinerunLevel = PipelinerunLevelAtPipeline // PipelinerunLevelAtPipeline specify that aggregation will be done at // pipeline level PipelinerunLevelAtPipeline = "pipeline" // PipelinerunLevelAtNS specify that aggregation will be done at // namespace level PipelinerunLevelAtNS = "namespace" // DefaultDurationTaskrunType determines what type // of metrics to use when we don't specify one in // configmap DefaultDurationTaskrunType = "histogram" // DurationTaskrunTypeHistogram specify that histogram // type metrics need to be used for Duration of Taskrun DurationTaskrunTypeHistogram = "histogram" // DurationTaskrunTypeLastValue specify that lastValue or // gauge type metrics need to be used for Duration of Taskrun DurationTaskrunTypeLastValue = "lastvalue" // DefaultDurationPipelinerunType determines what type // of metrics to use when we don't specify one in // configmap DefaultDurationPipelinerunType = "histogram" // DurationPipelinerunTypeHistogram specify that histogram // type metrics need to be used for Duration of Pipelinerun DurationPipelinerunTypeHistogram = "histogram" // DurationPipelinerunTypeLastValue specify that lastValue or // gauge type metrics need to be used for Duration of Pipelinerun DurationPipelinerunTypeLastValue = "lastvalue" )
const ( // DefaultRunAt is the default value for RunAt DefaultRunAt = "7 7 * * 7" // DefaultMaxRetention is the default value for MaxRetention DefaultMaxRetention = time.Hour * 24 * 30 )
Variables ¶
This section is empty.
Functions ¶
func GetMetricsConfigName ¶
func GetMetricsConfigName() string
GetMetricsConfigName returns the name of the configmap containing all customizations for the storage bucket.
func GetRetentionPolicyConfigName ¶ added in v0.12.0
func GetRetentionPolicyConfigName() string
GetRetentionPolicyConfigName returns the name of the configmap containing retention policy.
Types ¶
type Config ¶
type Config struct {
Metrics *Metrics
}
Config holds the collection of configurations that we attach to contexts.
func FromContext ¶
FromContext extracts a Config from the provided context.
type Metrics ¶
type Metrics struct { TaskrunLevel string PipelinerunLevel string DurationTaskrunType string DurationPipelinerunType string }
Metrics holds the configurations for the metrics
func NewMetricsFromConfigMap ¶
NewMetricsFromConfigMap returns a Config for the given configmap
type RetentionPolicy ¶ added in v0.12.0
RetentionPolicy holds the configurations for the Retention Policy of the DB
func NewRetentionPolicyFromConfigMap ¶ added in v0.12.0
func NewRetentionPolicyFromConfigMap(config *corev1.ConfigMap) (*RetentionPolicy, error)
NewRetentionPolicyFromConfigMap returns a Config for the given configmap
func (*RetentionPolicy) DeepCopy ¶ added in v0.12.0
func (cfg *RetentionPolicy) DeepCopy() *RetentionPolicy
DeepCopy copying the receiver, creating a new RetentionPolicy. deepcopy-gen hasn't been introduced in results repo, so handcraft here for now
func (*RetentionPolicy) Equals ¶ added in v0.12.0
func (cfg *RetentionPolicy) Equals(other *RetentionPolicy) bool
Equals returns true if two Configs are identical
type Store ¶
type Store struct {
*configmap.UntypedStore
}
Store is a typed wrapper around configmap.Untyped store to handle our configmaps.
func NewStore ¶
NewStore creates a new store of Configs and optionally calls functions when ConfigMaps are updated.