Skip to content

Commit

Permalink
fix: Use Deployment selector for create-default-pdb
Browse files Browse the repository at this point in the history
Signed-off-by: Mike Bryant <[email protected]>
  • Loading branch information
mikebryant committed Oct 17, 2023
1 parent 3a9624e commit 59adc0e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
6 changes: 3 additions & 3 deletions other/b-d/create-default-pdb/artifacthub-pkg.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: create-default-pdb
version: 1.0.0
version: 1.0.1
displayName: Add Pod Disruption Budget
createdAt: "2023-04-10T20:30:03.000Z"
description: >-
Expand All @@ -13,9 +13,9 @@ keywords:
- Sample
readme: |
A PodDisruptionBudget limits the number of Pods of a replicated application that are down simultaneously from voluntary disruptions. For example, a quorum-based application would like to ensure that the number of replicas running is never brought below the number needed for a quorum. As an application owner, you can create a PodDisruptionBudget (PDB) for each application. This policy will create a PDB resource whenever a new Deployment is created.
Refer to the documentation for more details on Kyverno annotations: https://artifacthub.io/docs/topics/annotations/kyverno/
annotations:
kyverno/category: "Sample"
kyverno/subject: "Deployment"
digest: 70923b5a8374896a7092cdda3effd04d66316bec4e41afc8c46a214806d1158d
digest: 907d2448433a9e51ebe3836557ab0328ebb928ddd1495e04a86097495d733de2
4 changes: 1 addition & 3 deletions other/b-d/create-default-pdb/create-default-pdb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,4 @@ spec:
data:
spec:
minAvailable: 1
selector:
matchLabels:
"{{request.object.metadata.labels}}"
selector: "{{request.object.spec.selector}}"
1 change: 0 additions & 1 deletion other/b-d/create-default-pdb/pdb-generated.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ spec:
selector:
matchLabels:
app: busybox
foo: bar

0 comments on commit 59adc0e

Please sign in to comment.