docs(examples): Add some deployment examples

This commit is contained in:
Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs 2022-08-11 13:25:03 +02:00
parent 592e2a35dc
commit 216592df83
No known key found for this signature in database
GPG key ID: BC5E2BD907F9A8EC
10 changed files with 280 additions and 34 deletions

10
examples/flux/README.md Normal file
View file

@ -0,0 +1,10 @@
# Deployment example using a Flux HelmRelease
### Prerequisites
Make sure that the [`bjws-helm-charts` HelmRepository](helmrepository.yaml) is added to your cluster.
### Deployment
When you add the [HelmRelease](helmrelease.yaml) to your cluster, Flux will automatically render and
apply the rendered manifest(s) to your cluster.

View file

@ -0,0 +1,77 @@
---
apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
name: vaultwarden
namespace: default
spec:
interval: 15m
chart:
spec:
chart: app-template
# -- Version of the app-template helm chart
# this example is not automatically updated, so be sure to use the latest chart version
version: 0.1.1
interval: 15m
sourceRef:
kind: HelmRepository
name: bjw-s-helm-charts
namespace: flux-system
values:
image:
# -- image repository
repository: vaultwarden/server
# -- image pull policy
pullPolicy: IfNotPresent
# -- image tag
# this example is not automatically updated, so be sure to use the latest image
tag: 1.25.2
strategy:
type: Recreate
# -- environment variables.
# See [image docs](https://github.com/dani-garcia/vaultwarden/blob/main/.env.template) for more details.
env:
# -- Config dir
DATA_FOLDER: "config"
# -- Configures service settings for the chart.
service:
main:
ports:
http:
port: 80
websocket:
enabled: true
port: 3012
ingress:
# -- Enable and configure ingress settings for the chart under this key.
main:
enabled: false
hosts:
- host: chart-example.local
paths:
- path: /
pathType: Prefix
service:
port: http
- path: /notifications/hub/negotiate
pathType: Prefix
service:
port: http
- path: /notifications/hub
pathType: Prefix
service:
port: websocket
# -- Configure persistence settings for the chart under this key.
persistence:
config:
enabled: true
type: pvc
accessMode: ReadWriteOnce
size: 1Gi
mountPath: /config

View file

@ -0,0 +1,10 @@
---
apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: HelmRepository
metadata:
name: bjw-s-helm-charts
namespace: flux-system
spec:
interval: 30m
url: https://bjw-s.github.io/helm-charts/
timeout: 3m