Skip to content

Commit

Permalink
fix: fixes a lot of checkov errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Sajfer committed Oct 18, 2023
1 parent 01d2db7 commit 2b4483d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build/package/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ RUN make

FROM alpine:3.18 as runner

RUN adduser -u 1000 -s /bin/bash --disabled-password surbot && \
RUN adduser -u 10000 -s /bin/bash --disabled-password surbot && \
apk add --no-cache \
ffmpeg \
curl \
Expand Down
4 changes: 4 additions & 0 deletions deployments/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "surbot.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "surbot.labels" . | nindent 4 }}
annotations:
checkov.io/skip1: CKV_K8S_43
spec:
{{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }}
Expand All @@ -25,6 +28,7 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "surbot.serviceAccountName" . }}
automountServiceAccountToken: false
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
Expand Down
1 change: 1 addition & 0 deletions deployments/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ kind: ServiceAccount
metadata:
name: {{ include "surbot.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
automountServiceAccountToken: false
labels:
{{- include "surbot.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
Expand Down
9 changes: 6 additions & 3 deletions deployments/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ replicaCount: 1

image:
repository: ghcr.io/sajfer/surbot
pullPolicy: IfNotPresent
pullPolicy: Always
# Overrides the image tag whose default is the chart appVersion.
tag: ""

Expand All @@ -30,7 +30,9 @@ spotify_clientsecret: ""

podAnnotations: {}

podSecurityContext: {}
podSecurityContext:
seccompProfile:
type: RuntimeDefault
# fsGroup: 2000

securityContext:
Expand All @@ -39,7 +41,8 @@ securityContext:
- ALL
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 1000
runAsUser: 10000
allowPrivelegeEscalation: false

resources:
limits:
Expand Down

0 comments on commit 2b4483d

Please sign in to comment.