Skip to content

Commit

Permalink
Add priorityclass system-cluster-critical to operator
Browse files Browse the repository at this point in the history
Ensure this component has precedence over user deployed workload.
  • Loading branch information
DebakelOrakel committed Apr 17, 2024
1 parent 101fe4a commit 7b00d34
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
13 changes: 13 additions & 0 deletions component/alerts-exporter.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,18 @@ local extraArgsPatch = [
value: arg,
}, params.exporter.extraArgs);

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

com.Kustomization(
'%(repository)s//%(subdir)s' % params.manifests,
params.manifests.version,
Expand All @@ -66,6 +78,7 @@ com.Kustomization(
name: 'alerts-exporter',
},
},
setPriorityClass,
],
labels+: [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ spec:
capabilities:
drop:
- ALL
priorityClassName: system-cluster-critical
securityContext:
runAsNonRoot: true
seccompProfile:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ spec:
capabilities:
drop:
- ALL
priorityClassName: system-cluster-critical
securityContext:
runAsNonRoot: true
seccompProfile:
Expand Down

0 comments on commit 7b00d34

Please sign in to comment.