Skip to content

Commit

Permalink
fix: typos in podSecurityContext/containerSecurityContext
Browse files Browse the repository at this point in the history
  • Loading branch information
evgkrsk committed Apr 14, 2022
1 parent 83a911d commit b3ffe17
Show file tree
Hide file tree
Showing 10 changed files with 102 additions and 9 deletions.
8 changes: 8 additions & 0 deletions charts/universal-chart/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 3.0.2 - April 14, 2022

* fix: typos in podSecurityContext/containerSecurityContext

## 3.0.1 - April 14, 2022

* technical release without changes

## 3.0.0 - April 14, 2022

* `jobs`, `cronJobs` and `servicemonitors` now is maps, where key is a name
Expand Down
2 changes: 1 addition & 1 deletion charts/universal-chart/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
description: Nixys universal Helm chart for deploy your apps to Kubernetes
name: universal-chart
version: 3.0.1
version: 3.0.2
maintainers:
- name: Roman Andreev
email: [email protected]
Expand Down
22 changes: 22 additions & 0 deletions charts/universal-chart/results/cronJobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,28 @@ spec:
- "default"
topologyKey: kubernetes.io/hostname
weight: 1
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- AUDIT_WRITE
- CHOWN
- DAC_OVERRIDE
- FOWNER
- FSETID
- KILL
- MKNOD
- NET_ADMIN
- NET_BIND_SERVICE
- NET_RAW
- SETFCAP
- SETGID
- SETPCAP
- SETUID
- SYS_CHROOT
readOnlyRootFilesystem: false
runAsNonRoot: true
runAsUser: 1000

containers:
- name: check22
Expand Down
24 changes: 23 additions & 1 deletion charts/universal-chart/results/web-app.values.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,29 @@ spec:
containers:
- name: test
image: registry.org/my-app:latest
imagePullPolicy: IfNotPresent
imagePullPolicy: IfNotPresent
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- AUDIT_WRITE
- CHOWN
- DAC_OVERRIDE
- FOWNER
- FSETID
- KILL
- MKNOD
- NET_ADMIN
- NET_BIND_SERVICE
- NET_RAW
- SETFCAP
- SETGID
- SETPCAP
- SETUID
- SYS_CHROOT
readOnlyRootFilesystem: false
runAsNonRoot: true
runAsUser: 1000
env:
- name: MY_ENV
value: "1234"
Expand Down
22 changes: 22 additions & 0 deletions charts/universal-chart/samples/cronJobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,25 @@ cronJobs:
check2:
name: check22
command: "just check2"
podSecurityContext:
capabilities:
drop: # ref: https://raw.githubusercontent.com/FairwindsOps/polaris/master/checks/insecureCapabilities.yaml
- AUDIT_WRITE
- CHOWN
- DAC_OVERRIDE
- FOWNER
- FSETID
- KILL
- MKNOD
- NET_ADMIN
- NET_BIND_SERVICE
- NET_RAW
- SETFCAP
- SETGID
- SETPCAP
- SETUID
- SYS_CHROOT
runAsNonRoot: true
runAsUser: 1000
allowPrivilegeEscalation: false
readOnlyRootFilesystem: false
22 changes: 22 additions & 0 deletions charts/universal-chart/samples/web-app.values.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,28 @@ deployments:
mountPath: /etc/nginx/nginx.conf
subPath: nginx.conf
name: test
containerSecurityContext:
capabilities:
drop: # ref: https://raw.githubusercontent.com/FairwindsOps/polaris/master/checks/insecureCapabilities.yaml
- AUDIT_WRITE
- CHOWN
- DAC_OVERRIDE
- FOWNER
- FSETID
- KILL
- MKNOD
- NET_ADMIN
- NET_BIND_SERVICE
- NET_RAW
- SETFCAP
- SETGID
- SETPCAP
- SETUID
- SYS_CHROOT
runAsNonRoot: true
runAsUser: 1000
allowPrivilegeEscalation: false
readOnlyRootFilesystem: false
volumes:
- name: secret-files
type: secret
Expand Down
2 changes: 1 addition & 1 deletion charts/universal-chart/templates/cronjob.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ spec:
podAntiAffinity: {{- include "helpers.affinities.pods" (dict "type" $.Values.podAntiAffinityPreset "context" $) | nindent 14 }}
{{- end }}
{{- with .podSecurityContext }}
securityContext: {{- include "helpers.tplvalues.render" (dict "value" . "context" $) nindent 12 }}
securityContext: {{- include "helpers.tplvalues.render" (dict "value" . "context" $) | nindent 12 }}
{{- end }}
{{- if .dnsPolicy }}
dnsPolicy: {{ .dnsPolicy }}
Expand Down
5 changes: 1 addition & 4 deletions charts/universal-chart/templates/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,6 @@ spec:
podAffinity: {{- include "helpers.affinities.pods" (dict "type" $.Values.podAffinityPreset "context" $) | nindent 10 }}
podAntiAffinity: {{- include "helpers.affinities.pods" (dict "type" $.Values.podAntiAffinityPreset "context" $) | nindent 10 }}
{{- end }}
{{- with .podSecurityContext }}
securityContext: {{- include "helpers.tplvalues.render" (dict "value" . "context" $) nindent 6 }}
{{- end }}
{{- if .dnsPolicy }}
dnsPolicy: {{ .dnsPolicy }}
{{- else if $.Values.generic.dnsPolicy }}
Expand All @@ -67,7 +64,7 @@ spec:
tolerations: {{- include "helpers.tplvalues.render" (dict "value" . "context" $) | nindent 8 }}
{{- end }}
{{- with .podSecurityContext }}
securityContext: {{- include "helpers.tplvalues.render" (dict "value" . "context" $) nindent 8 }}
securityContext: {{- include "helpers.tplvalues.render" (dict "value" . "context" $) | nindent 8 }}
{{- end }}
{{ if or $.Values.imagePullSecrets .imagePullSecrets }}
imagePullSecrets:
Expand Down
2 changes: 1 addition & 1 deletion charts/universal-chart/templates/helm-hooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ spec:
podAntiAffinity: {{- include "helpers.affinities.pods" (dict "type" $.Values.podAntiAffinityPreset "context" $) | nindent 10 }}
{{- end }}
{{- with .podSecurityContext }}
securityContext: {{- include "helpers.tplvalues.render" (dict "value" . "context" $) nindent 6 }}
securityContext: {{- include "helpers.tplvalues.render" (dict "value" . "context" $) | nindent 6 }}
{{- end }}
{{- if .dnsPolicy }}
dnsPolicy: {{ .dnsPolicy }}
Expand Down
2 changes: 1 addition & 1 deletion charts/universal-chart/templates/job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ spec:
podAntiAffinity: {{- include "helpers.affinities.pods" (dict "type" $.Values.podAntiAffinityPreset "context" $) | nindent 10 }}
{{- end }}
{{- with .podSecurityContext }}
securityContext: {{- include "helpers.tplvalues.render" (dict "value" . "context" $) nindent 6 }}
securityContext: {{- include "helpers.tplvalues.render" (dict "value" . "context" $) | nindent 6 }}
{{- end }}
{{- if .dnsPolicy }}
dnsPolicy: {{ .dnsPolicy }}
Expand Down

0 comments on commit b3ffe17

Please sign in to comment.