blob: ccdbe972d1fb59e0d3041e3303a6251ff50961ac [file] [log] [blame]
giolekva050609f2021-12-29 15:51:40 +04001package main
2
3import "text/template"
4
5type App struct {
6 Name string
7 Templates []*template.Template
8}
9
giolekvaef76a3e2022-01-10 12:22:28 +040010func CreateAllApps(tmpls *template.Template) []App {
11 return []App{
12 CreateAppIngressPrivate(tmpls),
13 CreateAppCoreAuth(tmpls),
14 CreateAppVaultwarden(tmpls),
15 CreateAppMatrix(tmpls),
16 CreateAppPihole(tmpls),
17 CreateAppMaddy(tmpls),
18 CreateAppQBittorrent(tmpls),
19 CreateAppJellyfin(tmpls),
20 }
21}
22
giolekva050609f2021-12-29 15:51:40 +040023func CreateAppIngressPrivate(tmpls *template.Template) App {
24 return App{
25 "ingress-private",
26 []*template.Template{
27 tmpls.Lookup("vpn-mesh-config.yaml"),
28 tmpls.Lookup("ingress-private.yaml"),
29 tmpls.Lookup("certificate-issuer.yaml"),
30 },
31 }
32}
33
34func CreateAppCoreAuth(tmpls *template.Template) App {
35 return App{
36 "core-auth",
37 []*template.Template{
38 tmpls.Lookup("core-auth-storage.yaml"),
39 tmpls.Lookup("core-auth.yaml"),
40 },
41 }
42}
43
44func CreateAppVaultwarden(tmpls *template.Template) App {
45 return App{
46 "vaultwarden",
47 []*template.Template{
48 tmpls.Lookup("vaultwarden.yaml"),
49 },
50 }
51}
52
53func CreateAppMatrix(tmpls *template.Template) App {
54 return App{
55 "matrix",
56 []*template.Template{
57 tmpls.Lookup("matrix-storage.yaml"),
58 tmpls.Lookup("matrix.yaml"),
59 },
60 }
61}
62
63func CreateAppPihole(tmpls *template.Template) App {
64 return App{
65 "pihole",
66 []*template.Template{
67 tmpls.Lookup("pihole.yaml"),
68 },
69 }
70}
71
72func CreateAppMaddy(tmpls *template.Template) App {
73 return App{
74 "maddy",
75 []*template.Template{
76 tmpls.Lookup("maddy.yaml"),
77 },
78 }
79}
giolekvaef76a3e2022-01-10 12:22:28 +040080
81func CreateAppQBittorrent(tmpls *template.Template) App {
82 return App{
83 "qbittorrent",
84 []*template.Template{
85 tmpls.Lookup("qbittorrent.yaml"),
86 },
87 }
88}
89
90func CreateAppJellyfin(tmpls *template.Template) App {
91 return App{
92 "jellyfin",
93 []*template.Template{
94 tmpls.Lookup("jellyfin.yaml"),
95 },
96 }
97}