Skip to content

Commit 5008cd0

Browse files
committed
Rename tarantool to wstore and cron to wcli
1 parent 3688426 commit 5008cd0

11 files changed

+67
-64
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
vendor/*
1414
build/_output
1515
deploy/tmp
16+
.DS_Store
1617

1718
# GOPATH
1819
.go

TAG

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.6.0
1+
1.7.0

files/template.yaml.tpl

+16-16
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ volumes:
5959
value: "{{ getAnnotation .ObjectMeta (withAP `wallarm-unpack-response`) .Config.wallarm.unpackResponse }}"
6060
- name: WALLARM_ACL_EXPORT_ENABLE
6161
value: "{{ getAnnotation .ObjectMeta (withAP `wallarm-acl-export-enable`) .Config.wallarm.aclExportEnable }}"
62-
- name: WALLARM_TARANTOOL_HOST
63-
value: "{{ .Config.tarantool.host }}"
64-
- name: WALLARM_TARANTOOL_PORT
65-
value: "{{ .Config.tarantool.port }}"
62+
- name: WALLARM_WSTORE_HOST
63+
value: "{{ .Config.wstore.host }}"
64+
- name: WALLARM_WSTORE_PORT
65+
value: "{{ .Config.wstore.port }}"
6666
- name: WALLARM_UPSTREAM_CONNECT_ATTEMPTS
6767
value: "{{ getAnnotation .ObjectMeta (withAP `wallarm-upstream-connect-attempts`) .Config.wallarm.upstream.connectAttempts }}"
6868
- name: WALLARM_UPSTREAM_RECONNECT_INTERVAL
@@ -91,16 +91,16 @@ volumes:
9191
value: "{{ getAnnotation .ObjectMeta (withAP `nginx-worker-processes`) .Config.nginx.workerProcesses }}"
9292
- name: NGINX_WORKER_CONNECTIONS
9393
value: "{{ getAnnotation .ObjectMeta (withAP `nginx-worker-connections`) .Config.nginx.workerConnections }}"
94-
- name: NGINX_TARANTOOL_UPSTREAM_KEEPALIVE
95-
value: "{{ .Config.nginx.tarantoolUpstream.keepalive }}"
96-
- name: NGINX_TARANTOOL_UPSTREAM_KEEPALIVE_REQUESTS
97-
value: "{{ .Config.nginx.tarantoolUpstream.keepaliveRequests }}"
98-
- name: NGINX_TARANTOOL_UPSTREAM_SERVER_MAX_FAILS
99-
value: "{{ .Config.nginx.tarantoolUpstream.server.maxFails }}"
100-
- name: NGINX_TARANTOOL_UPSTREAM_SERVER_FAIL_TIMEOUT
101-
value: "{{ .Config.nginx.tarantoolUpstream.server.maxConns }}"
102-
- name: NGINX_TARANTOOL_UPSTREAM_SERVER_MAX_CONNS
103-
value: "{{ .Config.nginx.tarantoolUpstream.server.failTimeout }}"
94+
- name: NGINX_WSTORE_UPSTREAM_KEEPALIVE
95+
value: "{{ .Config.nginx.postanalyticsUpstream.keepalive }}"
96+
- name: NGINX_WSTORE_UPSTREAM_KEEPALIVE_REQUESTS
97+
value: "{{ .Config.nginx.postanalyticsUpstream.keepaliveRequests }}"
98+
- name: NGINX_WSTORE_UPSTREAM_SERVER_MAX_FAILS
99+
value: "{{ .Config.nginx.postanalyticsUpstream.server.maxFails }}"
100+
- name: NGINX_WSTORE_UPSTREAM_SERVER_FAIL_TIMEOUT
101+
value: "{{ .Config.nginx.postanalyticsUpstream.server.maxConns }}"
102+
- name: NGINX_WSTORE_UPSTREAM_SERVER_MAX_CONNS
103+
value: "{{ .Config.nginx.postanalyticsUpstream.server.failTimeout }}"
104104
- name: NGINX_LOGS_EXTENDED
105105
value: "{{ .Config.nginx.logs.extended }}"
106106
- name: NGINX_LOGS_FORMAT
@@ -448,8 +448,8 @@ volumes:
448448
Wcli arguments building
449449
*/}}
450450
{{- define "wcli-args" -}}
451-
"-log-level", "{{ .Config.cron.logLevel }}",{{ " " }}
452-
{{- with .Config.cron.commands -}}
451+
"-log-level", "{{ .Config.wcli.logLevel }}",{{ " " }}
452+
{{- with .Config.wcli.commands -}}
453453
{{- range $name, $value := . -}}
454454
"job:{{ $name }}", "-log-level", "{{ $value.logLevel }}",{{ " " }}
455455
{{- end -}}

helm/Chart.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: v2
22
name: wallarm-sidecar
33
version: 5.2.11
4-
appVersion: 5.2.11
4+
appVersion: 6.0.0-rc0
55
description: Sidecar controller for Kubernetes. Injects sidecar proxy based on NGINX with Wallarm module and helper services.
66
home: https://github.com/wallarm/sidecar
77
icon: https://static.wallarm.com/wallarm-logo.svg
@@ -21,8 +21,8 @@ kubeVersion: ">=1.19.16-0"
2121
annotations:
2222
artifacthub.io/images: |
2323
- name: sidecar
24-
image: wallarm/sidecar:5.2.11
24+
image: wallarm/sidecar:6.0.0-rc0
2525
- name: sidecar-controller
26-
image: wallarm/sidecar-controller:1.6.0
26+
image: wallarm/sidecar-controller:1.7.0
2727
- name: node-helpers
28-
image: wallarm/node-helpers:5.2.11
28+
image: wallarm/node-helpers:6.0.0-rc0

helm/ci/deployment-external-tarantool-values.yaml helm/ci/deployment-external-wstore-values.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ imagePullSecrets:
33
postanalytics:
44
external:
55
enabled: true
6-
host: tarantool.domain.internal
6+
host: wstore.domain.internal

helm/templates/_helpers.tpl

+6-6
Original file line numberDiff line numberDiff line change
@@ -145,17 +145,17 @@ wallarm-sidecar-proxy
145145
value: {{ .Chart.Version | quote }}
146146
{{- end -}}
147147

148-
{{- define "wallarm-sidecar.tarantoolHost" -}}
148+
{{- define "wallarm-sidecar.wstoreHost" -}}
149149
{{- if .Values.postanalytics.external.enabled }}
150-
{{- required "Hostname of external Tarantool instance is required" .Values.postanalytics.external.host }}
150+
{{- required "Hostname of external Wstore instance is required" .Values.postanalytics.external.host }}
151151
{{- else }}
152152
{{- template "wallarm-sidecar.fullname" . }}-postanalytics.{{ .Release.Namespace }}.svc
153153
{{- end }}
154154
{{- end -}}
155155

156-
{{- define "wallarm-sidecar.tarantoolPort" -}}
156+
{{- define "wallarm-sidecar.wstorePort" -}}
157157
{{- if .Values.postanalytics.external.enabled }}
158-
{{- required "Port of external Tarantool instance is required" .Values.postanalytics.external.port }}
158+
{{- required "Port of external Wstore instance is required" .Values.postanalytics.external.port }}
159159
{{- else }}
160160
{{- .Values.postanalytics.service.port }}
161161
{{- end }}
@@ -165,8 +165,8 @@ wallarm-sidecar-proxy
165165
Wcli arguments building
166166
*/}}
167167
{{- define "wallarm-sidecar.wcli-args" -}}
168-
"-log-level", "{{ .Values.config.cron.logLevel }}",{{ " " }}
169-
{{- with .Values.config.cron.commands -}}
168+
"-log-level", "{{ .Values.config.wcli.logLevel }}",{{ " " }}
169+
{{- with .Values.config.wcli.commands -}}
170170
{{- range $name, $value := . -}}
171171
"job:{{ $name }}", "-log-level", "{{ $value.logLevel }}",{{ " " }}
172172
{{- end -}}

helm/templates/controller-configmap.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ data:
1717
config.yaml: |-
1818
settings:
1919
{{- toYaml .Values.config | nindent 6 }}
20-
tarantool:
21-
host: {{ template "wallarm-sidecar.tarantoolHost" . }}
22-
port: {{ template "wallarm-sidecar.tarantoolPort" . }}
20+
wstore:
21+
host: {{ template "wallarm-sidecar.wstoreHost" . }}
22+
port: {{ template "wallarm-sidecar.wstorePort" . }}
2323
component:
2424
name: {{ template "wallarm-sidecar.componentName" . }}
2525
version: {{ .Chart.Version }}

helm/templates/postanalytics-deployment.yaml

