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

DEVOPS-2178 add Wallarm Node group 4.6 #266

Merged
merged 2 commits into from
Sep 26, 2023
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches:
- 'main'
- 'stable/4.6'
- 'stable/**'
paths:
- 'NGINX_BASE'
- 'TAG'
Expand Down
12 changes: 9 additions & 3 deletions build/dev-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,11 @@ if [[ ${KUBE_CLIENT_VERSION} -lt 24 ]]; then
exit 1
fi

echo "[dev-env] building image"
make build image
docker tag "${REGISTRY}/ingress-controller:${TAG}" "${DEV_IMAGE}"
if [ "${SKIP_IMAGE_CREATION:-false}" = "false" ]; then
echo "[dev-env] building image"
make build image
docker tag "${REGISTRY}/ingress-controller:${TAG}" "${DEV_IMAGE}"
fi

export K8S_VERSION=${K8S_VERSION:-v1.26.3@sha256:61b92f38dff6ccc29969e7aa154d34e38b89443af1a2c14e6cfbd2df6419c66f}

Expand All @@ -85,6 +87,10 @@ controller:
repository: ${REGISTRY}/ingress-controller
tag: ${TAG}
digest:
wallarm:
enabled: true
apiHost: ${WALLARM_API_HOST}
token: ${WALLARM_API_TOKEN}
config:
worker-processes: "1"
podLabels:
Expand Down
2 changes: 1 addition & 1 deletion charts/ingress-nginx/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: wallarm-ingress
version: 4.6.7
version: 4.6.8
appVersion: 4.6.5-1
home: https://github.com/wallarm/ingress
description: Ingress controller for Kubernetes using NGINX as a reverse proxy and load balancer with Wallarm module
Expand Down
8 changes: 5 additions & 3 deletions charts/ingress-nginx/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,7 @@ Create the name of the controller service account to use
- sh
- -c
- >
/opt/wallarm/ruby/usr/share/wallarm-common/synccloud --one-time &&
/opt/wallarm/ruby/usr/share/wallarm-common/sync-ip-lists --one-time -l STDOUT &&
/opt/wallarm/ruby/usr/share/wallarm-common/sync-ip-lists-source --one-time -l STDOUT {{- if eq .Values.controller.wallarm.fallback "on" }} || true {{- end }};
/opt/wallarm/ruby/usr/share/wallarm-common/register-node --force --batch --no-export-env {{- if eq .Values.controller.wallarm.fallback "on" }} || true {{- end }};
timeout 10m /opt/wallarm/ruby/usr/share/wallarm-common/export-environment -l STDOUT || true
env:
{{- include "wallarm.credentials" . | nindent 2 }}
Expand All @@ -233,6 +231,10 @@ Create the name of the controller service account to use
value: www-data
- name: WALLARM_INGRESS_CONTROLLER_VERSION
value: {{ .Chart.Version | quote }}
{{- if .Values.controller.wallarm.nodeGroup }}
- name: WALLARM_LABELS
value: "group={{ .Values.controller.wallarm.nodeGroup }}"
{{- end }}
volumeMounts:
- mountPath: /etc/wallarm
name: wallarm
Expand Down
7 changes: 7 additions & 0 deletions charts/ingress-nginx/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -738,6 +738,10 @@ controller:
apiPort: 443
apiSSL: true
token: ""
## The name of Node group, required if API token is used to register the Node
## https://docs.wallarm.com/user-guides/nodes/nodes/#api-and-node-tokens-for-node-creation
##
nodeGroup: "defaultIngressGroup"
## Existing secret feature allows to pull Wallarm API token from existing Kubernetes secret
## https://docs.wallarm.com/admin-en/configure-kubernetes-en/#controllerwallarmexistingsecret
##
Expand Down Expand Up @@ -806,6 +810,9 @@ controller:
## wallarm-ingress-controller and wallarm-ingress-controller-tarantool.
## Means that in case of values changing - BOTH pods (controller and tarantool) will be redeployed.
addnode:
image:
repository: wallarm/ingress-ruby
tag: 4.8.0-1
resources: {}
cron:
jobs:
Expand Down
Loading