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

Volumes support #125

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.6.1
version: 1.6.2
appVersion: 1.4.1
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: |
- "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
5 changes: 4 additions & 1 deletion 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.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.

Expand Down Expand Up @@ -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 | `{}` | |
Expand Down
6 changes: 6 additions & 0 deletions charts/k8s-image-swapper/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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 }}
Expand Down
32 changes: 23 additions & 9 deletions charts/k8s-image-swapper/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,7 @@
}
},
"imagePullSecrets": {
"type": "array",
"items": {}
"type": "array"
},
"nameOverride": {
"type": "string"
Expand Down Expand Up @@ -201,16 +200,12 @@
},
"secretReader": {
"type": "object",
"additionalProperties": false,
"properties": {
"enabled": {
"type": "boolean"
},
"secretNames": {
"type": "array",
"items": {
"type": "string"
}
"type": "array"
}
}
},
Expand Down Expand Up @@ -242,16 +237,35 @@
}
}
},
"sourceRegistryCA": {
"type": "object",
"properties": {
"mount": {
"type": "boolean"
},
"mounts": {
"type": "object"
},
"volumes": {
"type": "object"
}
}
},
"tolerations": {
"type": "array",
"items": {}
"type": "array"
},
"webhook": {
"type": "object",
"properties": {
"failurePolicy": {
"type": "string"
},
"namespaceSelector": {
"type": "object"
},
"objectSelector": {
"type": "object"
},
"reinvocationPolicy": {
"type": "string"
}
Expand Down
9 changes: 9 additions & 0 deletions charts/k8s-image-swapper/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down