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