Skip to content

Commit

Permalink
fix: Allow multiple imagePullSecrets to work
Browse files Browse the repository at this point in the history
This fixes an issue where the extra indentation causes invalid yaml if 2+ imagePullSecrets are specified.

Also don't set them at all if not asked for - this fixes an issue for us where it conflicts with a kyverno ClusterPolicy that defaults our imagePullSecrets for everything, and the explicit setting of [] was causing a persistent diff in ArgoCD
  • Loading branch information
mikebryant authored and estahn committed Oct 1, 2024
1 parent a94a1c6 commit b19efe4
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion charts/httpbingo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ A reasonably complete and well-tested golang port of httpbin, with zero dependen
| tolerations | list | `[]` | |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0)
Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1)
4 changes: 2 additions & 2 deletions charts/k8s-image-swapper/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: k8s-image-swapper
description: Mirror images into your own registry and swap image references automatically.
type: application
version: 1.10.3
version: 1.10.4
appVersion: 1.5.10
home: https://github.com/estahn/charts/tree/main/charts/k8s-image-swapper
keywords:
Expand All @@ -15,7 +15,7 @@ maintainers:
name: estahn
annotations:
artifacthub.io/changes: |
- "Add webhook timeoutSeconds to allow configuration how long the api server should wait for webhook"
- "Allow 2+ imagePullSecrets"
artifacthub.io/images: |
- name: k8s-image-webhook
image: ghcr.io/estahn/k8s-image-swapper:1.5.10
4 changes: 2 additions & 2 deletions charts/k8s-image-swapper/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# k8s-image-swapper

![Version: 1.10.3](https://img.shields.io/badge/Version-1.10.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.5.10](https://img.shields.io/badge/AppVersion-1.5.10-informational?style=flat-square)
![Version: 1.10.4](https://img.shields.io/badge/Version-1.10.4-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.5.10](https://img.shields.io/badge/AppVersion-1.5.10-informational?style=flat-square)

Mirror images into your own registry and swap image references automatically.

Expand Down Expand Up @@ -90,4 +90,4 @@ Mirror images into your own registry and swap image references automatically.
| webhook.timeoutSeconds | int | `10` | |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0)
Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1)
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ metadata:
{{- with .Values.serviceAccount.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
imagePullSecrets:
{{ toYaml .Values.imagePullSecrets | indent 2 }}
{{ with .Values.imagePullSecrets }}
imagePullSecrets: {{ toYaml . | nindent 2 }}
{{- end -}}
{{- end }}
5 changes: 3 additions & 2 deletions charts/k8s-image-swapper/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ metadata:
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
imagePullSecrets:
{{ toYaml .Values.imagePullSecrets | indent 2 }}
{{ with .Values.imagePullSecrets }}
imagePullSecrets: {{ toYaml . | nindent 2 }}
{{- end -}}
{{- end }}

0 comments on commit b19efe4

Please sign in to comment.