operator.v1beta1.vmStaticScrape
"VMStaticScrape defines static targets configuration for scraping."
Index
fn new(name)
obj metadata
fn withAnnotations(annotations)
fn withAnnotationsMixin(annotations)
fn withClusterName(clusterName)
fn withCreationTimestamp(creationTimestamp)
fn withDeletionGracePeriodSeconds(deletionGracePeriodSeconds)
fn withDeletionTimestamp(deletionTimestamp)
fn withFinalizers(finalizers)
fn withFinalizersMixin(finalizers)
fn withGenerateName(generateName)
fn withGeneration(generation)
fn withLabels(labels)
fn withLabelsMixin(labels)
fn withName(name)
fn withNamespace(namespace)
fn withOwnerReferences(ownerReferences)
fn withOwnerReferencesMixin(ownerReferences)
fn withResourceVersion(resourceVersion)
fn withSelfLink(selfLink)
fn withUid(uid)
obj spec
fn withJobName(jobName)
fn withSampleLimit(sampleLimit)
fn withSeriesLimit(seriesLimit)
fn withTargetEndpoints(targetEndpoints)
fn withTargetEndpointsMixin(targetEndpoints)
obj spec.targetEndpoints
fn withBearerTokenFile(bearerTokenFile)
fn withFollow_redirects(follow_redirects)
fn withHonorLabels(honorLabels)
fn withHonorTimestamps(honorTimestamps)
fn withInterval(interval)
fn withLabels(labels)
fn withLabelsMixin(labels)
fn withMetricRelabelConfigs(metricRelabelConfigs)
fn withMetricRelabelConfigsMixin(metricRelabelConfigs)
fn withParams(params)
fn withParamsMixin(params)
fn withPath(path)
fn withPort(port)
fn withProxyURL(proxyURL)
fn withRelabelConfigs(relabelConfigs)
fn withRelabelConfigsMixin(relabelConfigs)
fn withSampleLimit(sampleLimit)
fn withScheme(scheme)
fn withScrapeTimeout(scrapeTimeout)
fn withScrape_interval(scrape_interval)
fn withSeriesLimit(seriesLimit)
fn withTargets(targets)
fn withTargetsMixin(targets)
obj spec.targetEndpoints.authorization
obj spec.targetEndpoints.basicAuth
obj spec.targetEndpoints.bearerTokenSecret
obj spec.targetEndpoints.metricRelabelConfigs
fn withAction(action)
fn withIf(If)
fn withLabels(labels)
fn withLabelsMixin(labels)
fn withMatch(match)
fn withModulus(modulus)
fn withRegex(regex)
fn withReplacement(replacement)
fn withSeparator(separator)
fn withSourceLabels(sourceLabels)
fn withSourceLabelsMixin(sourceLabels)
fn withSource_labels(source_labels)
fn withSource_labelsMixin(source_labels)
fn withTargetLabel(targetLabel)
fn withTarget_label(target_label)
obj spec.targetEndpoints.oauth2
obj spec.targetEndpoints.relabelConfigs
fn withAction(action)
fn withIf(If)
fn withLabels(labels)
fn withLabelsMixin(labels)
fn withMatch(match)
fn withModulus(modulus)
fn withRegex(regex)
fn withReplacement(replacement)
fn withSeparator(separator)
fn withSourceLabels(sourceLabels)
fn withSourceLabelsMixin(sourceLabels)
fn withSource_labels(source_labels)
fn withSource_labelsMixin(source_labels)
fn withTargetLabel(targetLabel)
fn withTarget_label(target_label)
obj spec.targetEndpoints.tlsConfig
obj spec.targetEndpoints.vm_scrape_params
fn withDisable_compression(disable_compression)
fn withDisable_keep_alive(disable_keep_alive)
fn withHeaders(headers)
fn withHeadersMixin(headers)
fn withMetric_relabel_debug(metric_relabel_debug)
fn withNo_stale_markers(no_stale_markers)
fn withRelabel_debug(relabel_debug)
fn withScrape_align_interval(scrape_align_interval)
fn withScrape_offset(scrape_offset)
fn withStream_parse(stream_parse)
obj spec.targetEndpoints.vm_scrape_params.proxy_client_config
fn withBearer_token_file(bearer_token_file)
obj spec.targetEndpoints.vm_scrape_params.proxy_client_config.basic_auth
obj spec.targetEndpoints.vm_scrape_params.proxy_client_config.bearer_token
obj spec.targetEndpoints.vm_scrape_params.proxy_client_config.tls_config
fn withCaFile(caFile)
fn withCertFile(certFile)
fn withInsecureSkipVerify(insecureSkipVerify)
fn withKeyFile(keyFile)
fn withServerName(serverName)
obj spec.targetEndpoints.vm_scrape_params.proxy_client_config.tls_config.ca
obj spec.targetEndpoints.vm_scrape_params.proxy_client_config.tls_config.cert
obj spec.targetEndpoints.vm_scrape_params.proxy_client_config.tls_config.keySecret
Fields
fn new
new(name)
new returns an instance of VMStaticScrape
obj metadata
"ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create."
fn metadata.withAnnotations
withAnnotations(annotations)
"Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations"
fn metadata.withAnnotationsMixin
withAnnotationsMixin(annotations)
"Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations"
Note: This function appends passed data to existing values
fn metadata.withClusterName
withClusterName(clusterName)
"The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request."
fn metadata.withCreationTimestamp
withCreationTimestamp(creationTimestamp)
"Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers."
fn metadata.withDeletionGracePeriodSeconds
withDeletionGracePeriodSeconds(deletionGracePeriodSeconds)
"Number of seconds allowed for this object to gracefully terminate before it will be removed from the system. Only set when deletionTimestamp is also set. May only be shortened. Read-only."
fn metadata.withDeletionTimestamp
withDeletionTimestamp(deletionTimestamp)
"Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers."
fn metadata.withFinalizers
withFinalizers(finalizers)
"Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed. Finalizers may be processed and removed in any order. Order is NOT enforced because it introduces significant risk of stuck finalizers. finalizers is a shared field, any actor with permission can reorder it. If the finalizer list is processed in order, then this can lead to a situation in which the component responsible for the first finalizer in the list is waiting for a signal (field value, external system, or other) produced by a component responsible for a finalizer later in the list, resulting in a deadlock. Without enforced ordering finalizers are free to order amongst themselves and are not vulnerable to ordering changes in the list."
fn metadata.withFinalizersMixin
withFinalizersMixin(finalizers)
"Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed. Finalizers may be processed and removed in any order. Order is NOT enforced because it introduces significant risk of stuck finalizers. finalizers is a shared field, any actor with permission can reorder it. If the finalizer list is processed in order, then this can lead to a situation in which the component responsible for the first finalizer in the list is waiting for a signal (field value, external system, or other) produced by a component responsible for a finalizer later in the list, resulting in a deadlock. Without enforced ordering finalizers are free to order amongst themselves and are not vulnerable to ordering changes in the list."
Note: This function appends passed data to existing values
fn metadata.withGenerateName
withGenerateName(generateName)
"GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server.\n\nIf this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header).\n\nApplied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency"
fn metadata.withGeneration
withGeneration(generation)
"A sequence number representing a specific generation of the desired state. Populated by the system. Read-only."
fn metadata.withLabels
withLabels(labels)
"Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels"
fn metadata.withLabelsMixin
withLabelsMixin(labels)
"Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels"
Note: This function appends passed data to existing values
fn metadata.withName
withName(name)
"Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names"
fn metadata.withNamespace
withNamespace(namespace)
"Namespace defines the space within which each name must be unique. An empty namespace is equivalent to the \"default\" namespace, but \"default\" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty.\n\nMust be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces"
fn metadata.withOwnerReferences
withOwnerReferences(ownerReferences)
"List of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller."
fn metadata.withOwnerReferencesMixin
withOwnerReferencesMixin(ownerReferences)
"List of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller."
Note: This function appends passed data to existing values
fn metadata.withResourceVersion
withResourceVersion(resourceVersion)
"An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources.\n\nPopulated by the system. Read-only. Value must be treated as opaque by clients and . More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency"
fn metadata.withSelfLink
withSelfLink(selfLink)
"SelfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release."
fn metadata.withUid
withUid(uid)
"UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations.\n\nPopulated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids"
obj spec
"VMStaticScrapeSpec defines the desired state of VMStaticScrape."
fn spec.withJobName
withJobName(jobName)
"JobName name of job."
fn spec.withSampleLimit
withSampleLimit(sampleLimit)
"SampleLimit defines per-scrape limit on number of scraped samples that will be accepted."
fn spec.withSeriesLimit
withSeriesLimit(seriesLimit)
"SeriesLimit defines per-scrape limit on number of unique time series\na single target can expose during all the scrapes on the time window of 24h."
fn spec.withTargetEndpoints
withTargetEndpoints(targetEndpoints)
"A list of target endpoints to scrape metrics from."
fn spec.withTargetEndpointsMixin
withTargetEndpointsMixin(targetEndpoints)
"A list of target endpoints to scrape metrics from."
Note: This function appends passed data to existing values
obj spec.targetEndpoints
"A list of target endpoints to scrape metrics from."
fn spec.targetEndpoints.withBearerTokenFile
withBearerTokenFile(bearerTokenFile)
"File to read bearer token for scraping targets."
fn spec.targetEndpoints.withFollow_redirects
withFollow_redirects(follow_redirects)
"FollowRedirects controls redirects for scraping."
fn spec.targetEndpoints.withHonorLabels
withHonorLabels(honorLabels)
"HonorLabels chooses the metric's labels on collisions with target labels."
fn spec.targetEndpoints.withHonorTimestamps
withHonorTimestamps(honorTimestamps)
"HonorTimestamps controls whether vmagent respects the timestamps present in scraped data."
fn spec.targetEndpoints.withInterval
withInterval(interval)
"Interval at which metrics should be scraped"
fn spec.targetEndpoints.withLabels
withLabels(labels)
"Labels static labels for targets."
fn spec.targetEndpoints.withLabelsMixin
withLabelsMixin(labels)
"Labels static labels for targets."
Note: This function appends passed data to existing values
fn spec.targetEndpoints.withMetricRelabelConfigs
withMetricRelabelConfigs(metricRelabelConfigs)
"MetricRelabelConfigs to apply to samples after scrapping."
fn spec.targetEndpoints.withMetricRelabelConfigsMixin
withMetricRelabelConfigsMixin(metricRelabelConfigs)
"MetricRelabelConfigs to apply to samples after scrapping."
Note: This function appends passed data to existing values
fn spec.targetEndpoints.withParams
withParams(params)
"Optional HTTP URL parameters"
fn spec.targetEndpoints.withParamsMixin
withParamsMixin(params)
"Optional HTTP URL parameters"
Note: This function appends passed data to existing values
fn spec.targetEndpoints.withPath
withPath(path)
"HTTP path to scrape for metrics."
fn spec.targetEndpoints.withPort
withPort(port)
"Default port for target."
fn spec.targetEndpoints.withProxyURL
withProxyURL(proxyURL)
"ProxyURL eg http://proxyserver:2195 Directs scrapes to proxy through this endpoint."
fn spec.targetEndpoints.withRelabelConfigs
withRelabelConfigs(relabelConfigs)
"RelabelConfigs to apply to samples during service discovery."
fn spec.targetEndpoints.withRelabelConfigsMixin
withRelabelConfigsMixin(relabelConfigs)
"RelabelConfigs to apply to samples during service discovery."
Note: This function appends passed data to existing values
fn spec.targetEndpoints.withSampleLimit
withSampleLimit(sampleLimit)
"SampleLimit defines per-scrape limit on number of scraped samples that will be accepted."
fn spec.targetEndpoints.withScheme
withScheme(scheme)
"HTTP scheme to use for scraping."
fn spec.targetEndpoints.withScrapeTimeout
withScrapeTimeout(scrapeTimeout)
"Timeout after which the scrape is ended"
fn spec.targetEndpoints.withScrape_interval
withScrape_interval(scrape_interval)
"ScrapeInterval is the same as Interval and has priority over it.\none of scrape_interval or interval can be used"
fn spec.targetEndpoints.withSeriesLimit
withSeriesLimit(seriesLimit)
"SeriesLimit defines per-scrape limit on number of unique time series\na single target can expose during all the scrapes on the time window of 24h."
fn spec.targetEndpoints.withTargets
withTargets(targets)
"Targets static targets addresses in form of [\"192.122.55.55:9100\",\"some-name:9100\"]."
fn spec.targetEndpoints.withTargetsMixin
withTargetsMixin(targets)
"Targets static targets addresses in form of [\"192.122.55.55:9100\",\"some-name:9100\"]."
Note: This function appends passed data to existing values
obj spec.targetEndpoints.authorization
"Authorization with http header Authorization"
fn spec.targetEndpoints.authorization.withCredentialsFile
withCredentialsFile(credentialsFile)
"File with value for authorization"
fn spec.targetEndpoints.authorization.withType
withType(type)
"Type of authorization, default to bearer"
obj spec.targetEndpoints.authorization.credentials
"Reference to the secret with value for authorization"
fn spec.targetEndpoints.authorization.credentials.withKey
withKey(key)
"The key of the secret to select from. Must be a valid secret key."
fn spec.targetEndpoints.authorization.credentials.withName
withName(name)
"Name of the referent.\nThis field is effectively required, but due to backwards compatibility is\nallowed to be empty. Instances of this type with an empty value here are\nalmost certainly wrong.\nTODO: Add other useful fields. apiVersion, kind, uid?\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\nTODO: Drop kubebuilder:default
when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896."
fn spec.targetEndpoints.authorization.credentials.withOptional
withOptional(optional)
"Specify whether the Secret or its key must be defined"
obj spec.targetEndpoints.basicAuth
"BasicAuth allow an endpoint to authenticate over basic authentication"
fn spec.targetEndpoints.basicAuth.withPassword_file
withPassword_file(password_file)
"PasswordFile defines path to password file at disk"
obj spec.targetEndpoints.basicAuth.password
"The secret in the service scrape namespace that contains the password\nfor authentication.\nIt must be at them same namespace as CRD"
fn spec.targetEndpoints.basicAuth.password.withKey
withKey(key)
"The key of the secret to select from. Must be a valid secret key."
fn spec.targetEndpoints.basicAuth.password.withName
withName(name)
"Name of the referent.\nThis field is effectively required, but due to backwards compatibility is\nallowed to be empty. Instances of this type with an empty value here are\nalmost certainly wrong.\nTODO: Add other useful fields. apiVersion, kind, uid?\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\nTODO: Drop kubebuilder:default
when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896."
fn spec.targetEndpoints.basicAuth.password.withOptional
withOptional(optional)
"Specify whether the Secret or its key must be defined"
obj spec.targetEndpoints.basicAuth.username
"The secret in the service scrape namespace that contains the username\nfor authentication.\nIt must be at them same namespace as CRD"
fn spec.targetEndpoints.basicAuth.username.withKey
withKey(key)
"The key of the secret to select from. Must be a valid secret key."
fn spec.targetEndpoints.basicAuth.username.withName
withName(name)
"Name of the referent.\nThis field is effectively required, but due to backwards compatibility is\nallowed to be empty. Instances of this type with an empty value here are\nalmost certainly wrong.\nTODO: Add other useful fields. apiVersion, kind, uid?\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\nTODO: Drop kubebuilder:default
when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896."
fn spec.targetEndpoints.basicAuth.username.withOptional
withOptional(optional)
"Specify whether the Secret or its key must be defined"
obj spec.targetEndpoints.bearerTokenSecret
"Secret to mount to read bearer token for scraping targets. The secret\nneeds to be in the same namespace as the service scrape and accessible by\nthe victoria-metrics operator."
fn spec.targetEndpoints.bearerTokenSecret.withKey
withKey(key)
"The key of the secret to select from. Must be a valid secret key."
fn spec.targetEndpoints.bearerTokenSecret.withName
withName(name)
"Name of the referent.\nThis field is effectively required, but due to backwards compatibility is\nallowed to be empty. Instances of this type with an empty value here are\nalmost certainly wrong.\nTODO: Add other useful fields. apiVersion, kind, uid?\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\nTODO: Drop kubebuilder:default
when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896."
fn spec.targetEndpoints.bearerTokenSecret.withOptional
withOptional(optional)
"Specify whether the Secret or its key must be defined"
obj spec.targetEndpoints.metricRelabelConfigs
"MetricRelabelConfigs to apply to samples after scrapping."
fn spec.targetEndpoints.metricRelabelConfigs.withAction
withAction(action)
"Action to perform based on regex matching. Default is 'replace'"
fn spec.targetEndpoints.metricRelabelConfigs.withIf
withIf(If)
"If represents metricsQL match expression (or list of expressions): '{name=~\"foo_.*\"}'"
fn spec.targetEndpoints.metricRelabelConfigs.withLabels
withLabels(labels)
"Labels is used together with Match for action: graphite
"
fn spec.targetEndpoints.metricRelabelConfigs.withLabelsMixin
withLabelsMixin(labels)
"Labels is used together with Match for action: graphite
"
Note: This function appends passed data to existing values
fn spec.targetEndpoints.metricRelabelConfigs.withMatch
withMatch(match)
"Match is used together with Labels for action: graphite
"
fn spec.targetEndpoints.metricRelabelConfigs.withModulus
withModulus(modulus)
"Modulus to take of the hash of the source label values."
fn spec.targetEndpoints.metricRelabelConfigs.withRegex
withRegex(regex)
"Regular expression against which the extracted value is matched. Default is '(.*)'\nvictoriaMetrics supports multiline regex joined with |\nhttps://docs.victoriametrics.com/vmagent/#relabeling-enhancements"
fn spec.targetEndpoints.metricRelabelConfigs.withReplacement
withReplacement(replacement)
"Replacement value against which a regex replace is performed if the\nregular expression matches. Regex capture groups are available. Default is '$1'"
fn spec.targetEndpoints.metricRelabelConfigs.withSeparator
withSeparator(separator)
"Separator placed between concatenated source label values. default is ';'."
fn spec.targetEndpoints.metricRelabelConfigs.withSourceLabels
withSourceLabels(sourceLabels)
"The source labels select values from existing labels. Their content is concatenated\nusing the configured separator and matched against the configured regular expression\nfor the replace, keep, and drop actions."
fn spec.targetEndpoints.metricRelabelConfigs.withSourceLabelsMixin
withSourceLabelsMixin(sourceLabels)
"The source labels select values from existing labels. Their content is concatenated\nusing the configured separator and matched against the configured regular expression\nfor the replace, keep, and drop actions."
Note: This function appends passed data to existing values
fn spec.targetEndpoints.metricRelabelConfigs.withSource_labels
withSource_labels(source_labels)
"UnderScoreSourceLabels - additional form of source labels source_labels\nfor compatibility with original relabel config.\nif set both sourceLabels and source_labels, sourceLabels has priority.\nfor details https://github.com/VictoriaMetrics/operator/issues/131"
fn spec.targetEndpoints.metricRelabelConfigs.withSource_labelsMixin
withSource_labelsMixin(source_labels)
"UnderScoreSourceLabels - additional form of source labels source_labels\nfor compatibility with original relabel config.\nif set both sourceLabels and source_labels, sourceLabels has priority.\nfor details https://github.com/VictoriaMetrics/operator/issues/131"
Note: This function appends passed data to existing values
fn spec.targetEndpoints.metricRelabelConfigs.withTargetLabel
withTargetLabel(targetLabel)
"Label to which the resulting value is written in a replace action.\nIt is mandatory for replace actions. Regex capture groups are available."
fn spec.targetEndpoints.metricRelabelConfigs.withTarget_label
withTarget_label(target_label)
"UnderScoreTargetLabel - additional form of target label - target_label\nfor compatibility with original relabel config.\nif set both targetLabel and target_label, targetLabel has priority.\nfor details https://github.com/VictoriaMetrics/operator/issues/131"
obj spec.targetEndpoints.oauth2
"OAuth2 defines auth configuration"
fn spec.targetEndpoints.oauth2.withClient_secret_file
withClient_secret_file(client_secret_file)
"ClientSecretFile defines path for client secret file."
fn spec.targetEndpoints.oauth2.withEndpoint_params
withEndpoint_params(endpoint_params)
"Parameters to append to the token URL"
fn spec.targetEndpoints.oauth2.withEndpoint_paramsMixin
withEndpoint_paramsMixin(endpoint_params)
"Parameters to append to the token URL"
Note: This function appends passed data to existing values
fn spec.targetEndpoints.oauth2.withScopes
withScopes(scopes)
"OAuth2 scopes used for the token request"
fn spec.targetEndpoints.oauth2.withScopesMixin
withScopesMixin(scopes)
"OAuth2 scopes used for the token request"
Note: This function appends passed data to existing values
fn spec.targetEndpoints.oauth2.withToken_url
withToken_url(token_url)
"The URL to fetch the token from"
obj spec.targetEndpoints.oauth2.client_id
"The secret or configmap containing the OAuth2 client id"
obj spec.targetEndpoints.oauth2.client_id.configMap
"ConfigMap containing data to use for the targets."
fn spec.targetEndpoints.oauth2.client_id.configMap.withKey
withKey(key)
"The key to select."
fn spec.targetEndpoints.oauth2.client_id.configMap.withName
withName(name)
"Name of the referent.\nThis field is effectively required, but due to backwards compatibility is\nallowed to be empty. Instances of this type with an empty value here are\nalmost certainly wrong.\nTODO: Add other useful fields. apiVersion, kind, uid?\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\nTODO: Drop kubebuilder:default
when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896."
fn spec.targetEndpoints.oauth2.client_id.configMap.withOptional
withOptional(optional)
"Specify whether the ConfigMap or its key must be defined"
obj spec.targetEndpoints.oauth2.client_id.secret
"Secret containing data to use for the targets."
fn spec.targetEndpoints.oauth2.client_id.secret.withKey
withKey(key)
"The key of the secret to select from. Must be a valid secret key."
fn spec.targetEndpoints.oauth2.client_id.secret.withName
withName(name)
"Name of the referent.\nThis field is effectively required, but due to backwards compatibility is\nallowed to be empty. Instances of this type with an empty value here are\nalmost certainly wrong.\nTODO: Add other useful fields. apiVersion, kind, uid?\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\nTODO: Drop kubebuilder:default
when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896."
fn spec.targetEndpoints.oauth2.client_id.secret.withOptional
withOptional(optional)
"Specify whether the Secret or its key must be defined"
obj spec.targetEndpoints.oauth2.client_secret
"The secret containing the OAuth2 client secret"
fn spec.targetEndpoints.oauth2.client_secret.withKey
withKey(key)
"The key of the secret to select from. Must be a valid secret key."
fn spec.targetEndpoints.oauth2.client_secret.withName
withName(name)
"Name of the referent.\nThis field is effectively required, but due to backwards compatibility is\nallowed to be empty. Instances of this type with an empty value here are\nalmost certainly wrong.\nTODO: Add other useful fields. apiVersion, kind, uid?\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\nTODO: Drop kubebuilder:default
when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896."
fn spec.targetEndpoints.oauth2.client_secret.withOptional
withOptional(optional)
"Specify whether the Secret or its key must be defined"
obj spec.targetEndpoints.relabelConfigs
"RelabelConfigs to apply to samples during service discovery."
fn spec.targetEndpoints.relabelConfigs.withAction
withAction(action)
"Action to perform based on regex matching. Default is 'replace'"
fn spec.targetEndpoints.relabelConfigs.withIf
withIf(If)
"If represents metricsQL match expression (or list of expressions): '{name=~\"foo_.*\"}'"
fn spec.targetEndpoints.relabelConfigs.withLabels
withLabels(labels)
"Labels is used together with Match for action: graphite
"
fn spec.targetEndpoints.relabelConfigs.withLabelsMixin
withLabelsMixin(labels)
"Labels is used together with Match for action: graphite
"
Note: This function appends passed data to existing values
fn spec.targetEndpoints.relabelConfigs.withMatch
withMatch(match)
"Match is used together with Labels for action: graphite
"
fn spec.targetEndpoints.relabelConfigs.withModulus
withModulus(modulus)
"Modulus to take of the hash of the source label values."
fn spec.targetEndpoints.relabelConfigs.withRegex
withRegex(regex)
"Regular expression against which the extracted value is matched. Default is '(.*)'\nvictoriaMetrics supports multiline regex joined with |\nhttps://docs.victoriametrics.com/vmagent/#relabeling-enhancements"
fn spec.targetEndpoints.relabelConfigs.withReplacement
withReplacement(replacement)
"Replacement value against which a regex replace is performed if the\nregular expression matches. Regex capture groups are available. Default is '$1'"
fn spec.targetEndpoints.relabelConfigs.withSeparator
withSeparator(separator)
"Separator placed between concatenated source label values. default is ';'."
fn spec.targetEndpoints.relabelConfigs.withSourceLabels
withSourceLabels(sourceLabels)
"The source labels select values from existing labels. Their content is concatenated\nusing the configured separator and matched against the configured regular expression\nfor the replace, keep, and drop actions."
fn spec.targetEndpoints.relabelConfigs.withSourceLabelsMixin
withSourceLabelsMixin(sourceLabels)
"The source labels select values from existing labels. Their content is concatenated\nusing the configured separator and matched against the configured regular expression\nfor the replace, keep, and drop actions."
Note: This function appends passed data to existing values
fn spec.targetEndpoints.relabelConfigs.withSource_labels
withSource_labels(source_labels)
"UnderScoreSourceLabels - additional form of source labels source_labels\nfor compatibility with original relabel config.\nif set both sourceLabels and source_labels, sourceLabels has priority.\nfor details https://github.com/VictoriaMetrics/operator/issues/131"
fn spec.targetEndpoints.relabelConfigs.withSource_labelsMixin
withSource_labelsMixin(source_labels)
"UnderScoreSourceLabels - additional form of source labels source_labels\nfor compatibility with original relabel config.\nif set both sourceLabels and source_labels, sourceLabels has priority.\nfor details https://github.com/VictoriaMetrics/operator/issues/131"
Note: This function appends passed data to existing values
fn spec.targetEndpoints.relabelConfigs.withTargetLabel
withTargetLabel(targetLabel)
"Label to which the resulting value is written in a replace action.\nIt is mandatory for replace actions. Regex capture groups are available."
fn spec.targetEndpoints.relabelConfigs.withTarget_label
withTarget_label(target_label)
"UnderScoreTargetLabel - additional form of target label - target_label\nfor compatibility with original relabel config.\nif set both targetLabel and target_label, targetLabel has priority.\nfor details https://github.com/VictoriaMetrics/operator/issues/131"
obj spec.targetEndpoints.tlsConfig
"TLSConfig configuration to use when scraping the endpoint"
fn spec.targetEndpoints.tlsConfig.withCaFile
withCaFile(caFile)
"Path to the CA cert in the container to use for the targets."
fn spec.targetEndpoints.tlsConfig.withCertFile
withCertFile(certFile)
"Path to the client cert file in the container for the targets."
fn spec.targetEndpoints.tlsConfig.withInsecureSkipVerify
withInsecureSkipVerify(insecureSkipVerify)
"Disable target certificate validation."
fn spec.targetEndpoints.tlsConfig.withKeyFile
withKeyFile(keyFile)
"Path to the client key file in the container for the targets."
fn spec.targetEndpoints.tlsConfig.withServerName
withServerName(serverName)
"Used to verify the hostname for the targets."
obj spec.targetEndpoints.tlsConfig.ca
"Stuct containing the CA cert to use for the targets."
obj spec.targetEndpoints.tlsConfig.ca.configMap
"ConfigMap containing data to use for the targets."
fn spec.targetEndpoints.tlsConfig.ca.configMap.withKey
withKey(key)
"The key to select."
fn spec.targetEndpoints.tlsConfig.ca.configMap.withName
withName(name)
"Name of the referent.\nThis field is effectively required, but due to backwards compatibility is\nallowed to be empty. Instances of this type with an empty value here are\nalmost certainly wrong.\nTODO: Add other useful fields. apiVersion, kind, uid?\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\nTODO: Drop kubebuilder:default
when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896."
fn spec.targetEndpoints.tlsConfig.ca.configMap.withOptional
withOptional(optional)
"Specify whether the ConfigMap or its key must be defined"
obj spec.targetEndpoints.tlsConfig.ca.secret
"Secret containing data to use for the targets."
fn spec.targetEndpoints.tlsConfig.ca.secret.withKey
withKey(key)
"The key of the secret to select from. Must be a valid secret key."
fn spec.targetEndpoints.tlsConfig.ca.secret.withName
withName(name)
"Name of the referent.\nThis field is effectively required, but due to backwards compatibility is\nallowed to be empty. Instances of this type with an empty value here are\nalmost certainly wrong.\nTODO: Add other useful fields. apiVersion, kind, uid?\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\nTODO: Drop kubebuilder:default
when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896."
fn spec.targetEndpoints.tlsConfig.ca.secret.withOptional
withOptional(optional)
"Specify whether the Secret or its key must be defined"
obj spec.targetEndpoints.tlsConfig.cert
"Struct containing the client cert file for the targets."
obj spec.targetEndpoints.tlsConfig.cert.configMap
"ConfigMap containing data to use for the targets."
fn spec.targetEndpoints.tlsConfig.cert.configMap.withKey
withKey(key)
"The key to select."
fn spec.targetEndpoints.tlsConfig.cert.configMap.withName
withName(name)
"Name of the referent.\nThis field is effectively required, but due to backwards compatibility is\nallowed to be empty. Instances of this type with an empty value here are\nalmost certainly wrong.\nTODO: Add other useful fields. apiVersion, kind, uid?\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\nTODO: Drop kubebuilder:default
when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896."
fn spec.targetEndpoints.tlsConfig.cert.configMap.withOptional
withOptional(optional)
"Specify whether the ConfigMap or its key must be defined"
obj spec.targetEndpoints.tlsConfig.cert.secret
"Secret containing data to use for the targets."
fn spec.targetEndpoints.tlsConfig.cert.secret.withKey
withKey(key)
"The key of the secret to select from. Must be a valid secret key."
fn spec.targetEndpoints.tlsConfig.cert.secret.withName
withName(name)
"Name of the referent.\nThis field is effectively required, but due to backwards compatibility is\nallowed to be empty. Instances of this type with an empty value here are\nalmost certainly wrong.\nTODO: Add other useful fields. apiVersion, kind, uid?\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\nTODO: Drop kubebuilder:default
when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896."
fn spec.targetEndpoints.tlsConfig.cert.secret.withOptional
withOptional(optional)
"Specify whether the Secret or its key must be defined"
obj spec.targetEndpoints.tlsConfig.keySecret
"Secret containing the client key file for the targets."
fn spec.targetEndpoints.tlsConfig.keySecret.withKey
withKey(key)
"The key of the secret to select from. Must be a valid secret key."
fn spec.targetEndpoints.tlsConfig.keySecret.withName
withName(name)
"Name of the referent.\nThis field is effectively required, but due to backwards compatibility is\nallowed to be empty. Instances of this type with an empty value here are\nalmost certainly wrong.\nTODO: Add other useful fields. apiVersion, kind, uid?\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\nTODO: Drop kubebuilder:default
when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896."
fn spec.targetEndpoints.tlsConfig.keySecret.withOptional
withOptional(optional)
"Specify whether the Secret or its key must be defined"
obj spec.targetEndpoints.vm_scrape_params
"VMScrapeParams defines VictoriaMetrics specific scrape parameters"
fn spec.targetEndpoints.vm_scrape_params.withDisable_compression
withDisable_compression(disable_compression)
fn spec.targetEndpoints.vm_scrape_params.withDisable_keep_alive
withDisable_keep_alive(disable_keep_alive)
"disable_keepalive allows disabling HTTP keep-alive when scraping targets.\nBy default, HTTP keep-alive is enabled, so TCP connections to scrape targets\ncould be re-used.\nSee https://docs.victoriametrics.com/vmagent.html#scrape_config-enhancements"
fn spec.targetEndpoints.vm_scrape_params.withHeaders
withHeaders(headers)
"Headers allows sending custom headers to scrape targets\nmust be in of semicolon separated header with it's value\neg:\nheaderName: headerValue\nvmagent supports since 1.79.0 version"
fn spec.targetEndpoints.vm_scrape_params.withHeadersMixin
withHeadersMixin(headers)
"Headers allows sending custom headers to scrape targets\nmust be in of semicolon separated header with it's value\neg:\nheaderName: headerValue\nvmagent supports since 1.79.0 version"
Note: This function appends passed data to existing values
fn spec.targetEndpoints.vm_scrape_params.withMetric_relabel_debug
withMetric_relabel_debug(metric_relabel_debug)
"deprecated since v1.85, will be removed in next release"
fn spec.targetEndpoints.vm_scrape_params.withNo_stale_markers
withNo_stale_markers(no_stale_markers)
fn spec.targetEndpoints.vm_scrape_params.withRelabel_debug
withRelabel_debug(relabel_debug)
"deprecated since v1.85, will be removed in next release"
fn spec.targetEndpoints.vm_scrape_params.withScrape_align_interval
withScrape_align_interval(scrape_align_interval)
fn spec.targetEndpoints.vm_scrape_params.withScrape_offset
withScrape_offset(scrape_offset)
fn spec.targetEndpoints.vm_scrape_params.withStream_parse
withStream_parse(stream_parse)
obj spec.targetEndpoints.vm_scrape_params.proxy_client_config
"ProxyClientConfig configures proxy auth settings for scraping\nSee feature description https://docs.victoriametrics.com/vmagent.html#scraping-targets-via-a-proxy"
fn spec.targetEndpoints.vm_scrape_params.proxy_client_config.withBearer_token_file
withBearer_token_file(bearer_token_file)
obj spec.targetEndpoints.vm_scrape_params.proxy_client_config.basic_auth
"BasicAuth allow an endpoint to authenticate over basic authentication"
fn spec.targetEndpoints.vm_scrape_params.proxy_client_config.basic_auth.withPassword_file
withPassword_file(password_file)
"PasswordFile defines path to password file at disk"
obj spec.targetEndpoints.vm_scrape_params.proxy_client_config.basic_auth.password
"The secret in the service scrape namespace that contains the password\nfor authentication.\nIt must be at them same namespace as CRD"
fn spec.targetEndpoints.vm_scrape_params.proxy_client_config.basic_auth.password.withKey
withKey(key)
"The key of the secret to select from. Must be a valid secret key."
fn spec.targetEndpoints.vm_scrape_params.proxy_client_config.basic_auth.password.withName
withName(name)
"Name of the referent.\nThis field is effectively required, but due to backwards compatibility is\nallowed to be empty. Instances of this type with an empty value here are\nalmost certainly wrong.\nTODO: Add other useful fields. apiVersion, kind, uid?\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\nTODO: Drop kubebuilder:default
when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896."
fn spec.targetEndpoints.vm_scrape_params.proxy_client_config.basic_auth.password.withOptional
withOptional(optional)
"Specify whether the Secret or its key must be defined"
obj spec.targetEndpoints.vm_scrape_params.proxy_client_config.basic_auth.username
"The secret in the service scrape namespace that contains the username\nfor authentication.\nIt must be at them same namespace as CRD"
fn spec.targetEndpoints.vm_scrape_params.proxy_client_config.basic_auth.username.withKey
withKey(key)
"The key of the secret to select from. Must be a valid secret key."
fn spec.targetEndpoints.vm_scrape_params.proxy_client_config.basic_auth.username.withName
withName(name)
"Name of the referent.\nThis field is effectively required, but due to backwards compatibility is\nallowed to be empty. Instances of this type with an empty value here are\nalmost certainly wrong.\nTODO: Add other useful fields. apiVersion, kind, uid?\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\nTODO: Drop kubebuilder:default
when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896."
fn spec.targetEndpoints.vm_scrape_params.proxy_client_config.basic_auth.username.withOptional
withOptional(optional)
"Specify whether the Secret or its key must be defined"
obj spec.targetEndpoints.vm_scrape_params.proxy_client_config.bearer_token
"SecretKeySelector selects a key of a Secret."
fn spec.targetEndpoints.vm_scrape_params.proxy_client_config.bearer_token.withKey
withKey(key)
"The key of the secret to select from. Must be a valid secret key."
fn spec.targetEndpoints.vm_scrape_params.proxy_client_config.bearer_token.withName
withName(name)
"Name of the referent.\nThis field is effectively required, but due to backwards compatibility is\nallowed to be empty. Instances of this type with an empty value here are\nalmost certainly wrong.\nTODO: Add other useful fields. apiVersion, kind, uid?\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\nTODO: Drop kubebuilder:default
when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896."
fn spec.targetEndpoints.vm_scrape_params.proxy_client_config.bearer_token.withOptional
withOptional(optional)
"Specify whether the Secret or its key must be defined"
obj spec.targetEndpoints.vm_scrape_params.proxy_client_config.tls_config
"TLSConfig specifies TLSConfig configuration parameters."
fn spec.targetEndpoints.vm_scrape_params.proxy_client_config.tls_config.withCaFile
withCaFile(caFile)
"Path to the CA cert in the container to use for the targets."
fn spec.targetEndpoints.vm_scrape_params.proxy_client_config.tls_config.withCertFile
withCertFile(certFile)
"Path to the client cert file in the container for the targets."
fn spec.targetEndpoints.vm_scrape_params.proxy_client_config.tls_config.withInsecureSkipVerify
withInsecureSkipVerify(insecureSkipVerify)
"Disable target certificate validation."
fn spec.targetEndpoints.vm_scrape_params.proxy_client_config.tls_config.withKeyFile
withKeyFile(keyFile)
"Path to the client key file in the container for the targets."
fn spec.targetEndpoints.vm_scrape_params.proxy_client_config.tls_config.withServerName
withServerName(serverName)
"Used to verify the hostname for the targets."
obj spec.targetEndpoints.vm_scrape_params.proxy_client_config.tls_config.ca
"Stuct containing the CA cert to use for the targets."
obj spec.targetEndpoints.vm_scrape_params.proxy_client_config.tls_config.ca.configMap
"ConfigMap containing data to use for the targets."
fn spec.targetEndpoints.vm_scrape_params.proxy_client_config.tls_config.ca.configMap.withKey
withKey(key)
"The key to select."
fn spec.targetEndpoints.vm_scrape_params.proxy_client_config.tls_config.ca.configMap.withName
withName(name)
"Name of the referent.\nThis field is effectively required, but due to backwards compatibility is\nallowed to be empty. Instances of this type with an empty value here are\nalmost certainly wrong.\nTODO: Add other useful fields. apiVersion, kind, uid?\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\nTODO: Drop kubebuilder:default
when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896."
fn spec.targetEndpoints.vm_scrape_params.proxy_client_config.tls_config.ca.configMap.withOptional
withOptional(optional)
"Specify whether the ConfigMap or its key must be defined"
obj spec.targetEndpoints.vm_scrape_params.proxy_client_config.tls_config.ca.secret
"Secret containing data to use for the targets."
fn spec.targetEndpoints.vm_scrape_params.proxy_client_config.tls_config.ca.secret.withKey
withKey(key)
"The key of the secret to select from. Must be a valid secret key."
fn spec.targetEndpoints.vm_scrape_params.proxy_client_config.tls_config.ca.secret.withName
withName(name)
"Name of the referent.\nThis field is effectively required, but due to backwards compatibility is\nallowed to be empty. Instances of this type with an empty value here are\nalmost certainly wrong.\nTODO: Add other useful fields. apiVersion, kind, uid?\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\nTODO: Drop kubebuilder:default
when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896."
fn spec.targetEndpoints.vm_scrape_params.proxy_client_config.tls_config.ca.secret.withOptional
withOptional(optional)
"Specify whether the Secret or its key must be defined"
obj spec.targetEndpoints.vm_scrape_params.proxy_client_config.tls_config.cert
"Struct containing the client cert file for the targets."
obj spec.targetEndpoints.vm_scrape_params.proxy_client_config.tls_config.cert.configMap
"ConfigMap containing data to use for the targets."
fn spec.targetEndpoints.vm_scrape_params.proxy_client_config.tls_config.cert.configMap.withKey
withKey(key)
"The key to select."
fn spec.targetEndpoints.vm_scrape_params.proxy_client_config.tls_config.cert.configMap.withName
withName(name)
"Name of the referent.\nThis field is effectively required, but due to backwards compatibility is\nallowed to be empty. Instances of this type with an empty value here are\nalmost certainly wrong.\nTODO: Add other useful fields. apiVersion, kind, uid?\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\nTODO: Drop kubebuilder:default
when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896."
fn spec.targetEndpoints.vm_scrape_params.proxy_client_config.tls_config.cert.configMap.withOptional
withOptional(optional)
"Specify whether the ConfigMap or its key must be defined"
obj spec.targetEndpoints.vm_scrape_params.proxy_client_config.tls_config.cert.secret
"Secret containing data to use for the targets."
fn spec.targetEndpoints.vm_scrape_params.proxy_client_config.tls_config.cert.secret.withKey
withKey(key)
"The key of the secret to select from. Must be a valid secret key."
fn spec.targetEndpoints.vm_scrape_params.proxy_client_config.tls_config.cert.secret.withName
withName(name)
"Name of the referent.\nThis field is effectively required, but due to backwards compatibility is\nallowed to be empty. Instances of this type with an empty value here are\nalmost certainly wrong.\nTODO: Add other useful fields. apiVersion, kind, uid?\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\nTODO: Drop kubebuilder:default
when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896."
fn spec.targetEndpoints.vm_scrape_params.proxy_client_config.tls_config.cert.secret.withOptional
withOptional(optional)
"Specify whether the Secret or its key must be defined"
obj spec.targetEndpoints.vm_scrape_params.proxy_client_config.tls_config.keySecret
"Secret containing the client key file for the targets."
fn spec.targetEndpoints.vm_scrape_params.proxy_client_config.tls_config.keySecret.withKey
withKey(key)
"The key of the secret to select from. Must be a valid secret key."
fn spec.targetEndpoints.vm_scrape_params.proxy_client_config.tls_config.keySecret.withName
withName(name)
"Name of the referent.\nThis field is effectively required, but due to backwards compatibility is\nallowed to be empty. Instances of this type with an empty value here are\nalmost certainly wrong.\nTODO: Add other useful fields. apiVersion, kind, uid?\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\nTODO: Drop kubebuilder:default
when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896."
fn spec.targetEndpoints.vm_scrape_params.proxy_client_config.tls_config.keySecret.withOptional
withOptional(optional)
"Specify whether the Secret or its key must be defined"