Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
AmitRay9615 authored Nov 19, 2024
2 parents 8a130c0 + 926c436 commit 229f8cd
Show file tree
Hide file tree
Showing 167 changed files with 20,770 additions and 14,791 deletions.
32 changes: 3 additions & 29 deletions .github/workflows/helm-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,35 +11,9 @@ env:

jobs:
call-lint:
name: Lint Helm Chart
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Check Docs
run: |
docker run --rm --volume "$(pwd):/helm-docs" -u "$(id -u)" jnorwood/helm-docs:v1.11.0
if ! git diff --exit-code; then
echo "Documentation not up to date. Please run helm-docs and commit changes!" >&2
exit 1
fi
- name: Lint Yaml
run: make helm-lint

- name: Lint Code Base
uses: docker://github/super-linter:v3.17.2
env:
FILTER_REGEX_EXCLUDE: .*(CHANGELOG\.md|README\.md|Chart\.yaml|NOTES.txt).*
FILTER_REGEX_INCLUDE: .*production/helm/.*
VALIDATE_ALL_CODEBASE: false
VALIDATE_KUBERNETES_KUBEVAL: false
VALIDATE_YAML: false
VALIDATE_GO: false
DEFAULT_BRANCH: main
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
LOG_LEVEL: DEBUG
uses: grafana/helm-charts/.github/workflows/linter.yml@main
with:
filter_regex_include: .*production/helm/loki/.*
call-test:
name: Test Helm Chart
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/helm-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:

jobs:
call-update-helm-repo:
uses: grafana/helm-charts/.github/workflows/update-helm-repo.yaml@main
uses: grafana/helm-charts/.github/workflows/update-helm-repo.yaml@70dbbb722dee3f2ee126e12684cc0e92a20972ed
with:
charts_dir: production/helm
cr_configfile: production/helm/cr.yaml
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/operator-bundle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
go: ['1.22']
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
id: go
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/operator-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
echo "IMAGE_TAGS=$IMAGE_TAGS" >> $GITHUB_OUTPUT
- name: Build and publish image on quay.io
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: ./operator
push: true
Expand Down Expand Up @@ -86,7 +86,7 @@ jobs:
echo "IMAGE_TAGS=$IMAGE_TAGS" >> $GITHUB_OUTPUT
- name: Build and publish image on quay.io
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: ./operator/bundle/openshift
file: ./operator/bundle/openshift/bundle.Dockerfile
Expand Down Expand Up @@ -125,7 +125,7 @@ jobs:
echo "IMAGE_TAGS=$IMAGE_TAGS" >> $GITHUB_OUTPUT
- name: Build and publish image on quay.io
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: ./operator
file: ./operator/calculator.Dockerfile
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/operator-scorecard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
go: ['1.22']
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
id: go
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Install make
run: sudo apt-get install make
- name: Set up Go 1.x
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
id: go
Expand All @@ -43,7 +43,7 @@ jobs:
- name: Install make
run: sudo apt-get install make
- name: Set up Go 1.x
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
id: go
Expand All @@ -69,7 +69,7 @@ jobs:
- name: Install make
run: sudo apt-get install make
- name: Set up Go 1.x
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
id: go
Expand All @@ -90,7 +90,7 @@ jobs:
- name: Install make
run: sudo apt-get install make
- name: Set up Go 1.x
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
id: go
Expand All @@ -111,7 +111,7 @@ jobs:
- name: Install make
run: sudo apt-get install make
- name: Set up Go 1.x
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
id: go
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/promtail-windows-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
# You can test your matrix by printing the current Go version
Expand Down
2 changes: 1 addition & 1 deletion clients/cmd/fluent-bit/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ RUN go build \
-o clients/cmd/fluent-bit/out_grafana_loki.so \
/src/clients/cmd/fluent-bit

FROM fluent/fluent-bit:1.9.10@sha256:b33d4bf7f7b870777c1f596bc33d6d347167d460bc8cc6aa50fddcbedf7bede5
FROM fluent/fluent-bit:3.2.1@sha256:6820e86902908933c63f1260d36f1bed0fed0c805518667054cf08890dbf06d5

