@codefresh-io/kube-integration 1.26.2 → 1.26.4-test16

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.
@@ -0,0 +1,23 @@
1
+ # Patterns to ignore when building packages.
2
+ # This supports shell glob matching, relative path matching, and
3
+ # negation (prefixed with !). Only one pattern per line.
4
+ .DS_Store
5
+ # Common VCS dirs
6
+ .git/
7
+ .gitignore
8
+ .bzr/
9
+ .bzrignore
10
+ .hg/
11
+ .hgignore
12
+ .svn/
13
+ # Common backup files
14
+ *.swp
15
+ *.bak
16
+ *.tmp
17
+ *.orig
18
+ *~
19
+ # Various IDEs
20
+ .project
21
+ .idea/
22
+ *.tmproj
23
+ .vscode/
@@ -1,15 +1,18 @@
1
- apiVersion: v1
2
- description: Codefresh API Engine
1
+ apiVersion: v2
2
+ description: Helm Chart for Kube Integration
3
3
  name: kube-integration
4
- version: 0.0.4
4
+ version: 1.0.0
5
5
  keywords:
6
6
  - codefresh
7
- - kubernetes
8
7
  - kube-integration
9
8
  home: https://codefresh.io/
10
9
  icon: https://avatars1.githubusercontent.com/u/11412079?v=3
11
10
  sources:
12
11
  - https://github.com/codefresh-io/kube-integration
13
12
  maintainers:
14
- - name: Alexei Ledenev
15
- email: alexei@codefresh.io
13
+ - name: codefresh
14
+ url: https://codefresh-io.github.io/
15
+ dependencies:
16
+ - name: cf-common
17
+ repository: https://chartmuseum.codefresh.io/cf-common
18
+ version: "0.12.0"
@@ -0,0 +1,2 @@
1
+ {{- $templateName := printf "cf-common-%s.controller" (index .Subcharts "cf-common").Chart.Version -}}
2
+ {{- include $templateName . -}}
@@ -1,24 +1,2 @@
1
- {{- if .Values.hpa.enabled }}
2
- apiVersion: autoscaling/v2beta2
3
- kind: HorizontalPodAutoscaler
4
- metadata:
5
- name: {{ template "kube-integration.fullname" . }}
6
- spec:
7
- scaleTargetRef:
8
- apiVersion: apps/v1
9
- kind: Deployment
10
- name: {{ template "kube-integration.fullname" . }}-{{ .version | default "base" }}
11
- minReplicas: {{ .Values.hpa.minReplicas }}
12
- maxReplicas: {{ .Values.hpa.maxReplicas }}
13
- metrics:
14
- {{- if .Values.hpa.metrics }}
15
- {{ toYaml .Values.hpa.metrics | indent 4 }}
16
- {{- else }}
17
- - type: Resource
18
- resource:
19
- name: cpu
20
- target:
21
- type: Utilization
22
- averageUtilization: {{ .Values.hpa.targetCPU }}
23
- {{- end }}
24
- {{- end }}
1
+ {{- $templateName := printf "cf-common-%s.hpa" (index .Subcharts "cf-common").Chart.Version -}}
2
+ {{- include $templateName . -}}
@@ -1,21 +1,2 @@
1
- {{- if index .Values.pdb.enabled -}}
2
- apiVersion: policy/v1
3
- kind: PodDisruptionBudget
4
- metadata:
5
- name: {{ template "kube-integration.fullname" . }}
6
- labels:
7
- app: {{ template "kube-integration.fullname" . }}
8
- chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
9
- release: "{{ .Release.Name }}"
10
- heritage: "{{ .Release.Service }}"
11
- spec:
12
- {{- if .Values.pdb.minAvailable }}
13
- minAvailable: {{ .Values.pdb.minAvailable }}
14
- {{- end }}
15
- {{- if .Values.pdb.maxUnavailable }}
16
- maxUnavailable: {{ .Values.pdb.maxUnavailable }}
17
- {{- end }}
18
- selector:
19
- matchLabels:
20
- app: {{ template "kube-integration.fullname" . }}
21
- {{- end -}}
1
+ {{- $templateName := printf "cf-common-%s.pdb" (index .Subcharts "cf-common").Chart.Version -}}
2
+ {{- include $templateName . -}}
@@ -0,0 +1,2 @@
1
+ {{- $templateName := printf "cf-common-%s.secrets" (index .Subcharts "cf-common").Chart.Version -}}
2
+ {{- include $templateName . -}}
@@ -1,20 +1,2 @@
1
- apiVersion: v1
2
- kind: Service
3
- metadata:
4
- name: {{ template "kube-integration.fullname" . }}
5
- labels:
6
- app: {{ template "kube-integration.fullname" . }}
7
- chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
8
- release: {{ .Release.Name | quote }}
9
- heritage: {{ .Release.Service | quote }}
10
- version: {{ .Values.imageTag | quote }}
11
- spec:
12
- type: {{ default "ClusterIP" .Values.serviceType | quote }}
13
- ports:
14
- - name: "http"
15
- port: {{ .Values.port }}
16
- protocol: TCP
17
- targetPort: {{ .Values.targetPort }}
18
- selector:
19
- app: {{ template "kube-integration.fullname" . }}
20
-
1
+ {{- $templateName := printf "cf-common-%s.service" (index .Subcharts "cf-common").Chart.Version -}}
2
+ {{- include $templateName . -}}
@@ -1,62 +1,219 @@
1
+ ## See full values structure at https://github.com/codefresh-io/helm-charts/blob/master/charts/cf-common/values.yaml
2
+ #-----------------------------------------------------------------------------------------------------------------------
3
+ # GLOBAL VALUES
4
+ #-----------------------------------------------------------------------------------------------------------------------
1
5
  global:
2
- # global codefresh chart name; all subcharts use this name to access secrets and configmaps
3
- codefresh: codefresh
6
+ imageRegistry: ""
4
7
 
5
- podSecurityContext:
6
- runAsNonRoot: true
7
- runAsGroup: 0
8
- fsGroup: 0
9
- runAsUser: 1000
10
- imagePullPolicy: Always
8
+ # Backward compatibility with values/templates in cf-helm
9
+ # These values are defined in cf-helm `values.yaml/secrets.yaml`. But listing them here for verbosity.
10
+ agent: null # unknown
11
+ codefresh: codefresh # On-prem chart name (all subcharts use this name to access secrets and configmaps)
12
+ kubeIntegrationPort: 9000
13
+ kubeIntegrationService: kube-integration
14
+ newrelicLicenseKey: ""
15
+ postgresDatabase: ""
16
+ postgresHostname: ""
17
+ postgresHostnameSecretKeyRef: {}
18
+ postgresPassword: ""
19
+ postgresPasswordSecretKeyRef: {}
20
+ postgresPort: ""
21
+ postgresUser: ""
22
+ postgresUserSecretKeyRef: {}
23
+ rabbitmqHostname: ""
24
+ rabbitmqHostnameSecretKeyRef: {}
25
+ rabbitmqPassword: ""
26
+ rabbitmqPasswordSecretKeyRef: {}
27
+ rabbitmqProtocol: ""
28
+ rabbitmqUsername: ""
29
+ rabbitmqUsernameSecretKeyRef: {}
11
30
 
12
- # Number of replicas
13
- replicaCount: 1
14
- redeploy: false
31
+ #-----------------------------------------------------------------------------------------------------------------------
32
+ # LOCAL VALUES
33
+ #-----------------------------------------------------------------------------------------------------------------------
15
34
 
16
- image: codefresh-inc/codefresh/kube-integration
17
- imageTag: master
18
- dockerRegistry: 839151377425.dkr.ecr.us-east-1.amazonaws.com/
35
+ postgresDatabase: ""
36
+ postgresHostname: ""
37
+ postgresHostnameSecretKeyRef: {}
38
+ postgresPassword: ""
39
+ postgresPasswordSecretKeyRef: {}
40
+ postgresPort: ""
41
+ postgresUser: ""
42
+ postgresUserSecretKeyRef: {}
43
+ rabbitmqHostname: ""
44
+ rabbitmqHostnameSecretKeyRef: {}
45
+ rabbitmqPassword: ""
46
+ rabbitmqPasswordSecretKeyRef: {}
47
+ rabbitmqProtocol: ""
48
+ rabbitmqUsername: ""
49
+ rabbitmqUsernameSecretKeyRef: {}
19
50
 
20
- # Service type (ClusterIP, NodePort, LoadBalancer)
21
- #serviceType: ClusterIP
51
+ #-----------------------------------------------------------------------------------------------------------------------
52
+ # NEW VALUES
53
+ #-----------------------------------------------------------------------------------------------------------------------
22
54
 
23
- # Service port
24
- port: 9000
55
+ controller:
56
+ enabled: true
57
+ type: deployment
58
+ deployment:
59
+ strategy: RollingUpdate
60
+ rollingUpdate:
61
+ maxUnavailable: "0"
62
+ maxSurge: 50%
63
+ restartPolicy: Always
64
+
65
+ imagePullSecrets:
66
+ - "{{ .Release.Name }}-{{ .Values.global.codefresh }}-registry"
25
67
 
26
- # Pod (target) port
27
- targetPort: 9000
68
+ podSecurityContext: {}
28
69
 
29
- # formatLogsToElk logs will be formatter as elk expect to read it
30
- formatLogsToElk: true
70
+ podAnnotations:
71
+ checksum/secret: '{{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }}'
72
+
73
+ nodeSelector: {}
74
+
75
+ tolerations: []
76
+
77
+ affinity: {}
78
+
79
+ topologySpreadConstraints: []
31
80
 
32
- # HorizontalPodAutoscaler
33
81
  hpa:
34
82
  enabled: false
35
- minReplicas: 1
36
- maxReplicas: 2
37
- targetCPU: 70
83
+ minReplicas: 2
84
+ maxReplicas: 10
85
+ targetCPUUtilizationPercentage: 70
38
86
 
39
- # PodDisruptionBudget
40
87
  pdb:
41
88
  enabled: false
42
89
  minAvailable: "50%"
43
- maxUnavailable: ""
44
90
 
45
- readinessProbe:
46
- enabled: true
47
- periodSeconds: 5
48
- successThreshold: 1
49
- failureThreshold: 2
50
- timeoutSeconds: 10
91
+ serviceAccount:
92
+ enabled: false
51
93
 
52
- livenessProbe:
53
- enabled: true
54
- periodSeconds: 50
55
- successThreshold: 1
56
- failureThreshold: 3
57
- initialDelaySeconds: 30
58
- timeoutSeconds: 10
94
+ rbac:
95
+ enabled: false
59
96
 
