2018-02-17 04:29:52 +01:00
|
|
|
{{ if .Values.clair.enabled }}
|
|
|
|
apiVersion: extensions/v1beta1
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
name: {{ template "harbor.fullname" . }}-clair
|
|
|
|
labels:
|
2018-03-09 11:47:13 +01:00
|
|
|
{{ include "harbor.labels" . | indent 4 }}
|
2018-02-17 04:29:52 +01:00
|
|
|
component: clair
|
|
|
|
spec:
|
|
|
|
replicas: 1
|
2018-03-09 11:47:13 +01:00
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
{{ include "harbor.matchLabels" . | indent 6 }}
|
|
|
|
component: clair
|
2018-02-17 04:29:52 +01:00
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
2018-03-09 11:47:13 +01:00
|
|
|
{{ 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", "/config/config.yaml"]
|
|
|
|
resources:
|
|
|
|
{{ toYaml .Values.clair.resources | indent 10 }}
|
|
|
|
ports:
|
|
|
|
- containerPort: 6060
|
|
|
|
volumeMounts:
|
|
|
|
- name: clair-config
|
|
|
|
mountPath: /config/config.yaml
|
|
|
|
subPath: config.yaml
|
|
|
|
volumes:
|
|
|
|
- name: clair-config
|
|
|
|
configMap:
|
|
|
|
name: "{{ template "harbor.fullname" . }}"
|
|
|
|
items:
|
|
|
|
- key: config.yaml
|
|
|
|
path: config.yaml
|
2018-03-09 11:47:13 +01:00
|
|
|
{{ end }}
|