Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NODE-6104 Rename tarantool to wstore and cron to wcli #209

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Rename tarantool to wstore and cron to wcli
  • Loading branch information
nedvna committed Jan 24, 2025
commit 9f8f17c2ca29a46816c4b4ee552be3892ac5c726
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -13,6 +13,7 @@
vendor/*
build/_output
deploy/tmp
.DS_Store

# GOPATH
.go
2 changes: 1 addition & 1 deletion TAG
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.6.0
1.7.0
32 changes: 16 additions & 16 deletions files/template.yaml.tpl
Original file line number Diff line number Diff line change
@@ -59,10 +59,10 @@ volumes:
value: "{{ getAnnotation .ObjectMeta (withAP `wallarm-unpack-response`) .Config.wallarm.unpackResponse }}"
- name: WALLARM_ACL_EXPORT_ENABLE
value: "{{ getAnnotation .ObjectMeta (withAP `wallarm-acl-export-enable`) .Config.wallarm.aclExportEnable }}"
- name: WALLARM_TARANTOOL_HOST
value: "{{ .Config.tarantool.host }}"
- name: WALLARM_TARANTOOL_PORT
value: "{{ .Config.tarantool.port }}"
- name: WALLARM_WSTORE_HOST
value: "{{ .Config.wstore.host }}"
- name: WALLARM_WSTORE_PORT
value: "{{ .Config.wstore.port }}"
- name: WALLARM_UPSTREAM_CONNECT_ATTEMPTS
value: "{{ getAnnotation .ObjectMeta (withAP `wallarm-upstream-connect-attempts`) .Config.wallarm.upstream.connectAttempts }}"
- name: WALLARM_UPSTREAM_RECONNECT_INTERVAL
@@ -91,16 +91,16 @@ volumes:
value: "{{ getAnnotation .ObjectMeta (withAP `nginx-worker-processes`) .Config.nginx.workerProcesses }}"
- name: NGINX_WORKER_CONNECTIONS
value: "{{ getAnnotation .ObjectMeta (withAP `nginx-worker-connections`) .Config.nginx.workerConnections }}"
- name: NGINX_TARANTOOL_UPSTREAM_KEEPALIVE
value: "{{ .Config.nginx.tarantoolUpstream.keepalive }}"
- name: NGINX_TARANTOOL_UPSTREAM_KEEPALIVE_REQUESTS
value: "{{ .Config.nginx.tarantoolUpstream.keepaliveRequests }}"
- name: NGINX_TARANTOOL_UPSTREAM_SERVER_MAX_FAILS
value: "{{ .Config.nginx.tarantoolUpstream.server.maxFails }}"
- name: NGINX_TARANTOOL_UPSTREAM_SERVER_FAIL_TIMEOUT
value: "{{ .Config.nginx.tarantoolUpstream.server.maxConns }}"
- name: NGINX_TARANTOOL_UPSTREAM_SERVER_MAX_CONNS
value: "{{ .Config.nginx.tarantoolUpstream.server.failTimeout }}"
- name: NGINX_WSTORE_UPSTREAM_KEEPALIVE
value: "{{ .Config.nginx.postanalyticsUpstream.keepalive }}"
- name: NGINX_WSTORE_UPSTREAM_KEEPALIVE_REQUESTS
value: "{{ .Config.nginx.postanalyticsUpstream.keepaliveRequests }}"
- name: NGINX_WSTORE_UPSTREAM_SERVER_MAX_FAILS
value: "{{ .Config.nginx.postanalyticsUpstream.server.maxFails }}"
- name: NGINX_WSTORE_UPSTREAM_SERVER_FAIL_TIMEOUT
value: "{{ .Config.nginx.postanalyticsUpstream.server.maxConns }}"
- name: NGINX_WSTORE_UPSTREAM_SERVER_MAX_CONNS
value: "{{ .Config.nginx.postanalyticsUpstream.server.failTimeout }}"
- name: NGINX_LOGS_EXTENDED
value: "{{ .Config.nginx.logs.extended }}"
- name: NGINX_LOGS_FORMAT
@@ -448,8 +448,8 @@ volumes:
Wcli arguments building
*/}}
{{- define "wcli-args" -}}
"-log-level", "{{ .Config.cron.logLevel }}",{{ " " }}
{{- with .Config.cron.commands -}}
"-log-level", "{{ .Config.wcli.logLevel }}",{{ " " }}
{{- with .Config.wcli.commands -}}
{{- range $name, $value := . -}}
"job:{{ $name }}", "-log-level", "{{ $value.logLevel }}",{{ " " }}
{{- end -}}
8 changes: 4 additions & 4 deletions helm/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: wallarm-sidecar
version: 5.2.11
appVersion: 5.2.11
appVersion: 6.0.0-rc0
description: Sidecar controller for Kubernetes. Injects sidecar proxy based on NGINX with Wallarm module and helper services.
home: https://github.com/wallarm/sidecar
icon: https://static.wallarm.com/wallarm-logo.svg
@@ -21,8 +21,8 @@ kubeVersion: ">=1.19.16-0"
annotations:
artifacthub.io/images: |
- name: sidecar
image: wallarm/sidecar:5.2.11
image: wallarm/sidecar:6.0.0-rc0
- name: sidecar-controller
image: wallarm/sidecar-controller:1.6.0
image: wallarm/sidecar-controller:1.7.0
- name: node-helpers
image: wallarm/node-helpers:5.2.11
image: wallarm/node-helpers:6.0.0-rc0
Original file line number Diff line number Diff line change
@@ -3,4 +3,4 @@ imagePullSecrets:
postanalytics:
external:
enabled: true
host: tarantool.domain.internal
host: wstore.domain.internal
12 changes: 6 additions & 6 deletions helm/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -145,17 +145,17 @@ wallarm-sidecar-proxy
value: {{ .Chart.Version | quote }}
{{- end -}}

{{- define "wallarm-sidecar.tarantoolHost" -}}
{{- define "wallarm-sidecar.wstoreHost" -}}
{{- if .Values.postanalytics.external.enabled }}
{{- required "Hostname of external Tarantool instance is required" .Values.postanalytics.external.host }}
{{- required "Hostname of external Wstore instance is required" .Values.postanalytics.external.host }}
{{- else }}
{{- template "wallarm-sidecar.fullname" . }}-postanalytics.{{ .Release.Namespace }}.svc
{{- end }}
{{- end -}}

{{- define "wallarm-sidecar.tarantoolPort" -}}
{{- define "wallarm-sidecar.wstorePort" -}}
{{- if .Values.postanalytics.external.enabled }}
{{- required "Port of external Tarantool instance is required" .Values.postanalytics.external.port }}
{{- required "Port of external Wstore instance is required" .Values.postanalytics.external.port }}
{{- else }}
{{- .Values.postanalytics.service.port }}
{{- end }}
@@ -165,8 +165,8 @@ wallarm-sidecar-proxy
Wcli arguments building
*/}}
{{- define "wallarm-sidecar.wcli-args" -}}
"-log-level", "{{ .Values.config.cron.logLevel }}",{{ " " }}
{{- with .Values.config.cron.commands -}}
"-log-level", "{{ .Values.config.wcli.logLevel }}",{{ " " }}
{{- with .Values.config.wcli.commands -}}
{{- range $name, $value := . -}}
"job:{{ $name }}", "-log-level", "{{ $value.logLevel }}",{{ " " }}
{{- end -}}
6 changes: 3 additions & 3 deletions helm/templates/controller-configmap.yaml
Original file line number Diff line number Diff line change
@@ -17,9 +17,9 @@ data:
config.yaml: |-
settings:
{{- toYaml .Values.config | nindent 6 }}
tarantool:
host: {{ template "wallarm-sidecar.tarantoolHost" . }}
port: {{ template "wallarm-sidecar.tarantoolPort" . }}
wstore:
host: {{ template "wallarm-sidecar.wstoreHost" . }}
port: {{ template "wallarm-sidecar.wstorePort" . }}
component:
name: {{ template "wallarm-sidecar.componentName" . }}
version: {{ .Chart.Version }}
30 changes: 16 additions & 14 deletions helm/templates/postanalytics-deployment.yaml
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@ spec:
template:
metadata:
annotations:
checksum/config: {{ .Values.config.cron | toJson | sha256sum }}
checksum/config: {{ .Values.config.wcli | toJson | sha256sum }}
checksum/secret: {{ .Values.config.wallarm.api | toJson | sha256sum }}
{{- include "wallarm-sidecar.annotations" . | nindent 8 }}
{{- with .Values.postanalytics.extraAnnotations }}
@@ -149,32 +149,32 @@ spec:
{{- with .Values.postanalytics.supervisord.extraVolumeMounts }}
{{- . | toYaml | nindent 10 }}
{{- end }}
- name: tarantool
- name: wstore
image: {{ include "wallarm-sidecar.image" .Values.helper.image }}
imagePullPolicy: "{{ .Values.helper.image.pullPolicy }}"
args: ["tarantool"]
args: ["wstore"]
env:
{{- include "wallarm-sidecar.credentials" . | nindent 10 }}
- name: SLAB_ALLOC_ARENA
value: {{ .Values.postanalytics.tarantool.config.arena | quote }}
{{- with .Values.postanalytics.tarantool.extraEnvs }}
value: {{ .Values.postanalytics.wstore.config.arena | quote }}
{{- with .Values.postanalytics.wstore.extraEnvs }}
{{- . | toYaml | nindent 10 }}
{{- end }}
ports:
- name: tarantool
- name: wstore
containerPort: {{ .Values.postanalytics.service.port }}
protocol: TCP
{{- with .Values.postanalytics.tarantool.livenessProbe }}
{{- with .Values.postanalytics.wstore.livenessProbe }}
livenessProbe: {{ . | toYaml | nindent 12 }}
{{- end }}
{{- with .Values.postanalytics.tarantool.readinessProbe }}
{{- with .Values.postanalytics.wstore.readinessProbe }}
readinessProbe: {{ . | toYaml | nindent 12 }}
{{- end }}
{{- with .Values.postanalytics.tarantool.lifecycle }}
{{- with .Values.postanalytics.wstore.lifecycle }}
lifecycle: {{ . | toYaml | nindent 12 }}
{{- end }}
{{- if .Values.postanalytics.tarantool.securityContext }}
securityContext: {{ .Values.postanalytics.tarantool.securityContext | toYaml | nindent 12 }}
{{- if .Values.postanalytics.wstore.securityContext }}
securityContext: {{ .Values.postanalytics.wstore.securityContext | toYaml | nindent 12 }}
{{- else }}
securityContext:
privileged: false
@@ -186,11 +186,13 @@ spec:
add:
- NET_BIND_SERVICE
{{- end }}
{{- with .Values.postanalytics.tarantool.resources }}
{{- with .Values.postanalytics.wstore.resources }}
resources: {{ . | toYaml | nindent 12 }}
{{- end }}
{{- with .Values.postanalytics.tarantool.extraVolumeMounts }}
volumeMounts:
- mountPath: /opt/wallarm/etc/wallarm
name: wallarm
{{- with .Values.postanalytics.wstore.extraVolumeMounts }}
{{- . | toYaml | nindent 10 }}
{{- end }}
- name: appstructure
@@ -228,7 +230,7 @@ spec:
volumeMounts:
- mountPath: /opt/wallarm/etc/wallarm
name: wallarm
{{- with .Values.postanalytics.tarantool.extraVolumeMounts }}
{{- with .Values.postanalytics.wstore.extraVolumeMounts }}
{{- . | toYaml | nindent 10 }}
{{- end }}
{{- with .Values.postanalytics.extraContainers }}
4 changes: 2 additions & 2 deletions helm/templates/postanalytics-service.yaml
Original file line number Diff line number Diff line change
@@ -34,9 +34,9 @@ spec:
{{- include "wallarm-sidecar.selectorLabels" . | nindent 4 }}
app.kubernetes.io/component: postanalytics
ports:
- name: tarantool
- name: wstore
port: {{ .Values.postanalytics.service.port }}
targetPort: tarantool
targetPort: wstore
protocol: TCP
{{- if has (.Values.postanalytics.service.type | default "ClusterIP") (list "NodePort" "LoadBalancer") -}}
{{- with .Values.postanalytics.service.nodePort }}
30 changes: 15 additions & 15 deletions helm/values.yaml
Original file line number Diff line number Diff line change
@@ -79,11 +79,11 @@ config:
### Post-analytics node endpoint configuration
###
upstream:
### Defines the number of immediate reconnects to the Tarantool or Wallarm API
### Defines the number of immediate reconnects to the Wstore or Wallarm API
### https://docs.wallarm.com/admin-en/configure-parameters-en/#wallarm_upstream_connect_attempts
###
connectAttempts: 10
### Defines the interval between attempts to reconnect to the Tarantool or Wallarm API
### Defines the interval between attempts to reconnect to the Wstore or Wallarm API
### https://docs.wallarm.com/admin-en/configure-parameters-en/#wallarm_upstream_reconnect_interval
###
reconnectInterval: 15s
@@ -188,9 +188,9 @@ config:
### Sets the maximum number of simultaneous connections that can be opened by a worker process
###
workerConnections: 4096
### Parameters for Tarantool upstream. Refer to upstream module docs fo details https://nginx.org/en/docs/http/ngx_http_upstream_module.html#upstream
### Parameters for Wstore upstream. Refer to upstream module docs fo details https://nginx.org/en/docs/http/ngx_http_upstream_module.html#upstream
###
tarantoolUpstream:
postanalyticsUpstream:
### 'keepalive' parameter. Refer to docs for details https://nginx.org/en/docs/http/ngx_http_upstream_module.html#keepalive
###
keepalive: 16
@@ -217,7 +217,7 @@ config:
image:
registry: docker.io
image: wallarm/sidecar
tag: 5.2.11
tag: 6.0.0-wstore
pullPolicy: IfNotPresent
### Shared security context for all (init and regular) containers in sidecar schema except `iptables` container.
### For `iptables` container it is described in `sidecar.initContainers.iptables.securityContext` value
@@ -369,7 +369,7 @@ config:
- "ssl_conf_command Ciphersuites TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256"