60
- affinity: {}
61
- nodeSelector: {}
62
- tolerations: []
97
+ container:
98
+ image:
99
+ registry: 839151377425.dkr.ecr.us-east-1.amazonaws.com/codefresh-inc
100
+ repository: codefresh/kube-integration
101
+ tag: master
102
+ pullPolicy: IfNotPresent
103
+
104
+ command: []
105
+ args: []
106
+
107
+ containerSecurityContext:
108
+ allowPrivilegeEscalation: false
109
+
110
+ env:
111
+ # updated POSTGRES_* env vars
112
+ POSTGRES_HOST:
113
+ valueFrom:
114
+ secretKeyRef:
115
+ name: '{{ include (printf "cf-common-%s.classic.postgres-hostname-env-var-secret-name" (index .Subcharts "cf-common").Chart.Version) . }}'
116
+ key: '{{ include (printf "cf-common-%s.classic.postgres-hostname-env-var-secret-key" (index .Subcharts "cf-common").Chart.Version) . }}'
117
+ optional: true
118
+ POSTGRES_PASSWORD:
119
+ valueFrom:
120
+ secretKeyRef:
121
+ name: '{{ include (printf "cf-common-%s.classic.postgres-password-env-var-secret-name" (index .Subcharts "cf-common").Chart.Version) . }}'
122
+ key: '{{ include (printf "cf-common-%s.classic.postgres-password-env-var-secret-key" (index .Subcharts "cf-common").Chart.Version) . }}'
123
+ optional: true
124
+ POSTGRES_USER:
125
+ valueFrom:
126
+ secretKeyRef:
127
+ name: '{{ include (printf "cf-common-%s.classic.postgres-user-env-var-secret-name" (index .Subcharts "cf-common").Chart.Version) . }}'
128
+ key: '{{ include (printf "cf-common-%s.classic.postgres-user-env-var-secret-key" (index .Subcharts "cf-common").Chart.Version) . }}'
129
+ optional: true
130
+
131
+ # updated RABBITMQ_* env vars
132
+ RABBITMQ_HOSTNAME:
133
+ valueFrom:
134
+ secretKeyRef:
135
+ name: '{{ include (printf "cf-common-%s.classic.rabbitmq-hostname-env-var-secret-name" (index .Subcharts "cf-common").Chart.Version) . }}'
136
+ key: '{{ include (printf "cf-common-%s.classic.rabbitmq-hostname-env-var-secret-key" (index .Subcharts "cf-common").Chart.Version) . }}'
137
+ optional: true
138
+ RABBITMQ_PASSWORD:
139
+ valueFrom:
140
+ secretKeyRef:
141
+ name: '{{ include (printf "cf-common-%s.classic.rabbitmq-password-env-var-secret-name" (index .Subcharts "cf-common").Chart.Version) . }}'
142
+ key: '{{ include (printf "cf-common-%s.classic.rabbitmq-password-env-var-secret-key" (index .Subcharts "cf-common").Chart.Version) . }}'
143
+ optional: true
144
+ RABBITMQ_USERNAME:
145
+ valueFrom:
146
+ secretKeyRef:
147
+ name: '{{ include (printf "cf-common-%s.classic.rabbitmq-username-env-var-secret-name" (index .Subcharts "cf-common").Chart.Version) . }}'
148
+ key: '{{ include (printf "cf-common-%s.classic.rabbitmq-username-env-var-secret-key" (index .Subcharts "cf-common").Chart.Version) . }}'
149
+ optional: true
150
+ EVENTBUS_URI: $(RABBITMQ_PROTOCOL)://$(RABBITMQ_USERNAME):$(RABBITMQ_PASSWORD)@$(RABBITMQ_HOSTNAME)
151
+
152
+ AGENT: '{{ .Values.global.agent }}'
153
+ EVENTBUS_IGNORE_CREATE_SCHEMA: true
154
+ FORMAT_LOGS_TO_ELK: true
155
+ MODE: "1"
156
+ NODE_ENV: kubernetes
157
+ PORT: '{{ .Values.global.kubeIntegrationPort }}'
158
+ SERVICE_NAME: '{{ include (printf "cf-common-%s.names.name" (index .Subcharts "cf-common").Chart.Version) . }}'
159
+
160
+ probes:
161
+ liveness:
162
+ enabled: true
163
+ type: httpGet
164
+ httpGet:
165
+ path: /api/ping
166
+ port: http
167
+ spec:
168
+ initialDelaySeconds: 30
169
+ periodSeconds: 15
170
+ timeoutSeconds: 15
171
+ successThreshold: 1
172
+ failureThreshold: 2
173
+ readiness:
174
+ enabled: true
175
+ type: httpGet
176
+ httpGet:
177
+ path: /api/ping
178
+ port: http
179
+ spec:
180
+ initialDelaySeconds: 30
181
+ periodSeconds: 15
182
+ timeoutSeconds: 15
183
+ successThreshold: 1
184
+ failureThreshold: 2
185
+ startup:
186
+ enabled: false
187
+
188
+ resources:
189
+ limits: {}
190
+ requests: {}
191
+
192
+ secrets:
193
+ secret:
194
+ enabled: true
195
+ stringData:
196
+ # updated POSTGRES_* secrets
197
+ POSTGRES_HOST: '{{ coalesce .Values.postgresHostname .Values.global.postgresHostname (printf "%s-%s" .Release.Name .Values.global.postgresService) }}'
198
+ POSTGRES_PASSWORD: "{{ coalesce .Values.postgresPassword .Values.global.postgresPassword }}"
199
+ POSTGRES_USER: "{{ coalesce .Values.postgresUser .Values.global.postgresUser }}"
200
+ POSTGRES_DATABASE: '{{ coalesce .Values.postgresDatabase .Values.global.postgresDatabase }}'
201
+ POSTGRES_PORT: '{{ coalesce .Values.postgresPort .Values.global.postgresPort }}'
202
+
203
+ # updated RABBITMQ_* secrets
204
+ RABBITMQ_HOSTNAME: '{{ coalesce .Values.rabbitmqHostname .Values.global.rabbitmqHostname (printf "%s-%s" .Release.Name (coalesce .Values.global.rabbitService .Values.global.rabbitmqService) ) }}'
205
+ RABBITMQ_PASSWORD: "{{ coalesce .Values.rabbitmqPassword .Values.global.rabbitmqPassword }}"
206
+ RABBITMQ_USERNAME: "{{ coalesce .Values.rabbitmqUsername .Values.global.rabbitmqUsername }}"
207
+ RABBITMQ_PROTOCOL: '{{ coalesce .Values.rabbitmqProtocol .Values.global.rabbitmqProtocol "amqp" }}'
208
+
209
+ NEWRELIC_LICENSE_KEY: '{{ .Values.global.newrelicLicenseKey }}'
210
+
211
+ service:
212
+ main:
213
+ enabled: true
214
+ primary: true
215
+ type: ClusterIP
216
+ ports:
217
+ http:
218
+ port: 9000
219
+ protocol: HTTP
package/.nvmrc CHANGED
@@ -1 +1 @@
1
- v14.20.0
1
+ v14.21.1
package/Dockerfile CHANGED
@@ -1,4 +1,9 @@
1
- FROM node:14.21.3-alpine
1
+ FROM --platform=$BUILDPLATFORM node:16.20.2-alpine
2
+
3
+ ARG TARGETPLATFORM
4
+ ARG TARGETARCH
5
+ RUN printf "Building for TARGETPLATFORM=${TARGETPLATFORM}" \
6
+ && printf ", TARGETARCH=${TARGETARCH}"
2
7
 
