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: Add a Pod Disruption Budget to Loki Ingesters #2373

Merged
merged 1 commit into from
Jul 17, 2020
Merged
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
13 changes: 12 additions & 1 deletion production/ksonnet/loki/ingester.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@

local deployment = $.apps.v1.deployment,

local name = 'ingester',

ingester_deployment:
deployment.new('ingester', 3, [$.ingester_container]) +
deployment.new(name, 3, [$.ingester_container]) +
$.config_hash_mixin +
$.util.configVolumeMount('loki', '/etc/loki/config') +
$.util.configVolumeMount('overrides', '/etc/loki/overrides') +
Expand All @@ -32,4 +34,13 @@

ingester_service:
$.util.serviceFor($.ingester_deployment),

local podDisruptionBudget = $.policy.v1beta1.podDisruptionBudget,

ingester_pdb:
podDisruptionBudget.new() +
podDisruptionBudget.mixin.metadata.withName('loki-ingester-pdb') +
podDisruptionBudget.mixin.metadata.withLabels({ name: 'loki-ingester-pdb' }) +
podDisruptionBudget.mixin.spec.selector.withMatchLabels({ name: name }) +
podDisruptionBudget.mixin.spec.withMaxUnavailable(1),
}