Kubernetes use env var based secrets
parent
06c3e2d4f9
commit
894df467c5
|
|
@ -1946,12 +1946,6 @@ class KubernetesJobSpecFactory {
|
|||
claimName: pvcName,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'credentials',
|
||||
secret: {
|
||||
secretName,
|
||||
},
|
||||
},
|
||||
],
|
||||
containers: [
|
||||
{
|
||||
|
|
@ -1980,11 +1974,6 @@ class KubernetesJobSpecFactory {
|
|||
name: 'build-mount',
|
||||
mountPath: `/${mountdir}`,
|
||||
},
|
||||
{
|
||||
name: 'credentials',
|
||||
mountPath: '/credentials',
|
||||
readOnly: true,
|
||||
},
|
||||
],
|
||||
lifecycle: {
|
||||
preStop: {
|
||||
|
|
@ -2405,17 +2394,10 @@ class CloudRunnerBuildCommandProcessor {
|
|||
static ProcessCommands(commands, buildParameters) {
|
||||
return `echo "---"
|
||||
echo "start"
|
||||
${CloudRunnerBuildCommandProcessor.GetSecrets(buildParameters)}
|
||||
${commands}
|
||||
echo "end--${buildParameters.logId}"
|
||||
`;
|
||||
}
|
||||
static GetSecrets(buildParameters) {
|
||||
return buildParameters.cloudRunnerCluster === `k8s`
|
||||
? `cd /credentials
|
||||
for f in ; do cat $f | base echo $f; done`
|
||||
: ``;
|
||||
}
|
||||
}
|
||||
exports.CloudRunnerBuildCommandProcessor = CloudRunnerBuildCommandProcessor;
|
||||
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -97,12 +97,6 @@ class KubernetesJobSpecFactory {
|
|||
claimName: pvcName,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'credentials',
|
||||
secret: {
|
||||
secretName,
|
||||
},
|
||||
},
|
||||
],
|
||||
containers: [
|
||||
{
|
||||
|
|
@ -132,11 +126,6 @@ class KubernetesJobSpecFactory {
|
|||
name: 'build-mount',
|
||||
mountPath: `/${mountdir}`,
|
||||
},
|
||||
{
|
||||
name: 'credentials',
|
||||
mountPath: '/credentials',
|
||||
readOnly: true,
|
||||
},
|
||||
],
|
||||
lifecycle: {
|
||||
preStop: {
|
||||
|
|
|
|||
|
|
@ -4,15 +4,8 @@ export class CloudRunnerBuildCommandProcessor {
|
|||
public static ProcessCommands(commands: string, buildParameters: BuildParameters): string {
|
||||
return `echo "---"
|
||||
echo "start"
|
||||
${CloudRunnerBuildCommandProcessor.GetSecrets(buildParameters)}
|
||||
${commands}
|
||||
echo "end--${buildParameters.logId}"
|
||||
`;
|
||||
}
|
||||
static GetSecrets(buildParameters: BuildParameters) {
|
||||
return buildParameters.cloudRunnerCluster === `k8s`
|
||||
? `cd /credentials
|
||||
for f in ; do cat $f | base echo $f; done`
|
||||
: ``;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue