diff --git a/charts/k8s-image-swapper/Chart.yaml b/charts/k8s-image-swapper/Chart.yaml index 0d0b473..7dbef19 100644 --- a/charts/k8s-image-swapper/Chart.yaml +++ b/charts/k8s-image-swapper/Chart.yaml @@ -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.6.1 +version: 1.6.2 appVersion: 1.4.1 home: https://github.com/estahn/charts/tree/main/charts/k8s-image-swapper keywords: @@ -15,7 +15,7 @@ maintainers: name: estahn annotations: artifacthub.io/changes: | - - "Allow to set custom name for serviceAccount" + - "Add volume mounts support" artifacthub.io/images: | - name: k8s-image-webhook image: ghcr.io/estahn/k8s-image-swapper:1.4.1 diff --git a/charts/k8s-image-swapper/README.md b/charts/k8s-image-swapper/README.md index f87d41f..2e5233f 100644 --- a/charts/k8s-image-swapper/README.md +++ b/charts/k8s-image-swapper/README.md @@ -1,6 +1,6 @@ # k8s-image-swapper -![Version: 1.6.1](https://img.shields.io/badge/Version-1.6.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.4.1](https://img.shields.io/badge/AppVersion-1.4.1-informational?style=flat-square) +![Version: 1.6.2](https://img.shields.io/badge/Version-1.6.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.4.1](https://img.shields.io/badge/AppVersion-1.4.1-informational?style=flat-square) Mirror images into your own registry and swap image references automatically. @@ -65,6 +65,9 @@ Mirror images into your own registry and swap image references automatically. | serviceAccount.annotations | object | `{}` | | | serviceAccount.create | bool | `true` | | | serviceAccount.name | string | `""` | | +| sourceRegistryCA.mount | bool | `false` | | +| sourceRegistryCA.mounts | object | `{}` | | +| sourceRegistryCA.volumes | object | `{}` | | | tolerations | list | `[]` | | | webhook.failurePolicy | string | `"Ignore"` | | | webhook.namespaceSelector | object | `{}` | | diff --git a/charts/k8s-image-swapper/templates/deployment.yaml b/charts/k8s-image-swapper/templates/deployment.yaml index 81e13ea..0c2985d 100644 --- a/charts/k8s-image-swapper/templates/deployment.yaml +++ b/charts/k8s-image-swapper/templates/deployment.yaml @@ -86,6 +86,9 @@ spec: mountPath: "/usr/local/certificates/" readOnly: true {{- end }} + {{- if .Values.sourceRegistryCA.mount }} + {{- toYaml .Values.sourceRegistryCA.mounts | nindent 12 }} + {{- end }} volumes: - name: {{ include "k8s-image-swapper.fullname" . }} configMap: @@ -100,6 +103,9 @@ spec: secret: secretName: {{ template "k8s-image-swapper.fullname". }}-cert {{- end }} + {{- if .Values.sourceRegistryCA.mount }} + {{- toYaml .Values.sourceRegistryCA.volumes | nindent 8}} + {{- end }} {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} diff --git a/charts/k8s-image-swapper/values.schema.json b/charts/k8s-image-swapper/values.schema.json index 2494c47..b4ea544 100644 --- a/charts/k8s-image-swapper/values.schema.json +++ b/charts/k8s-image-swapper/values.schema.json @@ -117,8 +117,7 @@ } }, "imagePullSecrets": { - "type": "array", - "items": {} + "type": "array" }, "nameOverride": { "type": "string" @@ -201,16 +200,12 @@ }, "secretReader": { "type": "object", - "additionalProperties": false, "properties": { "enabled": { "type": "boolean" }, "secretNames": { - "type": "array", - "items": { - "type": "string" - } + "type": "array" } } }, @@ -242,9 +237,22 @@ } } }, + "sourceRegistryCA": { + "type": "object", + "properties": { + "mount": { + "type": "boolean" + }, + "mounts": { + "type": "object" + }, + "volumes": { + "type": "object" + } + } + }, "tolerations": { - "type": "array", - "items": {} + "type": "array" }, "webhook": { "type": "object", @@ -252,6 +260,12 @@ "failurePolicy": { "type": "string" }, + "namespaceSelector": { + "type": "object" + }, + "objectSelector": { + "type": "object" + }, "reinvocationPolicy": { "type": "string" } diff --git a/charts/k8s-image-swapper/values.yaml b/charts/k8s-image-swapper/values.yaml index 0785b07..4281868 100644 --- a/charts/k8s-image-swapper/values.yaml +++ b/charts/k8s-image-swapper/values.yaml @@ -19,6 +19,15 @@ fullnameOverride: "" # -- Labels that will be added on all the resources (not in selectors) commonLabels: {} + +sourceRegistryCA: + # Enable mount + mount: false + # Kubernetes volume object + volumes: {} + # Kubernetes volumeMount object + mounts: {} + serviceAccount: # Specifies whether a service account should be created create: true