list k8s
parent
4ec9743235
commit
0d4dcfdd33
|
|
@ -2974,10 +2974,17 @@ class Kubernetes {
|
|||
this.kubeConfig.loadFromDefault();
|
||||
this.kubeClient = this.kubeConfig.makeApiClient(k8s.CoreV1Api);
|
||||
this.kubeClientBatch = this.kubeConfig.makeApiClient(k8s.BatchV1Api);
|
||||
this.namespace = 'default';
|
||||
cloud_runner_logger_1.default.log('Loaded default Kubernetes configuration for this environment');
|
||||
}
|
||||
listResources() {
|
||||
throw new Error('Method not implemented.');
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
yield this.kubeClient.listNamespacedPod(this.namespace);
|
||||
yield this.kubeClient.listNamespacedServiceAccount(this.namespace);
|
||||
yield this.kubeClient.listNamespacedSecret(this.namespace);
|
||||
yield this.kubeClientBatch.listNamespacedJob(this.namespace);
|
||||
return [];
|
||||
});
|
||||
}
|
||||
inspectResources() {
|
||||
throw new Error('Method not implemented.');
|
||||
|
|
@ -3011,7 +3018,6 @@ class Kubernetes {
|
|||
defaultSecretsArray) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
try {
|
||||
this.namespace = 'default';
|
||||
this.buildParameters = buildParameters;
|
||||
const id = buildParameters.retainWorkspace ? cloud_runner_1.default.lockedWorkspace : buildParameters.buildGuid;
|
||||
this.pvcName = `unity-builder-pvc-${id}`;
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -36,11 +36,17 @@ class Kubernetes implements ProviderInterface {
|
|||
this.kubeConfig.loadFromDefault();
|
||||
this.kubeClient = this.kubeConfig.makeApiClient(k8s.CoreV1Api);
|
||||
this.kubeClientBatch = this.kubeConfig.makeApiClient(k8s.BatchV1Api);
|
||||
this.namespace = 'default';
|
||||
CloudRunnerLogger.log('Loaded default Kubernetes configuration for this environment');
|
||||
}
|
||||
|
||||
listResources(): Promise<ProviderResource[]> {
|
||||
throw new Error('Method not implemented.');
|
||||
async listResources(): Promise<ProviderResource[]> {
|
||||
await this.kubeClient.listNamespacedPod(this.namespace);
|
||||
await this.kubeClient.listNamespacedServiceAccount(this.namespace);
|
||||
await this.kubeClient.listNamespacedSecret(this.namespace);
|
||||
await this.kubeClientBatch.listNamespacedJob(this.namespace);
|
||||
|
||||
return [];
|
||||
}
|
||||
inspectResources(): Promise<ProviderResource> {
|
||||
throw new Error('Method not implemented.');
|
||||
|
|
@ -77,7 +83,6 @@ class Kubernetes implements ProviderInterface {
|
|||
defaultSecretsArray: { ParameterKey: string; EnvironmentVariable: string; ParameterValue: string }[],
|
||||
) {
|
||||
try {
|
||||
this.namespace = 'default';
|
||||
this.buildParameters = buildParameters;
|
||||
const id = buildParameters.retainWorkspace ? CloudRunner.lockedWorkspace : buildParameters.buildGuid;
|
||||
this.pvcName = `unity-builder-pvc-${id}`;
|
||||
|
|
|
|||
Loading…
Reference in New Issue