@reyemtech/pulumi-rackspace-spot 0.1.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/bin/cloudspace.d.ts +20 -0
- package/bin/cloudspace.js +56 -0
- package/bin/getCloudspace.d.ts +15 -0
- package/bin/getCloudspace.js +45 -0
- package/bin/getKubeconfig.d.ts +11 -0
- package/bin/getKubeconfig.js +45 -0
- package/bin/getRegions.d.ts +11 -0
- package/bin/getRegions.js +45 -0
- package/bin/getServerClasses.d.ts +19 -0
- package/bin/getServerClasses.js +45 -0
- package/bin/index.d.ts +10 -0
- package/bin/index.js +40 -0
- package/bin/ondemandnodepool.d.ts +31 -0
- package/bin/ondemandnodepool.js +58 -0
- package/bin/provider.d.ts +7 -0
- package/bin/provider.js +44 -0
- package/bin/spotnodepool.d.ts +35 -0
- package/bin/spotnodepool.js +60 -0
- package/bin/types/input.d.ts +10 -0
- package/bin/types/input.js +3 -0
- package/bin/types/output.d.ts +9 -0
- package/bin/types/output.js +3 -0
- package/cloudspace.ts +29 -0
- package/getCloudspace.ts +23 -0
- package/getKubeconfig.ts +19 -0
- package/getRegions.ts +19 -0
- package/getServerClasses.ts +28 -0
- package/index.ts +10 -0
- package/ondemandnodepool.ts +33 -0
- package/package.json +27 -0
- package/provider.ts +11 -0
- package/spotnodepool.ts +37 -0
- package/tsconfig.json +15 -0
- package/types/input.ts +12 -0
- package/types/output.ts +10 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
export interface CloudSpaceArgs {
|
|
3
|
+
cloudspaceName: pulumi.Input<string>;
|
|
4
|
+
region: pulumi.Input<string>;
|
|
5
|
+
kubernetesVersion?: pulumi.Input<string>;
|
|
6
|
+
cni?: pulumi.Input<string>;
|
|
7
|
+
haControlPlane?: pulumi.Input<boolean>;
|
|
8
|
+
preemptionWebhookUrl?: pulumi.Input<string>;
|
|
9
|
+
}
|
|
10
|
+
export declare class CloudSpace extends pulumi.CustomResource {
|
|
11
|
+
readonly cloudspaceName: pulumi.Output<string>;
|
|
12
|
+
readonly region: pulumi.Output<string>;
|
|
13
|
+
readonly kubernetesVersion: pulumi.Output<string>;
|
|
14
|
+
readonly cni: pulumi.Output<string>;
|
|
15
|
+
readonly haControlPlane: pulumi.Output<boolean>;
|
|
16
|
+
readonly preemptionWebhookUrl: pulumi.Output<string | undefined>;
|
|
17
|
+
readonly apiServerEndpoint: pulumi.Output<string>;
|
|
18
|
+
readonly phase: pulumi.Output<string>;
|
|
19
|
+
constructor(name: string, args: CloudSpaceArgs, opts?: pulumi.CustomResourceOptions);
|
|
20
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
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 () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.CloudSpace = void 0;
|
|
37
|
+
const pulumi = __importStar(require("@pulumi/pulumi"));
|
|
38
|
+
class CloudSpace extends pulumi.CustomResource {
|
|
39
|
+
cloudspaceName;
|
|
40
|
+
region;
|
|
41
|
+
kubernetesVersion;
|
|
42
|
+
cni;
|
|
43
|
+
haControlPlane;
|
|
44
|
+
preemptionWebhookUrl;
|
|
45
|
+
apiServerEndpoint;
|
|
46
|
+
phase;
|
|
47
|
+
constructor(name, args, opts) {
|
|
48
|
+
super("rackspace-spot:index:CloudSpace", name, {
|
|
49
|
+
...args,
|
|
50
|
+
apiServerEndpoint: undefined,
|
|
51
|
+
phase: undefined,
|
|
52
|
+
}, opts);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
exports.CloudSpace = CloudSpace;
|
|
56
|
+
//# sourceMappingURL=cloudspace.js.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
export interface GetCloudspaceArgs {
|
|
3
|
+
name: string;
|
|
4
|
+
}
|
|
5
|
+
export interface GetCloudspaceResult {
|
|
6
|
+
name: string;
|
|
7
|
+
region: string;
|
|
8
|
+
kubernetesVersion: string;
|
|
9
|
+
cni: string;
|
|
10
|
+
haControlPlane: boolean;
|
|
11
|
+
apiServerEndpoint: string;
|
|
12
|
+
phase: string;
|
|
13
|
+
}
|
|
14
|
+
export declare function getCloudspace(args: GetCloudspaceArgs, opts?: pulumi.InvokeOptions): Promise<GetCloudspaceResult>;
|
|
15
|
+
export declare function getCloudspaceOutput(args: GetCloudspaceArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetCloudspaceResult>;
|
|
@@ -0,0 +1,45 @@
|
|
|
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 () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.getCloudspace = getCloudspace;
|
|
37
|
+
exports.getCloudspaceOutput = getCloudspaceOutput;
|
|
38
|
+
const pulumi = __importStar(require("@pulumi/pulumi"));
|
|
39
|
+
function getCloudspace(args, opts) {
|
|
40
|
+
return pulumi.runtime.invoke("rackspace-spot:index:getCloudspace", args, opts);
|
|
41
|
+
}
|
|
42
|
+
function getCloudspaceOutput(args, opts) {
|
|
43
|
+
return pulumi.runtime.invokeOutput("rackspace-spot:index:getCloudspace", args, opts);
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=getCloudspace.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
export interface GetKubeconfigArgs {
|
|
3
|
+
cloudspaceName: string;
|
|
4
|
+
}
|
|
5
|
+
export interface GetKubeconfigResult {
|
|
6
|
+
raw: string;
|
|
7
|
+
host: string;
|
|
8
|
+
clusterName: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function getKubeconfig(args: GetKubeconfigArgs, opts?: pulumi.InvokeOptions): Promise<GetKubeconfigResult>;
|
|
11
|
+
export declare function getKubeconfigOutput(args: GetKubeconfigArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetKubeconfigResult>;
|
|
@@ -0,0 +1,45 @@
|
|
|
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 () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.getKubeconfig = getKubeconfig;
|
|
37
|
+
exports.getKubeconfigOutput = getKubeconfigOutput;
|
|
38
|
+
const pulumi = __importStar(require("@pulumi/pulumi"));
|
|
39
|
+
function getKubeconfig(args, opts) {
|
|
40
|
+
return pulumi.runtime.invoke("rackspace-spot:index:getKubeconfig", args, opts);
|
|
41
|
+
}
|
|
42
|
+
function getKubeconfigOutput(args, opts) {
|
|
43
|
+
return pulumi.runtime.invokeOutput("rackspace-spot:index:getKubeconfig", args, opts);
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=getKubeconfig.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
export interface RegionInfo {
|
|
3
|
+
name: string;
|
|
4
|
+
country: string;
|
|
5
|
+
description: string;
|
|
6
|
+
}
|
|
7
|
+
export interface GetRegionsResult {
|
|
8
|
+
regions: RegionInfo[];
|
|
9
|
+
}
|
|
10
|
+
export declare function getRegions(opts?: pulumi.InvokeOptions): Promise<GetRegionsResult>;
|
|
11
|
+
export declare function getRegionsOutput(opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetRegionsResult>;
|
|
@@ -0,0 +1,45 @@
|
|
|
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 () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.getRegions = getRegions;
|
|
37
|
+
exports.getRegionsOutput = getRegionsOutput;
|
|
38
|
+
const pulumi = __importStar(require("@pulumi/pulumi"));
|
|
39
|
+
function getRegions(opts) {
|
|
40
|
+
return pulumi.runtime.invoke("rackspace-spot:index:getRegions", {}, opts);
|
|
41
|
+
}
|
|
42
|
+
function getRegionsOutput(opts) {
|
|
43
|
+
return pulumi.runtime.invokeOutput("rackspace-spot:index:getRegions", {}, opts);
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=getRegions.js.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
export interface GetServerClassesArgs {
|
|
3
|
+
region?: string;
|
|
4
|
+
}
|
|
5
|
+
export interface ServerClassInfo {
|
|
6
|
+
name: string;
|
|
7
|
+
region: string;
|
|
8
|
+
category: string;
|
|
9
|
+
cpu: string;
|
|
10
|
+
memory: string;
|
|
11
|
+
flavorType: string;
|
|
12
|
+
available: number;
|
|
13
|
+
capacity: number;
|
|
14
|
+
}
|
|
15
|
+
export interface GetServerClassesResult {
|
|
16
|
+
serverClasses: ServerClassInfo[];
|
|
17
|
+
}
|
|
18
|
+
export declare function getServerClasses(args?: GetServerClassesArgs, opts?: pulumi.InvokeOptions): Promise<GetServerClassesResult>;
|
|
19
|
+
export declare function getServerClassesOutput(args?: GetServerClassesArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetServerClassesResult>;
|
|
@@ -0,0 +1,45 @@
|
|
|
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 () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.getServerClasses = getServerClasses;
|
|
37
|
+
exports.getServerClassesOutput = getServerClassesOutput;
|
|
38
|
+
const pulumi = __importStar(require("@pulumi/pulumi"));
|
|
39
|
+
function getServerClasses(args, opts) {
|
|
40
|
+
return pulumi.runtime.invoke("rackspace-spot:index:getServerClasses", args ?? {}, opts);
|
|
41
|
+
}
|
|
42
|
+
function getServerClassesOutput(args, opts) {
|
|
43
|
+
return pulumi.runtime.invokeOutput("rackspace-spot:index:getServerClasses", args ?? {}, opts);
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=getServerClasses.js.map
|
package/bin/index.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { Provider, ProviderArgs } from "./provider";
|
|
2
|
+
export { CloudSpace, CloudSpaceArgs } from "./cloudspace";
|
|
3
|
+
export { SpotNodePool, SpotNodePoolArgs } from "./spotnodepool";
|
|
4
|
+
export { OnDemandNodePool, OnDemandNodePoolArgs } from "./ondemandnodepool";
|
|
5
|
+
export { getCloudspace, getCloudspaceOutput, GetCloudspaceArgs, GetCloudspaceResult } from "./getCloudspace";
|
|
6
|
+
export { getKubeconfig, getKubeconfigOutput, GetKubeconfigArgs, GetKubeconfigResult } from "./getKubeconfig";
|
|
7
|
+
export { getRegions, getRegionsOutput, GetRegionsResult, RegionInfo } from "./getRegions";
|
|
8
|
+
export { getServerClasses, getServerClassesOutput, GetServerClassesArgs, GetServerClassesResult, ServerClassInfo } from "./getServerClasses";
|
|
9
|
+
export * from "./types/input";
|
|
10
|
+
export * from "./types/output";
|
package/bin/index.js
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.getServerClassesOutput = exports.getServerClasses = exports.getRegionsOutput = exports.getRegions = exports.getKubeconfigOutput = exports.getKubeconfig = exports.getCloudspaceOutput = exports.getCloudspace = exports.OnDemandNodePool = exports.SpotNodePool = exports.CloudSpace = exports.Provider = void 0;
|
|
18
|
+
var provider_1 = require("./provider");
|
|
19
|
+
Object.defineProperty(exports, "Provider", { enumerable: true, get: function () { return provider_1.Provider; } });
|
|
20
|
+
var cloudspace_1 = require("./cloudspace");
|
|
21
|
+
Object.defineProperty(exports, "CloudSpace", { enumerable: true, get: function () { return cloudspace_1.CloudSpace; } });
|
|
22
|
+
var spotnodepool_1 = require("./spotnodepool");
|
|
23
|
+
Object.defineProperty(exports, "SpotNodePool", { enumerable: true, get: function () { return spotnodepool_1.SpotNodePool; } });
|
|
24
|
+
var ondemandnodepool_1 = require("./ondemandnodepool");
|
|
25
|
+
Object.defineProperty(exports, "OnDemandNodePool", { enumerable: true, get: function () { return ondemandnodepool_1.OnDemandNodePool; } });
|
|
26
|
+
var getCloudspace_1 = require("./getCloudspace");
|
|
27
|
+
Object.defineProperty(exports, "getCloudspace", { enumerable: true, get: function () { return getCloudspace_1.getCloudspace; } });
|
|
28
|
+
Object.defineProperty(exports, "getCloudspaceOutput", { enumerable: true, get: function () { return getCloudspace_1.getCloudspaceOutput; } });
|
|
29
|
+
var getKubeconfig_1 = require("./getKubeconfig");
|
|
30
|
+
Object.defineProperty(exports, "getKubeconfig", { enumerable: true, get: function () { return getKubeconfig_1.getKubeconfig; } });
|
|
31
|
+
Object.defineProperty(exports, "getKubeconfigOutput", { enumerable: true, get: function () { return getKubeconfig_1.getKubeconfigOutput; } });
|
|
32
|
+
var getRegions_1 = require("./getRegions");
|
|
33
|
+
Object.defineProperty(exports, "getRegions", { enumerable: true, get: function () { return getRegions_1.getRegions; } });
|
|
34
|
+
Object.defineProperty(exports, "getRegionsOutput", { enumerable: true, get: function () { return getRegions_1.getRegionsOutput; } });
|
|
35
|
+
var getServerClasses_1 = require("./getServerClasses");
|
|
36
|
+
Object.defineProperty(exports, "getServerClasses", { enumerable: true, get: function () { return getServerClasses_1.getServerClasses; } });
|
|
37
|
+
Object.defineProperty(exports, "getServerClassesOutput", { enumerable: true, get: function () { return getServerClasses_1.getServerClassesOutput; } });
|
|
38
|
+
__exportStar(require("./types/input"), exports);
|
|
39
|
+
__exportStar(require("./types/output"), exports);
|
|
40
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
import { Taint } from "./types/input";
|
|
3
|
+
import { TaintOutput } from "./types/output";
|
|
4
|
+
export interface OnDemandNodePoolArgs {
|
|
5
|
+
cloudspaceName: pulumi.Input<string>;
|
|
6
|
+
serverClass: pulumi.Input<string>;
|
|
7
|
+
desiredCount: pulumi.Input<number>;
|
|
8
|
+
labels?: pulumi.Input<{
|
|
9
|
+
[key: string]: pulumi.Input<string>;
|
|
10
|
+
}>;
|
|
11
|
+
annotations?: pulumi.Input<{
|
|
12
|
+
[key: string]: pulumi.Input<string>;
|
|
13
|
+
}>;
|
|
14
|
+
taints?: pulumi.Input<pulumi.Input<Taint>[]>;
|
|
15
|
+
}
|
|
16
|
+
export declare class OnDemandNodePool extends pulumi.CustomResource {
|
|
17
|
+
readonly cloudspaceName: pulumi.Output<string>;
|
|
18
|
+
readonly serverClass: pulumi.Output<string>;
|
|
19
|
+
readonly desiredCount: pulumi.Output<number>;
|
|
20
|
+
readonly labels: pulumi.Output<{
|
|
21
|
+
[key: string]: string;
|
|
22
|
+
} | undefined>;
|
|
23
|
+
readonly annotations: pulumi.Output<{
|
|
24
|
+
[key: string]: string;
|
|
25
|
+
} | undefined>;
|
|
26
|
+
readonly taints: pulumi.Output<TaintOutput[] | undefined>;
|
|
27
|
+
readonly nodepoolId: pulumi.Output<string>;
|
|
28
|
+
readonly reservedCount: pulumi.Output<number>;
|
|
29
|
+
readonly reservedStatus: pulumi.Output<string>;
|
|
30
|
+
constructor(name: string, args: OnDemandNodePoolArgs, opts?: pulumi.CustomResourceOptions);
|
|
31
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
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 () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.OnDemandNodePool = void 0;
|
|
37
|
+
const pulumi = __importStar(require("@pulumi/pulumi"));
|
|
38
|
+
class OnDemandNodePool extends pulumi.CustomResource {
|
|
39
|
+
cloudspaceName;
|
|
40
|
+
serverClass;
|
|
41
|
+
desiredCount;
|
|
42
|
+
labels;
|
|
43
|
+
annotations;
|
|
44
|
+
taints;
|
|
45
|
+
nodepoolId;
|
|
46
|
+
reservedCount;
|
|
47
|
+
reservedStatus;
|
|
48
|
+
constructor(name, args, opts) {
|
|
49
|
+
super("rackspace-spot:index:OnDemandNodePool", name, {
|
|
50
|
+
...args,
|
|
51
|
+
nodepoolId: undefined,
|
|
52
|
+
reservedCount: undefined,
|
|
53
|
+
reservedStatus: undefined,
|
|
54
|
+
}, opts);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
exports.OnDemandNodePool = OnDemandNodePool;
|
|
58
|
+
//# sourceMappingURL=ondemandnodepool.js.map
|
package/bin/provider.js
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
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 () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.Provider = void 0;
|
|
37
|
+
const pulumi = __importStar(require("@pulumi/pulumi"));
|
|
38
|
+
class Provider extends pulumi.ProviderResource {
|
|
39
|
+
constructor(name, args, opts) {
|
|
40
|
+
super("rackspace-spot", name, { token: args?.token }, opts);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
exports.Provider = Provider;
|
|
44
|
+
//# sourceMappingURL=provider.js.map
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
import { Autoscaling, Taint } from "./types/input";
|
|
3
|
+
import { AutoscalingOutput, TaintOutput } from "./types/output";
|
|
4
|
+
export interface SpotNodePoolArgs {
|
|
5
|
+
cloudspaceName: pulumi.Input<string>;
|
|
6
|
+
serverClass: pulumi.Input<string>;
|
|
7
|
+
bidPrice: pulumi.Input<number>;
|
|
8
|
+
desiredCount?: pulumi.Input<number>;
|
|
9
|
+
autoscaling?: pulumi.Input<Autoscaling>;
|
|
10
|
+
labels?: pulumi.Input<{
|
|
11
|
+
[key: string]: pulumi.Input<string>;
|
|
12
|
+
}>;
|
|
13
|
+
annotations?: pulumi.Input<{
|
|
14
|
+
[key: string]: pulumi.Input<string>;
|
|
15
|
+
}>;
|
|
16
|
+
taints?: pulumi.Input<pulumi.Input<Taint>[]>;
|
|
17
|
+
}
|
|
18
|
+
export declare class SpotNodePool extends pulumi.CustomResource {
|
|
19
|
+
readonly cloudspaceName: pulumi.Output<string>;
|
|
20
|
+
readonly serverClass: pulumi.Output<string>;
|
|
21
|
+
readonly bidPrice: pulumi.Output<number>;
|
|
22
|
+
readonly desiredCount: pulumi.Output<number | undefined>;
|
|
23
|
+
readonly autoscaling: pulumi.Output<AutoscalingOutput | undefined>;
|
|
24
|
+
readonly labels: pulumi.Output<{
|
|
25
|
+
[key: string]: string;
|
|
26
|
+
} | undefined>;
|
|
27
|
+
readonly annotations: pulumi.Output<{
|
|
28
|
+
[key: string]: string;
|
|
29
|
+
} | undefined>;
|
|
30
|
+
readonly taints: pulumi.Output<TaintOutput[] | undefined>;
|
|
31
|
+
readonly nodepoolId: pulumi.Output<string>;
|
|
32
|
+
readonly wonCount: pulumi.Output<number>;
|
|
33
|
+
readonly bidStatus: pulumi.Output<string>;
|
|
34
|
+
constructor(name: string, args: SpotNodePoolArgs, opts?: pulumi.CustomResourceOptions);
|
|
35
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
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 () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.SpotNodePool = void 0;
|
|
37
|
+
const pulumi = __importStar(require("@pulumi/pulumi"));
|
|
38
|
+
class SpotNodePool extends pulumi.CustomResource {
|
|
39
|
+
cloudspaceName;
|
|
40
|
+
serverClass;
|
|
41
|
+
bidPrice;
|
|
42
|
+
desiredCount;
|
|
43
|
+
autoscaling;
|
|
44
|
+
labels;
|
|
45
|
+
annotations;
|
|
46
|
+
taints;
|
|
47
|
+
nodepoolId;
|
|
48
|
+
wonCount;
|
|
49
|
+
bidStatus;
|
|
50
|
+
constructor(name, args, opts) {
|
|
51
|
+
super("rackspace-spot:index:SpotNodePool", name, {
|
|
52
|
+
...args,
|
|
53
|
+
nodepoolId: undefined,
|
|
54
|
+
wonCount: undefined,
|
|
55
|
+
bidStatus: undefined,
|
|
56
|
+
}, opts);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
exports.SpotNodePool = SpotNodePool;
|
|
60
|
+
//# sourceMappingURL=spotnodepool.js.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
export interface Autoscaling {
|
|
3
|
+
minNodes: pulumi.Input<number>;
|
|
4
|
+
maxNodes: pulumi.Input<number>;
|
|
5
|
+
}
|
|
6
|
+
export interface Taint {
|
|
7
|
+
key: pulumi.Input<string>;
|
|
8
|
+
value?: pulumi.Input<string>;
|
|
9
|
+
effect: pulumi.Input<string>;
|
|
10
|
+
}
|
package/cloudspace.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
|
|
3
|
+
export interface CloudSpaceArgs {
|
|
4
|
+
cloudspaceName: pulumi.Input<string>;
|
|
5
|
+
region: pulumi.Input<string>;
|
|
6
|
+
kubernetesVersion?: pulumi.Input<string>;
|
|
7
|
+
cni?: pulumi.Input<string>;
|
|
8
|
+
haControlPlane?: pulumi.Input<boolean>;
|
|
9
|
+
preemptionWebhookUrl?: pulumi.Input<string>;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export class CloudSpace extends pulumi.CustomResource {
|
|
13
|
+
public readonly cloudspaceName!: pulumi.Output<string>;
|
|
14
|
+
public readonly region!: pulumi.Output<string>;
|
|
15
|
+
public readonly kubernetesVersion!: pulumi.Output<string>;
|
|
16
|
+
public readonly cni!: pulumi.Output<string>;
|
|
17
|
+
public readonly haControlPlane!: pulumi.Output<boolean>;
|
|
18
|
+
public readonly preemptionWebhookUrl!: pulumi.Output<string | undefined>;
|
|
19
|
+
public readonly apiServerEndpoint!: pulumi.Output<string>;
|
|
20
|
+
public readonly phase!: pulumi.Output<string>;
|
|
21
|
+
|
|
22
|
+
constructor(name: string, args: CloudSpaceArgs, opts?: pulumi.CustomResourceOptions) {
|
|
23
|
+
super("rackspace-spot:index:CloudSpace", name, {
|
|
24
|
+
...args,
|
|
25
|
+
apiServerEndpoint: undefined,
|
|
26
|
+
phase: undefined,
|
|
27
|
+
}, opts);
|
|
28
|
+
}
|
|
29
|
+
}
|
package/getCloudspace.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
|
|
3
|
+
export interface GetCloudspaceArgs {
|
|
4
|
+
name: string;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export interface GetCloudspaceResult {
|
|
8
|
+
name: string;
|
|
9
|
+
region: string;
|
|
10
|
+
kubernetesVersion: string;
|
|
11
|
+
cni: string;
|
|
12
|
+
haControlPlane: boolean;
|
|
13
|
+
apiServerEndpoint: string;
|
|
14
|
+
phase: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export function getCloudspace(args: GetCloudspaceArgs, opts?: pulumi.InvokeOptions): Promise<GetCloudspaceResult> {
|
|
18
|
+
return pulumi.runtime.invoke("rackspace-spot:index:getCloudspace", args, opts);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export function getCloudspaceOutput(args: GetCloudspaceArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetCloudspaceResult> {
|
|
22
|
+
return pulumi.runtime.invokeOutput("rackspace-spot:index:getCloudspace", args, opts);
|
|
23
|
+
}
|
package/getKubeconfig.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
|
|
3
|
+
export interface GetKubeconfigArgs {
|
|
4
|
+
cloudspaceName: string;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export interface GetKubeconfigResult {
|
|
8
|
+
raw: string;
|
|
9
|
+
host: string;
|
|
10
|
+
clusterName: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export function getKubeconfig(args: GetKubeconfigArgs, opts?: pulumi.InvokeOptions): Promise<GetKubeconfigResult> {
|
|
14
|
+
return pulumi.runtime.invoke("rackspace-spot:index:getKubeconfig", args, opts);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export function getKubeconfigOutput(args: GetKubeconfigArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetKubeconfigResult> {
|
|
18
|
+
return pulumi.runtime.invokeOutput("rackspace-spot:index:getKubeconfig", args, opts);
|
|
19
|
+
}
|
package/getRegions.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
|
|
3
|
+
export interface RegionInfo {
|
|
4
|
+
name: string;
|
|
5
|
+
country: string;
|
|
6
|
+
description: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface GetRegionsResult {
|
|
10
|
+
regions: RegionInfo[];
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export function getRegions(opts?: pulumi.InvokeOptions): Promise<GetRegionsResult> {
|
|
14
|
+
return pulumi.runtime.invoke("rackspace-spot:index:getRegions", {}, opts);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export function getRegionsOutput(opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetRegionsResult> {
|
|
18
|
+
return pulumi.runtime.invokeOutput("rackspace-spot:index:getRegions", {}, opts);
|
|
19
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
|
|
3
|
+
export interface GetServerClassesArgs {
|
|
4
|
+
region?: string;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export interface ServerClassInfo {
|
|
8
|
+
name: string;
|
|
9
|
+
region: string;
|
|
10
|
+
category: string;
|
|
11
|
+
cpu: string;
|
|
12
|
+
memory: string;
|
|
13
|
+
flavorType: string;
|
|
14
|
+
available: number;
|
|
15
|
+
capacity: number;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface GetServerClassesResult {
|
|
19
|
+
serverClasses: ServerClassInfo[];
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export function getServerClasses(args?: GetServerClassesArgs, opts?: pulumi.InvokeOptions): Promise<GetServerClassesResult> {
|
|
23
|
+
return pulumi.runtime.invoke("rackspace-spot:index:getServerClasses", args ?? {}, opts);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export function getServerClassesOutput(args?: GetServerClassesArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetServerClassesResult> {
|
|
27
|
+
return pulumi.runtime.invokeOutput("rackspace-spot:index:getServerClasses", args ?? {}, opts);
|
|
28
|
+
}
|
package/index.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { Provider, ProviderArgs } from "./provider";
|
|
2
|
+
export { CloudSpace, CloudSpaceArgs } from "./cloudspace";
|
|
3
|
+
export { SpotNodePool, SpotNodePoolArgs } from "./spotnodepool";
|
|
4
|
+
export { OnDemandNodePool, OnDemandNodePoolArgs } from "./ondemandnodepool";
|
|
5
|
+
export { getCloudspace, getCloudspaceOutput, GetCloudspaceArgs, GetCloudspaceResult } from "./getCloudspace";
|
|
6
|
+
export { getKubeconfig, getKubeconfigOutput, GetKubeconfigArgs, GetKubeconfigResult } from "./getKubeconfig";
|
|
7
|
+
export { getRegions, getRegionsOutput, GetRegionsResult, RegionInfo } from "./getRegions";
|
|
8
|
+
export { getServerClasses, getServerClassesOutput, GetServerClassesArgs, GetServerClassesResult, ServerClassInfo } from "./getServerClasses";
|
|
9
|
+
export * from "./types/input";
|
|
10
|
+
export * from "./types/output";
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
import { Taint } from "./types/input";
|
|
3
|
+
import { TaintOutput } from "./types/output";
|
|
4
|
+
|
|
5
|
+
export interface OnDemandNodePoolArgs {
|
|
6
|
+
cloudspaceName: pulumi.Input<string>;
|
|
7
|
+
serverClass: pulumi.Input<string>;
|
|
8
|
+
desiredCount: pulumi.Input<number>;
|
|
9
|
+
labels?: pulumi.Input<{ [key: string]: pulumi.Input<string> }>;
|
|
10
|
+
annotations?: pulumi.Input<{ [key: string]: pulumi.Input<string> }>;
|
|
11
|
+
taints?: pulumi.Input<pulumi.Input<Taint>[]>;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export class OnDemandNodePool extends pulumi.CustomResource {
|
|
15
|
+
public readonly cloudspaceName!: pulumi.Output<string>;
|
|
16
|
+
public readonly serverClass!: pulumi.Output<string>;
|
|
17
|
+
public readonly desiredCount!: pulumi.Output<number>;
|
|
18
|
+
public readonly labels!: pulumi.Output<{ [key: string]: string } | undefined>;
|
|
19
|
+
public readonly annotations!: pulumi.Output<{ [key: string]: string } | undefined>;
|
|
20
|
+
public readonly taints!: pulumi.Output<TaintOutput[] | undefined>;
|
|
21
|
+
public readonly nodepoolId!: pulumi.Output<string>;
|
|
22
|
+
public readonly reservedCount!: pulumi.Output<number>;
|
|
23
|
+
public readonly reservedStatus!: pulumi.Output<string>;
|
|
24
|
+
|
|
25
|
+
constructor(name: string, args: OnDemandNodePoolArgs, opts?: pulumi.CustomResourceOptions) {
|
|
26
|
+
super("rackspace-spot:index:OnDemandNodePool", name, {
|
|
27
|
+
...args,
|
|
28
|
+
nodepoolId: undefined,
|
|
29
|
+
reservedCount: undefined,
|
|
30
|
+
reservedStatus: undefined,
|
|
31
|
+
}, opts);
|
|
32
|
+
}
|
|
33
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@reyemtech/pulumi-rackspace-spot",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Pulumi provider for Rackspace Spot — cloudspaces, node pools, kubeconfig",
|
|
5
|
+
"main": "bin/index.js",
|
|
6
|
+
"types": "bin/index.d.ts",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"build": "tsc"
|
|
9
|
+
},
|
|
10
|
+
"pulumi": {
|
|
11
|
+
"resource": true,
|
|
12
|
+
"name": "rackspace-spot"
|
|
13
|
+
},
|
|
14
|
+
"keywords": ["pulumi", "rackspace", "spot", "kubernetes", "cloud"],
|
|
15
|
+
"author": "ReyemTech <mario@reyem.tech>",
|
|
16
|
+
"license": "MIT",
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "https://github.com/reyemtech/pulumi-rackspace-spot.git"
|
|
20
|
+
},
|
|
21
|
+
"peerDependencies": {
|
|
22
|
+
"@pulumi/pulumi": "^3.0.0"
|
|
23
|
+
},
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"@pulumi/pulumi": "^3.142.0"
|
|
26
|
+
}
|
|
27
|
+
}
|
package/provider.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
|
|
3
|
+
export interface ProviderArgs {
|
|
4
|
+
token?: pulumi.Input<string>;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export class Provider extends pulumi.ProviderResource {
|
|
8
|
+
constructor(name: string, args?: ProviderArgs, opts?: pulumi.ResourceOptions) {
|
|
9
|
+
super("rackspace-spot", name, { token: args?.token }, opts);
|
|
10
|
+
}
|
|
11
|
+
}
|
package/spotnodepool.ts
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
import { Autoscaling, Taint } from "./types/input";
|
|
3
|
+
import { AutoscalingOutput, TaintOutput } from "./types/output";
|
|
4
|
+
|
|
5
|
+
export interface SpotNodePoolArgs {
|
|
6
|
+
cloudspaceName: pulumi.Input<string>;
|
|
7
|
+
serverClass: pulumi.Input<string>;
|
|
8
|
+
bidPrice: pulumi.Input<number>;
|
|
9
|
+
desiredCount?: pulumi.Input<number>;
|
|
10
|
+
autoscaling?: pulumi.Input<Autoscaling>;
|
|
11
|
+
labels?: pulumi.Input<{ [key: string]: pulumi.Input<string> }>;
|
|
12
|
+
annotations?: pulumi.Input<{ [key: string]: pulumi.Input<string> }>;
|
|
13
|
+
taints?: pulumi.Input<pulumi.Input<Taint>[]>;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export class SpotNodePool extends pulumi.CustomResource {
|
|
17
|
+
public readonly cloudspaceName!: pulumi.Output<string>;
|
|
18
|
+
public readonly serverClass!: pulumi.Output<string>;
|
|
19
|
+
public readonly bidPrice!: pulumi.Output<number>;
|
|
20
|
+
public readonly desiredCount!: pulumi.Output<number | undefined>;
|
|
21
|
+
public readonly autoscaling!: pulumi.Output<AutoscalingOutput | undefined>;
|
|
22
|
+
public readonly labels!: pulumi.Output<{ [key: string]: string } | undefined>;
|
|
23
|
+
public readonly annotations!: pulumi.Output<{ [key: string]: string } | undefined>;
|
|
24
|
+
public readonly taints!: pulumi.Output<TaintOutput[] | undefined>;
|
|
25
|
+
public readonly nodepoolId!: pulumi.Output<string>;
|
|
26
|
+
public readonly wonCount!: pulumi.Output<number>;
|
|
27
|
+
public readonly bidStatus!: pulumi.Output<string>;
|
|
28
|
+
|
|
29
|
+
constructor(name: string, args: SpotNodePoolArgs, opts?: pulumi.CustomResourceOptions) {
|
|
30
|
+
super("rackspace-spot:index:SpotNodePool", name, {
|
|
31
|
+
...args,
|
|
32
|
+
nodepoolId: undefined,
|
|
33
|
+
wonCount: undefined,
|
|
34
|
+
bidStatus: undefined,
|
|
35
|
+
}, opts);
|
|
36
|
+
}
|
|
37
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"strict": true,
|
|
4
|
+
"outDir": "bin",
|
|
5
|
+
"target": "es2022",
|
|
6
|
+
"module": "commonjs",
|
|
7
|
+
"moduleResolution": "node",
|
|
8
|
+
"declaration": true,
|
|
9
|
+
"sourceMap": true,
|
|
10
|
+
"esModuleInterop": true,
|
|
11
|
+
"skipLibCheck": true,
|
|
12
|
+
"forceConsistentCasingInFileNames": true
|
|
13
|
+
},
|
|
14
|
+
"include": ["*.ts", "types/*.ts"]
|
|
15
|
+
}
|
package/types/input.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
|
|
3
|
+
export interface Autoscaling {
|
|
4
|
+
minNodes: pulumi.Input<number>;
|
|
5
|
+
maxNodes: pulumi.Input<number>;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export interface Taint {
|
|
9
|
+
key: pulumi.Input<string>;
|
|
10
|
+
value?: pulumi.Input<string>;
|
|
11
|
+
effect: pulumi.Input<string>;
|
|
12
|
+
}
|