Skip to content

Commit

Permalink
Add modifyset for removing Azure spot taint (#93)
Browse files Browse the repository at this point in the history
  • Loading branch information
jimgus authored Jan 27, 2023
1 parent 02e6827 commit aaa4ca5
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@ generate: get-external
cp $$D $$CONTRAINTS_GENERATED/$$FILENAME
done

MODIFYSETS_LIBRARY=$$(ls -d ./library/modifysets/*)
for D in $$MODIFYSETS_LIBRARY
do
FILENAME=$$(basename $$D)
cp $$D $$CONTRAINTS_GENERATED/$$FILENAME
done

CONSTRAINT_LIBRARY=$$(ls -d ./library/constraints/*/)
for D in $$CONSTRAINT_LIBRARY
do
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: mutations.gatekeeper.sh/v1beta1
kind: ModifySet
metadata:
name: remove-azure-node-spot-taints
spec:
location: "spec.taints"
applyTo:
- groups: [""]
kinds: ["Node"]
versions: ["v1"]
parameters:
operation: prune
values:
fromList:
- effect: NoSchedule
key: kubernetes.azure.com/scalesetpriority
value: spot
17 changes: 17 additions & 0 deletions library/modifysets/remove-azure-node-spot-taints.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: mutations.gatekeeper.sh/v1beta1
kind: ModifySet
metadata:
name: remove-azure-node-spot-taints
spec:
location: "spec.taints"
applyTo:
- groups: [""]
kinds: ["Node"]
versions: ["v1"]
parameters:
operation: prune
values:
fromList:
- effect: NoSchedule
key: kubernetes.azure.com/scalesetpriority
value: spot

0 comments on commit aaa4ca5

Please sign in to comment.