@ydkn/pulumi-components 0.8.9 → 0.9.1
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/index.d.ts +2 -4
- package/index.js +2 -4
- package/index.js.map +1 -1
- package/lib/alpine/assets/init.sh +0 -0
- package/lib/alpine/config.js +1 -0
- package/lib/alpine/config.js.map +1 -1
- package/lib/alpine/deployment.js +1 -1
- package/lib/alpine/deployment.js.map +1 -1
- package/lib/alpine/host.js +2 -0
- package/lib/alpine/host.js.map +1 -1
- package/lib/avahi/deployment.js +1 -1
- package/lib/fcos/assets/rpm-ostree-install.sh +0 -0
- package/lib/freeradius/deployment.js +1 -1
- package/lib/grafana/alloy.js +1 -0
- package/lib/grafana/alloy.js.map +1 -1
- package/lib/hcloud/assets/alpine-install.sh +0 -0
- package/lib/hcloud/assets/fcos-install.sh +0 -0
- package/lib/hcloud/assets/flatcar-install.sh +0 -0
- package/lib/kubernetes/assets/crashed-cleanup.sh +0 -0
- package/lib/kubernetes/index.d.ts +1 -2
- package/lib/kubernetes/index.js +1 -2
- package/lib/kubernetes/index.js.map +1 -1
- package/lib/kured/deployment.d.ts +16 -0
- package/lib/kured/deployment.js +42 -0
- package/lib/kured/deployment.js.map +1 -0
- package/lib/kured/index.d.ts +2 -0
- package/lib/kured/index.js +3 -0
- package/lib/kured/index.js.map +1 -0
- package/lib/nats/cluster.js +14 -10
- package/lib/nats/cluster.js.map +1 -1
- package/lib/netbird/agent.d.ts +0 -4
- package/lib/netbird/agent.js +2 -36
- package/lib/netbird/agent.js.map +1 -1
- package/lib/netbird/management.d.ts +1 -0
- package/lib/netbird/management.js +3 -3
- package/lib/netbird/management.js.map +1 -1
- package/lib/plex/mediaServer.js +1 -1
- package/lib/plex/mediaServer.js.map +1 -1
- package/lib/raspberrypi/cluster.js +18 -0
- package/lib/raspberrypi/cluster.js.map +1 -1
- package/lib/rook/blockPool.js +1 -1
- package/lib/rook/blockPool.js.map +1 -1
- package/lib/rook/filesystem.js +1 -0
- package/lib/rook/filesystem.js.map +1 -1
- package/lib/rook/operator.d.ts +8 -0
- package/lib/rook/operator.js +116 -120
- package/lib/rook/operator.js.map +1 -1
- package/lib/samba/dc.js +1 -1
- package/lib/samba/dc.js.map +1 -1
- package/lib/samba/deployment.js +1 -1
- package/lib/samba/deployment.js.map +1 -1
- package/lib/traefik/controller.js +6 -3
- package/lib/traefik/controller.js.map +1 -1
- package/lib/ubuntu/assets/init.sh +0 -0
- package/lib/ubuntu/deployment.js +1 -1
- package/lib/ubuntu/deployment.js.map +1 -1
- package/lib/unifi/osServer.js +5 -8
- package/lib/unifi/osServer.js.map +1 -1
- package/lib/wireguard/deployment.js +1 -1
- package/package.json +29 -25
- package/lib/cilium/deployment.d.ts +0 -33
- package/lib/cilium/deployment.js +0 -112
- package/lib/cilium/deployment.js.map +0 -1
- package/lib/cilium/index.d.ts +0 -5
- package/lib/cilium/index.js +0 -6
- package/lib/cilium/index.js.map +0 -1
- package/lib/cilium/l2AnnouncementPolicy.d.ts +0 -22
- package/lib/cilium/l2AnnouncementPolicy.js +0 -25
- package/lib/cilium/l2AnnouncementPolicy.js.map +0 -1
- package/lib/cilium/loadBalancerIPPool.d.ts +0 -22
- package/lib/cilium/loadBalancerIPPool.js +0 -18
- package/lib/cilium/loadBalancerIPPool.js.map +0 -1
- package/lib/cilium/localRedirectPolicy.d.ts +0 -40
- package/lib/cilium/localRedirectPolicy.js +0 -13
- package/lib/cilium/localRedirectPolicy.js.map +0 -1
- package/lib/kubernetes/interfaceBridge/assets/bridge.sh +0 -43
- package/lib/kubernetes/interfaceBridge/bridge.d.ts +0 -6
- package/lib/kubernetes/interfaceBridge/bridge.js +0 -26
- package/lib/kubernetes/interfaceBridge/bridge.js.map +0 -1
- package/lib/kubernetes/interfaceBridge/index.d.ts +0 -2
- package/lib/kubernetes/interfaceBridge/index.js +0 -3
- package/lib/kubernetes/interfaceBridge/index.js.map +0 -1
- package/lib/netbird/assets/nftables.sh +0 -44
- package/lib/oauth2Proxy/deployment.d.ts +0 -20
- package/lib/oauth2Proxy/deployment.js +0 -56
- package/lib/oauth2Proxy/deployment.js.map +0 -1
- package/lib/oauth2Proxy/index.d.ts +0 -2
- package/lib/oauth2Proxy/index.js +0 -3
- package/lib/oauth2Proxy/index.js.map +0 -1
- package/lib/paperless/deployment.d.ts +0 -36
- package/lib/paperless/deployment.js +0 -164
- package/lib/paperless/deployment.js.map +0 -1
- package/lib/paperless/index.d.ts +0 -2
- package/lib/paperless/index.js +0 -3
- package/lib/paperless/index.js.map +0 -1
- package/lib/qbittorrent/deployment.d.ts +0 -65
- package/lib/qbittorrent/deployment.js +0 -410
- package/lib/qbittorrent/deployment.js.map +0 -1
- package/lib/qbittorrent/index.d.ts +0 -2
- package/lib/qbittorrent/index.js +0 -3
- package/lib/qbittorrent/index.js.map +0 -1
|
@@ -1,164 +0,0 @@
|
|
|
1
|
-
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
-
import * as k8s from "@pulumi/kubernetes";
|
|
3
|
-
import { ComponentResource } from "../common/index.js";
|
|
4
|
-
import * as kubernetes from "../kubernetes/index.js";
|
|
5
|
-
export class Paperless extends ComponentResource {
|
|
6
|
-
dataVolumeClaim;
|
|
7
|
-
deployment;
|
|
8
|
-
podDisruptionBudget;
|
|
9
|
-
service;
|
|
10
|
-
ingress;
|
|
11
|
-
namespace;
|
|
12
|
-
/**
|
|
13
|
-
* Create a new paperless resource.
|
|
14
|
-
* @param name The name of the paperless resource.
|
|
15
|
-
* @param args A bag of arguments to control the paperless creation.
|
|
16
|
-
* @param opts A bag of options that control this resource's behavior.
|
|
17
|
-
*/
|
|
18
|
-
constructor(name, args, opts) {
|
|
19
|
-
super("paperless", name, args, opts);
|
|
20
|
-
opts = this.opts(k8s.Provider);
|
|
21
|
-
args.replicas ??= 1;
|
|
22
|
-
args.storage ??= "10Gi";
|
|
23
|
-
args.resources ??= {
|
|
24
|
-
requests: { memory: "512Mi" },
|
|
25
|
-
limits: { memory: "768Mi" },
|
|
26
|
-
};
|
|
27
|
-
this.namespace = args.namespace
|
|
28
|
-
? pulumi.output(args.namespace)
|
|
29
|
-
: new k8s.core.v1.Namespace(name, { metadata: { name } }, opts).metadata.name;
|
|
30
|
-
const metadata = {
|
|
31
|
-
name,
|
|
32
|
-
namespace: this.namespace,
|
|
33
|
-
labels: {
|
|
34
|
-
"app.kubernetes.io/name": "paperless",
|
|
35
|
-
"app.kubernetes.io/component": "paperless",
|
|
36
|
-
"app.kubernetes.io/instance": name,
|
|
37
|
-
},
|
|
38
|
-
};
|
|
39
|
-
const dataVolumeClaimName = pulumi.interpolate `${metadata.name}-data`;
|
|
40
|
-
this.dataVolumeClaim = new k8s.core.v1.PersistentVolumeClaim(`${name}-data`, {
|
|
41
|
-
metadata: { ...metadata, name: dataVolumeClaimName },
|
|
42
|
-
spec: {
|
|
43
|
-
storageClassName: args.storageClassName,
|
|
44
|
-
accessModes: ["ReadWriteOnce"],
|
|
45
|
-
resources: { requests: { storage: args.storage } },
|
|
46
|
-
},
|
|
47
|
-
}, { ...opts, protect: args.protect });
|
|
48
|
-
this.deployment = new k8s.apps.v1.Deployment(name, {
|
|
49
|
-
metadata,
|
|
50
|
-
spec: {
|
|
51
|
-
selector: { matchLabels: metadata.labels },
|
|
52
|
-
replicas: args.replicas,
|
|
53
|
-
strategy: { type: "Recreate" },
|
|
54
|
-
template: {
|
|
55
|
-
metadata: { labels: metadata.labels },
|
|
56
|
-
spec: {
|
|
57
|
-
enableServiceLinks: false,
|
|
58
|
-
containers: [
|
|
59
|
-
{
|
|
60
|
-
name: "paperless",
|
|
61
|
-
image: "ghcr.io/paperless-ngx/paperless-ngx:latest",
|
|
62
|
-
imagePullPolicy: "Always",
|
|
63
|
-
ports: [{ name: "http", protocol: "TCP", containerPort: 8000 }],
|
|
64
|
-
env: pulumi.all([args.redis]).apply(([redis]) => {
|
|
65
|
-
return [
|
|
66
|
-
{
|
|
67
|
-
name: "PAPERLESS_REDIS",
|
|
68
|
-
value: pulumi.interpolate `redis://${redis?.address ?? "redis"}/${redis?.database ?? 0}`,
|
|
69
|
-
},
|
|
70
|
-
{ name: "PAPERLESS_URL", value: pulumi.interpolate `https://${args.hostname}` },
|
|
71
|
-
];
|
|
72
|
-
}),
|
|
73
|
-
resources: args.resources,
|
|
74
|
-
readinessProbe: {
|
|
75
|
-
exec: { command: ["curl", "-fs", "-S", "--max-time", "2", "http://localhost:8000"] },
|
|
76
|
-
periodSeconds: 30,
|
|
77
|
-
failureThreshold: 2,
|
|
78
|
-
successThreshold: 1,
|
|
79
|
-
timeoutSeconds: 10,
|
|
80
|
-
},
|
|
81
|
-
livenessProbe: {
|
|
82
|
-
exec: { command: ["curl", "-fs", "-S", "--max-time", "2", "http://localhost:8000"] },
|
|
83
|
-
periodSeconds: 30,
|
|
84
|
-
failureThreshold: 5,
|
|
85
|
-
successThreshold: 1,
|
|
86
|
-
timeoutSeconds: 10,
|
|
87
|
-
},
|
|
88
|
-
volumeMounts: [
|
|
89
|
-
{ name: "data", mountPath: "/usr/src/paperless/data", subPath: "data" },
|
|
90
|
-
{ name: "data", mountPath: "/usr/src/paperless/media", subPath: "media" },
|
|
91
|
-
{ name: "data", mountPath: "/usr/src/paperless/export", subPath: "export" },
|
|
92
|
-
{ name: "data", mountPath: "/usr/src/paperless/consume", subPath: "consume" },
|
|
93
|
-
],
|
|
94
|
-
},
|
|
95
|
-
],
|
|
96
|
-
affinity: {
|
|
97
|
-
podAntiAffinity: {
|
|
98
|
-
preferredDuringSchedulingIgnoredDuringExecution: [
|
|
99
|
-
{
|
|
100
|
-
weight: 100,
|
|
101
|
-
podAffinityTerm: {
|
|
102
|
-
labelSelector: {
|
|
103
|
-
matchExpressions: [
|
|
104
|
-
{
|
|
105
|
-
key: "app.kubernetes.io/name",
|
|
106
|
-
operator: "In",
|
|
107
|
-
values: [metadata.labels["app.kubernetes.io/name"]],
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
key: "app.kubernetes.io/instance",
|
|
111
|
-
operator: "In",
|
|
112
|
-
values: [metadata.labels["app.kubernetes.io/instance"]],
|
|
113
|
-
},
|
|
114
|
-
],
|
|
115
|
-
},
|
|
116
|
-
topologyKey: "kubernetes.io/hostname",
|
|
117
|
-
},
|
|
118
|
-
},
|
|
119
|
-
],
|
|
120
|
-
},
|
|
121
|
-
},
|
|
122
|
-
volumes: [{ name: "data", persistentVolumeClaim: { claimName: dataVolumeClaimName } }],
|
|
123
|
-
},
|
|
124
|
-
},
|
|
125
|
-
},
|
|
126
|
-
}, opts);
|
|
127
|
-
this.podDisruptionBudget = new k8s.policy.v1.PodDisruptionBudget(name, {
|
|
128
|
-
metadata,
|
|
129
|
-
spec: {
|
|
130
|
-
minAvailable: 1,
|
|
131
|
-
selector: { matchLabels: metadata.labels },
|
|
132
|
-
},
|
|
133
|
-
}, opts);
|
|
134
|
-
this.service = new kubernetes.v1.Service(name, {
|
|
135
|
-
metadata,
|
|
136
|
-
spec: {
|
|
137
|
-
selector: metadata.labels,
|
|
138
|
-
ports: [{ name: "http", protocol: "TCP", port: 80, targetPort: 8000 }],
|
|
139
|
-
},
|
|
140
|
-
}, { ...opts, dependsOn: [this.deployment] });
|
|
141
|
-
this.ingress = new kubernetes.v1.SecureIngress(name, {
|
|
142
|
-
metadata: { ...metadata, annotations: args.ingressAnnotations },
|
|
143
|
-
spec: {
|
|
144
|
-
ingressClassName: args.ingressClassName,
|
|
145
|
-
rules: [
|
|
146
|
-
{
|
|
147
|
-
host: args.hostname,
|
|
148
|
-
http: {
|
|
149
|
-
paths: [
|
|
150
|
-
{
|
|
151
|
-
path: "/",
|
|
152
|
-
pathType: "Prefix",
|
|
153
|
-
backend: { service: { name: this.service.metadata.name, port: { name: "http" } } },
|
|
154
|
-
},
|
|
155
|
-
],
|
|
156
|
-
},
|
|
157
|
-
},
|
|
158
|
-
],
|
|
159
|
-
},
|
|
160
|
-
}, { ...opts, dependsOn: [this.service] });
|
|
161
|
-
this.registerOutputs();
|
|
162
|
-
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AAU,CAAC,EAAE,CAAC,OAAO,CACtC,IAAI,EACJ;YACE,QAAQ;YACR,IAAI,EAAE;gBACJ,QAAQ,EAAE,QAAQ,CAAC,MAAM;gBACzB,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC;aACvE;SACF,EACD,EAAE,GAAG,IAAI,EAAE,SAAS,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,CAC1C,CAAC;QAEF,IAAI,CAAC,OAAO,GAAG,IAAI,UAAU,CAAC,EAAE,CAAC,aAAa,CAC5C,IAAI,EACJ;YACE,QAAQ,EAAE,EAAE,GAAG,QAAQ,EAAE,WAAW,EAAE,IAAI,CAAC,kBAAkB,EAAE;YAC/D,IAAI,EAAE;gBACJ,gBAAgB,EAAE,IAAI,CAAC,gBAAgB;gBACvC,KAAK,EAAE;oBACL;wBACE,IAAI,EAAE,IAAI,CAAC,QAAQ;wBACnB,IAAI,EAAE;4BACJ,KAAK,EAAE;gCACL;oCACE,IAAI,EAAE,GAAG;oCACT,QAAQ,EAAE,QAAQ;oCAClB,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE;iCACnF;6BACF;yBACF;qBACF;iBACF;aACF;SACF,EACD,EAAE,GAAG,IAAI,EAAE,SAAS,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CACvC,CAAC;QAEF,IAAI,CAAC,eAAe,EAAE,CAAC;IACzB,CAAC;CACF"}
|
package/lib/paperless/index.d.ts
DELETED
package/lib/paperless/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/paperless/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE3D,OAAO,EAAiB,SAAS,EAAE,CAAC"}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
-
import { ComponentResource } from "../common/index.js";
|
|
3
|
-
import * as kubernetes from "../kubernetes/index.js";
|
|
4
|
-
export interface VolumeArgs {
|
|
5
|
-
id: pulumi.Input<string>;
|
|
6
|
-
filesystemSubPath?: pulumi.Input<string>;
|
|
7
|
-
}
|
|
8
|
-
export interface PVCVolumeArgs extends VolumeArgs {
|
|
9
|
-
accessModes?: pulumi.Input<pulumi.Input<string>[]>;
|
|
10
|
-
storageClassName?: pulumi.Input<string>;
|
|
11
|
-
size?: pulumi.Input<string>;
|
|
12
|
-
}
|
|
13
|
-
export interface NFSVolumeArgs extends VolumeArgs, kubernetes.v1.NfsVolumeConfig {
|
|
14
|
-
accessModes?: pulumi.Input<pulumi.Input<string>[]>;
|
|
15
|
-
storageClassName?: pulumi.Input<string>;
|
|
16
|
-
size?: pulumi.Input<string>;
|
|
17
|
-
}
|
|
18
|
-
export interface QBittorrentArgs {
|
|
19
|
-
namespace?: pulumi.Input<string>;
|
|
20
|
-
hostname: pulumi.Input<string>;
|
|
21
|
-
ingressClassName?: pulumi.Input<string>;
|
|
22
|
-
blocklist?: pulumi.Input<string>;
|
|
23
|
-
speedLimitDown: pulumi.Input<number>;
|
|
24
|
-
altSpeedDown: pulumi.Input<number>;
|
|
25
|
-
downloadQueueSize: pulumi.Input<number>;
|
|
26
|
-
peerLimitGlobal?: pulumi.Input<number>;
|
|
27
|
-
peerLimitTorrent?: pulumi.Input<number>;
|
|
28
|
-
uid: pulumi.Input<number>;
|
|
29
|
-
gid: pulumi.Input<number>;
|
|
30
|
-
storageClassName?: pulumi.Input<string>;
|
|
31
|
-
pvcVolumes?: pulumi.Input<pulumi.Input<PVCVolumeArgs>[]>;
|
|
32
|
-
nfsVolumes?: pulumi.Input<pulumi.Input<NFSVolumeArgs>[]>;
|
|
33
|
-
sharedFilesystemVolumes?: pulumi.Input<pulumi.Input<VolumeArgs>[]>;
|
|
34
|
-
nodeSelector?: pulumi.Input<{
|
|
35
|
-
[key: string]: pulumi.Input<string>;
|
|
36
|
-
}>;
|
|
37
|
-
version?: pulumi.Input<string>;
|
|
38
|
-
protect?: boolean;
|
|
39
|
-
}
|
|
40
|
-
export declare class QBittorrent extends ComponentResource {
|
|
41
|
-
private static readonly defaultVersion;
|
|
42
|
-
private static readonly webUIPort;
|
|
43
|
-
private static readonly torrentingPort;
|
|
44
|
-
static sharedFilesystemsConfigs?: pulumi.Input<{
|
|
45
|
-
[key: string]: pulumi.Input<kubernetes.v1.SharedFilesystemConfig>;
|
|
46
|
-
}>;
|
|
47
|
-
private readonly credentials;
|
|
48
|
-
private readonly settings;
|
|
49
|
-
private readonly configVolumeClaim;
|
|
50
|
-
private readonly deployment;
|
|
51
|
-
private readonly service;
|
|
52
|
-
private readonly middleware;
|
|
53
|
-
private readonly ingress;
|
|
54
|
-
readonly username: pulumi.Output<string>;
|
|
55
|
-
readonly password: pulumi.Output<string>;
|
|
56
|
-
readonly namespace: pulumi.Output<string>;
|
|
57
|
-
readonly internalHostname: pulumi.Output<string>;
|
|
58
|
-
/**
|
|
59
|
-
* Create a new qBittorrent resource.
|
|
60
|
-
* @param name The name of qBittorrent resource.
|
|
61
|
-
* @param args A bag of arguments to control the qBittorrent creation.
|
|
62
|
-
* @param opts A bag of options that control this resource's behavior.
|
|
63
|
-
*/
|
|
64
|
-
constructor(name: string, args: QBittorrentArgs, opts?: pulumi.ComponentResourceOptions);
|
|
65
|
-
}
|
|
@@ -1,410 +0,0 @@
|
|
|
1
|
-
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
-
import * as random from "@pulumi/random";
|
|
3
|
-
import * as k8s from "@pulumi/kubernetes";
|
|
4
|
-
import * as crypto from "crypto";
|
|
5
|
-
import { ComponentResource } from "../common/index.js";
|
|
6
|
-
import * as kubernetes from "../kubernetes/index.js";
|
|
7
|
-
import * as localPathProvisioner from "../localPathProvisioner/index.js";
|
|
8
|
-
import * as hostPathProvisioner from "../hostPathProvisioner/index.js";
|
|
9
|
-
import * as rook from "../rook/index.js";
|
|
10
|
-
import * as traefik from "../traefik/index.js";
|
|
11
|
-
export class QBittorrent extends ComponentResource {
|
|
12
|
-
static defaultVersion = "latest";
|
|
13
|
-
static webUIPort = 8080;
|
|
14
|
-
static torrentingPort = 6881;
|
|
15
|
-
static sharedFilesystemsConfigs;
|
|
16
|
-
credentials;
|
|
17
|
-
settings;
|
|
18
|
-
configVolumeClaim;
|
|
19
|
-
deployment;
|
|
20
|
-
service;
|
|
21
|
-
middleware;
|
|
22
|
-
ingress;
|
|
23
|
-
username;
|
|
24
|
-
password;
|
|
25
|
-
namespace;
|
|
26
|
-
internalHostname;
|
|
27
|
-
/**
|
|
28
|
-
* Create a new qBittorrent resource.
|
|
29
|
-
* @param name The name of qBittorrent resource.
|
|
30
|
-
* @param args A bag of arguments to control the qBittorrent creation.
|
|
31
|
-
* @param opts A bag of options that control this resource's behavior.
|
|
32
|
-
*/
|
|
33
|
-
constructor(name, args, opts) {
|
|
34
|
-
super("qbittorrent", name, args, opts);
|
|
35
|
-
args.version ??= QBittorrent.defaultVersion;
|
|
36
|
-
const k8sOpts = this.opts(k8s.Provider);
|
|
37
|
-
opts = this.opts();
|
|
38
|
-
this.username = pulumi.secret("qbittorrent");
|
|
39
|
-
this.password = pulumi.secret(new random.RandomPassword("password", { length: 24, special: false }, opts).result);
|
|
40
|
-
this.namespace = args.namespace
|
|
41
|
-
? pulumi.output(args.namespace)
|
|
42
|
-
: new k8s.core.v1.Namespace(name, { metadata: { name } }, k8sOpts).metadata.name;
|
|
43
|
-
const metadata = {
|
|
44
|
-
name,
|
|
45
|
-
namespace: this.namespace,
|
|
46
|
-
labels: {
|
|
47
|
-
"app.kubernetes.io/name": "qbittorrent",
|
|
48
|
-
"app.kubernetes.io/component": "qbittorrent",
|
|
49
|
-
"app.kubernetes.io/instance": name,
|
|
50
|
-
},
|
|
51
|
-
};
|
|
52
|
-
this.credentials = new kubernetes.v1.Secret(`${name}-credentials`, {
|
|
53
|
-
metadata: { ...metadata, name: pulumi.interpolate `${name}-credentials` },
|
|
54
|
-
stringData: {
|
|
55
|
-
username: this.username,
|
|
56
|
-
password: this.password,
|
|
57
|
-
},
|
|
58
|
-
}, k8sOpts);
|
|
59
|
-
this.settings = new kubernetes.v1.Secret(`${name}-settings`, {
|
|
60
|
-
metadata: { ...metadata, name: pulumi.interpolate `${name}-settings` },
|
|
61
|
-
stringData: {
|
|
62
|
-
"qBittorrent.conf": pulumi
|
|
63
|
-
.all([this.username, this.password, args.blocklist])
|
|
64
|
-
.apply(([username, password, blocklist]) => [
|
|
65
|
-
`[Application]`,
|
|
66
|
-
`FileLogger\Enabled=false`,
|
|
67
|
-
`[AutoRun]`,
|
|
68
|
-
`enabled=false`,
|
|
69
|
-
`[BitTorrent]`,
|
|
70
|
-
`Session\AddExtensionToIncompleteFiles=true`,
|
|
71
|
-
`Session\AddTorrentStopped=true`,
|
|
72
|
-
`Session\AlternativeGlobalDLSpeedLimit=11`,
|
|
73
|
-
`Session\AlternativeGlobalUPSpeedLimit=11`,
|
|
74
|
-
`Session\AnonymousModeEnabled=true`,
|
|
75
|
-
`Session\BlockPeersOnPrivilegedPorts=true`,
|
|
76
|
-
`Session\DefaultSavePath=/downloads/`,
|
|
77
|
-
`Session\DisableAutoTMMTriggers\CategoryChanged=true`,
|
|
78
|
-
`Session\Encryption=1`,
|
|
79
|
-
`Session\ExcludedFileNames=`,
|
|
80
|
-
`Session\GlobalDLSpeedLimit=1`,
|
|
81
|
-
`Session\GlobalUPSpeedLimit=1`,
|
|
82
|
-
`Session\IPFilter=/tmp/blocklist.dat`,
|
|
83
|
-
`Session\IPFilteringEnabled=true`,
|
|
84
|
-
`Session\IgnoreLimitsOnLAN=true`,
|
|
85
|
-
`Session\IncludeOverheadInLimits=true`,
|
|
86
|
-
`Session\MaxActiveDownloads=4`,
|
|
87
|
-
`Session\MaxActiveTorrents=10`,
|
|
88
|
-
`Session\MaxActiveUploads=2`,
|
|
89
|
-
`Session\MaxConnections=128`,
|
|
90
|
-
`Session\MaxConnectionsPerTorrent=64`,
|
|
91
|
-
`Session\PerformanceWarning=true`,
|
|
92
|
-
`Session\Port=6881`,
|
|
93
|
-
`Session\QueueingSystemEnabled=true`,
|
|
94
|
-
`Session\SSL\Port=33313`,
|
|
95
|
-
`Session\ShareLimitAction=Stop`,
|
|
96
|
-
`Session\TempPath=/downloads/incomplete/`,
|
|
97
|
-
`[Core]`,
|
|
98
|
-
`AutoDeleteAddedTorrentFile=IfAdded`,
|
|
99
|
-
`[LegalNotice]`,
|
|
100
|
-
`Accepted=true`,
|
|
101
|
-
`[Meta]`,
|
|
102
|
-
`MigrationVersion=8`,
|
|
103
|
-
`[Network]`,
|
|
104
|
-
`PortForwardingEnabled=true`,
|
|
105
|
-
`[Preferences]`,
|
|
106
|
-
`Connection\PortRangeMin=6881`,
|
|
107
|
-
`Connection\UPnP=false`,
|
|
108
|
-
`Downloads\SavePath=/downloads/`,
|
|
109
|
-
`Downloads\TempPath=/downloads/incomplete/`,
|
|
110
|
-
`General\Locale=en`,
|
|
111
|
-
`MailNotification\req_auth=true`,
|
|
112
|
-
`WebUI\Address=*`,
|
|
113
|
-
`WebUI\AuthSubnetWhitelist=@Invalid()`,
|
|
114
|
-
`WebUI\LocalHostAuth=false`,
|
|
115
|
-
//`WebUI\Password_PBKDF2="@ByteArray(mQmfcCac6aE1XK0gt1gHDw==:90pApzgX0EKyUxhsOXawz+irtIZCyYhBX8j0RFy7oT0MHWDEqI0DjkxbZBB1bkcLpxoLo94kNMxPHnWdyD+UUg==)"`,
|
|
116
|
-
`WebUI\ServerDomains=*`,
|
|
117
|
-
`WebUI\Username=${username}`,
|
|
118
|
-
].join("\n")),
|
|
119
|
-
},
|
|
120
|
-
}, k8sOpts);
|
|
121
|
-
const configVolumeName = pulumi.interpolate `${name}-config`;
|
|
122
|
-
this.configVolumeClaim = new k8s.core.v1.PersistentVolumeClaim(`${name}-config`, {
|
|
123
|
-
metadata: { ...metadata, name: configVolumeName },
|
|
124
|
-
spec: {
|
|
125
|
-
storageClassName: args.storageClassName,
|
|
126
|
-
accessModes: ["ReadWriteOnce"],
|
|
127
|
-
resources: { requests: { storage: "256Mi" } },
|
|
128
|
-
},
|
|
129
|
-
}, { ...k8sOpts, protect: args.protect });
|
|
130
|
-
const volumes = pulumi
|
|
131
|
-
.all([args.pvcVolumes, args.nfsVolumes, args.sharedFilesystemVolumes, QBittorrent.sharedFilesystemsConfigs ?? {}])
|
|
132
|
-
.apply(([pvcVolumes, nfsVolumes, sharedFilesystemVolumes, sharedFilesystemsConfigs]) => {
|
|
133
|
-
return pulumi.all(pvcVolumes ?? []).apply((pvcVolumes) => {
|
|
134
|
-
return pulumi.all(nfsVolumes ?? []).apply((nfsVolumes) => {
|
|
135
|
-
return pulumi.all(sharedFilesystemVolumes ?? []).apply((sharedFilesystemVolumes) => {
|
|
136
|
-
const volumes = [];
|
|
137
|
-
for (const pvcVolume of pvcVolumes) {
|
|
138
|
-
const pvc = new k8s.core.v1.PersistentVolumeClaim(`${name}-pvc-${pvcVolume.id}`, {
|
|
139
|
-
metadata: { ...metadata, name: pvcVolume.id },
|
|
140
|
-
spec: {
|
|
141
|
-
storageClassName: pvcVolume.storageClassName,
|
|
142
|
-
accessModes: pvcVolume.accessModes ?? ["ReadWriteOnce"],
|
|
143
|
-
resources: { requests: { storage: pvcVolume.size ?? "10Gi" } },
|
|
144
|
-
},
|
|
145
|
-
}, k8sOpts);
|
|
146
|
-
volumes.push({
|
|
147
|
-
id: pulumi.output(pvcVolume.id),
|
|
148
|
-
persistentVolumeClaimName: pvc.metadata.name,
|
|
149
|
-
});
|
|
150
|
-
}
|
|
151
|
-
for (const nfsVolume of nfsVolumes) {
|
|
152
|
-
const volume = kubernetes.v1.NfsVolume.fromConfig(`${name}-nfs-${nfsVolume.id}`, { metadata: { ...metadata, name: nfsVolume.id }, config: nfsVolume }, opts);
|
|
153
|
-
volumes.push({
|
|
154
|
-
id: pulumi.output(nfsVolume.id),
|
|
155
|
-
persistentVolumeClaimName: volume.persistentVolumeClaim.metadata.name,
|
|
156
|
-
});
|
|
157
|
-
}
|
|
158
|
-
for (const sharedFilesystemVolume of sharedFilesystemVolumes) {
|
|
159
|
-
const filesystem = sharedFilesystemsConfigs[sharedFilesystemVolume.id];
|
|
160
|
-
if (filesystem === undefined) {
|
|
161
|
-
continue;
|
|
162
|
-
}
|
|
163
|
-
let persistentVolumeClaim;
|
|
164
|
-
switch (filesystem.type) {
|
|
165
|
-
case rook.SharedFilesystemType: {
|
|
166
|
-
const rookFilesystem = filesystem;
|
|
167
|
-
persistentVolumeClaim = new rook.SharedFilesystem(`${name}-fs-${sharedFilesystemVolume.id}`, rook.sharedFilesystemArgsFromSharedFilesystemConfig(rookFilesystem, {
|
|
168
|
-
...metadata,
|
|
169
|
-
name: sharedFilesystemVolume.id,
|
|
170
|
-
}), opts).persistentVolumeClaim;
|
|
171
|
-
break;
|
|
172
|
-
}
|
|
173
|
-
case localPathProvisioner.SharedFilesystemType: {
|
|
174
|
-
const localPathProvisionerFilesystem = filesystem;
|
|
175
|
-
persistentVolumeClaim = new localPathProvisioner.SharedFilesystem(`${name}-fs-${sharedFilesystemVolume.id}`, localPathProvisioner.sharedFilesystemArgsFromSharedFilesystemConfig(localPathProvisionerFilesystem, {
|
|
176
|
-
...metadata,
|
|
177
|
-
name: sharedFilesystemVolume.id,
|
|
178
|
-
}), opts).persistentVolumeClaim;
|
|
179
|
-
break;
|
|
180
|
-
}
|
|
181
|
-
case hostPathProvisioner.SharedFilesystemType: {
|
|
182
|
-
const hostPathProvisionerFilesystem = filesystem;
|
|
183
|
-
persistentVolumeClaim = new hostPathProvisioner.SharedFilesystem(`${name}-fs-${sharedFilesystemVolume.id}`, hostPathProvisioner.sharedFilesystemArgsFromSharedFilesystemConfig(hostPathProvisionerFilesystem, {
|
|
184
|
-
...metadata,
|
|
185
|
-
name: sharedFilesystemVolume.id,
|
|
186
|
-
}), opts).persistentVolumeClaim;
|
|
187
|
-
break;
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
if (persistentVolumeClaim !== undefined) {
|
|
191
|
-
volumes.push({
|
|
192
|
-
id: pulumi.output(sharedFilesystemVolume.id),
|
|
193
|
-
persistentVolumeClaimName: persistentVolumeClaim.metadata.name,
|
|
194
|
-
subPath: sharedFilesystemVolume.filesystemSubPath
|
|
195
|
-
? pulumi.output(sharedFilesystemVolume.filesystemSubPath)
|
|
196
|
-
: undefined,
|
|
197
|
-
});
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
return volumes;
|
|
201
|
-
});
|
|
202
|
-
});
|
|
203
|
-
});
|
|
204
|
-
});
|
|
205
|
-
const config = pulumi.all([volumes]).apply(([volumes]) => {
|
|
206
|
-
const deploymentVolumes = [];
|
|
207
|
-
const deploymentVolumeMounts = [];
|
|
208
|
-
for (const volume of volumes) {
|
|
209
|
-
const volumeName = crypto.createHash("sha1").update(volume.id).digest("hex");
|
|
210
|
-
deploymentVolumes.push({
|
|
211
|
-
name: volumeName,
|
|
212
|
-
persistentVolumeClaim: { claimName: volume.persistentVolumeClaimName },
|
|
213
|
-
});
|
|
214
|
-
deploymentVolumeMounts.push({
|
|
215
|
-
name: volumeName,
|
|
216
|
-
mountPath: pulumi.interpolate `/mnt/${volume.id}`,
|
|
217
|
-
subPath: volume.subPath,
|
|
218
|
-
});
|
|
219
|
-
}
|
|
220
|
-
return { volumes: deploymentVolumes, volumeMounts: deploymentVolumeMounts };
|
|
221
|
-
});
|
|
222
|
-
this.deployment = new k8s.apps.v1.Deployment(name, {
|
|
223
|
-
metadata,
|
|
224
|
-
spec: {
|
|
225
|
-
selector: { matchLabels: metadata.labels },
|
|
226
|
-
strategy: { type: "Recreate" },
|
|
227
|
-
replicas: 1,
|
|
228
|
-
template: {
|
|
229
|
-
metadata: {
|
|
230
|
-
labels: metadata.labels,
|
|
231
|
-
annotations: { "backup.velero.io/backup-volumes": "config" },
|
|
232
|
-
},
|
|
233
|
-
spec: {
|
|
234
|
-
nodeSelector: args.nodeSelector,
|
|
235
|
-
initContainers: [
|
|
236
|
-
{
|
|
237
|
-
name: "permissions",
|
|
238
|
-
image: "busybox:latest",
|
|
239
|
-
command: ["/bin/sh", "-c", pulumi.interpolate `chown -R ${args.uid}:${args.gid} /config`],
|
|
240
|
-
resources: {
|
|
241
|
-
requests: { memory: "8Mi" },
|
|
242
|
-
limits: { memory: "12Mi" },
|
|
243
|
-
},
|
|
244
|
-
volumeMounts: [{ name: "config", mountPath: "/config" }],
|
|
245
|
-
},
|
|
246
|
-
{
|
|
247
|
-
name: "settings",
|
|
248
|
-
image: "busybox:latest",
|
|
249
|
-
command: ["/bin/sh", "-c", "cp /settings/qBittorrent.conf /config/qBittorrent/qBittorrent.conf"],
|
|
250
|
-
resources: {
|
|
251
|
-
requests: { memory: "8Mi" },
|
|
252
|
-
limits: { memory: "12Mi" },
|
|
253
|
-
},
|
|
254
|
-
volumeMounts: [
|
|
255
|
-
{ name: "settings", mountPath: "/settings" },
|
|
256
|
-
{ name: "config", mountPath: "/config" },
|
|
257
|
-
],
|
|
258
|
-
},
|
|
259
|
-
],
|
|
260
|
-
containers: [
|
|
261
|
-
{
|
|
262
|
-
name: "qbittorrent",
|
|
263
|
-
image: pulumi.interpolate `lscr.io/linuxserver/qbittorrent:${args.version}`,
|
|
264
|
-
imagePullPolicy: "Always",
|
|
265
|
-
env: [
|
|
266
|
-
{ name: "PUID", value: pulumi.interpolate `${args.uid}` },
|
|
267
|
-
{ name: "PGID", value: pulumi.interpolate `${args.gid}` },
|
|
268
|
-
],
|
|
269
|
-
ports: [{ name: "webui", containerPort: QBittorrent.webUIPort, protocol: "TCP" }],
|
|
270
|
-
readinessProbe: {
|
|
271
|
-
periodSeconds: 10,
|
|
272
|
-
timeoutSeconds: 2,
|
|
273
|
-
successThreshold: 2,
|
|
274
|
-
failureThreshold: 4,
|
|
275
|
-
tcpSocket: { port: "webui" },
|
|
276
|
-
},
|
|
277
|
-
livenessProbe: {
|
|
278
|
-
periodSeconds: 30,
|
|
279
|
-
timeoutSeconds: 2,
|
|
280
|
-
successThreshold: 1,
|
|
281
|
-
failureThreshold: 10,
|
|
282
|
-
tcpSocket: { port: "webui" },
|
|
283
|
-
},
|
|
284
|
-
resources: {
|
|
285
|
-
requests: { memory: "512Mi" },
|
|
286
|
-
limits: { memory: "640Mi" },
|
|
287
|
-
},
|
|
288
|
-
volumeMounts: pulumi.all([config]).apply(([config]) => {
|
|
289
|
-
return config.volumeMounts.concat([
|
|
290
|
-
{ name: "config", mountPath: "/config", subPath: "qbittorrent" },
|
|
291
|
-
]);
|
|
292
|
-
}),
|
|
293
|
-
},
|
|
294
|
-
{
|
|
295
|
-
name: "flood",
|
|
296
|
-
image: "jesec/flood:latest",
|
|
297
|
-
imagePullPolicy: "Always",
|
|
298
|
-
securityContext: { runAsUser: args.uid, runAsGroup: args.gid },
|
|
299
|
-
ports: [{ name: "http", containerPort: 3001, protocol: "TCP" }],
|
|
300
|
-
env: [
|
|
301
|
-
{ name: "HOME", value: "/config" },
|
|
302
|
-
{ name: "FLOOD_OPTION_auth", value: "none" },
|
|
303
|
-
{ name: "FLOOD_OPTION_port", value: "3001" },
|
|
304
|
-
{
|
|
305
|
-
name: "FLOOD_OPTION_qburl",
|
|
306
|
-
value: pulumi.interpolate `http://localhost:${QBittorrent.webUIPort}/`,
|
|
307
|
-
},
|
|
308
|
-
{
|
|
309
|
-
name: "FLOOD_OPTION_qbuser",
|
|
310
|
-
valueFrom: { secretKeyRef: { name: this.credentials.metadata.name, key: "username" } },
|
|
311
|
-
},
|
|
312
|
-
{
|
|
313
|
-
name: "FLOOD_OPTION_qbpass",
|
|
314
|
-
valueFrom: { secretKeyRef: { name: this.credentials.metadata.name, key: "password" } },
|
|
315
|
-
},
|
|
316
|
-
],
|
|
317
|
-
readinessProbe: {
|
|
318
|
-
periodSeconds: 10,
|
|
319
|
-
timeoutSeconds: 2,
|
|
320
|
-
successThreshold: 2,
|
|
321
|
-
failureThreshold: 4,
|
|
322
|
-
httpGet: { port: "http" },
|
|
323
|
-
},
|
|
324
|
-
livenessProbe: {
|
|
325
|
-
periodSeconds: 30,
|
|
326
|
-
timeoutSeconds: 2,
|
|
327
|
-
successThreshold: 1,
|
|
328
|
-
failureThreshold: 10,
|
|
329
|
-
httpGet: { port: "http" },
|
|
330
|
-
},
|
|
331
|
-
resources: {
|
|
332
|
-
requests: { memory: "192Mi" },
|
|
333
|
-
limits: { memory: "256Mi" },
|
|
334
|
-
},
|
|
335
|
-
volumeMounts: pulumi.all([config]).apply(([config]) => {
|
|
336
|
-
return config.volumeMounts.concat([
|
|
337
|
-
{ name: "config", mountPath: "/config", subPath: "flood" },
|
|
338
|
-
]);
|
|
339
|
-
}),
|
|
340
|
-
},
|
|
341
|
-
],
|
|
342
|
-
volumes: pulumi.all([config]).apply(([config]) => {
|
|
343
|
-
return config.volumes.concat([
|
|
344
|
-
{ name: "settings", secret: { secretName: this.settings.metadata.name } },
|
|
345
|
-
{ name: "config", persistentVolumeClaim: { claimName: configVolumeName } },
|
|
346
|
-
]);
|
|
347
|
-
}),
|
|
348
|
-
terminationGracePeriodSeconds: 120,
|
|
349
|
-
},
|
|
350
|
-
},
|
|
351
|
-
},
|
|
352
|
-
}, k8sOpts);
|
|
353
|
-
this.service = new kubernetes.v1.Service(name, {
|
|
354
|
-
metadata,
|
|
355
|
-
spec: {
|
|
356
|
-
selector: metadata.labels,
|
|
357
|
-
ipFamilyPolicy: "SingleStack",
|
|
358
|
-
ports: [
|
|
359
|
-
{ name: "webui", port: QBittorrent.webUIPort, targetPort: "webui" },
|
|
360
|
-
{ name: "http", port: 3001, targetPort: "http" },
|
|
361
|
-
],
|
|
362
|
-
},
|
|
363
|
-
}, { ...k8sOpts, dependsOn: [this.deployment] });
|
|
364
|
-
this.middleware = new traefik.Middleware(name, {
|
|
365
|
-
metadata,
|
|
366
|
-
spec: {
|
|
367
|
-
headers: {
|
|
368
|
-
customRequestHeaders: {
|
|
369
|
-
Authorization: pulumi
|
|
370
|
-
.all([this.username, this.password])
|
|
371
|
-
.apply(([username, password]) => `Basic ${Buffer.from(username + ":" + password).toString("base64")}`),
|
|
372
|
-
},
|
|
373
|
-
},
|
|
374
|
-
},
|
|
375
|
-
}, k8sOpts);
|
|
376
|
-
this.ingress = new kubernetes.v1.SecureIngress(name, {
|
|
377
|
-
metadata: {
|
|
378
|
-
...metadata,
|
|
379
|
-
annotations: {
|
|
380
|
-
"traefik.ingress.kubernetes.io/router.middlewares": this.middleware.metadata.apply((m) => `${m.namespace}-${m.name}@kubernetescrd`),
|
|
381
|
-
},
|
|
382
|
-
},
|
|
383
|
-
spec: {
|
|
384
|
-
ingressClassName: args.ingressClassName,
|
|
385
|
-
rules: [
|
|
386
|
-
{
|
|
387
|
-
host: args.hostname,
|
|
388
|
-
http: {
|
|
389
|
-
paths: [
|
|
390
|
-
{
|
|
391
|
-
path: "/",
|
|
392
|
-
pathType: "Prefix",
|
|
393
|
-
backend: {
|
|
394
|
-
service: {
|
|
395
|
-
name: this.service.metadata.name,
|
|
396
|
-
port: { name: this.service.spec.ports[1].name },
|
|
397
|
-
},
|
|
398
|
-
},
|
|
399
|
-
},
|
|
400
|
-
],
|
|
401
|
-
},
|
|
402
|
-
},
|
|
403
|
-
],
|
|
404
|
-
},
|
|
405
|
-
}, k8sOpts);
|
|
406
|
-
this.internalHostname = pulumi.interpolate `${this.service.metadata.name}.${this.service.metadata.namespace}.svc`;
|
|
407
|
-
this.registerOutputs();
|
|
408
|
-
}
|
|
409
|
-
}
|
|
410
|
-
//# sourceMappingURL=deployment.js.map
|