helm: Add helm chart tests (#20394)
* helm: Fix consistent list indentation * helm: Add helm lint and helm template tests * helm: Add helm template --validate test * helm: Add helm install test
This commit is contained in:
parent
07229089a6
commit
87fbd08f74
9 changed files with 213 additions and 37 deletions
|
@ -1,3 +1,17 @@
|
|||
# A helm chart's templates and default values can be packaged into a .tgz file.
|
||||
# When doing that, not everything should be bundled into the .tgz file. This
|
||||
# file describes what to not bundle.
|
||||
#
|
||||
# Manually added by us
|
||||
# --------------------
|
||||
#
|
||||
dev-values.yaml
|
||||
mastodon-*.tgz
|
||||
|
||||
|
||||
# Boilerplate .helmignore from `helm create mastodon`
|
||||
# ---------------------------------------------------
|
||||
#
|
||||
# Patterns to ignore when building packages.
|
||||
# This supports shell glob matching, relative path matching, and
|
||||
# negation (prefixed with !). Only one pattern per line.
|
||||
|
@ -21,4 +35,3 @@
|
|||
.idea/
|
||||
*.tmproj
|
||||
.vscode/
|
||||
mastodon-*.tgz
|
||||
|
|
|
@ -7,7 +7,7 @@ Kubernetes cluster. The basic usage is:
|
|||
1. `helm dep update`
|
||||
1. `helm install --namespace mastodon --create-namespace my-mastodon ./ -f path/to/additional/values.yaml`
|
||||
|
||||
This chart has been tested on Helm 3.0.1 and above.
|
||||
This chart is tested with k8s 1.21+ and helm 3.6.0+.
|
||||
|
||||
# Configuration
|
||||
|
||||
|
|
25
chart/dev-values.yaml
Normal file
25
chart/dev-values.yaml
Normal file
|
@ -0,0 +1,25 @@
|
|||
# Chart values used for testing the Helm chart.
|
||||
#
|
||||
mastodon:
|
||||
secrets:
|
||||
secret_key_base: dummy-secret_key_base
|
||||
otp_secret: dummy-otp_secret
|
||||
vapid:
|
||||
private_key: dummy-vapid-private_key
|
||||
public_key: dummy-vapid-public_key
|
||||
|
||||
# ref: https://github.com/bitnami/charts/tree/main/bitnami/redis#parameters
|
||||
redis:
|
||||
replica:
|
||||
replicaCount: 1
|
||||
|
||||
# ref: https://github.com/bitnami/charts/tree/main/bitnami/elasticsearch#parameters
|
||||
elasticsearch:
|
||||
master:
|
||||
replicaCount: 1
|
||||
data:
|
||||
replicaCount: 1
|
||||
coordinating:
|
||||
replicaCount: 1
|
||||
ingest:
|
||||
replicaCount: 1
|
|
@ -25,13 +25,13 @@ spec:
|
|||
affinity:
|
||||
podAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
- labelSelector:
|
||||
matchExpressions:
|
||||
- key: app.kubernetes.io/part-of
|
||||
operator: In
|
||||
values:
|
||||
- rails
|
||||
topologyKey: kubernetes.io/hostname
|
||||
- labelSelector:
|
||||
matchExpressions:
|
||||
- key: app.kubernetes.io/part-of
|
||||
operator: In
|
||||
values:
|
||||
- rails
|
||||
topologyKey: kubernetes.io/hostname
|
||||
{{- end }}
|
||||
volumes:
|
||||
- name: assets
|
||||
|
|
|
@ -42,13 +42,13 @@ spec:
|
|||
affinity:
|
||||
podAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
- labelSelector:
|
||||
matchExpressions:
|
||||
- key: app.kubernetes.io/part-of
|
||||
operator: In
|
||||
values:
|
||||
- rails
|
||||
topologyKey: kubernetes.io/hostname
|
||||
- labelSelector:
|
||||
matchExpressions:
|
||||
- key: app.kubernetes.io/part-of
|
||||
operator: In
|
||||
values:
|
||||
- rails
|
||||
topologyKey: kubernetes.io/hostname
|
||||
{{- end }}
|
||||
volumes:
|
||||
- name: assets
|
||||
|
|
|
@ -25,13 +25,13 @@ spec:
|
|||
affinity:
|
||||
podAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
- labelSelector:
|
||||
matchExpressions:
|
||||
- key: app.kubernetes.io/part-of
|
||||
operator: In
|
||||
values:
|
||||
- rails
|
||||
topologyKey: kubernetes.io/hostname
|
||||
- labelSelector:
|
||||
matchExpressions:
|
||||
- key: app.kubernetes.io/part-of
|
||||
operator: In
|
||||
values:
|
||||
- rails
|
||||
topologyKey: kubernetes.io/hostname
|
||||
{{- end }}
|
||||
volumes:
|
||||
- name: assets
|
||||
|
|
|
@ -26,13 +26,13 @@ spec:
|
|||
affinity:
|
||||
podAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
- labelSelector:
|
||||
matchExpressions:
|
||||
- key: app.kubernetes.io/part-of
|
||||
operator: In
|
||||
values:
|
||||
- rails
|
||||
topologyKey: kubernetes.io/hostname
|
||||
- labelSelector:
|
||||
matchExpressions:
|
||||
- key: app.kubernetes.io/part-of
|
||||
operator: In
|
||||
values:
|
||||
- rails
|
||||
topologyKey: kubernetes.io/hostname
|
||||
{{- end }}
|
||||
volumes:
|
||||
- name: assets
|
||||
|
|
|
@ -25,13 +25,13 @@ spec:
|
|||
affinity:
|
||||
podAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
- labelSelector:
|
||||
matchExpressions:
|
||||
- key: app.kubernetes.io/part-of
|
||||
operator: In
|
||||
values:
|
||||
- rails
|
||||
topologyKey: kubernetes.io/hostname
|
||||
- labelSelector:
|
||||
matchExpressions:
|
||||
- key: app.kubernetes.io/part-of
|
||||
operator: In
|
||||
values:
|
||||
- rails
|
||||
topologyKey: kubernetes.io/hostname
|
||||
{{- end }}
|
||||
volumes:
|
||||
- name: assets
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue