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

Missing pod annotation and security constraint in helm chart #356

Merged
merged 1 commit into from
Mar 1, 2023
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 chart/docker-auth/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
appVersion: "1.8.0"
description: Docker Registry V2 authentication server
name: docker-auth
version: 1.3.0
version: 1.4.0
keywords:
- docker
- registry
Expand Down
17 changes: 17 additions & 0 deletions chart/docker-auth/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,27 @@ spec:
app.kubernetes.io/instance: {{ .Release.Name }}
annotations:
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
{{- if .Values.podAnnotations }}
{{- range $key, $value := .Values.podAnnotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
spec:
{{- if .Values.podSecurityContext }}
{{- with .Values.podSecurityContext }}
securityContext:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
{{- if .Values.containerSecurityContext }}
{{- with .Values.containerSecurityContext }}
securityContext:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- end }}
args: ["--v={{ .Values.logging.level }}", "-logtostderr", "/config/auth_config.yml"]
volumeMounts:
- name: {{ include "docker-auth.name" . }}-config
Expand Down
10 changes: 10 additions & 0 deletions chart/docker-auth/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,13 @@ nodeSelector: {}
tolerations: []

affinity: {}

# podAnnotations to use for the deployment. Optional
podAnnotations: {}

# SecurityContext at container level to use for the deployment. Optional
containerSecurityContext: {}

# SecurityContext at pod level to use for the deployment. Optional
podSecurityContext: {}