3
8
  WORKDIR /kube-integration
4
9
 
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.26.2",
2
+ "version": "1.26.4-test16",
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": "^14.21.1"
22
+ "node": "^16.20.2"
23
23
  },
24
24
  "author": "Oleg Sucharevich <olegs@codefresh.io>",
25
25
  "license": "ISC",
@@ -36,13 +36,18 @@
36
36
  "openid-client": "^4.9.0",
37
37
  "request/qs": "6.5.3",
38
38
  "kubernetes-client/qs": "6.9.7",
39
- "nodegistry/request/qs": "6.5.3"
39
+ "nodegistry/request/qs": "6.5.3",
40
+ "semver": "7.5.2",
41
+ "protobufjs": "7.2.4",
42
+ "http-cache-semantics": "4.1.1",
43
+ "jose": "3.20.4",
44
+ "tough-cookie": "4.1.3"
40
45
  },
41
46
  "dependencies": {
42
47
  "@codefresh-io/docker-reference": "^0.0.5",
43
48
  "@codefresh-io/eventbus": "1.4.3",
44
- "@codefresh-io/http-infra": "1.8.12",
45
- "@codefresh-io/cf-monitor": "0.0.25",
49
+ "@codefresh-io/http-infra": "1.8.14",
50
+ "@codefresh-io/cf-monitor": "0.0.27",
46
51
  "bluebird": "^3.5.0",
47
52
  "body-parser": "1.19.2",
48
53
  "cf-errors": "^0.1.16",
@@ -54,14 +59,13 @@
54
59
  "google-protobuf": "^3.5.0",
55
60
  "js-yaml": "^3.13.1",
56
61
  "kube-config-builder": "^1.1.3",
57
- "kubernetes-client": "^8.3.7",
62
+ "kubernetes-client": "^9.0.0",
58
63
  "lodash": "~4.17.21",
59
64
  "method-override": "^2.3.9",
60
65
  "morgan": "^1.10.0",
61
66
  "nock": "^12.0.3",
62
- "nodegistry": "^1.2.3",
67
+ "nodegistry": "^1.2.5",
63
68
  "object-hash": "^1.2.0",
64
- "request": "^2.88.2",
65
69
  "request-promise": "^4.2.6",
66
70
  "uuid": "^3.1.0"
67
71
  },
package/service.yaml CHANGED
@@ -1 +1 @@
1
- version: 1.28.3
1
+ version: 1.30.4
@@ -1,50 +0,0 @@
1
- # CFUI helm chart
2
-
3
- ## Supported values
4
-
5
- ## replicaCount
6
- number of pods to be schedualed
7
- default: `replicaCount: 1`
8
-
9
- ## imagePullPolicy
10
- 'Always' if imageTag is 'latest', else set to 'IfNotPresent' ref: http://kubernetes.io/docs/user-guide/images/##pre-pulling-images
11
- default: `imagePullPolicy: Always`
12
-
13
- ## redeploy
14
- whenever to force redeploy
15
- default: `redeploy: false`
16
-
17
- ## imageTag
18
- set the tag of the image
19
- default: `imageTag: master`
20
-
21
- ## image
22
- base name of the image
23
- default: `image: r.cfcr.io/codefresh-inc/codefresh/cf-broadcaster`
24
-
25
- ## affinity
26
- special spesification
27
- default: `affinity: {}`
28
-
29
- ## env
30
- set of evnrionment varialbe to be add to the containers
31
- default:
32
- ```
33
- env:
34
- NODE_ENV: kubernetes
35
- ```
36
-
37
- ## port
38
- container port
39
- default: `port: 9016`
40
-
41
- ## servicePort
42
- port of the kubernetes service listen to
43
- default: `servicePort: 80`
44
-
45
- ## dockercfg
46
- docker config valid string
47
- default: `dockercfg: {}`
48
-
49
- ## newrelicLicenseKey
50
- default: `newrelicLicenseKey: ""`
@@ -1,36 +0,0 @@
1
- {{/* vim: set filetype=mustache: */}}
2
- {{/*
3
- Expand the name of the chart.
4
- */}}
5
- {{- define "kube-integration.name" -}}
6
- {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
7
- {{- end -}}
8
-
9
- {{/*
10
- Create a default fully qualified app name.
11
- We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
12
- */}}
13
- {{- define "kube-integration.fullname" -}}
14
- {{- $name := default .Chart.Name .Values.nameOverride -}}
15
- {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
16
- {{- end -}}
17
-
18
- {/*
19
- Create a default fully qualified app name.
20
- We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
21
- If release name contains chart name it will be used as a full name.
22
- */}}
23
- {{- define "kube-integration.fqdn" -}}
24
- {{- $name := "" -}}
25
- {{- if $.Values.fullnameOverride -}}
26
- {{- $name =$.Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
27
- {{- else -}}
28
- {{- $name = default .Chart.Name .Values.nameOverride -}}
29
- {{- if contains $name .Release.Name -}}
30
- {{- $name = .Release.Name | trunc 63 | trimSuffix "-" -}}
31
- {{- else -}}
32
- {{- $name = printf "%s-%s" .Release.Name $name -}}
33
- {{- end -}}
34
- {{- end -}}
35
- {{- printf "%s.%s.svc.cluster.local" $name .Release.Namespace | trunc 63 | trimSuffix "-" -}}
36
- {{- end -}}
@@ -1,169 +0,0 @@
1
- apiVersion: apps/v1
2
- kind: Deployment
3
- metadata:
4
- name: {{ template "kube-integration.fullname" $ }}-{{ .version | default "base" }}
5
- labels:
6
- app: {{ template "kube-integration.fullname" . }}
7
- chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
8
- release: {{ .Release.Name | quote }}
9
- heritage: {{ .Release.Service | quote }}
10
- version: {{ .version | default "base" | quote }}
11
- spec:
12
- {{- if not .Values.hpa.enabled }}
13
- replicas: {{ .Values.replicaCount }}
14
- {{- end }}
15
- selector:
16
- matchLabels:
17
- app: {{ template "kube-integration.fullname" . }}
18
- template:
19
- metadata:
20
- annotations:
21
- checksum/secret: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }}
22
- labels:
23
- app: {{ template "kube-integration.fullname" . }}
24
- chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
25
- release: {{ .Release.Name | quote }}
26
- heritage: {{ .Release.Service | quote }}
27
- version: {{ .version | default "base" | quote }}
28
- spec:
29
- {{- with .Values.podSecurityContext }}
30
- securityContext: {{ toYaml . | nindent 8}}
31
- {{- end }}
32
- {{- if .Values.affinity }}
33
- affinity: {{ toYaml .Values.affinity | nindent 8 }}
34
- {{- end }}
35
- {{- if .Values.nodeSelector }}
36
- nodeSelector: {{ toYaml .Values.nodeSelector | nindent 8 }}
37
- {{- end }}
38
- {{- if .Values.tolerations }}
39
- tolerations: {{ toYaml .Values.tolerations | nindent 8 }}
40
- {{- end }}
41
- {{- if .Values.global.hostAliases }}
42
- hostAliases:
43
- {{ toYaml .Values.global.hostAliases | indent 8 }}
44
- {{- end }}
45
- imagePullSecrets:
46
- - name: "{{ .Release.Name }}-{{ .Values.global.codefresh }}-registry"
47
- terminationGracePeriodSeconds: 10
48
- containers:
49
- - name: {{ template "kube-integration.fullname" . }}
50
- {{- if .Values.global.privateRegistry }}
51
- image: "{{ .Values.global.dockerRegistry }}{{ .Values.image }}:{{ .Values.imageTag }}"
52
- {{- else }}
53
- image: "{{ .Values.dockerRegistry }}{{ .Values.image }}:{{ .Values.imageTag }}"
54
- {{- end }}
55
- {{- if not .Values.global.devEnvironment }}
56
- securityContext:
57
- allowPrivilegeEscalation: false
58
- {{- end }}
59
- imagePullPolicy: {{ default "" .Values.imagePullPolicy | quote }}
60
- {{- if .Values.resources }}
61
- resources: {{ toYaml .Values.resources | nindent 10 }}
62
- {{- end }}
63
- env:
64
- {{- if .Values.global.env }}
65
- {{- range $key, $value := .Values.global.env }}
66
- - name: {{ $key }}
67
- value: {{ $value | quote }}
68
- {{- end}}
69
- {{- end}}
70
- {{- range $key, $value := $.Values.env }}
71
- - name: {{ $key }}
72
- value: {{ $value | quote }}
73
- {{- end }}
74
- - name: AGENT
75
- value: {{ .Values.global.agent }}
76
- # Mode variable to start it as http server
77
- - name: MODE
78
- value: "1"
79
- - name: NODE_ENV
80
- value: kubernetes
81
- - name: MONGO_URI
82
- valueFrom:
83
- secretKeyRef:
84
- name: {{ template "kube-integration.fullname" . }}
85
- key: mongo-uri
86
- - name: RABBIT_PASSWORD
87
- valueFrom:
88
- secretKeyRef:
89
- name: "{{ .Release.Name }}-{{ .Values.global.codefresh }}"
90
- key: rabbitmq-password
91
- - name: RABBIT_USER
92
- valueFrom:
93
- secretKeyRef:
94
- name: "{{ .Release.Name }}-{{ .Values.global.codefresh }}"
95
- key: rabbitmq-username
96
- - name: RABBIT_PROTOCOL
97
- value: {{ .Values.global.rabbitmqProtocol | default "amqp" | quote }}
98
- - name: EVENTBUS_URI
99
- value: $(RABBIT_PROTOCOL)://$(RABBIT_USER):$(RABBIT_PASSWORD)@{{ default (printf "%s-%s" .Release.Name .Values.global.rabbitService) .Values.global.rabbitmqHostname }}
100
- - name: POSTGRES_HOST
101
- value: {{ default (printf "%s-%s" .Release.Name .Values.global.postgresService) .Values.global.postgresHostname | quote }}
102
- - name: POSTGRES_DATABASE
103
- value: {{ .Values.global.postgresDatabase }}
104
- - name: POSTGRES_PORT
105
- value: {{ .Values.global.postgresPort | quote }}
106
- - name: POSTGRES_USER
107
- valueFrom:
108
- secretKeyRef:
109
- name: "{{ .Release.Name }}-{{ .Values.global.codefresh }}"
110
- key: postgres-user
111
- - name: POSTGRES_PASSWORD
112
- valueFrom:
113
- secretKeyRef:
114
- name: "{{ .Release.Name }}-{{ .Values.global.codefresh }}"
115
- key: postgres-password
116
- - name: NEWRELIC_LICENSE_KEY
117
- valueFrom:
118
- secretKeyRef:
119
- name: "{{ .Release.Name }}-{{ .Values.global.codefresh }}"
120
- key: newrelic-license-key
121
- - name: PORT
122
- value: "{{ .Values.global.kubeIntegrationPort }}"
123
- - name: SERVICE_NAME
124
- value: {{ template "kube-integration.name" . }}
125
- - name: FORMAT_LOGS_TO_ELK
126
- value: "{{ .Values.formatLogsToElk }}"
127
- {{- if $.Values.global.mongoTLS }}
128
- - name: MTLS_CERT_PATH
129
- value: /etc/ssl/mongodb/ca.pem
130
- {{- end }}
131
- ports:
132
- - containerPort: {{ .Values.targetPort }}
133
- protocol: TCP
134
- {{- if .Values.readinessProbe.enabled }}
135
- readinessProbe: {{ toYaml (omit .Values.readinessProbe "enabled") | nindent 10 }}
136
- httpGet:
137
- path: /api/ping
138
- port: {{ .Values.targetPort }}
139
- {{- end }}
140
- {{- if .Values.livenessProbe.enabled }}
141
- livenessProbe: {{ toYaml (omit .Values.livenessProbe "enabled") | nindent 10 }}
142
- httpGet:
143
- path: /api/ping
144
- port: {{ .Values.targetPort }}
145
- {{- end }}
146
- volumeMounts:
147
- {{- if .Values.global.addResolvConf }}
148
- - mountPath: /etc/resolv.conf
149
- name: resolvconf
150
- subPath: resolv.conf
151
- readOnly: true
152
- {{- end }}
153
- {{- if $.Values.global.mongoTLS }}
154
- - mountPath: /etc/ssl/mongodb/
155
- name: mongodb-tls
156
- readOnly: true
157
- {{- end }}
158
- volumes:
159
- {{- if .Values.global.addResolvConf }}
160
- - name: resolvconf
161
- configMap:
162
- name: {{ .Release.Name }}-{{ .Values.global.codefresh }}-resolvconf
163
- {{- end }}
164
- {{- if $.Values.global.mongoTLS }}
165
- - name: mongodb-tls
166
- secret:
167
- secretName: {{ $.Release.Name }}-{{ $.Values.global.codefresh }}-mongodb-tls
168
- {{- end }}
169
- restartPolicy: Always
@@ -1,17 +0,0 @@
1
- apiVersion: v1
2
- kind: Secret
3
- metadata:
4
- name: {{ template "kube-integration.fullname" . }}
5
- labels:
6
- app: {{ template "kube-integration.fullname" . }}
7
- chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
8
- release: "{{ .Release.Name }}"
9
- heritage: "{{ .Release.Service }}"
10
- type: Opaque
11
- stringData:
12
- {{- if .Values.global.onprem }}
13
- mongo-uri: {{ include "calculateMongoURI" (dict "dbName" .Values.global.clusterProvidersService "mongoURI" .Values.global.mongoURI) }}
14
- {{- else }}
15
- # this is for production env - the value used there is incorrect, but I should leave it for now to be clarified later
16
- mongo-uri: {{ coalesce .Values.mongoURI (printf "mongodb://%s:%s@%s-%s:%s/%s" .Values.global.mongodbUsername .Values.global.mongodbPassword .Release.Name .Values.global.mongoService (toString .Values.global.mongoPort) .Values.global.clusterProvidersService) }}
17
- {{- end }}