Skip to content

Commit

Permalink
Merge pull request #67 from appuio/feat/use-priorityclass
Browse files Browse the repository at this point in the history
Add priorityclass system-cluster-critical
  • Loading branch information
DebakelOrakel authored Apr 16, 2024
2 parents 38cdaee + 9c4fab6 commit 6d83f8c
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 1 deletion.
1 change: 1 addition & 0 deletions component/blackbox-exporter.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ local deploy = com.namespaced(
},
},
],
priorityClassName: 'system-cluster-critical',
restartPolicy: 'Always',
securityContext: {},
serviceAccountName: sa.metadata.name,
Expand Down
1 change: 1 addition & 0 deletions component/network-canary.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ local ds = kube.DaemonSet('network-canary') {
value: '0 2147483647',
} ],
},
priorityClassName: 'system-node-critical',
tolerations: std.objectValues(params.network_canary.tolerations),
},
},
Expand Down
18 changes: 17 additions & 1 deletion component/scheduler-canary.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,18 @@ local inv = kap.inventory();
local params = inv.parameters.openshift4_slos;


local setPriorityClass = {
patch: |||
- op: add
path: "/spec/template/spec/priorityClassName"
value: "system-cluster-critical"
|||,
target: {
kind: 'Deployment',
name: 'scheduler-canary-controller-manager',
},
};

local kustomization =
if params.canary_scheduler_controller.enabled then
local image = params.images.canary_scheduler_controller;
Expand All @@ -22,7 +34,11 @@ local kustomization =
newName: '%(registry)s/%(image)s' % image,
},
},
params.canary_scheduler_controller.kustomize_input,
params.canary_scheduler_controller.kustomize_input {
patches+: [
setPriorityClass,
],
},
)
else {
kustomization: { resources: [] },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ spec:
name: config
imagePullSecrets: []
initContainers: []
priorityClassName: system-cluster-critical
restartPolicy: Always
securityContext: {}
serviceAccountName: prometheus-blackbox-exporter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ spec:
volumeMounts: []
imagePullSecrets: []
initContainers: []
priorityClassName: system-node-critical
terminationGracePeriodSeconds: 30
tolerations:
- effect: NoSchedule
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ spec:
capabilities:
drop:
- ALL
priorityClassName: system-cluster-critical
securityContext:
runAsNonRoot: true
serviceAccountName: scheduler-canary-controller-manager
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ spec:
initContainers: []
nodeSelector:
node-role.kubernetes.io/worker: 'true'
priorityClassName: system-node-critical
securityContext:
sysctls:
- name: net.ipv4.ping_group_range
Expand Down

0 comments on commit 6d83f8c

Please sign in to comment.