Skip to content

Commit

Permalink
Merge branch 'main' into fix_create_rbac_consul
Browse files Browse the repository at this point in the history
  • Loading branch information
sentoz authored Apr 23, 2024
2 parents 1f7d3b8 + 5540c92 commit 175dbef
Show file tree
Hide file tree
Showing 47 changed files with 902 additions and 496 deletions.
2 changes: 1 addition & 1 deletion .drone/drone.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ local manifest_ecr(apps, archs) = pipeline('manifest-ecr') {
],
};

local build_image_tag = '0.33.1';
local build_image_tag = '0.33.2';
[
pipeline('loki-build-image-' + arch) {
workspace: {
Expand Down
12 changes: 6 additions & 6 deletions .drone/drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ steps:
from_secret: docker_password
repo: grafana/loki-build-image
tags:
- 0.33.1-amd64
- 0.33.2-amd64
username:
from_secret: docker_username
when:
Expand Down Expand Up @@ -54,7 +54,7 @@ steps:
from_secret: docker_password
repo: grafana/loki-build-image
tags:
- 0.33.1-arm64
- 0.33.2-arm64
username:
from_secret: docker_username
when:
Expand Down Expand Up @@ -86,7 +86,7 @@ steps:
password:
from_secret: docker_password
spec: .drone/docker-manifest-build-image.tmpl
target: loki-build-image:0.33.1
target: loki-build-image:0.33.2
username:
from_secret: docker_username
when:
Expand Down Expand Up @@ -139,7 +139,7 @@ steps:
depends_on:
- clone
environment: {}
image: grafana/loki-build-image:0.33.1
image: grafana/loki-build-image:0.33.2
name: documentation-helm-reference-check
trigger:
ref:
Expand Down Expand Up @@ -1085,7 +1085,7 @@ steps:
from_secret: docker_password
DOCKER_USERNAME:
from_secret: docker_username
image: grafana/loki-build-image:0.33.1
image: grafana/loki-build-image:0.33.2
name: build and push
privileged: true
volumes:
Expand Down Expand Up @@ -1308,6 +1308,6 @@ kind: secret
name: gpg_private_key
---
kind: signature
hmac: e0940674c7a2b5ae47c6509b0bc97dc594a054e5b881fd1962b81837d6b1dee6
hmac: 87480bff973003712122d81a1575e2a62cff6fd4a42b163487cae6c6a67d8e7c

...
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ Starting with the 3.0 release we began using [conventional commits](https://www.

##### Fixes

* [10708](https://github.com/grafana/loki/pull/10708) **joshuapare**: Fix UDP receiver on syslog transport
* [10631](https://github.com/grafana/loki/pull/10631) **thampiotr**: Fix race condition in cleaning up metrics when stopping to tail files.
* [10798](https://github.com/grafana/loki/pull/10798) **hainenber**: Fix agent panicking after reloaded due to duplicate metric collector registration.
* [10848](https://github.com/grafana/loki/pull/10848) **rgroothuijsen**: Correctly parse list of drop stage sources from YAML.
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ DOCKER_IMAGE_DIRS := $(patsubst %/Dockerfile,%,$(DOCKERFILES))
BUILD_IN_CONTAINER ?= true

# ensure you run `make drone` after changing this
BUILD_IMAGE_VERSION ?= 0.33.1
BUILD_IMAGE_VERSION ?= 0.33.2

# Docker image info
IMAGE_PREFIX ?= grafana
Expand Down
2 changes: 1 addition & 1 deletion clients/cmd/docker-driver/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG BUILD_IMAGE=grafana/loki-build-image:0.33.1
ARG BUILD_IMAGE=grafana/loki-build-image:0.33.2
# Directories in this file are referenced from the root of the project not this folder
# This file is intended to be called from the root like so:
# docker build -t grafana/loki -f cmd/loki/Dockerfile .
Expand Down
2 changes: 1 addition & 1 deletion clients/cmd/promtail/Dockerfile.cross
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG BUILD_IMAGE=grafana/loki-build-image:0.33.1
ARG BUILD_IMAGE=grafana/loki-build-image:0.33.2
# Directories in this file are referenced from the root of the project not this folder
# This file is intended to be called from the root like so:
# docker build -t grafana/promtail -f clients/cmd/promtail/Dockerfile .
Expand Down
2 changes: 1 addition & 1 deletion clients/cmd/promtail/Dockerfile.debug
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# This file is intended to be called from the root like so:
# docker build -t grafana/promtail -f clients/cmd/promtail/Dockerfile.debug .

FROM grafana/loki-build-image:0.33.1 as build
FROM grafana/loki-build-image:0.33.2 as build
ARG GOARCH="amd64"
COPY . /src/loki
WORKDIR /src/loki
Expand Down
33 changes: 25 additions & 8 deletions clients/pkg/promtail/targets/syslog/transport.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package syslog

import (
"bytes"
"context"
"crypto/tls"
"crypto/x509"
Expand Down Expand Up @@ -380,16 +381,32 @@ func (t *UDPTransport) handleRcv(c *ConnPipe) {
defer t.openConnections.Done()

lbs := t.connectionLabels(c.addr.String())
err := syslogparser.ParseStream(c, func(result *syslog.Result) {
if err := result.Error; err != nil {
t.handleMessageError(err)
} else {
t.handleMessage(lbs.Copy(), result.Message)

for {
datagram := make([]byte, t.maxMessageLength())
n, err := c.Read(datagram)
if err != nil {
if err == io.EOF {
break
}

level.Warn(t.logger).Log("msg", "error reading from pipe", "err", err)
continue
}
}, t.maxMessageLength())

if err != nil {
level.Warn(t.logger).Log("msg", "error parsing syslog stream", "err", err)
r := bytes.NewReader(datagram[:n])

err = syslogparser.ParseStream(r, func(result *syslog.Result) {
if err := result.Error; err != nil {
t.handleMessageError(err)
} else {
t.handleMessage(lbs.Copy(), result.Message)
}
}, t.maxMessageLength())

if err != nil {
level.Warn(t.logger).Log("msg", "error parsing syslog stream", "err", err)
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/loki-canary/Dockerfile.cross
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG BUILD_IMAGE=grafana/loki-build-image:0.33.1
ARG BUILD_IMAGE=grafana/loki-build-image:0.33.2
# Directories in this file are referenced from the root of the project not this folder
# This file is intended to be called from the root like so:
# docker build -t grafana/promtail -f cmd/promtail/Dockerfile .
Expand Down
2 changes: 1 addition & 1 deletion cmd/loki/Dockerfile.cross
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG BUILD_IMAGE=grafana/loki-build-image:0.33.1
ARG BUILD_IMAGE=grafana/loki-build-image:0.33.2
# Directories in this file are referenced from the root of the project not this folder
# This file is intended to be called from the root like so:
# docker build -t grafana/loki -f cmd/loki/Dockerfile .
Expand Down
2 changes: 1 addition & 1 deletion cmd/loki/Dockerfile.debug
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG BUILD_IMAGE=grafana/loki-build-image:0.33.1
ARG BUILD_IMAGE=grafana/loki-build-image:0.33.2
# Directories in this file are referenced from the root of the project not this folder
# This file is intended to be called from the root like so:
# docker build -t grafana/loki -f cmd/loki/Dockerfile.debug .
Expand Down
2 changes: 1 addition & 1 deletion cmd/querytee/Dockerfile.cross
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG BUILD_IMAGE=grafana/loki-build-image:0.33.1
ARG BUILD_IMAGE=grafana/loki-build-image:0.33.2
# Directories in this file are referenced from the root of the project not this folder
# This file is intended to be called from the root like so:
# docker build -t grafana/promtail -f cmd/promtail/Dockerfile .
Expand Down
4 changes: 2 additions & 2 deletions docs/sources/alert/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,8 @@ Another great use case is alerting on high cardinality sources. These are things
Creating these alerts in LogQL is attractive because these metrics can be extracted at _query time_, meaning we don't suffer the cardinality explosion in our metrics store.

{{% admonition type="note" %}}
As an example, we can use LogQL v2 to help Loki to monitor _itself_, alerting us when specific tenants have queries that take longer than 10s to complete! To do so, we'd use the following query: `sum by (org_id) (rate({job="loki-prod/query-frontend"} |= "metrics.go" | logfmt | duration > 10s [1m])
{{% /admonition %}}`.
As an example, we can use LogQL v2 to help Loki to monitor _itself_, alerting us when specific tenants have queries that take longer than 10s to complete! To do so, we'd use the following query: `sum by (org_id) (rate({job="loki-prod/query-frontend"} |= "metrics.go" | logfmt | duration > 10s [1m])`.
{{% /admonition %}}

## Interacting with the Ruler

Expand Down
44 changes: 44 additions & 0 deletions docs/sources/configure/examples/configuration-examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -402,3 +402,47 @@ memberlist:

```


## 16-Azure-Account-Name-Example.yaml

```yaml

# This partial configuration uses Azure for chunk storage
storage_config:
azure:
# For the account-key, see docs: https://docs.microsoft.com/en-us/azure/storage/common/storage-account-keys-manage?tabs=azure-portal
account_key: <azure_blob_access_key>
account_name: <azure_account_name>
container_name: <azure_storage_bucket_name>
use_managed_identity: false
# Providing a user assigned ID will override use_managed_identity
#user_assigned_id: <user-assigned-identity-id>
request_timeout: 0
# Configure `endpoint_suffix` if you are using private azure cloud like azure stack hub and will use this endpoint suffix to compose container and blob storage URL. Ex: https://account_name.endpoint_suffix/container_name/blob_name
#endpoint_suffix: <endpoint-suffix>
# If `connection_string` is set, the `account_name` and `endpoint_suffix` values will not be used. Use this method over `account_key` if you need to authenticate via an SAS token. Or if you use the Azurite emulator.
#connection_string: <connection-string>

```


## 17-Azure-Service-Principal-Example.yaml

```yaml

# This partial configuration uses Azure for chunk storage and a service principal for authentication
storage_config:
azure:
use_service_principal: true
# Azure tenant ID used to authenticate through Azure OAuth
tenant_id: <tenant-id>
# Azure Service Principal ID
client_id: <client-id>
# Azure Service Principal secret key
client_secret: <client-secret>
# See https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blobs-introduction#containers
container_name: <azure_storage_bucket_name>
request_timeout: 0

```

Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# doc-example:skip-validation=true
# This partial configuration uses Azure for chunk storage
storage_config:
azure:
# For the account-key, see docs: https://docs.microsoft.com/en-us/azure/storage/common/storage-account-keys-manage?tabs=azure-portal
account_key: <azure_blob_access_key>
account_name: <azure_account_name>
container_name: <azure_storage_bucket_name>
use_managed_identity: false
# Providing a user assigned ID will override use_managed_identity
#user_assigned_id: <user-assigned-identity-id>
request_timeout: 0
# Configure `endpoint_suffix` if you are using private azure cloud like azure stack hub and will use this endpoint suffix to compose container and blob storage URL. Ex: https://account_name.endpoint_suffix/container_name/blob_name
#endpoint_suffix: <endpoint-suffix>
# If `connection_string` is set, the `account_name` and `endpoint_suffix` values will not be used. Use this method over `account_key` if you need to authenticate via an SAS token. Or if you use the Azurite emulator.
#connection_string: <connection-string>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# doc-example:skip-validation=true
# This partial configuration uses Azure for chunk storage and a service principal for authentication
storage_config:
azure:
use_service_principal: true
# Azure tenant ID used to authenticate through Azure OAuth
tenant_id: <tenant-id>
# Azure Service Principal ID
client_id: <client-id>
# Azure Service Principal secret key
client_secret: <client-secret>
# See https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blobs-introduction#containers
container_name: <azure_storage_bucket_name>
request_timeout: 0
2 changes: 1 addition & 1 deletion examples/getting-started/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Loki getting started guide configuration

This directory contains configuration to use with the [Loki getting started guide](https://grafana.com/docs/loki/latest/getting-started/).
This directory contains configuration to use with the [Loki getting started guide](https://grafana.com/docs/loki/latest/get-started/).

4 changes: 4 additions & 0 deletions loki-build-image/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Versions

### 0.33.2

- Update to go 1.22.2

### 0.33.1-golangci.1.51.2

- Update to Go version 1.21.9 but restore golangci-lint to v1.51.2
Expand Down
2 changes: 0 additions & 2 deletions operator/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
## Main

- [11708](https://github.com/grafana/loki/pull/11708) **btaani**: Add support for Swift TLS CA configuration

## 0.6.0 (2024-03-19)

- [12228](https://github.com/grafana/loki/pull/12228) **xperimental**: Restructure LokiStack metrics
Expand Down
2 changes: 1 addition & 1 deletion operator/Dockerfile.cross
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG BUILD_IMAGE=grafana/loki-build-image:0.33.1
ARG BUILD_IMAGE=grafana/loki-build-image:0.33.2

FROM golang:1.22.2-alpine as goenv
RUN go env GOARCH > /goarch && \
Expand Down
Loading

0 comments on commit 175dbef

Please sign in to comment.