adding advanced model loading capabilities

This commit is contained in:
roybarda 2022-10-30 15:53:55 +02:00
parent b74ce2ad8e
commit a8de95a313
2 changed files with 13 additions and 1 deletions

View File

@ -112,8 +112,10 @@ spec:
{{- end }}
resources:
{{ toYaml .Values.resources | nindent 12 }}
{{- if .Values.appsec.persistence.enabled }}
volumeMounts:
- name: advanced-model
mountPath: /advanced-model
{{- if .Values.appsec.persistence.enabled }}
- name: appsec-conf
mountPath: /etc/cp/conf
- name: appsec-data
@ -247,6 +249,10 @@ spec:
terminationGracePeriodSeconds: {{ .Values.controller.terminationGracePeriodSeconds }}
{{- if (or .Values.controller.customTemplate.configMapName .Values.controller.extraVolumeMounts .Values.controller.admissionWebhooks.enabled .Values.controller.extraVolumes .Values.controller.extraModules) }}
volumes:
- name: advanced-model
configMap:
name: advanced-model-config
optional: true
{{- if .Values.controller.extraModules }}
- name: modules
emptyDir: {}

View File

@ -56,6 +56,12 @@ fi
/nano-service-installers/$ATTACHMENT_REGISTRATION_SERVICE --install
/nano-service-installers/$HTTP_TRANSACTION_HANDLER_SERVICE --install
# use advanced model if exist as data for agent
FILE=/advanced-model/open-appsec-advanced-model.tgz
if [ -f "$FILE" ]; then
tar -xzvf $FILE -C /etc/cp/conf/waap
fi
touch /etc/cp/watchdog/wd.startup
while true; do
if [ -z "$init" ]; then