COPY --from=builder /src/clients/cmd/fluent-bit/out_grafana_loki.so /fluent-bit/bin
COPY clients/cmd/fluent-bit/fluent-bit.conf /fluent-bit/etc/fluent-bit.conf
Expand Down
2 changes: 1 addition & 1 deletion clients/cmd/fluentd/docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ services:

# Read /var/log/syslog and send it to fluentd
fluentbit:
image: fluent/fluent-bit:1.9
image: fluent/fluent-bit:3.2
command: "/fluent-bit/bin/fluent-bit -c /srv/fluent-bit.conf"
user: root
volumes:
Expand Down
2 changes: 1 addition & 1 deletion clients/cmd/logstash/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM logstash:7.17.25
FROM logstash:8.16.0

USER logstash
ENV PATH /usr/share/logstash/vendor/jruby/bin:/usr/share/logstash/vendor/bundle/jruby/2.5.0/bin:/usr/share/logstash/jdk/bin:$PATH
Expand Down
10 changes: 5 additions & 5 deletions clients/pkg/logentry/stages/timestamp.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

"github.com/go-kit/log"
"github.com/go-kit/log/level"
lru "github.com/hashicorp/golang-lru"
lru "github.com/hashicorp/golang-lru/v2"
"github.com/mitchellh/mapstructure"
"github.com/prometheus/common/model"

Expand Down Expand Up @@ -114,9 +114,9 @@ func newTimestampStage(logger log.Logger, config interface{}) (Stage, error) {
return nil, err
}

var lastKnownTimestamps *lru.Cache
var lastKnownTimestamps *lru.Cache[string, time.Time]
if *cfg.ActionOnFailure == TimestampActionOnFailureFudge {
lastKnownTimestamps, err = lru.New(maxLastKnownTimestampsCacheSize)
lastKnownTimestamps, err = lru.New[string, time.Time](maxLastKnownTimestampsCacheSize)
if err != nil {
return nil, err
}
Expand All @@ -138,7 +138,7 @@ type timestampStage struct {

// Stores the last known timestamp for a given "stream id" (guessed, since at this stage
// there's no reliable way to know it).
lastKnownTimestamps *lru.Cache
lastKnownTimestamps *lru.Cache[string, time.Time]
}

// Name implements Stage
Expand Down Expand Up @@ -222,7 +222,7 @@ func (ts *timestampStage) processActionOnFailureFudge(labels model.LabelSet, t *
}

// Fudge the timestamp
*t = lastTimestamp.(time.Time).Add(1 * time.Nanosecond)
*t = lastTimestamp.Add(1 * time.Nanosecond)

// Store the fudged timestamp, so that a subsequent fudged timestamp will be 1ns after it
ts.lastKnownTimestamps.Add(labelsStr, *t)
Expand Down
2 changes: 1 addition & 1 deletion cmd/logcli/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import (
"strings"
"time"

"github.com/alecthomas/kingpin/v2"
"github.com/prometheus/common/config"
"github.com/prometheus/common/version"
"gopkg.in/alecthomas/kingpin.v2"

"github.com/grafana/loki/v3/pkg/logcli/client"
"github.com/grafana/loki/v3/pkg/logcli/detected"
Expand Down
2 changes: 1 addition & 1 deletion cmd/lokitool/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"os"

"gopkg.in/alecthomas/kingpin.v2"
"github.com/alecthomas/kingpin/v2"

"github.com/prometheus/common/version"

Expand Down
1 change: 1 addition & 0 deletions docs/sources/send-data/otel/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ Since the OpenTelemetry protocol differs from the Loki storage model, here is ho
- cloud.region
- container.name
- deployment.environment
- deployment.environment.name
- k8s.cluster.name
- k8s.container.name
- k8s.cronjob.name
Expand Down
2 changes: 1 addition & 1 deletion docs/sources/send-data/promtail/cloud/eks/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ initContainer:

image:
repository: grafana/promtail
tag: 1.6.1
tag: 3.2.1
pullPolicy: IfNotPresent
## Optionally specify an array of imagePullSecrets.
## Secrets must be manually created in the namespace.
Expand Down
12 changes: 11 additions & 1 deletion docs/sources/setup/install/helm/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ This is the generated reference for the Loki Helm Chart values.
"type": "RollingUpdate"
},
"terminationGracePeriodSeconds": 60,
"tolerations": []
"tolerations": [],
"topologySpreadConstraints": []
}
</pre>
</td>
Expand Down Expand Up @@ -280,6 +281,15 @@ This is the generated reference for the Loki Helm Chart values.
<td><pre lang="json">
[]
</pre>
</td>
</tr>
<tr>
<td>adminApi.topologySpreadConstraints</td>
<td>list</td>
<td>Topology Spread Constraints for admin-api pods</td>
<td><pre lang="json">
[]
</pre>
</td>
</tr>
<tr>
Expand Down
12 changes: 12 additions & 0 deletions docs/sources/setup/upgrade/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,18 @@ Their YAML counterparts in the `limits_config` block are kept identical.

