Arc april updates (#15237)

* Enables being able to view and edit Coordinator node scheduling params (#15114)

* Trying to save per role settings

* Updated spec

* Cleaning up

* Removed unneccessary code and comments

* Added separate type for { w?: string, c?: string}, PR fixes

* Added methods to refresh mr,ml,cr,cl versus per role

* Fixed spec

* Put back optional properties, removed passing empty string to reset scheduling params

* Spacing

* vBump arc

* Included roles in fake show output for testing (#15196)

* Update arc specs (#15225)

* Update azdata Arc specs to match April azdata

* vcores -> cpu

* fix spacing

* Consolidate types and update storage volumes

* Fix compile

* Update min azdata version

Co-authored-by: nasc17 <69922333+nasc17@users.noreply.github.com>
Co-authored-by: nasc17 <nasc@microsoft.com>
This commit is contained in:
Charles Gagnon
2021-04-26 16:20:27 -07:00
committed by GitHub
parent 1e42f0b923
commit ef57812a95
13 changed files with 322 additions and 343 deletions

View File

@@ -58,8 +58,8 @@ export class PostgresModel extends ResourceModel {
/** Returns the IP address and port of Postgres */
public get endpoint(): { ip: string, port: string } | undefined {
return this._config?.status.externalEndpoint
? parseIpAndPort(this._config.status.externalEndpoint)
return this._config?.status.primaryEndpoint
? parseIpAndPort(this._config.status.primaryEndpoint)
: undefined;
}
@@ -73,9 +73,9 @@ export class PostgresModel extends ResourceModel {
const ramLimit = this._config.spec.scheduling?.default?.resources?.limits?.memory;
const cpuRequest = this._config.spec.scheduling?.default?.resources?.requests?.cpu;
const ramRequest = this._config.spec.scheduling?.default?.resources?.requests?.memory;
const dataStorage = this._config.spec.storage?.data?.size;
const logStorage = this._config.spec.storage?.logs?.size;
const backupsStorage = this._config.spec.storage?.backups?.size;
const dataStorage = this._config.spec.storage?.data?.volumes?.[0]?.size;
const logStorage = this._config.spec.storage?.logs?.volumes?.[0]?.size;
const backupsStorage = this._config.spec.storage?.backups?.volumes?.[0]?.size;
// scale.shards was renamed to scale.workers. Check both for backwards compatibility.
const scale = this._config.spec.scale;
@@ -184,7 +184,7 @@ export class PostgresModel extends ResourceModel {
}
protected createConnectionProfile(): azdata.IConnectionProfile {
const ipAndPort = parseIpAndPort(this.config?.status.externalEndpoint || '');
const ipAndPort = parseIpAndPort(this.config?.status.primaryEndpoint || '');
return {
serverName: `${ipAndPort.ip},${ipAndPort.port}`,
databaseName: '',