stream logs through standard input and new remote client cli command
parent
9e7fad6a8a
commit
8a3a366186
|
@ -3348,7 +3348,9 @@ class Kubernetes {
|
|||
? cloud_runner_1.default.lockedWorkspace
|
||||
: this.buildParameters.buildGuid;
|
||||
this.pvcName = `unity-builder-pvc-${id}`;
|
||||
await kubernetes_storage_1.default.createPersistentVolumeClaim(this.buildParameters, this.pvcName, this.kubeClient, this.namespace);
|
||||
if (process.env['CLOUD_RUNNER_MINIKUBE']) {
|
||||
await kubernetes_storage_1.default.createPersistentVolumeClaim(this.buildParameters, this.pvcName, this.kubeClient, this.namespace);
|
||||
}
|
||||
this.buildGuid = buildGuid;
|
||||
this.secretName = `build-credentials-${this.buildGuid}`;
|
||||
this.jobName = `unity-builder-job-${this.buildGuid}`;
|
||||
|
@ -3575,6 +3577,15 @@ class KubernetesJobSpecFactory {
|
|||
},
|
||||
},
|
||||
};
|
||||
if (process.env['CLOUD_RUNNER_MINIKUBE']) {
|
||||
job.spec.template.spec.volumes[0] = {
|
||||
name: 'build-mount',
|
||||
hostPath: {
|
||||
path: `/data`,
|
||||
type: `Directory`,
|
||||
},
|
||||
};
|
||||
}
|
||||
job.spec.template.spec.containers[0].resources.requests[`ephemeral-storage`] = '10Gi';
|
||||
return job;
|
||||
}
|
||||
|
@ -3824,27 +3835,7 @@ class KubernetesStorage {
|
|||
},
|
||||
},
|
||||
};
|
||||
if (process.env['CLOUD_RUNNER_MINIKUBE']) {
|
||||
pvc.spec.storageClassName = `manual`;
|
||||
}
|
||||
const result = await kubeClient.createNamespacedPersistentVolumeClaim(namespace, pvc);
|
||||
if (process.env['CLOUD_RUNNER_MINIKUBE']) {
|
||||
const hostPathVolume = {
|
||||
metadata: {
|
||||
name: `${pvcName}-volume`,
|
||||
labels: {
|
||||
type: `local`,
|
||||
},
|
||||
},
|
||||
spec: {
|
||||
storageClassName: `manual`,
|
||||
capacity: { storage: `5Gi` },
|
||||
accessModes: ['ReadWriteOnce'],
|
||||
hostPath: { path: `/data/${pvcName}` },
|
||||
},
|
||||
};
|
||||
await kubeClient.createPersistentVolume(hostPathVolume);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
static async handleResult(result, kubeClient, namespace, pvcName) {
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -127,12 +127,14 @@ class Kubernetes implements ProviderInterface {
|
|||
? CloudRunner.lockedWorkspace
|
||||
: this.buildParameters.buildGuid;
|
||||
this.pvcName = `unity-builder-pvc-${id}`;
|
||||
await KubernetesStorage.createPersistentVolumeClaim(
|
||||
this.buildParameters,
|
||||
this.pvcName,
|
||||
this.kubeClient,
|
||||
this.namespace,
|
||||
);
|
||||
if (process.env['CLOUD_RUNNER_MINIKUBE']) {
|
||||
await KubernetesStorage.createPersistentVolumeClaim(
|
||||
this.buildParameters,
|
||||
this.pvcName,
|
||||
this.kubeClient,
|
||||
this.namespace,
|
||||
);
|
||||
}
|
||||
this.buildGuid = buildGuid;
|
||||
this.secretName = `build-credentials-${this.buildGuid}`;
|
||||
this.jobName = `unity-builder-job-${this.buildGuid}`;
|
||||
|
|
|
@ -107,6 +107,16 @@ class KubernetesJobSpecFactory {
|
|||
},
|
||||
};
|
||||
|
||||
if (process.env['CLOUD_RUNNER_MINIKUBE']) {
|
||||
job.spec.template.spec.volumes[0] = {
|
||||
name: 'build-mount',
|
||||
hostPath: {
|
||||
path: `/data`,
|
||||
type: `Directory`,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
job.spec.template.spec.containers[0].resources.requests[`ephemeral-storage`] = '10Gi';
|
||||
|
||||
return job;
|
||||
|
|
|
@ -94,27 +94,7 @@ class KubernetesStorage {
|
|||
},
|
||||
},
|
||||
};
|
||||
if (process.env['CLOUD_RUNNER_MINIKUBE']) {
|
||||
pvc.spec.storageClassName = `manual`;
|
||||
}
|
||||
const result = await kubeClient.createNamespacedPersistentVolumeClaim(namespace, pvc);
|
||||
if (process.env['CLOUD_RUNNER_MINIKUBE']) {
|
||||
const hostPathVolume = {
|
||||
metadata: {
|
||||
name: `${pvcName}-volume`,
|
||||
labels: {
|
||||
type: `local`,
|
||||
},
|
||||
},
|
||||
spec: {
|
||||
storageClassName: `manual`,
|
||||
capacity: { storage: `5Gi` },
|
||||
accessModes: ['ReadWriteOnce'],
|
||||
hostPath: { path: `/data/${pvcName}` },
|
||||
},
|
||||
};
|
||||
await kubeClient.createPersistentVolume(hostPathVolume);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue