Skip to content

Support for RemoteWrite CRD #6508

@superbrothers

Description

@superbrothers

Component(s)

Prometheus

What is missing? Please describe.

I would like to allow users to add arbitrary RemoteWrite/Read configs to Prometheus.

Scenario: cluster-admin provides a managed Prometheus server to users using Prometheus CR. This Prometheus CR can only be modified by cluster-admin. The user adds config to the Prometheus server using a RemoteWrite CR to forward metrics to an external managed Prometheus service.

apiVersion: monitoring.coreos.com/v1alpha1
kind: RemoteWrite
metadata:
  name: example
  namespace: default
spec:
  url: xxxx/api/v1/remote_write
  authorization:
    name: cred
    key: token
  writeRelabelConfigs:
  - ...
apiVersion: monitoring.coreos.com/v1alpha1
kind: RemoteRead
metadata:
  name: example
  namespace: default
spec:
  url: xxxx/api/v1/read
  sigv4:
    region: ap-northeast-1
apiVersion: monitoring.coreos.com/v1
kind: Prometheus
metadata:
  name: prometheus
  namespace: monitoring
spec:
  RemoteWriteNamespaceSelector: {}
  RemoteWriteSelector: {}
  RemoteReadNamespaceSelector: {}
  RemoteReadSelector: {}

Since RemoteWrite/Read CR are namespaced resources, it may be better to limit the target metrics to the namespace in which the object was created.

Describe alternatives you've considered.

None.

Environment Information.

Environment

Kubernetes Version:
Prometheus-Operator Version:

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions