Skip to content

Commit

Permalink
add container security
Browse files Browse the repository at this point in the history
  • Loading branch information
cooldragontattoo committed Jan 16, 2025
1 parent cb8347c commit 94bb791
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 1 deletion.
16 changes: 16 additions & 0 deletions helm/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,14 @@ spec:
{{- range .command }}
- {{ . }}
{{- end }}
{{- if .resources }}
resources:
{{- toYaml .resources | nindent 12 }}
{{- end }}
{{- if $.Values.securityContext }}
securityContext:
{{- toYaml $.Values.securityContext | nindent 12 }}
{{- end }}
{{- end }}
containers:
{{- range .Values.containers }}
Expand Down Expand Up @@ -74,6 +82,14 @@ spec:
volumeMounts:
{{- toYaml .volumeMounts | nindent 12 }}
{{- end }}
{{- if .resources }}
resources:
{{- toYaml .resources | nindent 12 }}
{{- end }}
{{- if .Values.securityContext }}
securityContext:
{{- toYaml $.Values.securityContext | nindent 12 }}
{{- end }}
{{- end }}
{{- with .Values.volumes }}
volumes:
Expand Down
23 changes: 22 additions & 1 deletion helm/values.eks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,14 @@ initContainers:
command:
- 'sh'
- '-c'
- 'python cfgov/manage.py migrate && ./index.sh'
- 'python cfgov/manage.py migrate && ./index.sh'
resources:
limits:
cpu: 100m
memory: 400Mi
requests:
cpu: 40m
memory: 200Mi


containers:
Expand Down Expand Up @@ -63,12 +70,26 @@ containers:
value: ""
- name: ES_PASS
value: ""
resources:
limits:
cpu: 100m
memory: 400Mi
requests:
cpu: 40m
memory: 200Mi
- name: cfgov-apache
image:
repository: cfgov-apache
pullPolicy: IfNotPresent
tag: "latest"
port: 8080
resources:
limits:
cpu: 60m
memory: 100Mi
requests:
cpu: 20m
memory: 50Mi
volumeMounts:
- name: apache-logs
mountPath: /usr/local/apache2/logs
Expand Down

0 comments on commit 94bb791

Please sign in to comment.