Skip to content

Commit

Permalink
v0.21.1 release prep (#1120)
Browse files Browse the repository at this point in the history
  • Loading branch information
rfratto authored Nov 18, 2021
1 parent 270c691 commit cd07588
Show file tree
Hide file tree
Showing 17 changed files with 39 additions and 36 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Main (unreleased)

# v0.21.1 (2021-11-18)

- [BUGFIX] Fix panic when using postgres_exporter integration (@saputradharma)

- [BUGFIX] Fix panic when dnsamsq_exporter integration tried to log a warning (@rfratto)
Expand Down
4 changes: 2 additions & 2 deletions docs/configuration/integrations/node-exporter-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ docker run \
-v "/proc:/host/proc:ro,rslave" \
-v /tmp/agent:/etc/agent \
-v /path/to/config.yaml:/etc/agent-config/agent.yaml \
grafana/agent:v0.21.0 \
grafana/agent:v0.21.1 \
--config.file=/etc/agent-config/agent.yaml
```

Expand Down Expand Up @@ -66,7 +66,7 @@ metadata:
name: agent
spec:
containers:
- image: grafana/agent:v0.21.0
- image: grafana/agent:v0.21.1
name: agent
args:
- --config.file=/etc/agent-config/agent.yaml
Expand Down
4 changes: 2 additions & 2 deletions docs/configuration/integrations/process-exporter-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ docker run \
-v "/proc:/proc:ro" \
-v /tmp/agent:/etc/agent \
-v /path/to/config.yaml:/etc/agent-config/agent.yaml \
grafana/agent:v0.21.0 \
grafana/agent:v0.21.1 \
--config.file=/etc/agent-config/agent.yaml
```

Expand All @@ -35,7 +35,7 @@ metadata:
name: agent
spec:
containers:
- image: grafana/agent:v0.21.0
- image: grafana/agent:v0.21.1
name: agent
args:
- --config.file=/etc/agent-config/agent.yaml
Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ See the list of [Community Projects](#community-projects) for the community-driv
docker run \
-v /tmp/agent:/etc/agent/data \
-v /path/to/config.yaml:/etc/agent/agent.yaml \
grafana/agent:v0.21.0
grafana/agent:v0.21.1
```

Replace `/tmp/agent` with the folder you wish to store WAL data in. WAL data is
Expand Down
30 changes: 15 additions & 15 deletions docs/operator/custom-resource-quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ metadata:
labels:
app: grafana-agent
spec:
image: grafana/agent:v0.21.0
image: grafana/agent:v0.21.1
logLevel: info
serviceAccountName: grafana-agent
metrics:
Expand Down Expand Up @@ -121,12 +121,12 @@ This creates a ServiceAccount, ClusterRole, and ClusterRoleBinding for the Grafa
The full hierarchy of custom resources is as follows:

- `GrafanaAgent`
- `MetricsInstance`
- `PodMonitor`
- `Probe`
- `ServiceMonitor`
- `LogsInstance`
- `PodLogs`
- `MetricsInstance`
- `PodMonitor`
- `Probe`
- `ServiceMonitor`
- `LogsInstance`
- `PodLogs`

Deploying a GrafanaAgent resource on its own will not spin up any Agent Pods. Agent Operator will create Agent Pods once MetricsInstance and LogsIntance resources have been created. In the next step, you'll roll out a `MetricsInstance` resource to scrape cAdvisor and Kubelet metrics and ship these to your Prometheus-compatible metrics endpoint.

Expand Down Expand Up @@ -196,13 +196,13 @@ stringData:
password: 'your_cloud_prometheus_API_key'
```

If you're using Grafana Cloud, you can find your hosted Prometheus endpoint username and password in the [Grafana Cloud Portal](https://grafana.com/profile/org ). You may wish to base64-encode these values yourself. In this case, please use `data` instead of `stringData`.
If you're using Grafana Cloud, you can find your hosted Prometheus endpoint username and password in the [Grafana Cloud Portal](https://grafana.com/profile/org ). You may wish to base64-encode these values yourself. In this case, please use `data` instead of `stringData`.

Once you've rolled out the `MetricsInstance` and its Secret, you can confirm that the MetricsInstance Agent is up and running with `kubectl get pod`. Since we haven't defined any monitors yet, this Agent will not have any scrape targets defined. In the next step, we'll create scrape targets for the cAdvisor and kubelet endpoints exposed by the `kubelet` service in the cluster.

## Step 3: Create ServiceMonitors for kubelet and cAdvisor endpoints

In this step, you'll create ServiceMonitors for kubelet and cAdvisor metrics exposed by the `kubelet` Service. Every node in your cluster exposes kubelet and cadvisor metrics at `/metrics` and `/metrics/cadvisor` respectively. Agent Operator creates a `kubelet` service that exposes these Node endpoints so that they can be scraped using ServiceMonitors.
In this step, you'll create ServiceMonitors for kubelet and cAdvisor metrics exposed by the `kubelet` Service. Every node in your cluster exposes kubelet and cadvisor metrics at `/metrics` and `/metrics/cadvisor` respectively. Agent Operator creates a `kubelet` service that exposes these Node endpoints so that they can be scraped using ServiceMonitors.

To scrape these two endpoints, roll out the following two ServiceMonitors in your cluster:

Expand Down Expand Up @@ -286,7 +286,7 @@ spec:
app.kubernetes.io/name: kubelet
```

These two ServiceMonitors configure Agent to scrape all the Kubelet and cAdvisor endpoints in your Kubernetes cluster (one of each per Node). In addition, it defines a `job` label which you may change (it is preset here for compatibility with Grafana Cloud's Kubernetes integration), and allowlists a core set of Kubernetes metrics to reduce remote metrics usage. If you don't need this allowlist, you may omit it, however note that your metrics usage will increase significantly.
These two ServiceMonitors configure Agent to scrape all the Kubelet and cAdvisor endpoints in your Kubernetes cluster (one of each per Node). In addition, it defines a `job` label which you may change (it is preset here for compatibility with Grafana Cloud's Kubernetes integration), and allowlists a core set of Kubernetes metrics to reduce remote metrics usage. If you don't need this allowlist, you may omit it, however note that your metrics usage will increase significantly.

When you're done, Agent should now be shipping Kubelet and cAdvisor metrics to your remote Prometheus endpoint.

Expand Down Expand Up @@ -323,9 +323,9 @@ spec:
instance: primary
```

This LogsInstance will pick up PodLogs resources with the `instance: primary` label. Be sure to set the Loki URL to the correct push endpoint (for Grafana Cloud, this will be something like `logs-prod-us-central1.grafana.net/loki/api/v1/push`, however you should check the Cloud Portal to confirm).
This LogsInstance will pick up PodLogs resources with the `instance: primary` label. Be sure to set the Loki URL to the correct push endpoint (for Grafana Cloud, this will be something like `logs-prod-us-central1.grafana.net/loki/api/v1/push`, however you should check the Cloud Portal to confirm).

Also note that we are using the `agent: grafana-agent-logs` label here, which will associate this LogsInstance with the GrafanaAgent resource defined in Step 1. This means that it will inherit requests, limits, affinities and other properties defined in the GrafanaAgent custom resource.
Also note that we are using the `agent: grafana-agent-logs` label here, which will associate this LogsInstance with the GrafanaAgent resource defined in Step 1. This means that it will inherit requests, limits, affinities and other properties defined in the GrafanaAgent custom resource.

Create the Secret for the LogsInstance resource:

Expand All @@ -340,7 +340,7 @@ stringData:
password: 'your_password_here'
```

If you're using Grafana Cloud, you can find your hosted Loki endpoint username and password in the [Grafana Cloud Portal](https://grafana.com/profile/org). You may wish to base64-encode these values yourself. In this case, please use `data` instead of `stringData`.
If you're using Grafana Cloud, you can find your hosted Loki endpoint username and password in the [Grafana Cloud Portal](https://grafana.com/profile/org). You may wish to base64-encode these values yourself. In this case, please use `data` instead of `stringData`.

Finally, we'll roll out a PodLogs resource to define our logging targets. Under the hood, Agent Operator will turn this into Agent config for the logs subsystem, and roll it out to the DaemonSet of logging agents.

Expand Down Expand Up @@ -372,7 +372,7 @@ Under the hood, the above PodLogs resource will add the following labels to log
- `service`
- `pod`
- `container`
- `job`
- `job`
- Set to `PodLogs_namespace/PodLogs_name`
- `__path__` (the path to log files)
- Set to `/var/log/pods/*$1/*.log` where `$1` is `__meta_kubernetes_pod_uid/__meta_kubernetes_pod_container_name`
Expand All @@ -389,6 +389,6 @@ At this point you've rolled out the following into your cluster:
- A `MetricsInstance` resource that defines where to ship collected metrics.
- A `ServiceMonitor` resource to collect cAdvisor and kubelet metrics.
- A `LogsInstance` resource that defines where to ship collected logs.
- A `PodLogs` resource to collect container logs from Kubernetes Pods.
- A `PodLogs` resource to collect container logs from Kubernetes Pods.

You can verify that everything is working correctly by navigating to your Grafana instance and querying your Loki and Prometheus datasources. Operator support for Tempo and traces is coming soon.
2 changes: 1 addition & 1 deletion docs/operator/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ spec:
serviceAccountName: grafana-agent-operator
containers:
- name: operator
image: grafana/agent-operator:v0.21.0
image: grafana/agent-operator:v0.21.1
args:
- --kubelet-service=default/kubelet
---
Expand Down
1 change: 1 addition & 0 deletions pkg/operator/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ var (
"v0.19.0",
"v0.20.0",
"v0.21.0",
"v0.21.1",

// NOTE(rfratto): when performing an upgrade, add the newest version above instead of changing the existing reference.
}
Expand Down
8 changes: 4 additions & 4 deletions production/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ directory on your host that you want the agent to store its WAL.
docker run \
-v /tmp/agent:/etc/agent/data \
-v /path/to/config.yaml:/etc/agent/agent.yaml \
grafana/agent:v0.21.0
grafana/agent:v0.21.1
```

## Running the Agent locally
Expand All @@ -47,12 +47,12 @@ You can find them in the [Grafana Cloud documentation](https://grafana.com/docs/

## Agent Operator Helm quickstart guide

This guide will show you how to deploy the [Grafana Agent Operator](https://grafana.com/docs/agent/latest/operator/) into your Kubernetes cluster using the [grafana-agent-operator Helm chart](https://github.com/grafana/helm-charts/tree/main/charts/agent-operator).
This guide will show you how to deploy the [Grafana Agent Operator](https://grafana.com/docs/agent/latest/operator/) into your Kubernetes cluster using the [grafana-agent-operator Helm chart](https://github.com/grafana/helm-charts/tree/main/charts/agent-operator).

You'll also deploy the following custom resources (CRs):
- A `GrafanaAgent` resource, which discovers one or more `MetricsInstance` and `LogsInstances` resources.
- A `MetricsInstance` resource that defines where to ship collected metrics.
- A `ServiceMonitor` resource to collect cAdvisor and kubelet metrics.
- A `MetricsInstance` resource that defines where to ship collected metrics.
- A `ServiceMonitor` resource to collect cAdvisor and kubelet metrics.
- A `LogsInstance` resource that defines where to ship collected logs.
- A `PodLogs` resource to collect container logs from Kubernetes Pods.

Expand Down
2 changes: 1 addition & 1 deletion production/grafanacloud-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ PACKAGE_SYSTEM=${PACKAGE_SYSTEM:=}
#
# Global constants.
#
RELEASE_VERSION="0.21.0"
RELEASE_VERSION="0.21.1"

RELEASE_URL="https://github.com/grafana/agent/releases/download/v${RELEASE_VERSION}"
DEB_URL="${RELEASE_URL}/grafana-agent-${RELEASE_VERSION}-1.${ARCH}.deb"
Expand Down
2 changes: 1 addition & 1 deletion production/kubernetes/agent-bare.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ spec:
valueFrom:
fieldRef:
fieldPath: spec.nodeName
image: grafana/agent:v0.21.0
image: grafana/agent:v0.21.1
imagePullPolicy: IfNotPresent
name: agent
ports:
Expand Down
2 changes: 1 addition & 1 deletion production/kubernetes/agent-loki.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ spec:
valueFrom:
fieldRef:
fieldPath: spec.nodeName
image: grafana/agent:v0.21.0
image: grafana/agent:v0.21.1
imagePullPolicy: IfNotPresent
name: agent
ports:
Expand Down
2 changes: 1 addition & 1 deletion production/kubernetes/agent-traces.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ spec:
valueFrom:
fieldRef:
fieldPath: spec.nodeName
image: grafana/agent:v0.21.0
image: grafana/agent:v0.21.1
imagePullPolicy: IfNotPresent
name: agent
ports:
Expand Down
2 changes: 1 addition & 1 deletion production/kubernetes/build/lib/version.libsonnet
Original file line number Diff line number Diff line change
@@ -1 +1 @@
'grafana/agent:v0.21.0'
'grafana/agent:v0.21.1'
2 changes: 1 addition & 1 deletion production/kubernetes/install-bare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ check_installed() {
check_installed curl
check_installed envsubst

MANIFEST_BRANCH=v0.21.0
MANIFEST_BRANCH=v0.21.1
MANIFEST_URL=${MANIFEST_URL:-https://raw.githubusercontent.com/grafana/agent/${MANIFEST_BRANCH}/production/kubernetes/agent-bare.yaml}
NAMESPACE=${NAMESPACE:-default}

Expand Down
4 changes: 2 additions & 2 deletions production/tanka/grafana-agent/v1/main.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ local service = k.core.v1.service;
(import './lib/traces.libsonnet') +
{
_images:: {
agent: 'grafana/agent:v0.21.0',
agentctl: 'grafana/agentctl:v0.21.0',
agent: 'grafana/agent:v0.21.1',
agentctl: 'grafana/agentctl:v0.21.1',
},

// new creates a new DaemonSet deployment of the grafana-agent. By default,
Expand Down
4 changes: 2 additions & 2 deletions production/tanka/grafana-agent/v2/internal/base.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ function(name='grafana-agent', namespace='') {
local this = self,

_images:: {
agent: 'grafana/agent:v0.21.0',
agentctl: 'grafana/agentctl:v0.21.0',
agent: 'grafana/agent:v0.21.1',
agentctl: 'grafana/agentctl:v0.21.1',
},
_config:: {
name: name,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function(
) {
local _config = {
api: error 'api must be set',
image: 'grafana/agentctl:v0.21.0',
image: 'grafana/agentctl:v0.21.1',
schedule: '*/5 * * * *',
configs: [],
} + config,
Expand Down

0 comments on commit cd07588

Please sign in to comment.