Skip to content
This repository was archived by the owner on Jul 28, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ CROSS_BUILD ?= false
# run make BUILD_IN_CONTAINER=false <target>, or you can set BUILD_IN_CONTAINER=true
# as an environment variable.
BUILD_IN_CONTAINER ?= true
BUILD_IMAGE_VERSION := 0.11.0
BUILD_IMAGE_VERSION := 0.12.0
BUILD_IMAGE := $(IMAGE_PREFIX)/agent-build-image:$(BUILD_IMAGE_VERSION)

# Enables the binary to be built with optimizations (i.e., doesn't strip the image of
Expand Down
3 changes: 2 additions & 1 deletion build-image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ RUN apt-get update && apt-get install -y \
&& rm -rf /var/lib/apt/lists/*

# Install dependencies used for the operator
RUN go install sigs.k8s.io/controller-tools/cmd/controller-gen@latest
Comment thread
rfratto marked this conversation as resolved.
# Keep versions in sync with cmd/agent-operator/DEVELOPERS.md
RUN go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.6.2

# Fix permissions for /go/bin directory.
RUN chmod 0755 /go/bin
Expand Down
5 changes: 3 additions & 2 deletions cmd/agent-operator/DEVELOPERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,11 @@ goes into more detail about the context and design decisions being made.
The `make crds` command at the root of this repository will generate CRDs and
other code used by the operator. This calls the [generate-crds
script](../../tools/generate-crds.bash) in a container. If you wish to call this
script manually, you must also install `controller-gen`:
script manually, you must also install `controller-gen`.
Ensure to keep the version in sync with what's defined in the `Dockerfile`.

```
go install sigs.k8s.io/controller-tools/cmd/controller-gen@latest
go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.6.2
```

## Testing Locally
Expand Down
4 changes: 2 additions & 2 deletions pkg/operator/apis/monitoring/v1alpha1/types_metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ type PrometheusSubsystemSpec struct {
// from the PodMonitor and ServiceMonitor configs, and they will only
// discover endpoints within their current namespace.
IgnoreNamespaceSelectors bool `json:"ignoreNamespaceSelectors,omitempty"`
// EnforcedNamepsaceLabel enforces adding a namespace label of origin for
// EnforcedNamespaceLabel enforces adding a namespace label of origin for
// each metric that is user-created. The label value will always be the
// namespace of the object that is being created.
EnforcedNamepsaceLabel string `json:"enforcedNamespaceLabel,omitempty"`
EnforcedNamespaceLabel string `json:"enforcedNamespaceLabel,omitempty"`
// EnforcedSampleLimit defines global limit on the number of scraped samples
// that will be accepted. This overrides any SampleLimit set per
// ServiceMonitor and/or PodMonitor. It is meant to be used by admins to
Expand Down
2 changes: 1 addition & 1 deletion pkg/operator/config/templates/agent-logs.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function(ctx) marshal.YAML(optionals.trim({
instance=logs_inst,
apiServer=spec.APIServerConfig,
ignoreNamespaceSelectors=logs.IgnoreNamespaceSelectors,
enforcedNamespaceLabel=logs.EnforcedNamepsaceLabel,
enforcedNamespaceLabel=logs.EnforcedNamespaceLabel,
),
ctx.Logs,
)),
Expand Down
2 changes: 1 addition & 1 deletion pkg/operator/config/templates/agent-metrics.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ function(ctx) marshal.YAML(optionals.trim({
overrideHonorLabels=prometheus.OverrideHonorLabels,
overrideHonorTimestamps=prometheus.OverrideHonorTimestamps,
ignoreNamespaceSelectors=prometheus.IgnoreNamespaceSelectors,
enforcedNamespaceLabel=prometheus.EnforcedNamepsaceLabel,
enforcedNamespaceLabel=prometheus.EnforcedNamespaceLabel,
enforcedSampleLimit=prometheus.EnforcedSampleLimit,
enforcedTargetLimit=prometheus.EnforcedTargetLimit,
shards=calculateShards(prometheus.Shards),
Expand Down
235 changes: 166 additions & 69 deletions production/operator/crds/monitoring.coreos.com_podmonitors.yaml

Large diffs are not rendered by default.

211 changes: 149 additions & 62 deletions production/operator/crds/monitoring.coreos.com_probes.yaml

Large diffs are not rendered by default.

251 changes: 177 additions & 74 deletions production/operator/crds/monitoring.coreos.com_servicemonitors.yaml

Large diffs are not rendered by default.

4,095 changes: 3,184 additions & 911 deletions production/operator/crds/monitoring.grafana.com_grafana-agents.yaml

Large diffs are not rendered by default.

223 changes: 160 additions & 63 deletions production/operator/crds/monitoring.grafana.com_logs-instances.yaml

Large diffs are not rendered by default.

334 changes: 253 additions & 81 deletions production/operator/crds/monitoring.grafana.com_pod-logs.yaml

Large diffs are not rendered by default.

442 changes: 321 additions & 121 deletions production/operator/crds/monitoring.grafana.com_prometheus-instances.yaml

Large diffs are not rendered by default.