harbor/contrib/helm/harbor/templates/clair/clair-dpl.yaml

54 lines
1.4 KiB
YAML
Raw Normal View History

2018-02-17 04:29:52 +01:00
{{ if .Values.clair.enabled }}
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: {{ template "harbor.fullname" . }}-clair
labels:
{{ include "harbor.labels" . | indent 4 }}
2018-02-17 04:29:52 +01:00
component: clair
spec:
replicas: 1
selector:
matchLabels:
{{ include "harbor.matchLabels" . | indent 6 }}
component: clair
2018-02-17 04:29:52 +01:00
template:
metadata:
labels:
{{ include "harbor.labels" . | indent 8 }}
2018-02-17 04:29:52 +01:00
component: clair
spec:
containers:
- name: clair
image: {{ .Values.clair.image.repository }}:{{ .Values.clair.image.tag }}
imagePullPolicy: {{ .Values.clair.image.pullPolicy }}
args: ["-insecure-tls", "-config", "/etc/clair/config.yaml"]
2018-02-17 04:29:52 +01:00
resources:
{{ toYaml .Values.clair.resources | indent 10 }}
ports:
- containerPort: 6060
volumeMounts:
- name: clair-config
mountPath: /etc/clair/config.yaml
2018-02-17 04:29:52 +01:00
subPath: config.yaml
volumes:
- name: clair-config
configMap:
name: "{{ template "harbor.fullname" . }}-clair"
2018-02-17 04:29:52 +01:00
items:
- key: config.yaml
path: config.yaml
{{- with .Values.clair.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.clair.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.clair.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
{{ end }}