feat: use new datastructure for dockerhub auth and make cve scanning optional
This commit is contained in:
parent
107417aaac
commit
93312400b2
4 changed files with 20 additions and 10 deletions
|
|
@ -4,6 +4,12 @@
|
||||||
# renovate: datasource=github-releases depName=project-zot/zot versioning=pep440
|
# renovate: datasource=github-releases depName=project-zot/zot versioning=pep440
|
||||||
zot_version: "2.1.16"
|
zot_version: "2.1.16"
|
||||||
|
|
||||||
# dockerhub credentials (optional, avoids rate limits)
|
# enable cve scanning of images
|
||||||
# zot_dockerhub_username: ""
|
zot_cve_scanning: false
|
||||||
# zot_dockerhub_password: ""
|
|
||||||
|
# sync registry credentials (optional, avoids rate limits)
|
||||||
|
# zot_sync_credentials:
|
||||||
|
# - name: "dockerhub"
|
||||||
|
# registry: "registry-1.docker.io"
|
||||||
|
# username: "X"
|
||||||
|
# password: "Y"
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
group: "root"
|
group: "root"
|
||||||
mode: "0600"
|
mode: "0600"
|
||||||
notify: "restart zot"
|
notify: "restart zot"
|
||||||
when: "zot_dockerhub_username is defined and zot_dockerhub_password is defined"
|
when: "zot_sync_credentials is defined and zot_sync_credentials | length > 0"
|
||||||
|
|
||||||
# create config file
|
# create config file
|
||||||
- name: "create config file"
|
- name: "create config file"
|
||||||
|
|
|
||||||
|
|
@ -34,14 +34,15 @@
|
||||||
"enable": false
|
"enable": false
|
||||||
},
|
},
|
||||||
"search": {
|
"search": {
|
||||||
"enable": true,
|
"enable": true{% if zot_cve_scanning %},
|
||||||
"cve": {
|
"cve": {
|
||||||
"updateInterval": "24h"
|
"updateInterval": "24h"
|
||||||
}
|
}
|
||||||
|
{% endif %}
|
||||||
},
|
},
|
||||||
"sync": {
|
"sync": {
|
||||||
"enable": true,
|
"enable": true,
|
||||||
{% if zot_dockerhub_username is defined and zot_dockerhub_password is defined %}
|
{% if zot_sync_credentials is defined and zot_sync_credentials | length > 0 %}
|
||||||
"credentialsFile": "/etc/zot/sync-credentials.json",
|
"credentialsFile": "/etc/zot/sync-credentials.json",
|
||||||
{% endif %}
|
{% endif %}
|
||||||
"registries": [
|
"registries": [
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,9 @@
|
||||||
{
|
{
|
||||||
"registry-1.docker.io": {
|
{% for cred in zot_sync_credentials %}
|
||||||
"username": "{{ zot_dockerhub_username }}",
|
"{{ cred.registry }}": {
|
||||||
"password": "{{ zot_dockerhub_password }}"
|
"username": "{{ cred.username }}",
|
||||||
}
|
"password": "{{ cred.password }}"
|
||||||
|
}{% if not loop.last %},{% endif %}
|
||||||
|
|
||||||
|
{% endfor %}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue