Skip to content

Commit

Permalink
Merge pull request #243 from devtron-labs/serviceaccount-security
Browse files Browse the repository at this point in the history
feat: added serviceaccount to image-scanner
  • Loading branch information
prakarsh-dt authored Sep 23, 2024
2 parents 07dbbd2 + 4ba1f47 commit 0b7fc34
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion charts/security/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ maintainers:
email: [email protected]
sources:
- https://github.com/devtron-labs/charts
version: 0.1.7
version: 0.1.8
appVersion: "0.1.1"
dependencies:
- name: clair
Expand Down
4 changes: 2 additions & 2 deletions charts/security/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ Return full image
{{/*
Expand the node selectors, tolerations, and image pull secrets for a Kubernetes resource.
Usage:
{{ include "common.nodeSelector" (dict "nodeSelector" .Values.path.to.nodeSelector "tolerations" .Values.path.to.tolerations "imagePullSecrets" .Values.path.to.imagePullSecrets "global" .Values.global ) }}
{{ include "common.schedulerConfig" (dict "nodeSelector" .Values.path.to.nodeSelector "tolerations" .Values.path.to.tolerations "imagePullSecrets" .Values.path.to.imagePullSecrets "global" .Values.global ) }}
*/}}

{{- define "common.nodeSelector" -}}
{{- define "common.schedulerConfig" -}}
{{- if .nodeSelector }}
nodeSelector:
{{ toYaml .nodeSelector | indent 2 }}
Expand Down
3 changes: 2 additions & 1 deletion charts/security/templates/image-scanner.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ spec:
{{ toYaml .labels | indent 8 }}
{{- end}}
spec:
{{- include "common.nodeSelector" (dict "nodeSelector" $.Values.imageScanner.nodeSelector "tolerations" $.Values.imageScanner.tolerations "imagePullSecrets" $.Values.imageScanner.imagePullSecrets "global" $.Values.global) | indent 6 }}
{{- include "common.schedulerConfig" (dict "nodeSelector" $.Values.imageScanner.nodeSelector "tolerations" $.Values.imageScanner.tolerations "imagePullSecrets" $.Values.imageScanner.imagePullSecrets "global" $.Values.global) | indent 6 }}
serviceAccountName: devtron-default-sa
terminationGracePeriodSeconds: 30
restartPolicy: Always
{{- if and $.Values.global $.Values.global.podSecurityContext }}
Expand Down

0 comments on commit 0b7fc34

Please sign in to comment.