Skip to content

Commit 292c415

Browse files
dklibanclaude
andauthored
Remove patch 0025 (ClamAV) and ClamAV deployment (#1228)
Drop the ClamAV malware scanning patch, remove the clamav-client dependency, and remove all ClamAV references from the ClowdApp deployment (ConfigMap, pod spec, env vars, parameters). Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 278a49d commit 292c415

5 files changed

Lines changed: 3 additions & 407 deletions

File tree

Dockerfile

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,6 @@ RUN patch -p1 -d /usr/local/lib/pulp/lib/python${PYTHON_VERSION}/site-packages <
135135
COPY images/assets/patches/0022-Adds-authentication-to-the-mvn-deploy-api.patch /tmp/
136136
RUN patch -p1 -d /usr/local/lib/pulp/lib/python${PYTHON_VERSION}/site-packages < /tmp/0022-Adds-authentication-to-the-mvn-deploy-api.patch
137137

138-
COPY images/assets/patches/0025-clamAV.patch /tmp/
139-
RUN patch -p1 -d /usr/local/lib/pulp/lib/python${PYTHON_VERSION}/site-packages < /tmp/0025-clamAV.patch
140-
141-
142138
COPY images/assets/patches/0028-OCIStorage-create-manifest.patch /tmp/
143139
RUN patch -p1 -d /usr/local/lib/pulp/lib/python${PYTHON_VERSION}/site-packages < /tmp/0028-OCIStorage-create-manifest.patch
144140

@@ -165,12 +161,12 @@ COPY images/assets/keys/SIGSTORE-redhat-release3.pem /etc/pki/sigstore/SIGSTORE-
165161
COPY images/assets/patches/0048-Re-enable-attestation-verification-with-vendored-key.patch /tmp/
166162
RUN patch -p1 -d /usr/local/lib/pulp/lib/python${PYTHON_VERSION}/site-packages < /tmp/0048-Re-enable-attestation-verification-with-vendored-key.patch
167163

168-
COPY images/assets/patches/0049-Skip-content-units-validation.patch /tmp/
169-
RUN patch -p1 -d /usr/local/lib/pulp/lib/python${PYTHON_VERSION}/site-packages < /tmp/0049-Skip-content-units-validation.patch
170-
171164
COPY images/assets/patches/0052-pulpcore-agent-scan-report.patch /tmp/
172165
RUN patch -p1 -d /usr/local/lib/pulp/lib/python${PYTHON_VERSION}/site-packages < /tmp/0052-pulpcore-agent-scan-report.patch
173166

167+
COPY images/assets/patches/0049-Skip-content-units-validation.patch /tmp/
168+
RUN patch -p1 -d /usr/local/lib/pulp/lib/python${PYTHON_VERSION}/site-packages < /tmp/0049-Skip-content-units-validation.patch
169+
174170
COPY images/assets/patches/0053-python-agent-scan-task.patch /tmp/
175171
RUN patch -p1 -d /usr/local/lib/pulp/lib/python${PYTHON_VERSION}/site-packages < /tmp/0053-python-agent-scan-task.patch
176172

deploy/clowdapp.yaml

Lines changed: 0 additions & 135 deletions
Original file line numberDiff line numberDiff line change
@@ -258,22 +258,6 @@ objects:
258258
sleep 1d
259259
done
260260
261-
- apiVersion: v1
262-
kind: ConfigMap
263-
metadata:
264-
name: clamav-conf
265-
data:
266-
clamd.conf: |
267-
LogFile /var/log/clamav/clamd.log
268-
LogTime yes
269-
LocalSocket /tmp/clamd.sock
270-
User clamav
271-
StreamMaxLength ${CLAMAV_STREAM_MAX_LENGTH}
272-
MaxFileSize ${CLAMAV_MAX_FILE_SIZE}
273-
MaxScanSize ${CLAMAV_MAX_SCAN_SIZE}
274-
TCPSocket ${CLAMAV_TCP_SOCKET}
275-
Debug ${CLAMAV_DEBUG}
276-
277261
- apiVersion: cloud.redhat.com/v1alpha1
278262
kind: ClowdApp
279263
metadata:
@@ -448,10 +432,6 @@ objects:
448432
fieldRef:
449433
apiVersion: v1
450434
fieldPath: metadata.namespace
451-
- name: PULP_CLAMAV_HOST
452-
value: ${PULP_CLAMAV_SVC_NAME}.$(NAMESPACE).svc
453-
- name: PULP_CLAMAV_PORT
454-
value: ${PULP_CLAMAV_SVC_PORT}
455435
- name: PULP_API_APP_TTL
456436
value: ${PULP_API_APP_TTL}
457437
- name: PULP_RDS_CONNECTION_TESTS_ENABLED
@@ -590,10 +570,6 @@ objects:
590570
fieldRef:
591571
apiVersion: v1
592572
fieldPath: metadata.namespace
593-
- name: PULP_CLAMAV_HOST
594-
value: ${PULP_CLAMAV_SVC_NAME}.$(NAMESPACE).svc
595-
- name: PULP_CLAMAV_PORT
596-
value: ${PULP_CLAMAV_SVC_PORT}
597573
- name: PULP_WORKER_TYPE
598574
value: ${PULP_WORKER_TYPE}
599575

@@ -734,75 +710,6 @@ objects:
734710
value: 5
735711
periodSeconds: 30
736712

737-
- name: clamav
738-
replicas: ${{CLAMAV_REPLICAS}}
739-
webServices:
740-
private:
741-
appProtocol: tcp
742-
enabled: true
743-
podSpec:
744-
metadata:
745-
annotations:
746-
ignore-check.kube-linter.io/minimum-three-replicas: "ClamAV is a low-requirement and must run with just one replica."
747-
image: ${CLAMAV_IMAGE}:${CLAMAV_IMAGE_TAG}
748-
command:
749-
- /bin/sh
750-
args:
751-
- -c
752-
- /init-unprivileged
753-
env:
754-
- name: CLAMD_CONF_StreamMaxLength
755-
value: ${CLAMAV_STREAM_MAX_LENGTH}
756-
- name: CLAMD_CONF_MaxFileSize
757-
value: ${CLAMAV_MAX_FILE_SIZE}
758-
- name: CLAMD_CONF_MaxScanSize
759-
value: ${CLAMAV_MAX_SCAN_SIZE}
760-
- name: CLAMD_CONF_TCPSocket
761-
value: ${CLAMAV_TCP_SOCKET}
762-
readinessProbe:
763-
exec:
764-
command:
765-
- clamdscan
766-
- "--ping"
767-
- "1"
768-
initialDelaySeconds: 20
769-
periodSeconds: 25
770-
timeoutSeconds: 20
771-
failureThreshold: 5
772-
livenessProbe:
773-
exec:
774-
command:
775-
- clamdscan
776-
- "--ping"
777-
- "1"
778-
initialDelaySeconds: 20
779-
periodSeconds: 25
780-
timeoutSeconds: 20
781-
failureThreshold: 5
782-
resources:
783-
requests:
784-
cpu: ${{CLAMAV_CPU_REQUEST}}
785-
memory: ${{CLAMAV_MEMORY_REQUEST}}
786-
limits:
787-
cpu: ${{CLAMAV_CPU_LIMIT}}
788-
memory: ${{CLAMAV_MEMORY_LIMIT}}
789-
volumes:
790-
- name: lib
791-
emptyDir: {}
792-
- name: log
793-
emptyDir: {}
794-
- name: clamav-conf
795-
configMap:
796-
name: clamav-conf
797-
volumeMounts:
798-
- name: lib
799-
mountPath: /var/lib/clamav
800-
- name: log
801-
mountPath: /var/log/clamav
802-
- name: clamav-conf
803-
mountPath: /etc/clamav/clamd.conf
804-
subPath: clamd.conf
805-
806713
- name: migrate-db
807714
replicas: ${{PULP_MIGRATION_REPLICAS}}
808715
podSpec:
@@ -1443,48 +1350,6 @@ parameters:
14431350
- name: PULP_TASK_DIAGNOSTICS
14441351
description: List of profilers available for task diagnostics
14451352
value: "['memory', 'memray', 'pyinstrument']"
1446-
- name: CLAMAV_REPLICAS
1447-
description: Number of ClamAV replicas
1448-
value: "1"
1449-
- name: CLAMAV_IMAGE
1450-
description: Specify which ClamAV container image the operator will deploy.
1451-
value: docker.io/clamav/clamav
1452-
- name: CLAMAV_IMAGE_TAG
1453-
description: Specify the tag or hash for the ClamAV image deployed by the operator.
1454-
value: "1.5.1"
1455-
- name: CLAMAV_STREAM_MAX_LENGTH
1456-
description: This option allows you to specify the upper limit for data size that will be transfered to remote daemon when scanning a single file.
1457-
value: 2G
1458-
- name: CLAMAV_MAX_FILE_SIZE
1459-
description: Files larger than this limit won't be scanned.
1460-
value: 2G
1461-
- name: CLAMAV_MAX_SCAN_SIZE
1462-
description: Sets the maximum amount of data to be scanned for each input file.
1463-
value: 2G
1464-
- name: CLAMAV_CPU_REQUEST
1465-
description: Amount of CPU to request for ClamAV container
1466-
value: "1"
1467-
- name: CLAMAV_MEMORY_REQUEST
1468-
description: Amount of memory to request for ClamAV container
1469-
value: 3Gi
1470-
- name: CLAMAV_CPU_LIMIT
1471-
description: Limit of CPU use by ClamAV container
1472-
value: "2"
1473-
- name: CLAMAV_MEMORY_LIMIT
1474-
description: Limit of memory use by ClamAV container
1475-
value: 4Gi
1476-
- name: CLAMAV_TCP_SOCKET
1477-
description: TCP port number the daemon will listen on. DO NOT MODIFY THIS. As of now, it seems like clowder only accepts/configures port 10000 for the "private services".
1478-
value: "10000"
1479-
- name: PULP_CLAMAV_SVC_NAME
1480-
description: ClamAV service name. This variable will be used by Pulp to define the TCP host to connect to ClamAV.
1481-
value: pulp-clamav
1482-
- name: PULP_CLAMAV_SVC_PORT
1483-
description: ClamAV service port. This variable will be used by Pulp to define the TCP port to connect to ClamAV.
1484-
value: "10000"
1485-
- name: CLAMAV_DEBUG
1486-
description: Enable debug messages from libclamav.
1487-
value: "false"
14881353
- name: PULP_UPLOAD_PROTECTION_TIME
14891354
description: Enable uploads cleanup after some period, in minutes.
14901355
value: "480"

0 commit comments

Comments
 (0)