Skip to content

Commit

Permalink
fix condition
Browse files Browse the repository at this point in the history
  • Loading branch information
Verdict-as-a-Service Team committed Jun 18, 2024
1 parent b50777d commit 2955891
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions charts/vaas/templates/gdscan/update.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,16 @@ spec:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- include "gdscan.imagePullSecrets" . | nindent 10 }}
{{- if gt (len (include "gdscan.imagePullSecrets" . | fromYaml ).imagePullSecrets) 0 }}
{{- if (include "gdscan.imagePullSecrets" . | fromYaml ).imagePullSecrets}}
{{- if (gt (len (include "gdscan.imagePullSecrets" . | fromYaml ).imagePullSecrets) 0) }}
volumes:
{{- range (include "gdscan.imagePullSecrets" . | fromYaml ).imagePullSecrets }}
- name: {{ .name }}
secret:
secretName: {{ .name }}
{{- end }}
{{- end }}
{{- end }}
containers:
- name: kubectl
image: "{{ .Values.gdscan.autoUpdate.image.registry }}/{{ .Values.gdscan.autoUpdate.image.repository }}:{{ .Values.gdscan.autoUpdate.image.tag }}"
Expand All @@ -87,13 +89,15 @@ spec:
IMAGE="{{ .Values.gdscan.autoUpdate.image.registry }}/{{ .Values.gdscan.autoUpdate.image.repository }}:$LATEST"
echo "Setting image of $RESOURCE to $IMAGE"
#kubectl set-image -n {{ .Release.Namespace }} $RESOURCE $IMAGE
{{- if gt (len (include "gdscan.imagePullSecrets" . | fromYaml ).imagePullSecrets) 0 }}
{{- if (include "gdscan.imagePullSecrets" . | fromYaml ).imagePullSecrets}}
{{- if (gt (len (include "gdscan.imagePullSecrets" . | fromYaml ).imagePullSecrets) 0) }}
volumeMounts:
{{- range (include "gdscan.imagePullSecrets" . | fromYaml ).imagePullSecrets }}
- name: {{ .name }}
mountPath: "/home/appuser/.image_pull_secrets/{{ .name }}"
{{- end }}
{{- end }}
{{- end }}
{{- if .Values.gdscan.autoUpdate.networkPolicy.enabled }}
---
apiVersion: networking.k8s.io/v1
Expand Down

0 comments on commit 2955891

Please sign in to comment.