@ydkn/pulumi-components 0.4.7 → 0.5.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/index.d.ts +2 -1
- package/index.d.ts.map +1 -1
- package/index.js +3 -1
- package/index.js.map +1 -1
- package/lib/transmission/deployment.d.ts +39 -0
- package/lib/transmission/deployment.d.ts.map +1 -0
- package/lib/transmission/deployment.js +272 -0
- package/lib/transmission/deployment.js.map +1 -0
- package/lib/transmission/index.d.ts +3 -0
- package/lib/transmission/index.d.ts.map +1 -0
- package/lib/transmission/index.js +6 -0
- package/lib/transmission/index.js.map +1 -0
- package/package.json +8 -8
- package/lib/submariner/broker.d.ts +0 -22
- package/lib/submariner/broker.d.ts.map +0 -1
- package/lib/submariner/broker.js +0 -64
- package/lib/submariner/broker.js.map +0 -1
- package/lib/submariner/index.d.ts +0 -4
- package/lib/submariner/index.d.ts.map +0 -1
- package/lib/submariner/index.js +0 -8
- package/lib/submariner/index.js.map +0 -1
- package/lib/submariner/operator.d.ts +0 -72
- package/lib/submariner/operator.d.ts.map +0 -1
- package/lib/submariner/operator.js +0 -102
- package/lib/submariner/operator.js.map +0 -1
package/index.d.ts
CHANGED
|
@@ -33,9 +33,10 @@ import * as samba from "./lib/samba";
|
|
|
33
33
|
import * as ssh from "./lib/ssh";
|
|
34
34
|
import * as torproxy from "./lib/torproxy";
|
|
35
35
|
import * as traefik from "./lib/traefik";
|
|
36
|
+
import * as transmission from "./lib/transmission";
|
|
36
37
|
import * as ubuntu from "./lib/ubuntu";
|
|
37
38
|
import * as unifi from "./lib/unifi";
|
|
38
39
|
import * as velero from "./lib/velero";
|
|
39
40
|
import * as wireguard from "./lib/wireguard";
|
|
40
|
-
export { TransformationFunc, ComponentResource, avahi, aws, blocky, certManager, cups, dhcpd, externalDns, fcos, freeradius, gitlab, grafana, hcloud, k0s, kubernetes, kubeStateMetrics, localPathProvisioner, loki, metallb, mongodb, nats, node, nodeExporter, openldap, plex, postgresql, prometheus, raspberrypi, redis, rethinkdb, rook, samba, ssh, torproxy, traefik, ubuntu, unifi, velero, wireguard, };
|
|
41
|
+
export { TransformationFunc, ComponentResource, avahi, aws, blocky, certManager, cups, dhcpd, externalDns, fcos, freeradius, gitlab, grafana, hcloud, k0s, kubernetes, kubeStateMetrics, localPathProvisioner, loki, metallb, mongodb, nats, node, nodeExporter, openldap, plex, postgresql, prometheus, raspberrypi, redis, rethinkdb, rook, samba, ssh, torproxy, traefik, transmission, ubuntu, unifi, velero, wireguard, };
|
|
41
42
|
//# sourceMappingURL=index.d.ts.map
|
package/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACrE,OAAO,KAAK,KAAK,MAAM,aAAa,CAAC;AACrC,OAAO,KAAK,GAAG,MAAM,WAAW,CAAC;AACjC,OAAO,KAAK,MAAM,MAAM,cAAc,CAAC;AACvC,OAAO,KAAK,WAAW,MAAM,mBAAmB,CAAC;AACjD,OAAO,KAAK,IAAI,MAAM,YAAY,CAAC;AACnC,OAAO,KAAK,KAAK,MAAM,aAAa,CAAC;AACrC,OAAO,KAAK,WAAW,MAAM,mBAAmB,CAAC;AACjD,OAAO,KAAK,IAAI,MAAM,YAAY,CAAC;AACnC,OAAO,KAAK,UAAU,MAAM,kBAAkB,CAAC;AAC/C,OAAO,KAAK,MAAM,MAAM,cAAc,CAAC;AACvC,OAAO,KAAK,OAAO,MAAM,eAAe,CAAC;AACzC,OAAO,KAAK,MAAM,MAAM,cAAc,CAAC;AACvC,OAAO,KAAK,GAAG,MAAM,WAAW,CAAC;AACjC,OAAO,KAAK,UAAU,MAAM,kBAAkB,CAAC;AAC/C,OAAO,KAAK,gBAAgB,MAAM,wBAAwB,CAAC;AAC3D,OAAO,KAAK,oBAAoB,MAAM,4BAA4B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EACR,OAAO,EACP,YAAY,EACZ,MAAM,EACN,KAAK,EACL,MAAM,EACN,SAAS,GACV,CAAC"}
|
package/index.js
CHANGED
|
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.wireguard = exports.velero = exports.unifi = exports.ubuntu = exports.traefik = exports.torproxy = exports.ssh = exports.samba = exports.rook = exports.rethinkdb = exports.redis = exports.raspberrypi = exports.prometheus = exports.postgresql = exports.plex = exports.openldap = exports.nodeExporter = exports.node = exports.nats = exports.mongodb = exports.metallb = exports.loki = exports.localPathProvisioner = exports.kubeStateMetrics = exports.kubernetes = exports.k0s = exports.hcloud = exports.grafana = exports.gitlab = exports.freeradius = exports.fcos = exports.externalDns = exports.dhcpd = exports.cups = exports.certManager = exports.blocky = exports.aws = exports.avahi = exports.ComponentResource = void 0;
|
|
26
|
+
exports.wireguard = exports.velero = exports.unifi = exports.ubuntu = exports.transmission = exports.traefik = exports.torproxy = exports.ssh = exports.samba = exports.rook = exports.rethinkdb = exports.redis = exports.raspberrypi = exports.prometheus = exports.postgresql = exports.plex = exports.openldap = exports.nodeExporter = exports.node = exports.nats = exports.mongodb = exports.metallb = exports.loki = exports.localPathProvisioner = exports.kubeStateMetrics = exports.kubernetes = exports.k0s = exports.hcloud = exports.grafana = exports.gitlab = exports.freeradius = exports.fcos = exports.externalDns = exports.dhcpd = exports.cups = exports.certManager = exports.blocky = exports.aws = exports.avahi = exports.ComponentResource = void 0;
|
|
27
27
|
const common_1 = require("./lib/common");
|
|
28
28
|
Object.defineProperty(exports, "ComponentResource", { enumerable: true, get: function () { return common_1.ComponentResource; } });
|
|
29
29
|
const avahi = __importStar(require("./lib/avahi"));
|
|
@@ -94,6 +94,8 @@ const torproxy = __importStar(require("./lib/torproxy"));
|
|
|
94
94
|
exports.torproxy = torproxy;
|
|
95
95
|
const traefik = __importStar(require("./lib/traefik"));
|
|
96
96
|
exports.traefik = traefik;
|
|
97
|
+
const transmission = __importStar(require("./lib/transmission"));
|
|
98
|
+
exports.transmission = transmission;
|
|
97
99
|
const ubuntu = __importStar(require("./lib/ubuntu"));
|
|
98
100
|
exports.ubuntu = ubuntu;
|
|
99
101
|
const unifi = __importStar(require("./lib/unifi"));
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAAqE;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAAqE;AA2CnE,kGA3C2B,0BAAiB,OA2C3B;AA1CnB,mDAAqC;AA2CnC,sBAAK;AA1CP,+CAAiC;AA2C/B,kBAAG;AA1CL,qDAAuC;AA2CrC,wBAAM;AA1CR,+DAAiD;AA2C/C,kCAAW;AA1Cb,iDAAmC;AA2CjC,oBAAI;AA1CN,mDAAqC;AA2CnC,sBAAK;AA1CP,+DAAiD;AA2C/C,kCAAW;AA1Cb,iDAAmC;AA2CjC,oBAAI;AA1CN,6DAA+C;AA2C7C,gCAAU;AA1CZ,qDAAuC;AA2CrC,wBAAM;AA1CR,uDAAyC;AA2CvC,0BAAO;AA1CT,qDAAuC;AA2CrC,wBAAM;AA1CR,+CAAiC;AA2C/B,kBAAG;AA1CL,6DAA+C;AA2C7C,gCAAU;AA1CZ,yEAA2D;AA2CzD,4CAAgB;AA1ClB,iFAAmE;AA2CjE,oDAAoB;AA1CtB,iDAAmC;AA2CjC,oBAAI;AA1CN,uDAAyC;AA2CvC,0BAAO;AA1CT,uDAAyC;AA2CvC,0BAAO;AA1CT,iDAAmC;AA2CjC,oBAAI;AA1CN,iDAAmC;AA2CjC,oBAAI;AA1CN,iEAAmD;AA2CjD,oCAAY;AA1Cd,yDAA2C;AA2CzC,4BAAQ;AA1CV,iDAAmC;AA2CjC,oBAAI;AA1CN,6DAA+C;AA2C7C,gCAAU;AA1CZ,6DAA+C;AA2C7C,gCAAU;AA1CZ,+DAAiD;AA2C/C,kCAAW;AA1Cb,mDAAqC;AA2CnC,sBAAK;AA1CP,2DAA6C;AA2C3C,8BAAS;AA1CX,iDAAmC;AA2CjC,oBAAI;AA1CN,mDAAqC;AA2CnC,sBAAK;AA1CP,+CAAiC;AA2C/B,kBAAG;AA1CL,yDAA2C;AA2CzC,4BAAQ;AA1CV,uDAAyC;AA2CvC,0BAAO;AA1CT,iEAAmD;AA2CjD,oCAAY;AA1Cd,qDAAuC;AA2CrC,wBAAM;AA1CR,mDAAqC;AA2CnC,sBAAK;AA1CP,qDAAuC;AA2CrC,wBAAM;AA1CR,2DAA6C;AA2C3C,8BAAS"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
import { ComponentResource } from "../common";
|
|
3
|
+
export interface TransmissionArgs {
|
|
4
|
+
namespace?: pulumi.Input<string>;
|
|
5
|
+
hostname: pulumi.Input<string>;
|
|
6
|
+
ingressClassName?: pulumi.Input<string>;
|
|
7
|
+
blocklist?: pulumi.Input<string>;
|
|
8
|
+
speedLimitDown: pulumi.Input<number>;
|
|
9
|
+
altSpeedDown: pulumi.Input<number>;
|
|
10
|
+
downloadQueueSize: pulumi.Input<number>;
|
|
11
|
+
uid: pulumi.Input<string>;
|
|
12
|
+
gid: pulumi.Input<string>;
|
|
13
|
+
theme?: pulumi.Input<string>;
|
|
14
|
+
downloadVolumes: pulumi.Input<{
|
|
15
|
+
[key: string]: pulumi.Input<string>;
|
|
16
|
+
}>;
|
|
17
|
+
storageClassName?: pulumi.Input<string>;
|
|
18
|
+
protect?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export declare class Transmission extends ComponentResource {
|
|
21
|
+
private readonly credentials;
|
|
22
|
+
private readonly settings;
|
|
23
|
+
private readonly deployment;
|
|
24
|
+
private readonly service;
|
|
25
|
+
private readonly middleware;
|
|
26
|
+
private readonly ingress;
|
|
27
|
+
readonly username: pulumi.Output<string>;
|
|
28
|
+
readonly password: pulumi.Output<string>;
|
|
29
|
+
readonly namespace: pulumi.Output<string>;
|
|
30
|
+
readonly hostname: pulumi.Output<string>;
|
|
31
|
+
/**
|
|
32
|
+
* Create a new Transmission resource.
|
|
33
|
+
* @param name The name of Transmission resource.
|
|
34
|
+
* @param args A bag of arguments to control the Transmission creation.
|
|
35
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
36
|
+
*/
|
|
37
|
+
constructor(name: string, args: TransmissionArgs, opts?: pulumi.ComponentResourceOptions);
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=deployment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deployment.d.ts","sourceRoot":"","sources":["../../../lib/transmission/deployment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;AAGzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAG9C,MAAM,WAAW,gBAAgB;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IACjC,QAAQ,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAC/B,gBAAgB,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IACxC,SAAS,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IACjC,cAAc,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IACrC,YAAY,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IACnC,iBAAiB,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IACxC,GAAG,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAC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Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.Transmission = void 0;
|
|
27
|
+
const pulumi = __importStar(require("@pulumi/pulumi"));
|
|
28
|
+
const random = __importStar(require("@pulumi/random"));
|
|
29
|
+
const k8s = __importStar(require("@pulumi/kubernetes"));
|
|
30
|
+
const common_1 = require("../common");
|
|
31
|
+
const traefik = __importStar(require("../traefik"));
|
|
32
|
+
class Transmission extends common_1.ComponentResource {
|
|
33
|
+
credentials;
|
|
34
|
+
settings;
|
|
35
|
+
deployment;
|
|
36
|
+
service;
|
|
37
|
+
middleware;
|
|
38
|
+
ingress;
|
|
39
|
+
username;
|
|
40
|
+
password;
|
|
41
|
+
namespace;
|
|
42
|
+
hostname;
|
|
43
|
+
/**
|
|
44
|
+
* Create a new Transmission resource.
|
|
45
|
+
* @param name The name of Transmission resource.
|
|
46
|
+
* @param args A bag of arguments to control the Transmission creation.
|
|
47
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
48
|
+
*/
|
|
49
|
+
constructor(name, args, opts) {
|
|
50
|
+
super("transmission", name, args, opts);
|
|
51
|
+
const emptyOpts = this.opts();
|
|
52
|
+
const k8sOpts = this.opts(k8s.Provider);
|
|
53
|
+
this.username = pulumi.secret("transmission");
|
|
54
|
+
this.password = pulumi.secret(new random.RandomPassword("password", { length: 24, special: false }, emptyOpts).result);
|
|
55
|
+
this.namespace = args.namespace
|
|
56
|
+
? pulumi.output(args.namespace)
|
|
57
|
+
: new k8s.core.v1.Namespace(name, { metadata: { name } }, k8sOpts).metadata.name;
|
|
58
|
+
const metadata = {
|
|
59
|
+
name,
|
|
60
|
+
namespace: this.namespace,
|
|
61
|
+
labels: {
|
|
62
|
+
"app.kubernetes.io/name": "transmission",
|
|
63
|
+
"app.kubernetes.io/component": "transmission",
|
|
64
|
+
"app.kubernetes.io/instance": name,
|
|
65
|
+
},
|
|
66
|
+
};
|
|
67
|
+
this.credentials = new k8s.core.v1.Secret(`${name}-credentials`, {
|
|
68
|
+
metadata: { ...metadata, name: pulumi.interpolate `${name}-credentials` },
|
|
69
|
+
stringData: {
|
|
70
|
+
username: this.username,
|
|
71
|
+
password: this.password,
|
|
72
|
+
},
|
|
73
|
+
}, k8sOpts);
|
|
74
|
+
this.settings = new k8s.core.v1.Secret(`${name}-settings`, {
|
|
75
|
+
metadata: { ...metadata, name: pulumi.interpolate `${name}-settings` },
|
|
76
|
+
stringData: {
|
|
77
|
+
"settings.json": pulumi
|
|
78
|
+
.all([this.username, this.password, args.blocklist])
|
|
79
|
+
.apply(([username, password, blocklist]) => JSON.stringify({
|
|
80
|
+
"blocklist-enabled": true,
|
|
81
|
+
"blocklist-url": blocklist ?? "",
|
|
82
|
+
"download-dir": "/downloads",
|
|
83
|
+
encryption: 2,
|
|
84
|
+
"incomplete-dir": "/downloads",
|
|
85
|
+
"incomplete-dir-enabled": false,
|
|
86
|
+
"max-peers-global": 128,
|
|
87
|
+
"peer-limit-global": 128,
|
|
88
|
+
"peer-limit-per-torrent": 48,
|
|
89
|
+
"port-forwarding-enabled": false,
|
|
90
|
+
"rpc-authentication-required": true,
|
|
91
|
+
"rpc-username": username,
|
|
92
|
+
"rpc-password": password,
|
|
93
|
+
"rpc-whitelist": "*",
|
|
94
|
+
"rpc-whitelist-enabled": true,
|
|
95
|
+
"speed-limit-down": args.speedLimitDown,
|
|
96
|
+
"speed-limit-down-enabled": true,
|
|
97
|
+
"speed-limit-up": 0,
|
|
98
|
+
"speed-limit-up-enabled": true,
|
|
99
|
+
"alt-speed-down": args.altSpeedDown,
|
|
100
|
+
"alt-speed-up": 0,
|
|
101
|
+
"download-queue-enabled": true,
|
|
102
|
+
"download-queue-size": args.downloadQueueSize,
|
|
103
|
+
"queue-stalled-enabled": true,
|
|
104
|
+
"queue-stalled-minutes": 60,
|
|
105
|
+
"start-added-torrents": false,
|
|
106
|
+
"trash-original-torrent-files": true,
|
|
107
|
+
umask: 18,
|
|
108
|
+
"utp-enabled": true,
|
|
109
|
+
"watch-dir-enabled": false,
|
|
110
|
+
}, null, 2)),
|
|
111
|
+
},
|
|
112
|
+
}, k8sOpts);
|
|
113
|
+
const configVolumeName = pulumi.interpolate `${name}-config`;
|
|
114
|
+
const configVolumeClaim = new k8s.core.v1.PersistentVolumeClaim(`${name}-config`, {
|
|
115
|
+
metadata: { ...metadata, name: configVolumeName },
|
|
116
|
+
spec: {
|
|
117
|
+
storageClassName: args.storageClassName,
|
|
118
|
+
accessModes: ["ReadWriteOnce"],
|
|
119
|
+
resources: { requests: { storage: "128Mi" } },
|
|
120
|
+
},
|
|
121
|
+
}, { ...k8sOpts, protect: args.protect });
|
|
122
|
+
this.deployment = new k8s.apps.v1.Deployment(name, {
|
|
123
|
+
metadata,
|
|
124
|
+
spec: {
|
|
125
|
+
selector: { matchLabels: metadata.labels },
|
|
126
|
+
strategy: { type: "Recreate" },
|
|
127
|
+
replicas: 1,
|
|
128
|
+
template: {
|
|
129
|
+
metadata: {
|
|
130
|
+
labels: metadata.labels,
|
|
131
|
+
annotations: { "backup.velero.io/backup-volumes": "config" },
|
|
132
|
+
},
|
|
133
|
+
spec: {
|
|
134
|
+
initContainers: [
|
|
135
|
+
{
|
|
136
|
+
name: "settings",
|
|
137
|
+
image: "busybox:latest",
|
|
138
|
+
command: ["/bin/sh", "-c", "cp /settings/settings.json /config/settings.json"],
|
|
139
|
+
resources: {
|
|
140
|
+
requests: { memory: "4Mi" },
|
|
141
|
+
limits: { memory: "8Mi" },
|
|
142
|
+
},
|
|
143
|
+
volumeMounts: [
|
|
144
|
+
{ name: "settings", mountPath: "/settings" },
|
|
145
|
+
{ name: "config", mountPath: "/config" },
|
|
146
|
+
],
|
|
147
|
+
},
|
|
148
|
+
],
|
|
149
|
+
containers: [
|
|
150
|
+
{
|
|
151
|
+
name: "transmission",
|
|
152
|
+
image: "ghcr.io/linuxserver/transmission:latest",
|
|
153
|
+
imagePullPolicy: "Always",
|
|
154
|
+
env: [
|
|
155
|
+
{ name: "PUID", value: args.uid },
|
|
156
|
+
{ name: "PGID", value: args.gid },
|
|
157
|
+
{ name: "TRANSMISSION_WEB_HOME", value: args.theme ? pulumi.interpolate `/${args.theme}/` : "" },
|
|
158
|
+
{
|
|
159
|
+
name: "USER",
|
|
160
|
+
valueFrom: { secretKeyRef: { name: this.credentials.metadata.name, key: "username" } },
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
name: "PASS",
|
|
164
|
+
valueFrom: { secretKeyRef: { name: this.credentials.metadata.name, key: "password" } },
|
|
165
|
+
},
|
|
166
|
+
{ name: "WHITELIST", value: "*" },
|
|
167
|
+
],
|
|
168
|
+
ports: [{ name: "http", containerPort: 9091, protocol: "TCP" }],
|
|
169
|
+
readinessProbe: {
|
|
170
|
+
periodSeconds: 10,
|
|
171
|
+
timeoutSeconds: 2,
|
|
172
|
+
successThreshold: 2,
|
|
173
|
+
failureThreshold: 10,
|
|
174
|
+
tcpSocket: { port: "http" },
|
|
175
|
+
},
|
|
176
|
+
livenessProbe: {
|
|
177
|
+
periodSeconds: 10,
|
|
178
|
+
timeoutSeconds: 2,
|
|
179
|
+
successThreshold: 1,
|
|
180
|
+
failureThreshold: 2,
|
|
181
|
+
tcpSocket: { port: "http" },
|
|
182
|
+
},
|
|
183
|
+
resources: {
|
|
184
|
+
requests: { memory: "128Mi" },
|
|
185
|
+
limits: { memory: "256Mi" },
|
|
186
|
+
},
|
|
187
|
+
volumeMounts: pulumi.all([args.downloadVolumes]).apply(([downloadVolumes]) => {
|
|
188
|
+
const volumeMounts = [
|
|
189
|
+
{ name: "config", mountPath: "/config" },
|
|
190
|
+
];
|
|
191
|
+
for (const volumeName in downloadVolumes) {
|
|
192
|
+
volumeMounts.push({ name: `volume-${volumeName}`, mountPath: `/mnt/${volumeName}` });
|
|
193
|
+
}
|
|
194
|
+
return volumeMounts;
|
|
195
|
+
}),
|
|
196
|
+
},
|
|
197
|
+
],
|
|
198
|
+
volumes: pulumi.all([args.downloadVolumes]).apply(([downloadVolumes]) => {
|
|
199
|
+
const volumes = [
|
|
200
|
+
{ name: "settings", secret: { secretName: this.settings.metadata.name } },
|
|
201
|
+
{ name: "config", persistentVolumeClaim: { claimName: configVolumeClaim.metadata.name } },
|
|
202
|
+
];
|
|
203
|
+
for (const volumeName in downloadVolumes) {
|
|
204
|
+
// eslint-disable-next-line security/detect-object-injection
|
|
205
|
+
const persistentVolumeClaimName = downloadVolumes[volumeName];
|
|
206
|
+
volumes.push({
|
|
207
|
+
name: `volume-${volumeName}`,
|
|
208
|
+
persistentVolumeClaim: { claimName: persistentVolumeClaimName },
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
return volumes;
|
|
212
|
+
}),
|
|
213
|
+
},
|
|
214
|
+
},
|
|
215
|
+
},
|
|
216
|
+
}, k8sOpts);
|
|
217
|
+
this.service = new k8s.core.v1.Service(name, {
|
|
218
|
+
metadata,
|
|
219
|
+
spec: {
|
|
220
|
+
selector: metadata.labels,
|
|
221
|
+
ports: [{ name: "http", port: 9091, targetPort: "http" }],
|
|
222
|
+
},
|
|
223
|
+
}, { ...k8sOpts, dependsOn: [this.deployment] });
|
|
224
|
+
this.hostname = pulumi.interpolate `${this.service.metadata.name}.${this.service.metadata.namespace}.svc`;
|
|
225
|
+
this.middleware = new traefik.Middleware(name, {
|
|
226
|
+
metadata,
|
|
227
|
+
spec: {
|
|
228
|
+
headers: {
|
|
229
|
+
customRequestHeaders: {
|
|
230
|
+
Authorization: pulumi
|
|
231
|
+
.all([this.username, this.password])
|
|
232
|
+
.apply(([username, password]) => `Basic ${Buffer.from(username + ":" + password).toString("base64")}`),
|
|
233
|
+
},
|
|
234
|
+
},
|
|
235
|
+
},
|
|
236
|
+
}, k8sOpts);
|
|
237
|
+
const middlewareName = pulumi.interpolate `${this.middleware.metadata.namespace}-${this.middleware.metadata.name}`;
|
|
238
|
+
this.ingress = new traefik.SecureIngress(name, {
|
|
239
|
+
metadata: {
|
|
240
|
+
...metadata,
|
|
241
|
+
annotations: {
|
|
242
|
+
"traefik.ingress.kubernetes.io/router.middlewares": pulumi.interpolate `${middlewareName}@kubernetescrd`,
|
|
243
|
+
},
|
|
244
|
+
},
|
|
245
|
+
spec: {
|
|
246
|
+
ingressClassName: args.ingressClassName,
|
|
247
|
+
rules: [
|
|
248
|
+
{
|
|
249
|
+
host: args.hostname,
|
|
250
|
+
http: {
|
|
251
|
+
paths: [
|
|
252
|
+
{
|
|
253
|
+
path: "/",
|
|
254
|
+
pathType: "Prefix",
|
|
255
|
+
backend: {
|
|
256
|
+
service: {
|
|
257
|
+
name: this.service.metadata.name,
|
|
258
|
+
port: { name: this.service.spec.ports[0].name },
|
|
259
|
+
},
|
|
260
|
+
},
|
|
261
|
+
},
|
|
262
|
+
],
|
|
263
|
+
},
|
|
264
|
+
},
|
|
265
|
+
],
|
|
266
|
+
},
|
|
267
|
+
}, k8sOpts);
|
|
268
|
+
this.registerOutputs();
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
exports.Transmission = Transmission;
|
|
272
|
+
//# sourceMappingURL=deployment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deployment.js","sourceRoot":"","sources":["../../../lib/transmission/deployment.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uDAAyC;AACzC,uDAAyC;AACzC,wDAA0C;AAC1C,sCAA8C;AAC9C,oDAAsC;AAkBtC,MAAa,YAAa,SAAQ,0BAAiB;IAChC,WAAW,CAAqB;IAChC,QAAQ,CAAqB;IAC7B,UAAU,CAAyB;IACnC,OAAO,CAAsB;IAC7B,UAAU,CAAqB;IAC/B,OAAO,CAAwB;IAChC,QAAQ,CAAwB;IAChC,QAAQ,CAAwB;IAChC,SAAS,CAAwB;IACjC,QAAQ,CAAwB;IAEhD;;;;;OAKG;IACH,YAAY,IAAY,EAAE,IAAsB,EAAE,IAAsC;QACtF,KAAK,CAAC,cAAc,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;QAExC,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;QAC9B,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAExC,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;QAC9C,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,MAAM,CAC3B,IAAI,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,SAAS,CAAC,CAAC,MAAM,CACxF,CAAC;QAEF,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS;YAC7B,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC;YAC/B,CAAC,CAAC,IAAI,GAAG,CAAC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C,IAAI,EACJ;YACE,QAAQ,EAAE;gBACR,GAAG,QAAQ;gBACX,WAAW,EAAE;oBACX,kDAAkD,EAAE,MAAM,CAAC,WAAW,CAAA,GAAG,cAAc,gBAAgB;iBACxG;aACF;YACD,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;wCACP,OAAO,EAAE;4CACP,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI;4CAChC,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE;yCAChD;qCACF;iCACF;6BACF;yBACF;qBACF;iBACF;aACF;SACF,EACD,OAAO,CACR,CAAC;QAEF,IAAI,CAAC,eAAe,EAAE,CAAC;IACzB,CAAC;CACF;AAvSD,oCAuSC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/transmission/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE9D,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Transmission = void 0;
|
|
4
|
+
const deployment_1 = require("./deployment");
|
|
5
|
+
Object.defineProperty(exports, "Transmission", { enumerable: true, get: function () { return deployment_1.Transmission; } });
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/transmission/index.ts"],"names":[],"mappings":";;;AAAA,6CAA8D;AAEnC,6FAFA,yBAAY,OAEA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ydkn/pulumi-components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"pulumi"
|
|
6
6
|
],
|
|
@@ -19,29 +19,29 @@
|
|
|
19
19
|
"@types/ssh2": "^1.11.6",
|
|
20
20
|
"@types/ssh2-sftp-client": "^9.0.0",
|
|
21
21
|
"@types/uuid": "^9.0.0",
|
|
22
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
23
|
-
"@typescript-eslint/parser": "^5.
|
|
22
|
+
"@typescript-eslint/eslint-plugin": "^5.48.0",
|
|
23
|
+
"@typescript-eslint/parser": "^5.48.0",
|
|
24
24
|
"bcrypt": "^5.1.0",
|
|
25
25
|
"copyfiles": "^2.4.1",
|
|
26
|
-
"eslint": "^8.
|
|
27
|
-
"eslint-config-prettier": "^8.
|
|
26
|
+
"eslint": "^8.31.0",
|
|
27
|
+
"eslint-config-prettier": "^8.6.0",
|
|
28
28
|
"eslint-config-standard": "^17.0.0",
|
|
29
29
|
"eslint-plugin-import": "^2.26.0",
|
|
30
30
|
"eslint-plugin-n": "^15.6.0",
|
|
31
31
|
"eslint-plugin-node": "^11.1.0",
|
|
32
32
|
"eslint-plugin-promise": "^6.1.1",
|
|
33
33
|
"eslint-plugin-security": "^1.5.0",
|
|
34
|
-
"prettier": "^2.8.
|
|
34
|
+
"prettier": "^2.8.2",
|
|
35
35
|
"rimraf": "^3.0.2",
|
|
36
36
|
"typescript": "^4.9.4"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@pulumi/aws": "^5.
|
|
39
|
+
"@pulumi/aws": "^5.26.0",
|
|
40
40
|
"@pulumi/cloudflare": "^4.14.0",
|
|
41
41
|
"@pulumi/gitlab": "^4.9.0",
|
|
42
42
|
"@pulumi/hcloud": "^1.10.1",
|
|
43
43
|
"@pulumi/kubernetes": "^3.23.1",
|
|
44
|
-
"@pulumi/pulumi": "^3.
|
|
44
|
+
"@pulumi/pulumi": "^3.51.0",
|
|
45
45
|
"@pulumi/random": "^4.8.2",
|
|
46
46
|
"@pulumi/tls": "^4.6.1",
|
|
47
47
|
"@ydkn/pulumi-k0s": "^0.1.11",
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
-
import { ComponentResource } from "../common";
|
|
3
|
-
export interface BrokerArgs {
|
|
4
|
-
/**
|
|
5
|
-
* Optional: Namespace
|
|
6
|
-
*/
|
|
7
|
-
namespace?: pulumi.Input<string>;
|
|
8
|
-
}
|
|
9
|
-
export declare class Broker extends ComponentResource {
|
|
10
|
-
private readonly helmRelease;
|
|
11
|
-
readonly namespace: pulumi.Output<string>;
|
|
12
|
-
readonly ca: pulumi.Output<string>;
|
|
13
|
-
readonly token: pulumi.Output<string>;
|
|
14
|
-
/**
|
|
15
|
-
* Create a new Submariner broker resource.
|
|
16
|
-
* @param name The name of Submariner broker resource.
|
|
17
|
-
* @param args A bag of arguments to control the Submariner broker creation.
|
|
18
|
-
* @param opts A bag of options that control this resource's behavior.
|
|
19
|
-
*/
|
|
20
|
-
constructor(name: string, args: BrokerArgs, opts?: pulumi.ComponentResourceOptions);
|
|
21
|
-
}
|
|
22
|
-
//# sourceMappingURL=broker.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"broker.d.ts","sourceRoot":"","sources":["../../../lib/submariner/broker.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;AAEzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAG9C,MAAM,WAAW,UAAU;IACzB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;CAClC;AAED,qBAAa,MAAO,SAAQ,iBAAiB;IAC3C,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAkB;IAC9C,SAAgB,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACjD,SAAgB,EAAE,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAC1C,SAAgB,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAE7C;;;;;OAKG;gBACS,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,wBAAwB;CAuCnF"}
|
package/lib/submariner/broker.js
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.Broker = void 0;
|
|
27
|
-
const pulumi = __importStar(require("@pulumi/pulumi"));
|
|
28
|
-
const k8s = __importStar(require("@pulumi/kubernetes"));
|
|
29
|
-
const common_1 = require("../common");
|
|
30
|
-
const helm = __importStar(require("../kubernetes/helm"));
|
|
31
|
-
class Broker extends common_1.ComponentResource {
|
|
32
|
-
helmRelease;
|
|
33
|
-
namespace;
|
|
34
|
-
ca;
|
|
35
|
-
token;
|
|
36
|
-
/**
|
|
37
|
-
* Create a new Submariner broker resource.
|
|
38
|
-
* @param name The name of Submariner broker resource.
|
|
39
|
-
* @param args A bag of arguments to control the Submariner broker creation.
|
|
40
|
-
* @param opts A bag of options that control this resource's behavior.
|
|
41
|
-
*/
|
|
42
|
-
constructor(name, args, opts) {
|
|
43
|
-
super("submariner:broker", name, args, opts);
|
|
44
|
-
const k8sOpts = this.opts(k8s.Provider);
|
|
45
|
-
this.namespace = args.namespace
|
|
46
|
-
? pulumi.output(args.namespace)
|
|
47
|
-
: new k8s.core.v1.Namespace(name, { metadata: { name } }, k8sOpts).metadata.name;
|
|
48
|
-
this.helmRelease = new helm.v3.Release(name, {
|
|
49
|
-
namespace: this.namespace,
|
|
50
|
-
repositoryOpts: { repo: "https://submariner-io.github.io/submariner-charts/charts" },
|
|
51
|
-
chart: "submariner-k8s-broker",
|
|
52
|
-
values: {
|
|
53
|
-
fullnameOverride: name,
|
|
54
|
-
},
|
|
55
|
-
}, k8sOpts);
|
|
56
|
-
const serviceAccount = k8s.core.v1.ServiceAccount.get(`${name}-service-account`, pulumi.interpolate `${this.helmRelease.status.namespace}/${name}-client`, k8sOpts);
|
|
57
|
-
const secret = k8s.core.v1.Secret.get(`${name}-secret`, pulumi.interpolate `${this.helmRelease.status.namespace}/${serviceAccount.secrets[0].name}`, k8sOpts);
|
|
58
|
-
this.ca = pulumi.secret(secret.data["ca.crt"]);
|
|
59
|
-
this.token = pulumi.secret(secret.data.token.apply((token) => Buffer.from(token, "base64").toString("ascii")));
|
|
60
|
-
this.registerOutputs();
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
exports.Broker = Broker;
|
|
64
|
-
//# sourceMappingURL=broker.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"broker.js","sourceRoot":"","sources":["../../../lib/submariner/broker.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uDAAyC;AACzC,wDAA0C;AAC1C,sCAA8C;AAC9C,yDAA2C;AAS3C,MAAa,MAAO,SAAQ,0BAAiB;IAC1B,WAAW,CAAkB;IAC9B,SAAS,CAAwB;IACjC,EAAE,CAAwB;IAC1B,KAAK,CAAwB;IAE7C;;;;;OAKG;IACH,YAAY,IAAY,EAAE,IAAgB,EAAE,IAAsC;QAChF,KAAK,CAAC,mBAAmB,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;QAE7C,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAExC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS;YAC7B,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC;YAC/B,CAAC,CAAC,IAAI,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,SAAS,CAAC,IAAI,EAAE,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC;QAEnF,IAAI,CAAC,WAAW,GAAG,IAAI,IAAI,CAAC,EAAE,CAAC,OAAO,CACpC,IAAI,EACJ;YACE,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,cAAc,EAAE,EAAE,IAAI,EAAE,0DAA0D,EAA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,YAAY,CAAC;AAExE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,kBAAkB,EAAE,YAAY,EAAE,QAAQ,EAAE,CAAC"}
|
package/lib/submariner/index.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Operator = exports.Broker = void 0;
|
|
4
|
-
const broker_1 = require("./broker");
|
|
5
|
-
Object.defineProperty(exports, "Broker", { enumerable: true, get: function () { return broker_1.Broker; } });
|
|
6
|
-
const operator_1 = require("./operator");
|
|
7
|
-
Object.defineProperty(exports, "Operator", { enumerable: true, get: function () { return operator_1.Operator; } });
|
|
8
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/submariner/index.ts"],"names":[],"mappings":";;;AAAA,qCAA8C;AAGzB,uFAHA,eAAM,OAGA;AAF3B,yCAAwE;AAET,yFAFpB,mBAAQ,OAEoB"}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
-
import { ComponentResource } from "../common";
|
|
3
|
-
export interface OperatorBrokerArgs {
|
|
4
|
-
/**
|
|
5
|
-
* Server
|
|
6
|
-
*/
|
|
7
|
-
server: pulumi.Input<string>;
|
|
8
|
-
/**
|
|
9
|
-
* CA certificate
|
|
10
|
-
*/
|
|
11
|
-
ca: pulumi.Input<string>;
|
|
12
|
-
/**
|
|
13
|
-
* Token
|
|
14
|
-
*/
|
|
15
|
-
token: pulumi.Input<string>;
|
|
16
|
-
/**
|
|
17
|
-
* Optional: Namespace
|
|
18
|
-
*/
|
|
19
|
-
namespace?: pulumi.Input<string>;
|
|
20
|
-
/**
|
|
21
|
-
* Optional: Enable GlobalNet
|
|
22
|
-
*/
|
|
23
|
-
globalNet?: pulumi.Input<boolean>;
|
|
24
|
-
}
|
|
25
|
-
export interface OperatorArgs {
|
|
26
|
-
/**
|
|
27
|
-
* Optional: Namespace
|
|
28
|
-
*/
|
|
29
|
-
namespace?: pulumi.Input<string>;
|
|
30
|
-
/**
|
|
31
|
-
* Broker
|
|
32
|
-
*/
|
|
33
|
-
broker: pulumi.Input<OperatorBrokerArgs>;
|
|
34
|
-
/**
|
|
35
|
-
* Cluster ID
|
|
36
|
-
*/
|
|
37
|
-
clusterId: pulumi.Input<string>;
|
|
38
|
-
/**
|
|
39
|
-
* Pod CIDR
|
|
40
|
-
*/
|
|
41
|
-
podCIDR: pulumi.Input<string>;
|
|
42
|
-
/**
|
|
43
|
-
* Service CIDR
|
|
44
|
-
*/
|
|
45
|
-
serviceCIDR: pulumi.Input<string>;
|
|
46
|
-
/**
|
|
47
|
-
* Optional: NAT enabled
|
|
48
|
-
*/
|
|
49
|
-
natEnabled?: pulumi.Input<boolean>;
|
|
50
|
-
/**
|
|
51
|
-
* Optional: Calico ignored subnets
|
|
52
|
-
*/
|
|
53
|
-
calicoIgnoredSubnets?: pulumi.Input<pulumi.Input<string>[]>;
|
|
54
|
-
}
|
|
55
|
-
export declare class Operator extends ComponentResource {
|
|
56
|
-
private static readonly imageTag;
|
|
57
|
-
private readonly psk;
|
|
58
|
-
private readonly helmChart;
|
|
59
|
-
private readonly role?;
|
|
60
|
-
private readonly roleBindingGateway?;
|
|
61
|
-
private readonly roleBindingRouteAgent?;
|
|
62
|
-
private readonly calicoIPPools?;
|
|
63
|
-
readonly namespace: pulumi.Output<string>;
|
|
64
|
-
/**
|
|
65
|
-
* Create a new Submariner operator resource.
|
|
66
|
-
* @param name The name of Submariner operator resource.
|
|
67
|
-
* @param args A bag of arguments to control the Submariner operator creation.
|
|
68
|
-
* @param opts A bag of options that control this resource's behavior.
|
|
69
|
-
*/
|
|
70
|
-
constructor(name: string, args: OperatorArgs, opts?: pulumi.ComponentResourceOptions);
|
|
71
|
-
}
|
|
72
|
-
//# sourceMappingURL=operator.d.ts.map
|
|
@@ -1 +0,0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,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAY;IAE5C,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAsB;IAC1C,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAgB;IAC1C,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAmB;IACzC,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAA0B;IAC9D,OAAO,CAAC,QAAQ,CAAC,qBAAqB,CAAC,CAA0B;IACjE,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAoD;IACnF,SAAgB,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAEjD;;;;;OAKG;gBACS,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,wBAAwB;CAyErF"}
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.Operator = void 0;
|
|
27
|
-
const pulumi = __importStar(require("@pulumi/pulumi"));
|
|
28
|
-
const random = __importStar(require("@pulumi/random"));
|
|
29
|
-
const k8s = __importStar(require("@pulumi/kubernetes"));
|
|
30
|
-
const common_1 = require("../common");
|
|
31
|
-
const helm = __importStar(require("../kubernetes/helm"));
|
|
32
|
-
class Operator extends common_1.ComponentResource {
|
|
33
|
-
static imageTag = "0.12.0";
|
|
34
|
-
psk;
|
|
35
|
-
helmChart;
|
|
36
|
-
role;
|
|
37
|
-
roleBindingGateway;
|
|
38
|
-
roleBindingRouteAgent;
|
|
39
|
-
calicoIPPools;
|
|
40
|
-
namespace;
|
|
41
|
-
/**
|
|
42
|
-
* Create a new Submariner operator resource.
|
|
43
|
-
* @param name The name of Submariner operator resource.
|
|
44
|
-
* @param args A bag of arguments to control the Submariner operator creation.
|
|
45
|
-
* @param opts A bag of options that control this resource's behavior.
|
|
46
|
-
*/
|
|
47
|
-
constructor(name, args, opts) {
|
|
48
|
-
super("submariner:operator", name, args, opts);
|
|
49
|
-
const emptyOpts = this.opts();
|
|
50
|
-
const k8sOpts = this.opts(k8s.Provider);
|
|
51
|
-
this.psk = new random.RandomString(name, { length: 64, special: false }, emptyOpts);
|
|
52
|
-
this.namespace = args.namespace
|
|
53
|
-
? pulumi.output(args.namespace)
|
|
54
|
-
: new k8s.core.v1.Namespace(name, { metadata: { name } }, k8sOpts).metadata.name;
|
|
55
|
-
this.helmChart = new helm.v3.Chart(name, {
|
|
56
|
-
namespace: this.namespace,
|
|
57
|
-
fetchOpts: { repo: "https://submariner-io.github.io/submariner-charts/charts" },
|
|
58
|
-
chart: "submariner-operator",
|
|
59
|
-
values: {
|
|
60
|
-
fullnameOverride: name,
|
|
61
|
-
broker: pulumi.all([args.broker]).apply(([broker]) => {
|
|
62
|
-
return {
|
|
63
|
-
server: broker.server,
|
|
64
|
-
ca: broker.ca,
|
|
65
|
-
token: broker.token,
|
|
66
|
-
namespace: broker.namespace ?? "submariner-broker",
|
|
67
|
-
globalnet: broker.globalNet ?? false,
|
|
68
|
-
};
|
|
69
|
-
}),
|
|
70
|
-
ipsec: { psk: this.psk.result },
|
|
71
|
-
operator: { image: { tag: Operator.imageTag } },
|
|
72
|
-
gateway: { image: { tag: Operator.imageTag } },
|
|
73
|
-
submariner: {
|
|
74
|
-
images: { tag: Operator.imageTag },
|
|
75
|
-
serviceDiscovery: false,
|
|
76
|
-
cableDriver: "wireguard",
|
|
77
|
-
clusterId: args.clusterId,
|
|
78
|
-
clusterCidr: args.podCIDR,
|
|
79
|
-
serviceCidr: args.serviceCIDR,
|
|
80
|
-
natEnabled: args.natEnabled,
|
|
81
|
-
},
|
|
82
|
-
serviceAccounts: {
|
|
83
|
-
operator: { name },
|
|
84
|
-
gateway: { name: `${name}-gateway` },
|
|
85
|
-
routeAgent: { name: `${name}-routeagent` },
|
|
86
|
-
globalnet: { name: `${name}-globalnet` },
|
|
87
|
-
lighthouseAgent: { name: `${name}-lighthouse-agent` },
|
|
88
|
-
lighthouseCoreDns: { name: `${name}-lighthouse-core-dns` },
|
|
89
|
-
},
|
|
90
|
-
},
|
|
91
|
-
}, { transformers: { metadataNamespace: true, metadataNamespaceName: this.namespace } }, k8sOpts);
|
|
92
|
-
this.calicoIPPools = pulumi.all([args.calicoIgnoredSubnets ?? []]).apply(([subnets]) => subnets.map((subnet) => new k8s.apiextensions.CustomResource(subnet, {
|
|
93
|
-
apiVersion: "crd.projectcalico.org/v1",
|
|
94
|
-
kind: "IPPool",
|
|
95
|
-
metadata: { name: subnet.replace(/\//g, "-") },
|
|
96
|
-
spec: { cidr: subnet, natOutgoing: false, disabled: true },
|
|
97
|
-
}, k8sOpts)));
|
|
98
|
-
this.registerOutputs();
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
exports.Operator = Operator;
|
|
102
|
-
//# sourceMappingURL=operator.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"operator.js","sourceRoot":"","sources":["../../../lib/submariner/operator.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uDAAyC;AACzC,uDAAyC;AACzC,wDAA0C;AAC1C,sCAA8C;AAC9C,yDAA2C;AAwD3C,MAAa,QAAS,SAAQ,0BAAiB;IACrC,MAAM,CAAU,QAAQ,GAAG,QAAQ,CAAC;IAE3B,GAAG,CAAsB;IACzB,SAAS,CAAgB;IACzB,IAAI,CAAoB;IACxB,kBAAkB,CAA2B;IAC7C,qBAAqB,CAA2B;IAChD,aAAa,CAAqD;IACnE,SAAS,CAAwB;IAEjD;;;;;OAKG;IACH,YAAY,IAAY,EAAE,IAAkB,EAAE,IAAsC;QAClF,KAAK,CAAC,qBAAqB,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;QAE/C,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;QAC9B,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAExC,IAAI,CAAC,GAAG,GAAG,IAAI,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,SAAS,CAAC,CAAC;QAEpF,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS;YAC7B,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC;YAC/B,CAAC,CAAC,IAAI,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,SAAS,CAAC,IAAI,EAAE,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,EAAE,E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