diff --git a/CHANGELOG.md b/CHANGELOG.md index 8fb2f36c..fe9e765f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ We use *breaking* word for marking changes that are not backward compatible (rel - [#170](https://github.com/thanos-io/kube-thanos/pull/170) Add Store shard and Receive hashring helpers - [#173](https://github.com/thanos-io/kube-thanos/pull/173) Store, query, frontend: add log.format flag +- [#178](https://github.com/thanos-io/kube-thanos/pull/178) compact, rule, tools: add log format flag ### Fixed diff --git a/examples/all/manifests/thanos-bucket-deployment.yaml b/examples/all/manifests/thanos-bucket-deployment.yaml index afca65a9..adb7ce0a 100644 --- a/examples/all/manifests/thanos-bucket-deployment.yaml +++ b/examples/all/manifests/thanos-bucket-deployment.yaml @@ -29,6 +29,7 @@ spec: - bucket - web - --log.level=info + - --log.format=logfmt - --objstore.config=$(OBJSTORE_CONFIG) - |- --tracing.config="config": diff --git a/examples/all/manifests/thanos-compact-statefulSet.yaml b/examples/all/manifests/thanos-compact-statefulSet.yaml index afd8e85f..b6b2f5ff 100644 --- a/examples/all/manifests/thanos-compact-statefulSet.yaml +++ b/examples/all/manifests/thanos-compact-statefulSet.yaml @@ -29,6 +29,7 @@ spec: - compact - --wait - --log.level=info + - --log.format=logfmt - --objstore.config=$(OBJSTORE_CONFIG) - --data-dir=/var/thanos/compact - --debug.accept-malformed-index diff --git a/examples/all/manifests/thanos-receive-default-statefulSet.yaml b/examples/all/manifests/thanos-receive-default-statefulSet.yaml index 235d1d99..53c0d51b 100644 --- a/examples/all/manifests/thanos-receive-default-statefulSet.yaml +++ b/examples/all/manifests/thanos-receive-default-statefulSet.yaml @@ -65,6 +65,7 @@ spec: - args: - receive - --log.level=info + - --log.format=logfmt - --grpc-address=0.0.0.0:10901 - --http-address=0.0.0.0:10902 - --remote-write.address=0.0.0.0:19291 diff --git a/examples/all/manifests/thanos-receive-region-1-statefulSet.yaml b/examples/all/manifests/thanos-receive-region-1-statefulSet.yaml index 66c39cb6..ddde0710 100644 --- a/examples/all/manifests/thanos-receive-region-1-statefulSet.yaml +++ b/examples/all/manifests/thanos-receive-region-1-statefulSet.yaml @@ -65,6 +65,7 @@ spec: - args: - receive - --log.level=info + - --log.format=logfmt - --grpc-address=0.0.0.0:10901 - --http-address=0.0.0.0:10902 - --remote-write.address=0.0.0.0:19291 diff --git a/examples/all/manifests/thanos-receive-statefulSet.yaml b/examples/all/manifests/thanos-receive-statefulSet.yaml index 6441450f..6df73f4e 100644 --- a/examples/all/manifests/thanos-receive-statefulSet.yaml +++ b/examples/all/manifests/thanos-receive-statefulSet.yaml @@ -61,6 +61,7 @@ spec: - args: - receive - --log.level=info + - --log.format=logfmt - --grpc-address=0.0.0.0:10901 - --http-address=0.0.0.0:10902 - --remote-write.address=0.0.0.0:19291 diff --git a/examples/all/manifests/thanos-rule-statefulSet.yaml b/examples/all/manifests/thanos-rule-statefulSet.yaml index cc47d944..38a91b1e 100644 --- a/examples/all/manifests/thanos-rule-statefulSet.yaml +++ b/examples/all/manifests/thanos-rule-statefulSet.yaml @@ -28,6 +28,7 @@ spec: - args: - rule - --log.level=info + - --log.format=logfmt - --grpc-address=0.0.0.0:10901 - --http-address=0.0.0.0:10902 - --objstore.config=$(OBJSTORE_CONFIG) diff --git a/jsonnet/kube-thanos/kube-thanos-bucket.libsonnet b/jsonnet/kube-thanos/kube-thanos-bucket.libsonnet index 623cfb29..6ab88821 100644 --- a/jsonnet/kube-thanos/kube-thanos-bucket.libsonnet +++ b/jsonnet/kube-thanos/kube-thanos-bucket.libsonnet @@ -10,6 +10,7 @@ local defaults = { objectStorageConfig: error 'must provide objectStorageConfig', resources: {}, logLevel: 'info', + logFormat: 'logfmt', ports: { http: 10902, }, @@ -71,6 +72,7 @@ function(params) { 'bucket', 'web', '--log.level=' + tb.config.logLevel, + '--log.format=' + tb.config.logFormat, '--objstore.config=$(OBJSTORE_CONFIG)', ] + ( if std.length(tb.config.tracing) > 0 then [ diff --git a/jsonnet/kube-thanos/kube-thanos-compact.libsonnet b/jsonnet/kube-thanos/kube-thanos-compact.libsonnet index 02ca1ef9..c6bc7f2a 100644 --- a/jsonnet/kube-thanos/kube-thanos-compact.libsonnet +++ b/jsonnet/kube-thanos/kube-thanos-compact.libsonnet @@ -10,6 +10,7 @@ local defaults = { objectStorageConfig: error 'must provide objectStorageConfig', resources: {}, logLevel: 'info', + logFormat: 'logfmt', serviceMonitor: false, volumeClaimTemplate: {}, retentionResolutionRaw: '0d', @@ -81,6 +82,7 @@ function(params) { 'compact', '--wait', '--log.level=' + tc.config.logLevel, + '--log.format=' + tc.config.logFormat, '--objstore.config=$(OBJSTORE_CONFIG)', '--data-dir=/var/thanos/compact', '--debug.accept-malformed-index', diff --git a/jsonnet/kube-thanos/kube-thanos-receive-default-params.libsonnet b/jsonnet/kube-thanos/kube-thanos-receive-default-params.libsonnet index 5c64c9bb..c9fe64fc 100644 --- a/jsonnet/kube-thanos/kube-thanos-receive-default-params.libsonnet +++ b/jsonnet/kube-thanos/kube-thanos-receive-default-params.libsonnet @@ -15,6 +15,7 @@ volumeClaimTemplate: {}, retention: '15d', logLevel: 'info', + logFormat: 'logfmt', resources: {}, serviceMonitor: false, ports: { diff --git a/jsonnet/kube-thanos/kube-thanos-receive.libsonnet b/jsonnet/kube-thanos/kube-thanos-receive.libsonnet index 5aaa996a..b4b9fa06 100644 --- a/jsonnet/kube-thanos/kube-thanos-receive.libsonnet +++ b/jsonnet/kube-thanos/kube-thanos-receive.libsonnet @@ -49,6 +49,7 @@ function(params) { args: [ 'receive', '--log.level=' + tr.config.logLevel, + '--log.format=' + tr.config.logFormat, '--grpc-address=0.0.0.0:%d' % tr.config.ports.grpc, '--http-address=0.0.0.0:%d' % tr.config.ports.http, '--remote-write.address=0.0.0.0:%d' % tr.config.ports['remote-write'], diff --git a/jsonnet/kube-thanos/kube-thanos-rule.libsonnet b/jsonnet/kube-thanos/kube-thanos-rule.libsonnet index 50980760..58302ce3 100644 --- a/jsonnet/kube-thanos/kube-thanos-rule.libsonnet +++ b/jsonnet/kube-thanos/kube-thanos-rule.libsonnet @@ -14,6 +14,7 @@ local defaults = { alertmanagersURLs: [], queriers: [], logLevel: 'info', + logFormat: 'logfmt', resources: {}, serviceMonitor: false, ports: { @@ -83,6 +84,7 @@ function(params) { [ 'rule', '--log.level=' + tr.config.logLevel, + '--log.format=' + tr.config.logFormat, '--grpc-address=0.0.0.0:%d' % tr.config.ports.grpc, '--http-address=0.0.0.0:%d' % tr.config.ports.http, '--objstore.config=$(OBJSTORE_CONFIG)',