Path: blob/main/production/operator/crds/monitoring.grafana.com_metricsinstances.yaml
4096 views
---1apiVersion: apiextensions.k8s.io/v12kind: CustomResourceDefinition3metadata:4annotations:5controller-gen.kubebuilder.io/version: v0.9.26creationTimestamp: null7name: metricsinstances.monitoring.grafana.com8spec:9group: monitoring.grafana.com10names:11categories:12- agent-operator13kind: MetricsInstance14listKind: MetricsInstanceList15plural: metricsinstances16singular: metricsinstance17scope: Namespaced18versions:19- name: v1alpha120schema:21openAPIV3Schema:22description: MetricsInstance controls an individual Metrics instance within23a Grafana Agent deployment.24properties:25apiVersion:26description: 'APIVersion defines the versioned schema of this representation27of an object. Servers should convert recognized schemas to the latest28internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'29type: string30kind:31description: 'Kind is a string value representing the REST resource this32object represents. Servers may infer this from the endpoint the client33submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'34type: string35metadata:36type: object37spec:38description: Spec holds the specification of the desired behavior for39the Metrics instance.40properties:41additionalScrapeConfigs:42description: 'AdditionalScrapeConfigs lets you specify a key of a43Secret containing additional Grafana Agent Prometheus scrape configurations.44The specified scrape configurations are appended to the configurations45generated by Grafana Agent Operator. Specified job configurations46must have the form specified in the official Prometheus documentation:47https://prometheus.io/docs/prometheus/latest/configuration/configuration/#scrape_config.48As scrape configs are appended, you must make sure the configuration49is still valid. Note that it''s possible that this feature will50break future upgrades of Grafana Agent. Review both Grafana Agent51and Prometheus release notes to ensure that no incompatible scrape52configs will break Grafana Agent after the upgrade.'53properties:54key:55description: The key of the secret to select from. Must be a56valid secret key.57type: string58name:59description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names60TODO: Add other useful fields. apiVersion, kind, uid?'61type: string62optional:63description: Specify whether the Secret or its key must be defined64type: boolean65required:66- key67type: object68x-kubernetes-map-type: atomic69maxWALTime:70description: MaxWALTime is the maximum amount of time that series71and samples can exist in the WAL before being forcibly deleted.72type: string73minWALTime:74description: MinWALTime is the minimum amount of time that series75and samples can exist in the WAL before being considered for deletion.76type: string77podMonitorNamespaceSelector:78description: PodMonitorNamespaceSelector are the set of labels to79determine which namespaces to watch for PodMonitor discovery. If80nil, it only checks its own namespace.81properties:82matchExpressions:83description: matchExpressions is a list of label selector requirements.84The requirements are ANDed.85items:86description: A label selector requirement is a selector that87contains values, a key, and an operator that relates the key88and values.89properties:90key:91description: key is the label key that the selector applies92to.93type: string94operator:95description: operator represents a key's relationship to96a set of values. Valid operators are In, NotIn, Exists97and DoesNotExist.98type: string99values:100description: values is an array of string values. If the101operator is In or NotIn, the values array must be non-empty.102If the operator is Exists or DoesNotExist, the values103array must be empty. This array is replaced during a strategic104merge patch.105items:106type: string107type: array108required:109- key110- operator111type: object112type: array113matchLabels:114additionalProperties:115type: string116description: matchLabels is a map of {key,value} pairs. A single117{key,value} in the matchLabels map is equivalent to an element118of matchExpressions, whose key field is "key", the operator119is "In", and the values array contains only "value". The requirements120are ANDed.121type: object122type: object123x-kubernetes-map-type: atomic124podMonitorSelector:125description: PodMonitorSelector determines which PodMonitors to selected126for target discovery. Experimental.127properties:128matchExpressions:129description: matchExpressions is a list of label selector requirements.130The requirements are ANDed.131items:132description: A label selector requirement is a selector that133contains values, a key, and an operator that relates the key134and values.135properties:136key:137description: key is the label key that the selector applies138to.139type: string140operator:141description: operator represents a key's relationship to142a set of values. Valid operators are In, NotIn, Exists143and DoesNotExist.144type: string145values:146description: values is an array of string values. If the147operator is In or NotIn, the values array must be non-empty.148If the operator is Exists or DoesNotExist, the values149array must be empty. This array is replaced during a strategic150merge patch.151items:152type: string153type: array154required:155- key156- operator157type: object158type: array159matchLabels:160additionalProperties:161type: string162description: matchLabels is a map of {key,value} pairs. A single163{key,value} in the matchLabels map is equivalent to an element164of matchExpressions, whose key field is "key", the operator165is "In", and the values array contains only "value". The requirements166are ANDed.167type: object168type: object169x-kubernetes-map-type: atomic170probeNamespaceSelector:171description: ProbeNamespaceSelector is the set of labels that determines172which namespaces to watch for Probe discovery. If nil, it only checks173own namespace.174properties:175matchExpressions:176description: matchExpressions is a list of label selector requirements.177The requirements are ANDed.178items:179description: A label selector requirement is a selector that180contains values, a key, and an operator that relates the key181and values.182properties:183key:184description: key is the label key that the selector applies185to.186type: string187operator:188description: operator represents a key's relationship to189a set of values. Valid operators are In, NotIn, Exists190and DoesNotExist.191type: string192values:193description: values is an array of string values. If the194operator is In or NotIn, the values array must be non-empty.195If the operator is Exists or DoesNotExist, the values196array must be empty. This array is replaced during a strategic197merge patch.198items:199type: string200type: array201required:202- key203- operator204type: object205type: array206matchLabels:207additionalProperties:208type: string209description: matchLabels is a map of {key,value} pairs. A single210{key,value} in the matchLabels map is equivalent to an element211of matchExpressions, whose key field is "key", the operator212is "In", and the values array contains only "value". The requirements213are ANDed.214type: object215type: object216x-kubernetes-map-type: atomic217probeSelector:218description: ProbeSelector determines which Probes to select for target219discovery.220properties:221matchExpressions:222description: matchExpressions is a list of label selector requirements.223The requirements are ANDed.224items:225description: A label selector requirement is a selector that226contains values, a key, and an operator that relates the key227and values.228properties:229key:230description: key is the label key that the selector applies231to.232type: string233operator:234description: operator represents a key's relationship to235a set of values. Valid operators are In, NotIn, Exists236and DoesNotExist.237type: string238values:239description: values is an array of string values. If the240operator is In or NotIn, the values array must be non-empty.241If the operator is Exists or DoesNotExist, the values242array must be empty. This array is replaced during a strategic243merge patch.244items:245type: string246type: array247required:248- key249- operator250type: object251type: array252matchLabels:253additionalProperties:254type: string255description: matchLabels is a map of {key,value} pairs. A single256{key,value} in the matchLabels map is equivalent to an element257of matchExpressions, whose key field is "key", the operator258is "In", and the values array contains only "value". The requirements259are ANDed.260type: object261type: object262x-kubernetes-map-type: atomic263remoteFlushDeadline:264description: RemoteFlushDeadline is the deadline for flushing data265when an instance shuts down.266type: string267remoteWrite:268description: RemoteWrite controls remote_write settings for this instance.269items:270description: RemoteWriteSpec defines the remote_write configuration271for Prometheus.272properties:273basicAuth:274description: BasicAuth for the URL.275properties:276password:277description: The secret in the service monitor namespace278that contains the password for authentication.279properties:280key:281description: The key of the secret to select from. Must282be a valid secret key.283type: string284name:285description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names286TODO: Add other useful fields. apiVersion, kind, uid?'287type: string288optional:289description: Specify whether the Secret or its key must290be defined291type: boolean292required:293- key294type: object295x-kubernetes-map-type: atomic296username:297description: The secret in the service monitor namespace298that contains the username for authentication.299properties:300key:301description: The key of the secret to select from. Must302be a valid secret key.303type: string304name:305description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names306TODO: Add other useful fields. apiVersion, kind, uid?'307type: string308optional:309description: Specify whether the Secret or its key must310be defined311type: boolean312required:313- key314type: object315x-kubernetes-map-type: atomic316type: object317bearerToken:318description: BearerToken used for remote_write.319type: string320bearerTokenFile:321description: BearerTokenFile used to read bearer token.322type: string323headers:324additionalProperties:325type: string326description: Headers is a set of custom HTTP headers to be sent327along with each remote_write request. Be aware that any headers328set by Grafana Agent itself can't be overwritten.329type: object330metadataConfig:331description: MetadataConfig configures the sending of series332metadata to remote storage.333properties:334send:335description: Send enables metric metadata to be sent to336remote storage.337type: boolean338sendInterval:339description: SendInterval controls how frequently metric340metadata is sent to remote storage.341type: string342type: object343name:344description: Name of the remote_write queue. Must be unique345if specified. The name is used in metrics and logging in order346to differentiate queues.347type: string348oauth2:349description: Oauth2 for URL350properties:351clientId:352description: The secret or configmap containing the OAuth2353client id354properties:355configMap:356description: ConfigMap containing data to use for the357targets.358properties:359key:360description: The key to select.361type: string362name:363description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names364TODO: Add other useful fields. apiVersion, kind,365uid?'366type: string367optional:368description: Specify whether the ConfigMap or its369key must be defined370type: boolean371required:372- key373type: object374x-kubernetes-map-type: atomic375secret:376description: Secret containing data to use for the targets.377properties:378key:379description: The key of the secret to select from. Must380be a valid secret key.381type: string382name:383description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names384TODO: Add other useful fields. apiVersion, kind,385uid?'386type: string387optional:388description: Specify whether the Secret or its key389must be defined390type: boolean391required:392- key393type: object394x-kubernetes-map-type: atomic395type: object396clientSecret:397description: The secret containing the OAuth2 client secret398properties:399key:400description: The key of the secret to select from. Must401be a valid secret key.402type: string403name:404description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names405TODO: Add other useful fields. apiVersion, kind, uid?'406type: string407optional:408description: Specify whether the Secret or its key must409be defined410type: boolean411required:412- key413type: object414x-kubernetes-map-type: atomic415endpointParams:416additionalProperties:417type: string418description: Parameters to append to the token URL419type: object420scopes:421description: OAuth2 scopes used for the token request422items:423type: string424type: array425tokenUrl:426description: The URL to fetch the token from427minLength: 1428type: string429required:430- clientId431- clientSecret432- tokenUrl433type: object434proxyUrl:435description: ProxyURL to proxy requests through. Optional.436type: string437queueConfig:438description: QueueConfig allows tuning of the remote_write queue439parameters.440properties:441batchSendDeadline:442description: BatchSendDeadline is the maximum time a sample443will wait in the buffer.444type: string445capacity:446description: Capacity is the number of samples to buffer447per shard before samples start being dropped.448type: integer449maxBackoff:450description: MaxBackoff is the maximum retry delay.451type: string452maxRetries:453description: MaxRetries is the maximum number of times to454retry a batch on recoverable errors.455type: integer456maxSamplesPerSend:457description: MaxSamplesPerSend is the maximum number of458samples per send.459type: integer460maxShards:461description: MaxShards is the maximum number of shards,462i.e., the amount of concurrency.463type: integer464minBackoff:465description: MinBackoff is the initial retry delay. MinBackoff466is doubled for every retry.467type: string468minShards:469description: MinShards is the minimum number of shards,470i.e., the amount of concurrency.471type: integer472retryOnRateLimit:473description: RetryOnRateLimit retries requests when encountering474rate limits.475type: boolean476type: object477remoteTimeout:478description: RemoteTimeout is the timeout for requests to the479remote_write endpoint.480type: string481sigv4:482description: SigV4 configures SigV4-based authentication to483the remote_write endpoint. SigV4-based authentication is used484if SigV4 is defined, even with an empty object.485properties:486accessKey:487description: AccessKey holds the secret of the AWS API access488key to use for signing. If not provided, the environment489variable AWS_ACCESS_KEY_ID is used.490properties:491key:492description: The key of the secret to select from. Must493be a valid secret key.494type: string495name:496description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names497TODO: Add other useful fields. apiVersion, kind, uid?'498type: string499optional:500description: Specify whether the Secret or its key must501be defined502type: boolean503required:504- key505type: object506x-kubernetes-map-type: atomic507profile:508description: Profile is the named AWS profile to use for509authentication.510type: string511region:512description: Region of the AWS endpoint. If blank, the region513from the default credentials chain is used.514type: string515roleARN:516description: RoleARN is the AWS Role ARN to use for authentication,517as an alternative for using the AWS API keys.518type: string519secretKey:520description: SecretKey of the AWS API to use for signing.521If blank, the environment variable AWS_SECRET_ACCESS_KEY522is used.523properties:524key:525description: The key of the secret to select from. Must526be a valid secret key.527type: string528name:529description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names530TODO: Add other useful fields. apiVersion, kind, uid?'531type: string532optional:533description: Specify whether the Secret or its key must534be defined535type: boolean536required:537- key538type: object539x-kubernetes-map-type: atomic540type: object541tlsConfig:542description: TLSConfig to use for remote_write.543properties:544ca:545description: Certificate authority used when verifying server546certificates.547properties:548configMap:549description: ConfigMap containing data to use for the550targets.551properties:552key:553description: The key to select.554type: string555name:556description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names557TODO: Add other useful fields. apiVersion, kind,558uid?'559type: string560optional:561description: Specify whether the ConfigMap or its562key must be defined563type: boolean564required:565- key566type: object567x-kubernetes-map-type: atomic568secret:569description: Secret containing data to use for the targets.570properties:571key:572description: The key of the secret to select from. Must573be a valid secret key.574type: string575name:576description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names577TODO: Add other useful fields. apiVersion, kind,578uid?'579type: string580optional:581description: Specify whether the Secret or its key582must be defined583type: boolean584required:585- key586type: object587x-kubernetes-map-type: atomic588type: object589caFile:590description: Path to the CA cert in the Prometheus container591to use for the targets.592type: string593cert:594description: Client certificate to present when doing client-authentication.595properties:596configMap:597description: ConfigMap containing data to use for the598targets.599properties:600key:601description: The key to select.602type: string603name:604description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names605TODO: Add other useful fields. apiVersion, kind,606uid?'607type: string608optional:609description: Specify whether the ConfigMap or its610key must be defined611type: boolean612required:613- key614type: object615x-kubernetes-map-type: atomic616secret:617description: Secret containing data to use for the targets.618properties:619key:620description: The key of the secret to select from. Must621be a valid secret key.622type: string623name:624description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names625TODO: Add other useful fields. apiVersion, kind,626uid?'627type: string628optional:629description: Specify whether the Secret or its key630must be defined631type: boolean632required:633- key634type: object635x-kubernetes-map-type: atomic636type: object637certFile:638description: Path to the client cert file in the Prometheus639container for the targets.640type: string641insecureSkipVerify:642description: Disable target certificate validation.643type: boolean644keyFile:645description: Path to the client key file in the Prometheus646container for the targets.647type: string648keySecret:649description: Secret containing the client key file for the650targets.651properties:652key:653description: The key of the secret to select from. Must654be a valid secret key.655type: string656name:657description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names658TODO: Add other useful fields. apiVersion, kind, uid?'659type: string660optional:661description: Specify whether the Secret or its key must662be defined663type: boolean664required:665- key666type: object667x-kubernetes-map-type: atomic668serverName:669description: Used to verify the hostname for the targets.670type: string671type: object672url:673description: URL of the endpoint to send samples to.674type: string675writeRelabelConfigs:676description: WriteRelabelConfigs holds relabel_configs to relabel677samples before they are sent to the remote_write endpoint.678items:679description: 'RelabelConfig allows dynamic rewriting of the680label set, being applied to samples before ingestion. It681defines `<metric_relabel_configs>`-section of Prometheus682configuration. More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#metric_relabel_configs'683properties:684action:685default: replace686description: Action to perform based on regex matching.687Default is 'replace'. uppercase and lowercase actions688require Prometheus >= 2.36.689enum:690- replace691- Replace692- keep693- Keep694- drop695- Drop696- hashmod697- HashMod698- labelmap699- LabelMap700- labeldrop701- LabelDrop702- labelkeep703- LabelKeep704- lowercase705- Lowercase706- uppercase707- Uppercase708type: string709modulus:710description: Modulus to take of the hash of the source711label values.712format: int64713type: integer714regex:715description: Regular expression against which the extracted716value is matched. Default is '(.*)'717type: string718replacement:719description: Replacement value against which a regex replace720is performed if the regular expression matches. Regex721capture groups are available. Default is '$1'722type: string723separator:724description: Separator placed between concatenated source725label values. default is ';'.726type: string727sourceLabels:728description: The source labels select values from existing729labels. Their content is concatenated using the configured730separator and matched against the configured regular731expression for the replace, keep, and drop actions.732items:733description: LabelName is a valid Prometheus label name734which may only contain ASCII letters, numbers, as735well as underscores.736pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$737type: string738type: array739targetLabel:740description: Label to which the resulting value is written741in a replace action. It is mandatory for replace actions.742Regex capture groups are available.743type: string744type: object745type: array746required:747- url748type: object749type: array750serviceMonitorNamespaceSelector:751description: ServiceMonitorNamespaceSelector is the set of labels752that determine which namespaces to watch for ServiceMonitor discovery.753If nil, it only checks its own namespace.754properties:755matchExpressions:756description: matchExpressions is a list of label selector requirements.757The requirements are ANDed.758items:759description: A label selector requirement is a selector that760contains values, a key, and an operator that relates the key761and values.762properties:763key:764description: key is the label key that the selector applies765to.766type: string767operator:768description: operator represents a key's relationship to769a set of values. Valid operators are In, NotIn, Exists770and DoesNotExist.771type: string772values:773description: values is an array of string values. If the774operator is In or NotIn, the values array must be non-empty.775If the operator is Exists or DoesNotExist, the values776array must be empty. This array is replaced during a strategic777merge patch.778items:779type: string780type: array781required:782- key783- operator784type: object785type: array786matchLabels:787additionalProperties:788type: string789description: matchLabels is a map of {key,value} pairs. A single790{key,value} in the matchLabels map is equivalent to an element791of matchExpressions, whose key field is "key", the operator792is "In", and the values array contains only "value". The requirements793are ANDed.794type: object795type: object796x-kubernetes-map-type: atomic797serviceMonitorSelector:798description: ServiceMonitorSelector determines which ServiceMonitors799to select for target discovery.800properties:801matchExpressions:802description: matchExpressions is a list of label selector requirements.803The requirements are ANDed.804items:805description: A label selector requirement is a selector that806contains values, a key, and an operator that relates the key807and values.808properties:809key:810description: key is the label key that the selector applies811to.812type: string813operator:814description: operator represents a key's relationship to815a set of values. Valid operators are In, NotIn, Exists816and DoesNotExist.817type: string818values:819description: values is an array of string values. If the820operator is In or NotIn, the values array must be non-empty.821If the operator is Exists or DoesNotExist, the values822array must be empty. This array is replaced during a strategic823merge patch.824items:825type: string826type: array827required:828- key829- operator830type: object831type: array832matchLabels:833additionalProperties:834type: string835description: matchLabels is a map of {key,value} pairs. A single836{key,value} in the matchLabels map is equivalent to an element837of matchExpressions, whose key field is "key", the operator838is "In", and the values array contains only "value". The requirements839are ANDed.840type: object841type: object842x-kubernetes-map-type: atomic843walTruncateFrequency:844description: WALTruncateFrequency specifies how frequently to run845the WAL truncation process. Higher values cause the WAL to increase846and for old series to stay in the WAL longer, but reduces the chance847of data loss when remote_write fails for longer than the given frequency.848type: string849writeStaleOnShutdown:850description: WriteStaleOnShutdown writes staleness markers on shutdown851for all series.852type: boolean853type: object854type: object855served: true856storage: true857858859