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

nit: fix formatting for ksonnet/loki #2719

Merged
merged 1 commit into from
Oct 5, 2020
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
16 changes: 8 additions & 8 deletions production/ksonnet/loki/boltdb_shipper.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@
pvc.mixin.spec.resources.withRequests({ storage: $._config.compactor_pvc_size }) +
pvc.mixin.spec.withAccessModes(['ReadWriteOnce']) +
pvc.mixin.spec.withStorageClassName('fast')
else {},
else {},

compactor_args:: if $._config.using_boltdb_shipper then {
'config.file': '/etc/loki/config/config.yaml',
'boltdb.shipper.compactor.working-directory': '/data/compactor',
'boltdb.shipper.compactor.shared-store': $._config.boltdb_shipper_shared_store,
target: 'compactor',
} else {},
'config.file': '/etc/loki/config/config.yaml',
'boltdb.shipper.compactor.working-directory': '/data/compactor',
'boltdb.shipper.compactor.shared-store': $._config.boltdb_shipper_shared_store,
target: 'compactor',
} else {},

local compactor_ports =
[
Expand All @@ -71,7 +71,7 @@
container.mixin.readinessProbe.httpGet.withPort($._config.http_listen_port) +
container.mixin.readinessProbe.withTimeoutSeconds(1) +
$.util.resourcesRequests('4', '2Gi')
else {},
else {},

compactor_statefulset: if $._config.using_boltdb_shipper then
statefulSet.new('compactor', 1, [$.compactor_container], $.compactor_data_pvc) +
Expand All @@ -80,5 +80,5 @@
$.util.configVolumeMount('loki', '/etc/loki/config') +
statefulSet.mixin.spec.updateStrategy.withType('RollingUpdate') +
statefulSet.mixin.spec.template.spec.securityContext.withFsGroup(10001) // 10001 is the group ID assigned to Loki in the Dockerfile
else {}
else {},
}
22 changes: 11 additions & 11 deletions production/ksonnet/loki/ingester.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
$._config.commonArgs {
target: 'ingester',
} + if $._config.stateful_ingesters then
{
// Disable chunk transfer when using statefulset since ingester which is going down won't find another
// ingester which is joining the ring for transferring chunks.
'ingester.max-transfer-retries': 0,
} else {},
{
// Disable chunk transfer when using statefulset since ingester which is going down won't find another
// ingester which is joining the ring for transferring chunks.
'ingester.max-transfer-retries': 0,
} else {},

ingester_container::
container.new('ingester', $._images.ingester) +
Expand All @@ -25,9 +25,9 @@
$.util.resourcesRequests('1', '5Gi') +
$.util.resourcesLimits('2', '10Gi') +
if $._config.stateful_ingesters then
container.withVolumeMountsMixin([
volumeMount.new('ingester-data', '/data'),
]) else {},
container.withVolumeMountsMixin([
volumeMount.new('ingester-data', '/data'),
]) else {},

local deployment = $.apps.v1.deployment,

Expand All @@ -43,14 +43,14 @@
deployment.mixin.spec.strategy.rollingUpdate.withMaxSurge(0) +
deployment.mixin.spec.strategy.rollingUpdate.withMaxUnavailable(1) +
deployment.mixin.spec.template.spec.withTerminationGracePeriodSeconds(4800)
else {},
else {},

ingester_data_pvc:: if $._config.stateful_ingesters then
pvc.new('ingester-data') +
pvc.mixin.spec.resources.withRequests({ storage: '10Gi' }) +
pvc.mixin.spec.withAccessModes(['ReadWriteOnce']) +
pvc.mixin.spec.withStorageClassName('fast')
else {},
else {},

ingester_statefulset: if $._config.stateful_ingesters then
statefulSet.new('ingester', 3, [$.ingester_container], $.ingester_data_pvc) +
Expand All @@ -62,7 +62,7 @@
statefulSet.mixin.spec.updateStrategy.withType('RollingUpdate') +
statefulSet.mixin.spec.template.spec.securityContext.withFsGroup(10001) + // 10001 is the group ID assigned to Loki in the Dockerfile
statefulSet.mixin.spec.template.spec.withTerminationGracePeriodSeconds(4800)
else {},
else {},

ingester_service:
if !$._config.stateful_ingesters then
Expand Down
6 changes: 3 additions & 3 deletions production/ksonnet/loki/querier.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@
$.util.configVolumeMount('loki', '/etc/loki/config') +
$.util.configVolumeMount('overrides', '/etc/loki/overrides') +
$.util.antiAffinity
else {},
else {},

// PVC for queriers when running as statefulsets
querier_data_pvc:: if $._config.stateful_queriers then
pvc.new('querier-data') +
pvc.mixin.spec.resources.withRequests({ storage: $._config.querier_pvc_size }) +
pvc.mixin.spec.withAccessModes(['ReadWriteOnce']) +
pvc.mixin.spec.withStorageClassName('fast')
else {},
else {},

querier_statefulset: if $._config.stateful_queriers then
statefulSet.new('querier', 3, [$.querier_container], $.querier_data_pvc) +
Expand All @@ -50,7 +50,7 @@
$.util.antiAffinity +
statefulSet.mixin.spec.updateStrategy.withType('RollingUpdate') +
statefulSet.mixin.spec.template.spec.securityContext.withFsGroup(10001) // 10001 is the group ID assigned to Loki in the Dockerfile
else {},
else {},

querier_service:
if !$._config.stateful_queriers then
Expand Down