Skip to content

Commit ac4c371

Browse files
authored
feat: add support for deployment annotations (#136)
1 parent bb9dc81 commit ac4c371

File tree

5 files changed

+20
-3
lines changed

5 files changed

+20
-3
lines changed

charts/k8s-image-swapper/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: k8s-image-swapper
33
description: Mirror images into your own registry and swap image references automatically.
44
type: application
5-
version: 1.6.2
5+
version: 1.7.0
66
appVersion: 1.4.1
77
home: https://github.com/estahn/charts/tree/main/charts/k8s-image-swapper
88
keywords:
@@ -15,7 +15,7 @@ maintainers:
1515
name: estahn
1616
annotations:
1717
artifacthub.io/changes: |
18-
- "Fixes deprecated policy api usage for pdb"
18+
- "Allow to set annotations for deployment"
1919
artifacthub.io/images: |
2020
- name: k8s-image-webhook
2121
image: ghcr.io/estahn/k8s-image-swapper:1.4.1

charts/k8s-image-swapper/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# k8s-image-swapper
22

3-
![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)
3+
![Version: 1.7.0](https://img.shields.io/badge/Version-1.7.0-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)
44

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

@@ -31,6 +31,7 @@ Mirror images into your own registry and swap image references automatically.
3131
| config.target.aws.accountId | string | `"12345678"` | |
3232
| config.target.aws.region | string | `"ap-southeast-2"` | |
3333
| containerPort | int | `8443` | |
34+
| deployment.annotations | object | `{}` | |
3435
| dev.enabled | bool | `false` | |
3536
| dev.webhookURL | string | `"https://xxx.ngrok.io"` | |
3637
| fullnameOverride | string | `""` | |

charts/k8s-image-swapper/templates/deployment.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ metadata:
44
name: {{ include "k8s-image-swapper.fullname" . }}
55
labels:
66
{{- include "k8s-image-swapper.labels" . | nindent 4 }}
7+
{{- with .Values.deployment.annotations }}
8+
annotations:
9+
{{- toYaml . | nindent 4 }}
10+
{{- end }}
711
spec:
812
{{- if not .Values.autoscaling.enabled }}
913
replicas: {{ .Values.replicaCount }}

charts/k8s-image-swapper/values.schema.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,14 @@
8585
"containerPort": {
8686
"type": "integer"
8787
},
88+
"deployment": {
89+
"type": "object",
90+
"properties": {
91+
"annotations": {
92+
"type": "object"
93+
}
94+
}
95+
},
8896
"dev": {
8997
"type": "object",
9098
"properties": {

charts/k8s-image-swapper/values.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ serviceAccount:
3333
rbac:
3434
create: true
3535

36+
deployment:
37+
# Annotations to add to the deployment
38+
annotations: {}
39+
3640
# If true, create & use Pod Security Policy resources
3741
# https://kubernetes.io/docs/concepts/policy/pod-security-policy/
3842
podSecurityPolicy:

0 commit comments

Comments
 (0)