diff --git a/charts/uplink/tests/custom_values_test.yaml b/charts/uplink/tests/custom_values_test.yaml index 4d13316fe..4c716eff6 100644 --- a/charts/uplink/tests/custom_values_test.yaml +++ b/charts/uplink/tests/custom_values_test.yaml @@ -30,18 +30,34 @@ tests: - equal: path: data['sentry.dsn'] value: "ZXhhbXBsZS1kc24=" # Base64 encoded value of "example-dsn" + - it: should create a PDB with defaults when multiple replicas are set + template: pdb.yaml + set: + replicaCount: 2 + asserts: + - isKind: + of: PodDisruptionBudget + - equal: + path: spec.minAvailable + value: 1 + - equal: + path: spec.selector.matchLabels['app.kubernetes.io/name'] + value: "uplink" - it: should ensure the pdb has correct spec template: pdb.yaml set: replicaCount: 2 poddisruptionbudget.minAvailable: 2 - poddisruptionbudget.maxUnavailable: 1 + poddisruptionbudget.maxUnavailable: 3 asserts: - isKind: of: PodDisruptionBudget - equal: path: spec.minAvailable value: 2 + - equal: + path: spec.maxUnavailable + value: 3 - equal: path: spec.selector.matchLabels['app.kubernetes.io/name'] value: "uplink" diff --git a/charts/uplink/values.yaml b/charts/uplink/values.yaml index b941bbd12..fd4f6b78a 100644 --- a/charts/uplink/values.yaml +++ b/charts/uplink/values.yaml @@ -60,3 +60,5 @@ client: secret: "" sentry: dsn: "" +poddisruptionbudget: + minAvailable: 1