mirror of
https://github.com/truenas/charts.git
synced 2026-04-14 10:40:31 +08:00
Add helm tests for applications
This commit is contained in:
@@ -19,4 +19,4 @@ sources:
|
||||
- https://github.com/nextcloud/docker
|
||||
- https://github.com/nextcloud/helm
|
||||
upstream_version: 2.3.2
|
||||
version: 1.3.13
|
||||
version: 1.4.0
|
||||
@@ -7,3 +7,4 @@ nginx:
|
||||
pullPolicy: IfNotPresent
|
||||
repository: nginx
|
||||
tag: 1.21.3
|
||||
useServiceNameForHost: false
|
||||
@@ -40,7 +40,11 @@ spec: {{ include "common.deployment.common_spec" . | nindent 2 }}
|
||||
{{ $envList = mustAppend $envList (dict "name" "OVERWRITEPROTOCOL" "value" "https") }}
|
||||
{{ $envList = mustAppend $envList (dict "name" "TRUSTED_PROXIES" "value" "127.0.0.1") }}
|
||||
{{ end }}
|
||||
{{ $envList = mustAppend $envList (dict "name" "NEXTCLOUD_TRUSTED_DOMAINS" "value" .Values.nextcloud.host) }}
|
||||
{{ $hostName := .Values.nextcloud.host }}
|
||||
{{ if .Values.useServiceNameForHost }}
|
||||
{{ $hostName = (include "common.names.fullname" .) }}
|
||||
{{ end }}
|
||||
{{ $envList = mustAppend $envList (dict "name" "NEXTCLOUD_TRUSTED_DOMAINS" "value" $hostName) }}
|
||||
{{ $envList = mustAppend $envList (dict "name" "NEXTCLOUD_ADMIN_USER" "valueFromSecret" true "secretName" $secretName "secretKey" "nextcloud-username") }}
|
||||
{{ $envList = mustAppend $envList (dict "name" "NEXTCLOUD_ADMIN_PASSWORD" "valueFromSecret" true "secretName" $secretName "secretKey" "nextcloud-password") }}
|
||||
{{ include "common.containers.environmentVariables" (dict "environmentVariables" $envList) | nindent 10 }}
|
||||
21
test/nextcloud/1.4.0/templates/tests/deployment-check.yaml
Normal file
21
test/nextcloud/1.4.0/templates/tests/deployment-check.yaml
Normal file
@@ -0,0 +1,21 @@
|
||||
{{- $serviceName := (include "common.names.fullname" .) -}}
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: "{{ .Release.Name }}-nextcloud-test"
|
||||
labels:
|
||||
app: {{ .Release.Name }}
|
||||
release: {{ .Release.Name }}
|
||||
annotations:
|
||||
"helm.sh/hook": test
|
||||
spec:
|
||||
containers:
|
||||
- name: test-curl
|
||||
image: alpine/curl
|
||||
imagePullPolicy: "IfNotPresent"
|
||||
command:
|
||||
- /bin/sh
|
||||
- -ec
|
||||
- |
|
||||
curl --connect-timeout 5 --max-time 10 --retry 5 --retry-delay 15 --retry-max-time 90 --retry-all-errors -ksf http://{{ $serviceName }}/login
|
||||
restartPolicy: Never
|
||||
@@ -38,3 +38,4 @@ postgresql:
|
||||
service:
|
||||
nodePort: 31000
|
||||
updateStrategy: Recreate
|
||||
useServiceNameForHost: true
|
||||
Reference in New Issue
Block a user