@kapeta/local-cluster-service 0.5.2 → 0.5.4
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/CHANGELOG.md +14 -0
- package/package.json +2 -2
- package/src/assetManager.js +1 -1
- package/src/codeGeneratorManager.js +1 -1
- package/src/containerManager.js +8 -2
- package/src/operatorManager.js +4 -3
- package/src/providerManager.js +1 -1
- package/src/storageService.js +1 -1
package/CHANGELOG.md
CHANGED
@@ -1,3 +1,17 @@
|
|
1
|
+
## [0.5.4](https://github.com/kapetacom/local-cluster-service/compare/v0.5.3...v0.5.4) (2023-06-16)
|
2
|
+
|
3
|
+
|
4
|
+
### Bug Fixes
|
5
|
+
|
6
|
+
* handle ESM version of local-cluster-config ([08cd97e](https://github.com/kapetacom/local-cluster-service/commit/08cd97e4fa04d666105809b92c267953cf3d646b))
|
7
|
+
|
8
|
+
## [0.5.3](https://github.com/kapetacom/local-cluster-service/compare/v0.5.2...v0.5.3) (2023-06-09)
|
9
|
+
|
10
|
+
|
11
|
+
### Bug Fixes
|
12
|
+
|
13
|
+
* Make sure bound ports are exposed and ([#29](https://github.com/kapetacom/local-cluster-service/issues/29)) ([fe088b4](https://github.com/kapetacom/local-cluster-service/commit/fe088b424fa159ca1d04e721ace4558a778c5dcd))
|
14
|
+
|
1
15
|
## [0.5.2](https://github.com/kapetacom/local-cluster-service/compare/v0.5.1...v0.5.2) (2023-06-06)
|
2
16
|
|
3
17
|
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@kapeta/local-cluster-service",
|
3
|
-
"version": "0.5.
|
3
|
+
"version": "0.5.4",
|
4
4
|
"description": "Manages configuration, ports and service discovery for locally running Kapeta systems",
|
5
5
|
"main": "index.js",
|
6
6
|
"repository": {
|
@@ -22,7 +22,7 @@
|
|
22
22
|
"homepage": "https://github.com/kapetacom/local-cluster-service#readme",
|
23
23
|
"dependencies": {
|
24
24
|
"@kapeta/codegen": "<2",
|
25
|
-
"@kapeta/local-cluster-config": ">= 0.
|
25
|
+
"@kapeta/local-cluster-config": ">= 0.2.3 <2",
|
26
26
|
"@kapeta/nodejs-api-client": "<2",
|
27
27
|
"@kapeta/nodejs-registry-utils": "<2",
|
28
28
|
"@kapeta/nodejs-utils": "<2",
|
package/src/assetManager.js
CHANGED
@@ -2,7 +2,7 @@ const Path = require("node:path");
|
|
2
2
|
const FS = require('node:fs');
|
3
3
|
const FSExtra = require('fs-extra');
|
4
4
|
const YAML = require('yaml');
|
5
|
-
const ClusterConfiguration = require('@kapeta/local-cluster-config');
|
5
|
+
const ClusterConfiguration = require('@kapeta/local-cluster-config').default;
|
6
6
|
const {Actions} = require('@kapeta/nodejs-registry-utils');
|
7
7
|
const codeGeneratorManager = require('./codeGeneratorManager');
|
8
8
|
const progressListener = require('./progressListener');
|
@@ -1,7 +1,7 @@
|
|
1
1
|
const Path = require('path');
|
2
2
|
|
3
3
|
const {registry:Targets, BlockCodeGenerator, CodeWriter} = require('@kapeta/codegen');
|
4
|
-
const ClusterConfiguration = require('@kapeta/local-cluster-config');
|
4
|
+
const ClusterConfiguration = require('@kapeta/local-cluster-config').default;
|
5
5
|
const TARGET_KIND = 'core/language-target';
|
6
6
|
const BLOCK_TYPE_KIND = 'core/block-type';
|
7
7
|
|
package/src/containerManager.js
CHANGED
@@ -7,7 +7,7 @@ const storageService = require('./storageService');
|
|
7
7
|
const mkdirp = require('mkdirp');
|
8
8
|
const { parseKapetaUri } = require('@kapeta/nodejs-utils');
|
9
9
|
|
10
|
-
const ClusterConfiguration = require('@kapeta/local-cluster-config');
|
10
|
+
const ClusterConfiguration = require('@kapeta/local-cluster-config').default;
|
11
11
|
|
12
12
|
const LABEL_PORT_PREFIX = 'kapeta_port-';
|
13
13
|
|
@@ -54,6 +54,8 @@ class ContainerManager {
|
|
54
54
|
// Default http
|
55
55
|
{ protocol: 'http', host: 'localhost', port: 2375 },
|
56
56
|
{ protocol: 'https', host: 'localhost', port: 2376 },
|
57
|
+
{ protocol: 'http', host: '127.0.0.1', port: 2375 },
|
58
|
+
{ protocol: 'https', host: '127.0.0.1', port: 2376 },
|
57
59
|
];
|
58
60
|
for (const opts of connectOptions) {
|
59
61
|
try {
|
@@ -197,7 +199,10 @@ class ContainerManager {
|
|
197
199
|
|
198
200
|
console.log('Image pulled: %s', image);
|
199
201
|
|
202
|
+
const ExposedPorts = {};
|
203
|
+
|
200
204
|
_.forEach(opts.ports, (portInfo, containerPort) => {
|
205
|
+
ExposedPorts['' + containerPort] = {};
|
201
206
|
PortBindings['' + containerPort] = [
|
202
207
|
{
|
203
208
|
HostPort: '' + portInfo.hostPort,
|
@@ -219,11 +224,12 @@ class ContainerManager {
|
|
219
224
|
if (opts.health) {
|
220
225
|
HealthCheck = this.toDockerHealth(opts.health);
|
221
226
|
}
|
222
|
-
|
223
227
|
const dockerContainer = await this.startContainer({
|
224
228
|
name: name,
|
225
229
|
Image: image,
|
226
230
|
Labels,
|
231
|
+
Cmd: opts.cmd,
|
232
|
+
ExposedPorts,
|
227
233
|
Env,
|
228
234
|
HealthCheck,
|
229
235
|
HostConfig: {
|
package/src/operatorManager.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
const ClusterConfiguration = require('@kapeta/local-cluster-config');
|
1
|
+
const ClusterConfiguration = require('@kapeta/local-cluster-config').default;
|
2
2
|
const serviceManager = require('./serviceManager');
|
3
3
|
const storageService = require('./storageService');
|
4
4
|
const containerManager = require('./containerManager');
|
@@ -88,7 +88,7 @@ class OperatorManager {
|
|
88
88
|
const dbName = name + '_' + fromServiceId.replace(/[^a-z0-9]/gi, '');
|
89
89
|
|
90
90
|
return {
|
91
|
-
host: environment === 'docker' ? 'host.docker.internal' : '
|
91
|
+
host: environment === 'docker' ? 'host.docker.internal' : '127.0.0.1',
|
92
92
|
port: portInfo.hostPort,
|
93
93
|
type: portType,
|
94
94
|
protocol: portInfo.protocol,
|
@@ -163,7 +163,8 @@ class OperatorManager {
|
|
163
163
|
mounts,
|
164
164
|
ports,
|
165
165
|
health: operatorData.health,
|
166
|
-
env: operatorData.env
|
166
|
+
env: operatorData.env,
|
167
|
+
cmd: operatorData.cmd
|
167
168
|
});
|
168
169
|
}
|
169
170
|
|
package/src/providerManager.js
CHANGED
@@ -2,7 +2,7 @@ const FS = require('fs');
|
|
2
2
|
const Path = require('path');
|
3
3
|
const FSExtra = require('fs-extra');
|
4
4
|
const repositoryManager = require('./repositoryManager')
|
5
|
-
const ClusterConfiguration = require('@kapeta/local-cluster-config');
|
5
|
+
const ClusterConfiguration = require('@kapeta/local-cluster-config').default;
|
6
6
|
|
7
7
|
class ProviderManager {
|
8
8
|
|
package/src/storageService.js
CHANGED
@@ -2,7 +2,7 @@ const _ = require('lodash');
|
|
2
2
|
const FS = require('fs');
|
3
3
|
const mkdirp = require('mkdirp');
|
4
4
|
const YAML = require('yaml');
|
5
|
-
const ClusterConfiguration = require('@kapeta/local-cluster-config');
|
5
|
+
const ClusterConfiguration = require('@kapeta/local-cluster-config').default;
|
6
6
|
|
7
7
|
/**
|
8
8
|
* Class that handles reading and writing from local configuration file.
|