cdk8s-plus
Advanced tools
Comparing version 0.30.0-pre.5413b3bf6ca13f9839407d561b622e64a4de62e4 to 0.30.0-pre.5e34850f4b3cc9c80fda4f0df245afcaa29b1daf
@@ -50,2 +50,5 @@ import { Construct } from 'constructs'; | ||
static fromConfigMapName(name: string): IConfigMap; | ||
/** | ||
* @see base.Resource.apiObject | ||
*/ | ||
protected readonly apiObject: cdk8s.ApiObject; | ||
@@ -52,0 +55,0 @@ private readonly _binaryData; |
@@ -17,3 +17,3 @@ "use strict"; | ||
var _a, _b; | ||
super(scope, id, props); | ||
super(scope, id, { metadata: props.metadata }); | ||
this._binaryData = {}; | ||
@@ -132,2 +132,2 @@ this._data = {}; | ||
exports.ConfigMap = ConfigMap; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlnLW1hcC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9jb25maWctbWFwLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUNBLHFDQUFxQztBQUNyQyxpQ0FBNEQ7QUFDNUQsK0JBQStCO0FBQy9CLHlCQUF5QjtBQUN6Qiw2QkFBNkI7QUFDN0IsdUNBQXVDO0FBQ3ZDLG1DQUEyQztBQXVDM0M7O0dBRUc7QUFDSCxNQUFhLFNBQVUsU0FBUSxlQUFRO0lBY3JDLFlBQW1CLEtBQWdCLEVBQUUsRUFBVSxFQUFFLFFBQXdCLEVBQUc7O1FBQzFFLEtBQUssQ0FBQyxLQUFLLEVBQUUsRUFBRSxFQUFFLEtBQUssQ0FBQyxDQUFDO1FBSlQsZ0JBQVcsR0FBOEIsRUFBRyxDQUFDO1FBQzdDLFVBQUssR0FBOEIsRUFBRyxDQUFDO1FBS3RELElBQUksQ0FBQyxTQUFTLEdBQUcsSUFBSSxHQUFHLENBQUMsU0FBUyxDQUFDLElBQUksRUFBRSxXQUFXLEVBQUU7WUFDcEQsUUFBUSxFQUFF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CaW5hcnlEYXRhKCkge1xuICAgIHJldHVybiB1bmRlZmluZWRJZkVtcHR5KHRoaXMuX2JpbmFyeURhdGEpO1xuICB9XG59XG5cbi8qKlxuICogT3B0aW9ucyBmb3IgYGNvbmZpZ21hcC5hZGREaXJlY3RvcnkoKWBcbiAqL1xuZXhwb3J0IGludGVyZmFjZSBBZGREaXJlY3RvcnlPcHRpb25zIHtcbiAgLyoqXG4gICAqIEEgcHJlZml4IHRvIGFkZCB0byBhbGwga2V5cyBpbiB0aGUgY29uZmlnIG1hcC5cbiAgICogQGRlZmF1bHQgXCJcIlxuICAgKi9cbiAgcmVhZG9ubHkga2V5UHJlZml4Pzogc3RyaW5nO1xuXG4gIC8qKlxuICAgKiBHbG9iIHBhdHRlcm5zIHRvIGV4Y2x1ZGUgd2hlbiBhZGRpbmcgZmlsZXMuXG4gICAqIEBkZWZhdWx0IC0gaW5jbHVkZSBhbGwgZmlsZXNcbiAgICovXG4gIHJlYWRvbmx5IGV4Y2x1ZGU/OiBzdHJpbmdbXTtcbn1cbiJdfQ== |
@@ -5,14 +5,17 @@ import { Construct } from 'constructs'; | ||
import * as cdk8s from 'cdk8s'; | ||
import { PodSpecDefinition, PodSpec } from './pod'; | ||
import { ApiObjectMetadata, ApiObjectMetadataDefinition } from 'cdk8s'; | ||
import { ApiObjectMetadataDefinition } from 'cdk8s'; | ||
import { RestartPolicy, IPodTemplate, PodTemplateProps } from './pod'; | ||
import { Volume } from './volume'; | ||
import { Container } from './container'; | ||
import { IServiceAccount } from './service-account'; | ||
/** | ||
* Properties for initialization of `Deployment`. | ||
*/ | ||
export interface DeploymentProps extends ResourceProps { | ||
export interface DeploymentProps extends ResourceProps, PodTemplateProps { | ||
/** | ||
* The spec of the deployment. Use `deployment.spec` to apply post instatiation mutations. | ||
* Number of desired pods. | ||
* | ||
* @default - An empty spec will be created. | ||
* @default 1 | ||
*/ | ||
readonly spec?: DeploymentSpec; | ||
readonly replicas?: number; | ||
/** | ||
@@ -22,3 +25,3 @@ * Automatically allocates a pod selector for this deployment. | ||
* If this is set to `false` you must define your selector through | ||
* `podSepcTemplate.addLabel()` and `selectByLabel()`. | ||
* `deployment.podMetadata.addLabel()` and `deployment.selectByLabel()`. | ||
* | ||
@@ -68,65 +71,26 @@ * @default true | ||
**/ | ||
export declare class Deployment extends Resource { | ||
export declare class Deployment extends Resource implements IPodTemplate { | ||
/** | ||
* Number of desired pods. | ||
*/ | ||
readonly replicas: number; | ||
/** | ||
* @see base.Resource.apiObject | ||
*/ | ||
protected readonly apiObject: cdk8s.ApiObject; | ||
/** | ||
* Provides access to the underlying spec. | ||
* | ||
* You can use this field to apply post instantiation mutations | ||
* to the spec. | ||
*/ | ||
readonly spec: DeploymentSpecDefinition; | ||
private readonly _podTemplate; | ||
private readonly _labelSelector; | ||
constructor(scope: Construct, id: string, props?: DeploymentProps); | ||
get podMetadata(): ApiObjectMetadataDefinition; | ||
/** | ||
* Expose a deployment via a service. | ||
* The labels this deployment will match against in order to select pods. | ||
* | ||
* This is equivalent to running `kubectl expose deployment <deployment-name>`. | ||
* | ||
* @param port The port number the service will bind to. | ||
* @param options Options. | ||
* Returns a a copy. Use `selectByLabel()` to add labels. | ||
*/ | ||
expose(port: number, options?: ExposeOptions): Service; | ||
} | ||
/** | ||
* Properties for initialization of `DeploymentSpec`. | ||
*/ | ||
export interface DeploymentSpec { | ||
get labelSelector(): Record<string, string>; | ||
get containers(): Container[]; | ||
get volumes(): Volume[]; | ||
get restartPolicy(): RestartPolicy | undefined; | ||
get serviceAccount(): IServiceAccount | undefined; | ||
/** | ||
* Number of desired pods. | ||
* @default 1 | ||
*/ | ||
readonly replicas?: number; | ||
/** | ||
* Template for pod specs. | ||
*/ | ||
readonly podSpecTemplate?: PodSpec; | ||
/** | ||
* Template for pod metadata. | ||
*/ | ||
readonly podMetadataTemplate?: ApiObjectMetadata; | ||
} | ||
/** | ||
* DeploymentSpec is the specification of the desired behavior of the Deployment. | ||
*/ | ||
export declare class DeploymentSpecDefinition { | ||
/** | ||
* Number of desired pods. | ||
*/ | ||
readonly replicas?: number; | ||
/** | ||
* Provides access to the underlying pod template spec. | ||
* | ||
* You can use this field to apply post instatiation mutations | ||
* to the spec. | ||
*/ | ||
readonly podSpecTemplate: PodSpecDefinition; | ||
/** | ||
* Template for pod metadata. | ||
*/ | ||
readonly podMetadataTemplate: ApiObjectMetadataDefinition; | ||
private readonly _labelSelector; | ||
constructor(props?: DeploymentSpec); | ||
/** | ||
* Configure a label selector to this deployment. | ||
@@ -140,7 +104,12 @@ * Pods that have the label will be selected by deployments configured with this spec. | ||
/** | ||
* The labels this deployment will match against in order to select pods. | ||
* Expose a deployment via a service. | ||
* | ||
* Returns a a copy. Use `selectByLabel()` to add labels. | ||
* This is equivalent to running `kubectl expose deployment <deployment-name>`. | ||
* | ||
* @param port The port number the service will bind to. | ||
* @param options Options. | ||
*/ | ||
get labelSelector(): Record<string, string>; | ||
expose(port: number, options?: ExposeOptions): Service; | ||
addContainer(container: Container): void; | ||
addVolume(volume: Volume): void; | ||
} |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.DeploymentSpecDefinition = exports.Deployment = void 0; | ||
exports.Deployment = void 0; | ||
const k8s = require("./imports/k8s"); | ||
@@ -9,4 +9,4 @@ const constructs_1 = require("constructs"); | ||
const cdk8s = require("cdk8s"); | ||
const cdk8s_1 = require("cdk8s"); | ||
const pod_1 = require("./pod"); | ||
const cdk8s_1 = require("cdk8s"); | ||
/** | ||
@@ -42,47 +42,41 @@ * | ||
constructor(scope, id, props = {}) { | ||
var _a; | ||
super(scope, id, props); | ||
this.spec = new DeploymentSpecDefinition(props.spec); | ||
this.apiObject = new k8s.Deployment(this, 'Pod', { | ||
var _a, _b; | ||
super(scope, id, { metadata: props.metadata }); | ||
this.apiObject = new k8s.Deployment(this, 'Deployment', { | ||
metadata: props.metadata, | ||
spec: cdk8s.Lazy.any({ produce: () => this.spec._toKube() }), | ||
spec: cdk8s.Lazy.any({ produce: () => this._toKube() }), | ||
}); | ||
if ((_a = props.defaultSelector) !== null && _a !== void 0 ? _a : true) { | ||
this.replicas = (_a = props.replicas) !== null && _a !== void 0 ? _a : 1; | ||
this._podTemplate = new pod_1.PodTemplate(props); | ||
this._labelSelector = {}; | ||
if ((_b = props.defaultSelector) !== null && _b !== void 0 ? _b : true) { | ||
const selector = 'cdk8s.deployment'; | ||
const matcher = cdk8s_1.Names.toLabelValue(constructs_1.Node.of(this).path); | ||
this.spec.podMetadataTemplate.addLabel(selector, matcher); | ||
this.spec.selectByLabel(selector, matcher); | ||
this.podMetadata.addLabel(selector, matcher); | ||
this.selectByLabel(selector, matcher); | ||
} | ||
} | ||
get podMetadata() { | ||
return this._podTemplate.podMetadata; | ||
} | ||
/** | ||
* Expose a deployment via a service. | ||
* The labels this deployment will match against in order to select pods. | ||
* | ||
* This is equivalent to running `kubectl expose deployment <deployment-name>`. | ||
* | ||
* @param port The port number the service will bind to. | ||
* @param options Options. | ||
* Returns a a copy. Use `selectByLabel()` to add labels. | ||
*/ | ||
expose(port, options = {}) { | ||
var _a; | ||
const service = new service_1.Service(this, 'Service', { | ||
spec: { | ||
type: (_a = options.serviceType) !== null && _a !== void 0 ? _a : service_1.ServiceType.CLUSTER_IP, | ||
}, | ||
}); | ||
service.addDeployment(this, port); | ||
return service; | ||
get labelSelector() { | ||
return { ...this._labelSelector }; | ||
} | ||
} | ||
exports.Deployment = Deployment; | ||
/** | ||
* DeploymentSpec is the specification of the desired behavior of the Deployment. | ||
*/ | ||
class DeploymentSpecDefinition { | ||
constructor(props = {}) { | ||
var _a; | ||
this.replicas = (_a = props.replicas) !== null && _a !== void 0 ? _a : 1; | ||
this.podSpecTemplate = new pod_1.PodSpecDefinition(props.podSpecTemplate); | ||
this.podMetadataTemplate = new cdk8s_1.ApiObjectMetadataDefinition(props.podMetadataTemplate); | ||
this._labelSelector = {}; | ||
get containers() { | ||
return this._podTemplate.containers; | ||
} | ||
get volumes() { | ||
return this._podTemplate.volumes; | ||
} | ||
get restartPolicy() { | ||
return this._podTemplate.restartPolicy; | ||
} | ||
get serviceAccount() { | ||
return this._podTemplate.serviceAccount; | ||
} | ||
/** | ||
@@ -99,9 +93,23 @@ * Configure a label selector to this deployment. | ||
/** | ||
* The labels this deployment will match against in order to select pods. | ||
* Expose a deployment via a service. | ||
* | ||
* Returns a a copy. Use `selectByLabel()` to add labels. | ||
* This is equivalent to running `kubectl expose deployment <deployment-name>`. | ||
* | ||
* @param port The port number the service will bind to. | ||
* @param options Options. | ||
*/ | ||
get labelSelector() { | ||
return { ...this._labelSelector }; | ||
expose(port, options = {}) { | ||
var _a; | ||
const service = new service_1.Service(this, 'Service', { | ||
type: (_a = options.serviceType) !== null && _a !== void 0 ? _a : service_1.ServiceType.CLUSTER_IP, | ||
}); | ||
service.addDeployment(this, port); | ||
return service; | ||
} | ||
addContainer(container) { | ||
return this._podTemplate.addContainer(container); | ||
} | ||
addVolume(volume) { | ||
return this._podTemplate.addVolume(volume); | ||
} | ||
/** | ||
@@ -113,6 +121,3 @@ * @internal | ||
replicas: this.replicas, | ||
template: { | ||
metadata: this.podMetadataTemplate.toJson(), | ||
spec: this.podSpecTemplate._toKube(), | ||
}, | ||
template: this._podTemplate._toPodTemplateSpec(), | ||
selector: { | ||
@@ -124,3 +129,3 @@ matchLabels: this._labelSelector, | ||
} | ||
exports.DeploymentSpecDefinition = DeploymentSpecDefinition; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVwbG95bWVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9kZXBsb3ltZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLHFDQUFxQztBQUNyQywyQ0FBNkM7QUFDN0MsdUNBQWlEO0FBQ2pELGlDQUFpRDtBQUNqRCwrQkFBK0I7QUFDL0IsK0JBQW1EO0FBQ25ELGlDQUE4RTtBQW9DOUU7Ozs7Ozs7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sXG4gICAgfSk7XG5cbiAgICBzZXJ2aWNlLmFkZERlcGxveW1lbnQodGhpcywgcG9ydCk7XG4gICAgcmV0dXJuIHNlcnZpY2U7XG4gIH1cblxuICBwdWJsaWMgYWRkQ29udGFpbmVyKGNvbnRhaW5lcjogQ29udGFpbmVyKTogdm9pZCB7XG4gICAgcmV0dXJuIHRoaXMuX3BvZFRlbXBsYXRlLmFkZENvbnRhaW5lcihjb250YWluZXIpO1xuICB9XG5cbiAgcHVibGljIGFkZFZvbHVtZSh2b2x1bWU6IFZvbHVtZSk6IHZvaWQge1xuICAgIHJldHVybiB0aGlzLl9wb2RUZW1wbGF0ZS5hZGRWb2x1bWUodm9sdW1lKTtcbiAgfVxuXG5cbiAgLyoqXG4gICAqIEBpbnRlcm5hbFxuICAgKi9cbiAgcHVibGljIF90b0t1YmUoKTogazhzLkRlcGxveW1lbnRTcGVjIHtcbiAgICByZXR1cm4ge1xuICAgICAgcmVwbGljYXM6IHRoaXMucmVwbGljYXMsXG4gICAgICB0ZW1wbGF0ZTogdGhpcy5fcG9kVGVtcGxhdGUuX3RvUG9kVGVtcGxhdGVTcGVjKCksXG4gICAgICBzZWxlY3Rvcjoge1xuICAgICAgICBtYXRjaExhYmVsczogdGhpcy5fbGFiZWxTZWxlY3RvcixcbiAgICAgIH0sXG4gICAgfTtcbiAgfVxuXG59Il19 |
@@ -26,2 +26,2 @@ "use strict"; | ||
__exportStar(require("./ingress"), exports); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7O0FBQUEseUNBQXVCO0FBQ3ZCLCtDQUE2QjtBQUM3Qiw4Q0FBNEI7QUFDNUIsK0NBQTZCO0FBQzdCLDZDQUEyQjtBQUMzQix3Q0FBc0I7QUFDdE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JvbSAnLi9iYXNlJztcbmV4cG9ydCAqIGZyb20gJy4vY29uZmlnLW1hcCc7XG5leHBvcnQgKiBmcm9tICcuL2NvbnRhaW5lcic7XG5leHBvcnQgKiBmcm9tICcuL2RlcGxveW1lbnQnO1xuZXhwb3J0ICogZnJvbSAnLi9kdXJhdGlvbic7XG5leHBvcnQgKiBmcm9tICcuL2pvYic7XG5leHBvcnQgKiBmcm9tICcuL3BvZCc7XG5leHBvcnQgKiBmcm9tICcuL3NlY3JldCc7XG5leHBvcnQgKiBmcm9tICcuL3NlcnZpY2UtYWNjb3VudCc7XG5leHBvcnQgKiBmcm9tICcuL3NlcnZpY2UnO1xuZXhwb3J0ICogZnJvbSAnLi92b2x1bWUnO1xuZXhwb3J0ICogZnJvbSAnLi9zaXplJztcbmV4cG9ydCAqIGZyb20gJy4vaW5ncmVzcyc7XG4iXX0= |
@@ -35,2 +35,5 @@ import { Construct } from 'constructs'; | ||
export declare class Ingress extends Resource { | ||
/** | ||
* @see base.Resource.apiObject | ||
*/ | ||
protected readonly apiObject: ApiObject; | ||
@@ -37,0 +40,0 @@ private readonly _rulesPerHost; |
@@ -16,3 +16,3 @@ "use strict"; | ||
var _a; | ||
super(scope, id, props); | ||
super(scope, id, { metadata: props.metadata }); | ||
this._rulesPerHost = {}; | ||
@@ -135,12 +135,12 @@ this.apiObject = new k8s.Ingress(this, 'Ingress', { | ||
static fromService(service, options = {}) { | ||
if (service.spec.ports.length === 0) { | ||
if (service.ports.length === 0) { | ||
throw new Error('service does not expose any ports'); | ||
} | ||
let servicePort; | ||
if (service.spec.ports.length === 1) { | ||
servicePort = service.spec.ports[0].port; | ||
if (service.ports.length === 1) { | ||
servicePort = service.ports[0].port; | ||
} | ||
else { | ||
if (options.port !== undefined) { | ||
const found = service.spec.ports.find(p => p.port === options.port); | ||
const found = service.ports.find(p => p.port === options.port); | ||
if (found) { | ||
@@ -150,7 +150,7 @@ servicePort = found.port; | ||
else { | ||
throw new Error(`service exposes ports ${service.spec.ports.map(p => p.port).join(',')} but backend is defined to use port ${options.port}`); | ||
throw new Error(`service exposes ports ${service.ports.map(p => p.port).join(',')} but backend is defined to use port ${options.port}`); | ||
} | ||
} | ||
else { | ||
throw new Error(`unable to determine service port since service exposes multiple ports: ${service.spec.ports.map(x => x.port).join(',')}`); | ||
throw new Error(`unable to determine service port since service exposes multiple ports: ${service.ports.map(x => x.port).join(',')}`); | ||
} | ||
@@ -178,2 +178,2 @@ } | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5ncmVzcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmdyZXNzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLHFDQUFxQztBQUVyQyxpQ0FBaUQ7QUFDakQsaUNBQXdDO0FBNEJ4Qzs7Ozs7R0FLRztBQUNILE1BQWEsT0FBUSxTQUFRLGVBQVE7SUFNbkMsWUFBWSxLQUFnQixFQUFFLEVBQVUsRUFBRSxRQUFzQixFQUFFOztRQUNoRSxLQUFLLENBQUMsS0FBSyxFQUFFLEVBQUUsRUFBRSxLQUFLLENBQUMsQ0FBQztRQUpULGtCQUFhLEdBQThDLEVBQUUsQ0FBQztRQU03RSxJQUFJLENBQUMsU0FBUyxHQUFHLElBQUksR0FBRyxDQUFDLE9BQU8sQ0FBQyxJQUFJLEVBQUUsU0FBUyxFQUFFO1lBQ2hELFFBQVEsRUFBRSxLQUFLLENBQUMsUUFBUTtZQUN4QixJQUFJLEVBQUU7Z0JBQ0osT0FBTyxFQUFFLFlBQUksQ0FBQyxHQUFHLENBQUMsRUFBRSxPQUFPLEVBQUUsR0FBRyxFQUFFLHdCQUFDLElBQUksQ0FBQyxlQUFlLDBDQUFFLE9BQU8sS0FBRSxFQUFFLENBQUM7Z0JBQ3JFLEtBQUssRUFBRSxZQUFJLENBQUMsR0FBRyxDQUFDLEVBQUUsT0FBTyxF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BhbiBleHRlbmRlZCBQT1NJWCByZWdleCBhcyBkZWZpbmVkIGJ5IElFRUUgU3RkIDEwMDMuMSwgKGkuZSB0aGlzXG4gICAqIGZvbGxvd3MgdGhlIGVncmVwL3VuaXggc3ludGF4LCBub3QgdGhlIHBlcmwgc3ludGF4KSBtYXRjaGVkIGFnYWluc3QgdGhlXG4gICAqIHBhdGggb2YgYW4gaW5jb21pbmcgcmVxdWVzdC4gQ3VycmVudGx5IGl0IGNhbiBjb250YWluIGNoYXJhY3RlcnMgZGlzYWxsb3dlZFxuICAgKiBmcm9tIHRoZSBjb252ZW50aW9uYWwgXCJwYXRoXCIgcGFydCBvZiBhIFVSTCBhcyBkZWZpbmVkIGJ5IFJGQyAzOTg2LiBQYXRoc1xuICAgKiBtdXN0IGJlZ2luIHdpdGggYSAnLycuXG4gICAqXG4gICAqIEBkZWZhdWx0IC0gSWYgdW5zcGVjaWZpZWQsIHRoZSBwYXRoIGRlZmF1bHRzIHRvIGEgY2F0Y2ggYWxsIHNlbmRpbmcgdHJhZmZpY1xuICAgKiB0byB0aGUgYmFja2VuZC5cbiAgICovXG4gIHJlYWRvbmx5IHBhdGg/OiBzdHJpbmc7XG59XG5cbmZ1bmN0aW9uIHNvcnRCeVBhdGgobGhzOiBrOHMuSHR0cEluZ3Jlc3NQYXRoLCByaHM6IGs4cy5IdHRwSW5ncmVzc1BhdGgpIHtcbiAgY29uc3QgcDEgPSBsaHMucGF0aCA/PyAnJztcbiAgY29uc3QgcDIgPSByaHMucGF0aCA/PyAnJztcbiAgcmV0dXJuIHAxLmxvY2FsZUNvbXBhcmUocDIpO1xufVxuIl19 |
import { Resource, ResourceProps } from './base'; | ||
import { ApiObject, ApiObjectMetadata, ApiObjectMetadataDefinition } from 'cdk8s'; | ||
import { ApiObject, ApiObjectMetadataDefinition } from 'cdk8s'; | ||
import { Construct } from 'constructs'; | ||
import { PodSpec, PodSpecDefinition } from './pod'; | ||
import { RestartPolicy, PodTemplateProps, IPodTemplate } from './pod'; | ||
import { Duration } from './duration'; | ||
import { Container } from './container'; | ||
import { IServiceAccount } from './service-account'; | ||
import { Volume } from './volume'; | ||
/** | ||
* Properties for initialization of `Job`. | ||
*/ | ||
export interface JobProps extends ResourceProps { | ||
export interface JobProps extends ResourceProps, PodTemplateProps { | ||
/** | ||
* The spec of the job. Use `job.spec` to apply post instantiation mutations. | ||
* | ||
* @default - An empty spec will be created. | ||
*/ | ||
readonly spec?: JobSpec; | ||
} | ||
/** | ||
* A Job creates one or more Pods and ensures that a specified number of them successfully terminate. As pods successfully complete, | ||
* the Job tracks the successful completions. When a specified number of successful completions is reached, the task (ie, Job) is complete. | ||
* Deleting a Job will clean up the Pods it created. A simple case is to create one Job object in order to reliably run one Pod to completion. | ||
* The Job object will start a new Pod if the first Pod fails or is deleted (for example due to a node hardware failure or a node reboot). | ||
* You can also use a Job to run multiple Pods in parallel. | ||
*/ | ||
export declare class Job extends Resource { | ||
protected readonly apiObject: ApiObject; | ||
readonly spec: JobSpecDefinition; | ||
constructor(scope: Construct, id: string, props?: JobProps); | ||
} | ||
/** | ||
* Properties for initialization of `JobSpec`. | ||
*/ | ||
export interface JobSpec { | ||
/** | ||
* The spec of pods created by this job. | ||
*/ | ||
readonly podSpecTemplate?: PodSpec; | ||
/** | ||
* The metadata of pods created by this job. | ||
*/ | ||
readonly podMetadataTemplate?: ApiObjectMetadata; | ||
/** | ||
* Limits the lifetime of a Job that has finished execution (either Complete | ||
@@ -54,16 +26,27 @@ * or Failed). If this field is set, after the Job finishes, it is eligible to | ||
} | ||
export declare class JobSpecDefinition { | ||
/** | ||
* A Job creates one or more Pods and ensures that a specified number of them successfully terminate. As pods successfully complete, | ||
* the Job tracks the successful completions. When a specified number of successful completions is reached, the task (ie, Job) is complete. | ||
* Deleting a Job will clean up the Pods it created. A simple case is to create one Job object in order to reliably run one Pod to completion. | ||
* The Job object will start a new Pod if the first Pod fails or is deleted (for example due to a node hardware failure or a node reboot). | ||
* You can also use a Job to run multiple Pods in parallel. | ||
*/ | ||
export declare class Job extends Resource implements IPodTemplate { | ||
/** | ||
* The spec for pods created by this job. | ||
* TTL before the job is deleted after it is finished. | ||
*/ | ||
readonly podSpecTemplate: PodSpecDefinition; | ||
readonly ttlAfterFinished?: Duration; | ||
/** | ||
* The metadata for pods created by this job. | ||
* @see base.Resource.apiObject | ||
*/ | ||
readonly podMetadataTemplate: ApiObjectMetadataDefinition; | ||
/** | ||
* TTL before the job is deleted after it is finished. | ||
*/ | ||
readonly ttlAfterFinished?: Duration; | ||
constructor(props?: JobSpec); | ||
protected readonly apiObject: ApiObject; | ||
private readonly _podTemplate; | ||
constructor(scope: Construct, id: string, props?: JobProps); | ||
get podMetadata(): ApiObjectMetadataDefinition; | ||
get containers(): Container[]; | ||
get volumes(): Volume[]; | ||
get restartPolicy(): RestartPolicy | undefined; | ||
get serviceAccount(): IServiceAccount | undefined; | ||
addContainer(container: Container): void; | ||
addVolume(volume: Volume): void; | ||
} |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.JobSpecDefinition = exports.Job = void 0; | ||
exports.Job = void 0; | ||
const base_1 = require("./base"); | ||
const cdk8s_1 = require("cdk8s"); | ||
const cdk8s = require("cdk8s"); | ||
@@ -18,21 +17,35 @@ const k8s = require("./imports/k8s"); | ||
constructor(scope, id, props = {}) { | ||
super(scope, id, props); | ||
this.spec = new JobSpecDefinition(props.spec); | ||
var _a; | ||
super(scope, id, { metadata: props.metadata }); | ||
this.apiObject = new k8s.Job(this, 'Default', { | ||
metadata: props.metadata, | ||
spec: cdk8s.Lazy.any({ produce: () => this.spec._toKube() }), | ||
spec: cdk8s.Lazy.any({ produce: () => this._toKube() }), | ||
}); | ||
} | ||
} | ||
exports.Job = Job; | ||
class JobSpecDefinition { | ||
constructor(props = {}) { | ||
var _a, _b; | ||
this.podSpecTemplate = new pod_1.PodSpecDefinition({ | ||
restartPolicy: (_b = (_a = props.podSpecTemplate) === null || _a === void 0 ? void 0 : _a.restartPolicy) !== null && _b !== void 0 ? _b : pod_1.RestartPolicy.NEVER, | ||
...props.podSpecTemplate, | ||
this._podTemplate = new pod_1.PodTemplate({ | ||
...props, | ||
restartPolicy: (_a = props.restartPolicy) !== null && _a !== void 0 ? _a : pod_1.RestartPolicy.NEVER, | ||
}); | ||
this.podMetadataTemplate = new cdk8s_1.ApiObjectMetadataDefinition(props.podMetadataTemplate); | ||
this.ttlAfterFinished = props.ttlAfterFinished; | ||
} | ||
get podMetadata() { | ||
return this._podTemplate.podMetadata; | ||
} | ||
get containers() { | ||
return this._podTemplate.containers; | ||
} | ||
get volumes() { | ||
return this._podTemplate.volumes; | ||
} | ||
get restartPolicy() { | ||
return this._podTemplate.restartPolicy; | ||
} | ||
get serviceAccount() { | ||
return this._podTemplate.serviceAccount; | ||
} | ||
addContainer(container) { | ||
return this._podTemplate.addContainer(container); | ||
} | ||
addVolume(volume) { | ||
return this._podTemplate.addVolume(volume); | ||
} | ||
/** | ||
@@ -43,6 +56,3 @@ * @internal | ||
return { | ||
template: { | ||
metadata: this.podMetadataTemplate.toJson(), | ||
spec: this.podSpecTemplate._toKube(), | ||
}, | ||
template: this._podTemplate._toPodTemplateSpec(), | ||
ttlSecondsAfterFinished: this.ttlAfterFinished ? this.ttlAfterFinished.toSeconds() : undefined, | ||
@@ -52,3 +62,3 @@ }; | ||
} | ||
exports.JobSpecDefinition = JobSpecDefinition; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiam9iLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2pvYi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxpQ0FBaUQ7QUFDakQsaUNBQWtGO0FBRWxGLCtCQUErQjtBQUUvQixxQ0FBcUM7QUFDckMsK0JBQWtFO0FBaUJsRTs7Ozs7O0dBTUc7QUFDSCxNQUFhLEdBQUksU0FBUSxlQUFRO0lBSy9CLFlBQVksS0FBZ0I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dW50O1xuICB9XG5cbiAgcHVibGljIGFkZENvbnRhaW5lcihjb250YWluZXI6IENvbnRhaW5lcik6IHZvaWQge1xuICAgIHJldHVybiB0aGlzLl9wb2RUZW1wbGF0ZS5hZGRDb250YWluZXIoY29udGFpbmVyKTtcbiAgfVxuXG4gIHB1YmxpYyBhZGRWb2x1bWUodm9sdW1lOiBWb2x1bWUpOiB2b2lkIHtcbiAgICByZXR1cm4gdGhpcy5fcG9kVGVtcGxhdGUuYWRkVm9sdW1lKHZvbHVtZSk7XG4gIH1cblxuICAvKipcbiAgICogQGludGVybmFsXG4gICAqL1xuICBwdWJsaWMgX3RvS3ViZSgpOiBrOHMuSm9iU3BlYyB7XG4gICAgcmV0dXJuIHtcbiAgICAgIHRlbXBsYXRlOiB0aGlzLl9wb2RUZW1wbGF0ZS5fdG9Qb2RUZW1wbGF0ZVNwZWMoKSxcbiAgICAgIHR0bFNlY29uZHNBZnRlckZpbmlzaGVkOiB0aGlzLnR0bEFmdGVyRmluaXNoZWQgPyB0aGlzLnR0bEFmdGVyRmluaXNoZWQudG9TZWNvbmRzKCkgOiB1bmRlZmluZWQsXG4gICAgfTtcbiAgfVxuXG59XG4iXX0= |
154
lib/pod.d.ts
@@ -7,33 +7,95 @@ import { Construct } from 'constructs'; | ||
import { Volume } from './volume'; | ||
import { ApiObjectMetadata, ApiObjectMetadataDefinition } from 'cdk8s'; | ||
/** | ||
* Properties for initialization of `Pod`. | ||
* Represents a resource that can be configured with a kuberenets pod spec. (e.g `Deployment`, `Job`, `Pod`, ...). | ||
* | ||
* Use the `PodSpec` class as an implementation helper. | ||
*/ | ||
export interface PodProps extends ResourceProps { | ||
export interface IPodSpec { | ||
/** | ||
* The spec of the pod. Use `pod.spec` to apply post instantiation mutations. | ||
* The containers belonging to the pod. | ||
* | ||
* @default - An empty spec will be created. | ||
* Use `addContainer` to add containers. | ||
*/ | ||
readonly spec?: PodSpec; | ||
readonly containers: Container[]; | ||
/** | ||
* The volumes associated with this pod. | ||
* | ||
* Use `addVolume` to add volumes. | ||
*/ | ||
readonly volumes: Volume[]; | ||
/** | ||
* Restart policy for all containers within the pod. | ||
*/ | ||
readonly restartPolicy?: RestartPolicy; | ||
/** | ||
* The service account used to run this pod. | ||
*/ | ||
readonly serviceAccount?: IServiceAccount; | ||
/** | ||
* Add a container to the pod. | ||
* | ||
* @param container The container. | ||
*/ | ||
addContainer(container: Container): void; | ||
/** | ||
* Add a volume to the pod. | ||
* | ||
* @param volume The volume. | ||
*/ | ||
addVolume(volume: Volume): void; | ||
} | ||
/** | ||
* Pod is a collection of containers that can run on a host. This resource is | ||
* created by clients and scheduled onto hosts. | ||
* Represents a resource that can be configured with a kuberenets pod template. (e.g `Deployment`, `Job`, ...). | ||
* | ||
* Use the `PodTemplate` class as an implementation helper. | ||
*/ | ||
export declare class Pod extends Resource { | ||
protected readonly apiObject: cdk8s.ApiObject; | ||
export interface IPodTemplate extends IPodSpec { | ||
/** | ||
* Provides access to the underlying spec. | ||
* | ||
* You can use this field to apply post instantiation mutations | ||
* to the spec. | ||
* Provides read/write access to the underlying pod metadata of the resource. | ||
*/ | ||
readonly spec: PodSpecDefinition; | ||
constructor(scope: Construct, id: string, props?: PodProps); | ||
readonly podMetadata: ApiObjectMetadataDefinition; | ||
} | ||
/** | ||
* Properties for initialization of `PodSpec`. | ||
* Provides read/write capabilities ontop of a `PodSpecProps`. | ||
*/ | ||
export interface PodSpec { | ||
export declare class PodSpec implements IPodSpec { | ||
readonly restartPolicy?: RestartPolicy; | ||
readonly serviceAccount?: IServiceAccount; | ||
private readonly _containers; | ||
private readonly _volumes; | ||
constructor(props?: PodSpecProps); | ||
get containers(): Container[]; | ||
get volumes(): Volume[]; | ||
addContainer(container: Container): void; | ||
addVolume(volume: Volume): void; | ||
} | ||
/** | ||
* Properties of a `PodTemplate`. | ||
* | ||
* Adds metadata information on top of the spec. | ||
*/ | ||
export interface PodTemplateProps extends PodSpecProps { | ||
/** | ||
* The pod metadata. | ||
*/ | ||
readonly podMetadata?: ApiObjectMetadata; | ||
} | ||
/** | ||
* Provides read/write capabilities ontop of a `PodTemplateProps`. | ||
*/ | ||
export declare class PodTemplate extends PodSpec implements IPodTemplate { | ||
readonly podMetadata: ApiObjectMetadataDefinition; | ||
constructor(props?: PodTemplateProps); | ||
} | ||
/** | ||
* Properties for initialization of `Pod`. | ||
*/ | ||
export interface PodProps extends ResourceProps, PodSpecProps { | ||
} | ||
/** | ||
* Properties of a `PodSpec`. | ||
*/ | ||
export interface PodSpecProps { | ||
/** | ||
* List of containers belonging to the pod. Containers cannot currently be | ||
@@ -82,2 +144,20 @@ * added or removed. There must be at least one container in a Pod. | ||
/** | ||
* Pod is a collection of containers that can run on a host. This resource is | ||
* created by clients and scheduled onto hosts. | ||
*/ | ||
export declare class Pod extends Resource implements IPodSpec { | ||
/** | ||
* @see base.Resource.apiObject | ||
*/ | ||
protected readonly apiObject: cdk8s.ApiObject; | ||
private readonly _spec; | ||
constructor(scope: Construct, id: string, props?: PodProps); | ||
get containers(): Container[]; | ||
get volumes(): Volume[]; | ||
get restartPolicy(): RestartPolicy | undefined; | ||
get serviceAccount(): IServiceAccount | undefined; | ||
addContainer(container: Container): void; | ||
addVolume(volume: Volume): void; | ||
} | ||
/** | ||
* Restart policy for all containers within the pod. | ||
@@ -99,41 +179,1 @@ */ | ||
} | ||
/** | ||
* A description of a pod. | ||
*/ | ||
export declare class PodSpecDefinition { | ||
/** | ||
* Restart policy for all containers within the pod. | ||
*/ | ||
readonly restartPolicy?: RestartPolicy; | ||
/** | ||
* The service account used to run this pod. | ||
*/ | ||
readonly serviceAccount?: IServiceAccount; | ||
private readonly _containers; | ||
private readonly _volumes; | ||
constructor(props?: PodSpec); | ||
/** | ||
* List of containers belonging to the pod. | ||
* | ||
* @returns a copy - do not modify | ||
*/ | ||
get containers(): Container[]; | ||
/** | ||
* Adds a container to this pod. | ||
* | ||
* @param container The container to add | ||
*/ | ||
addContainer(container: Container): void; | ||
/** | ||
* Adds a volume to this pod. | ||
* | ||
* @param volume The volume to add | ||
*/ | ||
addVolume(volume: Volume): void; | ||
/** | ||
* List of volumes that can be mounted by containers belonging to the pod. | ||
* | ||
* Returns a copy. To add volumes, use `addVolume()`. | ||
*/ | ||
get volumes(): Volume[]; | ||
} |
146
lib/pod.js
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.PodSpecDefinition = exports.RestartPolicy = exports.Pod = void 0; | ||
exports.RestartPolicy = exports.Pod = exports.PodTemplate = exports.PodSpec = void 0; | ||
const k8s = require("./imports/k8s"); | ||
const base_1 = require("./base"); | ||
const cdk8s = require("cdk8s"); | ||
const cdk8s_1 = require("cdk8s"); | ||
/** | ||
* Pod is a collection of containers that can run on a host. This resource is | ||
* created by clients and scheduled onto hosts. | ||
* Provides read/write capabilities ontop of a `PodSpecProps`. | ||
*/ | ||
class Pod extends base_1.Resource { | ||
constructor(scope, id, props = {}) { | ||
super(scope, id, props); | ||
this.spec = new PodSpecDefinition(props.spec); | ||
this.apiObject = new k8s.Pod(this, 'Pod', { | ||
metadata: props.metadata, | ||
spec: cdk8s.Lazy.any({ produce: () => this.spec._toKube() }), | ||
}); | ||
} | ||
} | ||
exports.Pod = Pod; | ||
/** | ||
* Restart policy for all containers within the pod. | ||
*/ | ||
var RestartPolicy; | ||
(function (RestartPolicy) { | ||
/** | ||
* Always restart the pod after it exits. | ||
*/ | ||
RestartPolicy["ALWAYS"] = "Always"; | ||
/** | ||
* Only restart if the pod exits with a non-zero exit code. | ||
*/ | ||
RestartPolicy["ON_FAILURE"] = "OnFailure"; | ||
/** | ||
* Never restart the pod. | ||
*/ | ||
RestartPolicy["NEVER"] = "Never"; | ||
})(RestartPolicy = exports.RestartPolicy || (exports.RestartPolicy = {})); | ||
/** | ||
* A description of a pod. | ||
*/ | ||
class PodSpecDefinition { | ||
class PodSpec { | ||
constructor(props = {}) { | ||
var _a, _b; | ||
this.restartPolicy = props.restartPolicy; | ||
this.serviceAccount = props.serviceAccount; | ||
this._containers = (_a = props.containers) !== null && _a !== void 0 ? _a : []; | ||
this._volumes = (_b = props.volumes) !== null && _b !== void 0 ? _b : []; | ||
this.restartPolicy = props.restartPolicy; | ||
this.serviceAccount = props.serviceAccount; | ||
} | ||
/** | ||
* List of containers belonging to the pod. | ||
* | ||
* @returns a copy - do not modify | ||
*/ | ||
get containers() { | ||
return [...this._containers]; | ||
} | ||
/** | ||
* Adds a container to this pod. | ||
* | ||
* @param container The container to add | ||
*/ | ||
get volumes() { | ||
return [...this._volumes]; | ||
} | ||
addContainer(container) { | ||
this._containers.push(container); | ||
} | ||
/** | ||
* Adds a volume to this pod. | ||
* | ||
* @param volume The volume to add | ||
*/ | ||
addVolume(volume) { | ||
@@ -76,13 +32,5 @@ this._volumes.push(volume); | ||
/** | ||
* List of volumes that can be mounted by containers belonging to the pod. | ||
* | ||
* Returns a copy. To add volumes, use `addVolume()`. | ||
*/ | ||
get volumes() { | ||
return [...this._volumes]; | ||
} | ||
/** | ||
* @internal | ||
*/ | ||
_toKube() { | ||
_toPodSpec() { | ||
var _a; | ||
@@ -113,3 +61,73 @@ if (this.containers.length === 0) { | ||
} | ||
exports.PodSpecDefinition = PodSpecDefinition; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicG9kLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL3BvZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxxQ0FBcUM7QUFFckMsaUNBQWlEO0FBQ2pELCtCQUErQjtBQW1CL0I7OztHQUdHO0FBQ0gsTUFBYSxHQUFJLFNBQVEsZUFBUTtJQVcvQixZQUFZLEtBQWdCLEVBQUUsRUFBVSxFQUFFLFFBQWtCLEVBQUU7UUFDNUQsS0FBSyxDQUFDLEtBQUssRUFBRSxFQUFFLEVBQUUsS0FBSyxDQUFDLENBQUM7UUFFeEIsSUFBSSxDQUFDLElBQUksR0FBRyxJQUFJLGlCQ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MpIHtcbiAgICAgIHZvbHVtZXMucHVzaCh2b2x1bWUuX3RvS3ViZSgpKTtcbiAgICB9XG5cbiAgICByZXR1cm4ge1xuICAgICAgcmVzdGFydFBvbGljeTogdGhpcy5yZXN0YXJ0UG9saWN5LFxuICAgICAgc2VydmljZUFjY291bnROYW1lOiB0aGlzLnNlcnZpY2VBY2NvdW50Py5uYW1lLFxuICAgICAgY29udGFpbmVyczogY29udGFpbmVycyxcbiAgICAgIHZvbHVtZXM6IHZvbHVtZXMsXG4gICAgfTtcblxuICB9XG59XG4iXX0= | ||
exports.PodSpec = PodSpec; | ||
/** | ||
* Provides read/write capabilities ontop of a `PodTemplateProps`. | ||
*/ | ||
class PodTemplate extends PodSpec { | ||
constructor(props = {}) { | ||
super(props); | ||
this.podMetadata = new cdk8s_1.ApiObjectMetadataDefinition(props.podMetadata); | ||
} | ||
/** | ||
* @internal | ||
*/ | ||
_toPodTemplateSpec() { | ||
return { | ||
metadata: this.podMetadata.toJson(), | ||
spec: this._toPodSpec(), | ||
}; | ||
} | ||
} | ||
exports.PodTemplate = PodTemplate; | ||
/** | ||
* Pod is a collection of containers that can run on a host. This resource is | ||
* created by clients and scheduled onto hosts. | ||
*/ | ||
class Pod extends base_1.Resource { | ||
constructor(scope, id, props = {}) { | ||
super(scope, id, { metadata: props.metadata }); | ||
this.apiObject = new k8s.Pod(this, 'Pod', { | ||
metadata: props.metadata, | ||
spec: cdk8s.Lazy.any({ produce: () => this._spec._toPodSpec() }), | ||
}); | ||
this._spec = new PodSpec(props); | ||
} | ||
get containers() { | ||
return this._spec.containers; | ||
} | ||
get volumes() { | ||
return this._spec.volumes; | ||
} | ||
get restartPolicy() { | ||
return this._spec.restartPolicy; | ||
} | ||
get serviceAccount() { | ||
return this._spec.serviceAccount; | ||
} | ||
addContainer(container) { | ||
return this._spec.addContainer(container); | ||
} | ||
addVolume(volume) { | ||
return this._spec.addVolume(volume); | ||
} | ||
} | ||
exports.Pod = Pod; | ||
/** | ||
* Restart policy for all containers within the pod. | ||
*/ | ||
var RestartPolicy; | ||
(function (RestartPolicy) { | ||
/** | ||
* Always restart the pod after it exits. | ||
*/ | ||
RestartPolicy["ALWAYS"] = "Always"; | ||
/** | ||
* Only restart if the pod exits with a non-zero exit code. | ||
*/ | ||
RestartPolicy["ON_FAILURE"] = "OnFailure"; | ||
/** | ||
* Never restart the pod. | ||
*/ | ||
RestartPolicy["NEVER"] = "Never"; | ||
})(RestartPolicy = exports.RestartPolicy || (exports.RestartPolicy = {})); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicG9kLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL3BvZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxxQ0FBcUM7QUFFckMsaUNBQWlEO0FBQ2pELCtCQUErQjtBQUkvQixpQ0FBdUU7QUE4RHZFOztHQUVHO0FBQ0gsTUFBYSxPQUFPO0lBUWxCLFlBQVksUUFBc0IsRUFBRTs7UUFDbEMsSUFBSSxDQUFDLGFBQWEsR0FBRyxLQUFLLENBQUMsYUFBYSxDQUFDO1FBQ3pDLElBQUksQ0FBQyxjQUFjLEdBQUcsS0FBSyxDQUFDLGNBQWMsQ0FBQztRQUUzQyxJQUFJLENBQUMsV0FBVyxTQUFHLEtBQUssQ0FBQyxVQUFVLG1DQUFJLEVBQUUsQ0FBQztRQUMxQyxJQUFJLENBQUMsUUFBUSxTQUFHLEtBQUssQ0FBQyxPQUFPLG1DQUFJLEVBQUUsQ0FBQztJQUN0QyxDQUFDO0lBRUQsSUFBVyxVQUFVO1FBQ25CLE9BQU8sQ0FBRSxHQUFHLElBQUksQ0FBQyxXQUFXLENBQUUsQ0FBQztJQUNqQyxDQUFDO0lBRUQsSUFBVyxPQUFPO1FBQ2hCLE9BQU8sQ0FBRSxHQUFHLElBQUksQ0FBQyxRQUFRLENBQUUsQ0FBQztJQUM5QixDQUFDO0lB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sdW1lKTtcbiAgfVxuXG59XG5cbi8qKlxuICogUmVzdGFydCBwb2xpY3kgZm9yIGFsbCBjb250YWluZXJzIHdpdGhpbiB0aGUgcG9kLlxuICovXG5leHBvcnQgZW51bSBSZXN0YXJ0UG9saWN5IHtcbiAgLyoqXG4gICAqIEFsd2F5cyByZXN0YXJ0IHRoZSBwb2QgYWZ0ZXIgaXQgZXhpdHMuXG4gICAqL1xuICBBTFdBWVMgPSAnQWx3YXlzJyxcblxuICAvKipcbiAgICogT25seSByZXN0YXJ0IGlmIHRoZSBwb2QgZXhpdHMgd2l0aCBhIG5vbi16ZXJvIGV4aXQgY29kZS5cbiAgICovXG4gIE9OX0ZBSUxVUkUgPSAnT25GYWlsdXJlJyxcblxuICAvKipcbiAgICogTmV2ZXIgcmVzdGFydCB0aGUgcG9kLlxuICAgKi9cbiAgTkVWRVIgPSAnTmV2ZXInXG59XG5cbiJdfQ== |
@@ -31,2 +31,5 @@ import { IResource, Resource, ResourceProps } from './base'; | ||
static fromSecretName(name: string): ISecret; | ||
/** | ||
* @see base.Resource.apiObject | ||
*/ | ||
protected readonly apiObject: cdk8s.ApiObject; | ||
@@ -33,0 +36,0 @@ private readonly stringData; |
@@ -17,3 +17,3 @@ "use strict"; | ||
var _a; | ||
super(scope, id, props); | ||
super(scope, id, { metadata: props.metadata }); | ||
this.stringData = (_a = props.stringData) !== null && _a !== void 0 ? _a : {}; | ||
@@ -49,2 +49,2 @@ this.apiObject = new k8s.Secret(this, 'Secret', { | ||
exports.Secret = Secret; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VjcmV0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL3NlY3JldC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxpQ0FBNEQ7QUFHNUQscUNBQXFDO0FBZ0JyQzs7Ozs7OztHQU9HO0FBQ0gsTUFBYSxNQUFPLFN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3RyaW5nKTogc3RyaW5nIHwgdW5kZWZpbmVkIHtcbiAgICByZXR1cm4gdGhpcy5zdHJpbmdEYXRhW2tleV07XG4gIH1cbn1cbiJdfQ== |
@@ -42,2 +42,5 @@ import { Resource, ResourceProps, IResource } from './base'; | ||
static fromServiceAccountName(name: string): IServiceAccount; | ||
/** | ||
* @see base.Resource.apiObject | ||
*/ | ||
protected readonly apiObject: ApiObject; | ||
@@ -44,0 +47,0 @@ private readonly _secrets; |
@@ -23,3 +23,3 @@ "use strict"; | ||
var _a; | ||
super(scope, id, props); | ||
super(scope, id, { metadata: props.metadata }); | ||
this._secrets = (_a = props.secrets) !== null && _a !== void 0 ? _a : []; | ||
@@ -56,2 +56,2 @@ this.apiObject = new k8s.ServiceAccount(this, 'Resource', { | ||
exports.ServiceAccount = ServiceAccount; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VydmljZS1hY2NvdW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL3NlcnZpY2UtYWNjb3VudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxpQ0FBNEQ7QUFFNUQscUNBQXFDO0FBR3JDLCtCQUErQjtBQUMvQixtQ0FBMkM7QUEyQjNDOzs7Ozs7Ozs7OztHQVdHO0FBQ0gsTUFBYSxjQUFlLFNBQVEsZUFBUTtJQWMxQyxZQUFZLEtBQWdCLEVBQUUsRUFBVSxFQUFFLFFBQTZCLEVBQUc7O1FBQ3hFLEtBQUssQ0FBQyxLQUFLLEVBQUUsRUFBRSxFQUFFLEtBQUssQ0FBQyxDQUFDO1FBRXhCLElBQUksQ0FBQyxRQUFRLFNBQUcsS0FBSyxDQUFDLE9BQU8sbUNBQUksRUFBRSxDQUFDO1FBRXBDLElBQUksQ0FBQyxTQUFTLEdBQUcsSUFBSSxHQUFHLENBQUMsY0FBYyxDQUFDLElBQUksRUFBRSxVQUFVLEVBQU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V0YWRhdGEsXG4gICAgICBzZWNyZXRzOiBjZGs4cy5MYXp5LmFueSh7IHByb2R1Y2U6ICgpID0+IHVuZGVmaW5lZElmRW1wdHkodGhpcy5fc2VjcmV0cy5tYXAocyA9PiAoeyBuYW1lOiBzLm5hbWUgfSkpKSB9KSxcbiAgICB9KTtcbiAgfVxuXG4gIC8qKlxuICAgKiBBbGxvdyBhIHNlY3JldCB0byBiZSBhY2Nlc3NlZCBieSBwb2RzIHVzaW5nIHRoaXMgc2VydmljZSBhY2NvdW50LlxuICAgKiBAcGFyYW0gc2VjcmV0IFRoZSBzZWNyZXRcbiAgICovXG4gIHB1YmxpYyBhZGRTZWNyZXQoc2VjcmV0OiBJU2VjcmV0KSB7XG4gICAgdGhpcy5fc2VjcmV0cy5wdXNoKHNlY3JldCk7XG4gIH1cblxuICAvKipcbiAgICogTGlzdCBvZiBzZWNyZXRzIGFsbG93ZWQgdG8gYmUgdXNlZCBieSBwb2RzIHJ1bm5pbmcgdXNpbmcgdGhpcyBzZXJ2aWNlXG4gICAqIGFjY291bnQuXG4gICAqXG4gICAqIFJldHVybnMgYSBjb3B5LiBUbyBhZGQgYSBzZWNyZXQsIHVzZSBgYWRkU2VjcmV0KClgLlxuICAgKi9cbiAgcHVibGljIGdldCBzZWNyZXRzKCkge1xuICAgIHJldHVybiBbIC4uLnRoaXMuX3NlY3JldHMgXTtcbiAgfVxufSJdfQ== |
@@ -10,7 +10,39 @@ import { Construct } from 'constructs'; | ||
/** | ||
* The spec of the service. Use `service.spec` to apply post instantiation mutations. | ||
* The IP address of the service and is usually assigned randomly by the | ||
* master. If an address is specified manually and is not in use by others, it | ||
* will be allocated to the service; otherwise, creation of the service will | ||
* fail. This field can not be changed through updates. Valid values are | ||
* "None", empty string (""), or a valid IP address. "None" can be specified | ||
* for headless services when proxying is not required. Only applies to types | ||
* ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName. | ||
* | ||
* @default - An empty spec will be created. | ||
* @see https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies | ||
* @default - Automatically assigned. | ||
* | ||
*/ | ||
readonly spec?: ServiceSpec; | ||
readonly clusterIP?: string; | ||
/** | ||
* A list of IP addresses for which nodes in the cluster will also accept | ||
* traffic for this service. These IPs are not managed by Kubernetes. The user | ||
* is responsible for ensuring that traffic arrives at a node with this IP. A | ||
* common example is external load-balancers that are not part of the | ||
* Kubernetes system. | ||
* | ||
* @default - No external IPs. | ||
*/ | ||
readonly externalIPs?: string[]; | ||
/** | ||
* Determines how the Service is exposed. | ||
* | ||
* More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types | ||
* | ||
* @default ServiceType.ClusterIP | ||
*/ | ||
readonly type?: ServiceType; | ||
/** | ||
* The port exposed by this service. | ||
* | ||
* More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies | ||
*/ | ||
readonly ports?: ServicePort[]; | ||
} | ||
@@ -66,11 +98,29 @@ /** | ||
export declare class Service extends Resource { | ||
/** | ||
* The IP address of the service and is usually assigned randomly by the | ||
* master. | ||
*/ | ||
readonly clusterIP?: string; | ||
/** | ||
* Determines how the Service is exposed. | ||
*/ | ||
readonly type: ServiceType; | ||
/** | ||
* @see base.Resource.apiObject | ||
*/ | ||
protected readonly apiObject: cdk8s.ApiObject; | ||
private readonly _externalIPs; | ||
private readonly _selector; | ||
private readonly _ports; | ||
constructor(scope: Construct, id: string, props?: ServiceProps); | ||
/** | ||
* Provides access to the underlying spec. | ||
* Returns the labels which are used to select pods for this service. | ||
*/ | ||
get selector(): Record<string, string>; | ||
/** | ||
* Ports for this service. | ||
* | ||
* You can use this field to apply post instantiation mutations | ||
* to the spec. | ||
* Use `serve()` to expose additional service ports. | ||
*/ | ||
readonly spec: ServiceSpecDefinition; | ||
constructor(scope: Construct, id: string, props?: ServiceProps); | ||
get ports(): ServicePort[]; | ||
/** | ||
@@ -87,2 +137,16 @@ * Associate a deployment to this service. | ||
addDeployment(deployment: Deployment, port: number): void; | ||
/** | ||
* Services defined using this spec will select pods according the provided label. | ||
* | ||
* @param label The label key. | ||
* @param value The label value. | ||
*/ | ||
addSelector(label: string, value: string): void; | ||
/** | ||
* Configure a port the service will bind to. | ||
* This method can be called multiple times. | ||
* | ||
* @param port The port definition. | ||
*/ | ||
serve(port: number, options?: ServicePortOptions): void; | ||
} | ||
@@ -137,90 +201,1 @@ export declare enum Protocol { | ||
} | ||
/** | ||
* Properties for initialization of `ServiceSpec`. | ||
*/ | ||
export interface ServiceSpec { | ||
/** | ||
* The IP address of the service and is usually assigned randomly by the | ||
* master. If an address is specified manually and is not in use by others, it | ||
* will be allocated to the service; otherwise, creation of the service will | ||
* fail. This field can not be changed through updates. Valid values are | ||
* "None", empty string (""), or a valid IP address. "None" can be specified | ||
* for headless services when proxying is not required. Only applies to types | ||
* ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName. | ||
* | ||
* @see https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies | ||
* @default - Automatically assigned. | ||
* | ||
*/ | ||
readonly clusterIP?: string; | ||
/** | ||
* A list of IP addresses for which nodes in the cluster will also accept | ||
* traffic for this service. These IPs are not managed by Kubernetes. The user | ||
* is responsible for ensuring that traffic arrives at a node with this IP. A | ||
* common example is external load-balancers that are not part of the | ||
* Kubernetes system. | ||
* | ||
* @default - No external IPs. | ||
*/ | ||
readonly externalIPs?: string[]; | ||
/** | ||
* Determines how the Service is exposed. | ||
* | ||
* More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types | ||
* | ||
* @default ServiceType.ClusterIP | ||
*/ | ||
readonly type?: ServiceType; | ||
/** | ||
* The port exposed by this service. | ||
* | ||
* More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies | ||
*/ | ||
readonly ports?: ServicePort[]; | ||
} | ||
/** | ||
* A description of a service. | ||
*/ | ||
export declare class ServiceSpecDefinition { | ||
/** | ||
* The IP address of the service and is usually assigned randomly by the | ||
* master. | ||
*/ | ||
readonly clusterIP?: string; | ||
/** | ||
* A list of IP addresses for which nodes in the cluster will also accept | ||
* traffic for this service. | ||
*/ | ||
private readonly externalIPs; | ||
/** | ||
* Determines how the Service is exposed. | ||
*/ | ||
readonly type: ServiceType; | ||
private readonly _selector; | ||
private readonly _ports; | ||
constructor(props?: ServiceSpec); | ||
/** | ||
* Returns the labels which are used to select pods for this service. | ||
*/ | ||
get selector(): Record<string, string>; | ||
/** | ||
* Services defined using this spec will select pods according the provided label. | ||
* | ||
* @param label The label key. | ||
* @param value The label value. | ||
*/ | ||
addSelector(label: string, value: string): void; | ||
/** | ||
* Configure a port the service will bind to. | ||
* This method can be called multiple times. | ||
* | ||
* @param port The port definition. | ||
*/ | ||
serve(port: number, options?: ServicePortOptions): void; | ||
/** | ||
* Ports for this service. | ||
* | ||
* Use `serve()` to expose additional service ports. | ||
*/ | ||
get ports(): ServicePort[]; | ||
} |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ServiceSpecDefinition = exports.Protocol = exports.Service = exports.ServiceType = void 0; | ||
exports.Protocol = exports.Service = exports.ServiceType = void 0; | ||
const k8s = require("./imports/k8s"); | ||
@@ -58,10 +58,32 @@ const base_1 = require("./base"); | ||
constructor(scope, id, props = {}) { | ||
super(scope, id, props); | ||
this.spec = new ServiceSpecDefinition(props.spec); | ||
var _a, _b, _c; | ||
super(scope, id, { metadata: props.metadata }); | ||
this.apiObject = new k8s.Service(this, 'Pod', { | ||
metadata: props.metadata, | ||
spec: cdk8s.Lazy.any({ produce: () => this.spec._toKube() }), | ||
spec: cdk8s.Lazy.any({ produce: () => this._toKube() }), | ||
}); | ||
this.clusterIP = props.clusterIP; | ||
this.type = (_a = props.type) !== null && _a !== void 0 ? _a : ServiceType.CLUSTER_IP; | ||
this._externalIPs = (_b = props.externalIPs) !== null && _b !== void 0 ? _b : []; | ||
this._ports = []; | ||
this._selector = {}; | ||
for (const portAndOptions of (_c = props.ports) !== null && _c !== void 0 ? _c : []) { | ||
this.serve(portAndOptions.port, portAndOptions); | ||
} | ||
} | ||
/** | ||
* Returns the labels which are used to select pods for this service. | ||
*/ | ||
get selector() { | ||
return this._selector; | ||
} | ||
/** | ||
* Ports for this service. | ||
* | ||
* Use `serve()` to expose additional service ports. | ||
*/ | ||
get ports() { | ||
return [...this._ports]; | ||
} | ||
/** | ||
* Associate a deployment to this service. | ||
@@ -77,17 +99,17 @@ * | ||
addDeployment(deployment, port) { | ||
const containers = deployment.spec.podSpecTemplate.containers; | ||
const containers = deployment.containers; | ||
if (containers.length === 0) { | ||
throw new Error('Cannot expose a deployment without containers'); | ||
} | ||
const selector = Object.entries(deployment.spec.labelSelector); | ||
const selector = Object.entries(deployment.labelSelector); | ||
if (selector.length === 0) { | ||
throw new Error('deployment does not have a label selector'); | ||
} | ||
if (Object.keys(this.spec.selector).length > 0) { | ||
if (Object.keys(this.selector).length > 0) { | ||
throw new Error('a selector is already defined for this service. cannot add a deployment'); | ||
} | ||
for (const [k, v] of selector) { | ||
this.spec.addSelector(k, v); | ||
this.addSelector(k, v); | ||
} | ||
this.spec.serve(port, { | ||
this.serve(port, { | ||
// just a PoC, we assume the first container is the main one. | ||
@@ -98,32 +120,3 @@ // TODO: figure out what the correct thing to do here. | ||
} | ||
} | ||
exports.Service = Service; | ||
var Protocol; | ||
(function (Protocol) { | ||
Protocol["TCP"] = "TCP"; | ||
Protocol["UDP"] = "UDP"; | ||
Protocol["SCTP"] = "SCTP"; | ||
})(Protocol = exports.Protocol || (exports.Protocol = {})); | ||
/** | ||
* A description of a service. | ||
*/ | ||
class ServiceSpecDefinition { | ||
constructor(props = {}) { | ||
var _a, _b, _c; | ||
this.clusterIP = props.clusterIP; | ||
this.externalIPs = (_a = props.externalIPs) !== null && _a !== void 0 ? _a : []; | ||
this.type = (_b = props.type) !== null && _b !== void 0 ? _b : ServiceType.CLUSTER_IP; | ||
this._ports = []; | ||
this._selector = {}; | ||
for (const portAndOptions of (_c = props.ports) !== null && _c !== void 0 ? _c : []) { | ||
this.serve(portAndOptions.port, portAndOptions); | ||
} | ||
} | ||
/** | ||
* Returns the labels which are used to select pods for this service. | ||
*/ | ||
get selector() { | ||
return this._selector; | ||
} | ||
/** | ||
* Services defined using this spec will select pods according the provided label. | ||
@@ -147,10 +140,2 @@ * | ||
/** | ||
* Ports for this service. | ||
* | ||
* Use `serve()` to expose additional service ports. | ||
*/ | ||
get ports() { | ||
return [...this._ports]; | ||
} | ||
/** | ||
* @internal | ||
@@ -172,3 +157,3 @@ */ | ||
clusterIP: this.clusterIP, | ||
externalIPs: this.externalIPs, | ||
externalIPs: this._externalIPs, | ||
type: this.type, | ||
@@ -180,3 +165,9 @@ selector: this._selector, | ||
} | ||
exports.ServiceSpecDefinition = ServiceSpecDefinition; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLHFDQUFxQztBQUVyQyxpQ0FBaUQ7QUFDakQsK0JBQStCO0FBaUIvQjs7Ozs7R0FLRztBQUNILElBQVksV0ErQlg7QUEvQkQsV0FBWSxXQUFXO0lBRXJCOzs7O09BSUc7SUFDSCx1Q0FBd0IsQ0FBQTtJQUV4Qjs7Ozs7T0FLRztJQUNILHFDQUFzQixDQUFBO0lBRXRCOzs7O09BSUc7SUFDSCw2Q0FBOEIsQ0FBQTtJQUU5Qjs7Ozs7T0FLRztJQUNILDZDQUE4QixDQUFBO0FBQ2hDLENBQUMsRUEvQlcsV0FBVyxHQUFYLG1CQUFXLEtBQVgsbUJBQVcsUUErQnRCO0FBRUQ7Ozs7Ozs7Ozs7Ozs7R0FhRztBQUNILE1BQWEsT0FBUSxTQUFRLGVBQVE7SUFXbkMsWUFBWSxLQUFnQixFQUFFLEVBQVUsRUFBRSxRQUFzQ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bmd0aCA9PT0gMCkge1xuICAgICAgdGhyb3cgbmV3IEVycm9yKCdBIHNlcnZpY2UgbXVzdCBiZSBjb25maWd1cmVkIHdpdGggYSBwb3J0Jyk7XG4gICAgfVxuXG4gICAgY29uc3QgcG9ydHM6IGs4cy5TZXJ2aWNlUG9ydFtdID0gW107XG5cbiAgICBmb3IgKGNvbnN0IHBvcnQgb2YgdGhpcy5fcG9ydHMpIHtcbiAgICAgIHBvcnRzLnB1c2goe1xuICAgICAgICBwb3J0OiBwb3J0LnBvcnQsXG4gICAgICAgIHRhcmdldFBvcnQ6IHBvcnQudGFyZ2V0UG9ydCxcbiAgICAgICAgbm9kZVBvcnQ6IHBvcnQubm9kZVBvcnQsXG4gICAgICB9KTtcbiAgICB9XG5cbiAgICByZXR1cm4ge1xuICAgICAgY2x1c3RlcklQOiB0aGlzLmNsdXN0ZXJJUCxcbiAgICAgIGV4dGVybmFsSVBzOiB0aGlzLmV4dGVybmFsSVBzLFxuICAgICAgdHlwZTogdGhpcy50eXBlLFxuICAgICAgc2VsZWN0b3I6IHRoaXMuX3NlbGVjdG9yLFxuICAgICAgcG9ydHM6IHBvcnRzLFxuICAgIH07XG4gIH1cbn0iXX0= | ||
exports.Service = Service; | ||
var Protocol; | ||
(function (Protocol) { | ||
Protocol["TCP"] = "TCP"; | ||
Protocol["UDP"] = "UDP"; | ||
Protocol["SCTP"] = "SCTP"; | ||
})(Protocol = exports.Protocol || (exports.Protocol = {})); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLHFDQUFxQztBQUVyQyxpQ0FBaUQ7QUFDakQsK0JBQStCO0FBb0QvQjs7Ozs7R0FLRztBQUNILElBQVksV0ErQlg7QUEvQkQsV0FBWSxXQUFXO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hpcyBTZXJ2aWNlXG4gICAqIHJlcXVpcmVzIG9uZS5cbiAgICovXG4gIHJlYWRvbmx5IG5vZGVQb3J0PzogbnVtYmVyO1xuXG4gIC8qKlxuICAgKiBUaGUgSVAgcHJvdG9jb2wgZm9yIHRoaXMgcG9ydC4gU3VwcG9ydHMgXCJUQ1BcIiwgXCJVRFBcIiwgYW5kIFwiU0NUUFwiLiBEZWZhdWx0IGlzIFRDUC5cbiAgICpcbiAgICogQGRlZmF1bHQgUHJvdG9jb2wuVENQXG4gICAqL1xuICByZWFkb25seSBwcm90b2NvbD86IFByb3RvY29sO1xuXG4gIC8qKlxuICAgKiBUaGUgcG9ydCBudW1iZXIgdGhlIHNlcnZpY2Ugd2lsbCByZWRpcmVjdCB0by5cbiAgICpcbiAgICogQGRlZmF1bHQgLSBUaGUgdmFsdWUgb2YgYHBvcnRgIHdpbGwgYmUgdXNlZC5cbiAgICovXG4gIHJlYWRvbmx5IHRhcmdldFBvcnQ/OiBudW1iZXI7XG59XG5cbi8qKlxuICogRGVmaW5pdGlvbiBvZiBhIHNlcnZpY2UgcG9ydC5cbiAqL1xuZXhwb3J0IGludGVyZmFjZSBTZXJ2aWNlUG9ydCBleHRlbmRzIFNlcnZpY2VQb3J0T3B0aW9ucyB7XG5cbiAgLyoqXG4gICAqIFRoZSBwb3J0IG51bWJlciB0aGUgc2VydmljZSB3aWxsIGJpbmQgdG8uXG4gICAqL1xuICByZWFkb25seSBwb3J0OiBudW1iZXI7XG59XG4iXX0= |
@@ -34,3 +34,3 @@ { | ||
"devDependencies": { | ||
"cdk8s": "0.30.0-pre.5413b3bf6ca13f9839407d561b622e64a4de62e4", | ||
"cdk8s": "0.30.0-pre.5e34850f4b3cc9c80fda4f0df245afcaa29b1daf", | ||
"constructs": "^3.0.4", | ||
@@ -58,3 +58,3 @@ "@types/minimatch": "^3.0.3", | ||
"peerDependencies": { | ||
"cdk8s": "0.30.0-pre.5413b3bf6ca13f9839407d561b622e64a4de62e4", | ||
"cdk8s": "0.30.0-pre.5e34850f4b3cc9c80fda4f0df245afcaa29b1daf", | ||
"constructs": "^3.0.4" | ||
@@ -78,3 +78,3 @@ }, | ||
"license": "Apache-2.0", | ||
"version": "0.30.0-pre.5413b3bf6ca13f9839407d561b622e64a4de62e4", | ||
"version": "0.30.0-pre.5e34850f4b3cc9c80fda4f0df245afcaa29b1daf", | ||
"types": "lib/index.d.ts", | ||
@@ -81,0 +81,0 @@ "jest": { |
@@ -60,12 +60,8 @@ # cdk8s+ (cdk8s-plus) | ||
const deployment = new kplus.Deployment(chart, 'Deployment', { | ||
spec: { | ||
replicas: 3, | ||
podSpecTemplate: { | ||
containers: [ container ] | ||
} | ||
}, | ||
replicas: 3, | ||
containers: [ container ] | ||
}); | ||
// finally, we expose the deployment as a load balancer service and make it run | ||
deployment.expose({port: 8080, serviceType: kplus.ServiceType.LOAD_BALANCER}) | ||
deployment.expose(8080, {serviceType: kplus.ServiceType.LOAD_BALANCER}) | ||
@@ -165,10 +161,6 @@ // we are done, synth | ||
new kplus.Deployment(chart, 'Deployment', { | ||
spec: { | ||
replicas: 3, | ||
podSpecTemplate: { | ||
containers: [new kplus.Container({ | ||
image: 'ubuntu', | ||
})], | ||
}, | ||
}, | ||
replicas: 3, | ||
containers: [new kplus.Container({ | ||
image: 'ubuntu', | ||
})], | ||
}); | ||
@@ -189,6 +181,4 @@ ``` | ||
kplus.Deployment(chart, 'Deployment', | ||
spec=kplus.DeploymentSpec( | ||
replicas=1, | ||
pod_spec_template=kplus.PodSpec(containers=[kplus.Container(image='ubuntu')]) | ||
) | ||
replicas=1, | ||
containers=[kplus.Container(image='ubuntu')] | ||
) | ||
@@ -330,17 +320,15 @@ ``` | ||
const app = new k.App(); | ||
const chart = new k.Chart(app, 'Chart'); | ||
// let's define a job spec, and set a 1 second TTL. | ||
const jobSpec = { | ||
ttlAfterFinished: kplus.Duration.seconds(1), | ||
}; | ||
const load = new kplus.Job(chart, 'LoadData', { | ||
ttlAfterFinished: kplus.Duration.seconds(1) | ||
}); | ||
// now add a container to all the pods created by this job | ||
jobSpec.podSpecTemplate.addContainer(new kplus.Container({ | ||
job.addContainer(new kplus.Container({ | ||
image: 'loader' | ||
})); | ||
const app = new k.App(); | ||
const chart = new k.Chart(app, 'Chart'); | ||
// now we create the job | ||
const load = new kplus.Job(chart, 'LoadData', { spec: jobSpec }); | ||
``` | ||
@@ -369,3 +357,3 @@ | ||
// this will cause the service to select all pods with the 'run: frontend' label. | ||
frontends.spec.selectByLabel('run', 'frontend') | ||
frontends.selectByLabel('run', 'frontend') | ||
``` | ||
@@ -386,3 +374,3 @@ | ||
// make the service bind to port 9000 and redirect to port 80 on the associated containers. | ||
frontends.spec.serve({port: 9000, targetPort: 80) | ||
frontends.serve({port: 9000, targetPort: 80) | ||
``` | ||
@@ -409,7 +397,3 @@ | ||
new kplus.Deployment(chart, 'FrontEnds', { | ||
spec: { | ||
podSpecTemplate: { | ||
containers: [ new kplus.Container({ image: 'node' }) ], | ||
} | ||
}, | ||
containers: [ new kplus.Container({ image: 'node' }) ], | ||
}); | ||
@@ -450,3 +434,3 @@ ``` | ||
// create a ClusterIP service that listens on port 9000 and redirects to port 9000 on the containers. | ||
frontends.expose({port: 9000}) | ||
frontends.expose(9000) | ||
``` | ||
@@ -569,6 +553,6 @@ | ||
// this will automatically add the volume as well. | ||
pod.spec.addContainer(container); | ||
pod.addContainer(container); | ||
// but if you want to explicitly add it, simply use: | ||
pod.spec.addVolume(storage); | ||
pod.addVolume(storage); | ||
@@ -585,4 +569,5 @@ ``` | ||
const pod = new new kplus.Pod(chart, 'Pod'); | ||
pod.spec.restartPolicy = kplus.RestartPolicy.NEVER; | ||
const pod = new new kplus.Pod(chart, 'Pod', { | ||
restartPolicy: kplus.RestartPolicy.NEVER, | ||
}); | ||
``` | ||
@@ -598,4 +583,5 @@ | ||
const pod = new new kplus.Pod(chart, 'Pod'); | ||
pod.spec.serviceAccount = kplus.ServiceAccount.fromServiceAccountName('aws'); | ||
const pod = new new kplus.Pod(chart, 'Pod', { | ||
serviceAccount: kplus.ServiceAccount.fromServiceAccountName('aws'), | ||
}); | ||
``` | ||
@@ -690,15 +676,11 @@ | ||
const helloDeployment = new kplus.Deployment(this, text, { | ||
spec: { | ||
podSpecTemplate: { | ||
containers: [ | ||
new kplus.Container({ | ||
image: 'hashicorp/http-echo', | ||
args: [ '-text', 'hello ingress' ] | ||
}) | ||
] | ||
} | ||
} | ||
containers: [ | ||
new kplus.Container({ | ||
image: 'hashicorp/http-echo', | ||
args: [ '-text', 'hello ingress' ] | ||
}) | ||
] | ||
}); | ||
const helloService = helloDeployment.expose({ port: 5678 }); | ||
const helloService = helloDeployment.expose(5678); | ||
@@ -705,0 +687,0 @@ const ingress = new Ingress(this, 'ingress'); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
2039773
18636
691