Skip to content

Commit d549ad3

Browse files
authored
Merge pull request #169 from abnamro/2625849-bug-fix-random-500-error-during-auditing
[#2632286] Fix 500 error coming due to redis permission issue while writing the dump.rdp file for snapshots
2 parents 7158deb + 9808f1e commit d549ad3

File tree

4 files changed

+18
-11
lines changed

4 files changed

+18
-11
lines changed

.github/workflows/k8-infra-ci.yaml

+7-4
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ on:
2323

2424
env:
2525
KUBERNETES_INFRA_DIR: deployment/kubernetes
26-
KUBE_AUDIT_TAG: 0.22.0
26+
KUBE_AUDIT_VERSION: 0.22.0
27+
DATREE_VERSION: 1.9.19
2728

2829
jobs:
2930
helm-chart-validation:
@@ -84,8 +85,8 @@ jobs:
8485
8586
- name: Install Kubeaudit
8687
run: |
87-
curl -LO https://github.com/Shopify/kubeaudit/releases/download/v${{env.KUBE_AUDIT_TAG}}/kubeaudit_${{env.KUBE_AUDIT_TAG}}_linux_amd64.tar.gz
88-
tar -xzvf kubeaudit_${{env.KUBE_AUDIT_TAG}}_linux_amd64.tar.gz
88+
curl -LO https://github.com/Shopify/kubeaudit/releases/download/v${{env.KUBE_AUDIT_VERSION}}/kubeaudit_${{env.KUBE_AUDIT_VERSION}}_linux_amd64.tar.gz
89+
tar -xzvf kubeaudit_${{env.KUBE_AUDIT_VERSION}}_linux_amd64.tar.gz
8990
mv kubeaudit /usr/local/bin/
9091
9192
- name: Run Kubeaudit Scan
@@ -95,7 +96,9 @@ jobs:
9596
9697
- name: Install Datree
9798
run: |
98-
curl https://get.datree.io | /bin/bash
99+
curl -L -o datree.zip https://github.com/datreeio/datree/releases/download/${{env.DATREE_VERSION}}/datree-cli_${{env.DATREE_VERSION}}_Linux_x86_64.zip
100+
unzip datree.zip -d datree
101+
mv datree/datree /usr/local/bin/
99102
100103
- name: Run Datree Scan
101104
id: datree_scan

deployment/kubernetes/charts/resc-redis/templates/redis_configmap.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ metadata:
77
app: {{ .Values.global.appName }}
88
data:
99
redis-config: |
10-
maxmemory 6gb
10+
maxmemory 1gb
1111
maxmemory-policy allkeys-lru
1212
protected-mode yes
13+
save 3600 1

deployment/kubernetes/charts/resc-redis/templates/redis_deployement.yaml

+5-2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ kind: Deployment
33
metadata:
44
name: {{ .Values.global.appName }}-redis
55
namespace: {{ .Values.global.namespace }}
6+
annotations:
7+
datree.skip/CONTAINERS_INCORRECT_RUNASUSER_VALUE_LOWUID: irrelevant for redis docker image, skipping.
68
spec:
79
selector:
810
matchLabels:
@@ -20,6 +22,7 @@ spec:
2022
app: {{ .Values.global.appName }}
2123
tier: redis
2224
kubeaudit.io/allow-disabled-apparmor: "apparmor-needs-to-be-installed-on-host"
25+
kubeaudit.io/allow-read-only-root-filesystem-false: "required-to-write-log-files"
2326
annotations:
2427
rollme: {{ randAlphaNum 5 | quote }}
2528
{{- with include "resc.redisAnnotations" .}}
@@ -72,15 +75,15 @@ spec:
7275
timeoutSeconds: 10
7376
securityContext:
7477
allowPrivilegeEscalation: false
75-
readOnlyRootFilesystem: true
78+
readOnlyRootFilesystem: false
7679
privileged: false
7780
capabilities:
7881
drop:
7982
- ALL
8083
seccompProfile:
8184
type: RuntimeDefault
8285
runAsNonRoot: true
83-
runAsUser: 10001
86+
runAsUser: 999
8487
livenessProbe:
8588
exec:
8689
command:

deployment/kubernetes/charts/resc-redis/values.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ redis:
66
pullPolicy: IfNotPresent
77
resources:
88
requests:
9-
cpu: 250m
10-
memory: 256Mi
9+
cpu: 400m
10+
memory: 750M
1111
limits:
12-
cpu: 250m
13-
memory: 256Mi
12+
cpu: 500m
13+
memory: 1G
1414
config:
1515
port: 6379
1616
password:

0 commit comments

Comments
 (0)