@underpostnet/underpost 2.8.5 → 2.8.6
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/.github/workflows/ghpkg.yml +1 -1
- package/.github/workflows/npmpkg.yml +1 -1
- package/.github/workflows/pwa-microservices-template.page.yml +1 -1
- package/.vscode/settings.json +4 -0
- package/CHANGELOG.md +24 -0
- package/bin/build.js +29 -4
- package/bin/deploy.js +70 -74
- package/bin/hwt.js +0 -10
- package/bin/index.js +54 -23
- package/bin/util.js +0 -7
- package/bin/vs.js +1 -0
- package/conf.js +0 -2
- package/docker-compose.yml +1 -1
- package/manifests/kind-config-dev.yaml +12 -0
- package/manifests/mongodb/kustomization.yaml +2 -2
- package/manifests/mongodb-4.4/kustomization.yaml +7 -0
- package/manifests/mongodb-4.4/service-deployment.yaml +63 -0
- package/package.json +9 -7
- package/src/cli/cluster.js +99 -51
- package/src/cli/cron.js +1 -1
- package/src/cli/db.js +102 -38
- package/src/cli/deploy.js +76 -35
- package/src/cli/fs.js +149 -0
- package/src/cli/image.js +50 -27
- package/src/cli/repository.js +21 -0
- package/src/cli/script.js +25 -1
- package/src/cli/test.js +39 -4
- package/src/client/components/core/CalendarCore.js +12 -1
- package/src/client/components/core/CommonJs.js +52 -1
- package/src/client/components/core/CssCore.js +2 -4
- package/src/client/components/core/Docs.js +1 -2
- package/src/client/components/core/Input.js +4 -2
- package/src/client/components/core/LoadingAnimation.js +8 -1
- package/src/client/components/core/Modal.js +30 -6
- package/src/client/components/core/Panel.js +8 -6
- package/src/client/components/core/PanelForm.js +23 -7
- package/src/client/services/core/core.service.js +15 -10
- package/src/client/ssr/Render.js +4 -1
- package/src/client/ssr/body/CacheControl.js +2 -3
- package/src/client/sw/default.sw.js +3 -3
- package/src/db/mongo/MongooseDB.js +17 -1
- package/src/index.js +9 -1
- package/src/server/backup.js +3 -3
- package/src/server/client-build.js +32 -23
- package/src/server/client-formatted.js +2 -1
- package/src/server/conf.js +17 -15
- package/src/server/dns.js +39 -46
- package/src/server/downloader.js +0 -8
- package/src/server/runtime.js +16 -1
- package/test/api.test.js +0 -8
- package/manifests/core/kustomization.yaml +0 -11
- package/manifests/core/underpost-engine-backup-access.yaml +0 -16
- package/manifests/core/underpost-engine-backup-pv-pvc.yaml +0 -22
- package/manifests/core/underpost-engine-headless-service.yaml +0 -10
- package/manifests/core/underpost-engine-mongodb-backup-cronjob.yaml +0 -40
- package/manifests/core/underpost-engine-mongodb-configmap.yaml +0 -26
- package/manifests/core/underpost-engine-statefulset.yaml +0 -91
- package/manifests/valkey/underpost-engine-valkey-service.yaml +0 -17
- package/manifests/valkey/underpost-engine-valkey-statefulset.yaml +0 -39
- /package/manifests/{core/underpost-engine-pv-pvc.yaml → mongodb-4.4/pv-pvc.yaml} +0 -0
package/src/server/dns.js
CHANGED
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
import axios from 'axios';
|
|
2
2
|
import dotenv from 'dotenv';
|
|
3
3
|
import fs from 'fs';
|
|
4
|
-
import https from 'https';
|
|
5
4
|
import validator from 'validator';
|
|
6
5
|
import { ip } from './network.js';
|
|
7
6
|
import { loggerFactory } from './logger.js';
|
|
8
|
-
import
|
|
9
|
-
|
|
10
|
-
const httpsAgent = new https.Agent({
|
|
11
|
-
rejectUnauthorized: false,
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
axios.defaults.httpsAgent = httpsAgent;
|
|
7
|
+
import UnderpostRootEnv from '../cli/env.js';
|
|
15
8
|
|
|
16
9
|
dotenv.config();
|
|
17
10
|
|
|
@@ -19,8 +12,8 @@ const logger = loggerFactory(import.meta);
|
|
|
19
12
|
|
|
20
13
|
class Dns {
|
|
21
14
|
static callback = async function (deployList) {
|
|
22
|
-
//
|
|
23
|
-
// LAN
|
|
15
|
+
// Network topology configuration:
|
|
16
|
+
// LAN -> [NAT-VPS](modem/router device) -> WAN
|
|
24
17
|
// enabled DMZ Host to proxy IP 80-443 (79-444) sometimes router block first port
|
|
25
18
|
// disabled local red DHCP
|
|
26
19
|
// verify inet ip proxy server address
|
|
@@ -30,47 +23,47 @@ class Dns {
|
|
|
30
23
|
// Forward the router's TCP/UDP ports to the LAN device's IP address
|
|
31
24
|
for (const _deployId of deployList.split(',')) {
|
|
32
25
|
const deployId = _deployId.trim();
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
26
|
+
const privateCronConfPath = `./engine-private/conf/${deployId}/conf.cron.json`;
|
|
27
|
+
const confCronPath = fs.existsSync(privateCronConfPath) ? privateCronConfPath : './conf/conf.cron.json';
|
|
28
|
+
const confCronData = JSON.parse(fs.readFileSync(confCronPath, 'utf8'));
|
|
36
29
|
|
|
37
|
-
|
|
30
|
+
let testIp;
|
|
38
31
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
const currentIp =
|
|
46
|
-
? fs.readFileSync(`./engine-private/deploy/${ipFileName}`, 'utf8')
|
|
47
|
-
: undefined;
|
|
32
|
+
try {
|
|
33
|
+
testIp = await ip.public.ipv4();
|
|
34
|
+
} catch (error) {
|
|
35
|
+
logger.error(error, { testIp, stack: error.stack });
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const currentIp = UnderpostRootEnv.API.get('ip');
|
|
48
39
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
40
|
+
if (testIp && typeof testIp === 'string' && validator.isIP(testIp) && currentIp !== testIp) {
|
|
41
|
+
logger.info(`new ip`, testIp);
|
|
42
|
+
for (const recordType of Object.keys(confCronData.records)) {
|
|
43
|
+
switch (recordType) {
|
|
44
|
+
case 'A':
|
|
45
|
+
for (const dnsProvider of confCronData.records[recordType]) {
|
|
46
|
+
if (typeof Dns.services.updateIp[dnsProvider.dns] === 'function')
|
|
47
|
+
await Dns.services.updateIp[dnsProvider.dns]({ ...dnsProvider, ip: testIp });
|
|
48
|
+
}
|
|
49
|
+
break;
|
|
59
50
|
|
|
60
|
-
|
|
61
|
-
|
|
51
|
+
default:
|
|
52
|
+
break;
|
|
53
|
+
}
|
|
62
54
|
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
55
|
+
try {
|
|
56
|
+
const ipUrlTest = `https://${process.env.DEFAULT_DEPLOY_HOST}`;
|
|
57
|
+
const response = await axios.get(ipUrlTest);
|
|
58
|
+
const verifyIp = response.request.socket.remoteAddress;
|
|
59
|
+
logger.info(ipUrlTest + ' verify ip', verifyIp);
|
|
60
|
+
if (verifyIp === testIp) {
|
|
61
|
+
logger.info('ip updated successfully', testIp);
|
|
62
|
+
UnderpostRootEnv.API.set('ip', testIp);
|
|
63
|
+
} else logger.error('ip not updated', testIp);
|
|
64
|
+
} catch (error) {
|
|
65
|
+
logger.error(error, error.stack);
|
|
66
|
+
logger.error('ip not updated', testIp);
|
|
74
67
|
}
|
|
75
68
|
}
|
|
76
69
|
}
|
package/src/server/downloader.js
CHANGED
|
@@ -2,16 +2,8 @@ import axios from 'axios';
|
|
|
2
2
|
import fs from 'fs';
|
|
3
3
|
import { loggerFactory } from './logger.js';
|
|
4
4
|
import dotenv from 'dotenv';
|
|
5
|
-
import https from 'https';
|
|
6
|
-
|
|
7
5
|
dotenv.config();
|
|
8
6
|
|
|
9
|
-
const httpsAgent = new https.Agent({
|
|
10
|
-
rejectUnauthorized: false,
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
axios.defaults.httpsAgent = httpsAgent;
|
|
14
|
-
|
|
15
7
|
const logger = loggerFactory(import.meta);
|
|
16
8
|
|
|
17
9
|
const Downloader = (url, fullPath, options = { method: 'get', responseType: 'stream' }) =>
|
package/src/server/runtime.js
CHANGED
|
@@ -19,7 +19,8 @@ import { DataBaseProvider } from '../db/DataBaseProvider.js';
|
|
|
19
19
|
import { createPeerServer } from './peer.js';
|
|
20
20
|
import { Lampp } from '../runtime/lampp/Lampp.js';
|
|
21
21
|
import { getDeployId } from './conf.js';
|
|
22
|
-
import { ssrFactory } from './client-formatted.js';
|
|
22
|
+
import { JSONweb, ssrFactory } from './client-formatted.js';
|
|
23
|
+
import Underpost from '../index.js';
|
|
23
24
|
|
|
24
25
|
dotenv.config();
|
|
25
26
|
|
|
@@ -384,6 +385,13 @@ const buildRuntime = async () => {
|
|
|
384
385
|
ssrPath,
|
|
385
386
|
ssrHeadComponents: '',
|
|
386
387
|
ssrBodyComponents: (await ssrFactory(`./src/client/ssr/body/404.js`))(),
|
|
388
|
+
renderPayload: {
|
|
389
|
+
apiBasePath: process.env.BASE_API,
|
|
390
|
+
version: Underpost.version,
|
|
391
|
+
},
|
|
392
|
+
renderApi: {
|
|
393
|
+
JSONweb,
|
|
394
|
+
},
|
|
387
395
|
});
|
|
388
396
|
const path404 = `${directory ? directory : `${getRootDirectory()}${rootHostPath}`}/404/index.html`;
|
|
389
397
|
const page404 = fs.existsSync(path404) ? `${path === '/' ? '' : path}/404` : undefined;
|
|
@@ -400,6 +408,13 @@ const buildRuntime = async () => {
|
|
|
400
408
|
ssrPath,
|
|
401
409
|
ssrHeadComponents: '',
|
|
402
410
|
ssrBodyComponents: (await ssrFactory(`./src/client/ssr/body/500.js`))(),
|
|
411
|
+
renderPayload: {
|
|
412
|
+
apiBasePath: process.env.BASE_API,
|
|
413
|
+
version: Underpost.version,
|
|
414
|
+
},
|
|
415
|
+
renderApi: {
|
|
416
|
+
JSONweb,
|
|
417
|
+
},
|
|
403
418
|
});
|
|
404
419
|
const path500 = `${directory ? directory : `${getRootDirectory()}${rootHostPath}`}/500/index.html`;
|
|
405
420
|
const page500 = fs.existsSync(path500) ? `${path === '/' ? '' : path}/500` : undefined;
|
package/test/api.test.js
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
import axios from 'axios';
|
|
4
4
|
import dotenv from 'dotenv';
|
|
5
|
-
import https from 'https';
|
|
6
5
|
|
|
7
6
|
import { expect } from 'chai';
|
|
8
7
|
import { loggerFactory } from '../src/server/logger.js';
|
|
@@ -20,13 +19,6 @@ const BASE_URL =
|
|
|
20
19
|
? `http://localhost:${PORT}/${process.env.BASE_API}`
|
|
21
20
|
: `https://www.nexodev.org/api`;
|
|
22
21
|
|
|
23
|
-
axios.defaults.baseURL = BASE_URL;
|
|
24
|
-
|
|
25
|
-
const httpsAgent = new https.Agent({
|
|
26
|
-
rejectUnauthorized: false,
|
|
27
|
-
});
|
|
28
|
-
axios.defaults.httpsAgent = httpsAgent;
|
|
29
|
-
|
|
30
22
|
describe(`GET 'Test' API Request `, async () => {
|
|
31
23
|
{
|
|
32
24
|
const url = `${BASE_URL}/test/youtube-id/?url=https://www.youtube.com/watch?v=o4f42SbyDMk`;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
# kubectl apply -k core/.
|
|
3
|
-
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
4
|
-
kind: Kustomization
|
|
5
|
-
resources:
|
|
6
|
-
- underpost-engine-pv-pvc.yaml
|
|
7
|
-
- underpost-engine-headless-service.yaml
|
|
8
|
-
- underpost-engine-statefulset.yaml
|
|
9
|
-
- underpost-engine-backup-pv-pvc.yaml
|
|
10
|
-
- underpost-engine-mongodb-backup-cronjob.yaml
|
|
11
|
-
- underpost-engine-backup-access.yaml
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
apiVersion: v1
|
|
2
|
-
kind: Pod
|
|
3
|
-
metadata:
|
|
4
|
-
name: backup-access
|
|
5
|
-
spec:
|
|
6
|
-
containers:
|
|
7
|
-
- name: busybox
|
|
8
|
-
image: busybox
|
|
9
|
-
command: ['sh', '-c', 'sleep 3600']
|
|
10
|
-
volumeMounts:
|
|
11
|
-
- name: backup-storage
|
|
12
|
-
mountPath: /backup
|
|
13
|
-
volumes:
|
|
14
|
-
- name: backup-storage
|
|
15
|
-
persistentVolumeClaim:
|
|
16
|
-
claimName: backup-pvc
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
apiVersion: v1
|
|
2
|
-
kind: PersistentVolume
|
|
3
|
-
metadata:
|
|
4
|
-
name: backup-pv
|
|
5
|
-
spec:
|
|
6
|
-
capacity:
|
|
7
|
-
storage: 5Gi
|
|
8
|
-
accessModes:
|
|
9
|
-
- ReadWriteOnce
|
|
10
|
-
hostPath:
|
|
11
|
-
path: /mnt/backup
|
|
12
|
-
---
|
|
13
|
-
apiVersion: v1
|
|
14
|
-
kind: PersistentVolumeClaim
|
|
15
|
-
metadata:
|
|
16
|
-
name: backup-pvc
|
|
17
|
-
spec:
|
|
18
|
-
accessModes:
|
|
19
|
-
- ReadWriteOnce
|
|
20
|
-
resources:
|
|
21
|
-
requests:
|
|
22
|
-
storage: 5Gi
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
apiVersion: batch/v1
|
|
2
|
-
kind: CronJob
|
|
3
|
-
metadata:
|
|
4
|
-
name: mongodb-backup
|
|
5
|
-
spec:
|
|
6
|
-
schedule: '*/5 * * * *' # Runs backup every five minutes
|
|
7
|
-
jobTemplate:
|
|
8
|
-
spec:
|
|
9
|
-
template:
|
|
10
|
-
spec:
|
|
11
|
-
containers:
|
|
12
|
-
- name: mongodump
|
|
13
|
-
image: docker.io/library/mongo:latest
|
|
14
|
-
command:
|
|
15
|
-
- sh
|
|
16
|
-
- -c
|
|
17
|
-
- |
|
|
18
|
-
# Perform backup
|
|
19
|
-
mongodump -u $MONGO_INITDB_ROOT_USERNAME -p $MONGO_INITDB_ROOT_PASSWORD --host=mongodb-service --port=27017 --out=/backup/$(date +\%Y-\%m-\%dT\%H-\%M-\%S)
|
|
20
|
-
# Remove backups older than 7 days
|
|
21
|
-
find /backup -type d -mtime +7 -exec rm -rf {} +
|
|
22
|
-
volumeMounts:
|
|
23
|
-
- name: backup-storage
|
|
24
|
-
mountPath: /backup
|
|
25
|
-
env:
|
|
26
|
-
- name: MONGO_INITDB_ROOT_USERNAME
|
|
27
|
-
valueFrom:
|
|
28
|
-
secretKeyRef:
|
|
29
|
-
name: mongodb-secret
|
|
30
|
-
key: username
|
|
31
|
-
- name: MONGO_INITDB_ROOT_PASSWORD
|
|
32
|
-
valueFrom:
|
|
33
|
-
secretKeyRef:
|
|
34
|
-
name: mongodb-secret
|
|
35
|
-
key: password
|
|
36
|
-
restartPolicy: Never
|
|
37
|
-
volumes:
|
|
38
|
-
- name: backup-storage
|
|
39
|
-
persistentVolumeClaim:
|
|
40
|
-
claimName: backup-pvc
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
# origin conf: /etc/mongod.conf
|
|
2
|
-
apiVersion: v1
|
|
3
|
-
kind: ConfigMap
|
|
4
|
-
metadata:
|
|
5
|
-
name: mongodb-config-file
|
|
6
|
-
namespace: default
|
|
7
|
-
data:
|
|
8
|
-
mongod.conf: |
|
|
9
|
-
storage:
|
|
10
|
-
dbPath: /data/db
|
|
11
|
-
systemLog:
|
|
12
|
-
destination: file
|
|
13
|
-
logAppend: true
|
|
14
|
-
path: /var/log/mongodb/mongod.log
|
|
15
|
-
replication:
|
|
16
|
-
replSetName: rs0
|
|
17
|
-
net:
|
|
18
|
-
bindIp: 127.0.0.1
|
|
19
|
-
port: 27017
|
|
20
|
-
processManagement:
|
|
21
|
-
fork: true
|
|
22
|
-
setParameter:
|
|
23
|
-
enableLocalhostAuthBypass: false
|
|
24
|
-
security:
|
|
25
|
-
authorization: enabled
|
|
26
|
-
keyFile: /etc/mongodb-keyfile
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
apiVersion: apps/v1
|
|
2
|
-
kind: StatefulSet
|
|
3
|
-
metadata:
|
|
4
|
-
name: mongodb # Specifies the name of the statefulset
|
|
5
|
-
spec:
|
|
6
|
-
serviceName: 'mongodb-service' # Specifies the service to use
|
|
7
|
-
replicas: 2
|
|
8
|
-
selector:
|
|
9
|
-
matchLabels:
|
|
10
|
-
app: mongodb
|
|
11
|
-
template:
|
|
12
|
-
metadata:
|
|
13
|
-
labels:
|
|
14
|
-
app: mongodb
|
|
15
|
-
spec:
|
|
16
|
-
containers:
|
|
17
|
-
- name: mongodb
|
|
18
|
-
image: docker.io/library/mongo:latest
|
|
19
|
-
command:
|
|
20
|
-
- mongod
|
|
21
|
-
- '--replSet'
|
|
22
|
-
- 'rs0'
|
|
23
|
-
# - '--config'
|
|
24
|
-
# - '-f'
|
|
25
|
-
# - '/etc/mongod.conf'
|
|
26
|
-
# - '--auth'
|
|
27
|
-
# - '--clusterAuthMode'
|
|
28
|
-
# - 'keyFile'
|
|
29
|
-
# - '--keyFile'
|
|
30
|
-
# - '/etc/mongodb-keyfile'
|
|
31
|
-
# - '--interleave'
|
|
32
|
-
# - 'all'
|
|
33
|
-
# - '--wiredTigerCacheSizeGB'
|
|
34
|
-
# - '0.25'
|
|
35
|
-
# - '--setParameter'
|
|
36
|
-
# - 'authenticationMechanisms=SCRAM-SHA-1'
|
|
37
|
-
# - '--fork'
|
|
38
|
-
- '--logpath'
|
|
39
|
-
- '/var/log/mongodb/mongod.log'
|
|
40
|
-
- '--bind_ip_all'
|
|
41
|
-
ports:
|
|
42
|
-
- containerPort: 27017
|
|
43
|
-
volumeMounts:
|
|
44
|
-
- name: mongodb-storage
|
|
45
|
-
mountPath: /data/db
|
|
46
|
-
- name: keyfile
|
|
47
|
-
mountPath: /etc/mongodb-keyfile
|
|
48
|
-
readOnly: true
|
|
49
|
-
# - name: mongodb-configuration-file
|
|
50
|
-
# mountPath: /etc/mongod.conf
|
|
51
|
-
# subPath: mongod.conf
|
|
52
|
-
# readOnly: true
|
|
53
|
-
# - name: mongodb-config
|
|
54
|
-
# mountPath: /config
|
|
55
|
-
env:
|
|
56
|
-
- name: MONGO_INITDB_ROOT_USERNAME
|
|
57
|
-
valueFrom:
|
|
58
|
-
secretKeyRef:
|
|
59
|
-
name: mongodb-secret
|
|
60
|
-
key: username
|
|
61
|
-
- name: MONGO_INITDB_ROOT_PASSWORD
|
|
62
|
-
valueFrom:
|
|
63
|
-
secretKeyRef:
|
|
64
|
-
name: mongodb-secret
|
|
65
|
-
key: password
|
|
66
|
-
resources:
|
|
67
|
-
requests:
|
|
68
|
-
cpu: '100m'
|
|
69
|
-
memory: '256Mi'
|
|
70
|
-
limits:
|
|
71
|
-
cpu: '500m'
|
|
72
|
-
memory: '512Mi'
|
|
73
|
-
volumes:
|
|
74
|
-
- name: keyfile
|
|
75
|
-
secret:
|
|
76
|
-
secretName: mongodb-keyfile
|
|
77
|
-
defaultMode: 0400
|
|
78
|
-
# - name: mongodb-configuration-file
|
|
79
|
-
# configMap:
|
|
80
|
-
# name: mongodb-config-file
|
|
81
|
-
# - name: mongodb-config
|
|
82
|
-
# configMap:
|
|
83
|
-
# name: mongodb-config
|
|
84
|
-
volumeClaimTemplates:
|
|
85
|
-
- metadata:
|
|
86
|
-
name: mongodb-storage
|
|
87
|
-
spec:
|
|
88
|
-
accessModes: ['ReadWriteOnce']
|
|
89
|
-
resources:
|
|
90
|
-
requests:
|
|
91
|
-
storage: 5Gi
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
apiVersion: v1
|
|
3
|
-
kind: Service
|
|
4
|
-
metadata:
|
|
5
|
-
name: service-valkey
|
|
6
|
-
namespace: default
|
|
7
|
-
spec:
|
|
8
|
-
ports:
|
|
9
|
-
- port: 6379
|
|
10
|
-
targetPort: 6379
|
|
11
|
-
selector:
|
|
12
|
-
app: service-valkey
|
|
13
|
-
ipFamilyPolicy: PreferDualStack
|
|
14
|
-
ipFamilies:
|
|
15
|
-
- IPv4
|
|
16
|
-
# - IPv6
|
|
17
|
-
type: ClusterIP
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
apiVersion: apps/v1
|
|
3
|
-
kind: StatefulSet
|
|
4
|
-
metadata:
|
|
5
|
-
name: service-valkey
|
|
6
|
-
namespace: default
|
|
7
|
-
spec:
|
|
8
|
-
serviceName: service-valkey
|
|
9
|
-
replicas: 1
|
|
10
|
-
selector:
|
|
11
|
-
matchLabels:
|
|
12
|
-
app: service-valkey
|
|
13
|
-
template:
|
|
14
|
-
metadata:
|
|
15
|
-
labels:
|
|
16
|
-
app: service-valkey
|
|
17
|
-
spec:
|
|
18
|
-
containers:
|
|
19
|
-
- name: service-valkey
|
|
20
|
-
image: docker.io/valkey/valkey:latest
|
|
21
|
-
env:
|
|
22
|
-
- name: TZ
|
|
23
|
-
value: Europe/Zurich
|
|
24
|
-
ports:
|
|
25
|
-
- containerPort: 6379
|
|
26
|
-
startupProbe:
|
|
27
|
-
tcpSocket:
|
|
28
|
-
port: 6379
|
|
29
|
-
failureThreshold: 30
|
|
30
|
-
periodSeconds: 5
|
|
31
|
-
timeoutSeconds: 5
|
|
32
|
-
livenessProbe:
|
|
33
|
-
tcpSocket:
|
|
34
|
-
port: 6379
|
|
35
|
-
failureThreshold: 2
|
|
36
|
-
periodSeconds: 30
|
|
37
|
-
timeoutSeconds: 5
|
|
38
|
-
restartPolicy: Always
|
|
39
|
-
automountServiceAccountToken: false
|
|
File without changes
|