Arc Postgres - Rename shards to workers

Co-authored-by: Brian Bergeron <brberger@microsoft.com>
This commit is contained in:
Brian Bergeron
2020-10-28 16:57:17 -07:00
committed by GitHub
parent e679d70a4b
commit d1b8c15e11
7 changed files with 12 additions and 147 deletions

View File

@@ -55,7 +55,10 @@ export class PostgresModel extends ResourceModel {
const cpuRequest = this._config.spec.scheduling?.default?.resources?.requests?.cpu;
const ramRequest = this._config.spec.scheduling?.default?.resources?.requests?.memory;
const storage = this._config.spec.storage?.data?.size;
const nodes = (this._config.spec.scale?.shards ?? 0) + 1; // An extra node for the coordinator
// scale.shards was renamed to scale.workers. Check both for backwards compatibility.
const scale = this._config.spec.scale;
const nodes = (scale?.workers ?? scale?.shards ?? 0) + 1; // An extra node for the coordinator
let configuration: string[] = [];
configuration.push(`${nodes} ${nodes > 1 ? loc.nodes : loc.node}`);