Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge v0.18.2 to main #822

Merged
merged 38 commits into from
Aug 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
f3ce74c
Initialize biggest ref to existing ref when reading a segment (#676)
rfratto Jun 22, 2021
4f06d8e
prepare for v0.16.1 release (#679)
rfratto Jun 22, 2021
47c70b5
adding docker-compose example for local testing
gaantunes Jun 24, 2021
89e668b
Cherry picking kafka importer
rfratto Jun 15, 2021
a023b4e
update Operator FAQ to describe custom scrape jobs (#658)
rfratto Jun 16, 2021
152dff0
Merge
rfratto Jun 16, 2021
742401c
merge for race condition
rfratto Jul 7, 2021
ec439cb
Wall cherry pick
mattdurham Jul 14, 2021
4ad88ea
Import Kafka
mattdurham Jul 14, 2021
e6c4e6f
Bump version number to v0.17.0
mattdurham Jul 15, 2021
e2488f8
Initial release of v0.18.0 includes github_exporter, enabled flag iss…
mattdurham Jul 29, 2021
4353bf0
Tempo/traces docs fixes for v0.18.0 (#784)
mapno Jul 30, 2021
2f8cd30
Needs to be loki for the naming change
mattdurham Jul 30, 2021
d32f93a
Update date
mattdurham Jul 30, 2021
69f71ce
No change, just trying to trigger drone
mattdurham Jul 30, 2021
bd0c8d8
Fix for drone naming
mattdurham Jul 30, 2021
b378882
Changes that needed to me imported for drone to work.
mattdurham Jul 30, 2021
9c9e07d
Update drone issues
mattdurham Jul 30, 2021
5124c7c
sign drone
mattdurham Jul 30, 2021
dd0e8e5
Drone changes
mattdurham Jul 30, 2021
4428568
Update operator
mattdurham Jul 30, 2021
5b26484
standardize on seego
mattdurham Jul 30, 2021
c321738
Test tag
mattdurham Jul 30, 2021
76be98b
fix tag
mattdurham Jul 30, 2021
80d9e5c
updated makefile
mattdurham Jul 30, 2021
f2e43cc
release tag fixing
mattdurham Jul 30, 2021
c31550d
remove extra tag
mattdurham Jul 30, 2021
c4df89f
consul specific list support added
mattdurham Aug 5, 2021
e865db6
Fix type
mattdurham Aug 5, 2021
c217412
Add comment
mattdurham Aug 5, 2021
0ec83fa
Fix for etcd issue that I introduced
mattdurham Aug 5, 2021
6437ade
Update to v0.18.1
mattdurham Aug 5, 2021
0271e9f
Fix for test error
mattdurham Aug 5, 2021
5520754
Fix small naming/style issues
mattdurham Aug 6, 2021
a1eb30c
Update version number to v0.18.2 and fix issues with prefixes.
mattdurham Aug 12, 2021
945b293
Merge remote-tracking branch 'origin/main' into merge-v0.18.2-to-main
mattdurham Aug 12, 2021
917b659
Update missed merges
mattdurham Aug 12, 2021
4d7ca48
Add operate allowed version
mattdurham Aug 12, 2021
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@
`backend: logs_instance`. (@rfratto)


# v0.18.2 (2021-08-12)

- [BUGFIX] Honor the prefix and remove prefix from consul list results (@mattdurham)

# v0.18.1 (2021-08-09)

- [BUGFIX] Reduce number of consul calls when ran in scrape service mode (@mattdurham)
Expand Down
2 changes: 1 addition & 1 deletion docs/operator/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ spec:
serviceAccountName: grafana-agent-operator
containers:
- name: operator
image: grafana/agent-operator:v0.18.1
image: grafana/agent-operator:v0.18.2
---

apiVersion: v1
Expand Down
1 change: 1 addition & 0 deletions pkg/operator/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ var (
"v0.17.0",
"v0.18.0",
"v0.18.1",
"v0.18.2",

// NOTE(rfratto): when performing an upgrade, add the newest version above instead of changing the existing reference.
}
Expand Down
23 changes: 12 additions & 11 deletions pkg/prom/instance/configstore/remote.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ import (

"github.com/weaveworks/common/instrument"

"github.com/cortexproject/cortex/pkg/ring/kv/consul"

"github.com/hashicorp/go-cleanhttp"

"github.com/hashicorp/consul/api"
Expand Down Expand Up @@ -59,8 +57,8 @@ type Remote struct {
// consul kv stores
type agentRemoteClient struct {
kv.Client
consul *api.Client
consulConfig consul.Config
consul *api.Client
config kv.Config
}

// NewRemote creates a new Remote store that uses a Key-Value client to store
Expand Down Expand Up @@ -102,7 +100,7 @@ func (r *Remote) ApplyConfig(cfg kv.Config, enable bool) error {
r.reg.UnregisterAll()

if !enable {
r.setClient(nil, nil)
r.setClient(nil, nil, kv.Config{})
return nil
}

Expand All @@ -129,19 +127,20 @@ func (r *Remote) ApplyConfig(cfg kv.Config, enable bool) error {
return fmt.Errorf("failed to create kv client: %w", err)
}

r.setClient(cli, consulClient)
r.setClient(cli, consulClient, cfg)
return nil
}

// setClient sets the active client and notifies run to restart the
// kv watcher.
func (r *Remote) setClient(client kv.Client, consulClient *api.Client) {
func (r *Remote) setClient(client kv.Client, consulClient *api.Client, config kv.Config) {
if client == nil && consulClient == nil {
r.kv = nil
} else {
r.kv = &agentRemoteClient{
Client: client,
consul: consulClient,
config: config,
}
}
r.reloadKV <- struct{}{}
Expand Down Expand Up @@ -227,14 +226,13 @@ func (r *Remote) listConsul(ctx context.Context) (api.KVPairs, error) {

var pairs api.KVPairs
options := &api.QueryOptions{
AllowStale: !r.kv.consulConfig.ConsistentReads,
RequireConsistent: r.kv.consulConfig.ConsistentReads,
AllowStale: !r.kv.config.Consul.ConsistentReads,
RequireConsistent: r.kv.config.Consul.ConsistentReads,
}
// This is copied from cortex list so that stats stay the same
err := instrument.CollectedRequest(ctx, "List", consulRequestDuration, instrument.ErrorCode, func(ctx context.Context) error {
var err error
// This mirrors the default prefix in cortex
pairs, _, err = r.kv.consul.KV().List("configurations/", options.WithContext(ctx))
pairs, _, err = r.kv.consul.KV().List(r.kv.config.Prefix, options.WithContext(ctx))
return err
})

Expand All @@ -246,6 +244,9 @@ func (r *Remote) listConsul(ctx context.Context) (api.KVPairs, error) {
blankPairs := make(api.KVPairs, 0)
return blankPairs, nil
}
for _, kvp := range pairs {
kvp.Key = strings.TrimPrefix(kvp.Key, r.kv.config.Prefix)
}
return pairs, nil
}

Expand Down
2 changes: 1 addition & 1 deletion production/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,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.18.1
grafana/agent:v0.18.2
```

## Running the Agent locally
Expand Down
2 changes: 1 addition & 1 deletion production/grafanacloud-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ PACKAGE_SYSTEM=${PACKAGE_SYSTEM:=}
#
# Global constants.
#
RELEASE_VERSION="0.18.1"
RELEASE_VERSION="0.18.2"

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.18.1
image: grafana/agent:v0.18.2
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.18.1
image: grafana/agent:v0.18.2
imagePullPolicy: IfNotPresent
name: agent
ports:
Expand Down
2 changes: 1 addition & 1 deletion production/kubernetes/agent-tempo.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.18.1
image: grafana/agent:v0.18.2
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.18.1'
'grafana/agent:v0.18.2'
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.18.1
MANIFEST_BRANCH=v0.18.2
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/tempo.libsonnet') +
{
_images:: {
agent: 'grafana/agent:v0.18.1',
agentctl: 'grafana/agentctl:v0.18.1',
agent: 'grafana/agent:v0.18.2',
agentctl: 'grafana/agentctl:v0.18.2',
},

// new creates a new DaemonSet deployment of the grafana-agent. By default,
Expand Down