Skip to content

Commit ab9fb0d

Browse files
black-dragon74mergify[bot]
authored andcommitted
bundle: add ability to inject priorityClassName
This patch adds the ability to inject a priorityClassName to the generated bundle. Signed-off-by: Niraj Yadav <[email protected]>
1 parent 5e1cd22 commit ab9fb0d

2 files changed

Lines changed: 27 additions & 3 deletions

File tree

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,20 @@
1-
---
21
# These resources constitute the fully configured set of manifests
32
# used to generate the 'manifests/' directory in a bundle.
43
resources:
5-
- ../default
6-
- ../scorecard
4+
- ../default
5+
- ../scorecard
6+
apiVersion: kustomize.config.k8s.io/v1beta1
7+
kind: Kustomization
8+
patches:
9+
# Inject a `priorityClassName` into the controller Deployment so that the pod
10+
# is scheduled with higher (or lower) priority during cluster resource
11+
# contention.
12+
#
13+
# The default value is `system-cluster-critical`, to change that:
14+
# 1. Edit `manager_priority_patch.yaml`
15+
# 2. Set the desired `priorityClassName`
16+
#
17+
# Reference:
18+
# https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption
19+
#
20+
- path: manager_priority_patch.yaml
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: controller-manager
5+
namespace: system
6+
spec:
7+
template:
8+
spec:
9+
# Name must be an existing priority class in the cluster
10+
priorityClassName: system-cluster-critical

0 commit comments

Comments
 (0)