@highstate/library 0.9.16 → 0.9.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/highstate.library.msgpack +0 -0
- package/dist/index.js +3548 -2985
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
- package/src/common/access-point.ts +105 -0
- package/src/common/files.ts +137 -0
- package/src/common/index.ts +3 -0
- package/src/common/server.ts +231 -0
- package/src/databases/index.ts +4 -0
- package/src/databases/mariadb.ts +37 -0
- package/src/databases/mongodb.ts +37 -0
- package/src/databases/postgresql.ts +37 -0
- package/src/databases/shared.ts +61 -0
- package/src/distributions/ubuntu.ts +13 -11
- package/src/dns.ts +116 -18
- package/src/git.ts +14 -10
- package/src/impl-ref.ts +26 -0
- package/src/index.ts +14 -15
- package/src/k3s.ts +14 -12
- package/src/k8s/apps/code-server.ts +48 -0
- package/src/k8s/apps/gitea.ts +25 -0
- package/src/k8s/apps/grocy.ts +39 -0
- package/src/k8s/apps/hubble.ts +30 -0
- package/src/{apps → k8s/apps}/index.ts +16 -13
- package/src/k8s/apps/kubernetes-dashboard.ts +28 -0
- package/src/k8s/apps/mariadb.ts +83 -0
- package/src/k8s/apps/maybe.ts +39 -0
- package/src/k8s/apps/mongodb.ts +84 -0
- package/src/k8s/apps/postgresql.ts +86 -0
- package/src/k8s/apps/shared.ts +149 -0
- package/src/k8s/apps/syncthing.ts +72 -0
- package/src/k8s/apps/traefik.ts +40 -0
- package/src/k8s/apps/vaultwarden.ts +31 -0
- package/src/k8s/apps/workload.ts +214 -0
- package/src/k8s/apps/zitadel.ts +26 -0
- package/src/k8s/cert-manager.ts +80 -0
- package/src/k8s/cilium.ts +64 -0
- package/src/k8s/gateway.ts +70 -0
- package/src/k8s/index.ts +9 -0
- package/src/{obfuscators → k8s/obfuscators}/phantun.ts +14 -10
- package/src/{obfuscators → k8s/obfuscators}/shared.ts +17 -11
- package/src/k8s/resources.ts +111 -0
- package/src/k8s/service.ts +65 -0
- package/src/k8s/shared.ts +343 -0
- package/src/k8s/workload.ts +77 -0
- package/src/network.ts +249 -63
- package/src/nixos.ts +38 -77
- package/src/proxmox.ts +203 -96
- package/src/restic.ts +28 -19
- package/src/sops.ts +19 -8
- package/src/ssh.ts +122 -24
- package/src/talos.ts +21 -19
- package/src/third-party/cloudflare.ts +59 -0
- package/src/third-party/index.ts +3 -0
- package/src/{mullvad.ts → third-party/mullvad.ts} +11 -9
- package/src/third-party/timeweb.ts +99 -0
- package/src/utils.ts +27 -6
- package/src/wireguard.ts +249 -115
- package/src/apps/code-server.ts +0 -34
- package/src/apps/deployment.ts +0 -60
- package/src/apps/dns.ts +0 -107
- package/src/apps/gitea.ts +0 -18
- package/src/apps/grocy.ts +0 -20
- package/src/apps/hubble.ts +0 -20
- package/src/apps/kubernetes-dashboard.ts +0 -19
- package/src/apps/mariadb.ts +0 -81
- package/src/apps/maybe.ts +0 -25
- package/src/apps/mongodb.ts +0 -81
- package/src/apps/network.ts +0 -55
- package/src/apps/postgresql.ts +0 -81
- package/src/apps/shared.ts +0 -290
- package/src/apps/syncthing.ts +0 -54
- package/src/apps/test.ts +0 -19
- package/src/apps/traefik.ts +0 -36
- package/src/apps/vaultwarden.ts +0 -23
- package/src/apps/zitadel.ts +0 -21
- package/src/cloudflare.ts +0 -26
- package/src/common.ts +0 -200
- package/src/files.ts +0 -146
- package/src/k8s.ts +0 -638
- package/src/timeweb.ts +0 -75
- package/src/{obfuscators → k8s/obfuscators}/index.ts +1 -1
@@ -1,15 +1,18 @@
|
|
1
|
-
import { defineUnit,
|
2
|
-
import { fileEntity } from "../files"
|
1
|
+
import { defineUnit, z } from "@highstate/contract"
|
2
|
+
import { fileEntity } from "../common/files"
|
3
3
|
|
4
|
-
export const ubuntuVersionSchema =
|
5
|
-
export const ubuntuArchitectureSchema =
|
4
|
+
export const ubuntuVersionSchema = z.enum(["22.04", "24.04", "25.04", "25.10"])
|
5
|
+
export const ubuntuArchitectureSchema = z.enum(["amd64", "arm64"])
|
6
6
|
|
7
|
+
/**
|
8
|
+
* Ubuntu distribution with image and cloud-config.
|
9
|
+
*/
|
7
10
|
export const ubuntu = defineUnit({
|
8
|
-
type: "distributions.ubuntu",
|
11
|
+
type: "distributions.ubuntu.v1",
|
9
12
|
|
10
13
|
args: {
|
11
|
-
version:
|
12
|
-
architecture:
|
14
|
+
version: ubuntuVersionSchema.default("24.04"),
|
15
|
+
architecture: ubuntuArchitectureSchema.default("amd64"),
|
13
16
|
},
|
14
17
|
|
15
18
|
outputs: {
|
@@ -18,10 +21,9 @@ export const ubuntu = defineUnit({
|
|
18
21
|
},
|
19
22
|
|
20
23
|
meta: {
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
primaryIconColor: "#E95420",
|
24
|
+
title: "Ubuntu",
|
25
|
+
icon: "mdi:ubuntu",
|
26
|
+
iconColor: "#E95420",
|
25
27
|
category: "Distributions",
|
26
28
|
},
|
27
29
|
|
package/src/dns.ts
CHANGED
@@ -1,15 +1,28 @@
|
|
1
|
-
import { defineEntity,
|
2
|
-
import {
|
1
|
+
import { defineEntity, defineUnit, z } from "@highstate/contract"
|
2
|
+
import { implementationReferenceSchema } from "./impl-ref"
|
3
|
+
import { endpointFilterSchema, l3EndpointEntity, l4EndpointEntity } from "./network"
|
3
4
|
import { arrayPatchModeSchema, prefixKeysWith } from "./utils"
|
4
5
|
|
5
6
|
export const providerEntity = defineEntity({
|
6
|
-
type: "dns.provider",
|
7
|
+
type: "dns.provider.v1",
|
7
8
|
|
8
|
-
schema:
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
9
|
+
schema: z.object({
|
10
|
+
/**
|
11
|
+
* The ID of the DNS provider unique within the system.
|
12
|
+
*/
|
13
|
+
id: z.string(),
|
14
|
+
|
15
|
+
/**
|
16
|
+
* The domain apex for which the DNS records will be created.
|
17
|
+
*
|
18
|
+
* If the provider manages multiple domains, the separate provider entity should be created for each domain.
|
19
|
+
*/
|
20
|
+
domain: z.string(),
|
21
|
+
|
22
|
+
/**
|
23
|
+
* The reference to the implementation of the DNS provider.
|
24
|
+
*/
|
25
|
+
implRef: implementationReferenceSchema,
|
13
26
|
}),
|
14
27
|
|
15
28
|
meta: {
|
@@ -17,6 +30,91 @@ export const providerEntity = defineEntity({
|
|
17
30
|
},
|
18
31
|
})
|
19
32
|
|
33
|
+
export const recordSet = defineUnit({
|
34
|
+
type: "dns.record-set.v1",
|
35
|
+
|
36
|
+
args: {
|
37
|
+
...createArgs(),
|
38
|
+
|
39
|
+
/**
|
40
|
+
* The values of the DNS record.
|
41
|
+
*/
|
42
|
+
values: z.string().array().default([]),
|
43
|
+
|
44
|
+
/**
|
45
|
+
* The TTL of the DNS record.
|
46
|
+
*/
|
47
|
+
ttl: z.number().optional(),
|
48
|
+
|
49
|
+
/**
|
50
|
+
* The priority of the DNS record.
|
51
|
+
*/
|
52
|
+
priority: z.number().optional(),
|
53
|
+
|
54
|
+
/**
|
55
|
+
* Whether the DNS record is proxied.
|
56
|
+
*
|
57
|
+
* Available only for public IPs and some DNS providers like Cloudflare.
|
58
|
+
*/
|
59
|
+
proxied: z.boolean().default(false),
|
60
|
+
},
|
61
|
+
|
62
|
+
inputs: {
|
63
|
+
/**
|
64
|
+
* The DNS providers to use to create the DNS records.
|
65
|
+
*
|
66
|
+
* For each provider, a separate DNS record will be created.
|
67
|
+
*/
|
68
|
+
dnsProviders: {
|
69
|
+
entity: providerEntity,
|
70
|
+
multiple: true,
|
71
|
+
},
|
72
|
+
|
73
|
+
/**
|
74
|
+
* The L3 endpoints to use as values of the DNS records.
|
75
|
+
*/
|
76
|
+
l3Endpoints: {
|
77
|
+
entity: l3EndpointEntity,
|
78
|
+
required: false,
|
79
|
+
multiple: true,
|
80
|
+
},
|
81
|
+
|
82
|
+
/**
|
83
|
+
* The L4 endpoints to use as values of the DNS records.
|
84
|
+
*/
|
85
|
+
l4Endpoints: {
|
86
|
+
entity: l4EndpointEntity,
|
87
|
+
required: false,
|
88
|
+
multiple: true,
|
89
|
+
},
|
90
|
+
},
|
91
|
+
|
92
|
+
outputs: {
|
93
|
+
l3Endpoints: {
|
94
|
+
entity: l3EndpointEntity,
|
95
|
+
multiple: true,
|
96
|
+
},
|
97
|
+
|
98
|
+
l4Endpoints: {
|
99
|
+
entity: l4EndpointEntity,
|
100
|
+
multiple: true,
|
101
|
+
},
|
102
|
+
},
|
103
|
+
|
104
|
+
meta: {
|
105
|
+
title: "DNS Record Set",
|
106
|
+
description: "A set of DNS records to be created.",
|
107
|
+
icon: "mdi:server",
|
108
|
+
defaultNamePrefix: "record",
|
109
|
+
category: "Network",
|
110
|
+
},
|
111
|
+
|
112
|
+
source: {
|
113
|
+
package: "@highstate/common",
|
114
|
+
path: "units/dns/record-set",
|
115
|
+
},
|
116
|
+
})
|
117
|
+
|
20
118
|
export function createArgs<TPrefix extends string = "">(prefix?: TPrefix) {
|
21
119
|
return prefixKeysWith(prefix, {
|
22
120
|
/**
|
@@ -26,26 +124,26 @@ export function createArgs<TPrefix extends string = "">(prefix?: TPrefix) {
|
|
26
124
|
*
|
27
125
|
* Will throw an error if no matching provider is found.
|
28
126
|
*/
|
29
|
-
fqdn:
|
127
|
+
fqdn: z.string().optional(),
|
30
128
|
|
31
129
|
/**
|
32
130
|
* The endpoint filter to filter the endpoints before creating the DNS records.
|
33
131
|
*
|
34
132
|
* Possible values:
|
35
133
|
*
|
36
|
-
* - `public`:
|
37
|
-
* - `external`:
|
38
|
-
* - `internal`:
|
134
|
+
* - `public`: only endpoints exposed to the public internet;
|
135
|
+
* - `external`: reachable from outside the system but not public (e.g., LAN, VPC);
|
136
|
+
* - `internal`: reachable only from within the system boundary (e.g., inside a cluster).
|
39
137
|
*
|
40
138
|
* You can select one or more values.
|
41
139
|
*
|
42
140
|
* If no value is provided, the endpoints will be filtered by the most accessible type:
|
43
141
|
*
|
44
|
-
* -
|
45
|
-
* -
|
46
|
-
* -
|
142
|
+
* - if any public endpoints exist, all public endpoints are selected;
|
143
|
+
* - otherwise, if any external endpoints exist, all external endpoints are selected;
|
144
|
+
* - if neither exist, all internal endpoints are selected.
|
47
145
|
*/
|
48
|
-
endpointFilter:
|
146
|
+
endpointFilter: endpointFilterSchema.default([]),
|
49
147
|
|
50
148
|
/**
|
51
149
|
* The mode to use for patching the existing endpoints.
|
@@ -55,7 +153,7 @@ export function createArgs<TPrefix extends string = "">(prefix?: TPrefix) {
|
|
55
153
|
*
|
56
154
|
* The default is `prepend`.
|
57
155
|
*/
|
58
|
-
patchMode:
|
156
|
+
patchMode: arrayPatchModeSchema.default("prepend"),
|
59
157
|
})
|
60
158
|
}
|
61
159
|
|
@@ -71,4 +169,4 @@ export const inputs = {
|
|
71
169
|
},
|
72
170
|
} as const
|
73
171
|
|
74
|
-
export type Provider =
|
172
|
+
export type Provider = z.infer<typeof providerEntity.schema>
|
package/src/git.ts
CHANGED
@@ -1,29 +1,34 @@
|
|
1
|
-
import { defineUnit,
|
1
|
+
import { defineUnit, z } from "@highstate/contract"
|
2
|
+
import { folderEntity } from "./common/files"
|
2
3
|
import { l7EndpointEntity } from "./network"
|
3
|
-
import { folderEntity } from "./files"
|
4
4
|
|
5
|
+
/**
|
6
|
+
* References a remote Git repository.
|
7
|
+
*
|
8
|
+
* The repository will be cloned or fetched from the specified URL and the content will be packed into a folder.
|
9
|
+
*/
|
5
10
|
export const remoteRepository = defineUnit({
|
6
|
-
type: "git.remote-repository",
|
11
|
+
type: "git.remote-repository.v1",
|
7
12
|
|
8
13
|
args: {
|
9
14
|
/**
|
10
15
|
* The URL of the remote repository.
|
11
16
|
*/
|
12
|
-
url:
|
17
|
+
url: z.string().optional(),
|
13
18
|
|
14
19
|
/**
|
15
20
|
* The ref of the remote repository to checkout.
|
16
21
|
*
|
17
22
|
* If not specified, the default branch will be used.
|
18
23
|
*/
|
19
|
-
ref:
|
24
|
+
ref: z.string().optional(),
|
20
25
|
|
21
26
|
/**
|
22
27
|
* Whether to include the .git directory in the packed artifact.
|
23
28
|
*
|
24
29
|
* Do not enable this unless you need the full git history.
|
25
30
|
*/
|
26
|
-
includeGit:
|
31
|
+
includeGit: z.boolean().default(false),
|
27
32
|
},
|
28
33
|
|
29
34
|
inputs: {
|
@@ -44,10 +49,9 @@ export const remoteRepository = defineUnit({
|
|
44
49
|
},
|
45
50
|
|
46
51
|
meta: {
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
primaryIconColor: "#f1502f",
|
52
|
+
title: "Git Remote Repository",
|
53
|
+
icon: "simple-icons:git",
|
54
|
+
iconColor: "#f1502f",
|
51
55
|
category: "Git",
|
52
56
|
},
|
53
57
|
|
package/src/impl-ref.ts
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
import { z } from "@highstate/contract"
|
2
|
+
|
3
|
+
/**
|
4
|
+
* The schema which represents some generic reference to an implementation of some functionality.
|
5
|
+
*
|
6
|
+
* The implementation is dynamically loaded from the provided package and can be used to create resources or perform actions.
|
7
|
+
*
|
8
|
+
* It can be used for:
|
9
|
+
*
|
10
|
+
* - creating DNS records for different providers;
|
11
|
+
* - creating access points for different gateways in different environments;
|
12
|
+
* - creating network policies for different CNIs.
|
13
|
+
*/
|
14
|
+
export const implementationReferenceSchema = z.object({
|
15
|
+
/**
|
16
|
+
* The name of the package which contains the implementation.
|
17
|
+
*/
|
18
|
+
package: z.string(),
|
19
|
+
|
20
|
+
/**
|
21
|
+
* The implementation specific data.
|
22
|
+
*/
|
23
|
+
data: z.record(z.string(), z.unknown()),
|
24
|
+
})
|
25
|
+
|
26
|
+
export type ImplementationReference = z.infer<typeof implementationReferenceSchema>
|
package/src/index.ts
CHANGED
@@ -1,23 +1,22 @@
|
|
1
1
|
import { noop } from "./abbreviations"
|
2
|
+
|
2
3
|
noop()
|
3
4
|
|
4
5
|
export * as common from "./common"
|
5
|
-
export * as
|
6
|
-
export * as
|
7
|
-
export * as k8s from "./k8s"
|
8
|
-
export * as talos from "./talos"
|
9
|
-
export * as wireguard from "./wireguard"
|
10
|
-
export * as apps from "./apps"
|
11
|
-
export * as cloudflare from "./cloudflare"
|
12
|
-
export * as k3s from "./k3s"
|
13
|
-
export * as restic from "./restic"
|
14
|
-
export * as mullvad from "./mullvad"
|
6
|
+
export * as databases from "./databases"
|
7
|
+
export * as distributions from "./distributions"
|
15
8
|
export * as dns from "./dns"
|
16
|
-
export * as
|
9
|
+
export * as git from "./git"
|
10
|
+
export * from "./impl-ref"
|
11
|
+
export * as k3s from "./k3s"
|
12
|
+
export * as k8s from "./k8s"
|
13
|
+
export * as network from "./network"
|
17
14
|
export * as nixos from "./nixos"
|
15
|
+
export * as proxmox from "./proxmox"
|
16
|
+
export * as restic from "./restic"
|
18
17
|
export * as sops from "./sops"
|
19
|
-
export * as
|
20
|
-
export * as
|
21
|
-
export *
|
22
|
-
export * as git from "./git"
|
18
|
+
export * as ssh from "./ssh"
|
19
|
+
export * as talos from "./talos"
|
20
|
+
export * from "./third-party"
|
23
21
|
export * from "./utils"
|
22
|
+
export * as wireguard from "./wireguard"
|
package/src/k3s.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
import { defineUnit,
|
2
|
-
import { clusterInputs, clusterOutputs } from "./k8s"
|
1
|
+
import { defineUnit, z } from "@highstate/contract"
|
2
|
+
import { clusterInputs, clusterOutputs } from "./k8s/shared"
|
3
3
|
|
4
4
|
export const packagedComponents = [
|
5
5
|
"coredns",
|
@@ -18,18 +18,21 @@ export const internalComponents = [
|
|
18
18
|
"helm-controller",
|
19
19
|
] as const
|
20
20
|
|
21
|
-
export const componentSchema =
|
21
|
+
export const componentSchema = z.enum([...packagedComponents, ...internalComponents])
|
22
22
|
|
23
|
-
export const cniSchema =
|
23
|
+
export const cniSchema = z.enum(["none", "flannel"])
|
24
24
|
|
25
|
+
/**
|
26
|
+
* The K3s cluster created on top of the server.
|
27
|
+
*/
|
25
28
|
export const cluster = defineUnit({
|
26
|
-
type: "k3s.cluster",
|
29
|
+
type: "k3s.cluster.v1",
|
27
30
|
|
28
31
|
args: {
|
29
32
|
/**
|
30
33
|
* The components to disable in the K3S cluster.
|
31
34
|
*/
|
32
|
-
disabledComponents:
|
35
|
+
disabledComponents: componentSchema.array().default([]),
|
33
36
|
|
34
37
|
/**
|
35
38
|
* The CNI to use in the K3S cluster.
|
@@ -37,31 +40,30 @@ export const cluster = defineUnit({
|
|
37
40
|
* Setting this to "none" will disable default Flannel CNI, but will not disable network policy controller and kube-proxy.
|
38
41
|
* If needed, you can disable them using `disabledComponents` argument.
|
39
42
|
*/
|
40
|
-
cni:
|
43
|
+
cni: cniSchema.default("flannel"),
|
41
44
|
|
42
45
|
/**
|
43
46
|
* The K3S configuration to pass to each server or agent in the cluster.
|
44
47
|
*
|
45
48
|
* See: https://docs.k3s.io/installation/configuration
|
46
49
|
*/
|
47
|
-
config:
|
50
|
+
config: z.record(z.string(), z.unknown()).optional(),
|
48
51
|
|
49
52
|
/**
|
50
53
|
* The configuration of the registries to use for the K3S cluster.
|
51
54
|
*
|
52
55
|
* See: https://docs.k3s.io/installation/private-registry
|
53
56
|
*/
|
54
|
-
registries:
|
57
|
+
registries: z.record(z.string(), z.unknown()).optional(),
|
55
58
|
},
|
56
59
|
|
57
60
|
inputs: clusterInputs,
|
58
61
|
outputs: clusterOutputs,
|
59
62
|
|
60
63
|
meta: {
|
61
|
-
|
62
|
-
description: "The K3s cluster created on top of the server.",
|
64
|
+
title: "K3s Cluster",
|
63
65
|
category: "k3s",
|
64
|
-
|
66
|
+
icon: "devicon:k3s",
|
65
67
|
secondaryIcon: "devicon:kubernetes",
|
66
68
|
},
|
67
69
|
|
@@ -0,0 +1,48 @@
|
|
1
|
+
import { defineUnit, z } from "@highstate/contract"
|
2
|
+
import { pick } from "remeda"
|
3
|
+
import { persistentVolumeClaimEntity } from "../resources"
|
4
|
+
import { statefulSetEntity } from "../workload"
|
5
|
+
import {
|
6
|
+
appName,
|
7
|
+
optionalSharedInputs,
|
8
|
+
sharedArgs,
|
9
|
+
sharedInputs,
|
10
|
+
sharedSecrets,
|
11
|
+
source,
|
12
|
+
} from "./shared"
|
13
|
+
|
14
|
+
/**
|
15
|
+
* The Code Server instance deployed on Kubernetes.
|
16
|
+
*/
|
17
|
+
export const codeServer = defineUnit({
|
18
|
+
type: "k8s.apps.code-server.v1",
|
19
|
+
|
20
|
+
args: {
|
21
|
+
...appName("code-server"),
|
22
|
+
...pick(sharedArgs, ["fqdn"]),
|
23
|
+
},
|
24
|
+
|
25
|
+
secrets: {
|
26
|
+
...pick(sharedSecrets, ["backupPassword"]),
|
27
|
+
password: z.string().optional(),
|
28
|
+
sudoPassword: z.string().optional(),
|
29
|
+
},
|
30
|
+
|
31
|
+
inputs: {
|
32
|
+
...pick(sharedInputs, ["k8sCluster", "accessPoint"]),
|
33
|
+
...pick(optionalSharedInputs, ["resticRepo", "dnsProviders", "volume"]),
|
34
|
+
},
|
35
|
+
|
36
|
+
outputs: {
|
37
|
+
statefulSet: statefulSetEntity,
|
38
|
+
volume: persistentVolumeClaimEntity,
|
39
|
+
},
|
40
|
+
|
41
|
+
meta: {
|
42
|
+
title: "Code Server",
|
43
|
+
icon: "material-icon-theme:vscode",
|
44
|
+
category: "Development",
|
45
|
+
},
|
46
|
+
|
47
|
+
source: source("code-server"),
|
48
|
+
})
|
@@ -0,0 +1,25 @@
|
|
1
|
+
import { defineUnit } from "@highstate/contract"
|
2
|
+
import { pick } from "remeda"
|
3
|
+
import { appName, sharedInputs, source } from "./shared"
|
4
|
+
|
5
|
+
/**
|
6
|
+
* The Gitea Git server deployed on Kubernetes.
|
7
|
+
*/
|
8
|
+
export const gitea = defineUnit({
|
9
|
+
type: "k8s.apps.gitea.v1",
|
10
|
+
|
11
|
+
args: {
|
12
|
+
...appName("gitea"),
|
13
|
+
},
|
14
|
+
inputs: {
|
15
|
+
...pick(sharedInputs, ["k8sCluster", "accessPoint", "mariadb"]),
|
16
|
+
},
|
17
|
+
|
18
|
+
meta: {
|
19
|
+
title: "Gitea",
|
20
|
+
icon: "simple-icons:gitea",
|
21
|
+
category: "Development",
|
22
|
+
},
|
23
|
+
|
24
|
+
source: source("gitea"),
|
25
|
+
})
|
@@ -0,0 +1,39 @@
|
|
1
|
+
import { defineUnit } from "@highstate/contract"
|
2
|
+
import { pick } from "remeda"
|
3
|
+
import {
|
4
|
+
appName,
|
5
|
+
optionalSharedInputs,
|
6
|
+
sharedArgs,
|
7
|
+
sharedInputs,
|
8
|
+
sharedSecrets,
|
9
|
+
source,
|
10
|
+
} from "./shared"
|
11
|
+
|
12
|
+
/**
|
13
|
+
* The Grocy application deployed on Kubernetes.
|
14
|
+
*
|
15
|
+
* Grocy is a web-based self-hosted groceries & household management solution for your home.
|
16
|
+
*/
|
17
|
+
export const grocy = defineUnit({
|
18
|
+
type: "k8s.apps.grocy.v1",
|
19
|
+
|
20
|
+
args: {
|
21
|
+
...appName("grocy"),
|
22
|
+
...pick(sharedArgs, ["fqdn"]),
|
23
|
+
},
|
24
|
+
secrets: {
|
25
|
+
...pick(sharedSecrets, ["backupPassword"]),
|
26
|
+
},
|
27
|
+
inputs: {
|
28
|
+
...pick(sharedInputs, ["k8sCluster", "accessPoint"]),
|
29
|
+
...pick(optionalSharedInputs, ["resticRepo"]),
|
30
|
+
},
|
31
|
+
|
32
|
+
meta: {
|
33
|
+
title: "Grocy",
|
34
|
+
icon: "simple-icons:grocy",
|
35
|
+
category: "Productivity",
|
36
|
+
},
|
37
|
+
|
38
|
+
source: source("grocy"),
|
39
|
+
})
|
@@ -0,0 +1,30 @@
|
|
1
|
+
import { defineUnit } from "@highstate/contract"
|
2
|
+
import { pick } from "remeda"
|
3
|
+
import { appName, sharedArgs, sharedInputs, source } from "./shared"
|
4
|
+
|
5
|
+
/**
|
6
|
+
* Exposes Hubble UI to the user.
|
7
|
+
*
|
8
|
+
* It must be already installed in the cluster as part of the Cilium.
|
9
|
+
*/
|
10
|
+
export const hubble = defineUnit({
|
11
|
+
type: "k8s.apps.hubble.v1",
|
12
|
+
|
13
|
+
args: {
|
14
|
+
...appName("hubble"),
|
15
|
+
...pick(sharedArgs, ["fqdn"]),
|
16
|
+
},
|
17
|
+
|
18
|
+
inputs: {
|
19
|
+
...pick(sharedInputs, ["k8sCluster", "accessPoint"]),
|
20
|
+
},
|
21
|
+
|
22
|
+
meta: {
|
23
|
+
title: "Hubble",
|
24
|
+
icon: "mdi:eye",
|
25
|
+
secondaryIcon: "simple-icons:cilium",
|
26
|
+
category: "Observability",
|
27
|
+
},
|
28
|
+
|
29
|
+
source: source("hubble"),
|
30
|
+
})
|
@@ -1,18 +1,21 @@
|
|
1
|
+
export * from "./code-server"
|
2
|
+
export * from "./grocy"
|
3
|
+
export * from "./hubble"
|
4
|
+
export * from "./kubernetes-dashboard"
|
1
5
|
export * from "./mariadb"
|
2
|
-
export * from "./
|
3
|
-
export * from "./vaultwarden"
|
6
|
+
export * from "./maybe"
|
4
7
|
export * from "./mongodb"
|
5
|
-
export * from "./
|
6
|
-
export
|
8
|
+
export * from "./postgresql"
|
9
|
+
export {
|
10
|
+
appName,
|
11
|
+
optionalSharedArgs,
|
12
|
+
optionalSharedInputs,
|
13
|
+
sharedArgs,
|
14
|
+
sharedInputs,
|
15
|
+
} from "./shared"
|
16
|
+
export * from "./syncthing"
|
7
17
|
// export * from "./zitadel"
|
8
18
|
// export * from "./gitea"
|
9
19
|
export * from "./traefik"
|
10
|
-
export * from "./
|
11
|
-
export * from "./
|
12
|
-
export * from "./maybe"
|
13
|
-
export * from "./deployment"
|
14
|
-
export * from "./syncthing"
|
15
|
-
export * from "./code-server"
|
16
|
-
export * from "./hubble"
|
17
|
-
|
18
|
-
export { createArgs, createInputs } from "./shared"
|
20
|
+
export * from "./vaultwarden"
|
21
|
+
export * from "./workload"
|
@@ -0,0 +1,28 @@
|
|
1
|
+
import { defineUnit } from "@highstate/contract"
|
2
|
+
import { pick } from "remeda"
|
3
|
+
import { appName, sharedArgs, sharedInputs, source } from "./shared"
|
4
|
+
|
5
|
+
/**
|
6
|
+
* The Kubernetes Dashboard deployed on Kubernetes.
|
7
|
+
*/
|
8
|
+
export const kubernetesDashboard = defineUnit({
|
9
|
+
type: "k8s.apps.kubernetes-dashboard.v1",
|
10
|
+
|
11
|
+
args: {
|
12
|
+
...appName("kubernetes-dashboard"),
|
13
|
+
...pick(sharedArgs, ["fqdn"]),
|
14
|
+
},
|
15
|
+
|
16
|
+
inputs: {
|
17
|
+
...pick(sharedInputs, ["k8sCluster", "accessPoint"]),
|
18
|
+
},
|
19
|
+
|
20
|
+
meta: {
|
21
|
+
title: "Kubernetes Dashboard",
|
22
|
+
icon: "devicon:kubernetes",
|
23
|
+
secondaryIcon: "material-symbols:dashboard",
|
24
|
+
category: "Kubernetes",
|
25
|
+
},
|
26
|
+
|
27
|
+
source: source("kubernetes-dashboard"),
|
28
|
+
})
|