Skip to content

Commit 36d00c7

Browse files
authored
chore: make production ready (#5)
Changes: - Update deployment instructions in `README.md` to use the helm repository - Add more badges - Fix typo found by `misspell` - Update `appVersion` in helm chart to point to the latest tag
1 parent 41f0483 commit 36d00c7

File tree

3 files changed

+17
-6
lines changed

3 files changed

+17
-6
lines changed

README.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# pod-image-swap-webhook
22

33
[![Build Status](https://github.com/Bonial-International-GmbH/pod-image-swap-webhook/actions/workflows/ci.yml/badge.svg)](https://github.com/Bonial-International-GmbH/pod-image-swap-webhook/actions/workflows/ci.yml)
4+
[![Go Report Card](https://goreportcard.com/badge/github.com/Bonial-International-GmbH/pod-image-swap-webhook)](https://goreportcard.com/report/github.com/Bonial-International-GmbH/pod-image-swap-webhook)
5+
![License](https://img.shields.io/github/license/Bonial-International-GmbH/pod-image-swap-webhook)
46

57
A mutating webhook that patches Pod container images based on configuration
68
rules. For example, if you want to transparently proxy image pulls through an
@@ -22,6 +24,13 @@ Of course this webhook also works without Harbor.
2224

2325
The helm chart provided in this repository can be used to deploy the webhook.
2426

27+
First, add the helm repository:
28+
29+
```sh
30+
helm repo add pod-image-swap-webhook \
31+
https://bonial-international-gmbh.github.io/pod-image-swap-webhook
32+
```
33+
2534
Create a `values.yaml` and add a `webhookConfig` section with the desired
2635
replacement configuration, for example:
2736

@@ -39,13 +48,15 @@ webhookConfig:
3948
replacement: registry.example.org/docker.io
4049
```
4150
42-
You can find documentation for all available configuration fields in
43-
[`config.sample.yaml`](config.sample.yaml).
51+
You can find documentation for all available `webhookConfig` fields in
52+
[`config.sample.yaml`](config.sample.yaml). For more helm configuration options
53+
have a look into the [`values.yaml`
54+
defaults](charts/pod-image-swap-webhook/values.yaml).
4455

4556
Finally use helm to install the webhook:
4657

4758
```sh
48-
helm upgrade pod-image-swap-webhook charts/pod-image-swap-webhook \
59+
helm upgrade pod-image-swap-webhook pod-image-swap-webhook/pod-image-swap-webhook \
4960
--install --namespace kube-system --values values.yaml
5061
```
5162

charts/pod-image-swap-webhook/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ apiVersion: v2
22
name: pod-image-swap-webhook
33
description: A webhook that replaces Pod images based on configuration values
44
type: application
5-
version: 0.0.1
6-
appVersion: "v0.0.1"
5+
version: 0.0.2
6+
appVersion: "v0.0.2"

pkg/admission/handler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ func (h *PodImageHandler) patchContainer(container corev1.Container) corev1.Cont
100100
}
101101

102102
// normalizeImage normalizes images from dockerhub to their long form.
103-
// Dockerhub images without namespace are prefixed with `docker.io/libary`,
103+
// Dockerhub images without namespace are prefixed with `docker.io/library`,
104104
// namespaced images are prefixed with `docker.io/`. Images that already start
105105
// with `docker.io/` or any other registry domain are left untouched.
106106
//

0 commit comments

Comments
 (0)