Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(artifact-caching-proxy) set defaults on PDB #822

Merged
merged 3 commits into from
Oct 4, 2023

Conversation

dduportal
Copy link
Contributor

This PR fixes the error seen in jenkins-infra/kubernetes-management#4460 (review)

[ERROR] templates/: template: artifact-caching-proxy/templates/pdb.yaml:9:18: executing "artifact-caching-proxy/templates/pdb.yaml" at <.Values.poddisruptionbudget.minAvailable>: nil pointer evaluating interface {}.minAvailable

💡Notes:

  • Unit test added to cover the case when a PDB is created because multiple replicas are set up but with its default setup. This unit tests returns the error above with the version 0.15.0 of this chart
  • Unit test added to verify the coverage of custom value maxUnavailable

@dduportal dduportal requested a review from smerle33 October 3, 2023 11:53
@dduportal dduportal added bug Something isn't working artifact-caching-proxy labels Oct 3, 2023
@dduportal
Copy link
Contributor Author

Info: A diff on production with this fix shows the following:

+ # Source: artifact-caching-proxy/templates/pdb.yaml
+ apiVersion: policy/v1
+ kind: PodDisruptionBudget
+ metadata:
+   name: artifact-caching-proxy
+   labels:
+     helm.sh/chart: artifact-caching-proxy-0.15.1
+     app.kubernetes.io/name: artifact-caching-proxy
+     app.kubernetes.io/instance: artifact-caching-proxy
+     app.kubernetes.io/managed-by: Helm
+ spec:
+   minAvailable: 1
+   selector:
+     matchLabels:
+       app.kubernetes.io/name: artifact-caching-proxy
+       app.kubernetes.io/instance: artifact-caching-proxy

which looks good to me!

@dduportal dduportal enabled auto-merge October 4, 2023 10:24
@dduportal dduportal merged commit ecd828c into jenkins-infra:main Oct 4, 2023
2 checks passed
@dduportal dduportal deleted the fix/acp/pdb branch October 4, 2023 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
artifact-caching-proxy bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants