From 46a2c5cdaa6263cc9a7e735e5c65219675882271 Mon Sep 17 00:00:00 2001 From: Rene Luria Date: Wed, 15 Oct 2025 12:16:30 +0200 Subject: [PATCH] doc: show kustomization --- README.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/README.md b/README.md index efe5f0d..799f8ce 100644 --- a/README.md +++ b/README.md @@ -58,3 +58,29 @@ The webhook is deployed using standard Kubernetes manifests: - Service - MutatingWebhookConfiguration - ImagePullSecret (to be injected into pods) + +## Production Configuration + +For production use, you should create a configmap with your specific configuration. Create a kustomization.yaml file like this: + +```yaml +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +namespace: imagepullsecrets-system +resources: + - imagepullsecret.yaml +configMapGenerator: + - name: imagepullsecrets-webhook-config + envs: + - imagepullsecret.env + options: + disableNameSuffixHash: true +``` + +And create an `imagepullsecret.env` file with your environment variables: + +```env +REGISTRY_MAPPINGS=harbor.yourdomain.com:regcred-harbor +IGNORED_REGISTRIES=k8s.gcr.io,gcr.io,quay.io,docker.io +SOURCE_NAMESPACE=imagepullsecrets-system +```