Skip to content

Commit

Permalink
fix(k8s.construct.api): do not pass spread prop down, remove farget a…
Browse files Browse the repository at this point in the history
…ffinity

Signed-off-by: Braden Mars <bradenmars@bradenmars.me>
  • Loading branch information
BradenM committed Sep 1, 2023
1 parent 146af85 commit cc38632
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions packages/k8s/construct/api/src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ export abstract class ApiComponent<
readonly id: string,
props: PropsT,
) {
const propsWithDefaults = defu(props, {
const { spread, ...restProps } = props
const propsWithDefaults = defu(restProps as typeof props, {
containerDefaults: {
resources: {
cpu: {
Expand All @@ -110,13 +111,6 @@ export abstract class ApiComponent<
if (!config) throw Error('Failed to resolve ApiConfig!')
this.config = config
if (props.spread) {
this.deployment.scheduling.attract(
kplus.Node.labeled(
kplus.NodeLabelQuery.notIn('eks.amazonaws.com/compute-type', [
'fargate',
]),
),
)
const topoPatch = JsonPatch.add(
'/spec/template/spec/topologySpreadConstraints',
[
Expand Down

0 comments on commit cc38632

Please sign in to comment.