mirror of
https://github.com/helm/charts.git
synced 2026-08-23 22:37:45 +00:00
* extraEnv vars change Signed-off-by: Gabor Kozma <gabo@kozmagabor.com> * bump version Signed-off-by: Gabor Kozma <gabo@kozmagabor.com> * add existing secret support Signed-off-by: Gabor Kozma <gabo@kozmagabor.com> * extraEnv map to array in values.yaml Signed-off-by: Gabor Kozma <gabo@kozmagabor.com>
113 lines
3.9 KiB
YAML
113 lines
3.9 KiB
YAML
{{- $component := "analyzer" -}}
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: "{{ template "anchore-engine.analyzer.fullname" . }}"
|
|
labels:
|
|
app: "{{ template "anchore-engine.fullname" . }}"
|
|
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
|
release: "{{ .Release.Name }}"
|
|
heritage: "{{ .Release.Service }}"
|
|
component: {{ $component }}
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
app: "{{ template "anchore-engine.fullname" . }}"
|
|
component: {{ $component }}
|
|
replicas: {{ .Values.anchoreAnalyzer.replicaCount }}
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: "{{ template "anchore-engine.fullname" . }}"
|
|
component: {{ $component }}
|
|
{{- if .Values.anchoreAnalyzer.annotations }}
|
|
annotations:
|
|
{{ toYaml .Values.anchoreAnalyzer.annotations | indent 8 }}
|
|
{{- end }}
|
|
spec:
|
|
containers:
|
|
{{- if .Values.cloudsql.enabled }}
|
|
- name: cloudsql-proxy
|
|
image: {{ .Values.cloudsql.image.repository }}:{{ .Values.cloudsql.image.tag }}
|
|
imagePullPolicy: {{ .Values.cloudsql.image.pullPolicy }}
|
|
command: ["/cloud_sql_proxy"]
|
|
args: ["-instances={{ .Values.cloudsql.instance }}=tcp:5432"]
|
|
{{- end }}
|
|
- name: {{ .Chart.Name }}-{{ $component }}
|
|
image: {{ .Values.anchoreGlobal.image }}
|
|
imagePullPolicy: {{ .Values.anchoreGlobal.imagePullPolicy }}
|
|
command: ["/usr/local/bin/anchore-manager"]
|
|
args: ["service", "start", "analyzer"]
|
|
envFrom:
|
|
- secretRef:
|
|
name: {{ default (include "anchore-engine.fullname" .) .Values.anchoreGlobal.existingSecret }}
|
|
- configMapRef:
|
|
name: {{ template "anchore-engine.fullname" . }}
|
|
env:
|
|
{{- with .Values.anchoreGlobal.extraEnv }}
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.anchoreAnalyzer.extraEnv }}
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
- name: ANCHORE_POD_NAME
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: metadata.name
|
|
ports:
|
|
- name: analyzer-api
|
|
containerPort: {{ .Values.anchoreAnalyzer.containerPort }}
|
|
volumeMounts:
|
|
- name: config-volume
|
|
mountPath: /config/config.yaml
|
|
subPath: config.yaml
|
|
{{- if .Values.anchoreGlobal.internalServicesSslEnabled }}
|
|
- name: certs
|
|
mountPath: {{ default "/certs" .Values.anchoreGlobal.internalServicesSsl.certDir }}
|
|
readOnly: true
|
|
{{- end }}
|
|
- name: analysis-scratch
|
|
mountPath: {{ .Values.anchoreAnalyzer.scratchVolume.mountPath }}
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: analyzer-api
|
|
initialDelaySeconds: 120
|
|
timeoutSeconds: 10
|
|
periodSeconds: 10
|
|
failureThreshold: 6
|
|
successThreshold: 1
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: analyzer-api
|
|
timeoutSeconds: 10
|
|
periodSeconds: 10
|
|
failureThreshold: 3
|
|
successThreshold: 1
|
|
resources:
|
|
{{ toYaml .Values.anchoreAnalyzer.resources | indent 10 }}
|
|
volumes:
|
|
- name: config-volume
|
|
configMap:
|
|
name: {{ template "anchore-engine.fullname" .}}
|
|
{{- if .Values.anchoreGlobal.internalServicesSslEnabled }}
|
|
- name: certs
|
|
secret:
|
|
secretName: {{ .Values.anchoreGlobal.internalServicesSsl.certSecret }}
|
|
{{- end }}
|
|
- name: analysis-scratch
|
|
{{ toYaml .Values.anchoreAnalyzer.scratchVolume.details | indent 10 }}
|
|
{{- if .Values.anchoreAnalyzer.nodeSelector }}
|
|
nodeSelector:
|
|
{{ toYaml .Values.anchoreAnalyzer.nodeSelector | indent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.anchoreAnalyzer.affinity }}
|
|
affinity:
|
|
{{ toYaml . | indent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.anchoreAnalyzer.tolerations }}
|
|
tolerations:
|
|
{{ toYaml . | indent 8 }}
|
|
{{- end }}
|