mirror of
https://ghproxy.com/https://github.com/truecharts/charts.git
synced 2026-07-26 23:40:30 +08:00
Fix hostPathMounts and add install test (#527)
* Fix hostPathMounts and add install test * whoops fix
This commit is contained in:
committed by
GitHub
parent
d782167fd3
commit
91c199f2ed
@@ -1,7 +1,7 @@
|
|||||||
apiVersion: v2
|
apiVersion: v2
|
||||||
kubeVersion: ">=1.16.0-0"
|
kubeVersion: ">=1.16.0-0"
|
||||||
name: common-test
|
name: common-test
|
||||||
version: 3.0.1
|
version: 3.0.2
|
||||||
# upstream_version:
|
# upstream_version:
|
||||||
appVersion: none
|
appVersion: none
|
||||||
description: Helper chart to test different use cases of the common library
|
description: Helper chart to test different use cases of the common library
|
||||||
|
|||||||
66
charts/library/common-test/ci/basic-values-storage.yaml
Normal file
66
charts/library/common-test/ci/basic-values-storage.yaml
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
image:
|
||||||
|
repository: b4bz/homer
|
||||||
|
tag: latest
|
||||||
|
pullPolicy: IfNotPresent
|
||||||
|
|
||||||
|
service:
|
||||||
|
main:
|
||||||
|
ports:
|
||||||
|
main:
|
||||||
|
port: 8080
|
||||||
|
|
||||||
|
ingress:
|
||||||
|
main:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
|
||||||
|
persistence:
|
||||||
|
config:
|
||||||
|
enabled: true
|
||||||
|
mountPath: /config
|
||||||
|
emptyDir:
|
||||||
|
enabled: true
|
||||||
|
accessMode: ReadWriteOnce
|
||||||
|
size: 1Gi
|
||||||
|
skipuninstall: false
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
hostPathMounts:
|
||||||
|
- name: "hpmmountempty"
|
||||||
|
enabled: true
|
||||||
|
emptyDir:
|
||||||
|
enabled: true
|
||||||
|
mountPath: "/test1"
|
||||||
|
hostPath: ""
|
||||||
|
readOnly: false
|
||||||
|
- name: "hpmmountnonempty"
|
||||||
|
enabled: true
|
||||||
|
emptyDir:
|
||||||
|
enabled: false
|
||||||
|
mountPath: "/test2"
|
||||||
|
hostPath: "/tmp"
|
||||||
|
readOnly: false
|
||||||
|
- name: "hpmmountpermissions"
|
||||||
|
enabled: true
|
||||||
|
setPermissions: true
|
||||||
|
emptyDir:
|
||||||
|
enabled: false
|
||||||
|
mountPath: "/test3"
|
||||||
|
hostPath: "/tmp"
|
||||||
|
readOnly: false
|
||||||
|
- enabled: true
|
||||||
|
setPermissions: true
|
||||||
|
emptyDir:
|
||||||
|
enabled: false
|
||||||
|
mountPath: "/test4"
|
||||||
|
hostPath: "/tmp"
|
||||||
|
readOnly: false
|
||||||
|
|
||||||
|
probes:
|
||||||
|
liveness:
|
||||||
|
enabled: true
|
||||||
|
readiness:
|
||||||
|
enabled: true
|
||||||
|
startup:
|
||||||
|
enabled: true
|
||||||
@@ -19,4 +19,4 @@ name: common
|
|||||||
sources:
|
sources:
|
||||||
- https://github.com/truecharts/apps/tree/master/library/common
|
- https://github.com/truecharts/apps/tree/master/library/common
|
||||||
type: library
|
type: library
|
||||||
version: 5.1.0
|
version: 5.1.1
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ before chart installation.
|
|||||||
{{- $hostPathMounts := dict -}}
|
{{- $hostPathMounts := dict -}}
|
||||||
{{- range $name, $mount := .Values.hostPathMounts -}}
|
{{- range $name, $mount := .Values.hostPathMounts -}}
|
||||||
{{- if and $mount.enabled $mount.setPermissions -}}
|
{{- if and $mount.enabled $mount.setPermissions -}}
|
||||||
{{- $name = default $name $mount.name -}}
|
{{- $name = default ( $name| toString ) $mount.name -}}
|
||||||
{{- $_ := set $hostPathMounts $name $mount -}}
|
{{- $_ := set $hostPathMounts $name $mount -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ Creates Volumes for hostPaths which can be directly mounted to a container
|
|||||||
{{ if $hpm.name }}
|
{{ if $hpm.name }}
|
||||||
{{ $name = $hpm.name }}
|
{{ $name = $hpm.name }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
- name: {{ printf "hostpathmounts-%s" $name }}
|
- name: hostpathmounts-{{ $name }}
|
||||||
{{- /* Always prefer an emptyDir next if that is set */}}
|
{{- /* Always prefer an emptyDir next if that is set */}}
|
||||||
{{- $emptyDir := false -}}
|
{{- $emptyDir := false -}}
|
||||||
{{- if $hpm.emptyDir -}}
|
{{- if $hpm.emptyDir -}}
|
||||||
|
|||||||
Reference in New Issue
Block a user