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

Added Security context for charts that where missing them #167

Merged
merged 2 commits into from
Jan 3, 2024
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
2 changes: 1 addition & 1 deletion autocert/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: autocert
version: 1.18.0
version: 1.18.0+1
appVersion: 0.18.0
description: A kubernetes add-on that automatically injects TLS/HTTPS certificates into your containers.
keywords:
Expand Down
7 changes: 4 additions & 3 deletions autocert/templates/autocert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ spec:
imagePullPolicy: {{ .Values.autocert.image.pullPolicy }}
resources:
{{- toYaml .Values.autocert.resources | nindent 10 }}
securityContext:
{{- toYaml .Values.autocert.securityContext | nindent 10 }}
env:
- name: PROVISIONER_NAME
value: {{ .Values.ca.provisioner.name | default "admin" }}
Expand All @@ -47,9 +49,6 @@ spec:
- name: autocert-config
mountPath: /home/step/autocert
readOnly: true
securityContext:
runAsUser: 1000
allowPrivilegeEscalation: false
livenessProbe:
initialDelaySeconds: 5
httpGet:
Expand Down Expand Up @@ -87,3 +86,5 @@ spec:
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
8 changes: 8 additions & 0 deletions autocert/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ service:
port: 443
targetPort: 4443

# Security Context for the pod
podSecurityContext: {}
# fsGroup: 2000

# autocert contains the configuration for autocert.
autocert:
# image contains the docker image for step-certificates.
Expand Down Expand Up @@ -42,6 +46,10 @@ autocert:
tolerations: []
# affinity contains the affinity settings for pod assignment.
affinity: {}
# security context for container
securityContext:
runAsUser: 1000
allowPrivilegeEscalation: false

# bootstrapper contains the autocert-bootstrapper image and configuration.
bootstrapper:
Expand Down
4 changes: 2 additions & 2 deletions step-issuer/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
apiVersion: v2
name: step-issuer
type: application
version: 0.8.0+1
version: 0.8.0+2
appVersion: 0.8.0
description: Step-issuer helm chart for kubernetes.
home: https://smallstep.com
dependencies:
- name: crds
condition: crds.enabled
version: 0.8.0+1
version: 0.8.0+2
keywords:
- authority
- ca
Expand Down
2 changes: 1 addition & 1 deletion step-issuer/charts/crds/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: crds
type: application
version: 0.8.0+1
version: 0.8.0+2
appVersion: 0.8.0
description: Step-issuer CRDs
home: https://smallstep.com
Expand Down
6 changes: 6 additions & 0 deletions step-issuer/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ spec:
ports:
- containerPort: {{ .Values.service.port }}
name: {{ .Values.service.targetPorts }}
securityContext:
{{- toYaml .Values.kubeRBACproxy.securityContext | nindent 10 }}
- image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
name: manager
Expand All @@ -48,6 +50,8 @@ spec:
{{- end }}
]
command: ["/manager"]
securityContext:
{{- toYaml .Values.securityContext | nindent 10 }}
{{- if .Values.tunnel.enabled }}
env:
- name: STEP_TLS_TUNNEL
Expand Down Expand Up @@ -95,3 +99,5 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
terminationGracePeriodSeconds: {{ .Values.deployment.terminationGracePeriodSeconds }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
19 changes: 18 additions & 1 deletion step-issuer/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,13 @@ kubeRBACproxy:
image:
repository: gcr.io/kubebuilder/kube-rbac-proxy
pullPolicy: IfNotPresent
tag: v0.8.0
tag: v0.15.0
# security context for container
securityContext:
runAsUser: 1000
runAsGroup: 1000
# seccompProfile:
# type: RuntimeDefault

# List of secret keys used to pull images from private registries.
imagePullSecrets: []
Expand Down Expand Up @@ -44,6 +50,17 @@ service:
scrape: true
scrapePort: 8080

# Security Context for the pod
podSecurityContext: {}
# fsGroup: 2000

# security context for container
securityContext:
runAsUser: 1000
runAsGroup: 1000
# seccompProfile:
# type: RuntimeDefault

serviceAccount:
# Specifies whether a service account should be created
create: false
Expand Down