All other CLI arguments (and their YAML counterparts) prefixed with `-bloom-compactor.` have been removed.


## 3.3.0

### Loki

#### Experimental Bloom Filters

With Loki 3.3.0, the bloom block format changed and any previously created block is incompatible with the new format.
Before upgrading, we recommend deleting all the existing bloom blocks in the object store. We store bloom blocks and
metas inside the `bloom` path in the configured object store. To get rid of all the bloom blocks, delete all the objects
inside the `bloom` path in the object store.

## 3.0.0

{{< admonition type="note" >}}
Expand Down
2 changes: 1 addition & 1 deletion docs/sources/shared/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -2264,7 +2264,7 @@ write_failures_logging:
otlp_config:
# List of default otlp resource attributes to be picked as index labels
# CLI flag: -distributor.otlp.default_resource_attributes_as_index_labels
[default_resource_attributes_as_index_labels: <list of strings> | default = [service.name service.namespace service.instance.id deployment.environment cloud.region cloud.availability_zone k8s.cluster.name k8s.namespace.name k8s.pod.name k8s.container.name container.name k8s.replicaset.name k8s.deployment.name k8s.statefulset.name k8s.daemonset.name k8s.cronjob.name k8s.job.name]]
[default_resource_attributes_as_index_labels: <list of strings> | default = [service.name service.namespace service.instance.id deployment.environment deployment.environment.name cloud.region cloud.availability_zone k8s.cluster.name k8s.namespace.name k8s.pod.name k8s.container.name container.name k8s.replicaset.name k8s.deployment.name k8s.statefulset.name k8s.daemonset.name k8s.cronjob.name k8s.job.name]]
# Enable writes to Kafka during Push requests.
# CLI flag: -distributor.kafka-writes-enabled
Expand Down
14 changes: 7 additions & 7 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ require (
github.com/Masterminds/sprig/v3 v3.3.0
github.com/NYTimes/gziphandler v1.1.1
github.com/Workiva/go-datastructures v1.1.5
github.com/alecthomas/kingpin/v2 v2.4.0
github.com/alicebob/miniredis/v2 v2.33.0
github.com/aliyun/aliyun-oss-go-sdk v3.0.2+incompatible
github.com/aws/aws-sdk-go v1.55.5
Expand All @@ -38,7 +39,6 @@ require (
github.com/fsouza/fake-gcs-server v1.50.2
github.com/go-kit/log v0.2.1
github.com/go-logfmt/logfmt v0.6.0
github.com/go-redis/redis/v8 v8.11.5
github.com/gocql/gocql v0.0.0-20200526081602-cd04bd7f22a7
github.com/gogo/protobuf v1.3.2 // remember to update loki-build-image/Dockerfile too
github.com/gogo/status v1.1.1
Expand All @@ -58,7 +58,7 @@ require (
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0
github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645
github.com/hashicorp/consul/api v1.30.0
github.com/hashicorp/golang-lru v0.6.0
github.com/hashicorp/golang-lru/v2 v2.0.7
github.com/imdario/mergo v0.3.16
github.com/influxdata/telegraf v1.16.3
github.com/jmespath/go-jmespath v0.4.0
Expand Down Expand Up @@ -86,6 +86,7 @@ require (
github.com/prometheus/client_model v0.6.1
github.com/prometheus/common v0.60.1
github.com/prometheus/prometheus v0.53.2-0.20240726125539-d4f098ae80fb
github.com/redis/go-redis/v9 v9.7.0
github.com/segmentio/fasthash v1.0.3
github.com/shurcooL/httpfs v0.0.0-20230704072500-f1e31cf0ba5c
github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546
Expand All @@ -104,7 +105,6 @@ require (
golang.org/x/time v0.8.0
google.golang.org/api v0.206.0
google.golang.org/grpc v1.68.0
gopkg.in/alecthomas/kingpin.v2 v2.2.6
gopkg.in/yaml.v2 v2.4.0
gopkg.in/yaml.v3 v3.0.1
k8s.io/klog v1.0.0
Expand All @@ -126,7 +126,6 @@ require (
github.com/gogo/googleapis v1.4.1
github.com/grafana/jsonparser v0.0.0-20241004153430-023329977675
github.com/grafana/loki/pkg/push v0.0.0-20240924133635-758364c7775f
github.com/hashicorp/golang-lru/v2 v2.0.7
github.com/heroku/x v0.4.0
github.com/influxdata/tdigest v0.0.2-0.20210216194612-fc98d27c9e8b
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db
Expand All @@ -144,7 +143,7 @@ require (
github.com/twmb/franz-go/plugin/kotel v1.5.0
github.com/twmb/franz-go/plugin/kprom v1.1.0
github.com/willf/bloom v2.0.3+incompatible
go.opentelemetry.io/collector/pdata v1.19.0
go.opentelemetry.io/collector/pdata v1.20.0
go4.org/netipx v0.0.0-20230125063823-8449b0a6169f
golang.org/x/exp v0.0.0-20240325151524-a685a6edb6d8
golang.org/x/oauth2 v0.24.0
Expand Down Expand Up @@ -173,6 +172,7 @@ require (
github.com/go-ole/go-ole v1.2.6 // indirect
github.com/goccy/go-json v0.10.3 // indirect
github.com/gorilla/handlers v1.5.2 // indirect
github.com/hashicorp/golang-lru v0.6.0 // indirect
github.com/lufia/plan9stats v0.0.0-20220913051719-115f729f3c8c // indirect
github.com/moby/docker-image-spec v1.3.1 // indirect
github.com/moby/sys/userns v0.1.0 // indirect
Expand All @@ -185,6 +185,7 @@ require (
github.com/tklauser/go-sysconf v0.3.12 // indirect
github.com/tklauser/numcpus v0.6.1 // indirect
github.com/x448/float16 v0.8.4 // indirect
github.com/xhit/go-str2duration/v2 v2.1.0 // indirect
github.com/yusufpapurcu/wmi v1.2.4 // indirect
go.opentelemetry.io/contrib/detectors/gcp v1.29.0 // indirect
go.opentelemetry.io/otel/sdk v1.29.0 // indirect
Expand Down Expand Up @@ -215,7 +216,6 @@ require (
github.com/Masterminds/semver/v3 v3.3.0 // indirect
github.com/Microsoft/go-winio v0.6.2 // indirect
github.com/alecthomas/chroma v0.10.0
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 // indirect
github.com/alecthomas/units v0.0.0-20240626203959-61d1e3462e30 // indirect
github.com/alicebob/gopher-json v0.0.0-20200520072559-a9ecdc9d1d3a // indirect
github.com/armon/go-metrics v0.4.1 // indirect
Expand Down Expand Up @@ -379,7 +379,7 @@ require (
sigs.k8s.io/yaml v1.4.0 // indirect
)

replace github.com/Azure/azure-sdk-for-go => github.com/Azure/azure-sdk-for-go v36.2.0+incompatible
replace github.com/Azure/azure-sdk-for-go => github.com/Azure/azure-sdk-for-go v68.0.0+incompatible

replace github.com/Azure/azure-storage-blob-go => github.com/MasslessParticle/azure-storage-blob-go v0.14.1-0.20240322194317-344980fda573

Expand Down
Loading

0 comments on commit 229f8cd

Please sign in to comment.