cdk8s-plus
Advanced tools
Comparing version 0.30.0 to 0.31.0-pre.8b0176ccc0609bed58ddcaa689edc2997a9915f1
@@ -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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlnLW1hcC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9jb25maWctbWFwLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUNBLHFDQUFxQztBQUNyQyxpQ0FBNEQ7QUFDNUQsK0JBQStCO0FBQy9CLHlCQUF5QjtBQUN6Qiw2QkFBNkI7QUFDN0IsdUNBQXVDO0FBQ3ZDLG1DQUEyQztBQXVDM0M7O0dBRUc7QUFDSCxNQUFhLFNBQVUsU0FBUSxlQUFRO0lBY3JDLFlBQW1CLEtBQWdCLEVBQUUsRUFBVSxFQUFFLFFBQXdCLEVBQUc7O1FBQzFFLEtBQUssQ0FBQyxLQUFLLEVBQUUsRUFBRSxFQUFFLEtBQUssQ0FBQyxDQUFDO1FBSlQsZ0JBQVcsR0FBOEIsRUFBRyxDQUFDO1FBQzdDLFVBQUssR0FBOEIsRUFBRyxDQUFDO1FBS3RELElBQUksQ0FBQyxTQUFTLEdBQUcsSUFBSSxHQUFHLENBQUMsU0FBUyxDQUFDLElBQUksRUFBRSxXQUFXLEVBQUU7WUFDcEQsUUFBUSxFQUFFLEtBQUssQ0FBQyxRQUFRO1lBRXhCLDRD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1bmRlZmluZWRJZkVtcHR5KHRoaXMuX2JpbmFyeURhdGEpO1xuICB9XG59XG5cbi8qKlxuICogT3B0aW9ucyBmb3IgYGNvbmZpZ21hcC5hZGREaXJlY3RvcnkoKWBcbiAqL1xuZXhwb3J0IGludGVyZmFjZSBBZGREaXJlY3RvcnlPcHRpb25zIHtcbiAgLyoqXG4gICAqIEEgcHJlZml4IHRvIGFkZCB0byBhbGwga2V5cyBpbiB0aGUgY29uZmlnIG1hcC5cbiAgICogQGRlZmF1bHQgXCJcIlxuICAgKi9cbiAgcmVhZG9ubHkga2V5UHJlZml4Pzogc3RyaW5nO1xuXG4gIC8qKlxuICAgKiBHbG9iIHBhdHRlcm5zIHRvIGV4Y2x1ZGUgd2hlbiBhZGRpbmcgZmlsZXMuXG4gICAqIEBkZWZhdWx0IC0gaW5jbHVkZSBhbGwgZmlsZXNcbiAgICovXG4gIHJlYWRvbmx5IGV4Y2x1ZGU/OiBzdHJpbmdbXTtcbn1cbiJdfQ== |
@@ -128,2 +128,18 @@ import { IConfigMap } from './config-map'; | ||
/** | ||
* Arguments to the entrypoint. The docker image's CMD is used if `command` is | ||
* not provided. | ||
* | ||
* Variable references $(VAR_NAME) are expanded using the container's | ||
* environment. If a variable cannot be resolved, the reference in the input | ||
* string will be unchanged. The $(VAR_NAME) syntax can be escaped with a | ||
* double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, | ||
* regardless of whether the variable exists or not. | ||
* | ||
* Cannot be updated. | ||
* | ||
* @see https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell | ||
* @default [] | ||
*/ | ||
readonly args?: string[]; | ||
/** | ||
* Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated. | ||
@@ -181,2 +197,3 @@ * | ||
private readonly _command?; | ||
private readonly _args?; | ||
private readonly _env; | ||
@@ -190,2 +207,8 @@ constructor(props: ContainerProps); | ||
/** | ||
* Arguments to the entrypoint. | ||
* | ||
* @returns a copy of the arguments array, cannot be modified. | ||
*/ | ||
get args(): string[] | undefined; | ||
/** | ||
* Add an environment value to the container. The variable value can come | ||
@@ -192,0 +215,0 @@ * from various dynamic sources such a secrets of config maps. |
@@ -103,2 +103,3 @@ "use strict"; | ||
this._command = props.command; | ||
this._args = props.args; | ||
this._env = (_b = props.env) !== null && _b !== void 0 ? _b : {}; | ||
@@ -117,2 +118,10 @@ this.workingDir = props.workingDir; | ||
/** | ||
* Arguments to the entrypoint. | ||
* | ||
* @returns a copy of the arguments array, cannot be modified. | ||
*/ | ||
get args() { | ||
return this._args ? [...this._args] : undefined; | ||
} | ||
/** | ||
* Add an environment value to the container. The variable value can come | ||
@@ -175,2 +184,3 @@ * from various dynamic sources such a secrets of config maps. | ||
command: this.command, | ||
args: this.args, | ||
workingDir: this.workingDir, | ||
@@ -241,2 +251,2 @@ env: renderEnv(this._env), | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udGFpbmVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2NvbnRhaW5lci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUErQ0E7O0dBRUc7QUFDSCxNQUFhLFFBQVE7SUFtRW5CLFlBQW9DLEtBQVcsRUFBa0IsU0FBZTtRQUE1QyxVQUFLLEdBQUwsS0FBSyxDQUFNO1FBQWtCLGNBQVMsR0FBVCxTQUFTLENBQU07SUFBRyxDQUFDO0lBakVwRjs7Ozs7O09BTUc7SUFDSSxNQUFNLENBQUMsYUFBYSxDQUFDLFNBQXFCLEVBQUUsR0FBVyxFQUFFLFVBQXdDLEVBQUc7UUFFekcsTUFBTSxNQUFNLEdBQXFCO1lBQy9CLGVBQWUsRUFBRTtnQkFDZixJQUFJLEVBQUUsU0FBUyxDQUFDLElBQUk7Z0JBQ3BCLEdBQUc7Z0JBQ0gsUUFBUSxFQUFFLE9BQU8sQ0FBQyxRQUFRO2F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luZyBzeXN0ZW0gYW5kIHRoZXJlZm9yZSBpdCBpcyBhbGxvd2VkIG9ubHkgaW4gcHJpdmlsZWdlZFxuICAgKiBDb250YWluZXJzLiBGYW1pbGlhcml0eSB3aXRoIExpbnV4IGtlcm5lbCBiZWhhdmlvciBpcyBzdHJvbmdseSByZWNvbW1lbmRlZC5cbiAgICogSW4gYWRkaXRpb24sIGFueSB2b2x1bWUgbW91bnRzIGNyZWF0ZWQgYnkgQ29udGFpbmVycyBpbiBQb2RzIG11c3QgYmVcbiAgICogZGVzdHJveWVkICh1bm1vdW50ZWQpIGJ5IHRoZSBDb250YWluZXJzIG9uIHRlcm1pbmF0aW9uLlxuICAgKlxuICAgKi9cbiAgQklESVJFQ1RJT05BTCA9ICdCaWRpcmVjdGlvbmFsJyxcbn1cblxuZnVuY3Rpb24gcmVuZGVyRW52KGVudjogeyBbbmFtZTogc3RyaW5nXTogRW52VmFsdWUgfSk6IGs4cy5FbnZWYXJbXSB7XG4gIGNvbnN0IHJlc3VsdCA9IG5ldyBBcnJheTxrOHMuRW52VmFyPigpO1xuICBmb3IgKGNvbnN0IFtuYW1lLCB2XSBvZiBPYmplY3QuZW50cmllcyhlbnYpKSB7XG4gICAgcmVzdWx0LnB1c2goe1xuICAgICAgbmFtZSxcbiAgICAgIHZhbHVlOiB2LnZhbHVlLFxuICAgICAgdmFsdWVGcm9tOiB2LnZhbHVlRnJvbSxcbiAgICB9KTtcbiAgfVxuICByZXR1cm4gcmVzdWx0O1xufVxuIl19 |
@@ -5,14 +5,26 @@ 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; | ||
/** | ||
* Automatically allocates a pod selector for this deployment. | ||
* | ||
* If this is set to `false` you must define your selector through | ||
* `deployment.podMetadata.addLabel()` and `deployment.selectByLabel()`. | ||
* | ||
* @default true | ||
*/ | ||
readonly defaultSelector?: boolean; | ||
} | ||
@@ -24,6 +36,2 @@ /** | ||
/** | ||
* The port number the service will bind to. | ||
*/ | ||
readonly port: number; | ||
/** | ||
* The type of the exposed service. | ||
@@ -63,64 +71,26 @@ * | ||
**/ | ||
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 options - Options. | ||
* Returns a a copy. Use `selectByLabel()` to add labels. | ||
*/ | ||
expose(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. | ||
@@ -134,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,51 +42,41 @@ * | ||
constructor(scope, id, props = {}) { | ||
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(this) }), | ||
spec: cdk8s.Lazy.any({ produce: () => this._toKube() }), | ||
}); | ||
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.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 options - Options. | ||
* Returns a a copy. Use `selectByLabel()` to add labels. | ||
*/ | ||
expose(options) { | ||
var _a; | ||
const containers = this.spec.podSpecTemplate.containers; | ||
if (containers.length === 0) { | ||
throw new Error('Cannot expose a deployment without containers'); | ||
} | ||
// create a label and attach it to the deployment pods | ||
const selector = 'cdk8s.deployment'; | ||
const matcher = constructs_1.Node.of(this).uniqueId; | ||
const service = new service_1.Service(this, 'Service', { | ||
spec: { | ||
type: (_a = options.serviceType) !== null && _a !== void 0 ? _a : service_1.ServiceType.CLUSTER_IP, | ||
}, | ||
}); | ||
service.spec.addSelector(selector, matcher); | ||
service.spec.serve(options.port, { | ||
// just a PoC, we assume the first container is the main one. | ||
// TODO: figure out what the correct thing to do here. | ||
targetPort: containers[0].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; | ||
} | ||
/** | ||
@@ -103,24 +93,30 @@ * 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); | ||
} | ||
/** | ||
* @internal | ||
*/ | ||
_toKube(deployment) { | ||
// automatically select pods in this deployment | ||
const selector = 'cdk8s.deployment'; | ||
const matcher = constructs_1.Node.of(deployment).uniqueId; | ||
this.podMetadataTemplate.addLabel(selector, matcher); | ||
this.selectByLabel(selector, matcher); | ||
_toKube() { | ||
return { | ||
replicas: this.replicas, | ||
template: { | ||
metadata: this.podMetadataTemplate.toJson(), | ||
spec: this.podSpecTemplate._toKube(), | ||
}, | ||
template: this._podTemplate._toPodTemplateSpec(), | ||
selector: { | ||
@@ -132,3 +128,3 @@ matchLabels: this._labelSelector, | ||
} | ||
exports.DeploymentSpecDefinition = DeploymentSpecDefinition; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVwbG95bWVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9kZXBsb3ltZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLHFDQUFxQztBQUNyQywyQ0FBNkM7QUFDN0MsdUNBQWlEO0FBQ2pELGlDQUFpRDtBQUNqRCwrQkFBK0I7QUFDL0IsK0JBQW1EO0FBQ25ELGlDQUF1RTtBQStCdkU7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztHQTJCRztBQUNILE1BQWEsVUFBVyxTQUFRLGVBQVE7SUFjdEMsWUFBWSxLQUFnQixFQUFFLEVBQVUsRUFBRSxRQUF5QixFQUFFO1FBQ25FLEtBQUssQ0FBQyxLQUFLLEVBQUUsRUFBRSxFQUFFLEtBQUssQ0FBQyxDQUFDO1FBRXhCLElBQUksQ0FBQyxJQUFJLEdBQUcsSUFBSSx3QkFBd0IsQ0FBQyxLQUFLLENBQUMsSUFBSSxDQUFDLENBQUM7UUFFckQsSUFBSSxDQUFDLFNBQVMsR0FBRyxJQUFJLEdBQUcsQ0FBQyxVQUFVLENBQUMsSUFBSSxFQUFFLEtBQUssRUFBRTtZQUMvQyxRQUFRLEVBQUUsS0FBSyxDQUFDLFFBQVE7WUFDeEIsSUFBSSxFQUFFLEtBQUssQ0FBQyxJQUFJLENBQUMsR0FBRyxDQUFDLEVBQUUsT0FBTyxFQUFFLEdBQ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ViZShkZXBsb3ltZW50OiBEZXBsb3ltZW50KTogazhzLkRlcGxveW1lbnRTcGVjIHtcblxuICAgIC8vIGF1dG9tYXRpY2FsbHkgc2VsZWN0IHBvZHMgaW4gdGhpcyBkZXBsb3ltZW50XG5cbiAgICBjb25zdCBzZWxlY3RvciA9ICdjZGs4cy5kZXBsb3ltZW50JztcbiAgICBjb25zdCBtYXRjaGVyID0gTm9kZS5vZihkZXBsb3ltZW50KS51bmlxdWVJZDtcblxuICAgIHRoaXMucG9kTWV0YWRhdGFUZW1wbGF0ZS5hZGRMYWJlbChzZWxlY3RvciwgbWF0Y2hlcik7XG5cbiAgICB0aGlzLnNlbGVjdEJ5TGFiZWwoc2VsZWN0b3IsIG1hdGNoZXIpO1xuXG4gICAgcmV0dXJuIHtcbiAgICAgIHJlcGxpY2FzOiB0aGlzLnJlcGxpY2FzLFxuICAgICAgdGVtcGxhdGU6IHtcbiAgICAgICAgbWV0YWRhdGE6IHRoaXMucG9kTWV0YWRhdGFUZW1wbGF0ZS50b0pzb24oKSxcbiAgICAgICAgc3BlYzogdGhpcy5wb2RTcGVjVGVtcGxhdGUuX3RvS3ViZSgpLFxuICAgICAgfSxcbiAgICAgIHNlbGVjdG9yOiB7XG4gICAgICAgIG1hdGNoTGFiZWxzOiB0aGlzLl9sYWJlbFNlbGVjdG9yLFxuICAgICAgfSxcbiAgICB9O1xuICB9XG59XG4iXX0= | ||
exports.Deployment = Deployment; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVwbG95bWVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9kZXBsb3ltZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLHFDQUFxQztBQUNyQywyQ0FBNkM7QUFDN0MsdUNBQWlEO0FBQ2pELGlDQUFpRDtBQUNqRCwrQkFBK0I7QUFDL0IsaUNBQTJEO0FBQzNELCtCQU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uXG59Il19 |
@@ -13,1 +13,2 @@ export * from './base'; | ||
export * from './size'; | ||
export * from './ingress'; |
@@ -25,2 +25,3 @@ "use strict"; | ||
__exportStar(require("./size"), exports); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7O0FBQUEseUNBQXVCO0FBQ3ZCLCtDQUE2QjtBQUM3Qiw4Q0FBNEI7QUFDNUIsK0NBQTZCO0FBQzdCLDZDQUEyQjtBQUMzQix3Q0FBc0I7QUFDdEIsd0NBQXNCO0FBQ3RCLDJDQUF5QjtBQUN6QixvREFBa0M7QUFDbEMsNENBQTBCO0FBQzFCLDJDQUF5QjtBQUN6Qix5Q0FBdUIiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL2Jhc2UnO1xuZXhwb3J0ICogZnJvbSAnLi9jb25maWctbWFwJztcbmV4cG9ydCAqIGZyb20gJy4vY29udGFpbmVyJztcbmV4cG9ydCAqIGZyb20gJy4vZGVwbG95bWVudCc7XG5leHBvcnQgKiBmcm9tICcuL2R1cmF0aW9uJztcbmV4cG9ydCAqIGZyb20gJy4vam9iJztcbmV4cG9ydCAqIGZyb20gJy4vcG9kJztcbmV4cG9ydCAqIGZyb20gJy4vc2VjcmV0JztcbmV4cG9ydCAqIGZyb20gJy4vc2VydmljZS1hY2NvdW50JztcbmV4cG9ydCAqIGZyb20gJy4vc2VydmljZSc7XG5leHBvcnQgKiBmcm9tICcuL3ZvbHVtZSc7XG5leHBvcnQgKiBmcm9tICcuL3NpemUnOyJdfQ== | ||
__exportStar(require("./ingress"), exports); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7O0FBQUEseUNBQXVCO0FBQ3ZCLCtDQUE2QjtBQUM3Qiw4Q0FBNEI7QUFDNUIsK0NBQTZCO0FBQzdCLDZDQUEyQjtBQUMzQix3Q0FBc0I7QUFDdEIsd0NBQXNCO0FBQ3RCLDJDQUF5QjtBQUN6QixvREFBa0M7QUFDbEMsNENBQTBCO0FBQzFCLDJDQUF5QjtBQUN6Qix5Q0FBdUI7QUFDdkIsNENBQTBCIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9iYXNlJztcbmV4cG9ydCAqIGZyb20gJy4vY29uZmlnLW1hcCc7XG5leHBvcnQgKiBmcm9tICcuL2NvbnRhaW5lcic7XG5leHBvcnQgKiBmcm9tICcuL2RlcGxveW1lbnQnO1xuZXhwb3J0ICogZnJvbSAnLi9kdXJhdGlvbic7XG5leHBvcnQgKiBmcm9tICcuL2pvYic7XG5leHBvcnQgKiBmcm9tICcuL3BvZCc7XG5leHBvcnQgKiBmcm9tICcuL3NlY3JldCc7XG5leHBvcnQgKiBmcm9tICcuL3NlcnZpY2UtYWNjb3VudCc7XG5leHBvcnQgKiBmcm9tICcuL3NlcnZpY2UnO1xuZXhwb3J0ICogZnJvbSAnLi92b2x1bWUnO1xuZXhwb3J0ICogZnJvbSAnLi9zaXplJztcbmV4cG9ydCAqIGZyb20gJy4vaW5ncmVzcyc7XG4iXX0= |
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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiam9iLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2pvYi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxpQ0FBaUQ7QUFDakQsaUNBQWtGO0FBRWxGLCtCQUErQjtBQUUvQixxQ0FBcUM7QUFDckMsK0JBQWtFO0FBaUJsRTs7Ozs7O0dBTUc7QUFDSCxNQUFhLEdBQUksU0FBUSxlQUFRO0lBSy9CLFlBQVksS0FBZ0IsRUFBRSxFQUFVLEVBQUUsUUFBa0IsRUFBRTtRQUM1RCx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YWluZXI6IENvbnRhaW5lcik6IHZvaWQge1xuICAgIHJldHVybiB0aGlzLl9wb2RUZW1wbGF0ZS5hZGRDb250YWluZXIoY29udGFpbmVyKTtcbiAgfVxuXG4gIHB1YmxpYyBhZGRWb2x1bWUodm9sdW1lOiBWb2x1bWUpOiB2b2lkIHtcbiAgICByZXR1cm4gdGhpcy5fcG9kVGVtcGxhdGUuYWRkVm9sdW1lKHZvbHVtZSk7XG4gIH1cblxuICAvKipcbiAgICogQGludGVybmFsXG4gICAqL1xuICBwdWJsaWMgX3RvS3ViZSgpOiBrOHMuSm9iU3BlYyB7XG4gICAgcmV0dXJuIHtcbiAgICAgIHRlbXBsYXRlOiB0aGlzLl9wb2RUZW1wbGF0ZS5fdG9Qb2RUZW1wbGF0ZVNwZWMoKSxcbiAgICAgIHR0bFNlY29uZHNBZnRlckZpbmlzaGVkOiB0aGlzLnR0bEFmdGVyRmluaXNoZWQgPyB0aGlzLnR0bEFmdGVyRmluaXNoZWQudG9TZWNvbmRzKCkgOiB1bmRlZmluZWQsXG4gICAgfTtcbiAgfVxuXG59XG4iXX0= |
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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicG9kLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL3BvZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxxQ0FBcUM7QUFFckMsaUNBQWlEO0FBQ2pELCtCQUErQjtBQW1CL0I7OztHQUdHO0FBQ0gsTUFBYSxHQUFJLFNBQVEsZUFBUTtJQVcvQixZQUFZLEtBQWdCLEVBQUUsRUFBVSxFQUFFLFFBQWtCLEVBQUU7UUFDNUQsS0FBSyxDQUFDLEtBQUssRUFBRSxFQUFFLEVBQUUsS0FBSyxDQUFDLENBQUM7UUFFeEIsSUFBSSxDQUFDLElBQUksR0FBRyxJQUFJLGlCQUFpQixDQUFDLEtBQUssQ0FBQyxJQUFJLENBQUMsQ0FBQzt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S3ViZSgpKTtcbiAgICB9XG5cbiAgICByZXR1cm4ge1xuICAgICAgcmVzdGFydFBvbGljeTogdGhpcy5yZXN0YXJ0UG9saWN5LFxuICAgICAgc2VydmljZUFjY291bnROYW1lOiB0aGlzLnNlcnZpY2VBY2NvdW50Py5uYW1lLFxuICAgICAgY29udGFpbmVyczogY29udGFpbmVycyxcbiAgICAgIHZvbHVtZXM6IHZvbHVtZXMsXG4gICAgfTtcblxuICB9XG59XG4iXX0= | ||
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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicG9kLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL3BvZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxxQ0FBcUM7QUFFckMsaUNBQWlEO0FBQ2pELCtCQUErQjtBQUkvQixpQ0FBdUU7QUE4RHZFOztHQUVHO0FBQ0gsTUFBYSxPQUFPO0lBUWxCLFlBQVksUUFBc0IsRUFBRTs7UUFDbEMsSUFBSSxDQUFDLGFBQWEsR0FBRyxLQUFLLENBQUMsYUFBYSxDQUFDO1FBQ3pDLElBQUksQ0FBQyxjQUFjLEdBQUcsS0FBSyxDQUFDLGNBQWMsQ0FBQztRQUUzQyxJQUFJLENBQUMsV0FBVyxTQUFHLEtBQUssQ0FBQyxVQUFVLG1DQUFJLEVBQUUsQ0FBQztRQUMxQyxJQUFJLENBQUMsUUFBUSxTQUFHLEtBQUssQ0FBQyxPQUFPLG1DQUFJLEVBQUUsQ0FBQztJQUN0QyxDQUFDO0lBRUQsSUFBVyxVQUFVO1FBQ25CLE9BQU8sQ0FBRSxHQUFHLElBQUksQ0FBQyxXQUFXLENBQUUsQ0FBQztJQUNqQyxDQUFDO0lBRUQsSUFBVyxPQUFPO1FBQ2hCLE9BQU8sQ0FBRSxHQUFHLElBQUksQ0FBQyxRQUFRLENBQUUsQ0FBQztJQUM5QixDQUFDO0lBRU0sWUFBWSxDQUFDLFNBQW9CO1FBQ3RDLElBQUksQ0FB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cnMucHVzaChjb250YWluZXIpO1xuICB9XG5cbiAgcHVibGljIGFkZFZvbHVtZSh2b2x1bWU6IFZvbHVtZSk6IHZvaWQge1xuICAgIHRoaXMuX3ZvbHVtZXMucHVzaCh2b2x1bWUpO1xuICB9XG5cbiAgLyoqXG4gICAqIEBpbnRlcm5hbFxuICAgKi9cbiAgcHVibGljIF90b1BvZFNwZWMoKTogazhzLlBvZFNwZWMge1xuXG4gICAgaWYgKHRoaXMuY29udGFpbmVycy5sZW5ndGggPT09IDApIHtcbiAgICAgIHRocm93IG5ldyBFcnJvcignUG9kU3BlYyBtdXN0IGhhdmUgYXQgbGVhc3QgMSBjb250YWluZXInKTtcbiAgICB9XG5cbiAgICBjb25zdCB2b2x1bWVzOiBrOHMuVm9sdW1lW10gPSBbXTtcbiAgICBjb25zdCBjb250YWluZXJzOiBrOHMuQ29udGFpbmVyW10gPSBbXTtcblxuICAgIGZvciAoY29uc3QgY29udGFpbmVyIG9mIHRoaXMuY29udGFpbmVycykge1xuXG4gICAgICAvLyBhdXRvbWF0aWNhbGx5IGFkZCB2b2x1bWUgZnJvbSB0aGUgY29udGFpbmVyIG1vdW50XG4gICAgICAvLyB0byB0aGlzIHBvZCBzbyB0aGF0cyBpdHMgYXZhaWxhYmxlIHRvIHRoZSBjb250YWluZXIuXG4gICAgICBmb3IgKGNvbnN0IG1vdW50IG9mIGNvbnRhaW5lci5tb3VudHMpIHtcbiAgICAgICAgdm9sdW1lcy5wdXNoKG1vdW50LnZvbHVtZS5fdG9LdWJlKCkpO1xuICAgICAgfVxuXG4gICAgICBjb250YWluZXJzLnB1c2goY29udGFpbmVyLl90b0t1YmUoKSk7XG4gICAgfVxuXG4gICAgZm9yIChjb25zdCB2b2x1bWUgb2YgdGhpcy5fdm9sdW1lcykge1xuICAgICAgdm9sdW1lcy5wdXNoKHZvbHVtZS5fdG9LdWJlKCkpO1xuICAgIH1cblxuICAgIHJldHVybiB7XG4gICAgICByZXN0YXJ0UG9saWN5OiB0aGl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wb2xpY3kgZm9yIGFsbCBjb250YWluZXJzIHdpdGhpbiB0aGUgcG9kLlxuICovXG5leHBvcnQgZW51bSBSZXN0YXJ0UG9saWN5IHtcbiAgLyoqXG4gICAqIEFsd2F5cyByZXN0YXJ0IHRoZSBwb2QgYWZ0ZXIgaXQgZXhpdHMuXG4gICAqL1xuICBBTFdBWVMgPSAnQWx3YXlzJyxcblxuICAvKipcbiAgICogT25seSByZXN0YXJ0IGlmIHRoZSBwb2QgZXhpdHMgd2l0aCBhIG5vbi16ZXJvIGV4aXQgY29kZS5cbiAgICovXG4gIE9OX0ZBSUxVUkUgPSAnT25GYWlsdXJlJyxcblxuICAvKipcbiAgICogTmV2ZXIgcmVzdGFydCB0aGUgcG9kLlxuICAgKi9cbiAgTkVWRVIgPSAnTmV2ZXInXG59XG5cbiJdfQ== |
@@ -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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VjcmV0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL3NlY3JldC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxpQ0FBNEQ7QUFHNUQscUNBQXFDO0FBZ0JyQzs7Ozs7OztHQU9HO0FBQ0gsTUFBYSxNQUFPLFNBQVEsZUFBUTtJQWNsQyxZQUFtQixLQUFnQixFQUFFLEVBQ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ZXR1cm4gdGhpcy5zdHJpbmdEYXRhW2tleV07XG4gIH1cbn1cbiJdfQ== |
@@ -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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VydmljZS1hY2NvdW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL3NlcnZpY2UtYWNjb3VudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxpQ0FBNEQ7QUFFNUQscUNBQXFDO0FBR3JDLCtCQUErQjtBQUMvQixtQ0FBMkM7QUEyQjNDOzs7Ozs7Ozs7OztHQVdHO0FBQ0gsTUFBYSxjQUFlLFNBQVEsZUFBUTtJQWMxQyxZQUFZLEtBQWdCLEVBQUUsRUFBVSxFQUFFLFFBQTZCLEVBQUc7O1FBQ3hFLEtBQUssQ0FBQyxLQUFLLEVBQUUsRUFBRSxFQUFFLEtBQUssQ0FBQyxDQUFDO1FBRXhCLElBQUksQ0FBQyxRQUFRLFNBQUcsS0FBSyxDQUFDLE9BQU8sbUNBQUksRUFBRSxDQUFDO1FBRXBDLElBQUksQ0FBQyxTQUFTLEdBQUcsSUFBSSxHQUFHLENBQUMsY0FBYyxDQUFDLElBQUksRUFBRSxVQUFVLEVBQUU7WUFDeEQsUUFBUSxFQUFFLEtBQUssQ0FBQyxRQUFRO1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LmFueSh7IHByb2R1Y2U6ICgpID0+IHVuZGVmaW5lZElmRW1wdHkodGhpcy5fc2VjcmV0cy5tYXAocyA9PiAoeyBuYW1lOiBzLm5hbWUgfSkpKSB9KSxcbiAgICB9KTtcbiAgfVxuXG4gIC8qKlxuICAgKiBBbGxvdyBhIHNlY3JldCB0byBiZSBhY2Nlc3NlZCBieSBwb2RzIHVzaW5nIHRoaXMgc2VydmljZSBhY2NvdW50LlxuICAgKiBAcGFyYW0gc2VjcmV0IFRoZSBzZWNyZXRcbiAgICovXG4gIHB1YmxpYyBhZGRTZWNyZXQoc2VjcmV0OiBJU2VjcmV0KSB7XG4gICAgdGhpcy5fc2VjcmV0cy5wdXNoKHNlY3JldCk7XG4gIH1cblxuICAvKipcbiAgICogTGlzdCBvZiBzZWNyZXRzIGFsbG93ZWQgdG8gYmUgdXNlZCBieSBwb2RzIHJ1bm5pbmcgdXNpbmcgdGhpcyBzZXJ2aWNlXG4gICAqIGFjY291bnQuXG4gICAqXG4gICAqIFJldHVybnMgYSBjb3B5LiBUbyBhZGQgYSBzZWNyZXQsIHVzZSBgYWRkU2VjcmV0KClgLlxuICAgKi9cbiAgcHVibGljIGdldCBzZWNyZXRzKCkge1xuICAgIHJldHVybiBbIC4uLnRoaXMuX3NlY3JldHMgXTtcbiAgfVxufSJdfQ== |
import { Construct } from 'constructs'; | ||
import { ResourceProps, Resource } from './base'; | ||
import * as cdk8s from 'cdk8s'; | ||
import { Deployment } from './deployment'; | ||
/** | ||
@@ -9,7 +10,39 @@ * Properties for initialization of `Service`. | ||
/** | ||
* 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[]; | ||
} | ||
@@ -65,11 +98,54 @@ /** | ||
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[]; | ||
/** | ||
* Associate a deployment to this service. | ||
* | ||
* Requests will be routed to the port exposed by the first container in the | ||
* deployment's pods. The deployment's `labelSelector` will be used to select | ||
* pods. | ||
* | ||
* @param deployment The deployment to expose | ||
* @param port The external port | ||
*/ | ||
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; | ||
} | ||
@@ -124,84 +200,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; | ||
} |
"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,26 +58,11 @@ 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() }), | ||
}); | ||
} | ||
} | ||
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.type = (_a = props.type) !== null && _a !== void 0 ? _a : ServiceType.CLUSTER_IP; | ||
this._externalIPs = (_b = props.externalIPs) !== null && _b !== void 0 ? _b : []; | ||
this._ports = []; | ||
@@ -96,2 +81,41 @@ this._selector = {}; | ||
/** | ||
* Ports for this service. | ||
* | ||
* Use `serve()` to expose additional service ports. | ||
*/ | ||
get ports() { | ||
return [...this._ports]; | ||
} | ||
/** | ||
* Associate a deployment to this service. | ||
* | ||
* Requests will be routed to the port exposed by the first container in the | ||
* deployment's pods. The deployment's `labelSelector` will be used to select | ||
* pods. | ||
* | ||
* @param deployment The deployment to expose | ||
* @param port The external port | ||
*/ | ||
addDeployment(deployment, port) { | ||
const containers = deployment.containers; | ||
if (containers.length === 0) { | ||
throw new Error('Cannot expose a deployment without containers'); | ||
} | ||
const selector = Object.entries(deployment.labelSelector); | ||
if (selector.length === 0) { | ||
throw new Error('deployment does not have a label selector'); | ||
} | ||
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.addSelector(k, v); | ||
} | ||
this.serve(port, { | ||
// just a PoC, we assume the first container is the main one. | ||
// TODO: figure out what the correct thing to do here. | ||
targetPort: containers[0].port, | ||
}); | ||
} | ||
/** | ||
* Services defined using this spec will select pods according the provided label. | ||
@@ -131,3 +155,3 @@ * | ||
clusterIP: this.clusterIP, | ||
externalIPs: this.externalIPs, | ||
externalIPs: this._externalIPs, | ||
type: this.type, | ||
@@ -139,3 +163,9 @@ selector: this._selector, | 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FtdID0gW107XG5cbiAgICBmb3IgKGNvbnN0IHBvcnQgb2YgdGhpcy5fcG9ydHMpIHtcbiAgICAgIHBvcnRzLnB1c2goe1xuICAgICAgICBwb3J0OiBwb3J0LnBvcnQsXG4gICAgICAgIHRhcmdldFBvcnQ6IHBvcnQudGFyZ2V0UG9ydCxcbiAgICAgICAgbm9kZVBvcnQ6IHBvcnQubm9kZVBvcnQsXG4gICAgICB9KTtcbiAgICB9XG5cbiAgICByZXR1cm4ge1xuICAgICAgY2x1c3RlcklQOiB0aGlzLmNsdXN0ZXJJUCxcbiAgICAgIGV4dGVybmFsSVBzOiB0aGlzLmV4dGVybmFsSVBzLFxuICAgICAgdHlwZTogdGhpcy50eXBlLFxuICAgICAgc2VsZWN0b3I6IHRoaXMuX3NlbGVjdG9yLFxuICAgICAgcG9ydHM6IHBvcnRzLFxuICAgIH07XG4gIH1cbn0iXX0= | ||
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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLHFDQUFxQztBQUVyQyxpQ0FBaUQ7QUFDakQsK0JBQStCO0FBb0QvQjs7Ozs7R0FLRztBQUNILElBQVksV0ErQlg7QUEvQkQsV0FBWSxXQUFXO0lBRXJCOzs7O09BSUc7SUFDSCx1Q0FBd0IsQ0FBQTtJQUV4Qjs7Ozs7T0FLRztJQUNILHFDQUFzQixDQUFBO0lBRXRCOzs7O09BSUc7SUFDSCw2Q0FBOEIsQ0FBQTtJQUU5Qjs7Ozs7T0FLRztJQUNILDZDQ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ydHMgXCJUQ1BcIiwgXCJVRFBcIiwgYW5kIFwiU0NUUFwiLiBEZWZhdWx0IGlzIFRDUC5cbiAgICpcbiAgICogQGRlZmF1bHQgUHJvdG9jb2wuVENQXG4gICAqL1xuICByZWFkb25seSBwcm90b2NvbD86IFByb3RvY29sO1xuXG4gIC8qKlxuICAgKiBUaGUgcG9ydCBudW1iZXIgdGhlIHNlcnZpY2Ugd2lsbCByZWRpcmVjdCB0by5cbiAgICpcbiAgICogQGRlZmF1bHQgLSBUaGUgdmFsdWUgb2YgYHBvcnRgIHdpbGwgYmUgdXNlZC5cbiAgICovXG4gIHJlYWRvbmx5IHRhcmdldFBvcnQ/OiBudW1iZXI7XG59XG5cbi8qKlxuICogRGVmaW5pdGlvbiBvZiBhIHNlcnZpY2UgcG9ydC5cbiAqL1xuZXhwb3J0IGludGVyZmFjZSBTZXJ2aWNlUG9ydCBleHRlbmRzIFNlcnZpY2VQb3J0T3B0aW9ucyB7XG5cbiAgLyoqXG4gICAqIFRoZSBwb3J0IG51bWJlciB0aGUgc2VydmljZSB3aWxsIGJpbmQgdG8uXG4gICAqL1xuICByZWFkb25seSBwb3J0OiBudW1iZXI7XG59XG4iXX0= |
@@ -34,3 +34,3 @@ { | ||
"devDependencies": { | ||
"cdk8s": "^0.30.0", | ||
"cdk8s": "0.31.0-pre.8b0176ccc0609bed58ddcaa689edc2997a9915f1", | ||
"constructs": "^3.0.4", | ||
@@ -58,3 +58,3 @@ "@types/minimatch": "^3.0.3", | ||
"peerDependencies": { | ||
"cdk8s": "^0.30.0", | ||
"cdk8s": "0.31.0-pre.8b0176ccc0609bed58ddcaa689edc2997a9915f1", | ||
"constructs": "^3.0.4" | ||
@@ -78,3 +78,3 @@ }, | ||
"license": "Apache-2.0", | ||
"version": "0.30.0", | ||
"version": "0.31.0-pre.8b0176ccc0609bed58ddcaa689edc2997a9915f1", | ||
"types": "lib/index.d.ts", | ||
@@ -81,0 +81,0 @@ "jest": { |
124
README.md
@@ -14,3 +14,3 @@ # cdk8s+ (cdk8s-plus) | ||
**cdk8s+** is currently built on top of version [1.17.0](https://github.com/instrumenta/kubernetes-json-schema/tree/master/v1.17.0) of the kubernetes API specifications. | ||
If you are deploying manifests produced by `cdk8s+` onto clusters of a lower versio, you might encounter some unsupported spec properties or invalid manifests. | ||
If you are deploying manifests produced by `cdk8s+` onto clusters of a lower version, you might encounter some unsupported spec properties or invalid manifests. | ||
@@ -61,12 +61,8 @@ > See [Supporting various k8s API specs](https://github.com/awslabs/cdk8s/issues/299) for more details and progress on this issue. | ||
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}) | ||
@@ -166,10 +162,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', | ||
})], | ||
}); | ||
@@ -190,10 +182,7 @@ ``` | ||
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')] | ||
) | ||
``` | ||
## In Depth | ||
@@ -332,17 +321,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 }); | ||
``` | ||
@@ -371,3 +358,3 @@ | ||
// this will cause the service to select all pods with the 'run: frontend' label. | ||
frontends.spec.selectByLabel('run', 'frontend') | ||
frontends.selectByLabel('run', 'frontend') | ||
``` | ||
@@ -388,3 +375,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) | ||
``` | ||
@@ -411,7 +398,3 @@ | ||
new kplus.Deployment(chart, 'FrontEnds', { | ||
spec: { | ||
podSpecTemplate: { | ||
containers: [ new kplus.Container({ image: 'node' }) ], | ||
} | ||
}, | ||
containers: [ new kplus.Container({ image: 'node' }) ], | ||
}); | ||
@@ -452,3 +435,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) | ||
``` | ||
@@ -571,6 +554,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); | ||
@@ -587,4 +570,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, | ||
}); | ||
``` | ||
@@ -600,4 +584,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'), | ||
}); | ||
``` | ||
@@ -670,2 +655,49 @@ | ||
awsService.addSecret(awsCreds); | ||
``` | ||
``` | ||
### `Ingress` | ||
[Ingress] manages external access to services in a cluster, typically through | ||
HTTP. Ingress may provide load balancing, SSL termination and name-based virtual | ||
hosting. | ||
You must have an [Ingress controller] to satisfy an Ingress. Only creating an | ||
Ingress resource has no effect. | ||
> API Reference: [Ingress](./API.md#cdk8s-plus-ingress) | ||
[Ingress]: https://kubernetes.io/docs/concepts/services-networking/ingress/ | ||
[Ingress controller]: https://kubernetes.io/docs/concepts/services-networking/ingress-controllers | ||
The following example will route HTTP requests sent to the `/hello` url prefix | ||
to a service associated with a deployment of the | ||
[hashicorp/http-echo](https://github.com/hashicorp/http-echo) image. | ||
```ts | ||
const helloDeployment = new kplus.Deployment(this, text, { | ||
containers: [ | ||
new kplus.Container({ | ||
image: 'hashicorp/http-echo', | ||
args: [ '-text', 'hello ingress' ] | ||
}) | ||
] | ||
}); | ||
const helloService = helloDeployment.expose(5678); | ||
const ingress = new Ingress(this, 'ingress'); | ||
ingress.addRule('/hello', kplus.IngressBackend.fromService(helloService)); | ||
``` | ||
You can use `addHostRule(host, path, backend)` to define a route that will only | ||
apply to requests with this `Host` header. This can be used to implement virtual | ||
hosts. | ||
The `addDefaultBackend(backend)` and `addHostDefaultBackend(host, backend)` | ||
methods can be used to define backends that will accept all requests that do not | ||
match any other rules. | ||
The TCP port used to route requests to services will be determined based on | ||
which ports are exposed by the service (e.g. through `serve()`). If the service | ||
exposes multiple ports, then a port must be specified via | ||
`IngressBackend.fromService(service, { port }`. |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
2039773
59
18636
691