Skip to content

Commit

Permalink
notify deployment tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
asmith030 committed May 1, 2020
1 parent fc487a9 commit 8651d3a
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 13 deletions.
4 changes: 2 additions & 2 deletions charts/clamav/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 0.1.2
version: 0.1.3

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
appVersion: 0.1.2
appVersion: 0.1.3
4 changes: 1 addition & 3 deletions charts/clamav/templates/clamav-notify-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,4 @@ data:
".htm" => "text/html",
)
dir-listing.activate = "enable"
dir-listing.encoding = "utf-8"
index-file.names = ( "index.htm" )
19 changes: 15 additions & 4 deletions charts/clamav/templates/clamav-notify-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ metadata:
labels:
{{- include "clamav.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.replicaCount }}
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
name: {{ include "clamav.fullname" . }}-notify
Expand All @@ -23,20 +25,29 @@ spec:
imagePullPolicy: Always
resources: {{ toYaml .Values.clamavNotify.resources | nindent 10 }}
ports:
- name: http
containerPort: 8080
protocol: TCP
- name: http
containerPort: 8080
protocol: TCP
livenessProbe:
initialDelaySeconds: 300
periodSeconds: 2
failureThreshold: 5
httpGet:
path: /
port: http
readinessProbe:
initialDelaySeconds: 120
timeoutSeconds: 5
periodSeconds: 6
failureThreshold: 10
httpGet:
path: /
port: http
env:
- name: LIGHTTPD_CONFIG
value: /etc/config/lighttpd.conf
- name: LIGHTTPD_ROOT
value: /var/lib/clamav/mirror
volumeMounts:
- name: clamav-notify-storage
mountPath: /var/lib/clamav
Expand Down
3 changes: 1 addition & 2 deletions clamav-notify/lighttpd.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@ mimetype.assign = (
".htm" => "text/html",
)

dir-listing.activate = "enable"
dir-listing.encoding = "utf-8"
index-file.names = ( "index.htm" )
6 changes: 4 additions & 2 deletions clamav-notify/start.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
#!/bin/bash

touch /var/lib/clamav/

LIGHTTPD_ROOT="${LIGHTTPD_ROOT:-/var/lib/clamav}"
LIGHTTPD_CONFIG="${LIGHTTPD_CONFIG:-lighttpd.conf}"

mkdir -p $LIGHTTPD_ROOT
touch "$LIGHTTPD_ROOT/index.htm"

freshclam -d
lighttpd -t -f $LIGHTTPD_CONFIG
lighttpd -D -f $LIGHTTPD_CONFIG

0 comments on commit 8651d3a

Please sign in to comment.