Skip to content

Commit

Permalink
Merge pull request #137 from projectsyn/feat/use-priorityclass
Browse files Browse the repository at this point in the history
Add priorityclass system-cluster-critical to operator
  • Loading branch information
DebakelOrakel authored Apr 18, 2024
2 parents ea14b07 + 47b0b1a commit 381ca9c
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 0 deletions.
3 changes: 3 additions & 0 deletions class/backup-k8up.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,6 @@ parameters:
- type: jsonnet
filter: postprocess/optional_global_config.jsonnet
path: ${_instance}/01_k8up_helmchart/k8up/templates
- type: jsonnet
filter: postprocess/add_priorityclass.jsonnet
path: ${_instance}/01_k8up_helmchart/k8up/templates
1 change: 1 addition & 0 deletions class/defaults.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ parameters:
helmReleaseName: k8up

namespace: syn-backup-k8up
priorityClass: system-cluster-critical

helmValues:
replicaCount: 1
Expand Down
20 changes: 20 additions & 0 deletions postprocess/add_priorityclass.jsonnet
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
local com = import 'lib/commodore.libjsonnet';
local inv = com.inventory();
// The hiera parameters for the component
local params = inv.parameters.backup_k8up;

local priotityclassPatch = {
spec+: {
template+: {
spec+: {
priorityClassName: params.priorityClass,
},
},
},
};

local deployFile = com.yaml_load(std.extVar('output_path') + '/' + 'deployment.yaml');

{
deployment: deployFile + priotityclassPatch,
}
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,5 @@ spec:
requests:
cpu: 20m
memory: 128Mi
priorityClassName: system-cluster-critical
serviceAccountName: k8up

0 comments on commit 381ca9c

Please sign in to comment.