Skip to content

Commit

Permalink
Merge pull request #24 from kubeshop/f1ames/feat/synchronizer-client-id
Browse files Browse the repository at this point in the history
Add client data to synchronizer instances
  • Loading branch information
f1ames authored Jan 2, 2024
2 parents 52bddcc + 2369ac5 commit 255406e
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 27 deletions.
47 changes: 27 additions & 20 deletions admission-controller/synchronizer/package-lock.json

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

11 changes: 6 additions & 5 deletions admission-controller/synchronizer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@
"license": "MIT",
"dependencies": {
"@kubernetes/client-node": "^0.19.0",
"@monokle/synchronizer": "^0.10.2",
"@monokle/synchronizer": "^0.13.0",
"lodash": "^4.17.21",
"pino": "^8.16.1",
"pino": "^8.17.1",
"yaml": "^2.3.4"
},
"devDependencies": {
"@types/lodash": "^4.14.200",
"@types/node": "^20.8.9",
"typescript": "^5.2.2"
"@types/git-url-parse": "^9.0.3",
"@types/lodash": "^4.14.202",
"@types/node": "^20.10.5",
"typescript": "^5.3.3"
}
}
7 changes: 5 additions & 2 deletions admission-controller/synchronizer/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const CLOUD_API_URL = process.env.MONOKLE_CLOUD_API_URL ?? '';

const COMMUNICATION_INTERVAL_SEC = 15;

const logger = pino({
const logger = pino<string>({
name: 'Monokle:Synchronizer',
level: LOG_LEVEL,
});
Expand All @@ -28,7 +28,10 @@ const tokenPath = path.join('/run/secrets/token', '.token');
kc.loadFromCluster();

const apiFetcher = new Fetcher(
new ApiHandler(CLOUD_API_URL),
new ApiHandler(CLOUD_API_URL, {
name: 'Monokle AdmissionController',
version: CURRENT_VERSION,
}),
);
const policyUpdater = new PolicyUpdater(kc, logger);

Expand Down

0 comments on commit 255406e

Please sign in to comment.