Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update security context #134

Merged
merged 6 commits into from
Feb 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions dotnet/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
apiVersion: v2
description: .NET Core Helm Chart
name: dotnet
version: 9.2.0
version: 10.0.0
dependencies:
- name: libchart
version: 0.3.0
version: 1.0.0
repository: file://../libchart
31 changes: 17 additions & 14 deletions dotnet/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,17 @@ serviceAccount:
podAnnotations: {}
podLabels: {}

securityContext:
podSecurityContext:
runAsNonRoot: true
# capabilities:
# drop:
# - ALL
# readOnlyRootFilesystem: true
# runAsUser: 1000
# fsGroup: 2000
runAsUser: 65534
fsGroup: 65534

securityContext:
readOnlyRootFilesystem: true
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL

environment: {}
secrets: {}
Expand All @@ -62,17 +65,17 @@ csi: {}
# objectType: key
# objectVersion: ""

resources: {}
resources:
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
limits:
cpu: 200m
memory: 512Mi
requests:
cpu: 200m
memory: 512Mi

nodeSelector: {}

Expand Down
4 changes: 2 additions & 2 deletions golang/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
apiVersion: v2
description: golan Helm Chart
name: golang
version: 13.2.0
version: 14.0.0
dependencies:
- name: libchart
version: 0.3.0
version: 1.0.0
repository: file://../libchart
31 changes: 17 additions & 14 deletions golang/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,17 @@ serviceAccount:
podAnnotations: {}
podLabels: {}

securityContext:
podSecurityContext:
runAsNonRoot: true
# capabilities:
# drop:
# - ALL
# readOnlyRootFilesystem: true
# runAsUser: 1000
# fsGroup: 2000
runAsUser: 65534
fsGroup: 65534

securityContext:
readOnlyRootFilesystem: true
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL

environment: {}
secrets: {}
Expand All @@ -62,17 +65,17 @@ csi: {}
# objectType: key
# objectVersion: ""

resources: {}
resources:
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
limits:
cpu: 100m
memory: 256Mi
requests:
cpu: 100m
memory: 256Mi

nodeSelector: {}

Expand Down
4 changes: 2 additions & 2 deletions java/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
apiVersion: v2
description: Java Helm Chart
name: java
version: 6.2.0
version: 7.0.0
dependencies:
- name: libchart
version: 0.3.0
version: 1.0.0
repository: file://../libchart
31 changes: 17 additions & 14 deletions java/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,17 @@ serviceAccount:
podAnnotations: {}
podLabels: {}

securityContext:
podSecurityContext:
runAsNonRoot: true
# capabilities:
# drop:
# - ALL
# readOnlyRootFilesystem: true
# runAsUser: 1000
# fsGroup: 2000
runAsUser: 65534
fsGroup: 65534

securityContext:
readOnlyRootFilesystem: true
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL

environment: {}
secrets: {}
Expand All @@ -62,17 +65,17 @@ csi: {}
# objectType: key
# objectVersion: ""

resources: {}
resources:
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
limits:
cpu: 200m
memory: 512Mi
requests:
cpu: 200m
memory: 512Mi

nodeSelector: {}

Expand Down
2 changes: 1 addition & 1 deletion libchart/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: library
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.3.0
version: 1.0.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
5 changes: 3 additions & 2 deletions libchart/templates/_pod.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ imagePullSecrets:
{{- end }}
serviceAccountName: {{ include "libchart.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.securityContext | nindent 2 }}
{{- toYaml .Values.podSecurityContext | nindent 2 }}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
Expand Down Expand Up @@ -65,7 +65,8 @@ containers:
{{- end }}
resources:
{{ toYaml .Values.resources | nindent 6 }}

securityContext:
{{- toYaml .Values.securityContext | nindent 6 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{ toYaml . | nindent 4 }}
Expand Down
17 changes: 10 additions & 7 deletions libchart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,17 @@ serviceAccount:
podAnnotations: {}
podLabels: {}

securityContext:
podSecurityContext:
runAsNonRoot: true
# capabilities:
# drop:
# - ALL
# readOnlyRootFilesystem: true
# runAsUser: 1000
# fsGroup: 2000
runAsUser: 65534
fsGroup: 65534

securityContext:
readOnlyRootFilesystem: true
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL

environment: {}
secrets: {}
Expand Down
4 changes: 2 additions & 2 deletions nodejs/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
apiVersion: v2
description: Node.js Helm Chart
name: nodejs
version: 13.2.0
version: 14.0.0
dependencies:
- name: libchart
version: 0.3.0
version: 1.0.0
repository: file://../libchart
31 changes: 17 additions & 14 deletions nodejs/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,17 @@ serviceAccount:
podAnnotations: {}
podLabels: {}

securityContext:
podSecurityContext:
runAsNonRoot: true
# capabilities:
# drop:
# - ALL
# readOnlyRootFilesystem: true
# runAsUser: 1000
# fsGroup: 2000
runAsUser: 65534
fsGroup: 65534

securityContext:
readOnlyRootFilesystem: true
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL

environment: {}
secrets: {}
Expand All @@ -62,17 +65,17 @@ csi: {}
# objectType: key
# objectVersion: ""

resources: {}
resources:
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
limits:
cpu: 200m
memory: 512Mi
requests:
cpu: 200m
memory: 512Mi

nodeSelector: {}

Expand Down
4 changes: 2 additions & 2 deletions web/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ apiVersion: v2
appVersion: "1.0"
description: Helm chart for deployment of web servers
name: web
version: 10.3.0
version: 11.0.0
dependencies:
- name: libchart
version: 0.3.0
version: 1.0.0
repository: file://../libchart
31 changes: 17 additions & 14 deletions web/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,17 @@ serviceAccount:
podAnnotations: {}
podLabels: {}

securityContext:
podSecurityContext:
runAsNonRoot: true
# capabilities:
# drop:
# - ALL
# readOnlyRootFilesystem: true
# runAsUser: 1000
# fsGroup: 2000
runAsUser: 65534
fsGroup: 65534

securityContext:
readOnlyRootFilesystem: true
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL

environment: {}
secrets: {}
Expand All @@ -62,17 +65,17 @@ csi: {}
# objectType: key
# objectVersion: ""

resources: {}
resources:
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
limits:
cpu: 100m
memory: 256Mi
requests:
cpu: 100m
memory: 256Mi

nodeSelector: {}

Expand Down