@highstate/library 0.26.1 → 0.27.0
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 +638 -624
- package/package.json +1 -1
- package/src/k8s/apps/etcd.ts +11 -1
- package/src/k8s/apps/wg-feed-server.ts +20 -2
- package/src/wireguard.ts +10 -0
package/package.json
CHANGED
package/src/k8s/apps/etcd.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineUnit } from "@highstate/contract"
|
|
1
|
+
import { defineUnit, z } from "@highstate/contract"
|
|
2
2
|
import { pick } from "remeda"
|
|
3
3
|
import { connectionEntity } from "../../databases/etcd"
|
|
4
4
|
import {
|
|
@@ -19,6 +19,16 @@ export const etcd = defineUnit({
|
|
|
19
19
|
args: {
|
|
20
20
|
...appName("etcd"),
|
|
21
21
|
...pick(sharedArgs, ["external", "values", "patches", "service", "scheduling"]),
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* The odd number of etcd members to deploy.
|
|
25
|
+
*/
|
|
26
|
+
replicas: z
|
|
27
|
+
.number()
|
|
28
|
+
.int()
|
|
29
|
+
.positive()
|
|
30
|
+
.refine(replicas => replicas % 2 === 1, "etcd replicas must be odd")
|
|
31
|
+
.default(1),
|
|
22
32
|
},
|
|
23
33
|
|
|
24
34
|
secrets: {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { defineUnit } from "@highstate/contract"
|
|
1
|
+
import { defineUnit, z } from "@highstate/contract"
|
|
2
2
|
import { pick } from "remeda"
|
|
3
|
+
import { folderEntity } from "../../common"
|
|
3
4
|
import { l4EndpointEntity } from "../../network"
|
|
4
5
|
import { appName, sharedArgs, sharedInputs, source } from "./shared"
|
|
5
6
|
|
|
@@ -11,11 +12,28 @@ export const wgFeedServer = defineUnit({
|
|
|
11
12
|
|
|
12
13
|
args: {
|
|
13
14
|
...appName("wg-feed-server"),
|
|
14
|
-
...pick(sharedArgs, ["fqdn"]),
|
|
15
|
+
...pick(sharedArgs, ["fqdn", "replicas", "scheduling"]),
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* The regular expression matching paths served by the WG feed server.
|
|
19
|
+
*
|
|
20
|
+
* Must be provided together with `fallbackSite`.
|
|
21
|
+
*/
|
|
22
|
+
pathPattern: z.string().optional(),
|
|
15
23
|
},
|
|
16
24
|
|
|
17
25
|
inputs: {
|
|
18
26
|
...pick(sharedInputs, ["k8sCluster", "accessPoint", "etcd"]),
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* The static site served for paths that do not match `pathPattern`.
|
|
30
|
+
*
|
|
31
|
+
* Must be provided together with `pathPattern`.
|
|
32
|
+
*/
|
|
33
|
+
fallbackSite: {
|
|
34
|
+
entity: folderEntity,
|
|
35
|
+
required: false,
|
|
36
|
+
},
|
|
19
37
|
},
|
|
20
38
|
|
|
21
39
|
outputs: {
|
package/src/wireguard.ts
CHANGED
|
@@ -768,6 +768,11 @@ export const nodeK8s = defineUnit({
|
|
|
768
768
|
*/
|
|
769
769
|
external: z.boolean().default(false),
|
|
770
770
|
|
|
771
|
+
/**
|
|
772
|
+
* The NodePort to assign when the node is exposed.
|
|
773
|
+
*/
|
|
774
|
+
nodePort: z.number().int().min(30000).max(32767).optional(),
|
|
775
|
+
|
|
771
776
|
/**
|
|
772
777
|
* The policy to use for exposing the WireGuard node.
|
|
773
778
|
*
|
|
@@ -779,6 +784,11 @@ export const nodeK8s = defineUnit({
|
|
|
779
784
|
*/
|
|
780
785
|
exposePolicy: nodeExposePolicySchema.default("when-has-endpoint"),
|
|
781
786
|
|
|
787
|
+
/**
|
|
788
|
+
* Whether to include a listen port in the generated WireGuard configuration.
|
|
789
|
+
*/
|
|
790
|
+
listen: z.boolean().default(true),
|
|
791
|
+
|
|
782
792
|
/**
|
|
783
793
|
* The extra specification of the container which runs the WireGuard node.
|
|
784
794
|
*
|