+16-14
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ spec:
2626
template:
2727
metadata:
2828
annotations:
29-
checksum/config: {{ .Values.config.cron | toJson | sha256sum }}
29+
checksum/config: {{ .Values.config.wcli | toJson | sha256sum }}
3030
checksum/secret: {{ .Values.config.wallarm.api | toJson | sha256sum }}
3131
{{- include "wallarm-sidecar.annotations" . | nindent 8 }}
3232
{{- with .Values.postanalytics.extraAnnotations }}
@@ -149,32 +149,32 @@ spec:
149149
{{- with .Values.postanalytics.supervisord.extraVolumeMounts }}
150150
{{- . | toYaml | nindent 10 }}
151151
{{- end }}
152-
- name: tarantool
152+
- name: wstore
153153
image: {{ include "wallarm-sidecar.image" .Values.helper.image }}
154154
imagePullPolicy: "{{ .Values.helper.image.pullPolicy }}"
155-
args: ["tarantool"]
155+
args: ["wstore"]
156156
env:
157157
{{- include "wallarm-sidecar.credentials" . | nindent 10 }}
158158
- name: SLAB_ALLOC_ARENA
159-
value: {{ .Values.postanalytics.tarantool.config.arena | quote }}
160-
{{- with .Values.postanalytics.tarantool.extraEnvs }}
159+
value: {{ .Values.postanalytics.wstore.config.arena | quote }}
160+
{{- with .Values.postanalytics.wstore.extraEnvs }}
161161
{{- . | toYaml | nindent 10 }}
162162
{{- end }}
163163
ports:
164-
- name: tarantool
164+
- name: wstore
165165
containerPort: {{ .Values.postanalytics.service.port }}
166166
protocol: TCP
167-
{{- with .Values.postanalytics.tarantool.livenessProbe }}
167+
{{- with .Values.postanalytics.wstore.livenessProbe }}
168168
livenessProbe: {{ . | toYaml | nindent 12 }}
169169
{{- end }}
170-
{{- with .Values.postanalytics.tarantool.readinessProbe }}
170+
{{- with .Values.postanalytics.wstore.readinessProbe }}
171171
readinessProbe: {{ . | toYaml | nindent 12 }}
172172
{{- end }}
173-
{{- with .Values.postanalytics.tarantool.lifecycle }}
173+
{{- with .Values.postanalytics.wstore.lifecycle }}
174174
lifecycle: {{ . | toYaml | nindent 12 }}
175175
{{- end }}
176-
{{- if .Values.postanalytics.tarantool.securityContext }}
177-
securityContext: {{ .Values.postanalytics.tarantool.securityContext | toYaml | nindent 12 }}
176+
{{- if .Values.postanalytics.wstore.securityContext }}
177+
securityContext: {{ .Values.postanalytics.wstore.securityContext | toYaml | nindent 12 }}
178178
{{- else }}
179179
securityContext:
180180
privileged: false
@@ -186,11 +186,13 @@ spec:
186186
add:
187187
- NET_BIND_SERVICE
188188
{{- end }}
189-
{{- with .Values.postanalytics.tarantool.resources }}
189+
{{- with .Values.postanalytics.wstore.resources }}
190190
resources: {{ . | toYaml | nindent 12 }}
191191
{{- end }}
192-
{{- with .Values.postanalytics.tarantool.extraVolumeMounts }}
193192
volumeMounts:
193+
- mountPath: /opt/wallarm/etc/wallarm
194+
name: wallarm
195+
{{- with .Values.postanalytics.wstore.extraVolumeMounts }}
194196
{{- . | toYaml | nindent 10 }}
195197
{{- end }}
196198
- name: appstructure
@@ -228,7 +230,7 @@ spec:
228230
volumeMounts:
229231
- mountPath: /opt/wallarm/etc/wallarm
230232
name: wallarm
231-
{{- with .Values.postanalytics.tarantool.extraVolumeMounts }}
233+
{{- with .Values.postanalytics.wstore.extraVolumeMounts }}
232234
{{- . | toYaml | nindent 10 }}
233235
{{- end }}
234236
{{- with .Values.postanalytics.extraContainers }}

helm/templates/postanalytics-service.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ spec:
3434
{{- include "wallarm-sidecar.selectorLabels" . | nindent 4 }}
3535
app.kubernetes.io/component: postanalytics
3636
ports:
37-
- name: tarantool
37+
- name: wstore
3838
port: {{ .Values.postanalytics.service.port }}
39-
targetPort: tarantool
39+
targetPort: wstore
4040
protocol: TCP
4141
{{- if has (.Values.postanalytics.service.type | default "ClusterIP") (list "NodePort" "LoadBalancer") -}}
4242
{{- with .Values.postanalytics.service.nodePort }}

helm/values.yaml

