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 description: A Helm chart for Kubernetes
icon: https://raw.githubusercontent.com/svenstaro/miniserve/master/data/logo.svg icon: https://raw.githubusercontent.com/svenstaro/miniserve/master/data/logo.svg
type: application type: application
version: "0.4.4" version: "0.4.5"
# renovate: image=docker.io/svenstaro/miniserve # renovate: image=docker.io/svenstaro/miniserve
appVersion: "0.29.0" appVersion: "0.29.0"
maintainers: maintainers:

View file

@ -7,7 +7,7 @@ description: "A Helm chart for Kubernetes"
# miniserve # 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 A Helm chart for Kubernetes
@ -78,9 +78,12 @@ helm uninstall miniserve-release
| data.verbose | bool | `false` | Be verbose, includes emitting access logs | | data.verbose | bool | `false` | Be verbose, includes emitting access logs |
| data.webdav.enabled | bool | `false` | If enabled, respond to WebDAV requests (read-only). | | data.webdav.enabled | bool | `false` | If enabled, respond to WebDAV requests (read-only). |
| fullnameOverride | string | `""` | | | fullnameOverride | string | `""` | |
| image.pullPolicy | string | `"IfNotPresent"` | | | global.image.pullPolicy | string | `nil` | if set it will overwrite all pullPolicy |
| image.repository | string | `"docker.io/svenstaro/miniserve"` | | | global.image.registry | string | `nil` | if set it will overwrite all registry entries |
| image.tag | string | `""` | | | 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 | `[]` | | | imagePullSecrets | list | `[]` | |
| ingress.annotations | object | `{}` | | | ingress.annotations | object | `{}` | |
| ingress.className | string | `""` | | | ingress.className | string | `""` | |
@ -105,7 +108,7 @@ helm uninstall miniserve-release
| podAnnotations | object | `{}` | | | podAnnotations | object | `{}` | |
| podLabels | object | `{}` | | | podLabels | object | `{}` | |
| podSecurityContext | object | `{}` | | | podSecurityContext | object | `{}` | |
| replicaCount | int | `1` | | | replicaCount | int | `1` | replicas |
| resources.limits.memory | string | `"256Mi"` | | | resources.limits.memory | string | `"256Mi"` | |
| resources.requests.cpu | string | `"80m"` | | | resources.requests.cpu | string | `"80m"` | |
| resources.requests.memory | string | `"128Mi"` | | | resources.requests.memory | string | `"128Mi"` | |

View file

@ -35,8 +35,10 @@ spec:
- name: {{ .Chart.Name }} - name: {{ .Chart.Name }}
securityContext: securityContext:
{{- toYaml .Values.securityContext | nindent 12 }} {{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" {{- with $.Values.image }}
imagePullPolicy: {{ .Values.image.pullPolicy }} image: "{{ coalesce $.Values.global.image.registry .registry }}/{{ .repository }}:{{ .tag | default $.Chart.AppVersion }}"
imagePullPolicy: {{ coalesce $.Values.global.image.pullPolicy .pullPolicy }}
{{- end }}
envFrom: envFrom:
- configMapRef: - configMapRef:
name: {{ include "miniserve.fullname" . }} 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. global:
# This is a YAML-formatted file. image:
# Declare variables to be passed into your templates. # -- if set it will overwrite all registry entries
registry:
# -- if set it will overwrite all pullPolicy
pullPolicy:
# -- replicas
replicaCount: 1 replicaCount: 1
image: 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 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: "" tag: ""
imagePullSecrets: [] imagePullSecrets: []