UNPKG

@pulumi/harness

Version:

A Pulumi package for creating and managing Harness resources.

145 lines 5.36 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.OrchestratorConfig = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Resource for ClusterOrchestrator Config. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as harness from "@pulumi/harness"; * * const example = new harness.cluster.OrchestratorConfig("example", { * orchestratorId: "orch-cvifpfl9rbg8neldj97g", * distribution: { * baseOndemandCapacity: 2, * ondemandReplicaPercentage: 50, * selector: "ALL", * strategy: "CostOptimized", * }, * binpacking: { * podEviction: { * threshold: { * cpu: 60, * memory: 80, * }, * }, * disruption: { * criteria: "WhenEmpty", * delay: "10m", * budgets: [ * { * reasons: [ * "Drifted", * "Underutilized", * "Empty", * ], * nodes: "20", * }, * { * reasons: [ * "Drifted", * "Empty", * ], * nodes: "1", * schedule: { * frequency: "@monthly", * duration: "10m", * }, * }, * ], * }, * }, * nodePreferences: { * ttl: "Never", * reverseFallbackInterval: "6h", * }, * commitmentIntegration: { * enabled: true, * masterAccountId: "dummyAccountId", * }, * replacementSchedule: { * windowType: "Custom", * appliesTo: { * consolidation: true, * harnessPodEviction: true, * reverseFallback: true, * }, * windowDetails: { * days: [ * "SUN", * "WED", * "SAT", * ], * timeZone: "Asia/Calcutta", * allDay: false, * startTime: "10:30", * endTime: "11:30", * }, * }, * }); * ``` */ class OrchestratorConfig extends pulumi.CustomResource { /** * Get an existing OrchestratorConfig resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name, id, state, opts) { return new OrchestratorConfig(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of OrchestratorConfig. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj) { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === OrchestratorConfig.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["binpacking"] = state?.binpacking; resourceInputs["commitmentIntegration"] = state?.commitmentIntegration; resourceInputs["distribution"] = state?.distribution; resourceInputs["nodePreferences"] = state?.nodePreferences; resourceInputs["orchestratorId"] = state?.orchestratorId; resourceInputs["replacementSchedule"] = state?.replacementSchedule; } else { const args = argsOrState; if (args?.distribution === undefined && !opts.urn) { throw new Error("Missing required property 'distribution'"); } if (args?.orchestratorId === undefined && !opts.urn) { throw new Error("Missing required property 'orchestratorId'"); } resourceInputs["binpacking"] = args?.binpacking; resourceInputs["commitmentIntegration"] = args?.commitmentIntegration; resourceInputs["distribution"] = args?.distribution; resourceInputs["nodePreferences"] = args?.nodePreferences; resourceInputs["orchestratorId"] = args?.orchestratorId; resourceInputs["replacementSchedule"] = args?.replacementSchedule; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(OrchestratorConfig.__pulumiType, name, resourceInputs, opts); } } exports.OrchestratorConfig = OrchestratorConfig; /** @internal */ OrchestratorConfig.__pulumiType = 'harness:cluster/orchestratorConfig:OrchestratorConfig'; //# sourceMappingURL=orchestratorConfig.js.map