Skip to content

Commit

Permalink
Add PDB for distributors
Browse files Browse the repository at this point in the history
  • Loading branch information
poyzannur committed Feb 27, 2025
1 parent a250055 commit 8639b8f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions production/ksonnet/loki/distributor.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,14 @@ local k = import 'ksonnet-util/kausal.libsonnet';
else
k.util.antiAffinity,

distributor_pdb:
local podDisruptionBudget = $.policy.v1.podDisruptionBudget;

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

distributor_service:
k.util.serviceFor($.distributor_deployment, $._config.service_ignored_labels),
}

0 comments on commit 8639b8f

Please sign in to comment.