Skip to content

Commit

Permalink
feat: add support for deployment annotations (#136)
Browse files Browse the repository at this point in the history
  • Loading branch information
kjvellajr authored Jul 21, 2023
1 parent bb9dc81 commit ac4c371
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 3 deletions.
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.2
version: 1.7.0
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: |
- "Fixes deprecated policy api usage for pdb"
- "Allow to set annotations for deployment"
artifacthub.io/images: |
- name: k8s-image-webhook
image: ghcr.io/estahn/k8s-image-swapper:1.4.1
3 changes: 2 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.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)
![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)

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

Expand Down Expand Up @@ -31,6 +31,7 @@ Mirror images into your own registry and swap image references automatically.
| config.target.aws.accountId | string | `"12345678"` | |
| config.target.aws.region | string | `"ap-southeast-2"` | |
| containerPort | int | `8443` | |
| deployment.annotations | object | `{}` | |
| dev.enabled | bool | `false` | |
| dev.webhookURL | string | `"https://xxx.ngrok.io"` | |
| fullnameOverride | string | `""` | |
Expand Down
4 changes: 4 additions & 0 deletions charts/k8s-image-swapper/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ metadata:
name: {{ include "k8s-image-swapper.fullname" . }}
labels:
{{- include "k8s-image-swapper.labels" . | nindent 4 }}
{{- with .Values.deployment.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }}
Expand Down
8 changes: 8 additions & 0 deletions charts/k8s-image-swapper/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,14 @@
"containerPort": {
"type": "integer"
},
"deployment": {
"type": "object",
"properties": {
"annotations": {
"type": "object"
}
}
},
"dev": {
"type": "object",
"properties": {
Expand Down
4 changes: 4 additions & 0 deletions charts/k8s-image-swapper/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ serviceAccount:
rbac:
create: true

deployment:
# Annotations to add to the deployment
annotations: {}

# If true, create & use Pod Security Policy resources
# https://kubernetes.io/docs/concepts/policy/pod-security-policy/
podSecurityPolicy:
Expand Down

0 comments on commit ac4c371

Please sign in to comment.