Skip to content
This repository has been archived by the owner on Aug 13, 2024. It is now read-only.

Commit

Permalink
poc: add ns
Browse files Browse the repository at this point in the history
  • Loading branch information
yyewolf committed Jul 13, 2024
1 parent 02b4dbc commit 25eed12
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/server/src/k8s/const.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ export const LABEL_EGRESS = 'klodd.tjcsec.club/egress'
export const LABEL_MANAGED_BY = 'app.kubernetes.io/managed-by'
export const LABEL_MANAGED_BY_VALUE = 'klodd'
export const ANNOTATION_TTL = 'klodd.tjcsec.club/ttl'
export const ANNOTATION_NS = 'io.kubernetes.cri-o.userns-mode'
6 changes: 5 additions & 1 deletion packages/server/src/k8s/manifest.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import crypto from 'crypto'
import config from '../config.js'
import {
ANNOTATION_TTL,
ANNOTATION_NS,
LABEL_CHALLENGE,
LABEL_EGRESS,
LABEL_INSTANCE,
Expand All @@ -29,7 +30,7 @@ export const makeNamespaceManifest = ({ name, labels, timeout }) => ({
metadata: {
name,
labels,
annotations: { [ANNOTATION_TTL]: timeout.toString() },
annotations: { [ANNOTATION_TTL]: timeout.toString(), [ANNOTATION_NS]: 'auto:size=65536' },
},
})

Expand Down Expand Up @@ -112,6 +113,9 @@ export const makeDeploymentFactory =
[LABEL_POD]: name,
...commonLabels,
},
annotations: {
[ANNOTATION_NS]: 'auto:size=65536',
},
},
spec: {
replicas: 1,
Expand Down

0 comments on commit 25eed12

Please sign in to comment.