@codefresh-io/kube-integration 1.33.5 → 1.33.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/.deploy/kube-integration/values.yaml +2 -0
- package/.nvmrc +1 -1
- package/Dockerfile +19 -29
- package/config/index.js +5 -0
- package/infra/express.js +7 -0
- package/package.json +8 -6
- package/service.yaml +1 -1
|
@@ -158,6 +158,8 @@ container:
|
|
|
158
158
|
NODE_ENV: kubernetes
|
|
159
159
|
PORT: '{{ .Values.global.kubeIntegrationPort }}'
|
|
160
160
|
SERVICE_NAME: '{{ include (printf "cf-common-%s.names.name" (index .Subcharts "cf-common").Chart.Version) . }}'
|
|
161
|
+
URI_QUERY_MAX_ITEMS: "{{ .Values.global.uriQueryMaxItems }}"
|
|
162
|
+
URI_QUERY_ARRAY_MAX_ITEMS: "{{ .Values.global.uriQueryArrayMaxItems }}"
|
|
161
163
|
|
|
162
164
|
extraEnv:
|
|
163
165
|
EVENTBUS_URI: $(RABBITMQ_PROTOCOL)://$(RABBITMQ_USERNAME):$(RABBITMQ_PASSWORD)@$(RABBITMQ_HOSTNAME)
|
package/.nvmrc
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
v22
|
|
1
|
+
v22
|
package/Dockerfile
CHANGED
|
@@ -1,37 +1,27 @@
|
|
|
1
|
-
|
|
1
|
+
# DHI source: https://hub.docker.com/repository/docker/octopusdeploy/dhi-node/customizations/4261306004513414271
|
|
2
|
+
ARG DHI_NODE_TAG=22.22.0-alpine3.22
|
|
3
|
+
ARG DHI_NODE_CUSTOMIZATION=cf-kube-integration-node22-alpine
|
|
2
4
|
|
|
3
|
-
ARG TARGETPLATFORM
|
|
4
|
-
ARG TARGETARCH
|
|
5
|
-
RUN printf "Building for TARGETPLATFORM=${TARGETPLATFORM}" \
|
|
6
|
-
&& printf ", TARGETARCH=${TARGETARCH}"
|
|
7
5
|
|
|
6
|
+
FROM octopusdeploy/dhi-node:${DHI_NODE_TAG}-dev AS prod-deps
|
|
8
7
|
WORKDIR /kube-integration
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
RUN apk add --no-cache \
|
|
9
|
+
make \
|
|
10
|
+
python3 \
|
|
11
|
+
g++ \
|
|
12
|
+
krb5-dev \
|
|
13
|
+
git
|
|
12
14
|
COPY package.json yarn.lock ./
|
|
15
|
+
RUN yarn install --production --frozen-lockfile
|
|
16
|
+
RUN mkdir /logs
|
|
13
17
|
|
|
14
|
-
# install required binaries
|
|
15
|
-
RUN apk add --no-cache --virtual deps make python3 g++ krb5-dev git && \
|
|
16
|
-
rm -rf node_modules && \
|
|
17
|
-
npm uninstall -g npm && \
|
|
18
|
-
yarn install --production --frozen-lockfile && \
|
|
19
|
-
yarn cache clean && \
|
|
20
|
-
apk del deps && apk upgrade && \
|
|
21
|
-
rm -rf /tmp/*
|
|
22
|
-
|
|
23
|
-
# copy app files
|
|
24
|
-
COPY . .
|
|
25
18
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
#application server
|
|
19
|
+
FROM octopusdeploy/dhi-node:${DHI_NODE_TAG}_${DHI_NODE_CUSTOMIZATION} AS prod
|
|
20
|
+
WORKDIR /kube-integration
|
|
21
|
+
COPY --chown=node:node --chmod=755 --from=prod-deps /kube-integration/ /kube-integration/
|
|
22
|
+
COPY --chown=node:node --chmod=755 --from=prod-deps /logs/ /logs/
|
|
23
|
+
COPY --chown=node:node --chmod=755 --from=prod-deps /kube-integration/node_modules ./node_modules
|
|
24
|
+
COPY --chown=node:node --chmod=755 . .
|
|
25
|
+
USER node
|
|
34
26
|
EXPOSE 9000
|
|
35
|
-
|
|
36
|
-
# run application
|
|
37
27
|
CMD ["node", "--max-http-header-size=360000", "index.js"]
|
package/config/index.js
CHANGED
|
@@ -89,6 +89,11 @@ base.postgres = {
|
|
|
89
89
|
base.helm = {
|
|
90
90
|
maxHelmHistorySize: process.env.MAX_HELM_HISTORY_SIZE, // If set, limits history in release
|
|
91
91
|
};
|
|
92
|
+
base.queryString = {
|
|
93
|
+
uriQueryMaxItems: process.env.URI_QUERY_MAX_ITEMS || 200,
|
|
94
|
+
uriQueryArrayMaxItems: process.env.URI_QUERY_ARRAY_MAX_ITEMS || 100
|
|
95
|
+
}
|
|
96
|
+
|
|
92
97
|
|
|
93
98
|
require(`./environment/kubernetes`)(base);
|
|
94
99
|
|
package/infra/express.js
CHANGED
|
@@ -13,6 +13,7 @@ const _ = require('lodash');
|
|
|
13
13
|
const middlewares = require('./middleware');
|
|
14
14
|
const httpInfra = require('@codefresh-io/http-infra');
|
|
15
15
|
const CFError = require('cf-errors');
|
|
16
|
+
const qs = require('qs')
|
|
16
17
|
|
|
17
18
|
|
|
18
19
|
class Express {
|
|
@@ -59,6 +60,12 @@ class Express {
|
|
|
59
60
|
return Promise.resolve()
|
|
60
61
|
.then(() => {
|
|
61
62
|
const app = express();
|
|
63
|
+
app.set('query parser', (str) => {
|
|
64
|
+
return qs.parse(str, {
|
|
65
|
+
allowPrototypes: true,
|
|
66
|
+
parameterLimit: this.config.queryString.uriQueryMaxItems,
|
|
67
|
+
arrayLimit: this.config.queryString.uriQueryArrayMaxItems
|
|
68
|
+
})});
|
|
62
69
|
app.use(httpInfra.newDomainMiddleware());
|
|
63
70
|
app.use(cookieParser());
|
|
64
71
|
app.use(compression());
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.33.
|
|
2
|
+
"version": "1.33.6",
|
|
3
3
|
"name": "@codefresh-io/kube-integration",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"description": "",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"url": "git+https://github.com/codefresh-io/kube-integration.git"
|
|
20
20
|
},
|
|
21
21
|
"engines": {
|
|
22
|
-
"node": "
|
|
22
|
+
"node": "^22"
|
|
23
23
|
},
|
|
24
24
|
"author": "Oleg Sucharevich <olegs@codefresh.io>",
|
|
25
25
|
"license": "ISC",
|
|
@@ -31,10 +31,11 @@
|
|
|
31
31
|
"openid-client": "^4.9.0",
|
|
32
32
|
"tough-cookie": "4.1.3",
|
|
33
33
|
"@kubernetes/client-node": "0.22.1",
|
|
34
|
-
"**/request/form-data": "^2.4.5"
|
|
34
|
+
"**/request/form-data": "^2.4.5",
|
|
35
|
+
"**/request/qs": "6.14.1"
|
|
35
36
|
},
|
|
36
37
|
"dependencies": {
|
|
37
|
-
"@codefresh-io/cf-monitor": "
|
|
38
|
+
"@codefresh-io/cf-monitor": "12.15.0",
|
|
38
39
|
"@codefresh-io/docker-reference": "^0.0.5",
|
|
39
40
|
"@codefresh-io/eventbus": "2.4.0",
|
|
40
41
|
"@codefresh-io/http-infra": "1.8.14",
|
|
@@ -44,7 +45,7 @@
|
|
|
44
45
|
"compression": "^1.6.2",
|
|
45
46
|
"cookie-parser": "^1.4.3",
|
|
46
47
|
"eventemitter2": "^4.1.2",
|
|
47
|
-
"express": "^4.
|
|
48
|
+
"express": "^4.22.1",
|
|
48
49
|
"google-protobuf": "^3.5.0",
|
|
49
50
|
"js-yaml": "^3.13.1",
|
|
50
51
|
"kube-config-builder": "^1.1.3",
|
|
@@ -57,7 +58,8 @@
|
|
|
57
58
|
"object-hash": "^1.2.0",
|
|
58
59
|
"request": "^2.88.2",
|
|
59
60
|
"request-promise": "^4.2.6",
|
|
60
|
-
"uuid": "^3.1.0"
|
|
61
|
+
"uuid": "^3.1.0",
|
|
62
|
+
"qs": "^6.14.1"
|
|
61
63
|
},
|
|
62
64
|
"devDependencies": {
|
|
63
65
|
"chai": "^3.5.0",
|
package/service.yaml
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
version: 1.33.
|
|
1
|
+
version: 1.33.6
|
|
2
2
|
|