### Wcli jobs
cron:
wcli:
### General log level
logLevel: warn
### Per-job log levels
@@ -420,24 +420,24 @@ helper:
image:
registry: docker.io
image: wallarm/node-helpers
tag: 5.2.11
tag: 5.3.0-wstore
pullPolicy: IfNotPresent

### Configuration for post-analytics module
###
postanalytics:
### Optional configuration of external Tarantool instance. If feature is enabled,
### then Tarantool will not be deployed by current Helm chart, external instance will be used instead
### Optional configuration of external Wstore instance. If feature is enabled,
### then Wstore will not be deployed by current Helm chart, external instance will be used instead
###
external:
### Set to 'true' to use external Tarantool instance
### Set to 'true' to use external Wstore instance
###
enabled: false
### Hostname (FQDN) or IP address of external Tarantool instance (e.g. "tarantool.domain.internal" or "10.10.0.100")
### Hostname (FQDN) or IP address of external Wstore instance (e.g. "wstore.domain.internal" or "10.10.0.100")
### The hostname must be accessible from Kubernetes cluster where current Helm chart is installed
###
host: ""
### Number of TCP port of external Tarantool instance
### Number of TCP port of external Wstore instance
###
port: 3313

@@ -622,9 +622,9 @@ postanalytics:
extraVolumeMounts: []
# - name: something
# mountPath: /mnt/something
tarantool:
wstore:
config:
### The allocated memory size in GB for Tarantool in-memory storage. Detailed recommendations are provided
### The allocated memory size in GB for Wstore in-memory storage. Detailed recommendations are provided
### here: https://docs.wallarm.com/admin-en/configuration-guides/allocate-resources-for-waf-node/
###
arena: "2.0"
@@ -791,7 +791,7 @@ controller:
image:
registry: docker.io
image: wallarm/sidecar-controller
tag: 1.6.0
tag: 1.7.0
pullPolicy: IfNotPresent
# -- Admission webhook configuration
# @default -- *See below for details*
4 changes: 2 additions & 2 deletions test/smoke/functions.sh
Original file line number Diff line number Diff line change
@@ -75,7 +75,7 @@ function get_controller_logs_and_fail() {
echo "#####################################"
echo "######## Post-analytics logs ########"
echo -e "#####################################\n"
for CONTAINER in antibot appstructure supervisord tarantool ; do
for CONTAINER in antibot appstructure supervisord wstore ; do
echo "#######################################"
echo "###### ${CONTAINER} container logs ######"
echo -e "#######################################\n"
@@ -113,7 +113,7 @@ function get_logs() {
echo "#################################"
echo "######## Post-analytics Pod #####"
echo "#################################"
for CONTAINER in appstructure supervisord tarantool ; do
for CONTAINER in appstructure supervisord wstore ; do
echo "#######################################"
echo "###### ${CONTAINER} container logs ######"
echo -e "#######################################\n"
Loading