Skip to content

Commit

Permalink
fix(artifact-caching-proxy) set a default of 1 min available on PDB
Browse files Browse the repository at this point in the history
Signed-off-by: Damien Duportal <[email protected]>
  • Loading branch information
dduportal committed Oct 3, 2023
1 parent 121b052 commit 6d43c1a
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 4 deletions.
2 changes: 1 addition & 1 deletion charts/artifact-caching-proxy/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ apiVersion: v2
description: artifact-caching-proxy is a Nginx caching proxy in front of repo.jenkins-ci.org
name: artifact-caching-proxy
type: application
version: 0.15.0
version: 0.15.1
21 changes: 18 additions & 3 deletions charts/artifact-caching-proxy/tests/custom_values_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,34 @@ tests:
path: metadata.annotations
value:
a-custom/annotation: "hello world"

- it: should ensure the pdb has correct spec
- 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: "artifact-caching-proxy"
- it: should create a PDB with the custom setup when custom values are set
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: "artifact-caching-proxy"
2 changes: 2 additions & 0 deletions charts/artifact-caching-proxy/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,5 @@ proxy:
# http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_cache_bypass
proxyBypass:
enabled: false
poddisruptionbudget:
minAvailable: 1

0 comments on commit 6d43c1a

Please sign in to comment.