From e7fac73694901f7da62c209eff5d10dd0eb776e7 Mon Sep 17 00:00:00 2001 From: Thomas Colomb Date: Thu, 7 Jul 2022 14:56:44 +0200 Subject: [PATCH] feat: add hostNetwork in k8s-image-swapper charts supported values (#84) * Add hostNetwork in k8s-image-swapper charts supported values * Fix README.md with correct helm docs version --- charts/k8s-image-swapper/Chart.yaml | 4 ++-- charts/k8s-image-swapper/README.md | 3 ++- charts/k8s-image-swapper/templates/deployment.yaml | 3 +++ charts/k8s-image-swapper/values.schema.json | 3 +++ charts/k8s-image-swapper/values.yaml | 2 ++ 5 files changed, 12 insertions(+), 3 deletions(-) diff --git a/charts/k8s-image-swapper/Chart.yaml b/charts/k8s-image-swapper/Chart.yaml index 0ac12fb..82da2fe 100644 --- a/charts/k8s-image-swapper/Chart.yaml +++ b/charts/k8s-image-swapper/Chart.yaml @@ -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.0.1 +version: 1.0.2 appVersion: 1.1.0 home: https://github.com/estahn/charts/tree/main/charts/k8s-image-swapper keywords: @@ -15,7 +15,7 @@ maintainers: name: estahn annotations: artifacthub.io/changes: | - - "add permissions to ClusterRole to allow reading of service accounts" + - "allow to modify hostnetwork spec definition in deployment" artifacthub.io/images: | - name: k8s-image-webhook image: ghcr.io/estahn/k8s-image-swapper:1.1.0 diff --git a/charts/k8s-image-swapper/README.md b/charts/k8s-image-swapper/README.md index 7326a23..0415864 100644 --- a/charts/k8s-image-swapper/README.md +++ b/charts/k8s-image-swapper/README.md @@ -1,6 +1,6 @@ # k8s-image-swapper -![Version: 1.0.1](https://img.shields.io/badge/Version-1.0.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.1.0](https://img.shields.io/badge/AppVersion-1.1.0-informational?style=flat-square) +![Version: 1.0.2](https://img.shields.io/badge/Version-1.0.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.1.0](https://img.shields.io/badge/AppVersion-1.1.0-informational?style=flat-square) Mirror images into your own registry and swap image references automatically. @@ -31,6 +31,7 @@ Mirror images into your own registry and swap image references automatically. | dev.enabled | bool | `false` | | | dev.webhookURL | string | `"https://xxx.ngrok.io"` | | | fullnameOverride | string | `""` | | +| hostNetwork | bool | `false` | | | image.pullPolicy | string | `"IfNotPresent"` | | | image.repository | string | `"ghcr.io/estahn/k8s-image-swapper"` | | | image.tag | string | `""` | | diff --git a/charts/k8s-image-swapper/templates/deployment.yaml b/charts/k8s-image-swapper/templates/deployment.yaml index 64c1bf2..fe54077 100644 --- a/charts/k8s-image-swapper/templates/deployment.yaml +++ b/charts/k8s-image-swapper/templates/deployment.yaml @@ -25,6 +25,9 @@ spec: imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} + {{- if .Values.hostNetwork }} + hostNetwork: {{ .Values.hostNetwork }} + {{- end }} serviceAccountName: {{ include "k8s-image-swapper.serviceAccountName" . }} securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} diff --git a/charts/k8s-image-swapper/values.schema.json b/charts/k8s-image-swapper/values.schema.json index 5986908..e962b05 100644 --- a/charts/k8s-image-swapper/values.schema.json +++ b/charts/k8s-image-swapper/values.schema.json @@ -85,6 +85,9 @@ "fullnameOverride": { "type": "string" }, + "hostNetwork": { + "type": "boolean" + }, "image": { "type": "object", "properties": { diff --git a/charts/k8s-image-swapper/values.yaml b/charts/k8s-image-swapper/values.yaml index 2aac884..6f88d66 100644 --- a/charts/k8s-image-swapper/values.yaml +++ b/charts/k8s-image-swapper/values.yaml @@ -73,6 +73,8 @@ tolerations: [] affinity: {} +hostNetwork: false + # Will generate the TLS certificate and patch the webhook patch: enabled: true