+15-15
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,11 @@ config:
7979
### Post-analytics node endpoint configuration
8080
###
8181
upstream:
82-
### Defines the number of immediate reconnects to the Tarantool or Wallarm API
82+
### Defines the number of immediate reconnects to the Wstore or Wallarm API
8383
### https://docs.wallarm.com/admin-en/configure-parameters-en/#wallarm_upstream_connect_attempts
8484
###
8585
connectAttempts: 10
86-
### Defines the interval between attempts to reconnect to the Tarantool or Wallarm API
86+
### Defines the interval between attempts to reconnect to the Wstore or Wallarm API
8787
### https://docs.wallarm.com/admin-en/configure-parameters-en/#wallarm_upstream_reconnect_interval
8888
###
8989
reconnectInterval: 15s
@@ -188,9 +188,9 @@ config:
188188
### Sets the maximum number of simultaneous connections that can be opened by a worker process
189189
###
190190
workerConnections: 4096
191-
### Parameters for Tarantool upstream. Refer to upstream module docs fo details https://nginx.org/en/docs/http/ngx_http_upstream_module.html#upstream
191+
### Parameters for Wstore upstream. Refer to upstream module docs fo details https://nginx.org/en/docs/http/ngx_http_upstream_module.html#upstream
192192
###
193-
tarantoolUpstream:
193+
postanalyticsUpstream:
194194
### 'keepalive' parameter. Refer to docs for details https://nginx.org/en/docs/http/ngx_http_upstream_module.html#keepalive
195195
###
196196
keepalive: 16
@@ -217,7 +217,7 @@ config:
217217
image:
218218
registry: docker.io
219219
image: wallarm/sidecar
220-
tag: 5.2.11
220+
tag: 69634d9a # TODO: change, this is DEV wstore build, tmp for testing purposes!
221221
pullPolicy: IfNotPresent
222222
### Shared security context for all (init and regular) containers in sidecar schema except `iptables` container.
223223
### For `iptables` container it is described in `sidecar.initContainers.iptables.securityContext` value
@@ -369,7 +369,7 @@ config:
369369
- "ssl_conf_command Ciphersuites TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256"
370370

371371
### Wcli jobs
372-
cron:
372+
wcli:
373373
### General log level
374374
logLevel: warn
375375
### Per-job log levels
@@ -420,24 +420,24 @@ helper:
420420
image:
421421
registry: docker.io
422422
image: wallarm/node-helpers
423-
tag: 5.2.11
423+
tag: 5.3.0-wstore
424424
pullPolicy: IfNotPresent
425425

426426
### Configuration for post-analytics module
427427
###
428428
postanalytics:
429-
### Optional configuration of external Tarantool instance. If feature is enabled,
430-
### then Tarantool will not be deployed by current Helm chart, external instance will be used instead
429+
### Optional configuration of external Wstore instance. If feature is enabled,
430+
### then Wstore will not be deployed by current Helm chart, external instance will be used instead
431431
###
432432
external:
433-
### Set to 'true' to use external Tarantool instance
433+
### Set to 'true' to use external Wstore instance
434434
###
435435
enabled: false
436-
### Hostname (FQDN) or IP address of external Tarantool instance (e.g. "tarantool.domain.internal" or "10.10.0.100")
436+
### Hostname (FQDN) or IP address of external Wstore instance (e.g. "wstore.domain.internal" or "10.10.0.100")
437437
### The hostname must be accessible from Kubernetes cluster where current Helm chart is installed
438438
###
439439
host: ""
440-
### Number of TCP port of external Tarantool instance
440+
### Number of TCP port of external Wstore instance
441441
###
442442
port: 3313
443443

@@ -622,9 +622,9 @@ postanalytics:
622622
extraVolumeMounts: []
623623
# - name: something
624624
# mountPath: /mnt/something
625-
tarantool:
625+
wstore:
626626
config:
627-
### The allocated memory size in GB for Tarantool in-memory storage. Detailed recommendations are provided
627+
### The allocated memory size in GB for Wstore in-memory storage. Detailed recommendations are provided
628628
### here: https://docs.wallarm.com/admin-en/configuration-guides/allocate-resources-for-waf-node/
629629
###
630630
arena: "2.0"
@@ -791,7 +791,7 @@ controller:
791791
image:
792792
registry: docker.io
793793
image: wallarm/sidecar-controller
794-
tag: 1.6.0
794+
tag: 1.7.0
795795
pullPolicy: IfNotPresent
796796
# -- Admission webhook configuration
797797
# @default -- *See below for details*

test/smoke/functions.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ function get_controller_logs_and_fail() {
7575
echo "#####################################"
7676
echo "######## Post-analytics logs ########"
7777
echo -e "#####################################\n"
78-
for CONTAINER in antibot appstructure supervisord tarantool ; do
78+
for CONTAINER in antibot appstructure supervisord wstore ; do
7979
echo "#######################################"
8080
echo "###### ${CONTAINER} container logs ######"
8181
echo -e "#######################################\n"
@@ -113,7 +113,7 @@ function get_logs() {
113113
echo "#################################"
114114
echo "######## Post-analytics Pod #####"
115115
echo "#################################"
116-
for CONTAINER in appstructure supervisord tarantool ; do
116+
for CONTAINER in appstructure supervisord wstore ; do
117117
echo "#######################################"
118118
echo "###### ${CONTAINER} container logs ######"
119119
echo -e "#######################################\n"

0 commit comments

Comments
 (0)