Skip to content

Commit

Permalink
feat(k8s.construct.api): increase resources for database sync
Browse files Browse the repository at this point in the history
Signed-off-by: Braden Mars <[email protected]>
  • Loading branch information
BradenM committed Oct 4, 2024
1 parent 37d624a commit 3e09e61
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 10 additions & 1 deletion packages/k8s/construct/api/src/sync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
ContainerImage,
type ContainerImageProps,
} from '@crisiscleanup/k8s.construct.component'
import { Cron, type CronOptions, Duration } from 'cdk8s'
import { Cron, type CronOptions, Duration, Size } from 'cdk8s'
import * as kplus from 'cdk8s-plus-27'
import { RestartPolicy } from 'cdk8s-plus-27'
import { Construct } from 'constructs'
Expand Down Expand Up @@ -67,6 +67,15 @@ export class DatabaseSync extends Construct {
command: ['python'],
args: syncArgs,
volumeMounts: [{ path: '/tmp', volume: configVolume }],
resources: {
cpu: {
request: kplus.Cpu.units(2),
},
memory: {
request: Size.gibibytes(1),
limit: Size.gibibytes(2),
},
},
})
this.syncCronJob.addVolume(configVolume)
}
Expand Down
Loading

0 comments on commit 3e09e61

Please sign in to comment.