pepr 0.52.3-nightly.1 → 0.52.3-nightly.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/build/index.d.ts.map +1 -1
- package/dist/cli/init/createProjectFiles.d.ts +3 -0
- package/dist/cli/init/createProjectFiles.d.ts.map +1 -0
- package/dist/cli/init/doPostInitActions.d.ts +2 -0
- package/dist/cli/init/doPostInitActions.d.ts.map +1 -0
- package/dist/cli/init/index.d.ts +1 -1
- package/dist/cli/init/index.d.ts.map +1 -1
- package/dist/cli/init/setupProjectStructure.d.ts +2 -0
- package/dist/cli/init/setupProjectStructure.d.ts.map +1 -0
- package/dist/cli/init/templates.d.ts +3 -9
- package/dist/cli/init/templates.d.ts.map +1 -1
- package/dist/cli/init/walkthrough.d.ts.map +1 -1
- package/dist/cli.js +101 -88
- package/dist/controller.js +1 -1
- package/dist/lib/controller/index.d.ts.map +1 -1
- package/dist/lib.js +1 -0
- package/dist/lib.js.map +2 -2
- package/package.json +8 -14
- package/src/cli/build/index.ts +0 -1
- package/src/cli/init/createProjectFiles.ts +45 -0
- package/src/cli/init/doPostInitActions.ts +23 -0
- package/src/cli/init/index.ts +18 -84
- package/src/cli/init/setupProjectStructure.ts +8 -0
- package/src/cli/init/templates.ts +2 -4
- package/src/cli/init/walkthrough.ts +3 -0
- package/src/cli.ts +1 -1
- package/src/lib/assets/k8sObjects.ts +6 -6
- package/src/lib/assets/yaml/overridesFile.ts +6 -6
- package/src/lib/controller/index.ts +1 -0
package/package.json
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"!src/fixtures/**",
|
|
17
17
|
"!dist/**/*.test.d.ts*"
|
|
18
18
|
],
|
|
19
|
-
"version": "0.52.3-nightly.
|
|
19
|
+
"version": "0.52.3-nightly.10",
|
|
20
20
|
"main": "dist/lib.js",
|
|
21
21
|
"types": "dist/lib.d.ts",
|
|
22
22
|
"scripts": {
|
|
@@ -24,6 +24,9 @@
|
|
|
24
24
|
"build:image": "npm run build && docker buildx build --output type=docker --tag pepr:dev .",
|
|
25
25
|
"build:image:unicorn": "npm run build && docker buildx build --output type=docker --tag pepr/private:dev $(node scripts/read-unicorn-build-args.mjs) .",
|
|
26
26
|
"ci": "npm ci",
|
|
27
|
+
"cluster:k3d": "k3d cluster delete pepr-dev && k3d cluster create pepr-dev --k3s-arg '--debug@server:0' --wait && kubectl rollout status deployment -n kube-system",
|
|
28
|
+
"cluster:k3d:import-upstream": "npm run build && docker buildx build --output type=docker --tag pepr:dev . && k3d image import pepr:dev -c pepr-dev",
|
|
29
|
+
"cluster:k3d:import-unicorn": "npm run build && docker buildx build --output type=docker --tag pepr/private:dev $(node scripts/read-unicorn-build-args.mjs) . && k3d image import pepr/private:dev -c pepr-dev",
|
|
27
30
|
"format:check": "npm run format:src && npm run format:tests && npm run format:markdown && npm run format:integration && npm run format:prettier -- --check",
|
|
28
31
|
"format:fix": "npm run format:src -- --fix && npm run format:markdown -- --fix && npm run format:integration -- --fix && npm run format:prettier -- --write",
|
|
29
32
|
"format:integration": "eslint --config config/eslint.integration.config.mjs integration/cli integration/helpers",
|
|
@@ -35,24 +38,15 @@
|
|
|
35
38
|
"prebuild": "rm -fr dist/* && npm run gen-data-json",
|
|
36
39
|
"prepare": "if [ \"$NODE_ENV\" != 'production' ]; then husky; fi",
|
|
37
40
|
"set:version": "node scripts/set-version.js",
|
|
38
|
-
"test": "npm run test:unit && npm run test:
|
|
41
|
+
"test": "npm run test:unit && npm run test:integration",
|
|
39
42
|
"test:artifacts": "npm run build && vitest run src/build-artifact.test.ts",
|
|
40
43
|
"test:docs": "vitest run --config=config/vitest.integration.config.ts integration/cli/docs/*.test.ts",
|
|
41
44
|
"test:integration": "npm run test:integration:prep && npm run test:integration:run",
|
|
42
45
|
"test:integration:prep": "./integration/prep.sh",
|
|
43
46
|
"test:integration:run": "vitest run --config=config/vitest.integration.config.ts integration",
|
|
44
|
-
"test:journey": "npm run test:journey:k3d && npm run build && npm run test:journey:image && npm run test:journey:run",
|
|
45
|
-
"test:journey-wasm": "npm run test:journey:k3d && npm run build && npm run test:journey:image && npm run test:journey:run-wasm",
|
|
46
|
-
"test:journey-wasm:unicorn": "npm run test:journey:k3d && npm run build && npm run test:journey:image:unicorn && npm run test:journey:run-wasm",
|
|
47
|
-
"test:journey:image": "npm run build && docker buildx build --output type=docker --tag pepr:dev . && k3d image import pepr:dev -c pepr-dev",
|
|
48
|
-
"test:journey:image:unicorn": "npm run build && docker buildx build --output type=docker --tag pepr/private:dev $(node scripts/read-unicorn-build-args.mjs) . && k3d image import pepr/private:dev -c pepr-dev",
|
|
49
|
-
"test:journey:k3d": "k3d cluster delete pepr-dev && k3d cluster create pepr-dev --k3s-arg '--debug@server:0' --wait && kubectl rollout status deployment -n kube-system",
|
|
50
|
-
"test:journey:run": "vitest run --config=config/vitest.journey.config.ts journey/entrypoint.test.ts",
|
|
51
|
-
"test:journey:run-wasm": "vitest run --config=config/vitest.journey.config.ts journey/entrypoint-wasm.test.ts",
|
|
52
|
-
"test:journey:unicorn": "npm run test:journey:k3d && npm run test:journey:image:unicorn && npm run test:journey:run",
|
|
53
47
|
"test:unit": "npm run gen-data-json && NODE_OPTIONS=--no-deprecation vitest --config config/vitest.root.config.ts run --coverage",
|
|
54
|
-
"test:upgrade:unicorn": "npm run
|
|
55
|
-
"test:upgrade:upstream": "npm run
|
|
48
|
+
"test:upgrade:unicorn": "npm run cluster:k3d && npm run cluster:k3d:import-unicorn && vitest run integration/cluster/upgrade.test.ts",
|
|
49
|
+
"test:upgrade:upstream": "npm run cluster:k3d && npm run cluster:k3d:import-upstream && vitest run integration/cluster/upgrade.test.ts"
|
|
56
50
|
},
|
|
57
51
|
"dependencies": {
|
|
58
52
|
"@types/ramda": "0.31.0",
|
|
@@ -85,7 +79,7 @@
|
|
|
85
79
|
"globals": "^16.0.0",
|
|
86
80
|
"husky": "^9.1.6",
|
|
87
81
|
"js-yaml": "^4.1.0",
|
|
88
|
-
"shellcheck": "^
|
|
82
|
+
"shellcheck": "^4.1.0",
|
|
89
83
|
"tsx": "^4.20.3",
|
|
90
84
|
"undici": "^7.0.1",
|
|
91
85
|
"vitest": "^3.2.3"
|
package/src/cli/build/index.ts
CHANGED
|
@@ -101,7 +101,6 @@ export default function (program: Command): void {
|
|
|
101
101
|
|
|
102
102
|
if (opts.registryInfo !== undefined) {
|
|
103
103
|
Log.info(`Including ${cfg.pepr.includedFiles.length} files in controller image.`);
|
|
104
|
-
// for journey test to make sure the image is built
|
|
105
104
|
|
|
106
105
|
// only actually build/push if there are files to include
|
|
107
106
|
await handleCustomImageBuild(
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { resolve } from "path/posix";
|
|
2
|
+
import {
|
|
3
|
+
peprPackageJSON,
|
|
4
|
+
gitignore,
|
|
5
|
+
eslint,
|
|
6
|
+
prettier,
|
|
7
|
+
readme,
|
|
8
|
+
tsConfig,
|
|
9
|
+
peprTSTemplate,
|
|
10
|
+
snippet,
|
|
11
|
+
codeSettings,
|
|
12
|
+
samplesYaml,
|
|
13
|
+
helloPepr,
|
|
14
|
+
} from "./templates";
|
|
15
|
+
import { write } from "./utils";
|
|
16
|
+
|
|
17
|
+
export async function createProjectFiles(
|
|
18
|
+
dirName: string,
|
|
19
|
+
packageJSON: peprPackageJSON,
|
|
20
|
+
): Promise<void> {
|
|
21
|
+
const files = [
|
|
22
|
+
{ path: gitignore.path, data: gitignore.data },
|
|
23
|
+
{ path: eslint.path, data: eslint.data },
|
|
24
|
+
{ path: prettier.path, data: prettier.data },
|
|
25
|
+
{ path: packageJSON.path, data: packageJSON.data },
|
|
26
|
+
{ path: readme.path, data: readme.data },
|
|
27
|
+
{ path: tsConfig.path, data: tsConfig.data },
|
|
28
|
+
{ path: peprTSTemplate.path, data: peprTSTemplate.data },
|
|
29
|
+
];
|
|
30
|
+
|
|
31
|
+
const nestedFiles = [
|
|
32
|
+
{ dir: ".vscode", path: snippet.path, data: snippet.data },
|
|
33
|
+
{ dir: ".vscode", path: codeSettings.path, data: codeSettings.data },
|
|
34
|
+
{ dir: "capabilities", path: samplesYaml.path, data: samplesYaml.data },
|
|
35
|
+
{ dir: "capabilities", path: helloPepr.path, data: helloPepr.data },
|
|
36
|
+
];
|
|
37
|
+
|
|
38
|
+
for (const file of files) {
|
|
39
|
+
await write(resolve(dirName, file.path), file.data);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
for (const file of nestedFiles) {
|
|
43
|
+
await write(resolve(dirName, file.dir, file.path), file.data);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { execSync } from "child_process";
|
|
2
|
+
|
|
3
|
+
export const doPostInitActions = (dirName: string): void => {
|
|
4
|
+
// run npm install from the new directory
|
|
5
|
+
process.chdir(dirName);
|
|
6
|
+
execSync("npm install", {
|
|
7
|
+
stdio: "inherit",
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
// setup git
|
|
11
|
+
execSync("git init --initial-branch=main", {
|
|
12
|
+
stdio: "inherit",
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
// try to open vscode
|
|
16
|
+
try {
|
|
17
|
+
execSync("code .", {
|
|
18
|
+
stdio: "inherit",
|
|
19
|
+
});
|
|
20
|
+
} catch {
|
|
21
|
+
console.warn("VSCode was not found, IDE will not automatically open.");
|
|
22
|
+
}
|
|
23
|
+
};
|
package/src/cli/init/index.ts
CHANGED
|
@@ -1,35 +1,23 @@
|
|
|
1
1
|
// SPDX-License-Identifier: Apache-2.0
|
|
2
2
|
// SPDX-FileCopyrightText: 2023-Present The Pepr Authors
|
|
3
3
|
|
|
4
|
-
import { execSync } from "child_process";
|
|
5
|
-
import { resolve } from "path";
|
|
6
|
-
|
|
7
4
|
import { Command } from "commander";
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
eslint,
|
|
11
|
-
peprTSTemplate,
|
|
12
|
-
genPkgJSON,
|
|
13
|
-
gitignore,
|
|
14
|
-
helloPepr,
|
|
15
|
-
peprPackageJSON,
|
|
16
|
-
prettier,
|
|
17
|
-
readme,
|
|
18
|
-
samplesYaml,
|
|
19
|
-
snippet,
|
|
20
|
-
tsConfig,
|
|
21
|
-
} from "./templates";
|
|
22
|
-
import { createDir, sanitizeName, write } from "./utils";
|
|
5
|
+
import { peprTSTemplate, genPkgJSON } from "./templates";
|
|
6
|
+
import { sanitizeName } from "./utils";
|
|
23
7
|
import { confirm, PromptOptions, walkthrough } from "./walkthrough";
|
|
24
8
|
import { ErrorList } from "../../lib/errors";
|
|
25
9
|
import { UUID_LENGTH_LIMIT } from "./enums";
|
|
26
10
|
import { Option } from "commander";
|
|
11
|
+
import { setupProjectStructure } from "./setupProjectStructure";
|
|
12
|
+
import { doPostInitActions } from "./doPostInitActions";
|
|
13
|
+
import { createProjectFiles } from "./createProjectFiles";
|
|
14
|
+
import { v4 as uuidv4 } from "uuid";
|
|
15
|
+
import Log from "../../lib/telemetry/logger";
|
|
27
16
|
|
|
28
|
-
export default function (
|
|
17
|
+
export default function (): Command {
|
|
29
18
|
let response = {} as PromptOptions;
|
|
30
19
|
|
|
31
|
-
|
|
32
|
-
.command("init")
|
|
20
|
+
return new Command("init")
|
|
33
21
|
.description("Initialize a new Pepr Module")
|
|
34
22
|
.option("-d, --description <string>", "Explain the purpose of the new module.")
|
|
35
23
|
.addOption(
|
|
@@ -41,6 +29,10 @@ export default function (program: Command): void {
|
|
|
41
29
|
"-u, --uuid <string>",
|
|
42
30
|
"Unique identifier for your module with a max length of 36 characters.",
|
|
43
31
|
(uuid: string): string => {
|
|
32
|
+
if (typeof uuid === "undefined" || uuid === "") {
|
|
33
|
+
uuid = uuidv4();
|
|
34
|
+
Log.warn(`The UUID was empty. Generated new UUID: '${uuid}'`);
|
|
35
|
+
}
|
|
44
36
|
if (uuid.length > UUID_LENGTH_LIMIT) {
|
|
45
37
|
throw new Error("The UUID must be 36 characters or fewer.");
|
|
46
38
|
}
|
|
@@ -59,7 +51,7 @@ export default function (program: Command): void {
|
|
|
59
51
|
const confirmed = await confirm(dirName, packageJSON, peprTSTemplate.path, opts.yes);
|
|
60
52
|
|
|
61
53
|
if (confirmed) {
|
|
62
|
-
|
|
54
|
+
Log.info("Creating new Pepr module...");
|
|
63
55
|
|
|
64
56
|
try {
|
|
65
57
|
await setupProjectStructure(dirName);
|
|
@@ -69,69 +61,11 @@ export default function (program: Command): void {
|
|
|
69
61
|
doPostInitActions(dirName);
|
|
70
62
|
}
|
|
71
63
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
} catch (
|
|
75
|
-
|
|
76
|
-
console.error(`Error creating Pepr module:`, e);
|
|
77
|
-
}
|
|
78
|
-
process.exit(1);
|
|
64
|
+
Log.info(`New Pepr module created at ${dirName}`);
|
|
65
|
+
Log.info(`Open VSCode or your editor of choice in ${dirName} to get started!`);
|
|
66
|
+
} catch (error) {
|
|
67
|
+
throw new Error(`Error creating Pepr module:`, { cause: error });
|
|
79
68
|
}
|
|
80
69
|
}
|
|
81
70
|
});
|
|
82
71
|
}
|
|
83
|
-
|
|
84
|
-
async function setupProjectStructure(dirName: string): Promise<void> {
|
|
85
|
-
await createDir(dirName);
|
|
86
|
-
await createDir(resolve(dirName, ".vscode"));
|
|
87
|
-
await createDir(resolve(dirName, "capabilities"));
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
async function createProjectFiles(dirName: string, packageJSON: peprPackageJSON): Promise<void> {
|
|
91
|
-
const files = [
|
|
92
|
-
{ path: gitignore.path, data: gitignore.data },
|
|
93
|
-
{ path: eslint.path, data: eslint.data },
|
|
94
|
-
{ path: prettier.path, data: prettier.data },
|
|
95
|
-
{ path: packageJSON.path, data: packageJSON.data },
|
|
96
|
-
{ path: readme.path, data: readme.data },
|
|
97
|
-
{ path: tsConfig.path, data: tsConfig.data },
|
|
98
|
-
{ path: peprTSTemplate.path, data: peprTSTemplate.data },
|
|
99
|
-
];
|
|
100
|
-
|
|
101
|
-
const nestedFiles = [
|
|
102
|
-
{ dir: ".vscode", path: snippet.path, data: snippet.data },
|
|
103
|
-
{ dir: ".vscode", path: codeSettings.path, data: codeSettings.data },
|
|
104
|
-
{ dir: "capabilities", path: samplesYaml.path, data: samplesYaml.data },
|
|
105
|
-
{ dir: "capabilities", path: helloPepr.path, data: helloPepr.data },
|
|
106
|
-
];
|
|
107
|
-
|
|
108
|
-
for (const file of files) {
|
|
109
|
-
await write(resolve(dirName, file.path), file.data);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
for (const file of nestedFiles) {
|
|
113
|
-
await write(resolve(dirName, file.dir, file.path), file.data);
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
const doPostInitActions = (dirName: string): void => {
|
|
118
|
-
// run npm install from the new directory
|
|
119
|
-
process.chdir(dirName);
|
|
120
|
-
execSync("npm install", {
|
|
121
|
-
stdio: "inherit",
|
|
122
|
-
});
|
|
123
|
-
|
|
124
|
-
// setup git
|
|
125
|
-
execSync("git init --initial-branch=main", {
|
|
126
|
-
stdio: "inherit",
|
|
127
|
-
});
|
|
128
|
-
|
|
129
|
-
// try to open vscode
|
|
130
|
-
try {
|
|
131
|
-
execSync("code .", {
|
|
132
|
-
stdio: "inherit",
|
|
133
|
-
});
|
|
134
|
-
} catch {
|
|
135
|
-
console.warn("VSCode was not found, IDE will not automatically open.");
|
|
136
|
-
}
|
|
137
|
-
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { createDir } from "./utils";
|
|
2
|
+
import { resolve } from "path";
|
|
3
|
+
|
|
4
|
+
export async function setupProjectStructure(dirName: string): Promise<void> {
|
|
5
|
+
await createDir(dirName);
|
|
6
|
+
await createDir(resolve(dirName, ".vscode"));
|
|
7
|
+
await createDir(resolve(dirName, "capabilities"));
|
|
8
|
+
}
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
|
|
4
4
|
import { dumpYaml } from "@kubernetes/client-node";
|
|
5
5
|
import { inspect } from "util";
|
|
6
|
-
import { v4 as uuidv4 } from "uuid";
|
|
7
6
|
import { readFileSync } from "fs";
|
|
8
7
|
import path from "path";
|
|
9
8
|
|
|
@@ -50,8 +49,7 @@ export type peprPackageJSON = {
|
|
|
50
49
|
};
|
|
51
50
|
|
|
52
51
|
export function genPkgJSON(opts: InitOptions): peprPackageJSON {
|
|
53
|
-
|
|
54
|
-
const uuid = !opts.uuid ? uuidv4() : opts.uuid;
|
|
52
|
+
const uuid = opts.uuid;
|
|
55
53
|
// Generate a name for the module based on the module name
|
|
56
54
|
const name = sanitizeName(opts.name);
|
|
57
55
|
// Make typescript a dev dependency
|
|
@@ -91,7 +89,7 @@ export function genPkgJSON(opts: InitOptions): peprPackageJSON {
|
|
|
91
89
|
env: {},
|
|
92
90
|
},
|
|
93
91
|
scripts: {
|
|
94
|
-
"k3d-setup": scripts["
|
|
92
|
+
"k3d-setup": scripts["cluster:k3d"],
|
|
95
93
|
},
|
|
96
94
|
dependencies: {
|
|
97
95
|
pepr: version,
|
|
@@ -33,6 +33,9 @@ async function setUUID(uuid?: string): Promise<Answers<string>> {
|
|
|
33
33
|
name: "uuid",
|
|
34
34
|
message: "Enter a unique identifier for the new Pepr module.\n",
|
|
35
35
|
validate: (val: string) => {
|
|
36
|
+
if (typeof val === "undefined" || val === "") {
|
|
37
|
+
return "The UUID must be at least 1 character long";
|
|
38
|
+
}
|
|
36
39
|
return (
|
|
37
40
|
val.length <= UUID_LENGTH_LIMIT ||
|
|
38
41
|
`The UUID must be ${UUID_LENGTH_LIMIT} characters or fewer.`
|
package/src/cli.ts
CHANGED
|
@@ -30,6 +30,7 @@ program
|
|
|
30
30
|
.version(version)
|
|
31
31
|
.description(`Pepr (v${version}) - Type safe K8s middleware for humans`)
|
|
32
32
|
.addCommand(crd())
|
|
33
|
+
.addCommand(init())
|
|
33
34
|
.action(() => {
|
|
34
35
|
if (program.args.length < 1) {
|
|
35
36
|
console.log(banner);
|
|
@@ -41,7 +42,6 @@ program
|
|
|
41
42
|
}
|
|
42
43
|
});
|
|
43
44
|
|
|
44
|
-
init(program);
|
|
45
45
|
build(program);
|
|
46
46
|
deploy(program);
|
|
47
47
|
dev(program);
|
|
@@ -85,9 +85,9 @@ export function getWatcher(
|
|
|
85
85
|
serviceAccountName: name,
|
|
86
86
|
securityContext: {
|
|
87
87
|
runAsUser: image.includes("private") ? 1000 : 65532,
|
|
88
|
-
runAsGroup: 65532,
|
|
88
|
+
runAsGroup: image.includes("private") ? 1000 : 65532,
|
|
89
89
|
runAsNonRoot: true,
|
|
90
|
-
fsGroup: 65532,
|
|
90
|
+
fsGroup: image.includes("private") ? 1000 : 65532,
|
|
91
91
|
},
|
|
92
92
|
containers: [
|
|
93
93
|
{
|
|
@@ -128,7 +128,7 @@ export function getWatcher(
|
|
|
128
128
|
},
|
|
129
129
|
securityContext: {
|
|
130
130
|
runAsUser: image.includes("private") ? 1000 : 65532,
|
|
131
|
-
runAsGroup: 65532,
|
|
131
|
+
runAsGroup: image.includes("private") ? 1000 : 65532,
|
|
132
132
|
runAsNonRoot: true,
|
|
133
133
|
allowPrivilegeEscalation: false,
|
|
134
134
|
capabilities: {
|
|
@@ -228,9 +228,9 @@ export function getDeployment(
|
|
|
228
228
|
serviceAccountName: name,
|
|
229
229
|
securityContext: {
|
|
230
230
|
runAsUser: image.includes("private") ? 1000 : 65532,
|
|
231
|
-
runAsGroup: 65532,
|
|
231
|
+
runAsGroup: image.includes("private") ? 1000 : 65532,
|
|
232
232
|
runAsNonRoot: true,
|
|
233
|
-
fsGroup: 65532,
|
|
233
|
+
fsGroup: image.includes("private") ? 1000 : 65532,
|
|
234
234
|
},
|
|
235
235
|
containers: [
|
|
236
236
|
{
|
|
@@ -272,7 +272,7 @@ export function getDeployment(
|
|
|
272
272
|
env: genEnv(config),
|
|
273
273
|
securityContext: {
|
|
274
274
|
runAsUser: image.includes("private") ? 1000 : 65532,
|
|
275
|
-
runAsGroup: 65532,
|
|
275
|
+
runAsGroup: image.includes("private") ? 1000 : 65532,
|
|
276
276
|
runAsNonRoot: true,
|
|
277
277
|
allowPrivilegeEscalation: false,
|
|
278
278
|
capabilities: {
|
|
@@ -60,9 +60,9 @@ export async function overridesFile(
|
|
|
60
60
|
},
|
|
61
61
|
securityContext: {
|
|
62
62
|
runAsUser: image.includes("private") ? 1000 : 65532,
|
|
63
|
-
runAsGroup: 65532,
|
|
63
|
+
runAsGroup: image.includes("private") ? 1000 : 65532,
|
|
64
64
|
runAsNonRoot: true,
|
|
65
|
-
fsGroup: 65532,
|
|
65
|
+
fsGroup: image.includes("private") ? 1000 : 65532,
|
|
66
66
|
},
|
|
67
67
|
readinessProbe: {
|
|
68
68
|
httpGet: {
|
|
@@ -92,7 +92,7 @@ export async function overridesFile(
|
|
|
92
92
|
},
|
|
93
93
|
containerSecurityContext: {
|
|
94
94
|
runAsUser: image.includes("private") ? 1000 : 65532,
|
|
95
|
-
runAsGroup: 65532,
|
|
95
|
+
runAsGroup: image.includes("private") ? 1000 : 65532,
|
|
96
96
|
runAsNonRoot: true,
|
|
97
97
|
allowPrivilegeEscalation: false,
|
|
98
98
|
capabilities: {
|
|
@@ -128,9 +128,9 @@ export async function overridesFile(
|
|
|
128
128
|
},
|
|
129
129
|
securityContext: {
|
|
130
130
|
runAsUser: image.includes("private") ? 1000 : 65532,
|
|
131
|
-
runAsGroup: 65532,
|
|
131
|
+
runAsGroup: image.includes("private") ? 1000 : 65532,
|
|
132
132
|
runAsNonRoot: true,
|
|
133
|
-
fsGroup: 65532,
|
|
133
|
+
fsGroup: image.includes("private") ? 1000 : 65532,
|
|
134
134
|
},
|
|
135
135
|
readinessProbe: {
|
|
136
136
|
httpGet: {
|
|
@@ -160,7 +160,7 @@ export async function overridesFile(
|
|
|
160
160
|
},
|
|
161
161
|
containerSecurityContext: {
|
|
162
162
|
runAsUser: image.includes("private") ? 1000 : 65532,
|
|
163
|
-
runAsGroup: 65532,
|
|
163
|
+
runAsGroup: image.includes("private") ? 1000 : 65532,
|
|
164
164
|
runAsNonRoot: true,
|
|
165
165
|
allowPrivilegeEscalation: false,
|
|
166
166
|
capabilities: {
|
|
@@ -50,6 +50,7 @@ export class Controller {
|
|
|
50
50
|
const { beforeHook, afterHook, onReady } = hooks;
|
|
51
51
|
this.#config = config;
|
|
52
52
|
this.#capabilities = capabilities;
|
|
53
|
+
Log.info({ config }, "Controller configuration");
|
|
53
54
|
|
|
54
55
|
// Initialize the Pepr store for each capability
|
|
55
56
|
new StoreController(capabilities, `pepr-${config.uuid}-store`, () => {
|