Skip to content

Commit

Permalink
Merge pull request #242 from devtron-labs/serviceaccount-clair
Browse files Browse the repository at this point in the history
misc: added service-account to clair and correct the selectors of clair service
  • Loading branch information
prakarsh-dt authored Sep 23, 2024
2 parents e269fe6 + 9230e35 commit 07dbbd2
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion charts/clair/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ maintainers:
name: clair
sources:
- https://github.com/coreos/clair
version: 0.1.12
version: 0.1.13
4 changes: 2 additions & 2 deletions charts/clair/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ If release name contains chart name it will be used as a full name.
{{/*
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/clair/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ spec:
integration: security
{{ toYaml .Values.labels | indent 8 }}
spec:
{{- include "common.nodeSelector" (dict "nodeSelector" $.Values.nodeSelector "tolerations" $.Values.tolerations "imagePullSecrets" $.Values.imagePullSecrets "global" $.Values.global) | indent 6 }}
{{- include "common.schedulerConfig" (dict "nodeSelector" $.Values.nodeSelector "tolerations" $.Values.tolerations "imagePullSecrets" $.Values.imagePullSecrets "global" $.Values.global) | indent 6 }}
serviceAccountName: devtron-default-sa
volumes:
- name: "{{ .Chart.Name }}-config"
secret:
Expand Down
4 changes: 2 additions & 2 deletions charts/clair/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
heritage: {{ .Release.Service | quote }}
release: {{ .Release.Name | quote }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
app: clair
app: {{ template "clair.fullname" . }}
integration: security
{{ toYaml .Values.labels | indent 4 }}
spec:
Expand All @@ -30,6 +30,6 @@ spec:
heritage: {{ .Release.Service | quote }}
release: {{ .Release.Name | quote }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
app: clair
app: {{ template "clair.fullname" . }}
integration: security
{{ toYaml .Values.labels | indent 4 }}

0 comments on commit 07dbbd2

Please sign in to comment.