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

ksonnet: do not deploy table manager when shipper is in-use #11020

Merged
merged 6 commits into from
Oct 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@

#### Jsonnet

* [11020](https://github.com/grafana/loki/pull/11020) **ashwanthgoli**: Loki ksonnet: Do not generate table-manager manifests if shipper store is in-use.

* [10784](https://github.com/grafana/loki/pull/10894) **slim-bean** Update index gateway client to use a headless service.

* [10542](https://github.com/grafana/loki/pull/10542) **chaudum**: Remove legacy deployment mode for ingester (Deployment, without WAL) and instead always run them as StatefulSet.
Expand Down
3 changes: 2 additions & 1 deletion production/ksonnet/loki/loki.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
(import 'distributor.libsonnet') +
(import 'ingester.libsonnet') +
(import 'querier.libsonnet') +
(import 'table-manager.libsonnet') +
(import 'query-frontend.libsonnet') +
(import 'ruler.libsonnet') +

Expand All @@ -27,6 +26,8 @@
// BoltDB and TSDB Shipper support. Anything that modifies the compactor must be imported after this.
(import 'shipper.libsonnet') +

(import 'table-manager.libsonnet') +

// Multi-zone ingester related config
(import 'multi-zone.libsonnet') +

Expand Down
20 changes: 14 additions & 6 deletions production/ksonnet/loki/table-manager.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ local k = import 'ksonnet-util/kausal.libsonnet';
'bigtable.table-cache.enabled': true,
},

table_manager_container::
table_manager_container:: if !$._config.using_shipper_store then
container.new('table-manager', $._images.tableManager) +
container.withPorts($.util.defaultPorts) +
container.withArgsMixin(k.util.mapToFlags($.table_manager_args)) +
Expand All @@ -27,15 +27,23 @@ local k = import 'ksonnet-util/kausal.libsonnet';
container.mixin.readinessProbe.withTimeoutSeconds(1) +
container.withEnvMixin($._config.commonEnvs) +
k.util.resourcesRequests('100m', '100Mi') +
k.util.resourcesLimits('200m', '200Mi'),
k.util.resourcesLimits('200m', '200Mi')
else {},

local deployment = k.apps.v1.deployment,

table_manager_deployment:
table_manager_deployment: if !$._config.using_shipper_store then
deployment.new('table-manager', 1, [$.table_manager_container]) +
$.config_hash_mixin +
k.util.configVolumeMount('loki', '/etc/loki/config'),
k.util.configVolumeMount('loki', '/etc/loki/config')
else {},

table_manager_service:
k.util.serviceFor($.table_manager_deployment, $._config.service_ignored_labels),

table_manager_service: if !$._config.using_shipper_store then
k.util.serviceFor($.table_manager_deployment, $._config.service_ignored_labels)
else {},

_config+: {
table_manager: if !$._config.using_shipper_store then super.table_manager else null,
},
}