fix(miniserve): add global (and improve docs)

This commit is contained in:
WrenIX 2025-03-21 23:06:23 +01:00
parent 4428f5b600
commit 6f65889391
Signed by: wrenix
GPG key ID: 7AFDB012974B1BB5
5 changed files with 27 additions and 28 deletions

View file

@ -3,7 +3,7 @@ name: miniserve
description: A Helm chart for Kubernetes
icon: https://raw.githubusercontent.com/svenstaro/miniserve/master/data/logo.svg
type: application
version: "0.4.4"
version: "0.4.5"
# renovate: image=docker.io/svenstaro/miniserve
appVersion: "0.29.0"
maintainers:

View file

@ -7,7 +7,7 @@ description: "A Helm chart for Kubernetes"
# miniserve
![Version: 0.4.4](https://img.shields.io/badge/Version-0.4.4-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.29.0](https://img.shields.io/badge/AppVersion-0.29.0-informational?style=flat-square)
![Version: 0.4.5](https://img.shields.io/badge/Version-0.4.5-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.29.0](https://img.shields.io/badge/AppVersion-0.29.0-informational?style=flat-square)
A Helm chart for Kubernetes
@ -78,9 +78,12 @@ helm uninstall miniserve-release
| data.verbose | bool | `false` | Be verbose, includes emitting access logs |
| data.webdav.enabled | bool | `false` | If enabled, respond to WebDAV requests (read-only). |
| fullnameOverride | string | `""` | |
| image.pullPolicy | string | `"IfNotPresent"` | |
| image.repository | string | `"docker.io/svenstaro/miniserve"` | |
| image.tag | string | `""` | |
| global.image.pullPolicy | string | `nil` | if set it will overwrite all pullPolicy |
| global.image.registry | string | `nil` | if set it will overwrite all registry entries |
| image.pullPolicy | string | `"IfNotPresent"` | This sets the pull policy for images. (could be overwritten by global.image.pullPolicy) |
| image.registry | string | `"docker.io"` | image registry (could be overwritten by global.image.registry) |
| image.repository | string | `"svenstaro/miniserve"` | image repository |
| image.tag | string | `""` | image tag - Overrides the image tag whose default is the chart appVersion. |
| imagePullSecrets | list | `[]` | |
| ingress.annotations | object | `{}` | |
| ingress.className | string | `""` | |
@ -105,7 +108,7 @@ helm uninstall miniserve-release
| podAnnotations | object | `{}` | |
| podLabels | object | `{}` | |
| podSecurityContext | object | `{}` | |
| replicaCount | int | `1` | |
| replicaCount | int | `1` | replicas |
| resources.limits.memory | string | `"256Mi"` | |
| resources.requests.cpu | string | `"80m"` | |
| resources.requests.memory | string | `"128Mi"` | |

View file

@ -35,8 +35,10 @@ spec:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- with $.Values.image }}
image: "{{ coalesce $.Values.global.image.registry .registry }}/{{ .repository }}:{{ .tag | default $.Chart.AppVersion }}"
imagePullPolicy: {{ coalesce $.Values.global.image.pullPolicy .pullPolicy }}
{{- end }}
envFrom:
- configMapRef:
name: {{ include "miniserve.fullname" . }}

View file

@ -1,15 +0,0 @@
apiVersion: v1
kind: Pod
metadata:
name: "{{ include "miniserve.fullname" . }}-test-connection"
labels:
{{- include "miniserve.labels" . | nindent 4 }}
annotations:
"helm.sh/hook": test
spec:
containers:
- name: wget
image: busybox
command: ['wget']
args: ['{{ include "miniserve.fullname" . }}:{{ .Values.service.port }}']
restartPolicy: Never

View file

@ -1,13 +1,22 @@
# Default values for web-static.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
global:
image:
# -- if set it will overwrite all registry entries
registry:
# -- if set it will overwrite all pullPolicy
pullPolicy:
# -- replicas
replicaCount: 1
image:
repository: "docker.io/svenstaro/miniserve"
# -- image registry (could be overwritten by global.image.registry)
registry: docker.io
# -- image repository
repository: "svenstaro/miniserve"
# -- This sets the pull policy for images. (could be overwritten by global.image.pullPolicy)
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
# -- image tag - Overrides the image tag whose default is the chart appVersion.
tag: ""
imagePullSecrets: []