Skip to content

Commit 6837f72

Browse files
committed
chore: helm chart
1 parent 6c7fc6f commit 6837f72

File tree

3 files changed

+139
-0
lines changed

3 files changed

+139
-0
lines changed

charts/mort/files/config.yaml

+117
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
server:
2+
listens:
3+
- ":8080"
4+
monitoring: "prometheus"
5+
plugins:
6+
webp: ~
7+
compress:
8+
gzip:
9+
types:
10+
- text/plain
11+
- text/css
12+
- application/json
13+
- application/javascript
14+
- text/xml
15+
- application/xml
16+
- application/xml+rss
17+
- text/javascript
18+
- text/html;
19+
level: 4
20+
brotli:
21+
types:
22+
- text/plain
23+
- text/css
24+
- application/json
25+
- application/javascript
26+
- text/xml
27+
- application/xml
28+
- application/xml+rss
29+
- text/javascript
30+
- text/html;
31+
level: 4
32+
33+
headers:
34+
- statusCodes: [200]
35+
values:
36+
"cache-control": "max-age=84000, public"
37+
- statusCodes: [404, 400]
38+
values:
39+
"cache-control": "max-age=60, public"
40+
- statusCodes: [500, 503]
41+
values:
42+
"cache-control": "max-age=10, public"
43+
44+
buckets:
45+
media:
46+
keys:
47+
- accessKey: "$MEDIA_ACCESS_KEY"
48+
secretAccessKey: "sec"
49+
transform:
50+
path: "\\/(?P<presetName>[a-z0-9_]+)\\/(?P<parent>.*)"
51+
kind: "presets"
52+
parentBucket: "media"
53+
resultKey: "hash"
54+
presets:
55+
small:
56+
quality: 75
57+
filters:
58+
thumbnail:
59+
width: 150
60+
blur:
61+
quality: 80
62+
filters:
63+
thumbnail:
64+
width: 700
65+
blur:
66+
sigma: 5.0
67+
webp:
68+
quality: 100
69+
format: webp
70+
filters:
71+
thumbnail:
72+
width: 1000
73+
watermark:
74+
quality: 100
75+
filters:
76+
thumbnail:
77+
width: 1300
78+
watermark:
79+
image: "https://upload.wikimedia.org/wikipedia/commons/thumb/e/e9/Imgur_logo.svg/150px-Imgur_logo.svg.png"
80+
position: "center-center"
81+
opacity: 0.5
82+
storages:
83+
basic:
84+
kind: "http"
85+
url: "https://i.imgur.com/<item>"
86+
headers:
87+
"x--key": "sec"
88+
transform:
89+
kind: "local-meta"
90+
rootPath: "/data/buckets"
91+
pathPrefix: "transforms"
92+
93+
query:
94+
keys:
95+
- accessKey: "acc"
96+
secretAccessKey: "sec"
97+
transform:
98+
kind: "query"
99+
resultKey: "hash"
100+
storages:
101+
basic:
102+
kind: "http"
103+
url: "https://i.imgur.com/<item>"
104+
headers:
105+
"x--key": "sec"
106+
transform:
107+
kind: "local-meta"
108+
rootPath: "/data/buckets/"
109+
pathPrefix: "transforms"
110+
local:
111+
keys:
112+
- accessKey: "acc"
113+
secretAccessKey: "sec"
114+
storages:
115+
basic:
116+
kind: "local-meta"
117+
rootPath: "/data/buckets/"

charts/mort/templates/config.yaml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
apiVersion: v1
2+
kind: ConfigMap
3+
metadata:
4+
name: {{ include "mort.fullname" . }}-config
5+
labels:
6+
{{- include "mort.labels" . | nindent 4 }}
7+
data:
8+
config.yaml: |-
9+
{{- (.Files.Get "files/config.yaml") | toYaml | nindent 6 }}

charts/mort/templates/secret.yaml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{{- if .Values.secrets.enabled }}
2+
apiVersion: v1
3+
kind: Secret
4+
metadata:
5+
name: {{ include "mort.fullname" . }}-env-secrets
6+
labels:
7+
{{- include "mort.labels" . | nindent 4 }}
8+
type: Opaque
9+
data:
10+
{{- range $key, $value := .Values.secrets.env }}
11+
{{ $key }}: {{ $value | b64enc | quote}}
12+
{{- end }}
13+
{{- end }}

0 commit comments

Comments
 (0)