From 1f6550d169e97f75b33de8717adef3aea62c0c33 Mon Sep 17 00:00:00 2001 From: Markus Pesch Date: Tue, 26 Nov 2024 19:53:04 +0100 Subject: [PATCH] test(deployment): tolerations --- unittests/deployment/deployment.yaml | 18 ++++++++++++++++++ values.yaml | 4 ++++ 2 files changed, 22 insertions(+) diff --git a/unittests/deployment/deployment.yaml b/unittests/deployment/deployment.yaml index 6e9ab7f..2a37088 100644 --- a/unittests/deployment/deployment.yaml +++ b/unittests/deployment/deployment.yaml @@ -86,6 +86,8 @@ tests: - equal: path: spec.template.spec.terminationGracePeriodSeconds value: 60 + - notExists: + path: spec.template.spec.tolerations - it: Test additional arguments set: @@ -304,6 +306,22 @@ tests: path: spec.template.spec.terminationGracePeriodSeconds value: 120 +- it: Test tolerations + set: + deployment.tolerations: + - key: database/type + operator: Equal + value: postgres + effect: NoSchedule + asserts: + - equal: + path: spec.template.spec.tolerations + value: + - key: database/type + operator: Equal + value: postgres + effect: NoSchedule + - it: Test additional volumeMounts and volumes set: deployment.postgresExporter.volumeMounts: diff --git a/values.yaml b/values.yaml index dc541f0..36606df 100644 --- a/values.yaml +++ b/values.yaml @@ -225,6 +225,10 @@ deployment: ## @param deployment.tolerations Tolerations of the postgres-exporter deployment. tolerations: [] + # - key: database/type + # operator: Equal + # value: postgres + # effect: NoSchedule ## @param deployment.topologySpreadConstraints TopologySpreadConstraints of the postgres-exporter deployment. topologySpreadConstraints: []